vendor: 5,231 bytes, line 1
1import{k as UT,l as J_,m as p1,o as WT,q as d1,s as XT,x as YT}from"./chunk-P3HNRUUG.js";import{a as xI,b as CI,c as Hw}from"./chunk-3LGMRDIZ.js";import{a as kl,b as bf,c as bI,d as yI,e as PI,f as wI}from"./chunk-CD64BDTO.js";import{a as Wa,b as H1,c as bd,d as Il,e as U1,f as W1,g as X1}from"./chunk-ANLCMH5P.js";import{$ as qT,$b as fr,$c as K3,A as xp,Aa as U_,Ab as wo,Ac as es,Ad as Cf,B as ld,Ba as W_,Bb as gn,Bc as R1,Bd as rI,C as kT,Ca as qw,Cb as tn,Cc as N1,Cd as sI,D as G_,Da as c3,Db as Wt,Dc as A1,Dd as lI,E as zw,Ea as p3,Eb as ti,Ec as hf,Ed as B1,F as RT,Fa as X_,Fb as Ki,Fc as B3,Fd as cI,G as NT,Ga as _1,Gb as Pl,Gc as D1,Gd as pI,H as Rr,Ha as _n,Hb as ur,Hc as zi,Hd as $1,I as AT,Ia as $t,Ib as M3,Ic as Fi,Id as V1,J as DT,Ja as g1,Jb as Vt,Jc as yn,Jd as G1,K as l1,Ka as x1,Kb as O3,Kc as ln,Kd as q1,L as jT,La as d3,Lb as E3,Lc as xr,Ld as J1,M as q_,Ma as mf,Mb as T3,Mc as ra,Md as dI,N as Fw,Na as yl,Nb as I3,Nc as So,Nd as ts,O as c1,Oa as m3,Ob as k3,Oc as bi,Od as mI,P as Bw,Pa as u3,Pb as R3,Pc as j1,Pd as vf,Q as LT,Qa as C1,Qb as N3,Qc as $3,Qd as uI,R as $w,Ra as f3,Rb as Li,Rc as L1,Rd as fI,S as zT,Sa as v1,Sb as fo,Sc as V3,Sd as hI,T as FT,Ta as h3,Tb as Ti,Tc as G3,Td as _I,U as BT,Ua as b1,Ub as S1,Uc as q3,Ud as gI,V as $T,Va as uf,Vb as Bo,Vc as J3,Vd as On,W as Ei,Wa as ff,Wb as $o,Wc as H3,Wd as Mo,X as VT,Xa as _3,Xb as Vo,Xc as U3,Xd as Oo,Y as GT,Ya as ei,Yb as Zi,Yc as W3,Yd as vI,Z as sc,Za as g3,Zb as Jw,Zc as X3,_ as cd,_b as Y_,_c as Y3,a as Kr,aa as Vw,ab as x3,ac as hr,ad as Z3,b as bT,ba as JT,bb as C3,bc as wl,bd as Q3,c as yT,ca as HT,cb as y1,cc as _r,cd as eI,d as PT,da as KT,db as dd,dc as Sl,dd as hd,e as ad,ea as vi,eb as Ft,ec as gr,ed as _d,f as rd,fa as m1,fb as v3,fc as Gt,fd as gd,g as wT,ga as Et,gb as Ye,gc as ud,gd as z1,h as i1,ha as u1,hb as Tt,hc as Xt,hd as F1,i as bl,ia as ZT,ib as Mn,ic as jt,id as xd,j as ST,ja as QT,jb as Ri,jc as Bt,jd as tI,k as o1,ka as pd,kb as b3,kc as js,kd as ha,l as a1,la as Qt,lb as st,lc as A3,ld as _f,m as pf,ma as Qe,mb as Po,mc as D3,md as gf,n as ut,na as t3,nb as Nn,nc as j3,nd as xf,o as V_,oa as $e,ob as Ea,oc as L3,od as Cd,p as Gm,pa as Xe,pc as z3,pd as nI,q as MT,qa as We,qb as md,qc as Ml,qd as Ta,r as r1,ra as n3,rb as Wn,rc as Ua,rd as iI,s as OT,sa as i3,sb as An,sc as M1,sd as Ls,t as Zr,ta as o3,tb as y3,tc as O1,td as oI,u as ET,ua as a3,ub as P3,uc as F3,ud as yi,v as sd,va as f1,vb as w3,vc as fd,vd,w as TT,wa as r3,wb as P1,wc as E1,wd as Ol,x as df,xa as s3,xb as Qr,xc as T1,xd as El,y as IT,ya as l3,yb as w1,yc as I1,yd as Tl,z as s1,za as h1,zb as S3,zc as k1,zd as aI}from"./chunk-RIDHVCV3.js";import{$ as jw,$b as Cl,$c as Ha,A as Va,Aa as tc,Ac as G,B as ms,Ba as aT,Bc as _e,C as KE,Cc as Hn,Da as kc,Dc as _p,Ea as ki,Ec as nd,F as Aw,Fa as nc,Fc as wt,G as Dw,Gc as St,H as Fm,Ha as qa,Hc as Mt,I as Ga,Ia as rT,Ib as Yo,Ic as mT,J as Wx,Jb as sf,Jc as uT,K as Xx,Kb as S,Kc as id,L as td,Lb as M,Lc as lf,Ma as Zx,Mb as ac,Mc as gp,Na as F_,Nb as Pt,Nc as aa,Ob as be,Oc as Oa,P as ZE,Pb as ye,Pc as Ds,Q as QE,Qb as N,Qc as n1,R as eT,Rb as s,Sb as c,Sc as fT,T as Yx,Tb as ee,Tc as Zn,U as tT,Ub as zo,Uc as yo,V as Kx,Vb as Fo,Vc as kr,W as qr,Wb as Ur,Wc as cf,X as mr,Xb as fi,Xc as od,Y as vo,Yb as hi,Zb as Ma,Zc as hT,_ as Jr,_b as oe,a as jo,aa as L_,ab as xl,ad as _T,bb as $m,bd as gT,c as Lo,ca as fp,da as Sn,db as m,dc as Wr,dd as Rc,e as oa,ea as ar,ec as Xr,ed as Un,f as Ic,fc as q,ga as qi,gc as us,gd as xT,ha as rr,hb as Qx,hc as fs,hd as CT,ia as re,ib as e1,ic as t1,id as vT,j as UE,ja as af,jb as hp,jc as E,jd as Vm,kb as B_,kc as cT,l as Gi,la as nT,lb as ic,lc as x,ld as Pa,mb as le,mc as vl,md as Lw,n as D_,na as z_,nb as sT,nc as As,oa as k,ob as oc,oc as rc,p as WE,pa as R,pc as go,pd as Yi,q as Xo,qa as iT,qc as qn,qd as Yr,r as j_,ra as oT,rc as Jn,rd as $_,s as zm,sa as Hr,sb as Te,sc as pT,t as XE,ta as Bm,tb as sr,u as Rw,ua as rf,ub as bo,uc as dT,v as Ux,vc as bn,w as Nw,wa as At,wc as Ci,x as ba,xa as ya,xb as Ja,xc as Ue,y as YE,yb as Zt,yc as ji,zb as lT,zc as u}from"./chunk-45ZIY4L6.js";import{$a as H_,Eb as yt,Hb as at,Ia as xo,Kb as Dt,La as Gw,Lb as hn,Mb as no,Nb as Ht,Ob as Bn,Sa as mt,Ua as Ro,Za as Jt,_ as Rn,ga as we,ia as ge,na as ai,pa as e3}from"./chunk-DTIYU4EK.js";import{a as X,b as Ve,c as qE,e as li,g as JE,h as HE,j as $,k as Co}from"./chunk-YXMSW6L4.js";var Ms=li(cl=>{"use strict";cl.__esModule=!0;cl.extend=d7;cl.indexOf=R_e;cl.escapeExpression=N_e;cl.isEmpty=A_e;cl.createFrame=D_e;cl.blockParams=j_e;cl.appendContextPath=L_e;var E_e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},T_e=/[&<>"'`=]/g,I_e=/[&<>"'`=]/;function k_e(n){return E_e[n];}function d7(n){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&(n[e]=arguments[t][e]);return n;}var CO=Object.prototype.toString;cl.toString=CO;var xO=function(t){return typeof t=="function";};xO(/x/)&&(cl.isFunction=xO=function(n){return typeof n=="function"&&CO.call(n)==="[object Function]";});cl.isFunction=xO;var m7=Array.isArray||function(n){return n&&typeof n=="object"?CO.call(n)==="[object Array]":!1;};cl.isArray=m7;
1function R_e(n,t){for(var e=0,i=n.length;e<i;e++)if(n[e]===t)return e;return-1;}function N_e(n){if(typeof n!="string"){if(n&&n.toHTML)return n.toHTML();if(n==null)return"";if(!n)return n+"";n=""+n;}return I_e.test(n)?n.replace(T_e,k_e):n;}function A_e(n){return!n&&n!==0?!0:!!(m7(n)&&n.length===0);}function D_e(n){var t=d7({},n);return t._parent=n,t;}function j_e(n,t){return n.path=t,n;}function L_e(n,t){return(n?n+".":"")+t;}});var pl=li((AP,u7)=>{"use strict";AP.__esModule=!0;var vO=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function bO(n,t){var e=t&&t.loc,i=void 0,o=void 0,a=void 0,r=void 0;e&&(i=e.start.line,o=e.end.line,a=e.start.column,r=e.end.column,n+=" - "+i+":"+a);for(var l=Error.prototype.constructor.call(this,n),p=0;p<vO.length;p++)this[vO[p]]=l[vO[p]];Error.captureStackTrace&&Error.captureStackTrace(this,bO);try{e&&(this.lineNumber=i,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:a,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:r,enumerable:!0})):(this.column=a,this.endColumn=r));}catch(d){}}bO.prototype=new Error();AP.default=bO;u7.exports=AP.default;});var h7=li((DP,f7)=>{"use strict";DP.__esModule=!0;var yO=Ms();DP.default=function(n){n.registerHelper("blockHelperMissing",function(t,e){var i=e.inverse,o=e.fn;if(t===!0)return o(this);if(t===!1||t==null)return i(this);if(yO.isArray(t))return t.length>0?(e.ids&&(e.ids=[e.name]),n.helpers.each(t,e)):i(this);if(e.data&&e.ids){var a=yO.createFrame(e.data);a.contextPath=yO.appendContextPath(e.data.contextPath,e.name),e={data:a};}return o(t,e);});};f7.exports=DP.default;});var g7=li((jP,_7)=>{"use strict";jP.__esModule=!0;function z_e(n){return n&&n.__esModule?n:{default:n};}var wx=Ms(),F_e=pl(),B_e=z_e(F_e);jP.default=function(n){n.registerHelper("each",function(t,e){if(!e)throw new B_e.default("Must pass iterator to #each");var i=e.fn,o=e.inverse,a=0,r="",l=void 0,p=void 0;e.data&&e.ids&&(p=wx.appendContextPath(e.data.contextPath,e.ids[0])+"."),wx.isFunction(t)&&(t=t.call(this)),e.data&&(l=wx.createFrame(e.data));function d(w,T,O){l&&(l.key=w,l.index=T,l.first=T===0,l.last=!!O,p&&(l.contextPath=p+w)),r=r+i(t[w],{data:l,blockParams:wx.blockParams([t[w],w],[p+w,null])});}if(t&&typeof t=="object")if(wx.isArray(t))for(var f=t.length;a<f;a++)a in t&&d(a,a,a===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var h=[],g=t[Symbol.iterator](),b=g.next();!b.done;b=g.next())h.push(b.value);t=h;for(var f=t.length;a<f;a++)d(a,a,a===t.length-1);}else(function(){var w=void 0;Object.keys(t).forEach(function(T){w!==void 0&&d(w,a-1),w=T,a++;}),w!==void 0&&d(w,a-1,!0);})();return a===0&&(r=o(this)),r;});};_7.exports=jP.default;});var C7=li((LP,x7)=>{"use strict";LP.__esModule=!0;function $_e(n){return n&&n.__esModule?n:{default:n};}var V_e=pl(),G_e=$_e(V_e);LP.default=function(n){n.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new G_e.default('Missing helper: "'+arguments[arguments.length-1].name+'"');});};x7.exports=LP.default;});var P7=li((zP,y7)=>{"use strict";zP.__esModule=!0;function q_e(n){return n&&n.__esModule?n:{default:n};}var v7=Ms(),J_e=pl(),b7=q_e(J_e);zP.default=function(n){n.registerHelper("if",function(t,e){if(arguments.length!=2)throw new b7.default("#if requires exactly one argument");return v7.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||v7.isEmpty(t)?e.inverse(this):e.fn(this);}),n.registerHelper("unless",function(t,e){if(arguments.length!=2)throw new b7.default("#unless requires exactly one argument");return n.helpers.if.call(this,t,{fn:e.inverse,inverse:e.fn,hash:e.hash});});};y7.exports=zP.default;});var S7=li((FP,w7)=>{"use strict";FP.__esModule=!0;FP.default=function(n){n.registerHelper("log",function(){for(var t=[void 0],e=arguments[arguments.length-1],i=0;i<arguments.length-1;i++)t.push(arguments[i]);var o=1;e.hash.level!=null?o=e.hash.level:e.data&&e.data.level!=null&&(o=e.data.level),t[0]=o,n.log.apply(n,t);});};w7.exports=FP.default;});var O7=li((BP,M7)=>{"use strict";BP.__esModule=!0;
1BP.default=function(n){n.registerHelper("lookup",function(t,e,i){return t&&i.lookupProperty(t,e);});};M7.exports=BP.default;});var T7=li(($P,E7)=>{"use strict";$P.__esModule=!0;function H_e(n){return n&&n.__esModule?n:{default:n};}var Sx=Ms(),U_e=pl(),W_e=H_e(U_e);$P.default=function(n){n.registerHelper("with",function(t,e){if(arguments.length!=2)throw new W_e.default("#with requires exactly one argument");Sx.isFunction(t)&&(t=t.call(this));var i=e.fn;if(Sx.isEmpty(t))return e.inverse(this);var o=e.data;return e.data&&e.ids&&(o=Sx.createFrame(e.data),o.contextPath=Sx.appendContextPath(e.data.contextPath,e.ids[0])),i(t,{data:o,blockParams:Sx.blockParams([t],[o&&o.contextPath])});});};E7.exports=$P.default;});var PO=li(VP=>{"use strict";VP.__esModule=!0;VP.registerDefaultHelpers=c0e;VP.moveHelperToHooks=p0e;function Hu(n){return n&&n.__esModule?n:{default:n};}var X_e=h7(),Y_e=Hu(X_e),K_e=g7(),Z_e=Hu(K_e),Q_e=C7(),e0e=Hu(Q_e),t0e=P7(),n0e=Hu(t0e),i0e=S7(),o0e=Hu(i0e),a0e=O7(),r0e=Hu(a0e),s0e=T7(),l0e=Hu(s0e);function c0e(n){Y_e.default(n),Z_e.default(n),e0e.default(n),n0e.default(n),o0e.default(n),r0e.default(n),l0e.default(n);}function p0e(n,t,e){n.helpers[t]&&(n.hooks[t]=n.helpers[t],e||(n.helpers[t]=void 0));}});var k7=li((GP,I7)=>{"use strict";GP.__esModule=!0;var d0e=Ms();GP.default=function(n){n.registerDecorator("inline",function(t,e,i,o){var a=t;return e.partials||(e.partials={},a=function(r,l){var p=i.partials;i.partials=d0e.extend({},p,e.partials);var d=t(r,l);return i.partials=p,d;}),e.partials[o.args[0]]=o.fn,a;});};I7.exports=GP.default;});var R7=li(wO=>{"use strict";wO.__esModule=!0;wO.registerDefaultDecorators=h0e;function m0e(n){return n&&n.__esModule?n:{default:n};}var u0e=k7(),f0e=m0e(u0e);function h0e(n){f0e.default(n);}});var SO=li((qP,N7)=>{"use strict";qP.__esModule=!0;var _0e=Ms(),v_={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var e=_0e.indexOf(v_.methodMap,t.toLowerCase());e>=0?t=e:t=parseInt(t,10);}return t;},log:function(t){if(t=v_.lookupLevel(t),typeof console<"u"&&v_.lookupLevel(v_.level)<=t){var e=v_.methodMap[t];console[e]||(e="log");for(var i=arguments.length,o=Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];console[e].apply(console,o);}}};qP.default=v_;N7.exports=qP.default;});var MO=li(Mx=>{"use strict";Mx.__esModule=!0;Mx.createProtoAccessControl=v0e;Mx.resultIsAllowed=b0e;Mx.resetLoggedProperties=P0e;function g0e(n){return n&&n.__esModule?n:{default:n};}var A7=Ms(),x0e=SO(),C0e=g0e(x0e),JP=Object.create(null);function v0e(n){var t=Object.create(null);t.__proto__=!1,A7.extend(t,n.allowedProtoProperties);var e=Object.create(null);return e.constructor=!1,e.__defineGetter__=!1,e.__defineSetter__=!1,e.__lookupGetter__=!1,e.__lookupSetter__=!1,A7.extend(e,n.allowedProtoMethods),{properties:{whitelist:t,defaultValue:n.allowProtoPropertiesByDefault},methods:{whitelist:e,defaultValue:n.allowProtoMethodsByDefault}};}function b0e(n,t,e){return D7(typeof n=="function"?t.methods:t.properties,e);}function D7(n,t){return n.whitelist[t]!==void 0?n.whitelist[t]===!0:n.defaultValue!==void 0?n.defaultValue:(y0e(t),!1);}function y0e(n){JP[n]!==!0&&(JP[n]=!0,C0e.default.log("error",'Handlebars: Access has been denied to resolve the property "'+n+`" because it is not an "own property" of its parent. 2You can add a runtime option to disable the check or this warning: 3See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`));}function P0e(){Object.keys(JP).forEach(function(n){delete JP[n];});}});var UP=li(rp=>{"use strict";rp.__esModule=!0;rp.HandlebarsEnvironment=TO;function j7(n){return n&&n.__esModule?n:{default:n};}var Uu=Ms(),w0e=pl(),OO=j7(w0e),S0e=PO(),M0e=R7(),O0e=SO(),HP=j7(O0e),E0e=MO(),T0e="4.7.9";rp.VERSION=T0e;var I0e=8;rp.COMPILER_REVISION=I0e;var k0e=7;rp.LAST_COMPATIBLE_COMPILER_REVISION=k0e;var R0e={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};rp.REVISION_CHANGES=R0e;var EO="[object Object]";function TO(n,t,e){this.helpers=n||{},this.partials=t||{},this.decorators=e||{},S0e.registerDefaultHelpers(this),M0e.registerDefaultDecorators(this);}TO.prototype={constructor:TO,logger:HP.default,log:HP.default.log,registerHelper:function(t,e){if(Uu.toString.call(t)===EO){if(e)throw new OO.default("Arg not supported with multiple helpers");Uu.extend(this.helpers,t);}else this.helpers[t]=e;},unregisterHelper:function(t){delete this.helpers[t];},registerPartial:function(t,e){if(Uu.toString.call(t)===EO)Uu.extend(this.partials,t);else{if(typeof e>"u")throw new OO.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e;}},unregisterPartial:function(t){delete this.partials[t];},registerDecorator:function(t,e){if(Uu.toString.call(t)===EO){if(e)throw new OO.default("Arg not supported with multiple decorators");Uu.extend(this.decorators,t);}else this.decorators[t]=e;},unregisterDecorator:function(t){delete this.decorators[t];},resetLoggedPropertyAccesses:function(){E0e.resetLoggedProperties();}};var N0e=HP.default.log;rp.log=N0e;rp.createFrame=Uu.createFrame;rp.logger=HP.default;});var z7=li((WP,L7)=>{"use strict";WP.__esModule=!0;function IO(n){this.string=n;}IO.prototype.toString=IO.prototype.toHTML=function(){return""+this.string;};WP.default=IO;L7.exports=WP.default;});var F7=li(kO=>{"use strict";
vendor: 5,794 bytes, lines 3-5
3kO.__esModule=!0;kO.wrapHelper=A0e;function A0e(n,t){if(typeof n!="function")return n;var e=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),n.apply(this,arguments);};return e;}});var J7=li(Om=>{"use strict";Om.__esModule=!0;Om.checkRevision=B0e;Om.template=$0e;Om.wrapProgram=XP;Om.resolvePartial=V0e;Om.invokePartial=G0e;Om.noop=G7;function D0e(n){return n&&n.__esModule?n:{default:n};}function j0e(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t;}var L0e=Ms(),b_=j0e(L0e),z0e=pl(),Yp=D0e(z0e),Kp=UP(),B7=PO(),F0e=F7(),$7=MO();function B0e(n){var t=n&&n[0]||1,e=Kp.COMPILER_REVISION;if(!(t>=Kp.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Kp.COMPILER_REVISION))if(t<Kp.LAST_COMPATIBLE_COMPILER_REVISION){var i=Kp.REVISION_CHANGES[e],o=Kp.REVISION_CHANGES[t];throw new Yp.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+o+").");}else throw new Yp.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+n[1]+").");}function $0e(n,t){if(!t)throw new Yp.default("No environment passed to template");if(!n||!n.main)throw new Yp.default("Unknown template object: "+typeof n);n.main.decorator=n.main_d,t.VM.checkRevision(n.compiler);var e=n.compiler&&n.compiler[0]===7;function i(r,l,p){p.hash&&(l=b_.extend({},l,p.hash),p.ids&&(p.ids[0]=!0)),r=t.VM.resolvePartial.call(this,r,l,p),p.hooks=this.hooks,p.protoAccessControl=this.protoAccessControl;var d=t.VM.invokePartial.call(this,r,l,p);if(d==null&&t.compile&&(p.partials[p.name]=t.compile(r,n.compilerOptions,t),d=p.partials[p.name](l,p)),d!=null){if(p.indent){for(var f=d.split(` 4`),h=0,g=f.length;h<g&&!(!f[h]&&h+1===g);h++)f[h]=p.indent+f[h];d=f.join(` 5`);}return d;}else throw new Yp.default("The partial "+p.name+" could not be compiled when running in runtime-only mode");}var o={strict:function(l,p,d){if(!l||!(p in l))throw new Yp.default('"'+p+'" not defined in '+l,{loc:d});return o.lookupProperty(l,p);},lookupProperty:function(l,p){var d=l[p];if(d==null||Object.prototype.hasOwnProperty.call(l,p)||$7.resultIsAllowed(d,o.protoAccessControl,p))return d;},lookup:function(l,p){for(var d=l.length,f=0;f<d;f++){var h=l[f]&&o.lookupProperty(l[f],p);if(h!=null)return h;}},lambda:function(l,p){return typeof l=="function"?l.call(p):l;},escapeExpression:b_.escapeExpression,invokePartial:i,fn:function(l){var p=n[l];return p.decorator=n[l+"_d"],p;},programs:[],program:function(l,p,d,f,h){var g=this.programs[l],b=this.fn(l);return p||h||f||d?g=XP(this,l,b,p,d,f,h):g||(g=this.programs[l]=XP(this,l,b)),g;},data:function(l,p){for(;l&&p--;)l=l._parent;return l;},mergeIfNeeded:function(l,p){var d=l||p;return l&&p&&l!==p&&(d=b_.extend({},p,l)),d;},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:n.compiler};function a(r){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=l.data;a._setup(l),!l.partial&&n.useData&&(p=q0e(r,p));var d=void 0,f=n.useBlockParams?[]:void 0;n.useDepths&&(l.depths?d=r!=l.depths[0]?[r].concat(l.depths):l.depths:d=[r]);function h(g){return""+n.main(o,g,o.helpers,o.partials,p,f,d);}return h=q7(n.main,h,o,l.depths||[],p,f),h(r,l);}return a.isTop=!0,a._setup=function(r){if(r.partial)o.protoAccessControl=r.protoAccessControl,o.helpers=r.helpers,o.partials=r.partials,o.decorators=r.decorators,o.hooks=r.hooks;else{var l={};V7(l,t.helpers,o),V7(l,r.helpers,o),o.helpers=l,n.usePartial&&(o.partials=o.mergeIfNeeded(r.partials,t.partials)),(n.usePartial||n.useDecorators)&&(o.decorators=b_.extend({},t.decorators,r.decorators)),o.hooks={},o.protoAccessControl=$7.createProtoAccessControl(r);var p=r.allowCallsToHelperMissing||e;B7.moveHelperToHooks(o,"helperMissing",p),B7.moveHelperToHooks(o,"blockHelperMissing",p);}},a._child=function(r,l,p,d){if(n.useBlockParams&&!p)throw new Yp.default("must pass block params");if(n.useDepths&&!d)throw new Yp.default("must pass parent depths");return XP(o,r,n[r],l,0,p,d);},a;}function XP(n,t,e,i,o,a,r){function l(p){var d=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=r;return r&&p!=r[0]&&!(p===n.nullContext&&r[0]===null)&&(f=[p].concat(r)),e(n,p,n.helpers,n.partials,d.data||i,a&&[d.blockParams].concat(a),f);}return l=q7(e,l,n,r,i,a),l.program=t,l.depth=r?r.length:0,l.blockParams=o||0,l;}function V0e(n,t,e){return n?!n.call&&!e.name&&(e.name=n,n=YP(e.partials,n)):e.name==="@partial-block"?n=YP(e.data,"partial-block"):n=YP(e.partials,e.name),n;}function G0e(n,t,e){var i=YP(e.data,"partial-block");e.partial=!0,e.ids&&(e.data.contextPath=e.ids[0]||e.data.contextPath);var o=void 0;if(e.fn&&e.fn!==G7&&function(){e.data=Kp.createFrame(e.data);var a=e.fn;o=e.data["partial-block"]=function(l){var p=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return p.data=Kp.createFrame(p.data),p.data["partial-block"]=i,a(l,p);},a.partials&&(e.partials=b_.extend({},e.partials,a.partials));}(),n===void 0&&o&&(n=o),n===void 0)throw new Yp.default("The partial "+e.name+" could not be found");if(n instanceof Function)return n(t,e);}function G7(){return"";}function YP(n,t){if(n&&Object.prototype.hasOwnProperty.call(n,t))return n[t];}function q0e(n,t){return(!t||!("root"in t))&&(t=t?Kp.createFrame(t):{},t.root=n),t;}function q7(n,t,e,i,o,a){if(n.decorator){var r={};t=n.decorator(t,r,e,i&&i[0],o,a,i),b_.extend(t,r);}return t;}function V7(n,t,e){t&&Object.keys(t).forEach(function(i){var o=t[i];n[i]=J0e(o,e);});}function J0e(n,t){var e=t.lookupProperty;return F0e.wrapHelper(n,function(i){return i.lookupProperty=e,i;});}});var RO=li((KP,H7)=>{"use strict";
5KP.__esModule=!0;KP.default=function(n){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this;}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);})();var t=globalThis.Handlebars;n.noConflict=function(){return globalThis.Handlebars===n&&(globalThis.Handlebars=t),n;};};H7.exports=KP.default;});var K7=li((ZP,Y7)=>{"use strict";ZP.__esModule=!0;function AO(n){return n&&n.__esModule?n:{default:n};}function DO(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t;}var H0e=UP(),U7=DO(H0e),U0e=z7(),W0e=AO(U0e),X0e=pl(),Y0e=AO(X0e),K0e=Ms(),NO=DO(K0e),Z0e=J7(),W7=DO(Z0e),Q0e=RO(),ege=AO(Q0e);function X7(){var n=new U7.HandlebarsEnvironment();return NO.extend(n,U7),n.SafeString=W0e.default,n.Exception=Y0e.default,n.Utils=NO,n.escapeExpression=NO.escapeExpression,n.VM=W7,n.template=function(t){return W7.template(t,n);},n;}var Ox=X7();Ox.create=X7;ege.default(Ox);Ox.default=Ox;ZP.default=Ox;Y7.exports=ZP.default;});var jO=li((QP,Q7)=>{"use strict";QP.__esModule=!0;var Z7={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash);},scopedId:function(t){return /^\.|this\b/.test(t.original);},simpleId:function(t){return t.parts.length===1&&!Z7.helpers.scopedId(t)&&!t.depth;}}};QP.default=Z7;Q7.exports=QP.default;});var tL=li((ew,eL)=>{"use strict";ew.__esModule=!0;var tge=function(){var n={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,
vendor: 5,334 bytes, line 5
5EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,a,r,l,p,d,f){var h=d.length-1;switch(p){case 1:return d[h-1];case 2:this.$=l.prepareProgram(d[h]);break;case 3:this.$=d[h];break;case 4:this.$=d[h];break;case 5:this.$=d[h];break;case 6:this.$=d[h];break;case 7:this.$=d[h];break;case 8:this.$=d[h];break;case 9:this.$={type:"CommentStatement",value:l.stripComment(d[h]),strip:l.stripFlags(d[h],d[h]),loc:l.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:d[h],value:d[h],loc:l.locInfo(this._$)};break;case 11:this.$=l.prepareRawBlock(d[h-2],d[h-1],d[h],this._$);break;case 12:this.$={path:d[h-3],params:d[h-2],hash:d[h-1]};break;case 13:this.$=l.prepareBlock(d[h-3],d[h-2],d[h-1],d[h],!1,this._$);break;case 14:this.$=l.prepareBlock(d[h-3],d[h-2],d[h-1],d[h],!0,this._$);break;case 15:this.$={open:d[h-5],path:d[h-4],params:d[h-3],hash:d[h-2],blockParams:d[h-1],strip:l.stripFlags(d[h-5],d[h])};break;case 16:this.$={path:d[h-4],params:d[h-3],hash:d[h-2],blockParams:d[h-1],strip:l.stripFlags(d[h-5],d[h])};break;case 17:this.$={path:d[h-4],params:d[h-3],hash:d[h-2],blockParams:d[h-1],strip:l.stripFlags(d[h-5],d[h])};break;case 18:this.$={strip:l.stripFlags(d[h-1],d[h-1]),program:d[h]};break;case 19:var g=l.prepareBlock(d[h-2],d[h-1],d[h],d[h],!1,this._$),b=l.prepareProgram([g],d[h-1].loc);b.chained=!0,this.$={strip:d[h-2].strip,program:b,chain:!0};break;case 20:this.$=d[h];break;case 21:this.$={path:d[h-1],strip:l.stripFlags(d[h-2],d[h])};break;case 22:this.$=l.prepareMustache(d[h-3],d[h-2],d[h-1],d[h-4],l.stripFlags(d[h-4],d[h]),this._$);break;case 23:this.$=l.prepareMustache(d[h-3],d[h-2],d[h-1],d[h-4],l.stripFlags(d[h-4],d[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:d[h-3],params:d[h-2],hash:d[h-1],indent:"",strip:l.stripFlags(d[h-4],d[h]),loc:l.locInfo(this._$)};break;case 25:this.$=l.preparePartialBlock(d[h-2],d[h-1],d[h],this._$);break;case 26:this.$={path:d[h-3],params:d[h-2],hash:d[h-1],strip:l.stripFlags(d[h-4],d[h])};break;case 27:this.$=d[h];break;case 28:this.$=d[h];break;case 29:this.$={type:"SubExpression",path:d[h-3],params:d[h-2],hash:d[h-1],loc:l.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:d[h],loc:l.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:l.id(d[h-2]),value:d[h],loc:l.locInfo(this._$)};break;case 32:this.$=l.id(d[h-1]);break;case 33:this.$=d[h];break;case 34:this.$=d[h];break;case 35:this.$={type:"StringLiteral",value:d[h],original:d[h],loc:l.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(d[h]),original:Number(d[h]),loc:l.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:d[h]==="true",original:d[h]==="true",loc:l.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:l.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:l.locInfo(this._$)};break;case 40:this.$=d[h];break;case 41:this.$=d[h];break;case 42:this.$=l.preparePath(!0,d[h],this._$);break;case 43:this.$=l.preparePath(!1,d[h],this._$);break;case 44:d[h-2].push({part:l.id(d[h]),original:d[h],separator:d[h-1]}),this.$=d[h-2];break;case 45:this.$=[{part:l.id(d[h]),original:d[h]}];break;case 46:this.$=[];break;case 47:d[h-1].push(d[h]);break;case 48:this.$=[];break;case 49:d[h-1].push(d[h]);break;case 50:this.$=[];break;case 51:d[h-1].push(d[h]);break;case 58:this.$=[];break;case 59:d[h-1].push(d[h]);break;case 64:this.$=[];break;case 65:d[h-1].push(d[h]);break;case 70:this.$=[];break;case 71:d[h-1].push(d[h]);break;case 78:this.$=[];break;case 79:d[h-1].push(d[h]);break;case 82:this.$=[];break;case 83:d[h-1].push(d[h]);break;case 86:this.$=[];break;case 87:d[h-1].push(d[h]);break;case 90:this.$=[];break;case 91:d[h-1].push(d[h]);break;case 94:this.$=[];break;case 95:d[h-1].push(d[h]);break;case 98:this.$=[d[h]];break;case 99:d[h-1].push(d[h]);break;case 100:this.$=[d[h]];break;case 101:d[h-1].push(d[h]);break;
vendor: 11,480 bytes, line 5
5}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(
vendor: 9,900 bytes, lines 5-9
5o,a){throw new Error(o);},parse:function(o){var a=this,r=[0],l=[null],p=[],d=this.table,f="",h=0,g=0,b=0,w=2,T=1;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var O=this.lexer.yylloc;p.push(O);var V=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function j(et){r.length=r.length-2*et,l.length=l.length-et,p.length=p.length-et;}function L(){var et;return et=a.lexer.lex()||1,typeof et!="number"&&(et=a.symbols_[et]||et),et;}for(var A,J,Q,te,U,ce,W={},Y,se,de,Ae;;){if(Q=r[r.length-1],this.defaultActions[Q]?te=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=L()),te=d[Q]&&d[Q][A]),typeof te>"u"||!te.length||!te[0]){var rt="";if(!b){Ae=[];for(Y in d[Q])this.terminals_[Y]&&Y>2&&Ae.push("'"+this.terminals_[Y]+"'");this.lexer.showPosition?rt="Parse error on line "+(h+1)+`: 6`+this.lexer.showPosition()+` 7Expecting `+Ae.join(", ")+", got '"+(this.terminals_[A]||A)+"'":rt="Parse error on line "+(h+1)+": Unexpected "+(A==1?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(rt,{text:this.lexer.match,token:this.terminals_[A]||A,line:this.lexer.yylineno,loc:O,expected:Ae});}}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(te[0]){case 1:r.push(A),l.push(this.lexer.yytext),p.push(this.lexer.yylloc),r.push(te[1]),A=null,J?(A=J,J=null):(g=this.lexer.yyleng,f=this.lexer.yytext,h=this.lexer.yylineno,O=this.lexer.yylloc,b>0&&b--);break;case 2:if(se=this.productions_[te[1]][1],W.$=l[l.length-se],W._$={first_line:p[p.length-(se||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(se||1)].first_column,last_column:p[p.length-1].last_column},V&&(W._$.range=[p[p.length-(se||1)].range[0],p[p.length-1].range[1]]),ce=this.performAction.call(W,f,g,h,this.yy,te[1],l,p),typeof ce<"u")return ce;se&&(r=r.slice(0,-1*se*2),l=l.slice(0,-1*se),p=p.slice(0,-1*se)),r.push(this.productions_[te[1]][0]),l.push(W.$),p.push(W._$),de=d[r[r.length-2]][r[r.length-1]],r.push(de);break;case 3:return!0;}}return!0;}},t=function(){var i={EOF:1,parseError:function(a,r){if(this.yy.parser)this.yy.parser.parseError(a,r);else throw new Error(a);},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this;},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var r=a.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a;},unput:function(a){var r=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r-1),this.offset-=r;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-r]),this;},more:function(){return this._more=!0,this;},less:function(a){this.unput(this.match.slice(a));},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"");},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"");},showPosition:function(){var a=this.pastInput(),r=new Array(a.length+1).join("-");return a+this.upcomingInput()+` 8`+r+"^";},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,r,l,p,d,f;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),g=0;g<h.length&&(l=this._input.match(this.rules[h[g]]),!(l&&(!r||l[0].length>r[0].length)&&(r=l,p=g,!this.options.flex)));g++);return r?(f=r[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],a=this.performAction.call(this,this.yy,this,h[p],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. 9`+this.showPosition(),{text:"",token:null,line:this.yylineno});},lex:function(){var a=this.next();return typeof a<"u"?a:this.lex();},begin:function(a){this.conditionStack.push(a);},popState:function(){return this.conditionStack.pop();},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;},topState:function(){return this.conditionStack[this.conditionStack.length-2];},pushState:function(a){this.begin(a);}};return i.options={},i.performAction=function(a,r,l,p){function d(h,g){return r.yytext=r.yytext.substring(h,r.yyleng-g+h);}var f=p;switch(l){case 0:if(r.yytext.slice(-2)==="\\\\"?(d(0,1),this.begin("mu")):r.yytext.slice(-1)==="\\"?(d(0,1),this.begin("emu")):this.begin("mu"),r.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(d(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(r.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return r.yytext=d(1,2).replace(/\\"/g,'"'),80;break;case 32:return r.yytext=d(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return r.yytext=r.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5;}},i.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],i.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},i;}();n.lexer=t;function e(){this.yy={};}return e.prototype=n,n.Parser=e,new e();}();ew.default=tge;eL.exports=ew.default;});var zO=li((iw,oL)=>{"use strict";iw.__esModule=!0;function nge(n){return n&&n.__esModule?n:{default:n};}var ige=pl(),LO=nge(ige);function tw(){this.parents=[];}tw.prototype={constructor:tw,mutating:!1,acceptKey:function(t,e){var i=this.accept(t[e]);if(this.mutating){if(i&&!tw.prototype[i.type])throw new LO.default('Unexpected node type "'+i.type+'" found when accepting '+e+" on "+t.type);t[e]=i;}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new LO.default(t.type+" requires "+e);},acceptArray:function(t){for(var e=0,i=t.length;e<i;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,i--);},accept:function(t){if(t){if(!this[t.type])throw new LO.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||e)return e;if(e!==!1)return t;}},Program:function(t){this.acceptArray(t.body);},MustacheStatement:nw,Decorator:nw,BlockStatement:nL,DecoratorBlock:nL,PartialStatement:iL,PartialBlockStatement:function(t){iL.call(this,t),this.acceptKey(t,"program");},ContentStatement:function(){},CommentStatement:function(){},SubExpression:nw,PathExpression:function(){}
9,StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs);},HashPair:function(t){this.acceptRequired(t,"value");}};function nw(n){this.acceptRequired(n,"path"),this.acceptArray(n.params),this.acceptKey(n,"hash");}function nL(n){nw.call(this,n),this.acceptKey(n,"program"),this.acceptKey(n,"inverse");}function iL(n){this.acceptRequired(n,"name"),this.acceptArray(n.params),this.acceptKey(n,"hash");}iw.default=tw;oL.exports=iw.default;});var rL=li((ow,aL)=>{"use strict";ow.__esModule=!0;function oge(n){return n&&n.__esModule?n:{default:n};}var age=zO(),rge=oge(age);function sp(){var n=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=n;}sp.prototype=new rge.default();sp.prototype.Program=function(n){var t=!this.options.ignoreStandalone,e=!this.isRootSeen;this.isRootSeen=!0;for(var i=n.body,o=0,a=i.length;o<a;o++){var r=i[o],l=this.accept(r);if(l){var p=FO(i,o,e),d=BO(i,o,e),f=l.openStandalone&&p,h=l.closeStandalone&&d,g=l.inlineStandalone&&p&&d;l.close&&Wu(i,o,!0),l.open&&Em(i,o,!0),t&&g&&(Wu(i,o),Em(i,o)&&r.type==="Parti
9alStatement"&&(r.indent=/([ \t]+$)/.exec(i[o-1].original)[1])),t&&f&&(Wu((r.program||r.inverse).body),Em(i,o)),t&&h&&(Wu(i,o),Em((r.inverse||r.program).body));}}return n;};sp.prototype.BlockStatement=sp.prototype.DecoratorBlock=sp.prototype.PartialBlockStatement=function(n){this.accept(n.program),this.accept(n.inverse);var t=n.program||n.inverse,e=n.program&&n.inverse,i=e,o=e;if(e&&e.chained)for(i=e.body[0].program;o.chained;)o=o.body[o.body.length-1].program;var a={open:n.openStrip.open,close:n.closeStrip.close,openStandalone:BO(t.body),closeStandalone:FO((i||t).body)};if(n.openStrip.close&&Wu(t.body,null,!0),e){var r=n.inverseStrip;r.open&&Em(t.body,null,!0),r.close&&Wu(i.body,null,!0),n.closeStrip.open&&Em(o.body,null,!0),!this.options.ignoreStandalone&&FO(t.body)&&BO(i.body)&&(Em(t.body),Wu(i.body));}else n.closeStrip.open&&Em(t.body,null,!0);return a;};sp.prototype.Decorator=sp.prototype.MustacheStatement=function(n){return n.strip;};sp.prototype.PartialStatement=sp.prototype.CommentStatement=function(n){var t=n.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close};};function FO(n,t,e){t===void 0&&(t=n.length);var i=n[t-1],o=n[t-2];if(!i)return e;if(i.type==="ContentStatement")return(o||!e?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(i.original);}function BO(n,t,e){t===void 0&&(t=-1);var i=n[t+1],o=n[t+2];if(!i)return e;if(i.type==="ContentStatement")return(o||!e?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(i.original);}function Wu(n,t,e){var i=n[t==null?0:t+1];if(!(!i||i.type!=="ContentStatement"||!e&&i.rightStripped)){var o=i.value;i.value=i.value.replace(e?/^\s+/:/^[ \t]*\r?\n?/,""),i.rightStripped=i.value!==o;}}function Em(n,t,e){var i=n[t==null?n.length-1:t-1];if(!(!i||i.type!=="ContentStatement"||!e&&i.leftStripped)){var o=i.value;return i.value=i.value.replace(e?/\s+$/:/[ \t]+$/,""),i.leftStripped=i.value!==o,i.leftStripped;}}ow.default=sp;aL.exports=ow.default;});var sL=li(Kl=>{"use strict";Kl.__esModule=!0;Kl.SourceLocation=cge;Kl.id=pge;Kl.stripFlags=dge;Kl.stripComment=mge;Kl.preparePath=uge;Kl.prepareMustache=fge;Kl.prepareRawBlock=hge;Kl.prepareBlock=_ge;Kl.prepareProgram=gge;Kl.preparePartialBlock=xge;function sge(n){return n&&n.__esModule?n:{default:n};}var lge=pl(),$O=sge(lge);function VO(n,t){if(t=t.path?t.path.original:t,n.path.original!==t){var e={loc:n.path.loc};throw new $O.default(n.path.original+" doesn't match "+t,e);}}function cge(n,t){this.source=n,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column};}function pge(n){return /^\[.*\]$/.test(n)?n.substring(1,n.length-1):n;}function dge(n,t){return{open:n.charAt(2)==="~",close:t.charAt(t.length-3)==="~"};}function mge(n){return n.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"");}function uge(n,t,e){e=this.locInfo(e);for(var i=n?"@":"",o=[],a=0,r=0,l=t.length;r<l;r++){var p=t[r].part,d=t[r].original!==p;if(i+=(t[r].separator||"")+p,!d&&(p===".."||p==="."||p==="this")){if(o.length>0)throw new $O.default("Invalid path: "+i,{loc:e});p===".."&&a++;}else o.push(p);}return{type:"PathExpression",data:n,depth:a,parts:o,original:i,loc:e};}function fge(n,t,e,i,o,a){var r=i.charAt(3)||i.charAt(2),l=r!=="{"&&r!=="&",p=/\*/.test(i);return{type:p?"Decorator":"MustacheStatement",path:n,params:t,hash:e,escaped:l,strip:o,loc:this.locInfo(a)};}function hge(n,t,e,i){VO(n,e),i=this.locInfo(i);var o={type:"Program",body:t,strip:{},loc:i};return{type:"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:i};}function _ge(n,t,e,i,o,a){i&&i.path&&VO(n,i);var r=/\*/.test(n.open);t.blockParams=n.blockParams;var l=void 0,p=void 0;if(e){if(r)throw new $O.default("Unexpected inverse block on decorator",e);e.chain&&(e.program.body[0].closeStrip=i.strip),p=e.strip,l=e.program;}return o&&(o=l,l=t,t=o),{type:r?"DecoratorBlock":"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:t,inverse:l,openStrip:n.strip,inverseStrip:p,closeStrip:i&&i.strip,loc:this.locInfo(a)};}function gge(n,t){if(!t&&n.length){var e=n[0].loc,i=n[n.length-1].loc;e&&i&&(t={source:e.source,start:{line:e.start.line,column:e.start.column},end:{line:i.end.line,column:i.end.column}});}return{type:"Program",body:n,strip:{},loc:t};}function xge(n,t,e,i){return VO(n,e),{type:"PartialBlockStatement",name:n.path,params:n.params,hash:n.hash,program:t,openStrip:n.strip,closeStrip:e&&e.strip,loc:this.locInfo(i)};}});var cL=li(Tx=>{"use strict";Tx.__esModule=!0;Tx.parseWithoutProcessing=lL;Tx.parse=Oge;function Cge(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t;}function JO(n){return n&&n.__esModule?n:{default:n};}var vge=tL(),GO=JO(vge),bge=rL(),yge=JO(bge),Pge=sL(),wge=Cge(Pge),Sge=pl(),Ex=JO(Sge),Mge=Ms();Tx.parser=GO.default;var aw={};Mge.extend(aw,wge);function lL(n,t){if(n.type==="Program")return Ege(n),n;GO.default.yy=aw,aw.locInfo=function(i){return new aw.SourceLocation(t&&t.srcName,i);};var e=GO.default.parse(n);return e;}function Oge(n,t){var e=lL(n,t),i=new yge.default(t);return i.accept(e);}function Ege(n){qO(n);}
9function qO(n){if(n!=null){if(Array.isArray(n)){n.forEach(qO);return;}if(typeof n=="object"){if(n.type==="PathExpression"){if(!Tge(n.depth))throw new Ex.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(n.parts))throw new Ex.default("Invalid AST: PathExpression.parts must be an array");for(var t=0;t<n.parts.length;t++)if(typeof n.parts[t]!="string")throw new Ex.default("Invalid AST: PathExpression.parts must only contain strings");}else if(n.type==="NumberLiteral"){if(typeof n.value!="number"||!isFinite(n.value))throw new Ex.default("Invalid AST: NumberLiteral.value must be a number");}else if(n.type==="BooleanLiteral"&&typeof n.value!="boolean")throw new Ex.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(n).forEach(function(e){e!=="loc"&&qO(n[e]);});}}}function Tge(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n&&n>=0;}});var uL=li(Nx=>{"use strict";Nx.__esModule=!0;Nx.Compiler=HO;Nx.precompile=Nge;Nx.compile=Age;function dL(n){return n&&n.__esModule?n:{default:n};}var Ige=pl(),kx=dL(Ige),Rx=Ms(),kge=jO(),Ix=dL(kge),Rge=[].slice;function HO(){}HO.prototype={compiler:HO,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var i=0;i<e;i++){var o=this.opcodes[i],a=t.opcodes[i];if(o.opcode!==a.opcode||!mL(o.args,a.args))return!1;}e=this.children.length;for(var i=0;i<e;i++)if(!this.children[i].equals(t.children[i]))return!1;return!0;},guid:0,compile:function(t,e){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[],e.knownHelpers=Rx.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},e.knownHelpers),this.accept(t);},compileProgram:function(t){var e=new this.compiler(),i=e.compile(t,this.options),o=this.guid++;return this.usePartial=this.usePartial||i.usePartial,this.children[o]=i,this.useDepths=this.useDepths||i.useDepths,o;},accept:function(t){if(!this[t.type])throw new kx.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e;},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,i=e.length,o=0;o<i;o++)this.accept(e[o]);return this.options.blockParams.shift(),this.isSimple=i===1,this.blockParams=t.blockParams?t.blockParams.length:0,this;},BlockStatement:function(t){pL(t);var e=t.program,i=t.inverse;e=e&&this.compileProgram(e),i=i&&this.compileProgram(i);var o=this.classifySexpr(t);o==="helper"?this.helperSexpr(t,e,i):o==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,i),this.opcode("pushProgram",e),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append");},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),i=this.setupFullMustacheParams(t,e,void 0),o=t.path;this.useDecorators=!0,this.opcode("registerDecorator",i.length,o.original);},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var i=t.params;if(i.length>1)throw new kx.default("Unsupported number of partial arguments: "+i.length,t);i.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):i.push({type:"PathExpression",parts:[],depth:0}));var o=t.name.original,a=t.name.type==="SubExpression";a&&this.accept(t.name),this.setupFullMustacheParams(t,e,void 0,!0);var r=t.indent||"";this.options.preventIndent&&r&&(this.opcode("appendContent",r),r=""),this.opcode("invokePartial",a,o,r),this.opcode("append");},PartialBlockStatement:function(t){this.PartialStatement(t);},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append");},Decorator:function(t){this.DecoratorBlock(t);},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value);},CommentStatement:function(){},SubExpression:function(t){pL(t);var e=this.classifySexpr(t);
vendor: 8,921 bytes, line 9
9e==="simple"?this.simpleSexpr(t):e==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t);},ambiguousSexpr:function(t,e,i){var o=t.path,a=o.parts[0],r=e!=null||i!=null;this.opcode("getContext",o.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",i),o.strict=!0,this.accept(o),this.opcode("invokeAmbiguous",a,r);},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda");},helperSexpr:function(t,e,i){var o=this.setupFullMustacheParams(t,e,i),a=t.path,r=a.parts[0];if(this.options.knownHelpers[r])this.opcode("invokeKnownHelper",o.length,r);else{if(this.options.knownHelpersOnly)throw new kx.default("You specified knownHelpersOnly, but used the unknown helper "+r,t);a.strict=!0,a.falsy=!0,this.accept(a),this.opcode("invokeHelper",o.length,a.original,Ix.default.helpers.simpleId(a));}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],i=Ix.default.helpers.scopedId(t),o=!t.depth&&!i&&this.blockParamIndex(e);o?this.opcode("lookupBlockParam",o,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,i):this.opcode("pushContext");},StringLiteral:function(t){this.opcode("pushString",t.value);},NumberLiteral:function(t){this.opcode("pushLiteral",t.value);},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value);},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined");},NullLiteral:function(){this.opcode("pushLiteral","null");},Hash:function(t){var e=t.pairs,i=0,o=e.length;for(this.opcode("pushHash");i<o;i++)this.pushParam(e[i].value);for(;i--;)this.opcode("assignToHash",e[i].key);this.opcode("popHash");},opcode:function(t){this.opcodes.push({opcode:t,args:Rge.call(arguments,1),loc:this.sourceNode[0].loc});},addDepth:function(t){t&&(this.useDepths=!0);},classifySexpr:function(t){var e=Ix.default.helpers.simpleId(t.path),i=e&&!!this.blockParamIndex(t.path.parts[0]),o=!i&&Ix.default.helpers.helperExpression(t),a=!i&&(o||e);if(a&&!o){var r=t.path.parts[0],l=this.options;l.knownHelpers[r]?o=!0:l.knownHelpersOnly&&(a=!1);}return o?"helper":a?"ambiguous":"simple";},pushParams:function(t){for(var e=0,i=t.length;e<i;e++)this.pushParam(t[e]);},pushParam:function(t){var e=t.value!=null?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var i=void 0;if(t.parts&&!Ix.default.helpers.scopedId(t)&&!t.depth&&(i=this.blockParamIndex(t.parts[0])),i){var o=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,o);}else e=t.original||e,e.replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e);}this.accept(t);}},setupFullMustacheParams:function(t,e,i,o){var a=t.params;return this.pushParams(a),this.opcode("pushProgram",e),this.opcode("pushProgram",i),t.hash?this.accept(t.hash):this.opcode("emptyHash",o),a;},blockParamIndex:function(t){for(var e=0,i=this.options.blockParams.length;e<i;e++){var o=this.options.blockParams[e],a=o&&Rx.indexOf(o,t);if(o&&a>=0)return[e,a];}}};function Nge(n,t,e){if(n==null||typeof n!="string"&&n.type!=="Program")throw new kx.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+n);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=e.parse(n,t),o=new e.Compiler().compile(i,t);return new e.JavaScriptCompiler().compile(o,t);}function Age(n,t,e){if(t===void 0&&(t={}),n==null||typeof n!="string"&&n.type!=="Program")throw new kx.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);t=Rx.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var i=void 0;function o(){var r=e.parse(n,t),l=new e.Compiler().compile(r,t),p=new e.JavaScriptCompiler().compile(l,t,void 0,!0);return e.template(p);}function a(r,l){return i||(i=o()),i.call(this,r,l);}return a._setup=function(r){return i||(i=o()),i._setup(r);},a._child=function(r,l,p,d){return i||(i=o()),i._child(r,l,p,d);},a;}function mL(n,t){if(n===t)return!0;if(Rx.isArray(n)&&Rx.isArray(t)&&n.length===t.length){for(var e=0;e<n.length;e++)if(!mL(n[e],t[e]))return!1;return!0;}}function pL(n){if(!n.path.parts){var t=n.path;n.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc};}}});var hL=li(UO=>{"use strict";var fL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");UO.encode=function(n){if(0<=n&&n<fL.length)return fL[n];throw new TypeError("Must be between 0 and 63: "+n);};UO.decode=function(n){var t=65,e=90,i=97,o=122,a=48,r=57,l=43,p=47,d=26,f=52;return t<=n&&n<=e?n-t:i<=n&&n<=o?n-i+d:a<=n&&n<=r?n-a+f:n==l?62:n==p?63:-1;};});var YO=li(XO=>{"use strict";var _L=hL(),WO=5,gL=1<<WO,xL=gL-1,CL=gL;function Dge(n){return n<0?(-n<<1)+1:(n<<1)+0;}function jge(n){var t=(n&1)===1,e=n>>1;return t?-e:e;}XO.encode=function(t){var e="",i,o=Dge(t);do i=o&xL,o>>>=WO,o>0&&(i|=CL),e+=_L.encode(i);while(o>0);return e;};XO.decode=function(t,e,i){var o=t.length,a=0,r=0,l,p;do{if(e>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(p=_L.decode(t.charCodeAt(e++)),p===-1)throw new Error("Invalid base64 digit: "+t.charAt(e-1));l=!!(p&CL),p&=xL,a=a+(p<<r),r+=WO;}while(l);i.value=jge(a),i.rest=e;};});var w_=li(ls=>{"use strict";function Lge(n,t,e){if(t in n)return n[t];if(arguments.length===3)return e;throw new Error('"'+t+'" is a required argument.');}ls.getArg=Lge;var vL=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,zge=/^data:.+\,.+$/;function Ax(n){var t=n.match(vL);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null;}ls.urlParse=Ax;function y_(n){var t="";return n.scheme&&(t+=n.scheme+":"),t+="//",n.auth&&(t+=n.auth+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port),n.path&&(t+=n.path),t;}ls.urlGenerate=y_;function KO(n){var t=n,e=Ax(n);if(e){if(!e.path)return n;t=e.path;}for(var i=ls.isAbsolute(t),o=t.split(/\/+/),a,r=0,l=o.length-1;l>=0;l--)a=o[l],a==="."?o.splice(l,1):a===".."?r++:r>0&&(a===""?(o.splice(l+1,r),r=0):(o.splice(l,2),r--));return t=o.join("/"),t===""&&(t=i?"/":"."),e?(e.path=t,y_(e)):t;}ls.normalize=KO;function bL(n,t){n===""&&(n="."),t===""&&(t=".");var e=Ax(t),i=Ax(n);if(i&&(n=i.path||"/"),e&&!e.scheme)return i&&(e.scheme=i.scheme),y_(e);if(e||t.match(zge))return t;if(i&&!i.host&&!i.path)return i.host=t,y_(i);var o=t.charAt(0)==="/"?t:KO(n.replace(/\/+$/,"")+"/"+t);return i?(i.path=o,y_(i)):o;}ls.join=bL;ls.isAbsolute=function(n){return n.charAt(0)==="/"||vL.test(n);};function Fge(n,t){n===""&&(n="."),n=n.replace(/\/$/,"");for(var e=0;t.indexOf(n+"/")!==0;){var i=n.lastIndexOf("/");if(i<0||(n=n.slice(0,i),n.match(/^([^\/]+:\/)?\/*$/)))return t;++e;}return Array(e+1).join("../")+t.substr(n.length+1);}ls.relative=Fge;var yL=function(){var n=Object.create(null);return!("__proto__"in n);}();function PL(n){return n;}function Bge(n){return wL(n)?"$"+n:n;}ls.toSetString=yL?PL:Bge;function $ge(n){return wL(n)?n.slice(1):n;}ls.fromSetString=yL?PL:$ge;function wL(n){if(!n)return!1;var t=n.length;if(t<9||n.charCodeAt(t-1)!==95||n.charCodeAt(t-2)!==95||n.charCodeAt(t-3)!==111||n.charCodeAt(t-4)!==116||n.charCodeAt(t-5)!==111||n.charCodeAt(t-6)!==114||n.charCodeAt(t-7)!==112||n.charCodeAt(t-8)!==95||n.charCodeAt(t-9)!==95)return!1;for(var e=t-10;e>=0;e--)if(n.charCodeAt(e)!==36)return!1;return!0;}function Vge(n,t,e){var i=P_(n.source,t.source);return i!==0||(i=n.originalLine-t.originalLine,i!==0)||(i=n.originalColumn-t.originalColumn,i!==0||e)||(i=n.generatedColumn-t.generatedColumn,i!==0)||(i=n.generatedLine-t.generatedLine,i!==0)?i:P_(n.name,t.name);}ls.compareByOriginalPositions=Vge;function Gge(n,t,e){var i=n.generatedLine-t.generatedLine;return i!==0||(i=n.generatedColumn-t.generatedColumn,i!==0||e)||(i=P_(n.source,t.source),i!==0)||(i=n.originalLine-t.originalLine,i!==0)||(i=n.originalColumn-t.originalColumn,i!==0)?i:P_(n.name,t.name);}ls.compareByGeneratedPositionsDeflated=Gge;function P_(n,t){return n===t?0:n===null?1:t===null?-1:n>t?1:-1;}function qge(n,t){var e=n.generatedLine-t.generatedLine;return e!==0||(e=n.generatedColumn-t.generatedColumn,e!==0)||(e=P_(n.source,t.source),e!==0)||(e=n.originalLine-t.originalLine,e!==0)||(e=n.originalColumn-t.originalColumn,e!==0)?e:P_(n.name,t.name);}ls.compareByGeneratedPositionsInflated=qge;function Jge(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""));}ls.parseSourceMapInput=Jge;function Hge(n,t,e){if(t=t||"",n&&(n[n.length-1]!=="/"&&t[0]!=="/"&&(n+="/"),t=n+t),e){var i=Ax(e);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var o=i.path.lastIndexOf("/");o>=0&&(i.path=i.path.substring(0,o+1));}t=bL(y_(i),t);}return KO(t);}ls.computeSourceURL=Hge;});var eE=li(SL=>
vendor: 18,523 bytes, line 9
9{"use strict";var ZO=w_(),QO=Object.prototype.hasOwnProperty,Xu=typeof Map<"u";function Zp(){this._array=[],this._set=Xu?new Map():Object.create(null);}Zp.fromArray=function(t,e){for(var i=new Zp(),o=0,a=t.length;o<a;o++)i.add(t[o],e);return i;};Zp.prototype.size=function(){return Xu?this._set.size:Object.getOwnPropertyNames(this._set).length;};Zp.prototype.add=function(t,e){var i=Xu?t:ZO.toSetString(t),o=Xu?this.has(t):QO.call(this._set,i),a=this._array.length;(!o||e)&&this._array.push(t),o||(Xu?this._set.set(t,a):this._set[i]=a);};Zp.prototype.has=function(t){if(Xu)return this._set.has(t);var e=ZO.toSetString(t);return QO.call(this._set,e);};Zp.prototype.indexOf=function(t){if(Xu){var e=this._set.get(t);if(e>=0)return e;}else{var i=ZO.toSetString(t);if(QO.call(this._set,i))return this._set[i];}throw new Error('"'+t+'" is not in the set.');};Zp.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t);};Zp.prototype.toArray=function(){return this._array.slice();};SL.ArraySet=Zp;});var EL=li(OL=>{"use strict";var ML=w_();function Uge(n,t){var e=n.generatedLine,i=t.generatedLine,o=n.generatedColumn,a=t.generatedColumn;return i>e||i==e&&a>=o||ML.compareByGeneratedPositionsInflated(n,t)<=0;}function rw(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0};}rw.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e);};rw.prototype.add=function(t){Uge(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t));};rw.prototype.toArray=function(){return this._sorted||(this._array.sort(ML.compareByGeneratedPositionsInflated),this._sorted=!0),this._array;};OL.MappingList=rw;});var tE=li(TL=>{"use strict";var Dx=YO(),ir=w_(),sw=eE().ArraySet,Wge=EL().MappingList;function Zl(n){n||(n={}),this._file=ir.getArg(n,"file",null),this._sourceRoot=ir.getArg(n,"sourceRoot",null),this._skipValidation=ir.getArg(n,"skipValidation",!1),this._sources=new sw(),this._names=new sw(),this._mappings=new Wge(),this._sourcesContents=null;}Zl.prototype._version=3;Zl.fromSourceMap=function(t){var e=t.sourceRoot,i=new Zl({file:t.file,sourceRoot:e});return t.eachMapping(function(o){var a={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(a.source=o.source,e!=null&&(a.source=ir.relative(e,a.source)),a.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(a.name=o.name)),i.addMapping(a);}),t.sources.forEach(function(o){var a=o;e!==null&&(a=ir.relative(e,o)),i._sources.has(a)||i._sources.add(a);var r=t.sourceContentFor(o);r!=null&&i.setSourceContent(o,r);}),i;};Zl.prototype.addMapping=function(t){var e=ir.getArg(t,"generated"),i=ir.getArg(t,"original",null),o=ir.getArg(t,"source",null),a=ir.getArg(t,"name",null);this._skipValidation||this._validateMapping(e,i,o,a),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:i!=null&&i.line,originalColumn:i!=null&&i.column,source:o,name:a});};Zl.prototype.setSourceContent=function(t,e){var i=t;this._sourceRoot!=null&&(i=ir.relative(this._sourceRoot,i)),e!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ir.toSetString(i)]=e):this._sourcesContents&&(delete this._sourcesContents[ir.toSetString(i)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null));};Zl.prototype.applySourceMap=function(t,e,i){var o=e;if(e==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file;}var a=this._sourceRoot;a!=null&&(o=ir.relative(a,o));var r=new sw(),l=new sw();this._mappings.unsortedForEach(function(p){if(p.source===o&&p.originalLine!=null){var d=t.originalPositionFor({line:p.originalLine,column:p.originalColumn});d.source!=null&&(p.source=d.source,i!=null&&(p.source=ir.join(i,p.source)),a!=null&&(p.source=ir.relative(a,p.source)),p.originalLine=d.line,p.originalColumn=d.column,d.name!=null&&(p.name=d.name));}var f=p.source;f!=null&&!r.has(f)&&r.add(f);var h=p.name;h!=null&&!l.has(h)&&l.add(h);},this),this._sources=r,this._names=l,t.sources.forEach(function(p){var d=t.sourceContentFor(p);d!=null&&(i!=null&&(p=ir.join(i,p)),a!=null&&(p=ir.relative(a,p)),this.setSourceContent(p,d));},this);};Zl.prototype._validateMapping=function(t,e,i,o){if(e&&typeof e.line!="number"&&typeof e.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!e&&!i&&!o)){if(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&i)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:i,original:e,name:o}));}};Zl.prototype._serializeMappings=function(){for(var t=0,e=1,i=0,o=0,a=0,r=0,l="",p,d,f,h,g=this._mappings.toArray(),b=0,w=g.length;b<w;b++){if(d=g[b],p="",d.generatedLine!==e)for(t=0;d.generatedLine!==e;)p+=";",e++;else if(b>0){if(!ir.compareByGeneratedPositionsInflated(d,g[b-1]))continue;p+=",";}p+=Dx.encode(d.generatedColumn-t),t=d.generatedColumn,d.source!=null&&(h=this._sources.indexOf(d.source),p+=Dx.encode(h-r),r=h,p+=Dx.encode(d.originalLine-1-o),o=d.originalLine-1,p+=Dx.encode(d.originalColumn-i),i=d.originalColumn,d.name!=null&&(f=this._names.indexOf(d.name),p+=Dx.encode(f-a),a=f)),l+=p;}return l;};Zl.prototype._generateSourcesContent=function(t,e){return t.map(function(i){if(!this._sourcesContents)return null;e!=null&&(i=ir.relative(e,i));var o=ir.toSetString(i);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null;},this);};Zl.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t;};Zl.prototype.toString=function(){return JSON.stringify(this.toJSON());};TL.SourceMapGenerator=Zl;});var IL=li(Yu=>{"use strict";Yu.GREATEST_LOWER_BOUND=1;Yu.LEAST_UPPER_BOUND=2;function nE(n,t,e,i,o,a){var r=Math.floor((t-n)/2)+n,l=o(e,i[r],!0);return l===0?r:l>0?t-r>1?nE(r,t,e,i,o,a):a==Yu.LEAST_UPPER_BOUND?t<i.length?t:-1:r:r-n>1?nE(n,r,e,i,o,a):a==Yu.LEAST_UPPER_BOUND?r:n<0?-1:n;}Yu.search=function(t,e,i,o){if(e.length===0)return-1;var a=nE(-1,e.length,t,e,i,o||Yu.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&i(e[a],e[a-1],!0)===0;)--a;return a;};});var RL=li(kL=>{"use strict";function iE(n,t,e){var i=n[t];n[t]=n[e],n[e]=i;}function Xge(n,t){return Math.round(n+Math.random()*(t-n));}function oE(n,t,e,i){if(e<i){var o=Xge(e,i),a=e-1;iE(n,o,i);for(var r=n[i],l=e;l<i;l++)t(n[l],r)<=0&&(a+=1,iE(n,a,l));iE(n,a+1,l);var p=a+1;oE(n,t,e,p-1),oE(n,t,p+1,i);}}kL.quickSort=function(n,t){oE(n,t,0,n.length-1);};});var AL=li(lw=>{"use strict";var un=w_(),aE=IL(),S_=eE().ArraySet,Yge=YO(),jx=RL().quickSort;function fa(n,t){var e=n;return typeof n=="string"&&(e=un.parseSourceMapInput(n)),e.sections!=null?new Ec(e,t):new Br(e,t);}fa.fromSourceMap=function(n,t){return Br.fromSourceMap(n,t);};fa.prototype._version=3;fa.prototype.__generatedMappings=null;Object.defineProperty(fa.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings;}});fa.prototype.__originalMappings=null;Object.defineProperty(fa.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings;}});fa.prototype._charIsMappingSeparator=function(t,e){var i=t.charAt(e);return i===";"||i===",";};fa.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings");};fa.GENERATED_ORDER=1;fa.ORIGINAL_ORDER=2;fa.GREATEST_LOWER_BOUND=1;fa.LEAST_UPPER_BOUND=2;fa.prototype.eachMapping=function(t,e,i){var o=e||null,a=i||fa.GENERATED_ORDER,r;switch(a){case fa.GENERATED_ORDER:r=this._generatedMappings;break;case fa.ORIGINAL_ORDER:r=this._originalMappings;break;default:throw new Error("Unknown order of iteration.");}var l=this.sourceRoot;r.map(function(p){var d=p.source===null?null:this._sources.at(p.source);return d=un.computeSourceURL(l,d,this._sourceMapURL),{source:d,generatedLine:p.generatedLine,generatedColumn:p.generatedColumn,originalLine:p.originalLine,originalColumn:p.originalColumn,name:p.name===null?null:this._names.at(p.name)};},this).forEach(t,o);};fa.prototype.allGeneratedPositionsFor=function(t){var e=un.getArg(t,"line"),i={source:un.getArg(t,"source"),originalLine:e,originalColumn:un.getArg(t,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var o=[],a=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",un.compareByOriginalPositions,aE.LEAST_UPPER_BOUND);if(a>=0){var r=this._originalMappings[a];if(t.column===void 0)for(var l=r.originalLine;r&&r.originalLine===l;)o.push({line:un.getArg(r,"generatedLine",null),column:un.getArg(r,"generatedColumn",null),lastColumn:un.getArg(r,"lastGeneratedColumn",null)}),r=this._originalMappings[++a];else for(var p=r.originalColumn;r&&r.originalLine===e&&r.originalColumn==p;)o.push({line:un.getArg(r,"generatedLine",null),column:un.getArg(r,"generatedColumn",null),lastColumn:un.getArg(r,"lastGeneratedColumn",null)}),r=this._originalMappings[++a];}return o;};lw.SourceMapConsumer=fa;function Br(n,t){var e=n;typeof n=="string"&&(e=un.parseSourceMapInput(n));var i=un.getArg(e,"version"),o=un.getArg(e,"sources"),a=un.getArg(e,"names",[]),r=un.getArg(e,"sourceRoot",null),l=un.getArg(e,"sourcesContent",null),p=un.getArg(e,"mappings"),d=un.getArg(e,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);r&&(r=un.normalize(r)),o=o.map(String).map(un.normalize).map(function(f){return r&&un.isAbsolute(r)&&un.isAbsolute(f)?un.relative(r,f):f;}),this._names=S_.fromArray(a.map(String),!0),this._sources=S_.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(f){return un.computeSourceURL(r,f,t);}),this.sourceRoot=r,this.sourcesContent=l,this._mappings=p,this._sourceMapURL=t,this.file=d;}Br.prototype=Object.create(fa.prototype);Br.prototype.consumer=fa;Br.prototype._findSourceIndex=function(n){var t=n;if(this.sourceRoot!=null&&(t=un.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var e;for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==n)return e;return-1;};Br.fromSourceMap=function(t,e){var i=Object.create(Br.prototype),o=i._names=S_.fromArray(t._names.toArray(),!0),a=i._sources=S_.fromArray(t._sources.toArray(),!0);i.sourceRoot=t._sourceRoot,i.sourcesContent=t._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=t._file,i._sourceMapURL=e,i._absoluteSources=i._sources.toArray().map(function(b){return un.computeSourceURL(i.sourceRoot,b,e);});for(var r=t._mappings.toArray().slice(),l=i.__generatedMappings=[],p=i.__originalMappings=[],d=0,f=r.length;d<f;d++){var h=r[d],g=new NL();g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=a.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=o.indexOf(h.name)),p.push(g)),l.push(g);}return jx(i.__originalMappings,un.compareByOriginalPositions),i;};Br.prototype._version=3;Object.defineProperty(Br.prototype,"sources",{get:function(){return this._absoluteSources.slice();}});function NL(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null;}Br.prototype._parseMappings=function(t,e){for(var i=1,o=0,a=0,r=0,l=0,p=0,d=t.length,f=0,h={},g={},b=[],w=[],T,O,V,j,L;f<d;)if(t.charAt(f)===";")i++,f++,o=0;else if(t.charAt(f)===",")f++;else{for(T=new NL(),T.generatedLine=i,j=f;j<d&&!this._charIsMappingSeparator(t,j);j++);if(O=t.slice(f,j),V=h[O],V)f+=O.length;else{for(V=[];f<j;)Yge.decode(t,f,g),L=g.value,f=g.rest,V.push(L);if(V.length===2)throw new Error("Found a source, but no line and column");if(V.length===3)throw new Error("Found a source and line, but no column");h[O]=V;}T.generatedColumn=o+V[0],o=T.generatedColumn,V.length>1&&(T.source=l+V[1],l+=V[1],T.originalLine=a+V[2],a=T.originalLine,T.originalLine+=1,T.originalColumn=r+V[3],r=T.originalColumn,V.length>4&&(T.name=p+V[4],p+=V[4])),w.push(T),typeof T.originalLine=="number"&&b.push(T);}jx(w,un.compareByGeneratedPositionsDeflated),this.__generatedMappings=w,jx(b,un.compareByOriginalPositions),this.__originalMappings=b;};Br.prototype._findMapping=function(t,e,i,o,a,r){if(t[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[i]);if(t[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[o]);return aE.search(t,e,a,r);};Br.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var i=this._generatedMappings[t+1];if(e.generatedLine===i.generatedLine){e.lastGeneratedColumn=i.generatedColumn-1;continue;}}e.lastGeneratedColumn=1/0;}};Br.prototype.originalPositionFor=function(t){var e={generatedLine:un.getArg(t,"line"),generatedColumn:un.getArg(t,"column")},i=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",un.compareByGeneratedPositionsDeflated,un.getArg(t,"bias",fa.GREATEST_LOWER_BOUND));if(i>=0){var o=this._generatedMappings[i];if(o.generatedLine===e.generatedLine){var a=un.getArg(o,"source",null);a!==null&&(a=this._sources.at(a),a=un.computeSourceURL(this.sourceRoot,a,this._sourceMapURL));var r=un.getArg(o,"name",null);return r!==null&&(r=this._names.at(r)),{source:a,line:un.getArg(o,"originalLine",null),column:un.getArg(o,"originalColumn",null),name:r};}}return{source:null,line:null,column:null,name:null};};Br.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null;}):!1;};Br.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;var i=this._findSourceIndex(t);if(i>=0)return this.sourcesContent[i];var o=t;this.sourceRoot!=null&&(o=un.relative(this.sourceRoot,o));var a;if(this.sourceRoot!=null&&(a=un.urlParse(this.sourceRoot))){var r=o.replace(/^file:\/\//,"");if(a.scheme=="file"&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!a.path||a.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)];}if(e)return null;throw new Error('"'+o+'" is not in the SourceMap.');};Br.prototype.generatedPositionFor=function(t){var e=un.getArg(t,"source");if(e=this._findSourceIndex(e),e<0)return{line:null,column:null,lastColumn:null};var i={source:e,originalLine:un.getArg(t,"line"),originalColumn:un.getArg(t,"column")},o=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",un.compareByOriginalPositions,un.getArg(t,"bias",fa.GREATEST_LOWER_BOUND));if(o>=0){var a=this._originalMappings[o];if(a.source===i.source)return{line:un.getArg(a,"generatedLine",null),column:un.getArg(a,"generatedColumn",null),lastColumn:un.getArg(a,"lastGeneratedColumn",null)};}return{line:null,column:null,lastColumn:null};};lw.BasicSourceMapConsumer=Br;function Ec(n,t){var e=n;typeof n=="string"&&(e=un.parseSourceMapInput(n));var i=un.getArg(e,"version"),o=un.getArg(e,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new S_(),this._names=new S_();var a={line:-1,column:0};this._sections=o.map(function(r){if(r.url)throw new Error("Support for url field in sections not implemented.");var l=un.getArg(r,"offset"),p=un.getArg(l,"line"),d=un.getArg(l,"column");if(p<a.line||p===a.line&&d<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=l,{generatedOffset:{generatedLine:p+1,generatedColumn:d+1},consumer:new fa(un.getArg(r,"map"),t)};});}Ec.prototype=Object.create(fa.prototype);Ec.prototype.constructor=fa;Ec.prototype._version=3;Object.defineProperty(Ec.prototype,"sources",{get:function(){for(var n=[],t=0;t<this._sections.length;t++)for(var e=0;e<this._sections[t].consumer.sources.length;e++)n.push(this._sections[t].consumer.sources[e]);return n;}});Ec.prototype.originalPositionFor=function(t){var e={generatedLine:un.getArg(t,"line"),generatedColumn:un.getArg(t,"column")},i=aE.search(e,this._sections,function(a,r){var l=a.generatedLine-r.generatedOffset.generatedLine;return l||a.generatedColumn-r.generatedOffset.generatedColumn;}),o=this._sections[i];return o?o.consumer.originalPositionFor({line:e.generatedLine-(o.generatedOffset.generatedLine-1),column:e.generatedColumn-(o.generatedOffset.generatedLine===e.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null};};Ec.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources();});};Ec.prototype.sourceContentFor=function(t,e){for(var i=0;i<this._sections.length;i++){var o=this._sections[i],a=o.consumer.sourceContentFor(t,!0);if(a)return a;}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.');};Ec.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var i=this._sections[e];if(i.consumer._findSourceIndex(un.getArg(t,"source"))!==-1){var o=i.consumer.generatedPositionFor(t);if(o){var a={line:o.line+(i.generatedOffset.generatedLine-1),column:o.column+(i.generatedOffset.generatedLine===o.line?i.generatedOffset.generatedColumn-1:0)};return a;}}}return{line:null,column:null};};Ec.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var o=this._sections[i],a=o.consumer._generatedMappings,r=0;r<a.length;r++){var l=a[r],p=o.consumer._sources.at(l.source);p=un.computeSourceURL(o.consumer.sourceRoot,p,this._sourceMapURL),this._sources.add(p),p=this._sources.indexOf(p);var d=null;
9l.name&&(d=o.consumer._names.at(l.name),this._names.add(d),d=this._names.indexOf(d));var f={source:p,generatedLine:l.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:l.generatedColumn+(o.generatedOffset.generatedLine===l.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:l.originalLine,originalColumn:l.originalColumn,name:d};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f);}jx(this.__generatedMappings,un.compareByGeneratedPositionsDeflated),jx(this.__originalMappings,un.compareByOriginalPositions);};lw.IndexedSourceMapConsumer=Ec;});var jL=li(DL=>{"use strict";var Kge=tE().SourceMapGenerator,cw=w_(),Zge=/(\r?\n)/,Qge=10,M_="$$$isSourceNode$$$";function dl(n,t,e,i,o){this.children=[],this.sourceContents={},this.line=n??null,this.column=t??null,this.source=e??null,this.name=o??null,this[M_]=!0,i!=null&&this.add(i);}dl.fromStringWithSourceMap=function(t,e,i){var o=new dl(),a=t.split(Zge),r=0,l=function(){var g=w(),b=w()||"";return g+b;function w(){return r<a.length?a[r++]:void 0;}},p=1,d=0,f=null;return e.eachMapping(function(g){if(f!==null)if(p<g.generatedLine)h(f,l()),p++,d=0;else{var b=a[r]||"",w=b.substr(0,g.generatedColumn-d);a[r]=b.substr(g.generatedColumn-d),d=g.generatedColumn,h(f,w),f=g;return;}for(;p<g.generatedLine;)o.add(l()),p++;if(d<g.generatedColumn){var b=a[r]||"";o.add(b.substr(0,g.generatedColumn)),a[r]=b.substr(g.generatedColumn),d=g.generatedColumn;}f=g;},this),r<a.length&&(f&&h(f,l()),o.add(a.splice(r).join(""))),e.sources.forEach(function(g){var b=e.sourceContentFor(g);b!=null&&(i!=null&&(g=cw.join(i,g)),o.setSourceContent(g,b));}),o;function h(g,b){if(g===null||g.source===void 0)o.add(b);else{var w=i?cw.join(i,g.source):g.source;o.add(new dl(g.originalLine,g.originalColumn,w,b,g.name));}}};dl.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(e){this.add(e);},this);else if(t[M_]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this;};dl.prototype.prepend=function(t){if(Array.isArray(t))for(var e=t.length-1;e>=0;e--)this.prepend(t[e]);else if(t[M_]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this;};dl.prototype.walk=function(t){for(var e,i=0,o=this.children.length;i<o;i++)e=this.children[i],e[M_]?e.walk(t):e!==""&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name});};dl.prototype.join=function(t){var e,i,o=this.children.length;if(o>0){for(e=[],i=0;i<o-1;i++)e.push(this.children[i]),e.push(t);e.push(this.children[i]),this.children=e;}return this;};dl.prototype.replaceRight=function(t,e){var i=this.children[this.children.length-1];return i[M_]?i.replaceRight(t,e):typeof i=="string"?this.children[this.children.length-1]=i.replace(t,e):this.children.push("".replace(t,e)),this;};dl.prototype.setSourceContent=function(t,e){this.sourceContents[cw.toSetString(t)]=e;};dl.prototype.walkSourceContents=function(t){for(var e=0,i=this.children.length;e<i;e++)this.children[e][M_]&&this.children[e].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),e=0,i=o.length;e<i;e++)t(cw.fromSetString(o[e]),this.sourceContents[o[e]]);};dl.prototype.toString=function(){var t="";return this.walk(function(e){t+=e;}),t;};dl.prototype.toStringWithSourceMap=function(t){var e={code:"",line:1,column:0},i=new Kge(t),o=!1,a=null,r=null,l=null,p=null;return this.walk(function(d,f){e.code+=d,f.source!==null&&f.line!==null&&f.column!==null?((a!==f.source||r!==f.line||l!==f.column||p!==f.name)&&i.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:e.line,column:e.column},name:f.name}),a=f.source,r=f.line,l=f.column,p=f.name,o=!0):o&&(i.addMapping({generated:{line:e.line,column:e.column}}),a=null,o=!1);for(var h=0,g=d.length;h<g;h++)d.charCodeAt(h)===Qge?(e.line++,e.column=0,h+1===g?(a=null,o=!1):o&&i.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:e.line,column:e.column},name:f.name})):e.column++;}),this.walkSourceContents(function(d,f){i.setSourceContent(d,f);}),{code:e.code,map:i};};DL.SourceNode=dl;});var LL=li(pw=>{"use strict";pw.SourceMapGenerator=tE().SourceMapGenerator;pw.SourceMapConsumer=AL().SourceMapConsumer;pw.SourceNode=jL().SourceNode;});var $L=li((dw,BL)=>{"use strict";dw.__esModule=!0;var sE=Ms(),Ku=void 0;try{(typeof define!="function"||!define.amd)&&(zL=LL(),Ku=zL.SourceNode);}catch(n){}var zL;Ku||(Ku=function(n,t,e,i){this.src="",i&&this.add(i);},Ku.prototype={add:function(t){sE.isArray(t)&&(t=t.join("")),this.src+=t;},prepend:function(t){sE.isArray(t)&&(t=t.join("")),this.src=t+this.src;},toStringWithSourceMap:function(){return{code:this.toString()};},toString:function(){return this.src;}}
vendor: 1,560 bytes, lines 9-10
9);function rE(n,t,e){if(sE.isArray(n)){for(var i=[],o=0,a=n.length;o<a;o++)i.push(t.wrap(n[o],e));return i;}else if(typeof n=="boolean"||typeof n=="number")return n+"";return n;}function FL(n){this.srcFile=n,this.source=[];}FL.prototype={isEmpty:function(){return!this.source.length;},prepend:function(t,e){this.source.unshift(this.wrap(t,e));},push:function(t,e){this.source.push(this.wrap(t,e));},merge:function(){var t=this.empty();return this.each(function(e){t.add([" ",e,` 10`]);}),t;},each:function(t){for(var e=0,i=this.source.length;e<i;e++)t(this.source[e]);},empty:function(){var t=this.currentLocation||{start:{}};return new Ku(t.start.line,t.start.column,this.srcFile);},wrap:function(t){var e=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof Ku?t:(t=rE(t,this,e),new Ku(e.start.line,e.start.column,this.srcFile,t));},functionCall:function(t,e,i){return i=this.generateList(i),this.wrap([t,e?"."+e+"(":"(",i,")"]);},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"';},objectLiteral:function(t){var e=this,i=[];Object.keys(t).forEach(function(a){var r=rE(t[a],e);r!=="undefined"&&i.push([e.quotedString(a),":",r]);});var o=this.generateList(i);return o.prepend("{"),o.add("}"),o;},generateList:function(t){for(var e=this.empty(),i=0,o=t.length;i<o;i++)i&&e.add(","),e.add(rE(t[i],this));return e;},generateArray:function(t){var e=this.generateList(t);
vendor: 4,161 bytes, lines 10-14
10return e.prepend("["),e.add("]"),e;}};dw.default=FL;BL.exports=dw.default;});var HL=li((mw,JL)=>{"use strict";mw.__esModule=!0;function qL(n){return n&&n.__esModule?n:{default:n};}var VL=UP(),exe=pl(),lE=qL(exe),txe=Ms(),nxe=$L(),GL=qL(nxe);function O_(n){this.value=n;}function E_(){}E_.prototype={nameLookup:function(t,e){return this.internalNameLookup(t,e);},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"];},compilerInfo:function(){var t=VL.COMPILER_REVISION,e=VL.REVISION_CHANGES[t];return[t,e];},appendToBuffer:function(t,e,i){return txe.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:i?["buffer += ",t,";"]:(t.appendToBuffer=!0,t);},initializeBuffer:function(){return this.quotedString("");},internalNameLookup:function(t,e){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(e),")"];},lookupPropertyFunctionIsUsed:!1,compile:function(t,e,i,o){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!i,this.context=i||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var a=t.opcodes,r=void 0,l=void 0,p=void 0,d=void 0;for(p=0,d=a.length;p<d;p++)r=a[p],this.source.currentLocation=r.loc,l=l||r.loc,this[r.opcode].apply(this,r.args);if(this.source.currentLocation=l,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new lE.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`; 11`]),this.decorators.push("return fn;"),o?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) { 12`),this.decorators.push(`} 13`),this.decorators=this.decorators.merge()));var f=this.createFunctionContext(o);if(this.isChild)return f;var h={compiler:this.compilerInfo(),main:f};this.decorators&&(h.main_d=this.decorators,h.useDecorators=!0);var g=this.context,b=g.programs,w=g.decorators;for(p=0,d=b.length;p<d;p++)h[p]=b[p],w[p]&&(h[p+"_d"]=w[p],h.useDecorators=!0);return this.environment.usePartial&&(h.usePartial=!0),this.options.data&&(h.useData=!0),this.useDepths&&(h.useDepths=!0),this.useBlockParams&&(h.useBlockParams=!0),this.options.compat&&(h.compat=!0),o?h.compilerOptions=this.options:(h.compiler=JSON.stringify(h.compiler),this.source.currentLocation={start:{line:1,column:0}},h=this.objectLiteral(h),e.srcName?(h=h.toStringWithSourceMap({file:e.destName}),h.map=h.map&&h.map.toString()):h=h.toString()),h;},preamble:function(){this.lastContext=0,this.source=new GL.default(this.options.srcName),this.decorators=new GL.default(this.options.srcName);},createFunctionContext:function(t){var e=this,i="",o=this.stackVars.concat(this.registers.list);o.length>0&&(i+=", "+o.join(", "));var a=0;Object.keys(this.aliases).forEach(function(p){var d=e.aliases[p];d.children&&d.referenceCount>1&&(i+=", alias"+ ++a+"="+p,d.children[0]="alias"+a);}),this.lookupPropertyFunctionIsUsed&&(i+=", "+this.lookupPropertyFunctionVarDeclaration());var r=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&r.push("blockParams"),this.useDepths&&r.push("depths");var l=this.mergeSource(i);return t?(r.push(l),Function.apply(this,r)):this.source.wrap(["function(",r.join(","),`) { 14 `,l,"}"]);},mergeSource:function(t){var e=this.environment.isSimple,i=!this.forceBuffer,o=void 0,a=void 0,r=void 0,l=void 0;return this.source.each(function(p){p.appendToBuffer?(r?p.prepend("
14+ "):r=p,l=p):(r&&(a?r.prepend("buffer += "):o=!0,l.add(";"),r=l=void 0),a=!0,e||(i=!1));}),i?r?(r.prepend("return "),l.add(";")):a||this.source.push('return "";'):(t+=", buffer = "+(o?"":this.initializeBuffer()),r?(r.prepend("return buffer + "),l.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(o?"":`; 15`)),this.source.merge();},lookupPropertyFunctionVarDeclaration:function(){return` 16 lookupProperty = container.lookupProperty || function(parent, propertyName) { 17 if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { 18 return parent[propertyName]; 19 } 20 return undefined 21 } 22 `.trim();},blockValue:function(t){var e=this.aliasable("container.hooks.blockHelperMissing"),i=[this.contextName(0)];this.setupHelperArgs(t,0,i);var o=this.popStack();i.splice(1,0,o),this.push(this.source.functionCall(e,"call",i));},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var i=this.topStack();e.splice(1,0,i),this.pushSource(["if (!",this.lastHelper,") { ",i," = ",this.source.functionCall(t,"call",e),"}"]);},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t;},append:function(){if(this.isInline())this.replaceStack(function(e){return[" != null ? ",e,' : ""'];}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"]);}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]));},getContext:function(t){this.lastContext=t;},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext));},lookupOnContext:function(t,e,i,o){var a=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[a++])):this.pushContext(),this.resolvePath("context",t,a,e,i);},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1);},lookupData:function(t,e,i){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,i);},resolvePath:function(t,e,i,o,a){var r=this;if(this.options.strict||this.options.assumeObjects){this.push(ixe(this.options.strict&&a,this,e,i,t));return;}for(var l=e.length,p=function(f){r.replaceStack(function(h){var g=r.nameLookup(h,e[f],t);return o?[" && ",g]:[" != null ? ",g," : ",h];});},d=i;d<l;d++)p(d);},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"]);},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),e!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t));},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}");},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]};},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values));},pushString:function(t){this.pushStackLiteral(this.quotedString(t));},pushLiteral:function(t){this.pushStackLiteral(t);},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null);},registerDecorator:function(t,e){var i=this.nameLookup("decorators",e,"decorator"),o=this.setupHelperArgs(e,t);this.decorators.push(["var decorator = ",i,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+e+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",o])," || fn;"]);}
vendor: 4,118 bytes, line 22
22,invokeHelper:function(t,e,i){var o=this.popStack(),a=this.setupHelper(t,e),r=[];i&&r.push(a.name),r.push(o),this.options.strict||r.push(this.aliasable("container.hooks.helperMissing"));var l=["(",this.itemsSeparatedBy(r,"||"),")"],p=this.source.functionCall(l,"call",a.callParams);this.push(p);},itemsSeparatedBy:function(t,e){var i=[];i.push(t[0]);for(var o=1;o<t.length;o++)i.push(e,t[o]);return i;},invokeKnownHelper:function(t,e){var i=this.setupHelper(t,e);this.push(this.source.functionCall(i.name,"call",i.callParams));},invokeAmbiguous:function(t,e){this.useRegister("helper");var i=this.popStack();this.emptyHash();var o=this.setupHelper(0,t,e),a=this.lastHelper=this.nameLookup("helpers",t,"helper"),r=["(","(helper = ",a," || ",i,")"];this.options.strict||(r[0]="(helper = ",r.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",r,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",o.callParams)," : helper))"]);},invokePartial:function(t,e,i){var o=[],a=this.setupParams(e,1,o);t&&(e=this.popStack(),delete a.name),i&&(a.indent=JSON.stringify(i)),a.helpers="helpers",a.partials="partials",a.decorators="container.decorators",t?o.unshift(e):o.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(a.depths="depths"),a=this.objectLiteral(a),o.push(a),this.push(this.source.functionCall("container.invokePartial","",o));},assignToHash:function(t){var e=this.popStack(),i=void 0,o=void 0,a=void 0;this.trackIds&&(a=this.popStack()),this.stringParams&&(o=this.popStack(),i=this.popStack());var r=this.hash;i&&(r.contexts[t]=i),o&&(r.types[t]=o),a&&(r.ids[t]=a),r.values[t]=e;},pushId:function(t,e,i){t==="BlockParam"?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(i?" + "+JSON.stringify("."+i):"")):t==="PathExpression"?this.pushString(e):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null");},compiler:E_,compileChildren:function(t,e){for(var i=t.children,o=void 0,a=void 0,r=0,l=i.length;r<l;r++){o=i[r],a=new this.compiler();var p=this.matchExistingProgram(o);if(p==null){var d=this.context.programs.push("")-1;o.index=d,o.name="program"+d,this.context.programs[d]=a.compile(o,e,this.context,!this.precompile),this.context.decorators[d]=a.decorators,this.context.environments[d]=o,this.useDepths=this.useDepths||a.useDepths,this.useBlockParams=this.useBlockParams||a.useBlockParams,o.useDepths=this.useDepths,o.useBlockParams=this.useBlockParams;}else o.index=p.index,o.name="program"+p.index,this.useDepths=this.useDepths||p.useDepths,this.useBlockParams=this.useBlockParams||p.useBlockParams;}},matchExistingProgram:function(t){for(var e=0,i=this.context.environments.length;e<i;e++){var o=this.context.environments[e];if(o&&o.equals(t))return o;}},programExpression:function(t){var e=this.environment.children[t],i=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&i.push("blockParams"),this.useDepths&&i.push("depths"),"container.program("+i.join(", ")+")";},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t));},push:function(t){return t instanceof O_||(t=this.source.wrap(t)),this.inlineStack.push(t),t;},pushStackLiteral:function(t){this.push(new O_(t));},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t);},replaceStack:function(t){var e=["("],i=void 0,o=void 0,a=void 0;if(!this.isInline())throw new lE.default("replaceStack on non-inline");var r=this.popStack(!0);if(r instanceof O_)i=[r.value],e=["(",i],a=!0;else{o=!0;var l=this.incrStack();e=["((",this.push(l)," = ",r,")"],i=this.topStack();}var p=t.call(this,i);a||this.popStack(),o&&this.stackSlot--,this.push(e.concat(p,")"));},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName();},topStackName:function(){return"stack"+this.stackSlot;}
22,flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,i=t.length;e<i;e++){var o=t[e];if(o instanceof O_)this.compileStack.push(o);else{var a=this.incrStack();this.pushSource([a," = ",o,";"]),this.compileStack.push(a);}}},isInline:function(){return this.inlineStack.length;},popStack:function(t){var e=this.isInline(),i=(e?this.inlineStack:this.compileStack).pop();if(!t&&i instanceof O_)return i.value;if(!e){if(!this.stackSlot)throw new lE.default("Invalid stack pop");this.stackSlot--;}return i;},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof O_?e.value:e;},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t;},quotedString:function(t){return this.source.quotedString(t);},objectLiteral:function(t){return this.source.objectLiteral(t);},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):(e=this.aliases[t]=this.source.wrap(t),e.aliasable=!0,e.referenceCount=1,e);},setupHelper:function(t,e,i){var o=[],a=this.setupHelperArgs(e,t,o,i),r=this.nameLookup("helpers",e,"helper"),l=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:o,paramsInit:a,name:r,callParams:[l].concat(o)};},setupParams:function(t,e,i){var o={},a=[],r=[],l=[],p=!i,d=void 0;p&&(i=[]),o.name=this.quotedString(t),o.hash=this.popStack(),this.trackIds&&(o.hashIds=this.popStack()),this.stringParams&&(o.hashTypes=this.popStack(),o.hashContexts=this.popStack());var f=this.popStack(),h=this.popStack();(h||f)&&(o.fn=h||"container.noop",o.inverse=f||"container.noop");for(var g=e;g--;)d=this.popStack(),i[g]=d,this.trackIds&&(l[g]=this.popStack()),this.stringParams&&(r[g]=this.popStack(),a[g]=this.popStack());return p&&(o.args=this.source.generateArray(i)),this.trackIds&&(o.ids=this.source.generateArray(l)),this.stringParams&&(o.types=this.source.generateArray(r),o.contexts=this.source.generateArray(a)),this.options.data&&(o.data="data"),this.useBlockParams&&(o.blockParams="blockParams"),o;},setupHelperArgs:function(t,e,i,o){var a=this.setupParams(t,e,i);return a.loc=JSON.stringify(this.source.currentLocation),a=this.objectLiteral(a),o?(this.useRegister("options"),i.push("options"),["options=",a]):i?(i.push(a),""):a;}};(function(){for(var n="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=E_.RESERVED_WORDS={},e=0,i=n.length;e<i;e++)t[n[e]]=!0;})();E_.isValidJavaScriptVariableName=function(n){return!E_.RESERVED_WORDS[n]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(n);};function ixe(n,t,e,i,o){var a=t.popStack(),r=e.length;n&&r--;for(var l=i;l<r;l++)a=t.nameLookup(a,e[l],o);return n?[t.aliasable("container.strict"),"(",a,", ",t.quotedString(e[r]),", ",JSON.stringify(t.source.currentLocation)," )"]:a;}mw.default=E_;JL.exports=mw.default;});var XL=li((uw,WL)=>{"use strict";uw.__esModule=!0;function Lx(n){return n&&n.__esModule?n:{default:n};}var oxe=K7(),axe=Lx(oxe),rxe=jO(),sxe=Lx(rxe),cE=cL(),pE=uL(),lxe=HL(),cxe=Lx(lxe),pxe=zO(),dxe=Lx(pxe),mxe=RO(),uxe=Lx(mxe),fxe=axe.default.create;function UL(){var n=fxe();return n.compile=function(t,e){return pE.compile(t,e,n);},n.precompile=function(t,e){return pE.precompile(t,e,n);},n.AST=sxe.default,n.Compiler=pE.Compiler,n.JavaScriptCompiler=cxe.default,n.Parser=cE.parser,n.parse=cE.parse,n.parseWithoutProcessing=cE.parseWithoutProcessing,n;}var T_=UL();T_.create=UL;uxe.default(T_);T_.Visitor=dxe.default;T_.default=T_;uw.default=T_;WL.exports=uw.default;});var n9=li((vw,hE)=>{"use strict";(function(n,t){typeof vw=="object"&&typeof hE=="object"?hE.exports=t((Hw(),HE(CI))):typeof define=="function"&&define.amd?define(["quill"],t):typeof vw=="object"?vw.QuillTableBetter=t((Hw(),HE(CI))):n.QuillTableBetter=t(n.Quill);})(self,function(n){return function(){var t={386:function(a){var r=-1,l=1,p=0;function d(W,Y,se,de,Ae){if(W===Y)return W?[[p,W]]:[];if(se!=null){var rt=function(ke,Ke,ve){var Se=typeof ve=="number"?{index:ve,length:0}:ve.oldRange,Be=typeof ve=="number"?null:ve.newRange,Ze=ke.length,kt=Ke.length;if(Se.length===0&&(Be===null||Be.length===0)){var Z=Se.index,D=ke.slice(0,Z),F=ke.slice(Z),fe=Be?Be.index:null,he=Z+kt-Ze;if((fe===null||fe===he)&&!(he<0||he>kt)){var xe=Ke.slice(0,he);if((Ge=Ke.slice(he))===F){var nt=Math.min(Z,he);if((Pe=D.slice(0,nt))===(ct=xe.slice(0,nt)))return U(Pe,D.slice(nt),xe.slice(nt),F);}}if(fe===null||fe===Z){var Je=Z,Ge=(xe=Ke.slice(0,Je),Ke.slice(Je));if(xe===D){var Ne=Math.min(Ze-Je,kt-Je);if((Oe=F.slice(F.length-Ne))===(ht=Ge.slice(Ge.length-Ne)))return U(D,F.slice(0,F.length-Ne),Ge.slice(0,Ge.length-Ne),Oe);}}}if(Se.length>0&&Be&&Be.length===0){var Pe=ke.slice(0,Se.index),Oe=ke.slice(Se.index+Se.length);if(!(kt<(nt=Pe.length)+(Ne=Oe.length))){var ct=Ke.slice(0,nt),ht=Ke.slice(kt-Ne);if(Pe===ct&&Oe===ht)return U(Pe,ke.slice(nt,Ze-Ne),Ke.slice(nt,kt-Ne),Oe);}}return null;}(W,Y,se);
22if(rt)return rt;}var et=h(W,Y),pt=W.substring(0,et);et=b(W=W.substring(et),Y=Y.substring(et));var ft=W.substring(W.length-et),je=function(ke,Ke){var ve;if(!ke)return[[l,Ke]];if(!Ke)return[[r,ke]];var Se=ke.length>Ke.length?ke:Ke,Be=ke.length>Ke.length?Ke:ke,Ze=Se.indexOf(Be);if(Ze!==-1)return ve=[[l,Se.substring(0,Ze)],[p,Be],[l,Se.substring(Ze+Be.length)]],ke.length>Ke.length&&(ve[0][0]=ve[2][0]=r),ve;if(Be.length===1)return[[r,ke],[l,Ke]];var kt=function(Je,Ge){var Ne=Je.length>Ge.length?Je:Ge,Pe=Je.length>Ge.length?Ge:Je;if(Ne.length<4||2*Pe.length<Ne.length)return null;function Oe(pi,di,Kn){for(var Ai,$i,mi,sn,Pn=pi.substring(Kn,Kn+Math.floor(pi.length/4)),_i=-1,so="";(_i=di.indexOf(Pn,_i+1))!==-1;){var to=h(pi.substring(Kn),di.substring(_i)),ko=b(pi.substring(0,Kn),di.substring(0,_i));so.length<ko+to&&(so=di.substring(_i-ko,_i)+di.substring(_i,_i+to),Ai=pi.substring(0,Kn-ko),$i=pi.substring(Kn+to),mi=di.substring(0,_i-ko),sn=di.substring(_i+to));}return 2*so.length>=pi.length?[Ai,$i,mi,sn,so]:null;}var ct,ht,qt,zt,rn,ni=Oe(Ne,Pe,Math.ceil(Ne.length/4)),Vn=Oe(Ne,Pe,Math.ceil(Ne.length/2));return ni||Vn?(ct=Vn?ni&&ni[4].length>Vn[4].length?ni:Vn:ni,Je.length>Ge.length?(ht=ct[0],qt=ct[1],zt=ct[2],rn=ct[3]):(zt=ct[0],rn=ct[1],ht=ct[2],qt=ct[3]),[ht,qt,zt,rn,ct[4]]):null;}(ke,Ke);if(kt){var Z=kt[0],D=kt[1],F=kt[2],fe=kt[3],he=kt[4],xe=d(Z,F),nt=d(D,fe);return xe.concat([[p,he]],nt);}return function(Je,Ge){for(var Ne=Je.length,Pe=Ge.length,Oe=Math.ceil((Ne+Pe)/2),ct=Oe,ht=2*Oe,qt=new Array(ht),zt=new Array(ht),rn=0;rn<ht;rn++)qt[rn]=-1,zt[rn]=-1;qt[ct+1]=0,zt[ct+1]=0;for(var ni=Ne-Pe,Vn=ni%2!=0,pi=0,di=0,Kn=0,Ai=0,$i=0;$i<Oe;$i++){for(var mi=-$i+pi;mi<=$i-di;mi+=2){for(var sn=ct+mi,Pn=(lo=mi===-$i||mi!==$i&&qt[sn-1]<qt[sn+1]?qt[sn+1]:qt[sn-1]+1)-mi;lo<Ne&&Pn<Pe&&Je.charAt(lo)===Ge.charAt(Pn);)lo++,Pn++;if(qt[sn]=lo,lo>Ne)di+=2;else if(Pn>Pe)pi+=2;else if(Vn&&(to=ct+ni-mi)>=0&&to<ht&&zt[to]!==-1&&lo>=(so=Ne-zt[to]))return f(Je,Ge,lo,Pn);}for(var _i=-$i+Kn;_i<=$i-Ai;_i+=2){for(var so,to=ct+_i,ko=(so=_i===-$i||_i!==$i&&zt[to-1]<zt[to+1]?zt[to+1]:zt[to-1]+1)-_i;so<Ne&&ko<Pe&&Je.charAt(Ne-so-1)===Ge.charAt(Pe-ko-1);)so++,ko++;if(zt[to]=so,so>Ne)Ai+=2;else if(ko>Pe)Kn+=2;else if(!Vn){var lo;if((sn=ct+ni-_i)>=0&&sn<ht&&qt[sn]!==-1&&(Pn=ct+(lo=qt[sn])-sn,lo>=(so=Ne-so)))return f(Je,Ge,lo,Pn);}}}return[[r,Je],[l,Ge]];}(ke,Ke);}(W=W.substring(0,W.length-et),Y=Y.substring(0,Y.length-et));return pt&&je.unshift([p,pt]),ft&&je.push([p,ft]),L(je,Ae),de&&function(ke){for(var Ke=!1,ve=[],Se=0,Be=null,Ze=0,kt=0,Z=0,D=0,F=0;Ze<ke.length;)ke[Ze][0]==p?(ve[Se++]=Ze,kt=D,Z=F,D=0,F=0,Be=ke[Ze][1]):(ke[Ze][0]==l?D+=ke[Ze][1].length:F+=ke[Ze][1].length,Be&&Be.length<=Math.max(kt,Z)&&Be.length<=Math.max(D,F)&&(ke.splice(ve[Se-1],0,[r,Be]),ke[ve[Se-1]+1][0]=l,Se--,Ze=--Se>0?ve[Se-1]:-1,kt=0,Z=0,D=0,F=0,Be=null,Ke=!0)),Ze++;for(Ke&&L(ke),function(Je){function Ge(di,Kn){if(!di||!Kn)return 6;var Ai=di.charAt(di.length-1),$i=Kn.charAt(0),mi=Ai.match(w),sn=$i.match(w),Pn=mi&&Ai.match(T),_i=sn&&$i.match(T),so=Pn&&Ai.match(O),to=_i&&$i.match(O),ko=so&&di.match(V),lo=to&&Kn.match(j);return ko||lo?5:so||to?4:mi&&!Pn&&_i?3:Pn||_i?2:mi||sn?1:0;}for(var Ne=1;Ne<Je.length-1;){if(Je[Ne-1][0]==p&&Je[Ne+1][0]==p){var Pe=Je[Ne-1][1],Oe=Je[Ne][1],ct=Je[Ne+1][1],ht=b(Pe,Oe);if(ht){var qt=Oe.substring(Oe.length-ht);Pe=Pe.substring(0,Pe.length-ht),Oe=qt+Oe.substring(0,Oe.length-ht),ct=qt+ct;}for(var zt=Pe,rn=Oe,ni=ct,Vn=Ge(Pe,Oe)+Ge(Oe,ct);Oe.charAt(0)===ct.charAt(0);){Pe+=Oe.charAt(0),Oe=Oe.substring(1)+ct.charAt(0),ct=ct.substring(1);var pi=Ge(Pe,Oe)+Ge(Oe,ct);pi>=Vn&&(Vn=pi,zt=Pe,rn=Oe,ni=ct);}Je[Ne-1][1]!=zt&&(zt?Je[Ne-1][1]=zt:(Je.splice(Ne-1,1),Ne--),Je[Ne][1]=rn,ni?Je[Ne+1][1]=ni:(Je.splice(Ne+1,1),Ne--));}Ne++;}}(ke),Ze=1;Ze<ke.length;){if(ke[Ze-1][0]==r&&ke[Ze][0]==l){var fe=ke[Ze-1][1],he=ke[Ze][1],xe=g(fe,he),nt=g(he,fe);xe>=nt?(xe>=fe.length/2||xe>=he.length/2)&&(ke.splice(Ze,0,[p,he.substring(0,xe)]),ke[Ze-1][1]=fe.substring(0,fe.length-xe),ke[Ze+1][1]=he.substring(xe),Ze++):(nt>=fe.length/2||nt>=he.length/2)&&(ke.splice(Ze,0,[p,fe.substring(0,nt)]),ke[Ze-1][0]=l,ke[Ze-1][1]=he.substring(0,he.length-nt),ke[Ze+1][0]=r,ke[Ze+1][1]=fe.substring(nt),Ze++),Ze++;}Ze++;}}(je),je;}function f(W,Y,se,de){var Ae=W.substring(0,se),rt=Y.substring(0,de),et=W.substring(se),pt=Y.substring(de),ft=d(Ae,rt),je=d(et,pt);return ft.concat(je);}function h(W,Y){if(!W||!Y||W.charAt(0)!==Y.charAt(0))return 0;for(var se=0,de=Math.min(W.length,Y.length),Ae=de,rt=0;se<Ae;)W.substring(rt,Ae)==Y.substring(rt,Ae)?rt=se=Ae:de=Ae,Ae=Math.floor((de-se)/2+se);return A(W.charCodeAt(Ae-1))&&Ae--,Ae;}function g(W,Y){var se=W.length,de=Y.length;if(se==0||de==0)return 0;se>de?W=W.substring(se-de):se<de&&(Y=Y.substring(0,se));var Ae=Math.min(se,de);if(W==Y)return Ae;for(var rt=0,et=1;;){var pt=W.substring(Ae-et),ft=Y.indexOf(pt);if(ft==-1)return rt;et+=ft,ft!=0&&W.substring(Ae-et)!=Y.substring(0,et)||(rt=et,et++);}}function b(W,Y){if(!W||!Y||W.slice(-1)!==Y.slice(-1))return 0;for(var se=0,de=Math.min(W.length,Y.length),Ae=de,rt=0;se<Ae;)W.substring(W.length-Ae,W.length-rt)==Y.substring(Y.length-Ae,Y.length-rt)?rt=se=Ae:de=Ae,Ae=Math.floor((de-se)/2+se);return J(W.charCodeAt(W.length-Ae))&&Ae--,Ae;}var w=/[^a-zA-Z0-9]/,T=/\s/,O=/[\r\n]/,V=/\n\r?\n$/,j=/^\r?\n\r?\n/;function L(W,Y){W.push([p,""]);for(var se,de=0,Ae=0,rt=0,et="",pt="";de<W.length;)if(de<W.length-1&&!W[de][1])W.splice(de,1);else switch(W[de][0]){case l:rt++,pt+=W[de][1],de++;break;case r:Ae++,et+=W[de][1],de++;break;case p:var ft=de-rt-Ae-1;if(Y){if(ft>=0&&te(W[ft][1])){var je=W[ft][1].slice(-1);if(W[ft][1]=W[ft][1].slice(0,-1),et=je+et,pt=je+pt,!W[ft][1]){W.splice(ft,1),de--;var ke=ft-1;W[ke]&&W[ke][0]===l&&(rt++,pt=W[ke][1]+pt,ke--),W[ke]&&W[ke][0]===r&&(Ae++,et=W[ke][1]+et,ke--),ft=ke;}}Q(W[de][1])&&(je=W[de][1].charAt(0),W[de][1]=W[de][1].slice(1),et+=je,pt+=je);}if(de<W.length-1&&!W[de][1]){W.splice(de,1);break;}if(et.length>0||pt.length>0){et.length>0&&pt.length>0&&((se=h(pt,et))!==0&&(ft>=0?W[ft][1]+=pt.substring(0,se):(W.splice(0,0,[p,pt.substring(0,se)]),de++),pt=pt.substring(se),et=et.substring(se)),(se=b(pt,et))!==0&&(W[de][1]=pt.substring(pt.length-se)+W[de][1],pt=pt.substring(0,pt.length-se),et=et.substring(0,et.length-se)));var Ke=rt+Ae;et.length===0&&pt.length===0?(W.splice(de-Ke,Ke),de-=Ke):et.length===0?(W.splice(de-Ke,Ke,[l,pt]),de=de-Ke+1):pt.length===0?(W.splice(de-Ke,Ke,[r,et]),de=de-Ke+1):(W.splice(de-Ke,Ke,[r,et],[l,pt]),de=de-Ke+2);}de!==0&&W[de-1][0]===p?(W[de-1][1]+=W[de][1],W.splice(de,1)):de++,rt=0,Ae=0,et="",pt="";}W[W.length-1][1]===""&&W.pop();var ve=!1;for(de=1;de<W.length-1;)W[de-1][0]===p&&W[de+1][0]===p&&(W[de][1].substring(W[de][1].length-W[de-1][1].length)===W[de-1][1]?(W[de][1]=W[de-1][1]+W[de][1].substring(0,W[de][1].length-W[de-1][1].length),W[de+1][1]=W[de-1][1]+W[de+1
22][1],W.splice(de-1,1),ve=!0):W[de][1].substring(0,W[de+1][1].length)==W[de+1][1]&&(W[de-1][1]+=W[de+1][1],W[de][1]=W[de][1].substring(W[de+1][1].length)+W[de+1][1],W.splice(de+1,1),ve=!0)),de++;ve&&L(W,Y);}function A(W){return W>=55296&&W<=56319;}function J(W){return W>=56320&&W<=57343;}function Q(W){return J(W.charCodeAt(0));}function te(W){return A(W.charCodeAt(W.length-1));}function U(W,Y,se,de){return te(W)||Q(de)?null:function(Ae){for(var rt=[],et=0;et<Ae.length;et++)Ae[et][1].length>0&&rt.push(Ae[et]);return rt;}([[p,W],[r,Y],[l,se],[p,de]]);}function ce(W,Y,se,de){return d(W,Y,se,de,!0);}ce.INSERT=l,ce.DELETE=r,ce.EQUAL=p,a.exports=ce;},861:function(a,r,l){a=l.nmd(a);var p="__lodash_hash_undefined__",d=9007199254740991,f="[object Arguments]",h="[object Boolean]",g="[object Date]",b="[object Function]",w="[object GeneratorFunction]",T="[object Map]",O="[object Number]",V="[object Object]",j="[object Promise]",L="[object RegExp]",A="[object Set]",J="[object String]",Q="[object Symbol]",te="[object WeakMap]",U="[object ArrayBuffer]",ce="[object DataView]",W="[object Float32Array]",Y="[object Float64Array]",se="[object Int8Array]",de="[object Int16Array]",Ae="[object Int32Array]",rt="[object Uint8Array]",et="[object Uint8ClampedArray]",pt="[object Uint16Array]",ft="[object Uint32Array]",je=/\w*$/,ke=/^\[object .+?Constructor\]$/,Ke=/^(?:0|[1-9]\d*)$/,ve={};ve[f]=ve["[object Array]"]=ve[U]=ve[ce]=ve[h]=ve[g]=ve[W]=ve[Y]=ve[se]=ve[de]=ve[Ae]=ve[T]=ve[O]=ve[V]=ve[L]=ve[A]=ve[J]=ve[Q]=ve[rt]=ve[et]=ve[pt]=ve[ft]=!0,ve["[object Error]"]=ve[b]=ve[te]=!1;var Se=typeof l.g=="object"&&l.g&&l.g.Object===Object&&l.g,Be=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Se||Be||Function("return this")(),kt=r&&!r.nodeType&&r,Z=kt&&a&&!a.nodeType&&a,D=Z&&Z.exports===kt;function F(Ie,ae){return Ie.set(ae[0],ae[1]),Ie;}function fe(Ie,ae){return Ie.add(ae),Ie;}function he(Ie,ae,Ce,Le){var _t=-1,wn=Ie?Ie.length:0;for(Le&&wn&&(Ce=Ie[++_t]);++_t<wn;)Ce=ae(Ce,Ie[_t],_t,Ie);return Ce;}function xe(Ie){var ae=!1;if(Ie!=null&&typeof Ie.toString!="function")try{ae=!!(Ie+"");}catch(Ce){}return ae;}function nt(Ie){var ae=-1,Ce=Array(Ie.size);return Ie.forEach(function(Le,_t){Ce[++ae]=[_t,Le];}),Ce;}function Je(Ie,ae){return function(Ce){return Ie(ae(Ce));};}function Ge(Ie){var ae=-1,Ce=Array(Ie.size);return Ie.forEach(function(Le){Ce[++ae]=Le;}),Ce;}var Ne,Pe=Array.prototype,Oe=Function.prototype,ct=Object.prototype,ht=Ze["__core-js_shared__"],qt=(Ne=/[^.]+$/.exec(ht&&ht.keys&&ht.keys.IE_PROTO||""))?"Symbol(src)_1."+Ne:"",zt=Oe.toString,rn=ct.hasOwnProperty,ni=ct.toString,Vn=RegExp("^"+zt.call(rn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pi=D?Ze.Buffer:void 0,di=Ze.Symbol,Kn=Ze.Uint8Array,Ai=Je(Object.getPrototypeOf,Object),$i=Object.create,mi=ct.propertyIsEnumerable,sn=Pe.splice,Pn=Object.getOwnPropertySymbols,_i=pi?pi.isBuffer:void 0,so=Je(Object.keys,Object),to=Vi(Ze,"DataView"),ko=Vi(Ze,"Map"),lo=Vi(Ze,"Promise"),bt=Vi(Ze,"Set"),ml=Vi(Ze,"WeakMap"),Xs=Vi(Object,"create"),lp=xi(to),cp=xi(ko),pp=xi(lo),Ql=xi(bt),Os=xi(ml),Sa=di?di.prototype:void 0,dr=Sa?Sa.valueOf:void 0;function Or(Ie){var ae=-1,Ce=Ie?Ie.length:0;for(this.clear();++ae<Ce;){var Le=Ie[ae];this.set(Le[0],Le[1]);}}function Ca(Ie){var ae=-1,Ce=Ie?Ie.length:0;for(this.clear();++ae<Ce;){var Le=Ie[ae];this.set(Le[0],Le[1]);}}function Er(Ie){var ae=-1,Ce=Ie?Ie.length:0;for(this.clear();++ae<Ce;){var Le=Ie[ae];this.set(Le[0],Le[1]);}}function $r(Ie){this.__data__=new Ca(Ie);}function Si(Ie,ae,Ce){var Le=Ie[ae];rn.call(Ie,ae)&&va(Le,Ce)&&(Ce!==void 0||ae in Ie)||(Ie[ae]=Ce);}function Ee(Ie,ae){for(var Ce=Ie.length;Ce--;)if(va(Ie[Ce][0],ae))return Ce;return-1;}function De(Ie,ae,Ce,Le,_t,wn,fn){var vn;if(Le&&(vn=wn?Le(Ie,_t,wn,fn):Le(Ie)),vn!==void 0)return vn;if(!co(Ie))return Ie;var Wi=Do(Ie);if(Wi){if(vn=function(on){var Xn=on.length,Oi=on.constructor(Xn);return Xn&&typeof on[0]=="string"&&rn.call(on,"index")&&(Oi.index=on.index,Oi.input=on.input),Oi;}(Ie),!ae)return function(on,Xn){var Oi=-1,na=on.length;
22for(Xn||(Xn=Array(na));++Oi<na;)Xn[Oi]=on[Oi];return Xn;}(Ie,vn);}else{var Xi=Wo(Ie),Ii=Xi==b||Xi==w;if(Vr(Ie))return function(on,Xn){if(Xn)return on.slice();var Oi=new on.constructor(on.length);return on.copy(Oi),Oi;}(Ie,ae);if(Xi==V||Xi==f||Ii&&!wn){if(xe(Ie))return wn?Ie:{};if(vn=function(on){return typeof on.constructor!="function"||ta(on)?{}:co(Xn=Ai(on))?$i(Xn):{};var Xn;}(Ii?{}:Ie),!ae)return function(on,Xn){return Nt(on,gi(on),Xn);}(Ie,function(on,Xn){return on&&Nt(Xn,Gr(Xn),on);}(vn,Ie));}else{if(!ve[Xi])return wn?Ie:{};vn=function(on,Xn,Oi,na){var Es,$a=on.constructor;switch(Xn){case U:return dt(on);case h:case g:return new $a(+on);case ce:return function(ui,ia){var ps=ia?dt(ui.buffer):ui.buffer;return new ui.constructor(ps,ui.byteOffset,ui.byteLength);}(on,na);case W:case Y:case se:case de:case Ae:case rt:case et:case pt:case ft:return function(ui,ia){var ps=ia?dt(ui.buffer):ui.buffer;return new ui.constructor(ps,ui.byteOffset,ui.length);}(on,na);case T:return function(ui,ia,ps){return he(ia?ps(nt(ui),!0):nt(ui),F,new ui.constructor());}(on,na,Oi);case O:case J:return new $a(on);case L:return function(ui){var ia=new ui.constructor(ui.source,je.exec(ui));return ia.lastIndex=ui.lastIndex,ia;}(on);case A:return function(ui,ia,ps){return he(ia?ps(Ge(ui),!0):Ge(ui),fe,new ui.constructor());}(on,na,Oi);case Q:return Es=on,dr?Object(dr.call(Es)):{};}}(Ie,Xi,De,ae);}}fn||(fn=new $r());var kn=fn.get(Ie);if(kn)return kn;if(fn.set(Ie,vn),!Wi)var Mi=Ce?function(on){return function(Xn,Oi,na){var Es=Oi(Xn);return Do(Xn)?Es:function($a,ui){for(var ia=-1,ps=ui.length,k_=$a.length;++ia<ps;)$a[k_+ia]=ui[ia];return $a;}(Es,na(Xn));}(on,Gr,gi);}(Ie):Gr(Ie);return function(on,Xn){for(var Oi=-1,na=on?on.length:0;++Oi<na&&Xn(on[Oi],Oi)!==!1;);}(Mi||Ie,function(on,Xn){Mi&&(on=Ie[Xn=on]),Si(vn,Xn,De(on,ae,Ce,Le,Xn,Ie,fn));}),vn;}function dt(Ie){var ae=new Ie.constructor(Ie.byteLength);return new Kn(ae).set(new Kn(Ie)),ae;}function Nt(Ie,ae,Ce,Le){Ce||(Ce={});for(var _t=-1,wn=ae.length;++_t<wn;){var fn=ae[_t],vn=Le?Le(Ce[fn],Ie[fn],fn,Ce,Ie):void 0;Si(Ce,fn,vn===void 0?Ie[fn]:vn);}return Ce;}function Gn(Ie,ae){var Ce,Le,_t=Ie.__data__;return((Le=typeof(Ce=ae))=="string"||Le=="number"||Le=="symbol"||Le=="boolean"?Ce!=="__proto__":Ce===null)?_t[typeof ae=="string"?"string":"hash"]:_t.map;}function Vi(Ie,ae){var Ce=function(Le,_t){return Le?.[_t];}(Ie,ae);return function(Le){return!(!co(Le)||(_t=Le,qt&&qt in _t))&&(Tr(Le)||xe(Le)?Vn:ke).test(xi(Le));var _t;}(Ce)?Ce:void 0;}Or.prototype.clear=function(){this.__data__=Xs?Xs(null):{};},Or.prototype.delete=function(Ie){return this.has(Ie)&&delete this.__data__[Ie];},Or.prototype.get=function(Ie){var ae=this.__data__;if(Xs){var Ce=ae[Ie];return Ce===p?void 0:Ce;}return rn.call(ae,Ie)?ae[Ie]:void 0;},Or.prototype.has=function(Ie){var ae=this.__data__;return Xs?ae[Ie]!==void 0:rn.call(ae,Ie);},Or.prototype.set=function(Ie,ae){return this.__data__[Ie]=Xs&&ae===void 0?p:ae,this;},Ca.prototype.clear=function(){this.__data__=[];},Ca.prototype.delete=function(Ie){var ae=this.__data__,Ce=Ee(ae,Ie);return!(Ce<0||(Ce==ae.length-1?ae.pop():sn.call(ae,Ce,1),0));},Ca.prototype.get=function(Ie){var ae=this.__data__,Ce=Ee(ae,Ie);return Ce<0?void 0:ae[Ce][1];},Ca.prototype.has=function(Ie){return Ee(this.__data__,Ie)>-1;},Ca.prototype.set=function(Ie,ae){var Ce=this.__data__,Le=Ee(Ce,Ie);return Le<0?Ce.push([Ie,ae]):Ce[Le][1]=ae,this;},Er.prototype.clear=function(){this.__data__={hash:new Or(),map:new(ko||Ca)(),string:new Or()};},Er.prototype.delete=function(Ie){return Gn(this,Ie).delete(Ie);},Er.prototype.get=function(Ie){return Gn(this,Ie).get(Ie);},Er.prototype.has=function(Ie){return Gn(this,Ie).has(Ie);},Er.prototype.set=function(Ie,ae){return Gn(this,Ie).set(Ie,ae),this;},$r.prototype.clear=function(){this.__data__=new Ca();},$r.prototype.delete=function(Ie){return this.__data__.delete(Ie);},$r.prototype.get=function(Ie){return this.__data__.get(Ie);},$r.prototype.has=function(Ie){return this.__data__.has(Ie);},$r.prototype.set=function(Ie,ae){var Ce=this.__data__;if(Ce instanceof Ca){var Le=Ce.__data__;if(!ko||Le.length<199)return Le.push([Ie,ae]),this;Ce=this.__data__=new Er(Le);}return Ce.set(Ie,ae),this;};var gi=Pn?Je(Pn,Object):function(){return[];},Wo=function(Ie){return ni.call(Ie);};function _o(Ie,ae){return!!(ae=ae??d)&&(typeof Ie=="number"||Ke.test(Ie))&&Ie>-1&&Ie%1==0&&Ie<ae;}function ta(Ie){var ae=Ie&&Ie.constructor;return Ie===(typeof ae=="function"&&ae.prototype||ct);}function xi(Ie){if(Ie!=null){try{return zt.call(Ie);}catch(ae){}try{return Ie+"";}catch(ae){}}return"";}function va(Ie,ae){return Ie===ae||Ie!=Ie&&ae!=ae;}(to&&Wo(new to(new ArrayBuffer(1)))!=ce||ko&&Wo(new ko())!=T||lo&&Wo(lo.resolve())!=j||bt&&Wo(new bt())!=A||ml&&Wo(new ml())!=te)&&(Wo=function(Ie){var ae=ni.call(Ie),Ce=ae==V?Ie.constructor:void 0,Le=Ce?xi(Ce):void 0;if(Le)switch(Le){case lp:return ce;case cp:return T;case pp:return j;case Ql:return A;case Os:return te;}return ae;});var Do=Array.isArray;function cs(Ie){return Ie!=null&&function(ae){return typeof ae=="number"&&ae>-1&&ae%1==0&&ae<=d;}(Ie.length)&&!Tr(Ie);}var Vr=_i||function(){return!1;};function Tr(Ie){var ae=co(Ie)?ni.call(Ie):"";return ae==b||ae==w;}function co(Ie){var ae=typeof Ie;return!!Ie&&(ae=="object"||ae=="function");}function Gr(Ie){return cs(Ie)?function(ae,Ce){var Le=Do(ae)||function(vn){return function(Wi){return function(Xi){return!!Xi&&typeof Xi=="object";}(Wi)&&cs(Wi);}(vn)&&rn.call(vn,"callee")&&(!mi.call(vn,"callee")||ni.call(vn)==f);}(ae)?function(vn,Wi){for(var Xi=-1,Ii=Array(vn);++Xi<vn;)Ii[Xi]=Wi(Xi);return Ii;}(ae.length,String):[],_t=Le.length,wn=!!_t;for(var fn in ae)!Ce&&!rn.call(ae,fn)||wn&&(fn=="length"||_o(fn,_t))||Le.pu
22sh(fn);return Le;}(Ie):function(ae){if(!ta(ae))return so(ae);var Ce=[];for(var Le in Object(ae))rn.call(ae,Le)&&Le!="constructor"&&Ce.push(Le);return Ce;}(Ie);}a.exports=function(Ie){return De(Ie,!0,!0);};},842:function(a,r,l){a=l.nmd(a);var p="__lodash_hash_undefined__",d=1,f=2,h=9007199254740991,g="[object Arguments]",b="[object Array]",w="[object AsyncFunction]",T="[object Boolean]",O="[object Date]",V="[object Error]",j="[object Function]",L="[object GeneratorFunction]",A="[object Map]",J="[object Number]",Q="[object Null]",te="[object Object]",U="[object Promise]",ce="[object Proxy]",W="[object RegExp]",Y="[object Set]",se="[object String]",de="[object Undefined]",Ae="[object WeakMap]",rt="[object ArrayBuffer]",et="[object DataView]",pt=/^\[object .+?Constructor\]$/,ft=/^(?:0|[1-9]\d*)$/,je={};je["[object Float32Array]"]=je["[object Float64Array]"]=je["[object Int8Array]"]=je["[object Int16Array]"]=je["[object Int32Array]"]=je["[object Uint8Array]"]=je["[object Uint8ClampedArray]"]=je["[object Uint16Array]"]=je["[object Uint32Array]"]=!0,je[g]=je[b]=je[rt]=je[T]=je[et]=je[O]=je[V]=je[j]=je[A]=je[J]=je[te]=je[W]=je[Y]=je[se]=je[Ae]=!1;var ke=typeof l.g=="object"&&l.g&&l.g.Object===Object&&l.g,Ke=typeof self=="object"&&self&&self.Object===Object&&self,ve=ke||Ke||Function("return this")(),Se=r&&!r.nodeType&&r,Be=Se&&a&&!a.nodeType&&a,Ze=Be&&Be.exports===Se,kt=Ze&&ke.process,Z=function(){try{return kt&&kt.binding&&kt.binding("util");}catch(ae){}}(),D=Z&&Z.isTypedArray;function F(ae,Ce){for(var Le=-1,_t=ae==null?0:ae.length;++Le<_t;)if(Ce(ae[Le],Le,ae))return!0;return!1;}function fe(ae){var Ce=-1,Le=Array(ae.size);return ae.forEach(function(_t,wn){Le[++Ce]=[wn,_t];}),Le;}function he(ae){var Ce=-1,Le=Array(ae.size);return ae.forEach(function(_t){Le[++Ce]=_t;}),Le;}var xe,nt,Je,Ge=Array.prototype,Ne=Function.prototype,Pe=Object.prototype,Oe=ve["__core-js_shared__"],ct=Ne.toString,ht=Pe.hasOwnProperty,qt=(xe=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+xe:"",zt=Pe.toString,rn=RegExp("^"+ct.call(ht).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ni=Ze?ve.Buffer:void 0,Vn=ve.Symbol,pi=ve.Uint8Array,di=Pe.propertyIsEnumerable,Kn=Ge.splice,Ai=Vn?Vn.toStringTag:void 0,$i=Object.getOwnPropertySymbols,mi=ni?ni.isBuffer:void 0,sn=(nt=Object.keys,Je=Object,function(ae){return nt(Je(ae));}),Pn=Gn(ve,"DataView"),_i=Gn(ve,"Map"),so=Gn(ve,"Promise"),to=Gn(ve,"Set"),ko=Gn(ve,"WeakMap"),lo=Gn(Object,"create"),bt=_o(Pn),ml=_o(_i),Xs=_o(so),lp=_o(to),cp=_o(ko),pp=Vn?Vn.prototype:void 0,Ql=pp?pp.valueOf:void 0;function Os(ae){var Ce=-1,Le=ae==null?0:ae.length;for(this.clear();++Ce<Le;){var _t=ae[Ce];this.set(_t[0],_t[1]);}}function Sa(ae){var Ce=-1,Le=ae==null?0:ae.length;for(this.clear();++Ce<Le;){var _t=ae[Ce];this.set(_t[0],_t[1]);}}function dr(ae){var Ce=-1,Le=ae==null?0:ae.length;for(this.clear();++Ce<Le;){var _t=ae[Ce];this.set(_t[0],_t[1]);}}function Or(ae){var Ce=-1,Le=ae==null?0:ae.length;for(this.__data__=new dr();++Ce<Le;)this.add(ae[Ce]);}function Ca(ae){var Ce=this.__data__=new Sa(ae);this.size=Ce.size;}function Er(ae,Ce){for(var Le=ae.length;Le--;)if(ta(ae[Le][0],Ce))return Le;return-1;}function $r(ae){return ae==null?ae===void 0?de:Q:Ai&&Ai in Object(ae)?function(Ce){var Le=ht.call(Ce,Ai),_t=Ce[Ai];try{Ce[Ai]=void 0;var wn=!0;}catch(vn){}var fn=zt.call(Ce);return wn&&(Le?Ce[Ai]=_t:delete Ce[Ai]),fn;}(ae):function(Ce){return zt.call(Ce);}(ae);}function Si(ae){return co(ae)&&$r(ae)==g;}function Ee(ae,Ce,Le,_t,wn){return ae===Ce||(ae==null||Ce==null||!co(ae)&&!co(Ce)?ae!=ae&&Ce!=Ce:function(fn,vn,Wi,Xi,Ii,kn){var Mi=va(fn),on=va(vn),Xn=Mi?b:gi(fn),Oi=on?b:gi(vn),na=(Xn=Xn==g?te:Xn)==te,Es=(Oi=Oi==g?te:Oi)==te,$a=Xn==Oi;if($a&&Do(fn)){if(!Do(vn))return!1;Mi=!0,na=!1;}if($a&&!na)return kn||(kn=new Ca()),Mi||Gr(fn)?De(fn,vn,Wi,Xi,Ii,kn):function(Di,po,mo,ul,Qp,or,Ts){switch(mo){case et:if(Di.byteLength!=po.byteLength||Di.byteOffset!=po.byteOffset)return!1;Di=Di.buffer,po=po.buffer;case rt:return!(Di.byteLength!=po.byteLength||!or(new pi(Di),new pi(po)));case T:case O:case J:return ta(+Di,+po);
22case V:return Di.name==po.name&&Di.message==po.message;case W:case se:return Di==po+"";case A:var ec=fe;case Y:var dp=ul&d;if(ec||(ec=he),Di.size!=po.size&&!dp)return!1;var mp=Ts.get(Di);if(mp)return mp==po;ul|=f,Ts.set(Di,po);var fl=De(ec(Di),ec(po),ul,Qp,or,Ts);return Ts.delete(Di),fl;case"[object Symbol]":if(Ql)return Ql.call(Di)==Ql.call(po);}return!1;}(fn,vn,Xn,Wi,Xi,Ii,kn);if(!(Wi&d)){var ui=na&&ht.call(fn,"__wrapped__"),ia=Es&&ht.call(vn,"__wrapped__");if(ui||ia){var ps=ui?fn.value():fn,k_=ia?vn.value():vn;return kn||(kn=new Ca()),Ii(ps,k_,Wi,Xi,kn);}}return!!$a&&(kn||(kn=new Ca()),function(Di,po,mo,ul,Qp,or){var Ts=mo&d,ec=dt(Di),dp=ec.length;if(dp!=dt(po).length&&!Ts)return!1;for(var mp=dp;mp--;){var fl=ec[mp];if(!(Ts?fl in po:ht.call(po,fl)))return!1;}var Zu=or.get(Di);if(Zu&&or.get(po))return Zu==po;var Im=!0;or.set(Di,po),or.set(po,Di);for(var Qu=Ts;++mp<dp;){var km=Di[fl=ec[mp]],ed=po[fl];if(ul)var R_=Ts?ul(ed,km,fl,po,Di,or):ul(km,ed,fl,Di,po,or);if(!(R_===void 0?km===ed||Qp(km,ed,mo,ul,or):R_)){Im=!1;break;}Qu||(Qu=fl=="constructor");}if(Im&&!Qu){var ef=Di.constructor,Rm=po.constructor;ef==Rm||!("constructor"in Di)||!("constructor"in po)||typeof ef=="function"&&ef instanceof ef&&typeof Rm=="function"&&Rm instanceof Rm||(Im=!1);}return or.delete(Di),or.delete(po),Im;}(fn,vn,Wi,Xi,Ii,kn));}(ae,Ce,Le,_t,Ee,wn));}function De(ae,Ce,Le,_t,wn,fn){var vn=Le&d,Wi=ae.length,Xi=Ce.length;if(Wi!=Xi&&!(vn&&Xi>Wi))return!1;var Ii=fn.get(ae);if(Ii&&fn.get(Ce))return Ii==Ce;var kn=-1,Mi=!0,on=Le&f?new Or():void 0;for(fn.set(ae,Ce),fn.set(Ce,ae);++kn<Wi;){var Xn=ae[kn],Oi=Ce[kn];if(_t)var na=vn?_t(Oi,Xn,kn,Ce,ae,fn):_t(Xn,Oi,kn,ae,Ce,fn);if(na!==void 0){if(na)continue;Mi=!1;break;}if(on){if(!F(Ce,function(Es,$a){if(ui=$a,!on.has(ui)&&(Xn===Es||wn(Xn,Es,Le,_t,fn)))return on.push($a);var ui;})){Mi=!1;break;}}else if(Xn!==Oi&&!wn(Xn,Oi,Le,_t,fn)){Mi=!1;break;}}return fn.delete(ae),fn.delete(Ce),Mi;}function dt(ae){return function(Ce,Le,_t){var wn=Le(Ce);return va(Ce)?wn:function(fn,vn){for(var Wi=-1,Xi=vn.length,Ii=fn.length;++Wi<Xi;)fn[Ii+Wi]=vn[Wi];return fn;}(wn,_t(Ce));}(ae,Ie,Vi);}function Nt(ae,Ce){var Le,_t,wn=ae.__data__;return((_t=typeof(Le=Ce))=="string"||_t=="number"||_t=="symbol"||_t=="boolean"?Le!=="__proto__":Le===null)?wn[typeof Ce=="string"?"string":"hash"]:wn.map;}function Gn(ae,Ce){var Le=function(_t,wn){return _t?.[wn];}(ae,Ce);return function(_t){return!(!Tr(_t)||function(wn){return!!qt&&qt in wn;}(_t))&&(cs(_t)?rn:pt).test(_o(_t));}(Le)?Le:void 0;}Os.prototype.clear=function(){this.__data__=lo?lo(null):{},this.size=0;},Os.prototype.delete=function(ae){var Ce=this.has(ae)&&delete this.__data__[ae];return this.size-=Ce?1:0,Ce;},Os.prototype.get=function(ae){var Ce=this.__data__;if(lo){var Le=Ce[ae];return Le===p?void 0:Le;}return ht.call(Ce,ae)?Ce[ae]:void 0;},Os.prototype.has=function(ae){var Ce=this.__data__;return lo?Ce[ae]!==void 0:ht.call(Ce,ae);},Os.prototype.set=function(ae,Ce){var Le=this.__data__;return this.size+=this.has(ae)?0:1,Le[ae]=lo&&Ce===void 0?p:Ce,this;},Sa.prototype.clear=function(){this.__data__=[],this.size=0;},Sa.prototype.delete=function(ae){var Ce=this.__data__,Le=Er(Ce,ae);return!(Le<0||(Le==Ce.length-1?Ce.pop():Kn.call(Ce,Le,1),--this.size,0));},Sa.prototype.get=function(ae){var Ce=this.__data__,Le=Er(Ce,ae);return Le<0?void 0:Ce[Le][1];},Sa.prototype.has=function(ae){return Er(this.__data__,ae)>-1;},Sa.prototype.set=function(ae,Ce){var Le=this.__data__,_t=Er(Le,ae);return _t<0?(++this.size,Le.push([ae,Ce])):Le[_t][1]=Ce,this;},dr.prototype.clear=function(){this.size=0,this.__data__={hash:new Os(),map:new(_i||Sa)(),string:new Os()};},dr.prototype.delete=function(ae){var Ce=Nt(this,ae).delete(ae);return this.size-=Ce?1:0,Ce;},dr.prototype.get=function(ae){return Nt(this,ae).get(ae);},dr.prototype.has=function(ae){return Nt(this,ae).has(ae);},dr.prototype.set=function(ae,Ce){var Le=Nt(this,ae),_t=Le.size;return Le.set(ae,Ce),this.size+=Le.size==_t?0:1,this;},Or.prototype.add=Or.prototype.push=function(ae){return this.__data__.set(ae,p),this;},Or.prototype.has=function(ae){return this.__data__.has(ae);}
22,Ca.prototype.clear=function(){this.__data__=new Sa(),this.size=0;},Ca.prototype.delete=function(ae){var Ce=this.__data__,Le=Ce.delete(ae);return this.size=Ce.size,Le;},Ca.prototype.get=function(ae){return this.__data__.get(ae);},Ca.prototype.has=function(ae){return this.__data__.has(ae);},Ca.prototype.set=function(ae,Ce){var Le=this.__data__;if(Le instanceof Sa){var _t=Le.__data__;if(!_i||_t.length<199)return _t.push([ae,Ce]),this.size=++Le.size,this;Le=this.__data__=new dr(_t);}return Le.set(ae,Ce),this.size=Le.size,this;};var Vi=$i?function(ae){return ae==null?[]:(ae=Object(ae),function(Ce,Le){for(var _t=-1,wn=Ce==null?0:Ce.length,fn=0,vn=[];++_t<wn;){var Wi=Ce[_t];Xi=Wi,di.call(ae,Xi)&&(vn[fn++]=Wi);}var Xi;return vn;}($i(ae)));}:function(){return[];},gi=$r;function Wo(ae,Ce){return!!(Ce=Ce??h)&&(typeof ae=="number"||ft.test(ae))&&ae>-1&&ae%1==0&&ae<Ce;}function _o(ae){if(ae!=null){try{return ct.call(ae);}catch(Ce){}try{return ae+"";}catch(Ce){}}return"";}function ta(ae,Ce){return ae===Ce||ae!=ae&&Ce!=Ce;}(Pn&&gi(new Pn(new ArrayBuffer(1)))!=et||_i&&gi(new _i())!=A||so&&gi(so.resolve())!=U||to&&gi(new to())!=Y||ko&&gi(new ko())!=Ae)&&(gi=function(ae){var Ce=$r(ae),Le=Ce==te?ae.constructor:void 0,_t=Le?_o(Le):"";if(_t)switch(_t){case bt:return et;case ml:return A;case Xs:return U;case lp:return Y;case cp:return Ae;}return Ce;});var xi=Si(function(){return arguments;}())?Si:function(ae){return co(ae)&&ht.call(ae,"callee")&&!di.call(ae,"callee");},va=Array.isArray,Do=mi||function(){return!1;};function cs(ae){if(!Tr(ae))return!1;var Ce=$r(ae);return Ce==j||Ce==L||Ce==w||Ce==ce;}function Vr(ae){return typeof ae=="number"&&ae>-1&&ae%1==0&&ae<=h;}function Tr(ae){var Ce=typeof ae;return ae!=null&&(Ce=="object"||Ce=="function");}function co(ae){return ae!=null&&typeof ae=="object";}var Gr=D?function(ae){return function(Ce){return ae(Ce);};}(D):function(ae){return co(ae)&&Vr(ae.length)&&!!je[$r(ae)];};function Ie(ae){return(Ce=ae)!=null&&Vr(Ce.length)&&!cs(Ce)?function(Le,_t){var wn=va(Le),fn=!wn&&xi(Le),vn=!wn&&!fn&&Do(Le),Wi=!wn&&!fn&&!vn&&Gr(Le),Xi=wn||fn||vn||Wi,Ii=Xi?function(on,Xn){for(var Oi=-1,na=Array(on);++Oi<on;)na[Oi]=Xn(Oi);return na;}(Le.length,String):[],kn=Ii.length;for(var Mi in Le)!_t&&!ht.call(Le,Mi)||Xi&&(Mi=="length"||vn&&(Mi=="offset"||Mi=="parent")||Wi&&(Mi=="buffer"||Mi=="byteLength"||Mi=="byteOffset")||Wo(Mi,kn))||Ii.push(Mi);return Ii;}(ae):function(Le){if(wn=(_t=Le)&&_t.constructor,_t!==(typeof wn=="function"&&wn.prototype||Pe))return sn(Le);var _t,wn,fn=[];for(var vn in Object(Le))ht.call(Le,vn)&&vn!="constructor"&&fn.push(vn);return fn;}(ae);var Ce;}a.exports=function(ae,Ce){return Ee(ae,Ce);};},930:function(a,r,l){a=l.nmd(a);var p="__lodash_hash_undefined__",d=9007199254740991,f="[object Arguments]",h="[object AsyncFunction]",g="[object Function]",b="[object GeneratorFunction]",w="[object Null]",T="[object Object]",O="[object Proxy]",V="[object Undefined]",j=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[f]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object Boolean]"]=A["[object DataView]"]=A["[object Date]"]=A["[object Error]"]=A[g]=A["[object Map]"]=A["[object Number]"]=A[T]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object WeakMap]"]=!1;var J,Q,te,U=typeof l.g=="object"&&l.g&&l.g.Object===Object&&l.g,ce=typeof self=="object"&&self&&self.Object===Object&&self,W=U||ce||Function("return this")(),Y=r&&!r.nodeType&&r,se=Y&&a&&!a.nodeType&&a,de=se&&se.exports===Y,Ae=de&&U.process,rt=function(){try{return se&&se.require&&se.require("util").types||Ae&&Ae.binding&&Ae.binding("util");}catch(Ee){}}(),et=rt&&rt.isTypedArray,pt=Array.prototype,ft=Function.prototype,je=Object.prototype,ke=W["__core-js_shared__"],Ke=ft.toString,ve=je.hasOwnProperty,Se=(J=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"",Be=je.toString,Ze=Ke.call(Object),kt=RegExp("^"+Ke.call(ve).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=de?W.Buffer:void 0,D=W.Symbol,F=W.Uint8Array,fe=(Z&&Z.allocUnsafe,Q=Object.getPrototypeOf,te=Object,function(Ee){return Q(te(Ee));}
22),he=Object.create,xe=je.propertyIsEnumerable,nt=pt.splice,Je=D?D.toStringTag:void 0,Ge=function(){try{var Ee=so(Object,"defineProperty");return Ee({},"",{}),Ee;}catch(De){}}(),Ne=Z?Z.isBuffer:void 0,Pe=Math.max,Oe=Date.now,ct=so(W,"Map"),ht=so(Object,"create"),qt=function(){function Ee(){}return function(De){if(!Sa(De))return{};if(he)return he(De);Ee.prototype=De;var dt=new Ee();return Ee.prototype=void 0,dt;};}();function zt(Ee){var De=-1,dt=Ee==null?0:Ee.length;for(this.clear();++De<dt;){var Nt=Ee[De];this.set(Nt[0],Nt[1]);}}function rn(Ee){var De=-1,dt=Ee==null?0:Ee.length;for(this.clear();++De<dt;){var Nt=Ee[De];this.set(Nt[0],Nt[1]);}}function ni(Ee){var De=-1,dt=Ee==null?0:Ee.length;for(this.clear();++De<dt;){var Nt=Ee[De];this.set(Nt[0],Nt[1]);}}function Vn(Ee){var De=this.__data__=new rn(Ee);this.size=De.size;}function pi(Ee,De,dt){(dt!==void 0&&!ml(Ee[De],dt)||dt===void 0&&!(De in Ee))&&Ai(Ee,De,dt);}function di(Ee,De,dt){var Nt=Ee[De];ve.call(Ee,De)&&ml(Nt,dt)&&(dt!==void 0||De in Ee)||Ai(Ee,De,dt);}function Kn(Ee,De){for(var dt=Ee.length;dt--;)if(ml(Ee[dt][0],De))return dt;return-1;}
22function Ai(Ee,De,dt){De=="__proto__"&&Ge?Ge(Ee,De,{configurable:!0,enumerable:!0,value:dt,writable:!0}):Ee[De]=dt;}zt.prototype.clear=function(){this.__data__=ht?ht(null):{},this.size=0;},zt.prototype.delete=function(Ee){var De=this.has(Ee)&&delete this.__data__[Ee];return this.size-=De?1:0,De;},zt.prototype.get=function(Ee){var De=this.__data__;if(ht){var dt=De[Ee];return dt===p?void 0:dt;}return ve.call(De,Ee)?De[Ee]:void 0;},zt.prototype.has=function(Ee){var De=this.__data__;return ht?De[Ee]!==void 0:ve.call(De,Ee);},zt.prototype.set=function(Ee,De){var dt=this.__data__;return this.size+=this.has(Ee)?0:1,dt[Ee]=ht&&De===void 0?p:De,this;},rn.prototype.clear=function(){this.__data__=[],this.size=0;},rn.prototype.delete=function(Ee){var De=this.__data__,dt=Kn(De,Ee);return!(dt<0||(dt==De.length-1?De.pop():nt.call(De,dt,1),--this.size,0));},rn.prototype.get=function(Ee){var De=this.__data__,dt=Kn(De,Ee);return dt<0?void 0:De[dt][1];},rn.prototype.has=function(Ee){return Kn(this.__data__,Ee)>-1;},rn.prototype.set=function(Ee,De){var dt=this.__data__,Nt=Kn(dt,Ee);return Nt<0?(++this.size,dt.push([Ee,De])):dt[Nt][1]=De,this;},ni.prototype.clear=function(){this.size=0,this.__data__={hash:new zt(),map:new(ct||rn)(),string:new zt()};},ni.prototype.delete=function(Ee){var De=_i(this,Ee).delete(Ee);return this.size-=De?1:0,De;},ni.prototype.get=function(Ee){return _i(this,Ee).get(Ee);},ni.prototype.has=function(Ee){return _i(this,Ee).has(Ee);},ni.prototype.set=function(Ee,De){var dt=_i(this,Ee),Nt=dt.size;return dt.set(Ee,De),this.size+=dt.size==Nt?0:1,this;},Vn.prototype.clear=function(){this.__data__=new rn(),this.size=0;},Vn.prototype.delete=function(Ee){var De=this.__data__,dt=De.delete(Ee);return this.size=De.size,dt;},Vn.prototype.get=function(Ee){return this.__data__.get(Ee);},Vn.prototype.has=function(Ee){return this.__data__.has(Ee);},Vn.prototype.set=function(Ee,De){var dt=this.__data__;if(dt instanceof rn){var Nt=dt.__data__;if(!ct||Nt.length<199)return Nt.push([Ee,De]),this.size=++dt.size,this;dt=this.__data__=new ni(Nt);}return dt.set(Ee,De),this.size=dt.size,this;};function $i(Ee){return Ee==null?Ee===void 0?V:w:Je&&Je in Object(Ee)?function(De){var dt=ve.call(De,Je),Nt=De[Je];try{De[Je]=void 0;var Gn=!0;}catch(gi){}var Vi=Be.call(De);return Gn&&(dt?De[Je]=Nt:delete De[Je]),Vi;}(Ee):function(De){return Be.call(De);}(Ee);}function mi(Ee){return dr(Ee)&&$i(Ee)==f;}function sn(Ee,De,dt,Nt,Gn){Ee!==De&&function(Vi,gi,Wo){for(var _o=-1,ta=Object(Vi),xi=Wo(Vi),va=xi.length;va--;){var Do=xi[++_o];if(gi(ta[Do],Do,ta)===!1)break;}}(De,function(Vi,gi){if(Gn||(Gn=new Vn()),Sa(Vi))(function(_o,ta,xi,va,Do,cs,Vr){var Tr=lo(_o,xi),co=lo(ta,xi),Gr=Vr.get(co);if(Gr)pi(_o,xi,Gr);else{var Ie,ae,Ce,Le,_t,wn=cs?cs(Tr,co,xi+"",_o,ta,Vr):void 0,fn=wn===void 0;if(fn){var vn=lp(co),Wi=!vn&&pp(co),Xi=!vn&&!Wi&&Or(co);wn=co,vn||Wi||Xi?lp(Tr)?wn=Tr:dr(_t=Tr)&&cp(_t)?wn=function(Ii,kn){var Mi=-1,on=Ii.length;for(kn||(kn=Array(on));++Mi<on;)kn[Mi]=Ii[Mi];return kn;}(Tr):Wi?(fn=!1,wn=function(Ii,kn){return Ii.slice();}(co)):Xi?(fn=!1,Le=new(Ce=(Ie=co).buffer).constructor(Ce.byteLength),new F(Le).set(new F(Ce)),ae=Le,wn=new Ie.constructor(ae,Ie.byteOffset,Ie.length)):wn=[]:function(Ii){if(!dr(Ii)||$i(Ii)!=T)return!1;var kn=fe(Ii);if(kn===null)return!0;var Mi=ve.call(kn,"constructor")&&kn.constructor;return typeof Mi=="function"&&Mi instanceof Mi&&Ke.call(Mi)==Ze;}(co)||Xs(co)?(wn=Tr,Xs(Tr)?wn=function(Ii){return function(kn,Mi,on,Xn){var Oi=!on;on||(on={});for(var na=-1,Es=Mi.length;++na<Es;){var $a=Mi[na],ui=void 0;ui===void 0&&(ui=kn[$a]),Oi?Ai(on,$a,ui):di(on,$a,ui);}return on;}(Ii,Ca(Ii));}(Tr):Sa(Tr)&&!Ql(Tr)||(wn=function(Ii){return typeof Ii.constructor!="function"||ko(Ii)?{}:qt(fe(Ii));}(co))):fn=!1;}fn&&(Vr.set(co,wn),Do(wn,co,va,cs,Vr),Vr.delete(co)),pi(_o,xi,wn);}})(Ee,De,gi,dt,sn,Nt,Gn);else{var Wo=Nt?Nt(lo(Ee,gi),Vi,gi+"",Ee,De,Gn):void 0;Wo===void 0&&(Wo=Vi),pi(Ee,gi,Wo);}},Ca);}var Pn=Ge?function(Ee,De){return Ge(Ee,"toString",{configurable:!0,enumerable:!1,value:(dt=De,function(){return dt;}),writable:!0});var dt;}:Si;function _i(Ee,De){var dt,Nt,Gn=Ee.__data__;return((Nt=typeof(dt=De))=="string"||Nt=="number"||Nt=="symbol"||Nt=="boolean"?dt!=="__proto__":dt===null)?Gn[typeof De=="string"?"string":"hash"]:Gn.map;}function so(Ee,De){var dt=function(Nt,Gn){return Nt?.[Gn];}(Ee,De);return function(Nt){return!(!Sa(Nt)||function(Gn){return!!Se&&Se in Gn;}(Nt))&&(Ql(Nt)?kt:j).test(function(Gn){if(Gn!=null){try{return Ke.call(Gn);}catch(Vi){}try{return Gn+"";}catch(Vi){}}return"";}(Nt));}(dt)?dt:void 0;}function to(Ee,De){var dt=typeof Ee;return!!(De=De??d)&&(dt=="number"||dt!="symbol"&&L.test(Ee))&&Ee>-1&&Ee%1==0&&Ee<De;}function ko(Ee){var De=Ee&&Ee.constructor;return Ee===(typeof De=="function"&&De.prototype||je);}function lo(Ee,De){if((De!=="constructor"||typeof Ee[De]!="function")&&De!="__proto__")return Ee[De];}var bt=function(Ee){var De=0,dt=0;return function(){var Nt=Oe(),Gn=16-(Nt-dt);if(dt=Nt,Gn>0){if(++De>=800)return arguments[0];}else De=0;return Ee.apply(void 0,arguments);};}(Pn);function ml(Ee,De){return Ee===De||Ee!=Ee&&De!=De;}var Xs=mi(function(){return arguments;}())?mi:function(Ee){return dr(Ee)&&ve.call(Ee,"callee")&&!xe.call(Ee,"callee");},lp=Array.isArray;function cp(Ee){return Ee!=null&&Os(Ee.length)&&!Ql(Ee);}var pp=Ne||function(){return!1;};function Ql(Ee){if(!Sa(Ee))return!1;var De=$i(Ee);return De==g||De==b||De==h||De==O;}function Os(Ee){return typeof Ee=="number"&&Ee>-1&&Ee%1==0&&Ee<=d;}function Sa(Ee){var De=typeof Ee;return Ee!=null&&(De=="object"||De=="function");}function dr(Ee){return Ee!=null&&typeof Ee=="object";}var Or=et?function(Ee){return function(De){return Ee(De);};}(et):function(Ee){return dr(Ee)&&Os(Ee.length)&&!!A[$i(Ee)];};function Ca(Ee){return cp(Ee)?function(De,dt){var Nt=lp(De),Gn=!Nt&&Xs(De),Vi=!Nt&&!Gn&&pp(De),gi=!Nt&&!Gn&&
22!Vi&&Or(De),Wo=Nt||Gn||Vi||gi,_o=Wo?function(va,Do){for(var cs=-1,Vr=Array(va);++cs<va;)Vr[cs]=Do(cs);return Vr;}(De.length,String):[],ta=_o.length;for(var xi in De)!dt&&!ve.call(De,xi)||Wo&&(xi=="length"||Vi&&(xi=="offset"||xi=="parent")||gi&&(xi=="buffer"||xi=="byteLength"||xi=="byteOffset")||to(xi,ta))||_o.push(xi);return _o;}(Ee,!0):function(De){if(!Sa(De))return function(Vi){var gi=[];if(Vi!=null)for(var Wo in Object(Vi))gi.push(Wo);return gi;}(De);var dt=ko(De),Nt=[];for(var Gn in De)(Gn!="constructor"||!dt&&ve.call(De,Gn))&&Nt.push(Gn);return Nt;}(Ee);}var Er,$r=(Er=function(Ee,De,dt){sn(Ee,De,dt);},function(Ee,De){return bt(function(dt,Nt,Gn){return Nt=Pe(Nt===void 0?dt.length-1:Nt,0),function(){for(var Vi=arguments,gi=-1,Wo=Pe(Vi.length-Nt,0),_o=Array(Wo);++gi<Wo;)_o[gi]=Vi[Nt+gi];gi=-1;for(var ta=Array(Nt+1);++gi<Nt;)ta[gi]=Vi[gi];return ta[Nt]=Gn(_o),function(xi,va,Do){switch(Do.length){case 0:return xi.call(va);case 1:return xi.call(va,Do[0]);case 2:return xi.call(va,Do[0],Do[1]);case 3:return xi.call(va,Do[0],Do[1],Do[2]);}return xi.apply(va,Do);}(dt,this,ta);};}(Ee,De,Si),Ee+"");}(function(Ee,De){var dt=-1,Nt=De.length,Gn=Nt>1?De[Nt-1]:void 0,Vi=Nt>2?De[2]:void 0;for(Gn=Er.length>3&&typeof Gn=="function"?(Nt--,Gn):void 0,Vi&&function(Wo,_o,ta){if(!Sa(ta))return!1;var xi=typeof _o;return!!(xi=="number"?cp(ta)&&to(_o,ta.length):xi=="string"&&_o in ta)&&ml(ta[_o],Wo);}(De[0],De[1],Vi)&&(Gn=Nt<3?void 0:Gn,Nt=1),Ee=Object(Ee);++dt<Nt;){var gi=De[dt];gi&&Er(Ee,gi,dt);}return Ee;}));function Si(Ee){return Ee;}a.exports=$r;},382:function(a,r,l){"use strict";Object.defineProperty(r,"__esModule",{value:!0});let p=l(861),d=l(842);var f;(function(h){h.compose=function(g={},b={},w=!1){typeof g!="object"&&(g={}),typeof b!="object"&&(b={});let T=p(b);w||(T=Object.keys(T).reduce((O,V)=>(T[V]!=null&&(O[V]=T[V]),O),{}));for(let O in g)g[O]!==void 0&&b[O]===void 0&&(T[O]=g[O]);return Object.keys(T).length>0?T:void 0;},h.diff=function(g={},b={}){typeof g!="object"&&(g={}),typeof b!="object"&&(b={});let w=Object.keys(g).concat(Object.keys(b)).reduce((T,O)=>(d(g[O],b[O])||(T[O]=b[O]===void 0?null:b[O]),T),{});return Object.keys(w).length>0?w:void 0;},h.invert=function(g={},b={}){g=g||{};let w=Object.keys(b).reduce((T,O)=>(b[O]!==g[O]&&g[O]!==void 0&&(T[O]=b[O]),T),{});return Object.keys(g).reduce((T,O)=>(g[O]!==b[O]&&b[O]===void 0&&(T[O]=null),T),w);},h.transform=function(g,b,w=!1){if(typeof g!="object")return b;if(typeof b!="object")return;if(!w)return b;let T=Object.keys(b).reduce((O,V)=>(g[V]===void 0&&(O[V]=b[V]),O),{});return Object.keys(T).length>0?T:void 0;};})(f||(f={})),r.default=f;},32:function(a,r,l){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.AttributeMap=r.OpIterator=r.Op=void 0;let p=l(386),d=l(861),f=l(842),h=l(382);r.AttributeMap=h.default;let g=l(427);r.Op=g.default;let b=l(505);r.OpIterator=b.default;let w="\0",T=(V,j)=>{if(typeof V!="object"||V===null)throw new Error("cannot retain a "+typeof V);if(typeof j!="object"||j===null)throw new Error("cannot retain a "+typeof j);let L=Object.keys(V)[0];if(!L||L!==Object.keys(j)[0])throw new Error(`embed types not matched: ${L} != ${Object.keys(j)[0]}`);return[L,V[L],j[L]];};class O{constructor(j){Array.isArray(j)?this.ops=j:j!=null&&Array.isArray(j.ops)?this.ops=j.ops:this.ops=[];}static registerEmbed(j,L){this.handlers[j]=L;}static unregisterEmbed(j){delete this.handlers[j];}static getHandler(j){let L=this.handlers[j];if(!L)throw new Error(`no handlers for embed type "${j}"`);return L;}insert(j,L){let A={};return typeof j=="string"&&j.length===0?this:(A.insert=j,L!=null&&typeof L=="object"&&Object.keys(L).length>0&&(A.attributes=L),this.push(A));}delete(j){return j<=0?this:this.push({delete:j});}retain(j,L){if(typeof j=="number"&&j<=0)return this;let A={retain:j};return L!=null&&typeof L=="object"&&Object.keys(L).length>0&&(A.attributes=L),this.push(A);}push(j){let L=this.ops.length,A=this.ops[L-1];if(j=d(j),typeof A=="object"){if(typeof j.delete=="number"&&typeof A.delete=="number")return this.ops[L-1]={delete:A.delete+j.delete},this;if(typeof A.delete=="number"&&j.insert!=null&&(L-=1,A=this.ops[L-1],typeof A!="object"))return this.ops.unshift(j),this;if(f(j.attributes,A.attributes)){if(typeof j.insert=="string"&&typeof A.insert=="string")return this.ops[L-1]={insert:A.insert+j.insert},typeof j.attributes=="object"&&(this.ops[L-1].attributes=j.attributes),this;if(typeof j.retain=="number"&&typeof A.retain=="number")return this.ops[L-1]={retain:A.retain+j.retain},typeof j.attributes=="object"&&(this.ops[L-1].attributes=j.attributes),this;}}return L===this.ops.length?this.ops.push(j):this.ops.splice(L,0,j),this;}chop(){let j=this.ops[this.ops.length-1];return j&&typeof j.retain=="number"&&!j.attributes&&this.ops.pop(),this;}filter(j){return this.ops.filter(j);}forEach(j){this.ops.forEach(j);}map(j){return this.ops.map(j);}partition(j){let L=[],A=[];return this.forEach(J=>{(j(J)?L:A).push(J);}),[L,A];}reduce(j,L){return this.ops.reduce(j,L);}changeLength(){return this.reduce((j,L)=>L.insert?j+g.default.length(L):L.delete?j-L.delete:j,0);}length(){return this.reduce((j,L)=>j+g.default.length(L),0);}slice(j=0,L=1/0){let A=[],J=new b.default(this.ops),Q=0;for(;Q<L&&J.hasNext();){let te;Q<j?te=J.next(j-Q):(te=J.next(L-Q),A.push(te)),Q+=g.default.length(te);}return new O(A);}compose(j){let L=new b.default(this.ops),A=new b.default(j.ops),J=[],Q=A.peek();if(Q!=null&&typeof Q.retain=="number"&&Q.attributes==null){let U=Q.retain;for(;L.peekType()==="insert"&&L.peekLength()<=U;)U-=L.peekLength(),J.push(L.next());Q.retain-U>0&&A.next(Q.retain-U);}let te=new O(J);for(;L.hasNext()||A.hasNext();
22)if(A.peekType()==="insert")te.push(A.next());else if(L.peekType()==="delete")te.push(L.next());else{let U=Math.min(L.peekLength(),A.peekLength()),ce=L.next(U),W=A.next(U);if(W.retain){let Y={};if(typeof ce.retain=="number")Y.retain=typeof W.retain=="number"?U:W.retain;else if(typeof W.retain=="number")ce.retain==null?Y.insert=ce.insert:Y.retain=ce.retain;else{let de=ce.retain==null?"insert":"retain",[Ae,rt,et]=T(ce[de],W.retain),pt=O.getHandler(Ae);Y[de]={[Ae]:pt.compose(rt,et,de==="retain")};}let se=h.default.compose(ce.attributes,W.attributes,typeof ce.retain=="number");if(se&&(Y.attributes=se),te.push(Y),!A.hasNext()&&f(te.ops[te.ops.length-1],Y)){let de=new O(L.rest());return te.concat(de).chop();}}else typeof W.delete=="number"&&(typeof ce.retain=="number"||typeof ce.retain=="object"&&ce.retain!==null)&&te.push(W);}return te.chop();}concat(j){let L=new O(this.ops.slice());return j.ops.length>0&&(L.push(j.ops[0]),L.ops=L.ops.concat(j.ops.slice(1))),L;}diff(j,L){if(this.ops===j.ops)return new O();let A=[this,j].map(ce=>ce.map(W=>{if(W.insert!=null)return typeof W.insert=="string"?W.insert:w;throw new Error("diff() called "+(ce===j?"on":"with")+" non-document");}).join("")),J=new O(),Q=p(A[0],A[1],L,!0),te=new b.default(this.ops),U=new b.default(j.ops);return Q.forEach(ce=>{let W=ce[1].length;for(;W>0;){let Y=0;switch(ce[0]){case p.INSERT:Y=Math.min(U.peekLength(),W),J.push(U.next(Y));break;case p.DELETE:Y=Math.min(W,te.peekLength()),te.next(Y),J.delete(Y);break;case p.EQUAL:Y=Math.min(te.peekLength(),U.peekLength(),W);let se=te.next(Y),de=U.next(Y);f(se.insert,de.insert)?J.retain(Y,h.default.diff(se.attributes,de.attributes)):J.push(de).delete(Y);}W-=Y;}}),J.chop();}eachLine(j,L=` 23`){let A=new b.default(this.ops),J=new O(),Q=0;for(;A.hasNext();){if(A.peekType()!=="insert")return;let te=A.peek(),U=g.default.length(te)-A.peekLength(),ce=typeof te.insert=="string"?te.insert.indexOf(L,U)-U:-1;if(ce<0)J.push(A.next());else if(ce>0)J.push(A.next(ce));else{if(j(J,A.next(1).attributes||{},Q)===!1)return;Q+=1,J=new O();}}J.length()>0&&j(J,{},Q);}invert(j){let L=new O();return this.reduce((A,J)=>{if(J.insert)L.delete(g.default.length(J));else{if(typeof J.retain=="number"&&J.attributes==null)return L.retain(J.retain),A+J.retain;if(J.delete||typeof J.retain=="number"){let Q=J.delete||J.retain;return j.slice(A,A+Q).forEach(te=>{J.delete?L.push(te):J.retain&&J.attributes&&L.retain(g.default.length(te),h.default.invert(J.attributes,te.attributes));}),A+Q;}if(typeof J.retain=="object"&&J.retain!==null){let Q=j.slice(A,A+1),te=new b.default(Q.ops).next(),[U,ce,W]=T(J.retain,te.insert),Y=O.getHandler(U);return L.retain({[U]:Y.invert(ce,W)},h.default.invert(J.attributes,te.attributes)),A+1;}}return A;},0),L.chop();}transform(j,L=!1){if(L=!!L,typeof j=="number")return this.transformPosition(j,L);let A=j,J=new b.default(this.ops),Q=new b.default(A.ops),te=new O();for(;J.hasNext()||Q.hasNext();)if(J.peekType()!=="insert"||!L&&Q.peekType()==="insert"){if(Q.peekType()==="insert")te.push(Q.next());else{let U=Math.min(J.peekLength(),Q.peekLength()),ce=J.next(U),W=Q.next(U);if(ce.delete)continue;if(W.delete)te.push(W);else{let Y=ce.retain,se=W.retain,de=typeof se=="object"&&se!==null?se:U;if(typeof Y=="object"&&Y!==null&&typeof se=="object"&&se!==null){let Ae=Object.keys(Y)[0];if(Ae===Object.keys(se)[0]){let rt=O.getHandler(Ae);rt&&(de={[Ae]:rt.transform(Y[Ae],se[Ae],L)});}}te.retain(de,h.default.transform(ce.attributes,W.attributes,L));}}}else te.retain(g.default.length(J.next()));return te.chop();}transformPosition(j,L=!1){L=!!L;let A=new b.default(this.ops),J=0;for(;A.hasNext()&&J<=j;){let Q=A.peekLength(),te=A.peekType();A.next(),te!=="delete"?(te==="insert"&&(J<j||!L)&&(j+=Q),J+=Q):j-=Math.min(Q,j-J);}return j;}}O.Op=g.default,O.OpIterator=b.default,O.AttributeMap=h.default,O.handlers={},r.default=O,a.exports=O,a.exports.default=O;},427:function(a,r){"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),function(p){p.length=function(d){return typeof d.delete=="number"?d.delete:typeof d.retain=="number"?d.retain:typeof d.retain=="object"&&d.retain!==null?1:typeof d.insert=="string"?d.insert.length:1;};}(l||(l={})),r.default=l;},505:function(a,r,l){"use strict";
23Object.defineProperty(r,"__esModule",{value:!0});let p=l(427);r.default=class{constructor(d){this.ops=d,this.index=0,this.offset=0;}hasNext(){return this.peekLength()<1/0;}next(d){d||(d=1/0);let f=this.ops[this.index];if(f){let h=this.offset,g=p.default.length(f);if(d>=g-h?(d=g-h,this.index+=1,this.offset=0):this.offset+=d,typeof f.delete=="number")return{delete:d};{let b={};return f.attributes&&(b.attributes=f.attributes),typeof f.retain=="number"?b.retain=d:typeof f.retain=="object"&&f.retain!==null?b.retain=f.retain:typeof f.insert=="string"?b.insert=f.insert.substr(h,d):b.insert=f.insert,b;}}return{retain:1/0};}peek(){return this.ops[this.index];}peekLength(){return this.ops[this.index]?p.default.length(this.ops[this.index])-this.offset:1/0;}peekType(){let d=this.ops[this.index];return d?typeof d.delete=="number"?"delete":typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null?"retain":"insert":"retain";}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let d=this.offset,f=this.index,h=this.next(),g=this.ops.slice(this.index);return this.offset=d,this.index=f,[h].concat(g);}}return[];}};},912:function(a){"use strict";a.exports=n;}},e={};function i(a){var r=e[a];if(r!==void 0)return r.exports;var l=e[a]={id:a,loaded:!1,exports:{}};return t[a](l,l.exports,i),l.loaded=!0,l.exports;}i.n=function(a){var r=a&&a.__esModule?function(){return a.default;}:function(){return a;};return i.d(r,{a:r}),r;},i.d=function(a,r){for(var l in r)i.o(r,l)&&!i.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:r[l]});},i.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")();}catch(a){if(typeof window=="object")return window;}}(),i.o=function(a,r){return Object.prototype.hasOwnProperty.call(a,r);},i.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a;};var o={};return function(){"use strict";i.d(o,{default:function(){return z9;}});var a=i(912),r=i.n(a),l=i(32),p=i.n(l),d='<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M36 19H12" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 9H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 29H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M36 39H12" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',f='<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M42 9H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M34 19H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 29H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M34 39H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',h='<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M42 9H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 19H14" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 29H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 39H14" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>';let g=["data-row","width","height","colspan","rowspan","style"],b={"border-style":"none","border-color":"","border-width":"","background-color":"",width:"",height:"",padding:"","text-align":"left","vertical-align":"middle"},w=["border-style","border-color","border-width","background-color","width","height","padding","text-align","vertical-align"],T=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","currentcolor","currentcolor","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","dar
23kviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","transparent","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],O=["border-style","border-color","border-width","background-color","width","height","align"],V=r().import("formats/list"),j=r().import("blots/container"),L=["colspan","rowspan"];
23class A extends j{static create(_){let C=super.create();for(let P of L)_[P]=="1"&&delete _[P];let y=Object.keys(_);for(let P of y)P==="data-row"?C.setAttribute(P,_[P]):P==="cellId"?C.setAttribute("data-cell",_[P]):C.setAttribute(`data-${P}`,_[P]);return C;}format(_,C){return this.wrap(_,C);}static formats(_){let C=g.reduce((y,P)=>{let I=P.includes("data")?P:`data-${P}`;return _.hasAttribute(I)&&(y[P]=_.getAttribute(I)),y;},{});C.cellId=_.getAttribute("data-cell");for(let y of L)C[y]||(C[y]="1");return C;}formats(){let _=this.statics.formats(this.domNode,this.scroll);return{[this.statics.blotName]:_};}}A.blotName="table-list-container",A.className="table-list-container",A.tagName="OL";class J extends V{format(_,C,y){let P=this.formats()[this.statics.blotName];if(_==="list"){let[I,B]=this.getCellFormats(this.parent);if(!C||C===P)return this.setReplace(y,I),this.replaceWith(Je.blotName,B);if(C!==P)return this.replaceWith(this.statics.blotName,C);}else if(_===A.blotName){typeof C=="string"&&(C={cellId:C});let[I,B,H]=this.getCorrectCellFormats(C);this.wrap(H,I),this.wrap(_,Object.assign(Object.assign({},I),{cellId:B}));}else{if(_==="header"){let[I,B]=this.getCellFormats(this.parent);return this.setReplace(y,I),this.replaceWith("table-header",{cellId:B,value:C});}if(!C||_!==Ne.blotName&&_!==Pe.blotName){if(_!==this.statics.blotName||C)super.format(_,C);else{let[,I]=this.getCellFormats(this.parent);this.replaceWith(Je.blotName,I);}}else{let I=this.getListContainer(this.parent);if(!I)return;let B=I.formats()[I.statics.blotName];this.wrap(_,C),this.wrap(A.blotName,Object.assign(Object.assign({},B),C));}}}getCellFormats(_){return de(Ke(_));}getCorrectCellFormats(_){let C=Ke(this.parent);if(C){let y=C.statics.blotName,[P,I]=de(C),B=Object.assign(Object.assign({},P),_),H=B.cellId||I;return delete B.cellId,[B,H,y];}{let y=_.cellId,P=Object.assign({},_);return delete P.cellId,[P,y,Ne.blotName];}}getListContainer(_){for(;_;){if(_.statics.blotName===A.blotName)return _;_=_.parent;}return null;}static register(){r().register(A);}setReplace(_,C){_?this.parent.replaceWith(Ne.blotName,C):this.wrap(Ne.blotName,C);}}J.blotName="table-list",J.className="table-list",r().register({"formats/table-list":J},!0),A.allowedChildren=[J],J.requiredContainer=A;let Q=r().import("formats/header");class te extends Q{static create(_){let{cellId:C,value:y}=_,P=super.create(y);return P.setAttribute("data-cell",C),P;}format(_,C,y){if(_==="header"){let P=this.statics.formats(this.domNode).value,I=this.domNode.getAttribute("data-cell");P!=C&&C?super.format("table-header",{cellId:I,value:C}):this.replaceWith(Je.blotName,I);}else{if(_==="list"){let[P,I,B]=this.getCellFormats(this.parent);return y?this.wrap(A.blotName,Object.assign(Object.assign({},P),{cellId:I})):this.wrap(B,P),this.replaceWith("table-list",C);}if(C&&(_===Ne.blotName||_===Pe.blotName))return this.wrap(_,C);if(_!==this.statics.blotName||C)super.format(_,C);else{let P=this.domNode.getAttribute("data-cell");this.replaceWith(Je.blotName,P);}}}static formats(_){return{cellId:_.getAttribute("data-cell"),value:this.tagName.indexOf(_.tagName)+1};}formats(){let _=this.attributes.values(),C=this.statics.formats(this.domNode,this.scroll);return C!=null&&(_[this.statics.blotName]=C),_;}getCellFormats(_){let C=Ke(_);return[...de(C),C.statics.blotName];}}te.blotName="table-header",te.className="ql-table-header",r().register({"formats/table-header":te},!0);var U=te;function ce(v){if(typeof v!="string"||!v||v.endsWith("%"))return v;let _=v.replace(/\d+\.?\d*/,""),C=v.slice(0,-_.length);return`${Math.round(parseFloat(C))}${_}`;}function W(v){let _=document.createElement("div");return _.innerText=v,_.classList.add("ql-table-tooltip","ql-hidden"),_;}function Y(v){return v.replace(/mso.*?;/g,"");}function se(v){let[_]=v.descendant(Je),[C]=v.descendant(A),[y]=v.descendant(U);return _||C||y;}function de(v){let _=Ne.formats(v.domNode),C=se(v);if(C)return[_,Ae(C.formats()[C.statics.blotName])];{let y=_["data-row"].split("-")[1];return[_,`cell-${y}`];}}function Ae(v){return v instanceof Object?v.cellId:v;}function rt(v,_){return v.closest(_);}function et(v,_){return{left:Math.min(v.left,_.left),right:Math.max(v.right,_.right),top:Math.min(v.top,_.top),bottom:Math.max(v.bottom,_.bottom)};}function pt(v,_,C){let y=r().find(_).descendants(rn),P=0;return y.reduce((I,B)=>{let{left:H,width:ie}=ke(B.domNode,C);return P=P||H,P+2>
23=v.left&&P-2+ie<=v.right&&I.push(B.domNode),P+=ie,I;},[]);}function ft(v,_,C,y){return r().find(_).descendants(Ne).reduce((P,I)=>{let{left:B,top:H,width:ie,height:pe}=ke(I.domNode,C);switch(y){case"column":(B+2>=v.left&&B-2+ie<=v.right||B+2<v.right&&v.right<B-2+ie||v.left>B+2&&v.left<B-2+ie)&&P.push(I.domNode);break;case"row":break;default:B+2>=v.left&&B-2+ie<=v.right&&H+2>=v.top&&H-2+pe<=v.bottom&&P.push(I.domNode);}return P;},[]);}function je(v){return v.replace(/data-(?!list)[a-z]+="[^"]*"/g,"").replace(/class="[^"]*"/g,_=>_.replace(/ql-cell-[^"]*/g,"").replace(/ql-table-[^"]*/,"").replace(/table-list(?:[^"]*)?/g,"")).replace(/class="\s*"/g,"");}function ke(v,_){let C=v.getBoundingClientRect(),y=_.getBoundingClientRect(),P=C.left-y.left-_.scrollLeft,I=C.top-y.top-_.scrollTop,B=C.width,H=C.height;return{left:P,top:I,width:B,height:H,right:P+B,bottom:I+H};}function Ke(v){for(;v;){if(v.statics.blotName===Ne.blotName||v.statics.blotName===Pe.blotName)return v;v=v.parent;}return null;}function ve(){let v=document.querySelector(".ql-editor"),{clientWidth:_}=v,C=getComputedStyle(v);return _-~~C.getPropertyValue("padding-left")-~~C.getPropertyValue("padding-right");}function Se(v,_){return _?`${(v/ve()*100).toFixed(2)}%`:`${v}px`;}function Be(v,_){let C=getComputedStyle(v),y=v.style;return _.reduce((P,I)=>{return P[I]=(B=y.getPropertyValue(I)||C.getPropertyValue(I)).startsWith("rgba(")?function(H){H=H.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"");let ie=Math.round(+H[0]),pe=Math.round(+H[1]),ue=Math.round(+H[2]),K=Math.round(255*+H[3]).toString(16).toUpperCase().padStart(2,"0");return"#"+((1<<24)+(ie<<16)+(pe<<8)+ue).toString(16).slice(1)+K;}(B):B.startsWith("rgb(")?`#${(B=B.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"")).split(",").map(H=>`00${parseInt(H,10).toString(16)}`.slice(-2)).join("")}`:B,P;var B;},{});}function Ze(v){return!v||!!/^#([A-Fa-f0-9]{3,6})$/.test(v)||!!/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/.test(v)||function(_){for(let C of T)if(C===_)return!0;return!1;}(v);}function kt(v){if(!v)return!0;let _=v.replace(/\d+\.?\d*/,"");return!_||_==="px"||_==="em"||_==="%"||!/[a-z]/.test(_)&&!isNaN(parseFloat(_));}function Z(v,_){for(let C in _)v.setAttribute(C,_[C]);}function D(v,_){let C=v.style;if(C)for(let y in _)C.setProperty(y,_[y]);else v.setAttribute("style",_.toString());}function F(v,_,C){let y=r().find(v);if(!y)return;let P=y.isPercent();if(P&&!C)return;let I=y.colgroup(),B=y.temporary();if(I){if(P){let H=0,ie=I.domNode.querySelectorAll("col");for(let pe of ie){let ue=pe.style.getPropertyValue("width");H+=ue?parseFloat(ue):0;}D(B.domNode,{width:`${H}%`});}else{let H=0,ie=I.domNode.querySelectorAll("col");for(let pe of ie)H+=~~pe.getAttribute("width");D(B.domNode,{width:Se(H,P)});}}else D(B.domNode,{width:Se(_.width+C,P)});}let fe=r().import("blots/block"),he=r().import("blots/container"),xe=["border","cellspacing","style","data-class"],nt=["width"];class Je extends fe{static create(_){let C=super.create();return _?C.setAttribute("data-cell",_):C.setAttribute("data-cell",pi()),C;}format(_,C){let y=this.formats()[this.statics.blotName];if(_===Ne.blotName&&C)return this.wrap(Oe.blotName),this.wrap(_,C);if(_===Pe.blotName&&C)return this.wrap(ct.blotName),this.wrap(_,C);if(_===Vn.blotName)this.wrap(_,C);else{if(_==="header")return this.replaceWith("table-header",{cellId:y,value:C});if(_==="table-header"&&C)return this.wrapTableCell(this.parent),this.replaceWith(_,C);if(_==="list"||_==="table-list"&&C){let P=this.getCellFormats(this.parent);return this.wrap(A.blotName,Object.assign(Object.assign({},P),{cellId:y})),this.replaceWith("table-list",C);}super.format(_,C);}}formats(){let _=this.attributes.values(),C=this.domNode.getAttribute("data-cell");return C!=null&&(_[this.statics.blotName]=C),_;}getCellFormats(_){let C=Ke(_);if(!C)return{};let[y]=de(C);return y;}wrapTableCell(_){let C=Ke(_);if(!C)return;let[y]=de(C);this.wrap(C.statics.blotName,y);}}Je.blotName="table-cell-block",Je.className="ql-table-block",Je.tagName="P";class Ge extends Je{}Ge.blotName="table-th-block",Ge.className="table-th-block",Ge.tagName="P";class Ne extends he{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null&&this.next.children.head.formats){let _=this.children.head.formats()[this.children.head.statics.blotName],C=this.children.tail.formats()[this.children.tail.statics.blotName],y=this.next.children.head.formats()[this.next.children.head.statics.blotName],P=this.next.children.tail.formats()[this.next.children.tail.statics.blotName],I=Ae(_),B=Ae(C),H=Ae(y),ie=Ae(P);return I===B&&I===H&&I===ie;}return!1;}static create(_){let C=super.create(),y=Object.keys(_);for(let P of y)_[P]&&C.setAttribute(P,_[P]);return C;}static formats(_){let C=this.getEmptyRowspan(_),y=g.reduce((P,I)=>
23(_.hasAttribute(I)&&(P[I]=I==="rowspan"&&C?""+(~~_.getAttribute(I)-C):Y(_.getAttribute(I))),P),{});return this.hasColgroup(_)&&(delete y.width,y.style&&(y.style=y.style.replace(/width.*?;/g,""))),y;}formats(){let _=this.statics.formats(this.domNode,this.scroll);return{[this.statics.blotName]:_};}static getEmptyRowspan(_){let C=_.parentElement.nextElementSibling,y=0;for(;C&&C.tagName==="TR"&&!C.innerHTML.replace(/\s/g,"");)y++,C=C.nextElementSibling;return y;}static hasColgroup(_){for(;_&&_.tagName!=="TBODY";)_=_.parentElement;for(;_;){if(_.tagName==="COLGROUP")return!0;_=_.previousElementSibling;}return!1;}html(){return this.domNode.outerHTML.replace(/<(ol)[^>]*><li[^>]* data-list="bullet">(?:.*?)<\/li><\/(ol)>/gi,(_,C,y)=>_.replace(C,"ul").replace(y,"ul"));}row(){return this.parent;}rowOffset(){return this.row()?this.row().rowOffset():-1;}setChildrenId(_){this.children.forEach(C=>{C.domNode.setAttribute("data-cell",_);});}table(){let _=this.parent;for(;_!=null&&_.statics.blotName!=="table-container";)_=_.parent;return _;}optimize(_){super.optimize(_),this.children.forEach(C=>{if(C.next!=null&&Ae(C.formats()[C.statics.blotName])!==Ae(C.next.formats()[C.next.statics.blotName])){let y=this.splitAfter(C);y&&y.optimize(),this.prev&&this.prev.optimize();}});}}Ne.blotName="table-cell",Ne.tagName="TD";class Pe extends Ne{}Pe.blotName="table-th",Pe.tagName="TH";class Oe extends he{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null&&this.next.children.head.formats){let _=this.children.head.formats()[this.children.head.statics.blotName],C=this.children.tail.formats()[this.children.tail.statics.blotName],y=this.next.children.head.formats()[this.next.children.head.statics.blotName],P=this.next.children.tail.formats()[this.next.children.tail.statics.blotName];return _["data-row"]===C["data-row"]&&_["data-row"]===y["data-row"]&&_["data-row"]===P["data-row"];}return!1;}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1;}}Oe.blotName="table-row",Oe.tagName="TR";class ct extends Oe{}ct.blotName="table-th-row",ct.tagName="TR";class ht extends he{}ht.blotName="table-body",ht.tagName="TBODY";class qt extends ht{}qt.blotName="table-thead",qt.tagName="THEAD";class zt extends fe{static create(_){let C=super.create(),y=Object.keys(_),P=Vn.defaultClassName;for(let I of y)I!=="data-class"||~_[I].indexOf(P)?C.setAttribute(I,_[I]):C.setAttribute(I,`${P} ${_[I]}`);return C;}static formats(_){return xe.reduce((C,y)=>(_.hasAttribute(y)&&(C[y]=_.getAttribute(y)),C),{});}formats(){let _=this.statics.formats(this.domNode,this.scroll);return{[this.statics.blotName]:_};}optimize(..._){if(this.statics.requiredContainer&&this.parent instanceof this.statics.requiredContainer){let C=this.formats()[this.statics.blotName];for(let y of xe)C[y]?y==="data-class"?this.parent.domNode.setAttribute("class",C[y]):this.parent.domNode.setAttribute(y,C[y]):this.parent.domNode.removeAttribute(y);}super.optimize(..._);}}zt.blotName="table-temporary",zt.className="ql-table-temporary",zt.tagName="temporary";class rn extends fe{static create(_){let C=super.create(),y=Object.keys(_);for(let P of y)C.setAttribute(P,_[P]);return C;}static formats(_){return nt.reduce((C,y)=>(_.hasAttribute(y)&&(C[y]=_.getAttribute(y)),C),{});}formats(){let _=this.statics.formats(this.domNode,this.scroll);return{[this.statics.blotName]:_};}html(){return this.domNode.outerHTML;}}rn.blotName="table-col",rn.tagName="COL";class ni extends he{}ni.blotName="table-colgroup",ni.tagName="COLGROUP";class Vn extends he{colgroup(){let[_]=this.descendant(ni);return _||this.findChild("table-colgroup");}deleteColumn(_,C,y,P=[]){let I=this.tbody(),B=this.descendants(Ne);if(I!=null&&I.children.head!=null)if(C.length===B.length)y();else{for(let[H,ie]of _)this.setCellColspan(r().find(H),ie);for(let H of[...C,...P])H.parentElement.children.length===1&&this.setCellRowspan(H.parentElement.previousElementSibling),H.remove();}}deleteRow(_,C){let y=this.tbody();if(y!=null&&y.children.head!=null)if(_.length===y.children.length)C();else{let P=new WeakMap(),I=[],B=[],H=this.getMaxColumns(y.children.head.children);for(let ie of _){let pe=this.getCorrectRow(ie,H);
23pe&&pe.children.forEach(ue=>{var K;let Me=~~ue.domNode.getAttribute("rowspan")||1;if(Me>1){let ze=ue.statics.blotName,[ot]=de(ue);if(_.includes(ue.parent)){let Ct=(K=ue.parent)===null||K===void 0?void 0:K.next;if(P.has(ue)){let{rowspan:dn}=P.get(ue);P.set(ue,{next:Ct,rowspan:dn-1});}else P.set(ue,{next:Ct,rowspan:Me-1}),B.push(ue);}else ue.replaceWith(ze,Object.assign(Object.assign({},ot),{rowspan:Me-1}));}});}for(let ie of B){let[pe]=de(ie),{right:ue,width:K}=ie.domNode.getBoundingClientRect(),{next:Me,rowspan:ze}=P.get(ie);this.setColumnCells(Me,I,{position:ue,width:K},pe,ze,ie);}for(let[ie,pe,ue,K]of I){let Me=this.scroll.create(Ne.blotName,pe);K.moveChildren(Me);let ze=pi();Me.setChildrenId(ze),ie.insertBefore(Me,ue),K.remove();}for(let ie of _)ie.remove();}}deleteTable(){this.remove();}findChild(_){let C=this.children.head;for(;C;){if(C.statics.blotName===_)return C;C=C.next;}return null;}getCopyTable(_=this.domNode.outerHTML){return _.replace(/<temporary[^>]*>(.*?)<\/temporary>/gi,"").replace(/<td[^>]*>(.*?)<\/td>/gi,C=>je(C));}getCorrectRow(_,C){let y=!1;for(;_&&!y;){if(C===this.getMaxColumns(_.children))return y=!0,_;_=_.prev;}return _;}getInsertRow(_,C,y,P){let I=this.tbody(),B=this.thead();if(!(I!=null&&I.children.head!=null||B!=null&&B.children.head!=null))return;let H=di(),ie=P?ct.blotName:Oe.blotName,pe=this.scroll.create(ie),ue=this.getMaxColumns((I||B).children.head.children);return this.getMaxColumns(_.children)===ue?(_.children.forEach(K=>{let Me={height:"24","data-row":H},ze=~~K.domNode.getAttribute("colspan")||1;this.insertTableCell(ze,Me,pe,P);}),pe):(this.getCorrectRow(_.prev,ue).children.forEach(K=>{let Me={height:"24","data-row":H},ze=~~K.domNode.getAttribute("colspan")||1,ot=~~K.domNode.getAttribute("rowspan")||1;if(ot>1){if(y>0&&!C)this.insertTableCell(ze,Me,pe,P);else{let[Ct]=de(K);K.replaceWith(K.statics.blotName,Object.assign(Object.assign({},Ct),{rowspan:ot+1}));}}else this.insertTableCell(ze,Me,pe,P);}),pe);}getMaxColumns(_){return _.reduce((C,y)=>C+(~~y.domNode.getAttribute("colspan")||1),0);}insertColumn(_,C,y,P){let I=this.colgroup(),B=this.tbody(),H=this.thead();if(!(B!=null&&B.children.head!=null||H!=null&&H.children.head!=null))return;let ie=[],pe=[],ue=this.descendants(Oe);for(let K of ue)if(C&&P>0){let Me=K.children.tail.domNode.getAttribute("data-row");ie.push([K,Me,null,null]);}else this.setColumnCells(K,ie,{position:_,width:y});if(I)if(C)pe.push([I,null]);else{let K=0,Me=0,ze=I.children.head;for(;ze;){let{left:ot,width:Ct}=ze.domNode.getBoundingClientRect();if(K=K||ot,Me=K+Ct,Math.abs(K-_)<=2){pe.push([I,ze]);break;}if(Math.abs(Me-_)<=2&&!ze.next){pe.push([I,null]);break;}K+=Ct,ze=ze.next;}}for(let[K,Me,ze]of ie)K?this.insertColumnCell(K,Me,ze):this.setCellColspan(ze,1);for(let[K,Me]of pe)this.insertCol(K,Me);}insertCol(_,C){let y=this.scroll.create(rn.blotName,{width:"72"});_.insertBefore(y,C);}insertColumnCell(_,C,y){if(!_){let ue=this.tbody();_=this.scroll.create(Oe.blotName),ue.insertBefore(_,null);}let P=this.colgroup()?{"data-row":C}:{"data-row":C,width:"72"},I=_.statics.blotName===Oe.blotName,B=I?Ne.blotName:Pe.blotName,H=I?Je.blotName:Ge.blotName,ie=this.scroll.create(B,P),pe=this.scroll.create(H,pi());return ie.appendChild(pe),_.insertBefore(ie,y),pe.optimize(),ie;}insertRow(_,C,y){let P=this.tbody(),I=this.thead();if(!(P!=null&&P.children.head!=null||I!=null&&I.children.head!=null))return;let B=y?I:P,H=y?I.children.at(_):P.children.at(_),ie=H||P.children.at(_-1),pe=this.getInsertRow(ie,H,C,y);B.insertBefore(pe,H);}insertTableCell(_,C,y,P){_>1?Object.assign(C,{colspan:_}):delete C.colspan;let I=P?Pe.blotName:Ne.blotName,B=P?Ge.blotName:Je.blotName,H=this.scroll.create(I,C),ie=this.scroll.create(B,pi());H.appendChild(ie),y.appendChild(H),ie.optimize();}isPercent(){let _=this.domNode.getAttribute("width")||this.domNode.style.getPropertyValue("width");return!!_&&_.endsWith("%");}optimize(_){super.optimize(_);let C=this.descendants(zt);if(this.setClassName(C),C.length>1){C.shift();for(let y of C)y.remove();}}setCellColspan(_,C){let y=_.statics.blotName,P=_.formats()[y],I=(~~P.colspan||1)+C;I>1?Object.assign(P,{colspan:I}):delete P.colspan,_.replaceWith(y,P);}setCellRowspan(_){for(;_;){let C=_.querySelectorAll("td[rowspan]");if(C.length){for(let y of C){let P=r().find(y),I=P.statics.blotName,B=P.formats()[I],H=(~~B.rowspan||1)-1,ie=se(P);H>1?Object.assign(B,{rowspan:H}):delete B.rowspan,ie.format(I,B);}break;}_=_.previousElementSibling;}}setClassName(_){let C=this.statics.defaultClassName,y=_[0],P=this.domNode.getAttribute("class"),I=(B,H)=>{let ie=B.domNode.getAttribute("data-class");ie!==H&&H!=null&&B.domNode.setAttribute("data-class",(pe=>{let ue=(pe||"").split(/\s+/);return ue.find(K=>K===C)||ue.unshift(C),ue.join(" ").trim();}
23)(H)),H||ie||B.domNode.setAttribute("data-class",C);};if(y)I(y,P);else{let B=this.prev;if(!B)return;let[H]=B.descendant(Ne),[ie]=B.descendant(zt);!H&&ie&&I(ie,P);}}setColumnCells(_,C,y,P,I,B){if(!_)return;let{position:H,width:ie}=y,pe=_.children.head;for(;pe;){let{left:ue,right:K}=pe.domNode.getBoundingClientRect(),Me=pe.domNode.getAttribute("data-row");typeof P=="object"&&Object.assign(P,{rowspan:I,"data-row":Me});let ze=P||Me;if(Math.abs(ue-H)<=2){C.push([_,ze,pe,B]);break;}if(Math.abs(K-H)<=2&&!pe.next){C.push([_,ze,null,B]);break;}if(Math.abs(ue-H-ie)<=2){C.push([_,ze,pe,B]);break;}if(H>ue&&H<K){C.push([null,ze,pe,B]);break;}pe=pe.next;}}tbody(){let[_]=this.descendant(ht);return _||this.findChild("table-body");}temporary(){let[_]=this.descendant(zt);return _;}thead(){let[_]=this.descendant(qt);return _||this.findChild("table-thead");}}function pi(){return`cell-${Math.random().toString(36).slice(2,6)}`;}function di(){return`row-${Math.random().toString(36).slice(2,6)}`;}Vn.blotName="table-container",Vn.defaultClassName="ql-table-better",Vn.tagName="TABLE",Vn.allowedChildren=[ht,qt,zt,ni],ht.requiredContainer=Vn,qt.requiredContainer=Vn,zt.requiredContainer=Vn,ni.requiredContainer=Vn,ht.allowedChildren=[Oe],Oe.requiredContainer=ht,qt.allowedChildren=[ct],ct.requiredContainer=qt,ni.allowedChildren=[rn],rn.requiredContainer=ni,Oe.allowedChildren=[Ne],Ne.requiredContainer=Oe,ct.allowedChildren=[Pe],Pe.requiredContainer=ct,Ne.allowedChildren=[Je,U,A],Je.requiredContainer=Ne,U.requiredContainer=Ne,A.requiredContainer=Ne;var Kn=i(930),Ai=i.n(Kn);let $i=["border","cellspacing","style","class"];function mi(v,_,C){return typeof _=="object"?Object.keys(_).reduce((y,P)=>mi(y,P,_[P]),v):v.reduce((y,P)=>P.attributes&&P.attributes[_]?y.push(P):y.insert(P.insert,Ai()({},{[_]:C},P.attributes)),new(p())());}function sn(v,_){let C=v.querySelectorAll("th"),y=C?.length?"table-th":"table-cell",P=v.parentNode.tagName==="TABLE"?v.parentNode:v.parentNode.parentNode,I=Array.from(P.querySelectorAll("tr")).indexOf(v)+1;return v.innerHTML.replace(/\s/g,"")?mi(_,y,I):new(p())();}function Pn(v,_){var C;let y=v.tagName,P=y==="TD",I=P?"table-cell":"table-th",B=P?"table-cell-block":"table-th-block",H=v.parentNode.parentNode.tagName==="TABLE"?v.parentNode.parentNode:v.parentNode.parentNode.parentNode,ie=Array.from(H.querySelectorAll("tr")),pe=Array.from(v.parentNode.querySelectorAll(y)),ue=v.getAttribute("data-row")||ie.indexOf(v.parentNode)+1,K=((C=v?.firstElementChild)===null||C===void 0?void 0:C.getAttribute("data-cell"))||pe.indexOf(v)+1;return _.length()||_.insert(` 24`,{[I]:{"data-row":ue}}),_.ops.forEach(Me=>{Me.attributes&&Me.attributes[I]&&(Me.attributes[I]=Object.assign(Object.assign({},Me.attributes[I]),{"data-row":ue}));}),mi(function(Me,ze){return Me.tagName==="TH"&&ze.ops.forEach(ot=>{typeof ot.insert!="string"||ot.insert.endsWith(` 25`)||(ot.insert+=` 26`);}),ze;}(v,_),B,K);}function _i(v,_){let C=~~v.getAttribute("span")||1,y=v.getAttribute("width"),P=new(p())();for(;C>1;)P.insert(` 27`,{"table-col":{width:y}}),C--;return P.concat(_);}function so(v,_){let C=$i.reduce((y,P)=>(v.hasAttribute(P)&&(P==="class"?y["data-class"]=v.getAttribute(P):y[P]=Y(v.getAttribute(P))),y),{});return new(p())().insert(` 28`,{"table-temporary":C}).concat(_);}var to={col:"Column",insColL:"Insert column left",insColR:"Insert column right",delCol:"Delete column",selCol:"Select column",row:"Row",headerRow:"Header row",insRowAbv:"Insert row above",insRowBlw:"Insert row below",delRow:"Delete row",selRow:"Select row",mCells:"Merge cells",sCell:"Split cell",tblProps:"Table properties",cellProps:"Cell properties",insParaOTbl:"Insert paragraph outside the table",insB4:"Insert before",insAft:"Insert after",copyTable:"Copy table",delTable:"Delete table",border:"Border",color:"Color",width:"Width",background:"Backgroun
28d",dims:"Dimensions",height:"Height",padding:"Padding",tblCellTxtAlm:"Table cell text alignment",alCellTxtL:"Align cell text to the left",alCellTxtC:"Align cell text to the center",alCellTxtR:"Align cell text to the right",jusfCellTxt:"Justify cell text",alCellTxtT:"Align cell text to the top",alCellTxtM:"Align cell text to the middle",alCellTxtB:"Align cell text to the bottom",dimsAlm:"Dimensions and alignment",alTblL:"Align table to the left",tblC:"Center table",alTblR:"Align table to the right",save:"Save",cancel:"Cancel",colorMsg:'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',dimsMsg:'The value is invalid. Try "10px" or "2em" or "2%" or simply "2".',colorPicker:"Color picker",removeColor:"Remove color",black:"Black",dimGrey:"Dim grey",grey:"Grey",lightGrey:"Light grey",white:"White",red:"Red",orange:"Orange",yellow:"Yellow",lightGreen:"Light green",green:"Green",aquamarine:"Aquamarine",turquoise:"Turquoise",lightBlue:"Light blue",blue:"Blue",purple:"Purple"},ko={col:"\u5217",insColL:"\u5411\u5DE6\u63D2\u5165\u5217",insColR:"\u5411\u53F3\u63D2\u5165\u5217",delCol:"\u5220\u9664\u5217",selCol:"\u9009\u62E9\u5217",row:"\u884C",headerRow:"\u6807\u9898\u884C",insRowAbv:"\u5728\u4E0A\u9762\u63D2\u5165\u884C",insRowBlw:"\u5728\u4E0B\u9762\u63D2\u5165\u884C",delRow:"\u5220\u9664\u884C",selRow:"\u9009\u62E9\u884C",mCells:"\u5408\u5E76\u5355\u5143\u683C",sCell:"\u62C6\u5206\u5355\u5143\u683C",tblProps:"\u8868\u683C\u5C5E\u6027",cellProps:"\u5355\u5143\u683C\u5C5E\u6027",insParaOTbl:"\u5728\u8868\u683C\u5916\u63D2\u5165\u6BB5\u843D",insB4:"\u5728\u8868\u683C\u524D\u9762\u63D2\u5165",insAft:"\u5728\u8868\u683C\u540E\u9762\u63D2\u5165",copyTable:"\u590D\u5236\u8868\u683C",delTable:"\u5220\u9664\u8868\u683C",border:"\u8FB9\u6846",color:"\u989C\u8272",width:"\u5BBD\u5EA6",background:"\u80CC\u666F",dims:"\u5C3A\u5BF8",height:"\u9AD8\u5EA6",padding:"\u5185\u8FB9\u8DDD",tblCellTxtAlm:"\u5355\u5143\u683C\u6587\u672C\u5BF9\u9F50\u65B9\u5F0F",alCellTxtL:"\u5DE6\u5BF9\u9F50",alCellTxtC:"\u6C34\u5E73\u5C45\u4E2D\u5BF9\u9F50",alCellTxtR:"\u53F3\u5BF9\u9F50",jusfCellTxt:"\u4E24\u8FB9\u5BF9\u9F50",alCellTxtT:"\u9876\u7AEF\u5BF9\u9F50",alCellTxtM:"\u5782\u76F4\u5C45\u4E2D\u5BF9\u9F50",alCellTxtB:"\u5E95\u90E8\u5BF9\u9F50",dimsAlm:"\u5C3A\u5BF8\u548C\u5BF9\u9F50\u65B9\u5F0F",alTblL:"\u8868\u683C\u5DE6\u5BF9\u9F50",tblC:"\u8868\u683C\u5C45\u4E2D",alTblR:"\u8868\u683C\u53F3\u5BF9\u9F50",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",colorMsg:'\u65E0\u6548\u989C\u8272\uFF0C\u8BF7\u4F7F\u7528 "#FF0000" \u6216\u8005 "rgb(255,0,0)" \u6216\u8005 "red"',dimsMsg:'\u65E0\u6548\u503C\uFF0C\u8BF7\u4F7F\u7528 "10px" \u6216\u8005 "2em" \u6216\u8005 "2%" \u6216\u8005 "2"',colorPicker:"\u989C\u8272\u9009\u62E9\u5668",removeColor:"\u5220\u9664\u989C\u8272",black:"\u9ED1\u8272",dimGrey:"\u6697\u7070\u8272",grey:"\u7070\u8272",lightGrey:"\u6D45\u7070\u8272",white:"\u767D\u8272",red:"\u7EA2\u8272",orange:"\u6A59\u8272",yellow:"\u9EC4\u8272",lightGreen:"\u6D45\u7EFF\u8272",green:"\u7EFF\u8272",aquamarine:"\u6D77\u84DD\u8272",turquoise:"\u9752\u7EFF\u8272",lightBlue:"\u6D45\u84DD\u8272",blue:"\u84DD\u8272",purple:"\u7D2B\u8272"},lo={col:"Colonne",insColL:"Ins\xE9rer colonne \xE0 gauche",insColR:"Ins\xE9rer colonne \xE0 droite",delCol:"Supprimer la colonne",selCol:"S\xE9lectionner la colonne",row:"Ligne",headerRow:"Ligne d'en-t\xEAte",insRowAbv:"Ins\xE9rer ligne au-dessus",insRowBlw:"Ins\xE9rer ligne en dessous",delRow:"Supprimer la ligne",selRow:"S\xE9lectionner la ligne",mCells:"Fusionner les cellules",sCell:"Diviser la cellule",tblProps:"Propri\xE9t\xE9s du tableau",cellProps:"Propri\xE9t\xE9s de la cellule",insParaOTbl:"Ins\xE9rer paragraphe en dehors du tableau",insB4:"Ins\xE9rer avant",insAft:"Ins\xE9rer apr\xE8s",copyTable:"Copier le tableau",delTable:"Supprimer le tableau",border:"Bordure",color:"Couleur",width:"Largeur",background:"Arri\xE8re-plan",dims:"Dimensions",height:"Hauteur",padding:"Marge int\xE9rieure",tblCellTxtAlm:"Alignement du texte de la cellule du tableau",alCellTxtL:"Aligner le texte de la cellule \xE0 gauche",alCellTxtC:"Aligner le texte de la cellule au centre",alCellTxtR:"Aligner le texte de la cellule \xE0 droite",jusfCellTxt:"Justifier le texte de la cellule",alCellTxtT:"Aligner le texte de la cellule en haut",alCellTxtM:"Aligner le texte de la cellule au milieu",alCellTxtB:"Aligner le texte de la cellule en bas",dimsAlm:"Dimensions et alignement",alTblL:"Aligner le tableau \xE0 gauche",tblC:"Centrer le tableau",alTblR:"Aligner le tableau \xE0 droite",save:"Enregistrer",cancel:"Annuler",colorMsg:'La couleur est invalide. Essayez "#FF0000" ou "rgb(255,0,0)" ou "rouge".',dimsMsg:'La valeur est invalide. Essayez "10px" ou "2em" ou "2%" ou simplement "2".',colorPicker:"S\xE9lecteur de couleur",removeColor:"Supprimer la couleur",black:"Noir",dimGrey:"Gris fonc\xE9",grey:"Gris",lightGrey:"Gris clair",white:"Blanc",red:"Rouge",orange:"Orange",yellow:"Jau
28ne",lightGreen:"Vert clair",green:"Vert",aquamarine:"Aigue-marine",turquoise:"Turquoise",lightBlue:"Bleu clair",blue:"Bleu",purple:"Violet"},bt={col:"Kolumna",insColL:"Wstaw kolumn\u0119 z lewej",insColR:"Wstaw kolumn\u0119 z prawej",delCol:"Usu\u0144 kolumn\u0119",selCol:"Wybierz kolumn\u0119",row:"Wiersz",headerRow:"Wiersz nag\u0142\xF3wka",insRowAbv:"Wstaw wiersz powy\u017Cej",insRowBlw:"Wstaw wiersz poni\u017Cej",delRow:"Usu\u0144 wiersz",selRow:"Wybierz wiersz",mCells:"Scal kom\xF3rki",sCell:"Podziel kom\xF3rk\u0119",tblProps:"W\u0142a\u015Bciwo\u015Bci tabeli",cellProps:"W\u0142a\u015Bciwo\u015Bci kom\xF3rki",insParaOTbl:"Wstaw akapit poza tabel\u0105",insB4:"Wstaw przed",insAft:"Wstaw po",copyTable:"Kopiuj tabel\u0119",delTable:"Usu\u0144 tabel\u0119",border:"Obramowanie",color:"Kolor",width:"Szeroko\u015B\u0107",background:"T\u0142o",dims:"Wymiary",height:"Wysoko\u015B\u0107",padding:"Margines wewn\u0119trzny",tblCellTxtAlm:"Wyr\xF3wnanie tekstu w kom\xF3rce tabeli",alCellTxtL:"Wyr\xF3wnaj tekst w kom\xF3rce do lewej",alCellTxtC:"Wyr\xF3wnaj tekst w kom\xF3rce do \u015Brodka",alCellTxtR:"Wyr\xF3wnaj tekst w kom\xF3rce do prawej",jusfCellTxt:"Wyjustuj tekst w kom\xF3rce",alCellTxtT:"Wyr\xF3wnaj tekst w kom\xF3rce do g\xF3ry",alCellTxtM:"Wyr\xF3wnaj tekst w kom\xF3rce do \u015Brodka",alCellTxtB:"Wyr\xF3wnaj tekst w kom\xF3rce do do\u0142u",dimsAlm:"Wymiary i wyr\xF3wnanie",alTblL:"Wyr\xF3wnaj tabel\u0119 do lewej",tblC:"Wy\u015Brodkuj tabel\u0119",alTblR:"Wyr\xF3wnaj tabel\u0119 do prawej",save:"Zapisz",cancel:"Anuluj",colorMsg:'Kolor jest nieprawid\u0142owy. Spr\xF3buj "#FF0000" lub "rgb(255,0,0)" lub "red".',dimsMsg:'Warto\u015B\u0107 jest nieprawid\u0142owa. Spr\xF3buj "10px" lub "2em" lub "2%" lub po prostu "2".',colorPicker:"Wyb\xF3r koloru",removeColor:"Usu\u0144 kolor",black:"Czarny",dimGrey:"Przyciemniony szary",grey:"Szary",lightGrey:"Jasnoszary",white:"Bia\u0142y",red:"Czerwony",orange:"Pomara\u0144czowy",yellow:"\u017B\xF3\u0142ty",lightGreen:"Jasnozielony",green:"Zielony",aquamarine:"Akwamaryna",turquoise:"Turkusowy",lightBlue:"Jasnoniebieski",blue:"Niebieski",purple:"Fioletowy"},ml={col:"Spalte",insColL:"Spalte links einf\xFCgen",insColR:"Spalte rechts einf\xFCgen",delCol:"Spalte l\xF6schen",selCol:"Spalte ausw\xE4hlen",row:"Zeile",headerRow:"Kopfzeile",insRowAbv:"Zeile oberhalb einf\xFCgen",insRowBlw:"Zeile unterhalb einf\xFCgen",delRow:"Zeile l\xF6schen",selRow:"Zeile ausw\xE4hlen",mCells:"Zellen verbinden",sCell:"Zelle teilen",tblProps:"Tabelleneingenschaften",cellProps:"Zelleneigenschaften",insParaOTbl:"Absatz au\xDFerhalb der Tabelle einf\xFCgen",insB4:"Davor einf\xFCgen",insAft:"Danach einf\xFCgen",copyTable:"Tabelle kopieren",delTable:"Tabelle l\xF6schen",border:"Rahmen",color:"Farbe",width:"Breite",background:"Schattierung",dims:"Ma\xDFe",height:"H\xF6he",padding:"Abstand",tblCellTxtAlm:"Ausrichtung",alCellTxtL:"Zellentext links ausrichten",alCellTxtC:"Zellentext mittig ausrichten",alCellTxtR:"Zellentext rechts ausrichten",jusfCellTxt:"Zellentext Blocksatz",alCellTxtT:"Zellentext oben ausrichten",alCellTxtM:"Zellentext mittig ausrichten",alCellTxtB:"Zellentext unten ausrichten",dimsAlm:"Ma\xDFe und Ausrichtung",alTblL:"Tabelle links ausrichten",tblC:"Tabelle mittig ausrichten",alTblR:"Tabelle rechts ausrichten",save:"Speichern",cancel:"Abbrechen",colorMsg:'Die Farbe ist ung\xFCltig. Probiere "#FF0000", "rgb(255,0,0)" oder "red".',dimsMsg:'Der Wert ist ung\xFCltig. Probiere "10px", "2em" oder "2%" oder einfach "2".',colorPicker:"Farbw\xE4hler",removeColor:"Farbe entfernen",black:"Schwarz",dimGrey:"Dunkelgrau",grey:"Grau",lightGrey:"Hellgrau",white:"Wei\xDF",red:"Rot",orange:"Orange",yellow:"Gelb",lightGreen:"Hellgr\xFCn",green:"Gr\xFCn",aquamarine:"Aquamarin",turquoise:"T\xFCrkis",lightBlue:"Hellblau",blue:"Blau",purple:"Lila"},Xs={col:"\u0421\u0442\u043E\u043B\u0431\u0435\u0446",insColL:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 \u0441\u043B\u0435\u0432\u0430",insColR:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 \u0441\u043F\u0440\u0430\u0432\u0430",delCol:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446",selCol:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446",row:"\u0421\u0442\u0440\u043E\u043A\u0430",headerRow:"\u0421\u0442\u0440\u043E\u043A\u0430 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430",insRowAbv:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u0432\u0435\u0440\u0445\u0443",insRowBlw:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u043D\u0438\u0437\u0443",delRow:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443",selRow:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443",mCells:"\u041E\u0431\u044A\u0435\u0434\u0438\u043D\u0438\u0442\u044C \u044F\u0447\u0435\u0439\u043A\u0438",sCell:"\u0420\u0430\u0437\u0431\u0438\u0442\u044C \u044F\u0447\u0435\u0439\u043A\u0443",tblProps:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",cellProps:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u044F\u0447\u0435\u0439\u043A\u0438",insParaOTbl:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0430\u0431\u0437\u0430\u0446 \u0437\u0430 \u043F\u0440\u0435\u0434\u0435\u043B\u0430\u043C\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",insB4:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0430\u0431\u0437\u0430\u0446 \u043F\u0435\u0440\u0435\u0434",insAft:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0430\u0431\u0437\u0430\u0446 \u043F\u043E\u0441\u043B\u0435",copyTable:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443",delTable:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443",border:"\u041E\u0431\u0432\u043E\u0434\u043A\u0430",color:"\u0426\u0432\u0435\u0442",width:"\u0428\u0438\u0440\u0438\u043D\u0430",background:"\u0424\u043E\u043D",dims:"\u0420\u0430\u0437\u043C\u0435\u0440\u044B",height:"\u0412\u044B\u0441\u043E\u0442\u0430",padding:"\u041E\u0442\u0441\u0442\u0443\u043F",tblCellTxtAlm:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u0442\u0430\u0431\u043B\u0438\u0446\u044B",alCellTxtL:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u043F\u043E \u043B\u0435\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E",alCellTxtC:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u043F\u043E \u0446\u0435\u043D\u0442\u0440\u0443",alCellTxtR:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u043F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E",jusfCellTxt:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u043F\u043E \u0448\u0438\u0440\u0438\u043D\u0435",alCellTxtT:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u043F\u043E \u0432\u0435\u0440\u0445\u0443",alCellTxtM:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u043F\u043E \u0441\u0435\u0440\u0435\u0434\u0438\u043D\u0435",alCellTxtB:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0432 \u044F\u0447\u0435\u0439\u043A\u0435 \u043F\u043E \u043D\u0438\u0437\u0443",dimsAlm:"\u0420\u0430\u0437\u043C\u0435\u0440\u044B \u0438 \u0432\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435",alTblL:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443 \u043F\u043E \u043B\u0435\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E",tblC:"\u0426\u0435\u043D\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443",alTblR:"\u0412\u044B\u0440\u043E\u0432\u043D\u044F\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443 \u043F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E",save:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C",colorMsg:'\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0446\u0432\u0435\u0442. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 "#FF0000", "rgb(255,0,0)" \u0438\u043B\u0438 "red".',dimsMsg:'\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 "10px", "2em" \u0438\u043B\u0438 "2%" \u0438\u043B\u0438 \u043F\u0440\u043E\u0441\u0442\u043E "2".',colorPicker:"\u0412\u044B\u0431\u043E\u0440 \u0446\u0432\u0435\u0442\u0430",removeColor:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0446\u0432\u0435\u0442",black:"\u0427\u0435\u0440\u043D\u044B\u0439",dimGrey:"\u0422\u0435\u043C\u043D\u043E-\u0441\u0435\u0440\u044B\u0439",grey:"\u0421\u0435\u0440\u044B\u0439",lightGrey:"\u0421\u0432\u0435\u0442\u043B\u043E-\u0441\u0435\u0440\u044B\u0439",white:"\u0411\u0435\u043B\u044B\u0439",red:"\u041A\u0440\u0430\u0441\u043D\u044B\u0439",orange:"\u041E\u0440\u0430\u043D\u0436\u0435\u0432\u044B\u0439",yellow:"\u0416\u0435\u043B\u0442\u044B\u0439",lightGreen:"\u0421\u0432\u0435\u0442\u043B\u043E-\u0437\u0435\u043B\u0435\u043D\u044B\u0439",green:"\u0417\u0435\u043B\u0435\u043D\u044B\u0439",aquamarine:"\u0410\u043A\u0432\u0430\u043C\u0430\u0440\u0438\u043D",turquoise:"\u0411\u0438\u0440\u044E\u0437\u043E\u0432\u044B\u0439",lightBlue:"\u0421\u0432\u0435\u0442\u043B\u043E-\u0433\u043E\u043B\u0443\u0431\u043E\u0439",blue:"\u0421\u0438\u043D\u0438\u0439",purple:"\u0424\u0438\u043E\u043B\u0435\u0442\u043E\u0432\u044B\u0439"},lp={col:"S\xFCtun",insColL:"Sola s\xFCtun ekle",insColR:"Sa\u011Fa s\xFCtun ekle",delCol:"S\xFCtunu sil",selCol:"S\xFCtunu se\xE7",row:"Sat\u0131r",headerRow:"Ba\u015Fl\u0131k sat\u0131r\u0131",insRowAbv:"\xDCst\xFCne sat\u0131r ekle",insRowBlw:"Alt\u0131na sat\u0131r ekle",delRow:"Sat\u0131r\u0131 sil",selRow:"Sat\u0131r se\xE7",mCells:"H\xFCcreleri birle\u015Ftir",sCell:"H\xFCcreyi b\xF6l",tblProps:"Tablo \xF6zellikleri",cellProps:"H\xFCcre \xF6zellikleri",insParaOTbl:"Tablo d\u0131\u015F\u0131nda paragraf ekle",insB4:"\xD6ncesine ekle",insAft:"Sonras\u0131na ekle",copyTable:"Tabloyu kopyala",delTable:"Tabloyu sil",border:"Kenarl\u0131k",color:"Renk",width:"Geni\u015Flik",background:"Arka plan",dims:"Boyutlar",height:"Y\xFCkseklik",padding:"Dolgu",tblCellTxtAlm:"Tablo h\xFCcresi metin hizalamas\u0131",alCellTxtL:"H\xFCcre metnini sola hizala",alCellTxtC:"H\xFCcre metnini ortaya hizala",alCellTxtR:"H\xFCcre metnini sa\u011Fa hizala",jusfCellTxt:"H\xFCcre metnini yasla",alCellTxtT:"H\xFCcre metnini \xFCste hizala",alCellTxtM:"H\xFCcre metnini ortaya hizala",alCellTxtB:"H\xFCcre metnini alta hizala",dimsAlm:"Boyutlar ve hizalama",alTblL:"Tabloyu sola hizala",tblC:"Tabloyu ortala",alTblR:"Tabloyu sa\u011Fa hizala",save:"Kaydet",cancel:"\u0130ptal",colorMsg:'Renk ge\xE7ersiz. "#FF0000", "rgb(255,0,0)" veya "red" deneyin.',dimsMsg:'De\u011Fer ge\xE7ersiz. "10px", "2em" veya "2%" veya s
28adece "2" deneyin.',colorPicker:"Renk se\xE7ici",removeColor:"Rengi kald\u0131r",black:"Siyah",dimGrey:"Koyu gri",grey:"Gri",lightGrey:"A\xE7\u0131k gri",white:"Beyaz",red:"K\u0131rm\u0131z\u0131",orange:"Turuncu",yellow:"Sar\u0131",lightGreen:"A\xE7\u0131k ye\u015Fil",green:"Ye\u015Fil",aquamarine:"Akuamarin",turquoise:"Turkuaz",lightBlue:"A\xE7\u0131k mavi",blue:"Mavi",purple:"Mor"},cp={col:"Coluna",insColL:"Inserir coluna \xE0 esquerda",insColR:"Inserir coluna \xE0 direita",delCol:"Eliminar coluna",selCol:"Selecionar coluna",row:"Linha",headerRow:"Linha de cabe\xE7alho",insRowAbv:"Inserir linha acima",insRowBlw:"Inserir linha abaixo",delRow:"Eliminar linha",selRow:"Selecionar linha",mCells:"Unir c\xE9lulas",sCell:"Dividir c\xE9lula",tblProps:"Propriedades da tabela",cellProps:"Propriedades da c\xE9lula",insParaOTbl:"Inserir par\xE1grafo fora da tabela",insB4:"Inserir antes",insAft:"Inserir depois",copyTable:"Copiar tabela",delTable:"Eliminar tabela",border:"Borda",color:"Cor",width:"Largura",background:"Cor de Fundo",dims:"Dimens\xF5es",height:"Altura",padding:"Margem interna",tblCellTxtAlm:"Alinhamento do texto",alCellTxtL:"Alinhar texto da c\xE9lula \xE0 esquerda",alCellTxtC:"Alinhar texto da c\xE9lula ao centro",alCellTxtR:"Alinhar texto da c\xE9lula \xE0 direita",jusfCellTxt:"Justificar texto da c\xE9lula",alCellTxtT:"Alinhar texto da c\xE9lula no topo",alCellTxtM:"Alinhar texto da c\xE9lula ao meio",alCellTxtB:"Alinhar texto da c\xE9lula na parte inferior",dimsAlm:"Dimens\xF5es e alinhamento",alTblL:"Alinhar tabela \xE0 esquerda",tblC:"Centrar tabela",alTblR:"Alinhar tabela \xE0 direita",save:"Guardar",cancel:"Cancelar",colorMsg:'A cor \xE9 inv\xE1lida. Tente "#FF0000" ou "rgb(255,0,0)" ou "vermelho".',dimsMsg:'O valor \xE9 inv\xE1lido. Tente "10px" ou "2em" ou "2%" ou apenas "2".',colorPicker:"Selecionar cor",removeColor:"Remover cor",black:"Preto",dimGrey:"Cinzento escuro",grey:"Cinzento",lightGrey:"Cinzento claro",white:"Branco",red:"Vermelho",orange:"Laranja",yellow:"Amarelo",lightGreen:"Verde claro",green:"Verde",aquamarine:"Azul marinho",turquoise:"Azul turquesa",lightBlue:"Azul claro",blue:"Azul",purple:"Roxo"},pp={col:"\u5217",insColL:"\u5DE6\u306B\u5217\u3092\u633F\u5165",insColR:"\u53F3\u306B\u5217\u3092\u633F\u5165",delCol:"\u5217\u3092\u524A\u9664",selCol:"\u5217\u3092\u9078\u629E",row:"\u884C",headerRow:"\u30D8\u30C3\u30C0\u30FC\u884C",insRowAbv:"\u4E0A\u306B\u884C\u3092\u633F\u5165",insRowBlw:"\u4E0B\u306B\u884C\u3092\u633F\u5165",delRow:"\u884C\u3092\u524A\u9664",selRow:"\u884C\u3092\u9078\u629E",mCells:"\u30BB\u30EB\u3092\u7D50\u5408",sCell:"\u30BB\u30EB\u3092\u5206\u5272",tblProps:"\u30C6\u30FC\u30D6\u30EB\u306E\u30D7\u30ED\u30D1\u30C6\u30A3",cellProps:"\u30BB\u30EB\u306E\u30D7\u30ED\u30D1\u30C6\u30A3",insParaOTbl:"\u30C6\u30FC\u30D6\u30EB\u5916\u306B\u6BB5\u843D\u3092\u633F\u5165",insB4:"\u524D\u306B\u633F\u5165",insAft:"\u5F8C\u306B\u633F\u5165",copyTable:"\u30C6\u30FC\u30D6\u30EB\u3092\u30B3\u30D4\u30FC",delTable:"\u30C6\u30FC\u30D6\u30EB\u3092\u524A\u9664",border:"\u67A0\u7DDA",color:"\u8272",width:"\u5E45",background:"\u80CC\u666F",dims:"\u30B5\u30A4\u30BA",height:"\u9AD8\u3055",padding:"\u30D1\u30C7\u30A3\u30F3\u30B0",tblCellTxtAlm:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u914D\u7F6E",alCellTxtL:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u5DE6\u63C3\u3048",alCellTxtC:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u4E2D\u592E\u63C3\u3048",alCellTxtR:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u53F3\u63C3\u3048",jusfCellTxt:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u4E21\u7AEF\u63C3\u3048",alCellTxtT:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u4E0A\u63C3\u3048",alCellTxtM:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u4E2D\u592E\u63C3\u3048\uFF08\u7E26\uFF09",alCellTxtB:"\u30BB\u30EB\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u4E0B\u63C3\u3048",dimsAlm:"\u30B5\u30A4\u30BA\u3068\u914D\u7F6E",alTblL:"\u30C6\u30FC\u30D6\u30EB\u3092\u5DE6\u63C3\u3048",tblC:"\u30C6\u30FC\u30D6\u30EB\u3092\u4E2D\u592E\u63C3\u3048",alTblR:"\u30C6\u30FC\u30D6\u30EB\u3092\u53F3\u63C3\u3048",save:"\u4FDD\u5B58",cancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",colorMsg:'\u8272\u304C\u7121\u52B9\u3067\u3059\u3002"#FF0000"\u3084"rgb(255,0,0)"\u3084"red"\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044\u3002',dimsMsg:'\u5024\u304C\u7121\u52B9\u3067\u3059\u3002"10px"\u3084"2em"\u3084"2%"\u307E\u305F\u306F\u5358\u306B"2"\u3092\u8A66\u3057\u3066\u304F\u3060\u3055\u3044\u3002',colorPicker:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC",removeColor:"\u8272\u3092\u524A\u9664",black:"\u9ED2",dimGrey:"\u30C0\u30FC\u30AF\u30B0\u30EC\u30FC",grey:"\u30B0\u30EC\u30FC",lightGrey:"\u30E9\u30A4\u30C8\u30B0\u30EC\u30FC",white:"\u767D",red:"\u8D64",orange:"\u30AA\u30EC\u30F3\u30B8",yellow:"\u9EC4\u8272",lightGreen:"\u30E9\u30A4\u30C8\u30B0\u30EA\u30FC\u30F3",green:"\u7DD1",aquamarine:"\u30A2\u30AF\u30A2\u30DE\u30EA\u30F3",turquoise:"\u30BF\u30FC\u30B3\u30A4\u30BA",lightBlue:"\u30E9\u30A4\u30C8\u30D6\u30EB\u30FC",blue:"\u9752",purple:"\u7D2B"},Ql={col:"Coluna",insColL:"Inserir coluna \xE0 esquerda",insColR:"Inserir coluna \xE0 direita",delCol:"Excluir coluna",selCol:"Selecionar coluna",row:"Linha",headerRow:"Linha de t\xEDtulo",insRowAbv:"Inserir linha acima",insRowBlw:"Inserir linha abaixo",delRow:"Excluir linha",selRow:"Selecionar linha",mCells:"Mesclar c\xE9lulas",sCell:"Dividir c\xE9lula",tblProps:"Propriedades da tabela",cellProps:"Propriedades da c\xE9lula",insParaOTbl:"Inserir par\xE1grafo fora da tabela",insB4:"Inserir par\xE1grafo antes",insAft:"Inserir par\xE1grafo depois",copyTable:"Copiar tabela",delTable:"Excluir tabela",border:"Borda",color:"Cor",width:"Largura",background:"Fundo",dims:"Dimens\xF5es",height:"Altura",padding:"Espa\xE7amento",tblCellTxtAlm:"Alinhamento do texto da c\xE9lula",alCellTxtL:"Alinhar texto \xE0 esquerda",alCellTxtC:"Centralizar texto",alCellTxtR:"Alinhar texto \xE0 direita",jusfCellTxt:"Justificar texto",alCellTxtT:"Alinhar texto ao topo",alCellTxtM:"Alinhar texto ao meio",alCellTxtB:"Alinhar texto \xE0 base",dimsAlm:"Dimens\xF5es e alinhamento",alTblL:"Alinhar tabela \xE0 esquerda",tblC:"Centralizar tabela",alTblR:"Alinhar tabela \xE0 direita",save:"Salvar",cancel:"Cancelar",colorMsg:'A cor \xE9 inv\xE1lida. Tente "#FF0000" ou "rgb(255,0,0)" ou "vermelho".',dimsMsg:'O valor \xE9 inv\xE1lido. Tente "10px" ou "2em" ou "2%" ou simplesmente "2".',colorPicker:"Seletor de cor",removeColor:"Remover cor",black:"Preto",dimGrey:"Cinza escuro",grey:"Cinza",lightGrey:"Cinza claro",white:"Branco",red:"Vermelho",orange:"Laranja",yellow:"Amarelo",lightGreen:"Verde claro",green:"Verde",aquamarine:"\xC1gua-marinha",turquoise:"Turquesa",lightBlue:"Azul claro",blue:"Azul",purple:"Roxo"},Os={col:"Sloupec",insColL:"Vlo\u017Eit sloupec vlevo",insColR:"Vlo\u017Eit sloupec vpravo",delCol:"Smazat sloupec",selCol:"Vybrat sloupec",row:"\u0158\xE1dek",headerRow:"\u0158\xE1dek z\xE1hlav\xED",insRowAbv:"Vlo\u017Eit \u0159\xE1dek nad",insRowBlw:"Vlo\u017Eit \u0159\xE1dek pod",delRow:"Smazat \u0159\xE1dek",selRow:"Vybrat \u0159\xE1dek",mCells:"Slou\u010Dit bu\u0148ky",sCell:"Rozd\u011Blit bu\u0148ku",tblProps:"Vlastnosti tabulky",cellProps:"Vlastnosti bu\u0148ky",insParaOTbl:"Vlo\u017Eit odstavec mimo tabulku",insB4:"Vlo\u017Eit p\u0159ed",insAft:"Vlo\u017Eit za",copyTable:"Kop\xEDrovat tabulku",delTable:"Smazat tabulku",border:"Okraj",color:"Barva",width:"\u0160\xED\u0159ka",background:"Pozad\xED",dims:"Rozm\u011Bry",height:"V\xFD\u0161ka",padding:"Vnit\u0159n\xED okraj",tblCellTxtAlm:"Zarovn\xE1n\xED textu v bu\u0148ce",alCellTxtL:"Zarovnat text vlevo",alCellTxtC:"Zarovnat text na st\u0159ed",alCellTxtR:"Zarovnat text vpravo",jusfCellTxt:"Zarovnat text do bloku",alCellTxtT:"Zarovnat text nahoru",alCellTxtM:"Zarovnat text na st\u0159ed (vertik\xE1ln\u011B)",alCellTxtB:"Zarovnat text dol\u016F",dimsAlm:"Rozm\u011Bry a zarovn\xE1n\xED",alTblL:"Zarovnat tabulku vlevo",tblC:"Zarovnat tabulku na st\u0159ed",alTblR:"Zarovnat tabulku vpravo",save:"Ulo\u017Eit",cancel:"Zru\u0161it",colorMsg:'Barva je neplatn\xE1. Zkuste nap\u0159. "#FF0000", "rgb(255,0,0)" nebo "red".',dimsMsg:'Hodnota je neplatn\xE1. Zkuste "10px", "2em" nebo "2%" nebo jednodu\u0161e "2".',colorPicker:"V\xFDb\u011Br barvy",removeColor:"Odebrat barvu",black:"\u010Cern\xE1",dimGrey:"Tmav\u011B \u0161ed\xE1",grey:"\u0160ed\xE1",lightGrey:"Sv\u011Btle \u0161ed\xE1",white:"B\xEDl\xE1",red:"\u010Cerven\xE1",orange:"Oran\u017Eov\xE1",yellow:"\u017Dlut\xE1",lightGreen:"Sv\u011Btle zelen\xE1",green:"Zelen\xE1",aquamarine:"Akvamar\xEDnov\xE1",turquoise:"Tyrkysov\xE1",lightBlue:"Sv\u011Btle modr\xE1",blue:"Modr\xE1",purple:"Fialov\xE1"},Sa={col:"Kolonne",insColL:"Inds\xE6t kolonne til venstre",insColR:"Inds\xE6t kolonne til h\xF8jre",delCol:"Slet kolonne",selCol:"V\xE6lg kolonne",row:"R\xE6kke",headerRow:"Overskriftsr\xE6kke",insRowAbv:"Inds\xE6t r\xE6kke ovenfor",insRowBlw:"Inds\xE6t r\xE6kke nedenfor",delRow:"Slet r\xE6kke",selRow:"V\xE6lg r\xE6kke",mCells:"Flet celler",sCell:"Opdel celle",tblProps:"Tabellegenskaber",cellProps:"Celleegenskaber",insParaOTbl:"Inds\xE6t afsnit uden for tabellen",insB4:"Inds\xE6t f\xF8r",insAft:"Inds\xE6t efter",copyTable:"Kopi\xE9r tabel",delTable:"Slet tabel",border:"Kant",color:"Farve",width:"Bredde",background:"Baggrund",dims:"M\xE5l",height:"H\xF8jde",padding:"Indre afstand",tblCellTxtAlm:"Justering",alCellTxtL:"Venstrejuster celletekst",alCellTxtC:"Centrer celletekst",alCellTxtR:"H\xF8jrejuster celletekst",jusfCellTxt:"Juster celletekst",alCellTxtT:"Topjuster celletekst",alCellTxtM:"Centrer celletekst (lodret)",alCellTxtB:"Bundjuster celletekst",dimsAlm:"M\xE5l og justering",alTblL:"Venstrejuster tabel",tblC:"Centrer tabel",alTblR:"H\xF8jrejuster tabel",save:"Gem",cancel:"Annuller",colorMsg:'Farven er ugyldig. Pr\xF8v "#FF0000", "rgb(255,0,0)" eller "red".',dimsMsg:'V\xE6rdien er ugyldig. Pr\xF8v "10px", "2em" eller "2%" eller blot "2".',colorPicker:"Farvev\xE6lger",removeColor:"Fjern farve",black:"Sort",dimGrey:"M\xF8rkegr\xE5",grey:"Gr\xE5",lightGrey:"Lysegr\xE5",white:"Hvid",red:"R\xF8d",orange:"Orange",yellow:"Gul",lightGreen:"Lysegr\xF8n",green:"Gr\xF8n",aquamarine:"Akvamarin",turquoise:"Turkis",lightBlue:"Lysebl\xE5",blue:"Bl\xE5",purple:"Lilla"},dr={col:"Kolonne",insColL:"Sett inn kolonne til venstre",insColR:"Sett inn kolonne til h\xF8yre",delCol:"Slett kolonne",selCol:"Velg kolonne",row:"Rad",headerRow:"Overskriftsrad",insRowAbv:"Sett inn rad over",insRowBlw:"Sett inn rad under",delRow:"Slett rad",selRow:"Velg rad",mCells:"Sl\xE5 sammen celler",sCell:"Del celle",tblProps:"Tabellegenskaper",cellProps:"Celleegenskaper",insParaOTbl:"Sett inn avsnitt utenfor tabellen",insB4:"Sett inn f\xF8r",insAft:"Sett inn etter",copyTable:"Kopier tabell",delTable:"Slett tabell",border:"Ramme",color:"Farge",width:"Bredde",background:"Bakgrunn",dims:"M\xE5l",height:"H\xF8yde",padding:"Polstring",tblCellTxtAlm:"Justering",alCellTxtL:"Venstrejuster celletekst",alCellTxtC:"Sentrer celletekst",alCellTxtR:"H\xF8yrejuster celletekst",jusfCellTxt:"Blokjuster celletekst",alCellTxtT:"Toppjuster celletekst",alCellTxtM:"Sentrer celletekst (loddrett)",alCellTxtB:"Bunnjuster celletekst",dimsAlm:"M\xE5l og justering",alTblL:"Venstrejuster tabell",tblC:"Sentrer tabell",alTblR:"H\xF8yrejuster tabell",save:"Lagre",cancel:"Avbryt",colorMsg:'Fargen er ugyldig. Pr\xF8v "#FF0000", "rgb(255,0,0)" eller "red".',dimsMsg:'Verdien er ugyldig. Pr\xF8v "10px", "2em" eller "2%" eller bare "2".',colorPicker:"Fargevelger",removeColor:"Fjern farge",black:"Svart",dimGrey:"M\xF8rkegr\xE5",grey:"Gr\xE5",lightGrey:"Lysegr\xE5",white:"Hvit",red:"R\xF8d",orange:"Oransje",yellow:"Gul",lightGreen:"Lysegr\xF8nn",green:"Gr\xF8nn",aquamarine:"Akvamarin",turquoise:"Turkis",lightBlue:"Lysebl\xE5",blue:"Bl\xE5",purple:"Lilla"},Or={col:"Colonna",insColL:"Inserisci colonna a sinistra",insColR:"Inserisci colonna a destra",delCol:"Elimina colonna",selCol:"Seleziona colonna",row:"Riga",headerRow:"Riga di intestazione",insRowAbv:"Inserisci riga sopra",insRowBlw:"Inserisci riga sotto",delRow:"Elimina riga",selRow:"Seleziona riga",mCells:"Unisci celle",sCell:"Dividi cella",tblProps:"Propriet\xE0 tabella",cellProps:"Propriet\xE0 cella",insParaOTbl:"Inserisci paragrafo fuori dalla tabella",insB4:"Inserisci prima",insAft:"Inserisci dopo",copyTable:"Copia tabella",delTable:"Elimina tabella",border:"Bordo",color:"Colore",width:"Larghezza",background:"Sfondo",dims:"Dimensioni",height:"Altezza",padding:"Spaziatura interna",tblCellTxtAlm:"Allineamento testo cella",alCellTxtL:"Allinea testo cella a sinistra",alCellTxtC:"Allinea testo cella al centro",alCellTxtR:"Allinea testo cella a destra",jusfCellTxt:"Giustifica testo cella",alCellTxtT:"Allinea testo cella in alto",alCellTxtM:"Allinea testo cella al centro verticale",alCellTxtB:"Allinea testo cella in basso",dimsAlm:"Dimensioni e allineamento",alTblL:"Allinea tabella a sinistra",tblC:"Centra tabella",alTblR:"Allinea tabella a destra",save:"Salva",cancel:"Annulla",colorMsg:'Il colore non \xE8 valido. Prova con "#FF0000", "rgb(255,0,0)" o "red".',dimsMsg:'Il valore non \xE8 valido. Prova con "10px", "2em", "2%" oppure semplicemente "2".',colorPicker:"Selettore colore",removeColor:"Rimuovi colore",black:"Nero",dimGrey:"Grigio scuro",grey:"Grigio",lightGrey:"Grigio chiaro",white:"Bianco",red:"Rosso",orange:"Arancione",yellow:"Giallo",lightGreen:"Verde chiaro",green:"Verde",aquamarine:"Acquamarina",turquoise:"Turchese",lightBlue:"Azzurro",blue:"Blu",purple:"Viola"},Ca={col:"Kolumn",insColL:"Infoga kolumn till v\xE4nster",insColR:"Infoga kolumn till h\xF6ger",delCol:"Ta bort kolumn",selCol:"Markera kolumn",row:"Rad",headerRow:"Rubrikrad",insRowAbv:"Infoga rad ovanf\xF6r",insRowBlw:"Infoga rad nedanf\xF6r",delRow:"Ta bort rad",selRow:"Markera rad",mCells:"Sammanfoga celler",sCell:"Dela cell",tblProps:"Tabellinst\xE4llningar",cellProps:"Cellinst\xE4llningar",insParaOTbl:"Infoga stycke utanf\xF6r tabellen",insB4:"Infoga f\xF6re",insAft:"Infoga efter",copyTable:"Kopiera tabell",delTable:"Ta bort tabell",border:"Kant",color:"F\xE4rg",width:"Bredd",background:"Bakgrund",dims:"Dimensioner",height:"H\xF6jd",padding:"Inre avst\xE5nd",tblCellTxtAlm:"Cellens textjustering",alCellTxtL:"Justera text v\xE4nster",alCellTxtC:"Centrera text",alCellTxtR:"Justera text h\xF6ger",jusfCellTxt:"Justera text",alCellTxtT:"Justera text upptill",alCellTxtM:"Justera text i mitten",alCellTxtB:"Justera text nederst",dimsAlm:"Dimensioner och justering",alTblL:"Justera tabell v\xE4nster",tblC:"Centrera tabell",alTblR:"Justera tabell h\xF6ger",save:"Spara",cancel:"Avbryt",colorMsg:'F\xE4rgen \xE4r ogiltig. Testa "#FF0000" eller "rgb(255,0,0)" eller "red".',dimsMsg:'V\xE4rdet \xE4r ogiltigt. Testa "10px", "2em", "2%" eller bara "2".',colorPicker:"F\xE4rgval",removeColor:"Ta bort f\xE4rg",black:"Svart",dimGrey:"M\xF6rkgr\xE5",grey:"Gr\xE5",lightGrey:"Ljusgr\xE5",
28white:"Vit",red:"R\xF6d",orange:"Orange",yellow:"Gul",lightGreen:"Ljusgr\xF6n",green:"Gr\xF6n",aquamarine:"Akvamarin",turquoise:"Turkos",lightBlue:"Ljusbl\xE5",blue:"Bl\xE5",purple:"Lila"},Er={col:"\u6B04",insColL:"\u5411\u5DE6\u63D2\u5165\u6B04",insColR:"\u5411\u53F3\u63D2\u5165\u6B04",delCol:"\u522A\u9664\u6B04",selCol:"\u9078\u53D6\u6B04",row:"\u5217",headerRow:"\u6A19\u984C\u5217",insRowAbv:"\u5728\u4E0A\u65B9\u63D2\u5165\u5217",insRowBlw:"\u5728\u4E0B\u65B9\u63D2\u5165\u5217",delRow:"\u522A\u9664\u5217",selRow:"\u9078\u53D6\u5217",mCells:"\u5408\u4F75\u5132\u5B58\u683C",sCell:"\u62C6\u5206\u5132\u5B58\u683C",tblProps:"\u8868\u683C\u5C6C\u6027",cellProps:"\u5132\u5B58\u683C\u5C6C\u6027",insParaOTbl:"\u5728\u8868\u683C\u5916\u63D2\u5165\u6BB5\u843D",insB4:"\u5728\u8868\u683C\u524D\u63D2\u5165",insAft:"\u5728\u8868\u683C\u5F8C\u63D2\u5165",copyTable:"\u8907\u88FD\u8868\u683C",delTable:"\u522A\u9664\u8868\u683C",border:"\u908A\u6846",color:"\u984F\u8272",width:"\u5BEC\u5EA6",background:"\u80CC\u666F",dims:"\u5C3A\u5BF8",height:"\u9AD8\u5EA6",padding:"\u5167\u8DDD",tblCellTxtAlm:"\u5132\u5B58\u683C\u6587\u5B57\u5C0D\u9F4A\u65B9\u5F0F",alCellTxtL:"\u5DE6\u5C0D\u9F4A",alCellTxtC:"\u6C34\u5E73\u7F6E\u4E2D",alCellTxtR:"\u53F3\u5C0D\u9F4A",jusfCellTxt:"\u5DE6\u53F3\u5C0D\u9F4A",alCellTxtT:"\u9802\u7AEF\u5C0D\u9F4A",alCellTxtM:"\u5782\u76F4\u7F6E\u4E2D",alCellTxtB:"\u5E95\u90E8\u5C0D\u9F4A",dimsAlm:"\u5C3A\u5BF8\u8207\u5C0D\u9F4A\u65B9\u5F0F",alTblL:"\u8868\u683C\u5DE6\u5C0D\u9F4A",tblC:"\u8868\u683C\u7F6E\u4E2D",alTblR:"\u8868\u683C\u53F3\u5C0D\u9F4A",save:"\u5132\u5B58",cancel:"\u53D6\u6D88",colorMsg:'\u7121\u6548\u7684\u984F\u8272\uFF0C\u8ACB\u4F7F\u7528 "#FF0000"\u3001"rgb(255,0,0)" \u6216 "red"',dimsMsg:'\u7121\u6548\u7684\u503C\uFF0C\u8ACB\u4F7F\u7528 "10px"\u3001"2em"\u3001"2%" \u6216 "2"',colorPicker:"\u984F\u8272\u9078\u64C7\u5668",removeColor:"\u79FB\u9664\u984F\u8272",black:"\u9ED1\u8272",dimGrey:"\u6DF1\u7070\u8272",grey:"\u7070\u8272",lightGrey:"\u6DFA\u7070\u8272",white:"\u767D\u8272",red:"\u7D05\u8272",orange:"\u6A58\u8272",yellow:"\u9EC3\u8272",lightGreen:"\u6DFA\u7DA0\u8272",green:"\u7DA0\u8272",aquamarine:"\u6D77\u85CD\u8272",turquoise:"\u9752\u7DA0\u8272",lightBlue:"\u6DFA\u85CD\u8272",blue:"\u85CD\u8272",purple:"\u7D2B\u8272"},$r=class{constructor(v){this.config={en_US:to,zh_CN:ko,fr_FR:lo,pl_PL:bt,de_DE:ml,ru_RU:Xs,tr_TR:lp,pt_PT:cp,ja_JP:pp,pt_BR:Ql,cs_CZ:Os,da_DK:Sa,nb_NO:dr,it_IT:Or,sv_SE:Ca,zh_TW:Er},this.init(v);}changeLanguage(v){this.name=v;}init(v){if(v===void 0||typeof v=="string")this.changeLanguage(v||"en_US");else{let{name:_,content:C}=v;C&&this.registry(_,C),_&&this.changeLanguage(_);}}registry(v,_){this.config=Object.assign(Object.assign({},this.config),{[v]:_});}useLanguage(v){return this.config[this.name][v];}},Si=(v=>(v[v.TYPE=3]="TYPE",v[v.LEVEL=12]="LEVEL",v[v.ATTRIBUTE=13]="ATTRIBUTE",v[v.BLOT=14]="BLOT",v[v.INLINE=7]="INLINE",v[v.BLOCK=11]="BLOCK",v[v.BLOCK_BLOT=10]="BLOCK_BLOT",v[v.INLINE_BLOT=6]="INLINE_BLOT",v[v.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",v[v.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",v[v.ANY=15]="ANY",v))(Si||{});class Ee{constructor(_,C,y={}){this.attrName=_,this.keyName=C;let P=Si.TYPE&Si.ATTRIBUTE;this.scope=y.scope!=null?y.scope&Si.LEVEL|P:Si.ATTRIBUTE,y.whitelist!=null&&(this.whitelist=y.whitelist);}static keys(_){return Array.from(_.attributes).map(C=>C.name);}add(_,C){return!!this.canAdd(_,C)&&(_.setAttribute(this.keyName,C),!0);}canAdd(_,C){return this.whitelist==null||(typeof C=="string"?this.whitelist.indexOf(C.replace(/["']/g,""))>-1:this.whitelist.indexOf(C)>-1);}remove(_){_.removeAttribute(this.keyName);}value(_){let C=_.getAttribute(this.keyName);return this.canAdd(_,C)&&C?C:"";}}class De extends Error{constructor(_){super(_="[Parchment] "+_),this.message=_,this.name=this.constructor.name;}}let dt=class uE{constructor(){this.attributes={},this.classes={},this.tags={},this.types={};}static find(_,C=!1){if(_==null)return null;if(this.blots.has(_))return this.blots.get(_)||null;if(C){let y=null;try{y=_.parentNode;}catch(P){return null;}return this.find(y,C);}return null;}create(_,C,y){let P=this.query(C);if(P==null)throw new De(`Unable to create ${C} blot`);let I=P,B=C instanceof Node||C.nodeType===Node.TEXT_NODE?C:I.create(y),H=new I(_,B,y);
28return uE.blots.set(H.domNode,H),H;}find(_,C=!1){return uE.find(_,C);}query(_,C=Si.ANY){let y;return typeof _=="string"?y=this.types[_]||this.attributes[_]:_ instanceof Text||_.nodeType===Node.TEXT_NODE?y=this.types.text:typeof _=="number"?_&Si.LEVEL&Si.BLOCK?y=this.types.block:_&Si.LEVEL&Si.INLINE&&(y=this.types.inline):_ instanceof Element&&((_.getAttribute("class")||"").split(/\s+/).some(P=>(y=this.classes[P],!!y)),y=y||this.tags[_.tagName]),y==null?null:"scope"in y&&C&Si.LEVEL&y.scope&&C&Si.TYPE&y.scope?y:null;}register(..._){return _.map(C=>{let y="blotName"in C,P="attrName"in C;if(!y&&!P)throw new De("Invalid definition");if(y&&C.blotName==="abstract")throw new De("Cannot register abstract class");let I=y?C.blotName:P?C.attrName:void 0;return this.types[I]=C,P?typeof C.keyName=="string"&&(this.attributes[C.keyName]=C):y&&(C.className&&(this.classes[C.className]=C),C.tagName&&(Array.isArray(C.tagName)?C.tagName=C.tagName.map(B=>B.toUpperCase()):C.tagName=C.tagName.toUpperCase(),(Array.isArray(C.tagName)?C.tagName:[C.tagName]).forEach(B=>{(this.tags[B]==null||C.className==null)&&(this.tags[B]=C);}))),C;});}};dt.blots=new WeakMap();let Nt=dt;function Gn(v,_){return(v.getAttribute("class")||"").split(/\s+/).filter(C=>C.indexOf(`${_}-`)===0);}let Vi=class extends Ee{static keys(v){return(v.getAttribute("class")||"").split(/\s+/).map(_=>_.split("-").slice(0,-1).join("-"));}add(v,_){return!!this.canAdd(v,_)&&(this.remove(v),v.classList.add(`${this.keyName}-${_}`),!0);}remove(v){Gn(v,this.keyName).forEach(_=>{v.classList.remove(_);}),v.classList.length===0&&v.removeAttribute("class");}value(v){let _=(Gn(v,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(v,_)?_:"";}};function gi(v){let _=v.split("-"),C=_.slice(1).map(y=>y[0].toUpperCase()+y.slice(1)).join("");return _[0]+C;}let Wo=class extends Ee{static keys(v){return(v.getAttribute("style")||"").split(";").map(_=>_.split(":")[0].trim());}add(v,_){return!!this.canAdd(v,_)&&(v.style[gi(this.keyName)]=_,!0);}remove(v){v.style[gi(this.keyName)]="",v.getAttribute("style")||v.removeAttribute("style");}value(v){let _=v.style[gi(this.keyName)];return this.canAdd(v,_)?_:"";}},_o=class{constructor(v){this.attributes={},this.domNode=v,this.build();}attribute(v,_){_?v.add(this.domNode,_)&&(v.value(this.domNode)!=null?this.attributes[v.attrName]=v:delete this.attributes[v.attrName]):(v.remove(this.domNode),delete this.attributes[v.attrName]);}build(){this.attributes={};let v=Nt.find(this.domNode);if(v==null)return;let _=Ee.keys(this.domNode),C=Vi.keys(this.domNode),y=Wo.keys(this.domNode);_.concat(C).concat(y).forEach(P=>{let I=v.scroll.query(P,Si.ATTRIBUTE);I instanceof Ee&&(this.attributes[I.attrName]=I);});}copy(v){Object.keys(this.attributes).forEach(_=>{let C=this.attributes[_].value(this.domNode);v.format(_,C);});}move(v){this.copy(v),Object.keys(this.attributes).forEach(_=>{this.attributes[_].remove(this.domNode);}),this.attributes={};}values(){return Object.keys(this.attributes).reduce((v,_)=>(v[_]=this.attributes[_].value(this.domNode),v),{});}},ta=class{constructor(v,_){this.scroll=v,this.domNode=_,Nt.blots.set(_,this),this.prev=null,this.next=null;}static create(v){if(this.tagName==null)throw new De("Blot definition missing tagName");let _,C;return Array.isArray(this.tagName)?(typeof v=="string"?(C=v.toUpperCase(),parseInt(C,10).toString()===C&&(C=parseInt(C,10))):typeof v=="number"&&(C=v),_=typeof C=="number"?document.createElement(this.tagName[C-1]):C&&this.tagName.indexOf(C)>-1?document.createElement(C):document.createElement(this.tagName[0])):_=document.createElement(this.tagName),this.className&&_.classList.add(this.className),_;}get statics(){return this.constructor;}attach(){}clone(){let v=this.domNode.cloneNode(!1);return this.scroll.create(v);}detach(){this.parent!=null&&this.parent.removeChild(this),Nt.blots.delete(this.domNode);}deleteAt(v,_){this.isolate(v,_).remove();}formatAt(v,_,C,y){let P=this.isolate(v,_);if(this.scroll.query(C,Si.BLOT)!=null&&y)P.wrap(C,y);else if(this.scroll.query(C,Si.ATTRIBUTE)!=null){let I=this.scroll.create(this.statics.scope);P.wrap(I),I.format(C,y);}}insertAt(v,_,C){let y=C==null?this.scroll.create("text",_):this.scroll.create(_,C),P=this.split(v);this.parent.insertBefore(y,P||void 0);}isolate(v,_){let C=this.split(v);
28if(C==null)throw new Error("Attempt to isolate at end");return C.split(_),C;}length(){return 1;}offset(v=this.parent){return this.parent==null||this===v?0:this.parent.children.offset(this)+this.parent.offset(v);}optimize(v){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName);}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach();}replaceWith(v,_){let C=typeof v=="string"?this.scroll.create(v,_):v;return this.parent!=null&&(this.parent.insertBefore(C,this.next||void 0),this.remove()),C;}split(v,_){return v===0?this:this.next;}update(v,_){}wrap(v,_){let C=typeof v=="string"?this.scroll.create(v,_):v;if(this.parent!=null&&this.parent.insertBefore(C,this.next||void 0),typeof C.appendChild!="function")throw new De(`Cannot wrap ${v}`);return C.appendChild(this),C;}};ta.blotName="abstract";let xi=ta,va=class extends xi{static value(v){return!0;}index(v,_){return this.domNode===v||this.domNode.compareDocumentPosition(v)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(_,1):-1;}position(v,_){let C=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return v>0&&(C+=1),[this.parent.domNode,C];}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0};}};va.scope=Si.INLINE_BLOT;let Do=va;class cs{constructor(){this.head=null,this.tail=null,this.length=0;}append(..._){if(this.insertBefore(_[0],null),_.length>1){let C=_.slice(1);this.append(...C);}}at(_){let C=this.iterator(),y=C();for(;y&&_>0;)_-=1,y=C();return y;}contains(_){let C=this.iterator(),y=C();for(;y;){if(y===_)return!0;y=C();}return!1;}indexOf(_){let C=this.iterator(),y=C(),P=0;for(;y;){if(y===_)return P;P+=1,y=C();}return-1;}insertBefore(_,C){_!=null&&(this.remove(_),_.next=C,C!=null?(_.prev=C.prev,C.prev!=null&&(C.prev.next=_),C.prev=_,C===this.head&&(this.head=_)):this.tail!=null?(this.tail.next=_,_.prev=this.tail,this.tail=_):(_.prev=null,this.head=this.tail=_),this.length+=1);}offset(_){let C=0,y=this.head;for(;y!=null;){if(y===_)return C;C+=y.length(),y=y.next;}return-1;}remove(_){this.contains(_)&&(_.prev!=null&&(_.prev.next=_.next),_.next!=null&&(_.next.prev=_.prev),_===this.head&&(this.head=_.next),_===this.tail&&(this.tail=_.prev),this.length-=1);}iterator(_=this.head){return()=>{let C=_;return _!=null&&(_=_.next),C;};}find(_,C=!1){let y=this.iterator(),P=y();for(;P;){let I=P.length();if(_<I||C&&_===I&&(P.next==null||P.next.length()!==0))return[P,_];_-=I,P=y();}return[null,0];}forEach(_){let C=this.iterator(),y=C();for(;y;)_(y),y=C();}forEachAt(_,C,y){if(C<=0)return;let[P,I]=this.find(_),B=_-I,H=this.iterator(P),ie=H();for(;ie&&B<_+C;){let pe=ie.length();_>B?y(ie,_-B,Math.min(C,B+pe-_)):y(ie,0,Math.min(pe,_+C-B)),B+=pe,ie=H();}}map(_){return this.reduce((C,y)=>(C.push(_(y)),C),[]);}reduce(_,C){let y=this.iterator(),P=y();for(;P;)C=_(C,P),P=y();return C;}}function Vr(v,_){let C=_.find(v);if(C)return C;try{return _.create(v);}catch(y){let P=_.create(Si.INLINE);return Array.from(v.childNodes).forEach(I=>{P.domNode.appendChild(I);}),v.parentNode&&v.parentNode.replaceChild(P.domNode,v),P.attach(),P;}}let co=(()=>{let v=class Tm extends xi{constructor(C,y){super(C,y),this.uiNode=null,this.build();}appendChild(C){this.insertBefore(C);}attach(){super.attach(),this.children.forEach(C=>{C.attach();});}attachUI(C){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=C,Tm.uiClass&&this.uiNode.classList.add(Tm.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild);}build(){this.children=new cs(),Array.from(this.domNode.childNodes).filter(C=>C!==this.uiNode).reverse().forEach(C=>{try{let y=Vr(C,this.scroll);this.insertBefore(y,this.children.head||void 0);}catch(y){if(y instanceof De)return;throw y;}});}deleteAt(C,y){if(C===0&&y===this.length())return this.remove();this.children.forEachAt(C,y,(P,I,B)=>{P.deleteAt(I,B);});}descendant(C,y=0){let[P,I]=this.children.find(y);return C.blotName==null&&C(P)||C.blotName!=null&&P instanceof C?[P,I]:P instanceof Tm?P.descendant(C,I):[null,-1];}descendants(C,y=0,P=Number.MAX_VALUE){let I=[],B=P;
28return this.children.forEachAt(y,P,(H,ie,pe)=>{(C.blotName==null&&C(H)||C.blotName!=null&&H instanceof C)&&I.push(H),H instanceof Tm&&(I=I.concat(H.descendants(C,ie,B))),B-=pe;}),I;}detach(){this.children.forEach(C=>{C.detach();}),super.detach();}enforceAllowedChildren(){let C=!1;this.children.forEach(y=>{C||this.statics.allowedChildren.some(P=>y instanceof P)||(y.statics.scope===Si.BLOCK_BLOT?(y.next!=null&&this.splitAfter(y),y.prev!=null&&this.splitAfter(y.prev),y.parent.unwrap(),C=!0):y instanceof Tm?y.unwrap():y.remove());});}formatAt(C,y,P,I){this.children.forEachAt(C,y,(B,H,ie)=>{B.formatAt(H,ie,P,I);});}insertAt(C,y,P){let[I,B]=this.children.find(C);if(I)I.insertAt(B,y,P);else{let H=P==null?this.scroll.create("text",y):this.scroll.create(y,P);this.appendChild(H);}}insertBefore(C,y){C.parent!=null&&C.parent.children.remove(C);let P=null;this.children.insertBefore(C,y||null),C.parent=this,y!=null&&(P=y.domNode),(this.domNode.parentNode!==C.domNode||this.domNode.nextSibling!==P)&&this.domNode.insertBefore(C.domNode,P),C.attach();}length(){return this.children.reduce((C,y)=>C+y.length(),0);}moveChildren(C,y){this.children.forEach(P=>{C.insertBefore(P,y);});}optimize(C){if(super.optimize(C),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let y=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(y);}else this.remove();}path(C,y=!1){let[P,I]=this.children.find(C,y),B=[[this,C]];return P instanceof Tm?B.concat(P.path(I,y)):(P!=null&&B.push([P,I]),B);}removeChild(C){this.children.remove(C);}replaceWith(C,y){let P=typeof C=="string"?this.scroll.create(C,y):C;return P instanceof Tm&&this.moveChildren(P),super.replaceWith(P);}split(C,y=!1){if(!y){if(C===0)return this;if(C===this.length())return this.next;}let P=this.clone();return this.parent&&this.parent.insertBefore(P,this.next||void 0),this.children.forEachAt(C,this.length(),(I,B,H)=>{let ie=I.split(B,y);ie!=null&&P.appendChild(ie);}),P;}splitAfter(C){let y=this.clone();for(;C.next!=null;)y.appendChild(C.next);return this.parent&&this.parent.insertBefore(y,this.next||void 0),y;}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove();}update(C,y){let P=[],I=[];C.forEach(B=>{B.target===this.domNode&&B.type==="childList"&&(P.push(...B.addedNodes),I.push(...B.removedNodes));}),I.forEach(B=>{if(B.parentNode!=null&&B.tagName!=="IFRAME"&&document.body.compareDocumentPosition(B)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let H=this.scroll.find(B);H!=null&&(H.domNode.parentNode==null||H.domNode.parentNode===this.domNode)&&H.detach();}),P.filter(B=>B.parentNode===this.domNode&&B!==this.uiNode).sort((B,H)=>B===H?0:B.compareDocumentPosition(H)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(B=>{let H=null;B.nextSibling!=null&&(H=this.scroll.find(B.nextSibling));let ie=Vr(B,this.scroll);(ie.next!==H||ie.next==null)&&(ie.parent!=null&&ie.parent.removeChild(this),this.insertBefore(ie,H||void 0));}),this.enforceAllowedChildren();}};return v.uiClass="",v;})(),Gr=class I_ extends co{static create(_){return super.create(_);}static formats(_,C){let y=C.query(I_.blotName);if(y==null||_.tagName!==y.tagName){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return _.tagName.toLowerCase();}}constructor(_,C){super(_,C),this.attributes=new _o(this.domNode);}format(_,C){if(_!==this.statics.blotName||C){let y=this.scroll.query(_,Si.INLINE);if(y==null)return;y instanceof Ee?this.attributes.attribute(y,C):C&&(_!==this.statics.blotName||this.formats()[_]!==C)&&this.replaceWith(_,C);}else this.children.forEach(y=>{y instanceof I_||(y=y.wrap(I_.blotName,!0)),this.attributes.copy(y);}),this.unwrap();}formats(){let _=this.attributes.values(),C=this.statics.formats(this.domNode,this.scroll);return C!=null&&(_[this.statics.blotName]=C),_;}formatAt(_,C,y,P){this.formats()[y]!=null||this.scroll.query(y,Si.ATTRIBUTE)?this.isolate(_,C).format(y,P):super.formatAt(_,C,y,P);}optimize(_){super.optimize(_);let C=this.formats();if(Object.keys(C).length===0)return this.unwrap();let y=this.next;y instanceof I_&&y.prev===this&&function(P,I){if(Object.keys(P).length!==Object.keys(I).length)return!1;for(let B in P)if(P[B]!==I[B])return!1;return!0;}(C,y.formats())&&(y.moveChildren(this),y.remove());}replaceWith(_,C){let y=super.replaceWith(_,C);return this.attributes.copy(y),y;}update(_,C){super.update(_,C),_.some(y=>y.target===this.domNode&&y.type==="attributes")&&this.attributes.build();}wrap(_,C){let y=super.wrap(_,C);return y instanceof I_&&this.attributes.move(y),y;}};Gr.allowedChildren=[Gr,Do],Gr.blotName="inline",Gr.scope=Si.INLINE_BLOT,Gr.tagName="SPAN";let Ie=Gr,ae=class fE extends co{static create(_){return super.create(_);}static formats(_,C){let y=C.query(fE.blotName);if(y==null||_.tagName!==y.tagName){if(typeof this.tagName=="string")return!0;
28if(Array.isArray(this.tagName))return _.tagName.toLowerCase();}}constructor(_,C){super(_,C),this.attributes=new _o(this.domNode);}format(_,C){let y=this.scroll.query(_,Si.BLOCK);y!=null&&(y instanceof Ee?this.attributes.attribute(y,C):_!==this.statics.blotName||C?C&&(_!==this.statics.blotName||this.formats()[_]!==C)&&this.replaceWith(_,C):this.replaceWith(fE.blotName));}formats(){let _=this.attributes.values(),C=this.statics.formats(this.domNode,this.scroll);return C!=null&&(_[this.statics.blotName]=C),_;}formatAt(_,C,y,P){this.scroll.query(y,Si.BLOCK)!=null?this.format(y,P):super.formatAt(_,C,y,P);}insertAt(_,C,y){if(y==null||this.scroll.query(C,Si.INLINE)!=null)super.insertAt(_,C,y);else{let P=this.split(_);if(P==null)throw new Error("Attempt to insertAt after block boundaries");{let I=this.scroll.create(C,y);P.parent.insertBefore(I,P);}}}replaceWith(_,C){let y=super.replaceWith(_,C);return this.attributes.copy(y),y;}update(_,C){super.update(_,C),_.some(y=>y.target===this.domNode&&y.type==="attributes")&&this.attributes.build();}};ae.blotName="block",ae.scope=Si.BLOCK_BLOT,ae.tagName="P",ae.allowedChildren=[Ie,ae,Do];let Ce=ae,Le=class extends co{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName;}deleteAt(v,_){super.deleteAt(v,_),this.enforceAllowedChildren();}formatAt(v,_,C,y){super.formatAt(v,_,C,y),this.enforceAllowedChildren();}insertAt(v,_,C){super.insertAt(v,_,C),this.enforceAllowedChildren();}optimize(v){super.optimize(v),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove());}};Le.blotName="container",Le.scope=Si.BLOCK_BLOT;let _t=Le,wn=class extends Do{static formats(v,_){}format(v,_){super.formatAt(0,this.length(),v,_);}formatAt(v,_,C,y){v===0&&_===this.length()?this.format(C,y):super.formatAt(v,_,C,y);}formats(){return this.statics.formats(this.domNode,this.scroll);}},fn={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},vn=class extends co{constructor(v,_){super(null,_),this.registry=v,this.scroll=this,this.build(),this.observer=new MutationObserver(C=>{this.update(C);}),this.observer.observe(this.domNode,fn),this.attach();}create(v,_){return this.registry.create(this,v,_);}find(v,_=!1){let C=this.registry.find(v,_);return C?C.scroll===this?C:_?this.find(C.scroll.domNode.parentNode,!0):null:null;}query(v,_=Si.ANY){return this.registry.query(v,_);}register(...v){return this.registry.register(...v);}build(){this.scroll!=null&&super.build();}detach(){super.detach(),this.observer.disconnect();}deleteAt(v,_){this.update(),v===0&&_===this.length()?this.children.forEach(C=>{C.remove();}):super.deleteAt(v,_);}formatAt(v,_,C,y){this.update(),super.formatAt(v,_,C,y);}insertAt(v,_,C){this.update(),super.insertAt(v,_,C);}optimize(v=[],_={}){super.optimize(_);let C=_.mutationsMap||new WeakMap(),y=Array.from(this.observer.takeRecords());for(;y.length>0;)v.push(y.pop());let P=(H,ie=!0)=>{H==null||H===this||H.domNode.parentNode!=null&&(C.has(H.domNode)||C.set(H.domNode,[]),ie&&P(H.parent));},I=H=>{C.has(H.domNode)&&(H instanceof co&&H.children.forEach(I),C.delete(H.domNode),H.optimize(_));},B=v;for(let H=0;B.length>0;H+=1){if(H>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(B.forEach(ie=>{let pe=this.find(ie.target,!0);pe!=null&&(pe.domNode===ie.target&&(ie.type==="childList"?(P(this.find(ie.previousSibling,!1)),Array.from(ie.addedNodes).forEach(ue=>{let K=this.find(ue,!1);P(K,!1),K instanceof co&&K.children.forEach(Me=>{P(Me,!1);});})):ie.type==="attributes"&&P(pe.prev)),P(pe));}),this.children.forEach(I),B=Array.from(this.observer.takeRecords()),y=B.slice();y.length>0;)v.push(y.pop());}}update(v,_={}){v=v||this.observer.takeRecords();let C=new WeakMap();v.map(y=>{let P=this.find(y.target,!0);return P==null?null:C.has(P.domNode)?(C.get(P.domNode).push(y),null):(C.set(P.domNode,[y]),P);}).forEach(y=>{y!=null&&y!==this&&C.has(y.domNode)&&y.update(C.get(y.domNode)||[],_);}),_.mutationsMap=C,C.has(this.domNode)&&super.update(C.get(this.domNode),_),this.optimize(v,_);}};vn.blotName="scroll",vn.defaultChild=Ce,vn.allowedChildren=[Ce,_t],vn.scope=Si.BLOCK_BLOT,vn.tagName="DIV";let Wi=class t9 extends Do{static create(_){return document.createTextNode(_);}static value(_){return _.data;}constructor(_,C){super(_,C),this.text=this.statics.value(this.domNode);}deleteAt(_,C){this.domNode.data=this.text=this.text.slice(0,_)+this.text.slice(_+C);}index(_,C){return this.domNode===_?C:-1;}insertAt(_,C,y){y==null?(this.text=this.text.slice(0,_)+C+this.text.slice(_),this.domNode.data=this.text):super.insertAt(_,C,y);}length(){return this.text.length;}optimize(_){super.optimize(_),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof t9&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove());}position(_,C=!1){return[this.domNode,_];}split(_,C=!1){if(!C){if(_===0)return this;if(_===this.length())return this.next;}let y=this.scroll.create(this.domNode.splitText(_));return this.parent.insertBefore(y,this.next||void 0),this.text=this.statics.value(this.domNode),y;}update(_,C){_.some(y=>y.type==="characterData"&&y.target===this.domNode)&&(this.text=this.statics.value(this.domNode));}value(){return this.text;}};Wi.blotName="text",Wi.scope=Si.INLINE_BLOT;let Xi=["bold","italic","underline","strike","size","color","background","font","list","header","align","link","image"],Ii=["link","image"];var kn,Mi,on,Xn,Oi,na=class{constructor(v,_){this.quill=v,this.selectedTds=[],this.startTd=null,this.endTd=null,this.disabledList=[],this.singleList=[],this.tableBetter=_,this.quill.root.addEventListener("click",this.handleClick.bind(this)),this.initDocumentListener(),this.initWhiteList(
28);}attach(v){let _=Array.from(v.classList).find(I=>I.indexOf("ql-")===0);if(!_)return;let[C,y]=this.getButtonsWhiteList(),P=this.getCorrectDisabled(v,_);_=_.slice(3),C.includes(_)||this.disabledList.push(...P),y.includes(_)&&this.singleList.push(...P);}clearSelected(){for(let v of this.selectedTds)v.classList&&v.classList.remove("ql-cell-focused","ql-cell-selected");this.selectedTds=[],this.startTd=null,this.endTd=null;}exitTableFocus(v,_){let C=Ke(v).table(),y=_?-1:C.length(),P=C.offset(this.quill.scroll)+y;this.tableBetter.hideTools(),this.quill.setSelection(P,0,r().sources.USER);}getButtonsWhiteList(){let{options:v={}}=this.tableBetter,{toolbarButtons:_={}}=v,{whiteList:C=Xi,singleWhiteList:y=Ii}=_;return[C,y];}getCopyColumns(v){let _=v.querySelector("tr");return Array.from(_.querySelectorAll("td,th")).reduce((C,y)=>C+(~~y.getAttribute("colspan")||1),0);}getCopyData(){let v=r().find(this.selectedTds[0]).table();if(v.descendants(Ne).length===this.selectedTds.length){let y=v.getCopyTable();return{html:y,text:this.getText(y)};}let _="",C={};for(let y of this.selectedTds){let P=y.getAttribute("data-row");C[P]||(C[P]=[]),C[P].push(y);}for(let y of Object.values(C)){let P="";for(let I of y)P+=je(I.outerHTML);P=`<tr>${P}</tr>`,_+=P;}return _=`<table><tbody>${_}</tbody></table>`,_=v.getCopyTable(_),{html:_,text:this.getText(_)};}getCorrectDisabled(v,_){if(v.tagName!=="SELECT")return[v];let C=v.closest("span.ql-formats");return C?[...C.querySelectorAll(`span.${_}.ql-picker`),v]:[v];}getCorrectRow(v,_){let C=_==="next"?0:-1,y=(~~v.getAttribute("rowspan")||1)+C||1,P=r().find(v).parent;for(;P&&y;)P=P[_],y--;return P?.domNode;}getCorrectValue(v,_){for(let C of this.selectedTds){let y=r().find(C).html()||C.outerHTML,P=this.quill.clipboard.convert({html:y,text:` 29`});for(let I of P.ops)if(!this.isContinue(I)&&(_=this.getListCorrectValue(v,_,I?.attributes))!=(I?.attributes&&I?.attributes[v]||!1))return _;}return!_;}getListCorrectValue(v,_,C={}){return v!=="list"?_:_==="check"?C[v]!=="checked"&&C[v]!=="unchecked"&&"unchecked":_;}getPasteComputeBounds(v,_,C){let y=v.getBoundingClientRect(),P=_.getBoundingClientRect(),I=C.domNode.getBoundingClientRect(),B=this.quill.container.getBoundingClientRect(),H=this.quill.container.scrollLeft,ie=this.quill.container.scrollTop;return{left:y.left-B.left-H,right:P.right-B.left-H,top:y.top-B.top-ie,bottom:I.bottom-B.top-ie};}getPasteInfo(v,_,C){let y=0,P=null,I=null,B=v.parentElement;for(;v;){if(y+=~~v.getAttribute("colspan")||1,y>=_){y=_,P=v;break;}v=v.nextElementSibling;}for(;--C;){if(!B.nextElementSibling){I=B.firstElementChild;break;}B=B.nextElementSibling;}return[{clospan:Math.abs(_-y),cloTd:P},{rowspan:C,rowTd:I}];}getPasteLastRow(v,_){for(;--_&&v;)v=v.next;return v;}getPasteTds(v){let _={};for(let C of v){let y=C.getAttribute("data-row");_[y]||(_[y]=[]),_[y].push(C);}return Object.values(_);}getTableArrowVerticalRow(v,_){var C,y;let P=v.table(),I=P.tbody(),B=P.thead(),H=_?"prev":"next",ie=v.parent.statics.blotName,pe=v.parent[H];return!pe&&_&&ie===Oe.blotName&&(pe=(C=B?.children)===null||C===void 0?void 0:C.tail),pe||_||ie!==ct.blotName||(pe=(y=I?.children)===null||y===void 0?void 0:y.head),pe;}getText(v){return this.quill.clipboard.convert({html:v}).filter(_=>typeof _.insert=="string").map(_=>_.insert).join("");}handleClick(v){if(v.detail<3||!this.selectedTds.length)return;let{index:_,length:C}=this.quill.getSelection(!0);this.quill.setSelection(_,C-1,r().sources.SILENT),this.quill.scrollSelectionIntoView();}handleDeleteKeyup(v){var _;((_=this.selectedTds)===null||_===void 0?void 0:_.length)<2||v.key!=="Backspace"&&v.key!=="Delete"||(v.ctrlKey?(this.tableBetter.tableMenus.deleteColumn(!0),this.tableBetter.tableMenus.deleteRow(!0)):this.removeSelectedTdsContent());}handleKeyup(v){switch(v.key){case"ArrowLeft":case"ArrowRight":this.makeTableArrowLevelHandler(v.key);break;case"ArrowUp":case"ArrowDown":this.makeTableArrowVerticalHandler(v.key);}}handleMousedown(v){let _=v.target.closest("table");if(!_)return;this.tableBetter.tableMenus.destroyTablePropertiesForm();let C=v.target.closest("td,th");if(!C)return;this.clearSelected(),this.startTd=C,this.endTd=C,this.selectedTds=[C],C.classList.add("ql-cell-focused"),this.setHeaderRowSwitch(),this.setMenuDisable("merge");let y=I=>{let B=I.target.closest("td,th");if(!B)return;let H=C.isEqualNode(B);if(H)return;this.clearSelected(),this.startTd=C,this.endTd=B;let ie=et(ke(C,this.quill.container),ke(B,this.quill.container));this.selectedTds=ft(ie,_,this.quill.container);for(let pe of this.selectedTds)pe.classList&&pe.classList.add("ql-cell-selected");H||this.quill.blur();},P=I=>{this.setSingleDisabled(),this.setCorrectPositionTds(this.startTd,this.endTd,this.selectedTds),this.setHeaderRowSwitch(),this.setMenuDisable("merge"),this.quill.root.removeEventListener("mousemove",y),this.quill.root.removeEventListener("mouseup",P);};this.quill.root.addEventListener("mousemove",y),this.quill.root.addEventListener("mouseup",P);}hasTdTh(v){return{hasTd:v.some(_=>_.tagName==="TD"),hasTh:v.some(_=>_.tagName==="TH")};}initDocumentListener(){document.addEventListener("copy",v=>this.onCaptureCopy(v,!1)),document.addEventListener("cut",v=>this.onCaptureCopy(v,!0)),document.addEventListener("keyup",this.handleDeleteKeyup.bind(this)),document.addEventListener("paste",this.onCapturePaste.bind(this));}
29initWhiteList(){let v=this.quill.getModule("toolbar");Array.from(v.container.querySelectorAll("button, select")).forEach(_=>{this.attach(_);});}insertColumnCell(v,_){let C=v.tbody();C&&C.children.forEach(y=>{let P=y.children.tail.domNode.getAttribute("data-row");for(let I=0;I<_;I++)v.insertColumnCell(y,P,null);});}insertRow(v,_,C){let y=r().find(C).rowOffset();for(;_--;)v.insertRow(y+1,1);}insertWith(v){return typeof v=="string"&&v.startsWith(` 30`)&&v.endsWith(` 31`);}isContinue(v){return!(!this.insertWith(v.insert)||v.attributes&&!v.attributes["table-list"]&&!v.attributes["table-header"]);}lines(v){let _=C=>{let y=[];return C.children.forEach(P=>{P instanceof _t?y=y.concat(_(P)):function(I){return I instanceof Ce||I instanceof wn;}(P)&&y.push(P);}),y;};return _(v);}makeTableArrowLevelHandler(v){let _=v==="ArrowLeft"?this.startTd:this.endTd,C=this.quill.getSelection();if(!C)return;let[y]=this.quill.getLine(C.index),P=Ke(y);if(!P)return this.tableBetter.hideTools();!P||_&&_.isEqualNode(P.domNode)||(this.setSelected(P.domNode,!1),this.tableBetter.showTools(!1));}makeTableArrowVerticalHandler(v){let _=v==="ArrowUp",C=this.quill.getSelection();if(!C)return;let[y,P]=this.quill.getLine(C.index),I=_?"prev":"next";if(y[I]&&this.selectedTds.length){let B=y[I].offset(this.quill.scroll)+Math.min(P,y[I].length()-1);this.quill.setSelection(B,0,r().sources.USER);}else{if(!this.selectedTds.length){let K=Ke(y);return K?(this.tableArrowSelection(_,K),void this.tableBetter.showTools(!1)):void 0;}let B=_?this.startTd:this.endTd,H=r().find(B),ie=this.getTableArrowVerticalRow(H,_),{left:pe,right:ue}=B.getBoundingClientRect();if(ie){let K=null,Me=ie;for(;Me&&!K;){let ze=Me.children.head;for(;ze;){let{left:ot,right:Ct}=ze.domNode.getBoundingClientRect();if(Math.abs(ot-pe)<=2){K=ze;break;}if(Math.abs(Ct-ue)<=2){K=ze;break;}ze=ze.next;}Me=Me[I];}K?this.tableArrowSelection(_,K):this.exitTableFocus(y,_);}else this.exitTableFocus(y,_);}}onCaptureCopy(v,_=!1){var C,y,P;if(((C=this.selectedTds)===null||C===void 0?void 0:C.length)<2||v.defaultPrevented)return;v.preventDefault();let{html:I,text:B}=this.getCopyData();(y=v.clipboardData)===null||y===void 0||y.setData("text/plain",B),(P=v.clipboardData)===null||P===void 0||P.setData("text/html",I),_&&this.removeSelectedTdsContent();}onCapturePaste(v){var _,C,y;if(!(!((_=this.selectedTds)===null||_===void 0)&&_.length))return;v.preventDefault();let P=(C=v.clipboardData)===null||C===void 0?void 0:C.getData("text/html"),I=((y=v.clipboardData)===null||y===void 0||y.getData("text/plain"),document.createElement("div"));I.innerHTML=P;let B=Array.from(I.querySelectorAll("tr"));if(!B.length)return;let H=r().find(this.startTd),ie=H.row(),pe=H.table();this.quill.history.cutoff();let ue=this.getCopyColumns(I),[K,Me]=this.getPasteInfo(this.startTd,ue,B.length),{clospan:ze,cloTd:ot}=K,{rowspan:Ct,rowTd:dn}=Me;ze&&this.insertColumnCell(pe,ze),Ct&&this.insertRow(pe,Ct,dn);let Dn=ze?ie.children.tail.domNode:ot,jn=this.getPasteLastRow(ie,B.length),Qn=this.getPasteComputeBounds(this.startTd,Dn,jn),uo=this.getPasteTds(ft(Qn,pe.domNode,this.quill.container)),Da=B.reduce((Ir,Ns)=>(Ir.push(Array.from(Ns.querySelectorAll("td,th"))),Ir),[]),_l=[];for(;Da.length;){let Ir=Da.shift(),Ns=uo.shift(),gl=null,up=null;for(;Ir.length;){let VE=Ir.shift(),kw=Ns.shift();if(kw)gl=kw,up=this.pasteSelectedTd(kw,VE);else{let F9=gl.getAttribute("data-row"),GE=r().find(gl);up=pe.insertColumnCell(GE.parent,F9,GE.next),up=this.pasteSelectedTd(up.domNode,VE),gl=up.domNode;}up&&_l.push(up.domNode);}for(;Ns.length;)Ns.shift().remove();}this.quill.blur(),this.setSelectedTds(_l),this.tableBetter.tableMenus.updateMenus(),this.quill.scrollSelectionIntoView();}pasteSelectedTd(v,_){let C=v.getAttribute("data-row"),y=Ne.formats(_);Object.assign(y,{"data-row":C});let P=r().find(v),I=P.replaceWith(P.statics.blotName,y);this.quill.setSelection(I.offset(this.quill.scroll)+I.length()-1,0,r().sources.USER);let B=this.quill.getSelection(!0),H=this.quill.getFormat(B.index),ie=_.innerHTML,pe=this.getText(ie),ue=this.quill.clipboard.convert({text:pe,html:ie}),K=new(p())().retain(B.index).delete(B.length).concat(mi(ue,H));return this.quill.updateContents(K,r().sources.USER),I;}
31removeCursor(){let v=this.quill.getSelection(!0);v&&v.length===0&&(this.quill.selection.cursor.remove(),this.quill.blur());}removeSelectedTdContent(v){let _=r().find(v),C=_.children.head,y=C.formats()[Je.blotName],P=this.quill.scroll.create(Je.blotName,y);for(_.insertBefore(P,C);C;)C.remove(),C=C.next;}removeSelectedTdsContent(){if(!(this.selectedTds.length<2)){for(let v of this.selectedTds)this.removeSelectedTdContent(v);this.tableBetter.tableMenus.updateMenus();}}setCorrectPositionTds(v,_,C){if(!v||!_||C.length<2)return;let y=C[0],P=C[C.length-1],I=[...new Set([v,_,y,P])];I.sort((B,H)=>{let ie=B.getBoundingClientRect(),pe=H.getBoundingClientRect();return(ie.top<=pe.top||ie.bottom<=pe.bottom)&&(ie.left<=pe.left||ie.right<=pe.right)?-1:1;}),this.startTd=I[0],this.endTd=I[I.length-1];}setDisabled(v){for(let _ of this.disabledList)v?_.classList.add("ql-table-button-disabled"):_.classList.remove("ql-table-button-disabled");this.setSingleDisabled();}setHeaderRowSwitch(){let{hasTd:v,hasTh:_}=this.hasTdTh(this.selectedTds);_&&!v?this.tableBetter.tableMenus.toggleHeaderRowSwitch("true"):this.tableBetter.tableMenus.toggleHeaderRowSwitch("false");}setMenuDisable(v){let{hasTd:_,hasTh:C}=this.hasTdTh(this.selectedTds),y=_&&C;this.tableBetter.tableMenus.disableMenu(v,y);}setSelected(v,_=!0){let C=r().find(v);this.clearSelected(),this.startTd=v,this.endTd=v,this.selectedTds=[v],v.classList.add("ql-cell-focused"),_&&this.quill.setSelection(C.offset(this.quill.scroll)+C.length()-1,0,r().sources.USER);}setSelectedTds(v){this.clearSelected(),this.startTd=v[0],this.endTd=v[v.length-1],this.selectedTds=v;for(let _ of this.selectedTds)_.classList&&_.classList.add("ql-cell-selected");}setSelectedTdsFormat(v,_){let C=[],y=this.quill.getModule("toolbar");for(let P of this.selectedTds)if(y.handlers[v]!=null){let I=r().find(P),B=this.lines(I),H=y.handlers[v].call(y,_,B);H&&C.push(Ke(H).domNode);}else{let I=window.getSelection();I.selectAllChildren(P),this.quill.format(v,_,r().sources.USER),I.removeAllRanges();}this.quill.blur(),C.length&&this.setSelectedTds(C);}setSingleDisabled(){for(let v of this.singleList)this.selectedTds.length>1?v.classList.add("ql-table-button-disabled"):v.classList.remove("ql-table-button-disabled");}tableArrowSelection(v,_){let C=v?"tail":"head",y=v?_.children[C].length()-1:0;this.setSelected(_.domNode,!1);let P=_.children[C].offset(this.quill.scroll)+y;this.quill.setSelection(P,0,r().sources.USER);}updateSelected(v){switch(v){case"column":{let _=this.endTd.nextElementSibling||this.startTd.previousElementSibling;if(!_)return this.tableBetter.hideTools();this.setSelected(_);}break;case"row":{let _=this.getCorrectRow(this.endTd,"next")||this.getCorrectRow(this.startTd,"prev");if(!_)return this.tableBetter.hideTools();let C=ke(this.startTd,this.quill.container),y=_.firstElementChild;for(;y;){let P=ke(y,this.quill.container);if(P.left+2>=C.left||P.right-2>=C.left)return void this.setSelected(y);y=y.nextElementSibling;}this.setSelected(_.firstElementChild);}}}},Es=class{constructor(v,_){this.quill=v,this.options=null,this.drag=!1,this.line=null,this.dragBlock=null,this.dragTable=null,this.direction=null,this.tableBetter=_,this.quill.root.addEventListener("mousemove",this.handleMouseMove.bind(this));}createDragBlock(){let v=document.createElement("div");v.classList.add("ql-operate-block");let{dragBlockProps:_}=this.getProperty(this.options);D(v,_),this.dragBlock=v,this.quill.container.appendChild(v),this.updateCell(v);}createDragTable(v){let _=document.createElement("div"),C=this.getDragTableProperty(v);_.classList.add("ql-operate-drag-table"),D(_,C),this.dragTable=_,this.quill.container.appendChild(_);}createOperateLine(){let v=document.createElement("div"),_=document.createElement("div");v.classList.add("ql-operate-line-container");let{containerProps:C,lineProps:y}=this.getProperty(this.options);D(v,C),D(_,y),v.appendChild(_),this.quill.container.appendChild(v),this.line=v,this.updateCell(v);}getCorrectCol(v,_){let C=v.children.head;for(;C&&--_;)C=C.next;return C;}getDragTableProperty(v){let{left:_,top:C,width:y,height:P}=v.getBoundingClientRect(),I=this.quill.container.getBoundingClientRect();
31return{left:_-I.left+"px",top:C-I.top+"px",width:`${y}px`,height:`${P}px`,display:"block"};}getLevelColSum(v){let _=v,C=0;for(;_;)C+=~~_.getAttribute("colspan")||1,_=_.previousSibling;return C;}getMaxColNum(v){let _=v.parentElement.children,C=0;for(let y of _)C+=~~y.getAttribute("colspan")||1;return C;}getProperty(v){let _=this.quill.container.getBoundingClientRect(),{tableNode:C,cellNode:y,mousePosition:P}=v,{clientX:I,clientY:B}=P,H=C.getBoundingClientRect(),ie=y.getBoundingClientRect(),pe=ie.left+ie.width,ue=ie.top+ie.height,K={width:"8px",height:"8px",top:H.bottom-_.top+"px",left:H.right-_.left+"px",display:H.bottom>_.bottom?"none":"block"};return Math.abs(pe-I)<=5?(this.direction="level",{dragBlockProps:K,containerProps:{width:"5px",height:`${_.height}px`,top:"0",left:pe-_.left-2.5+"px",display:"flex",cursor:"col-resize"},lineProps:{width:"1px",height:"100%"}}):Math.abs(ue-B)<=5?(this.direction="vertical",{dragBlockProps:K,containerProps:{width:`${_.width}px`,height:"5px",top:ue-_.top-2.5+"px",left:"0",display:"flex",cursor:"row-resize"},lineProps:{width:"100%",height:"1px"}}):(this.hideLine(),{dragBlockProps:K});}getVerticalCells(v,_){let C=v.parentElement;for(;_>1&&C;)C=C.nextSibling,_--;return C.children;}handleMouseMove(v){if(!this.quill.isEnabled())return;let _=v.target.closest("table");if(_&&!this.quill.root.contains(_))return;let C=v.target.closest("td,th"),y={clientX:v.clientX,clientY:v.clientY};if(!_||!C)return void(this.line&&!this.drag&&(this.hideLine(),this.hideDragBlock()));let P={tableNode:_,cellNode:C,mousePosition:y};if(this.line){if(this.drag||!C)return;this.updateProperty(P);}else this.options=P,this.createOperateLine(),this.createDragBlock();}hideDragBlock(){this.dragBlock&&D(this.dragBlock,{display:"none"});}hideDragTable(){this.dragTable&&D(this.dragTable,{display:"none"});}hideLine(){this.line&&D(this.line,{display:"none"});}isLine(v){return v.classList.contains("ql-operate-line-container");}setCellLevelRect(v,_){let{right:C}=v.getBoundingClientRect(),y=~~(_-C),P=this.getLevelColSum(v),I=r().find(v).table(),B=I.isPercent(),H=I.colgroup(),ie=I.domNode.getBoundingClientRect();if(H){let pe=this.getCorrectCol(H,P),ue=pe.next,{width:K}=pe.domNode.getBoundingClientRect();if(this.setColWidth(pe.domNode,`${K+y}`,B),ue){let{width:Me}=ue.domNode.getBoundingClientRect();this.setColWidth(ue.domNode,""+(Me-y),B);}}else{let pe=v.nextElementSibling==null,ue=v.parentElement.parentElement.children,K=[];for(let Me of ue){let ze=Me.children;if(pe){let Ct=ze[ze.length-1],{width:dn}=Ct.getBoundingClientRect();K.push([Ct,""+~~(dn+y)]);continue;}let ot=0;for(let Ct of ze){if(ot+=~~Ct.getAttribute("colspan")||1,ot>P)break;if(ot===P){let{width:dn}=Ct.getBoundingClientRect(),Dn=Ct.nextElementSibling;if(!Dn)continue;let{width:jn}=Dn.getBoundingClientRect();K.push([Ct,""+~~(dn+y)],[Dn,""+~~(jn-y)]);}}}for(let[Me,ze]of K){let ot=Se(~~ze,B);Z(Me,{width:ot}),D(Me,{width:ot});}}v.nextElementSibling==null&&F(I.domNode,ie,y);}setCellRect(v,_,C){this.direction==="level"?this.setCellLevelRect(v,_):this.direction==="vertical"&&this.setCellVerticalRect(v,C);}setCellsRect(v,_,C){let y=v.parentElement.parentElement.children,P=_/this.getMaxColNum(v),I=C/y.length,B=[],H=r().find(v).table(),ie=H.isPercent(),pe=H.colgroup(),ue=H.domNo
31de.getBoundingClientRect();for(let K of y){let Me=K.children;for(let ze of Me){let ot=~~ze.getAttribute("colspan")||1,{width:Ct,height:dn}=ze.getBoundingClientRect();B.push([ze,`${Math.ceil(Ct+P*ot)}`,`${Math.ceil(dn+I)}`]);}}if(pe){let K=pe.children.head;for(let[Me,,ze]of B)Z(Me,{height:ze}),D(Me,{height:`${ze}px`});for(;K;){let{width:Me}=K.domNode.getBoundingClientRect();this.setColWidth(K.domNode,`${Math.ceil(Me+P)}`,ie),K=K.next;}}else for(let[K,Me,ze]of B){let ot=Se(~~Me,ie);Z(K,{height:ze,width:ot}),D(K,{height:ze,width:ot});}F(H.domNode,ue,_);}setColWidth(v,_,C){C?(_=Se(parseFloat(_),C),v.style.setProperty("width",_)):Z(v,{width:_});}setCellVerticalRect(v,_){let C=~~v.getAttribute("rowspan")||1,y=C>1?this.getVerticalCells(v,C):v.parentElement.children;for(let P of y){let{top:I}=P.getBoundingClientRect(),B=""+~~(_-I);Z(P,{height:B}),D(P,{height:`${B}px`});}}toggleLineChildClass(v){let _=this.line.firstElementChild;v?_.classList.add("ql-operate-line"):_.classList.remove("ql-operate-line");}updateCell(v){if(!v)return;let _=this.isLine(v),C=P=>{P.preventDefault(),this.drag&&(_?(this.updateDragLine(P.clientX,P.clientY),this.hideDragBlock()):(this.updateDragBlock(P.clientX,P.clientY),this.hideLine()));},y=P=>{P.preventDefault();let{cellNode:I,tableNode:B}=this.options;if(_)this.setCellRect(I,P.clientX,P.clientY),this.toggleLineChildClass(!1);else{let{right:H,bottom:ie}=B.getBoundingClientRect(),pe=P.clientX-H,ue=P.clientY-ie;this.setCellsRect(I,pe,ue),this.dragBlock.classList.remove("ql-operate-block-move"),this.hideDragBlock(),this.hideDragTable();}this.drag=!1,document.removeEventListener("mousemove",C,!1),document.removeEventListener("mouseup",y,!1),this.tableBetter.tableMenus.updateMenus(B);};v.addEventListener("mousedown",P=>{P.preventDefault();let{tableNode:I}=this.options;if(_)this.toggleLineChildClass(!0);else if(this.dragTable){let B=this.getDragTableProperty(I);D(this.dragTable,B);}else this.createDragTable(I);this.drag=!0,document.addEventListener("mousemove",C),document.addEventListener("mouseup",y);});}updateDragBlock(v,_){let C=this.quill.container.getBoundingClientRect();this.dragBlock.classList.add("ql-operate-block-move"),D(this.dragBlock,{top:~~(_-C.top-4)+"px",left:~~(v-C.left-4)+"px"}),this.updateDragTable(v,_);}updateDragLine(v,_){let C=this.quill.container.getBoundingClientRect();this.direction==="level"?D(this.line,{left:~~(v-C.left-2.5)+"px"}):this.direction==="vertical"&&D(this.line,{top:~~_-C.top-2.5+"px"});}updateDragTable(v,_){let{top:C,left:y}=this.dragTable.getBoundingClientRect(),P=v-y,I=_-C;D(this.dragTable,{width:`${P}px`,height:`${I}px`,display:"block"});}updateProperty(v){let{containerProps:_,lineProps:C,dragBlockProps:y}=this.getProperty(v);_&&C&&(this.options=v,D(this.line,_),D(this.line.firstChild,C),D(this.dragBlock,y));}},$a='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1692084293475" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2632" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M1012.62222223 944.76190506a78.01904747 78.01904747 0 0 1-78.01904747 78.01904747H76.3936505a78.01904747 78.01904747 0 0 1-78.01904747-78.01904747V86.55238079a78.01904747 78.01904747 0 0 1 78.01904747-78.01904746h858.20952426a78.01904747 78.01904747 0 0 1 78.01904747 78.01904746v858.20952427zM466.4888889 554.66666666H76.3936505v390.0952384h390.0952384V554.66666666z m468.11428586 0H544.50793636v390.0952384h390.0952384V554.66666666zM466.4888889 86.55238079H76.3936505v390.0952384h390.0952384V86.55238079z m468.11428586 0H544.50793636v390.0952384h390.0952384V86.55238079z" fill="#515151" p-id="2633"></path></svg>',ui='<?xml version="1.0" encoding="UTF-8"?><svg width="18" height="18" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M36 18L24 30L12 18" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',ia={},ps=[],k_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;function Di(v,_){for(var C in _)v[C]=_[C];return v;}function po(v){var _=v.parentNode;_&&_.removeChild(v);}function mo(v,_,C){var y,P,I,B,H=arguments;if(_=Di({},_),arguments.length>
313)for(C=[C],y=3;y<arguments.length;y++)C.push(H[y]);if(C!=null&&(_.children=C),v!=null&&v.defaultProps!=null)for(P in v.defaultProps)_[P]===void 0&&(_[P]=v.defaultProps[P]);return B=_.key,(I=_.ref)!=null&&delete _.ref,B!=null&&delete _.key,ul(v,_,B,I);}function ul(v,_,C,y){var P={type:v,props:_,key:C,ref:y,__k:null,__p:null,__b:0,__e:null,l:null,__c:null,constructor:void 0};return kn.vnode&&kn.vnode(P),P;}function Qp(v){return v.children;}function or(v,_){this.props=v,this.context=_;}function Ts(v,_){if(_==null)return v.__p?Ts(v.__p,v.__p.__k.indexOf(v)+1):null;for(var C;_<v.__k.length;_++)if((C=v.__k[_])!=null&&C.__e!=null)return C.__e;return typeof v.type=="function"?Ts(v):null;}function ec(v){var _,C;if((v=v.__p)!=null&&v.__c!=null){for(v.__e=v.__c.base=null,_=0;_<v.__k.length;_++)if((C=v.__k[_])!=null&&C.__e!=null){v.__e=v.__c.base=C.__e;break;}return ec(v);}}function dp(v){(!v.__d&&(v.__d=!0)&&Mi.push(v)===1||Xn!==kn.debounceRendering)&&(Xn=kn.debounceRendering,(kn.debounceRendering||on)(mp));}function mp(){var v,_,C,y,P,I,B,H;for(Mi.sort(function(ie,pe){return pe.__v.__b-ie.__v.__b;});v=Mi.pop();)v.__d&&(C=void 0,y=void 0,I=(P=(_=v).__v).__e,B=_.__P,H=_.u,_.u=!1,B&&(C=[],y=ed(B,P,Di({},P),_.__n,B.ownerSVGElement!==void 0,null,C,H,I??Ts(P)),R_(C,P),y!=I&&ec(P)));}function fl(v,_,C,y,P,I,B,H,ie){var pe,ue,K,Me,ze,ot,Ct,dn=C&&C.__k||ps,Dn=dn.length;if(H==ia&&(H=I!=null?I[0]:Dn?Ts(C,0):null),pe=0,_.__k=Zu(_.__k,function(jn){if(jn!=null){if(jn.__p=_,jn.__b=_.__b+1,(K=dn[pe])===null||K&&jn.key==K.key&&jn.type===K.type)dn[pe]=void 0;else for(ue=0;ue<Dn;ue++){if((K=dn[ue])&&jn.key==K.key&&jn.type===K.type){dn[ue]=void 0;break;}K=null;}if(Me=ed(v,jn,K=K||ia,y,P,I,B,null,H,ie),(ue=jn.ref)&&K.ref!=ue&&(Ct||(Ct=[])).push(ue,jn.__c||Me,jn),Me!=null){if(ot==null&&(ot=Me),jn.l!=null)Me=jn.l,jn.l=null;else if(I==K||Me!=H||Me.parentNode==null){e:if(H==null||H.parentNode!==v)v.appendChild(Me);else{for(ze=H,ue=0;(ze=ze.nextSibling)&&ue<Dn;ue+=2)if(ze==Me)break e;v.insertBefore(Me,H);}_.type=="option"&&(v.value="");}H=Me.nextSibling,typeof _.type=="function"&&(_.l=Me);}}return pe++,jn;}),_.__e=ot,I!=null&&typeof _.type!="function")for(pe=I.length;pe--;)I[pe]!=null&&po(I[pe]);for(pe=Dn;pe--;)dn[pe]!=null&&_E(dn[pe],dn[pe]);if(Ct)for(pe=0;pe<Ct.length;pe++)Rm(Ct[pe],Ct[++pe],Ct[++pe]);}function Zu(v,_,C){if(C==null&&(C=[]),v==null||typeof v=="boolean")_&&C.push(_(null));else if(Array.isArray(v))for(var y=0;y<v.length;y++)Zu(v[y],_,C);else C.push(_?_(function(P){if(P==null||typeof P=="boolean")return null;if(typeof P=="string"||typeof P=="number")return ul(null,P,null,null);if(P.__e!=null||P.__c!=null){var I=ul(P.type,P.props,P.key,null);return I.__e=P.__e,I;}return P;}(v)):v);return C;}function Im(v,_,C){_[0]==="-"?v.setProperty(_,C):v[_]=typeof C=="number"&&k_.test(_)===!1?C+"px":C??"";}function Qu(v,_,C,y,P){var I,B,H,ie,pe;if(!((_=P?_==="className"?"class":_:_==="class"?"className":_)==="key"||_==="children"))if(_==="style"){if(I=v.style,typeof C=="string")I.cssText=C;else{if(typeof y=="string"&&(I.cssText="",y=null),y)for(B in y)C&&B in C||Im(I,B,"");if(C)for(H in C)y&&C[H]===y[H]||Im(I,H,C[H]);}}else _[0]==="o"&&_[1]==="n"?(ie=_!==(_=_.replace(/Capture$/,"")),pe=_.toLowerCase(),_=(pe in v?pe:_).slice(2),C?(y||v.addEventListener(_,km,ie),(v.t||(v.t={}))[_]=C):v.removeEventListener(_,km,ie)):_!=="list"&&_!=="tagName"&&_!=="form"&&!P&&_ in v?v[_]=C??"":typeof C!="function"&&_!=="dangerouslySetInnerHTML"&&(_!==(_=_.replace(/^xlink:?/,""))?C==null||C===!1?v.removeAttributeNS("http://www.w3.org/1999/xlink",_.toLowerCase()):v.setAttributeNS("http://www.w3.org/1999/xlink",_.toLowerCase(),C):C==null||C===!1?v.removeAttribute(_):v.setAttribute(_,C));}function km(v){return this.t[v.type](kn.event?kn.event(v):v);}function ed(v,_,C,y,P,I,B,H,ie,pe){var ue,K,Me,ze,ot,Ct,dn,Dn,jn,Qn,uo=_.type;if(_.constructor!==void 0)return null;(ue=kn.__b)&&ue(_);try{e:if(typeof uo=="function"){if(Dn=_.props,jn=(ue=uo.contextType)&&y[ue.__c],Qn=ue?jn?jn.props.value:ue.__p:y,C.__c?dn=(K=_.__c=C.__c).__p=K.__E:("prototype"in uo&&uo.prototype.render?_.__c=K=new uo(Dn,Qn):(_.__c=K=new or(Dn,Qn),K.constructor=uo,K.render=c9),jn&&jn.sub(K),K.props=Dn,K.state||(K.state={}),K.context=Qn,K.__n=y,Me=K.__d=!0,K.__h=[]),K.__s==null&&(K.__s=K.state),uo.getDerivedStateFromProps!=null&&Di(K.__s==K.state?K.__s=Di({},K.__s):K.__s,uo.getDerivedStateFromProps(Dn,K.__s)),Me)uo.getDerivedStateFromProps==null&&K.componentWillMount!=null&&K.componentWillMount(),K.componentDidMount!=null&&B.push(K);else{if(uo.getDerivedStateFromProps==null&&H==null&&K.componentWillReceiveProps!=null&&K.componentWillReceiveProps(Dn,Qn),!H&&K.shouldComponentUpdate!=null&&K.shouldComponentUpdate(Dn,K.__s,Qn)===!1){for(K.props=Dn,K.state=K.__s,K.__d=!1,K.__v=_,_.__e=ie!=null?ie!==C.__e?ie:C.__e:null,_.__k=C.__k,ue=0;ue<_.__k.length;ue++)_.__k[ue]&&(_.__k[ue].__p=_);break e;}K.componentWillUpdate!=null&&K.componentWillUpdate(Dn,K.__s,Qn);}for(ze=K.props,ot=K.state,K.context=Qn,K.props=Dn,K.state=K.__s,(ue=kn.__r)&&ue(_),K.__d=!1,K.__v=_,K.__P=v,ue=K.render(K.props,K.state,K.context),_.__k=Zu(ue!=null&&ue.type==Qp&&ue.key==null?ue.props.children:ue),K.getChildContext!=null&&(y=Di(Di({},y),K.getChildContext())),Me||K.getSnapshotBeforeUpdate==null||(Ct=K.getSnapshotBeforeUpdate(ze,ot)),fl(v,_,C,y,P,I,B,ie,pe),K.base=_.__e;ue=K.__h.pop();)K.__s&&(K.state=K.__s),ue.call(K);Me||ze==null||K.componentDidUpdate==null||K.componentDidUpdate(ze,ot,Ct),dn&&(K.__E=K.__p=null);}else _.__e=ef(C.__e,_,C,y,P,I,B,pe);(ue=kn.diffed)&&ue(_);}catch(Da){kn.__e(Da,_,C);}return _.__e;}function R_(v,_){for(var C;C=v.pop();)try{C.componentDidMount();}catch(y){kn.__e(y,C.__v);}kn.__c&&kn.__c(_);}function ef(v,_,C,y,P,I,B,H){var ie,pe,ue,K,Me=C.props,ze=_.props;if(P=_.type==="svg"||P,v==null&&I!=null){for(ie=0;ie<I.length;ie++)if((pe=I[ie])!=null&&(_.type===null?pe.nodeType===3:pe.localName===_.type)){v=pe,I[ie]=null;break;}}if(v==null){if(_.type===null)return document.createTextNode(ze);v=P?document.createElementNS("http://www.w3.org/2000/svg",_.type):document.createElement(_.type),I=null;}return _.type===null?Me!==ze&&(I!=null&&(I[I.indexOf(v)]=null),v.data=ze):_!==C&&(I!=null&&(I=ps.slice.call(v.childNodes)),ue=(Me=C.props||ia).dangerouslySetInnerHTML,K=ze.dangerouslySetInnerHTML,H||(K||ue)&&(K&&ue&&K.__html==ue.__html||(v.innerHTML=K&&K.__html||"")),function(ot,Ct,dn,Dn,jn){var Qn;for(Qn in dn)Qn in Ct||Qu(ot,Qn,null,dn[Qn],Dn);for(Qn in Ct)jn&&typeof Ct[Qn]!="function"||Qn==="value"||Qn==="checked"||dn[Qn]===Ct[Qn]||Qu(ot,Qn,Ct[Qn],dn[Qn],Dn);}(v,ze,Me,P,H),_.__k=_.props.children,K||fl(v,_,C,y,_.type!=="foreignObject"&&P,I,B,ia,H),H||("value"in ze&&ze.value!==void 0&&ze.value!==v.value&&(v.value=ze.value==null?"":ze.value),"checked"in ze&&ze.checked!==void 0&&ze.checked!==v.checked&&(v.checked=ze.checked))),v;}function Rm(v,_,C){try{typeof v=="function"?v(_):v.current=_;}catch(y){kn.__e(y,C);}}function _E(v,_,C){var y,P,I;if(kn.unmount&&kn.unmount(v),(y=v.ref)&&Rm(y,null,_),C||typeof v.type=="function"||(C=(P=v.__e)!=null),v.__e=v.l=null,(y=v.__c)!=null){if(y.componentWillUnmount)try{y.componentWillUnmount();}catch(B){kn.__e(B,_);}y.base=y.__P=null;}if(y=v.__k)for(I=0;I<y.length;I++)y[I]&&_E(y[I],_,C);P!=null&&po(P);}function c9(v,_,C){return this.constructor(v,C);}function p9(v,_){for(var C=0;C<_.length;C++){var y=_[C];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(v,y.key,y);}}function Is(){return Is=Object.assign||function(v){for(var _=arguments,C=1;C<arguments.length;C++){var y=_[C];for(var P in y)Object.prototype.hasOwnProperty.call(y,P)&&(v[P]=y[P]);}return v;},Is.apply(this,arguments);}kn={},or.prototype.setState=function(v,_){var C=this.__s!==this.state&&this.__s||(this.__s=Di({},this.state));(typeof v!="function"||(v=v(C,this.props)))&&Di(C,v),v!=null&&this.__v&&(this.u=!1,_&&this.__h.push(_),dp(this));},or.prototype.forceUpdate=function(v){this.__v&&(v&&this.__h.push(v),this.u=!0,dp(this));},or.prototype.render=Qp,Mi=[],on=typeof Promise=="function"?Promise.prototype.then.bind(Prom
31ise.resolve()):setTimeout,Xn=kn.debounceRendering,kn.__e=function(v,_,C){for(var y;_=_.__p;)if((y=_.__c)&&!y.__p)try{if(y.constructor&&y.constructor.getDerivedStateFromError!=null)y.setState(y.constructor.getDerivedStateFromError(v));else{if(y.componentDidCatch==null)continue;y.componentDidCatch(v);}return dp(y.__E=y);}catch(P){v=P;}throw v;},Oi=ia;var Nm="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",gE="[\\s|\\(]+("+Nm+")[,|\\s]+("+Nm+")[,|\\s]+("+Nm+")\\s*\\)?",xE="[\\s|\\(]+("+Nm+")[,|\\s]+("+Nm+")[,|\\s]+("+Nm+")[,|\\s]+("+Nm+")\\s*\\)?",d9=new RegExp("rgb"+gE),m9=new RegExp("rgba"+xE),u9=new RegExp("hsl"+gE),f9=new RegExp("hsla"+xE),$x="^(?:#?|0x?)",Am="([0-9a-fA-F]{1})",Dm="([0-9a-fA-F]{2})",h9=new RegExp($x+Am+Am+Am+"$"),_9=new RegExp($x+Am+Am+Am+Am+"$"),g9=new RegExp($x+Dm+Dm+Dm+"$"),x9=new RegExp($x+Dm+Dm+Dm+Dm+"$"),Vx=Math.log,tf=Math.round,N_=Math.floor;function hl(v,_,C){return Math.min(Math.max(v,_),C);}function ks(v,_){var C=v.indexOf("%")>-1,y=parseFloat(v);return C?_/100*y:y;}function Rs(v){return parseInt(v,16);}function jm(v){return v.toString(16).padStart(2,"0");}var nf=function(){function v(P,I){this.$={h:0,s:0,v:0,a:1},P&&this.set(P),this.onChange=I,this.initialValue=Is({},this.$);}var _,C,y=v.prototype;return y.set=function(P){if(typeof P=="string")/^(?:#?|0x?)[0-9a-fA-F]{3,8}$/.test(P)?this.hexString=P:/^rgba?/.test(P)?this.rgbString=P:/^hsla?/.test(P)&&(this.hslString=P);else{if(typeof P!="object")throw new Error("Invalid color value");P instanceof v?this.hsva=P.hsva:"r"in P&&"g"in P&&"b"in P?this.rgb=P:"h"in P&&"s"in P&&"v"in P?this.hsv=P:"h"in P&&"s"in P&&"l"in P?this.hsl=P:"kelvin"in P&&(this.kelvin=P.kelvin);}},y.setChannel=function(P,I,B){var H;this[P]=Is({},this[P],((H={})[I]=B,H));},y.reset=function(){this.hsva=this.initialValue;},y.clone=function(){return new v(this);},y.unbind=function(){this.onChange=void 0;},v.hsvToRgb=function(P){var I=P.h/60,B=P.s/100,H=P.v/100,ie=N_(I),pe=I-ie,ue=H*(1-B),K=H*(1-pe*B),Me=H*(1-(1-pe)*B),ze=ie%6,ot=[Me,H,H,K,ue,ue][ze],Ct=[ue,ue,Me,H,H,K][ze];return{r:hl(255*[H,K,ue,ue,Me,H][ze],0,255),g:hl(255*ot,0,255),b:hl(255*Ct,0,255)};},v.rgbToHsv=function(P){var I=P.r/255,B=P.g/255,H=P.b/255,ie=Math.max(I,B,H),pe=Math.min(I,B,H),ue=ie-pe,K=0,Me=ie,ze=ie===0?0:ue/ie;switch(ie){case pe:K=0;break;case I:K=(B-H)/ue+(B<H?6:0);break;case B:K=(H-I)/ue+2;break;case H:K=(I-B)/ue+4;}return{h:60*K%360,s:hl(100*ze,0,100),v:hl(100*Me,0,100)};},v.hsvToHsl=function(P){var I=P.s/100,B=P.v/100,H=(2-I)*B,ie=H<=1?H:2-H,pe=ie<1e-9?0:I*B/ie;return{h:P.h,s:hl(100*pe,0,100),l:hl(50*H,0,100)};},v.hslToHsv=function(P){var I=2*P.l,B=P.s*(I<=100?I:200-I)/100,H=I+B<1e-9?0:2*B/(I+B);return{h:P.h,s:hl(100*H,0,100),v:hl((I+B)/2,0,100)};},v.kelvinToRgb=function(P){var I,B,H,ie=P/100;return ie<66?(I=255,B=-155.25485562709179-.44596950469579133*(B=ie-2)+104.49216199393888*Vx(B),H=ie<20?0:.8274096064007395*(H=ie-10)-254.76935184120902+115.67994401066147*Vx(H)):(I=351.97690566805693+.114206453784165*(I=ie-55)-40.25366309332127*Vx(I),B=325.4494125711974+.07943456536662342*(B=ie-50)-28.0852963507957*Vx(B),H=255),{r:hl(N_(I),0,255),g:hl(N_(B),0,255),b:hl(N_(H),0,255)};},v.rgbToKelvin=function(P){for(var I,B=P.r,H=P.b,ie=2e3,pe=4e4;pe-ie>.4;){I=.5*(pe+ie);var ue=v.kelvinToRgb(I);ue.b/ue.r>=H/B?pe=I:ie=I;}return I;},_=v,C=[{key:"hsv",get:function(){var P=this.$;return{h:P.h,s:P.s,v:P.v};},set:function(P){var I=this.$;if(P=Is({},I,P),this.onChange){var B={h:!1,v:!1,s:!1,a:!1};for(var H in I)B[H]=P[H]!=I[H];this.$=P,(B.h||B.s||B.v||B.a)&&this.onChange(this,B);}else this.$=P;}},{key:"hsva",get:function(){return Is({},this.$);},set:function(P){this.hsv=P;}},{key:"hue",get:function(){return this.$.h;},set:function(P){this.hsv={h:P};}},{key:"saturation",get:function(){return this.$.s;},set:function(P){this.hsv={s:P};}},{key:"value",get:function(){return this.$.v;},set:function(P){this.hsv={v:P};}},{key:"alpha",get:function(){return this.$.a;},set:function(P){this.hsv=Is({},this.hsv,{a:P});}},{key:"kelvin",get:function(){return v.rgbToKelvin(this.rgb);},set:function(P){this.rgb=v.kelvinToRgb(P);}},{key:"red",get:function(){return this.rgb.r;},set:function(P){this.rgb=Is({},this.rgb,{r:P});}},{key:"green",get:function(){return this.rgb.g;},set:function(P){this.rgb=Is({},this.rgb,{g:P});}},{key:"blue",get:function(){return this.rgb.b;},set:function(P){this.rgb=Is({},this.rgb,{b:P});}},{key:"rgb",get:function(){var P=v.hsvToRgb(this.$),I=P.r,B=P.g,H=P.b;return{r:tf(I),g:tf(B),b:tf(H)};},set:function(P){this.hsv=Is({},v.rgbToHsv(P),{a:P.a===void 0?1:P.a});}},{key:"rgba",get:function(){return Is({},this.rgb,{a:this.alpha});},set:function(P){this.rgb=P;}},{key:"hsl",get:function(){var P=v.hsvToHsl(this.$),I=P.h,B=P.s,H=P.l;return{h:tf(I),s:tf(B),l:tf(H)};},set:function(P){this.hsv=Is({},v.hslToHsv(P),{a:P.a===void 0?1:P.a});}},{key:"hsla",get:function(){return Is({},this.hsl,{a:this.alpha});}
31,set:function(P){this.hsl=P;}},{key:"rgbString",get:function(){var P=this.rgb;return"rgb("+P.r+", "+P.g+", "+P.b+")";},set:function(P){var I,B,H,ie,pe=1;if((I=d9.exec(P))?(B=ks(I[1],255),H=ks(I[2],255),ie=ks(I[3],255)):(I=m9.exec(P))&&(B=ks(I[1],255),H=ks(I[2],255),ie=ks(I[3],255),pe=ks(I[4],1)),!I)throw new Error("Invalid rgb string");this.rgb={r:B,g:H,b:ie,a:pe};}},{key:"rgbaString",get:function(){var P=this.rgba;return"rgba("+P.r+", "+P.g+", "+P.b+", "+P.a+")";},set:function(P){this.rgbString=P;}},{key:"hexString",get:function(){var P=this.rgb;return"#"+jm(P.r)+jm(P.g)+jm(P.b);},set:function(P){var I,B,H,ie,pe=255;if((I=h9.exec(P))?(B=17*Rs(I[1]),H=17*Rs(I[2]),ie=17*Rs(I[3])):(I=_9.exec(P))?(B=17*Rs(I[1]),H=17*Rs(I[2]),ie=17*Rs(I[3]),pe=17*Rs(I[4])):(I=g9.exec(P))?(B=Rs(I[1]),H=Rs(I[2]),ie=Rs(I[3])):(I=x9.exec(P))&&(B=Rs(I[1]),H=Rs(I[2]),ie=Rs(I[3]),pe=Rs(I[4])),!I)throw new Error("Invalid hex string");this.rgb={r:B,g:H,b:ie,a:pe/255};}},{key:"hex8String",get:function(){var P=this.rgba;return"#"+jm(P.r)+jm(P.g)+jm(P.b)+jm(N_(255*P.a));},set:function(P){this.hexString=P;}},{key:"hslString",get:function(){var P=this.hsl;return"hsl("+P.h+", "+P.s+"%, "+P.l+"%)";},set:function(P){var I,B,H,ie,pe=1;if((I=u9.exec(P))?(B=ks(I[1],360),H=ks(I[2],100),ie=ks(I[3],100)):(I=f9.exec(P))&&(B=ks(I[1],360),H=ks(I[2],100),ie=ks(I[3],100),pe=ks(I[4],1)),!I)throw new Error("Invalid hsl string");this.hsl={h:B,s:H,l:ie,a:pe};}},{key:"hslaString",get:function(){var P=this.hsla;return"hsla("+P.h+", "+P.s+"%, "+P.l+"%, "+P.a+")";},set:function(P){this.hslString=P;}}],C&&p9(_.prototype,C),v;}();function yw(v){var _,C=v.width,y=v.sliderSize,P=v.borderWidth,I=v.handleRadius,B=v.padding,H=v.sliderShape,ie=v.layoutDirection==="horizontal";return y=(_=y)!=null?_:2*B+2*I,H==="circle"?{handleStart:v.padding+v.handleRadius,handleRange:C-2*B-2*I,width:C,height:C,cx:C/2,cy:C/2,radius:C/2-P/2}:{handleStart:y/2,handleRange:C-y,radius:y/2,x:0,y:0,width:ie?y:C,height:ie?C:y};}var Pw,CE=2*Math.PI,C9=function(v,_){return(v%_+_)%_;},vE=function(v,_){return Math.sqrt(v*v+_*_);};function bE(v){return v.width/2-v.padding-v.handleRadius-v.borderWidth;}function Gx(v){var _=v.width/2;return{width:v.width,radius:_-v.borderWidth,cx:_,cy:_};}function yE(v,_,C){var y=v.wheelAngle,P=v.wheelDirection;return C&&P==="clockwise"?_=y+_:P==="clockwise"?_=360-y+_:C&&P==="anticlockwise"?_=y+180-_:P==="anticlockwise"&&(_=y-_),C9(_,360);}function PE(v,_,C){var y=Gx(v),P=y.cx,I=y.cy,B=bE(v);_=P-_,C=I-C;var H=yE(v,Math.atan2(-C,-_)*(360/CE)),ie=Math.min(vE(_,C),B);return{h:Math.round(H),s:Math.round(100/B*ie)};}function ww(v){var _=v.width,C=v.boxHeight;return{width:_,height:C??_,radius:v.padding+v.handleRadius};}function wE(v,_,C){var y=ww(v),P=y.width,I=y.height,B=y.radius,H=(_-B)/(P-2*B)*100,ie=(C-B)/(I-2*B)*100;return{s:Math.max(0,Math.min(H,100)),v:Math.max(0,Math.min(100-ie,100))};}function v9(v){Pw||(Pw=document.getElementsByTagName("base"));var _=window.navigator.userAgent,C=/^((?!chrome|android).)*safari/i.test(_),y=/iPhone|iPod|iPad/i.test(_),P=window.location;return(C||y)&&Pw.length>0?P.protocol+"//"+P.host+P.pathname+P.search+v:v;}function SE(v,_,C,y){for(var P=0;P<y.length;P++){var I=y[P].x-_,B=y[P].y-C;if(Math.sqrt(I*I+B*B)<v.handleRadius)return P;}return null;}function Sw(v){return{boxSizing:"border-box",border:v.borderWidth+"px solid "+v.borderColor};}function Mw(v,_,C){return v+"-gradient("+_+", "+C.map(function(y){var P=y[0];return y[1]+" "+P+"%";}).join(",")+")";}function ds(v){return typeof v=="string"?v:v+"px";}var ME=["mousemove","touchmove","mouseup","touchend"],qx=function(v){function _(C){v.call(this,C),this.uid=(Math.random()+1).toString(36).substring(5);}return v&&(_.__proto__=v),_.prototype=Object.create(v&&v.prototype),_.prototype.constructor=_,_.prototype.render=function(C){var y=this.handleEvent.bind(this),P={onMouseDown:y,ontouchstart:y},I=C.layoutDirection==="horizontal",B=C.margin===null?C.sliderMargin:C.margin,H={overflow:"visible",display:I?"inline-block":"block"};return C.index>0&&(H[I?"marginLeft":"marginTop"]=B),mo(Qp,null,C.children(this.uid,P,H));},_.prototype.handleEvent=function(C){var y=this,P=this.props.onInput,I=this.base.getBoundingClientRect();C.preventDefault();var B=C.touches?C.changedTouches[0]:C,H=B.clientX-I.left,ie=B.clientY-I.top;switch(C.type){case"mousedown":case"touchstart":P(H,ie,0)!==!1&&ME.forEach(function(pe){document.addEventListener(pe,y,{passive:!1});});break;case"mousemove":case"touchmove":P(H,ie,1);break;case"mouseup":case"touchend":P(H,ie,2),ME.forEach(function(pe){document.removeEventListener(pe,y,{passive:!1});});}},_;}(or);function Lm(v){var _=v.r,C=v.url,y=_,P=_;return mo("svg",{className:"IroHandle IroHandle--"+v.index+" "+(v.isActive?"IroHandle--isActive":""),style:{"-webkit-tap-highlight-color":"rgba(0, 0, 0, 0);",transform:"translate("+ds(v.x)+", "+ds(v.y)+")",willChange:"transform",top:ds(-_),left:ds(-_),width:ds(2*_),height:ds(2*_),position:"absolute",overflow:"visible"}},C&&mo("use",Object.assign({xlinkHref:v9(C)},v.props)),!C&&mo("circle",{cx:y,cy:P,r:_,fill:"none","stroke-width":2,stroke:"#000"}),!C&&mo("circle",{cx:y,cy:P,r:_-2,fill:v.fill,"stroke-width":2,stroke:"#fff"}));}function Jx(v){var _=v.activeIndex,C=_!==void 0&&_<v.colors.length?v.colors[_]:v.color,y=yw(v),P=y.width,I=y.height,B=y.radius,H=function(pe,ue){var K=yw(pe),Me=K.width,ze=K.height,ot=K.handleRange,Ct=K.handleStart,dn=pe.layoutDirection==="horizontal",Dn=function(uo,Da){var _l=Da.hsva,Ir=Da.rgb;switch(uo.sliderType){case"red":return Ir.r/2.55;case"green":return Ir.g/2.55;case"blue":return Ir.b/2.55;case"alpha":return 100*_l.a;case"kelvin":var Ns=uo.minTemperature,gl=uo.maxTemperature-Ns,up=(Da.kelvin-Ns)/gl*100;return Math.max(0,Math.min(up,100));case"hue":return _l.h/=3.6;case"saturation":return _l.s;default:return _l.v;}}(pe,ue),jn=dn?Me/2:ze/2,Qn=Ct+Dn/100*ot;return dn&&(Qn=-1*Qn+ot+2*Ct),{x:dn?jn:Qn,y:dn?Qn:jn};}(v,C),ie=function(pe,ue){var K=ue.hsv,Me=ue.rgb;switch(pe.sliderType){case"red":return[[0,"rgb(0,"+Me.g+","+Me.b+")"],[100,"rgb(255,"+Me.g+","+Me.b+")"]];case"green":return[[0,"rgb("+Me.r+",0,"+Me.b+")"],[100,"rgb("+Me.r+",255,"+Me.b+")"]];case"blue":return[[0,"rgb("+Me.r+","+Me.g+",0)"],[100,"rgb("+Me.r+","+Me.g+",255)"]];case"alpha":return[[0,"rgba("+Me.r+","+Me.g+","+Me.b+",0)"],[100,"rgb("+Me.r+","+Me.g+","+Me.b+")"]];case"kelvin":for(var ze=[],ot=pe.minTemperature,Ct=pe.maxTemperature,dn=Ct-ot,Dn=ot,jn=0;Dn<Ct;Dn+=dn/8,jn+=1){var Qn=nf.kelvinToRgb(Dn),uo=Qn.r,Da=Qn.g,_l=Qn.b;ze.push([12.5*jn,"rgb("+uo+","+Da+","+_l+")"]);}return ze;case"hue":return[[0,"#f00"],[16.666,"#ff0"],[33.333,"#0f0"],[50,"#0ff"],[66.666,"#00f"],[83.333,"#f0f"],[100,"#f00"]];case"saturation":var Ir=nf.hsvToHsl({h:K.h,s:0,v:K.v}),Ns=nf.hsvToHsl({h:K.h,s:100,v:K.v});return[[0,"hsl("+Ir.h+","+Ir.s+"%,"+Ir.l+"%)"],[100,"hsl("+Ns.h+","+Ns.s+"%,"+Ns.l+"%)"]];default:var gl=nf.hsvToHsl({h:K.h,s:K.s,v:100});return[[0,"#000"],[100,"hsl("+gl.h+","+gl.s+"%,"+gl.l+"%)"]];}}(v,C);return mo(qx,Object.assign({},v,{onInput:function(pe,ue,K){var Me=function(ze,ot,Ct){var dn,Dn=yw(ze),jn=Dn.handleRange,Qn=Dn.handleStart;dn=ze.layoutDirection==="horizontal"?-1*Ct+jn+Qn:ot-Qn,dn=Math.max(Math.min(dn,jn),0);var uo=Math.round(100/jn*dn);switch(ze.sliderType){case"kelvin":var Da=ze.minTemperature;return Da+(ze.maxTemperature-Da)*(uo/100);case"alpha":return uo/100;case"hue":return 3.6*uo;case"red":case"blue":case"green":return 2.55*uo;default:return uo;}}(v,pe,ue);v.parent.inputActive=!0,C[v.sliderType]=Me,v.onInput(K,v.id);}}),function(pe,ue,K){return mo("div",Object.assign({},ue,{className:"IroSlider",style:Object.assign({},{position:"relative",width:ds(P),height:ds(I),borderRadius:ds(B),background:"conic-gradient(#ccc 25%, #fff 0 50%, #ccc 0 75%, #fff 0)",backgroundSize:"8px 8px"},K)}),mo("div",{className:"IroSliderGradient",style:Object.assign({},{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:ds(B),background:Mw("linear",v.layoutDirection==="horizontal"?"to top":"to right",ie)},Sw(v))}),mo(Lm,{isActive:!0,index:C.index,r:v.handleRadius,url:v.handleSvg,props:v.handleProps,x:H.x,y:H.y}));});}
31function b9(v){var _=ww(v),C=_.width,y=_.height,P=_.radius,I=v.colors,B=v.parent,H=v.activeIndex,ie=H!==void 0&&H<v.colors.length?v.colors[H]:v.color,pe=[[[0,"#fff"],[100,"hsl("+ie.hue+",100%,50%)"]],[[0,"rgba(0,0,0,0)"],[100,"#000"]]],ue=I.map(function(K){return function(Me,ze){var ot=ww(Me),Ct=ot.width,dn=ot.height,Dn=ot.radius,jn=ze.hsv,Qn=Dn,uo=Ct-2*Dn,Da=dn-2*Dn;return{x:Qn+jn.s/100*uo,y:Qn+(Da-jn.v/100*Da)};}(v,K);});return mo(qx,Object.assign({},v,{onInput:function(K,Me,ze){if(ze===0){var ot=SE(v,K,Me,ue);ot!==null?B.setActiveColor(ot):(B.inputActive=!0,ie.hsv=wE(v,K,Me),v.onInput(ze,v.id));}else ze===1&&(B.inputActive=!0,ie.hsv=wE(v,K,Me));v.onInput(ze,v.id);}}),function(K,Me,ze){return mo("div",Object.assign({},Me,{className:"IroBox",style:Object.assign({},{width:ds(C),height:ds(y),position:"relative"},ze)}),mo("div",{className:"IroBox",style:Object.assign({},{width:"100%",height:"100%",borderRadius:ds(P)},Sw(v),{background:Mw("linear","to bottom",pe[1])+","+Mw("linear","to right",pe[0])})}),I.filter(function(ot){return ot!==ie;}).map(function(ot){return mo(Lm,{isActive:!1,index:ot.index,fill:ot.hslString,r:v.handleRadius,url:v.handleSvg,props:v.handleProps,x:ue[ot.index].x,y:ue[ot.index].y});}),mo(Lm,{isActive:!0,index:ie.index,fill:ie.hslString,r:v.activeHandleRadius||v.handleRadius,url:v.handleSvg,props:v.handleProps,x:ue[ie.index].x,y:ue[ie.index].y}));});}function OE(v){var _=Gx(v).width,C=v.colors,y=(v.borderWidth,v.parent),P=v.color,I=P.hsv,B=C.map(function(ie){return function(pe,ue){var K=ue.hsv,Me=Gx(pe),ze=Me.cx,ot=Me.cy,Ct=bE(pe),dn=(180+yE(pe,K.h,!0))*(CE/360),Dn=K.s/100*Ct,jn=pe.wheelDirection==="clockwise"?-1:1;return{x:ze+Dn*Math.cos(dn)*jn,y:ot+Dn*Math.sin(dn)*jn};}(v,ie);}),H={position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",boxSizing:"border-box"};return mo(qx,Object.assign({},v,{onInput:function(ie,pe,ue){if(ue===0){if(!function(Me,ze,ot){var Ct=Gx(Me),dn=Ct.cx,Dn=Ct.cy,jn=Me.width/2;return vE(dn-ze,Dn-ot)<jn;}(v,ie,pe))return!1;var K=SE(v,ie,pe,B);K!==null?y.setActiveColor(K):(y.inputActive=!0,P.hsv=PE(v,ie,pe),v.onInput(ue,v.id));}else ue===1&&(y.inputActive=!0,P.hsv=PE(v,ie,pe));v.onInput(ue,v.id);}}),function(ie,pe,ue){return mo("div",Object.assign({},pe,{className:"IroWheel",style:Object.assign({},{width:ds(_),height:ds(_),position:"relative"},ue)}),mo("div",{className:"IroWheelHue",style:Object.assign({},H,{transform:"rotateZ("+(v.wheelAngle+90)+"deg)",background:v.wheelDirection==="clockwise"?"conic-gradient(red, yellow, lime, aqua, blue, magenta, red)":"conic-gradient(red, magenta, blue, aqua, lime, yellow, red)"})}),mo("div",{className:"IroWheelSaturation",style:Object.assign({},H,{background:"radial-gradient(circle closest-side, #fff, transparent)"})}),v.wheelLightness&&mo("div",{className:"IroWheelLightness",style:Object.assign({},H,{background:"#000",opacity:1-I.v/100})}),mo("div",{className:"IroWheelBorder",style:Object.assign({},H,Sw(v))}),C.filter(function(K){return K!==P;}).map(function(K){return mo(Lm,{isActive:!1,index:K.index,fill:K.hslString,r:v.handleRadius,url:v.handleSvg,props:v.handleProps,x:B[K.index].x,y:B[K.index].y});}),mo(Lm,{isActive:!0,index:P.index,fill:P.hslString,r:v.activeHandleRadius||v.handleRadius,url:v.handleSvg,props:v.handleProps,x:B[P.index].x,y:B[P.index].y}));});}Lm.defaultProps={fill:"none",x:0,y:0,r:8,url:null,props:{x:0,y:0}},Jx.defaultProps=Object.assign({},{sliderShape:"bar",sliderType:"value",minTemperature:2200,maxTemperature:11e3});var EE=function(v){function _(C){var y=this;v.call(this,C),this.colors=[],this.inputActive=!1,this.events={},this.activeEvents={},this.deferredEvents={},this.id=C.id,(C.colors.length>
310?C.colors:[C.color]).forEach(function(P){return y.addColor(P);}),this.setActiveColor(0),this.state=Object.assign({},C,{color:this.color,colors:this.colors,layout:C.layout});}return v&&(_.__proto__=v),_.prototype=Object.create(v&&v.prototype),_.prototype.constructor=_,_.prototype.addColor=function(C,y){y===void 0&&(y=this.colors.length);var P=new nf(C,this.onColorChange.bind(this));this.colors.splice(y,0,P),this.colors.forEach(function(I,B){return I.index=B;}),this.state&&this.setState({colors:this.colors}),this.deferredEmit("color:init",P);},_.prototype.removeColor=function(C){var y=this.colors.splice(C,1)[0];y.unbind(),this.colors.forEach(function(P,I){return P.index=I;}),this.state&&this.setState({colors:this.colors}),y.index===this.color.index&&this.setActiveColor(0),this.emit("color:remove",y);},_.prototype.setActiveColor=function(C){this.color=this.colors[C],this.state&&this.setState({color:this.color}),this.emit("color:setActive",this.color);},_.prototype.setColors=function(C,y){var P=this;y===void 0&&(y=0),this.colors.forEach(function(I){return I.unbind();}
31),this.colors=[],C.forEach(function(I){return P.addColor(I);}),this.setActiveColor(y),this.emit("color:setAll",this.colors);},_.prototype.on=function(C,y){var P=this,I=this.events;(Array.isArray(C)?C:[C]).forEach(function(B){(I[B]||(I[B]=[])).push(y),P.deferredEvents[B]&&(P.deferredEvents[B].forEach(function(H){y.apply(null,H);}),P.deferredEvents[B]=[]);});},_.prototype.off=function(C,y){var P=this;(Array.isArray(C)?C:[C]).forEach(function(I){var B=P.events[I];B&&B.splice(B.indexOf(y),1);});},_.prototype.emit=function(C){for(var y=this,P=[],I=arguments.length-1;I-->0;)P[I]=arguments[I+1];var B=this.activeEvents;B.hasOwnProperty(C)&&B[C]||(B[C]=!0,(this.events[C]||[]).forEach(function(H){return H.apply(y,P);}),B[C]=!1);},_.prototype.deferredEmit=function(C){for(var y,P=[],I=arguments.length-1;I-->0;)P[I]=arguments[I+1];var B=this.deferredEvents;(y=this).emit.apply(y,[C].concat(P)),(B[C]||(B[C]=[])).push(P);},_.prototype.setOptions=function(C){this.setState(C);},_.prototype.resize=function(C){this.setOptions({width:C});},_.prototype.reset=function(){this.colors.forEach(function(C){return C.reset();}),this.setState({colors:this.colors});},_.prototype.onMount=function(C){this.el=C,this.deferredEmit("mount",this);},_.prototype.onColorChange=function(C,y){this.setState({color:this.color}),this.inputActive&&(this.inputActive=!1,this.emit("input:change",C,y)),this.emit("color:change",C,y);},_.prototype.emitInputEvent=function(C,y){C===0?this.emit("input:start",this.color,y):C===1?this.emit("input:move",this.color,y):C===2&&this.emit("input:end",this.color,y);},_.prototype.render=function(C,y){var P=this,I=y.layout;return Array.isArray(I)||(I=[{component:OE},{component:Jx}],y.transparency&&I.push({component:Jx,options:{sliderType:"alpha"}})),mo("div",{class:"IroColorPicker",id:y.id,style:{display:y.display}},I.map(function(B,H){var ie=B.component,pe=B.options;return mo(ie,Object.assign({},y,pe,{ref:void 0,onInput:P.emitInputEvent.bind(P),parent:P,index:H}));}));},_;}(or);EE.defaultProps=Object.assign({},{width:300,height:300,color:"#fff",colors:[],padding:6,layoutDirection:"vertical",borderColor:"#fff",borderWidth:0,handleRadius:8,activeHandleRadius:null,handleSvg:null,handleProps:{x:0,y:0},wheelLightness:!0,wheelAngle:0,wheelDirection:"anticlockwise",sliderSize:null,sliderMargin:12,boxHeight:null},{colors:[],display:"block",id:null,layout:"default",margin:null});var Hx,A_,Ow,y9=(A_=function(v,_){var C,y=document.createElement("div");function P(){var I=v instanceof Element?v:document.querySelector(v);I.appendChild(C.base),C.onMount(I);}return function(I,B,H){var ie,pe,ue;kn.__p&&kn.__p(I,B),pe=(ie=H===Oi)?null:B.__k,I=mo(Qp,null,[I]),ue=[],ed(B,B.__k=I,pe||ia,ia,B.ownerSVGElement!==void 0,pe?null:ps.slice.call(B.childNodes),ue,!1,ia,ie),R_(ue,I);}(mo(Hx,Object.assign({},{ref:function(I){return C=I;}},_)),y),document.readyState!=="loading"?P():document.addEventListener("DOMContentLoaded",P),C;},A_.prototype=(Hx=EE).prototype,Object.assign(A_,Hx),A_.__component=Hx,A_);(function(v){var _;v.version="5.5.2",v.Color=nf,v.ColorPicker=y9,(_=v.ui||(v.ui={})).h=mo,_.ComponentBase=qx,_.Handle=Lm,_.Slider=Jx,_.Wheel=OE,_.Box=b9;})(Ow||(Ow={}));var TE=Ow;let P9=[{icon:'<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M43 11L16.875 37L5 25.1818" stroke="#008a00" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',label:"save",type:"button"},{icon:'<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 8L40 40" stroke="#db3700" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 40L40 8" stroke="#db3700" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',label:"cancel",type:"button"}],w9=[{value:"#000000",describe:"black"},{value:"#4d4d4d",describe:"dimGrey"},{value:"#808080",describe:"grey"},{value:"#e6e6e6",describe:"lightGrey"},{value:"#ffffff",describe:"white"},{value:"#ff0000",describe:"red"},{value:"#ffa500",describe:"orange"},{value:"#ffff00",describe:"yellow"},{value:"#99e64d",describe:"lightGreen"},{value:"#008000",describe:"green"},{value:"#7fffd4",describe:"aquamarine"},{value:"#40e0d0",describe:"turquoise"},{value:"#4d99e6",describe:"lightBlue"},{value:"#0000ff",describe:"blue"},{value:"#800080",describe:"purple"}];var of,IE=class{constructor(v,_){this.tableMenus=v,this.options=_,this.attrs=Object.assign({},_.attribute),this.borderForm=[],this.saveButton=null,this.form=this.createPropertiesForm(_);}checkBtnsAction(v){v==="save"&&this.saveAction(this.options.type),this.removePropertiesForm(),this.tableMenus.showMenus(),this.tableMenus.updateMenus();}createActionBtns(v,_){let C=this.getUseLanguage(),y=document.createElement("div"),P=document.createDocumentFragment();y.classList.add("properties-form-action-row");for(let{icon:I,label:B,type:H}of P9){let ie=document.createElement("button"),pe=document.createElement("span");if(pe.innerHTML=I,ie.appendChild(pe),Z(ie,{label:B,type:H}),_){let ue=document.createElement("span");ue.innerText=C(B),ie.appendChild(ue);}P.appendChild(ie);}return y.addEventListener("click",I=>v(I)),y.appendChild(P),y;}createCheckBtns(v){let{menus:_,propertyName:C}=v,y=document.createElement("div"),P=document.createDocumentFragment();for(let{icon:I,describe:B,align:H}of _){let ie=document.createElement("span");ie.innerHTML=I,ie.setAttribute("data-align",H),ie.classList.add("ql-table-tooltip-hover"),this.options.attribute[C]===H&&ie.classList.add("ql-table-btns-checked");let pe=W(B);ie.appendChild(pe),P.appendChild(ie);}return y.classList.add("ql-table-check-container"),y.appendChild(P),y.addEventListener("click",I=>{let B=I.target.closest("span.ql-table-tooltip-hover"),H=B.getAttribute("data-align");this.switchButton(y,B),this.setAttribute(C,H);}),y;}createColorContainer(v){let _=document.createElement("div");_.classList.add("ql-table-color-container");let C=this.createColorInput(v),y=this.createColorPicker(v);return _.appendChild(C),_.appendChild(y),_;}createColorInput(v){let _=this.createInput(v);return _.classList.add("label-field-view-color"),_;}createColorList(v){let _=this.getUseLanguage(),C=document.createElement("ul"),y=document.createDocumentFragment();C.classList.add("color-list");for(let{value:P,describe:I}of w9){let B=document.createElement("li"),H=W(_(I));B.setAttribute("data-color",P),B.classList.add("ql-table-tooltip-hover"),D(B,{"background-color":P}
31),B.appendChild(H),y.appendChild(B);}return C.appendChild(y),C.addEventListener("click",P=>{let I=P.target,B=(I.tagName==="DIV"?I.parentElement:I).getAttribute("data-color");this.setAttribute(v,B,C),this.updateInputStatus(C,!1,!0);}),C;}createColorPicker(v){let{propertyName:_,value:C}=v,y=document.createElement("span"),P=document.createElement("span");y.classList.add("color-picker"),P.classList.add("color-button"),C?D(P,{"background-color":C}):P.classList.add("color-unselected");let I=this.createColorPickerSelect(_);return P.addEventListener("click",()=>{this.toggleHidden(I);let B=this.getColorClosest(y),H=B?.querySelector(".property-input");this.updateSelectedStatus(I,H?.value,"color");}),y.appendChild(P),y.appendChild(I),y;}createColorPickerIcon(v,_,C){let y=document.createElement("div"),P=document.createElement("span"),I=document.createElement("button");return P.innerHTML=v,I.innerText=_,y.classList.add("erase-container"),y.appendChild(P),y.appendChild(I),y.addEventListener("click",C),y;}createColorPickerSelect(v){let _=this.getUseLanguage(),C=document.createElement("div"),y=this.createColorPickerIcon('<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 42H44" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M31 4L7 28L13 34H21L41 14L31 4Z" fill="none" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',_("removeColor"),()=>{this.setAttribute(v,"",C),this.updateInputStatus(C,!1,!0);}),P=this.createColorList(v),I=this.createPalette(v,_,C);return C.classList.add("color-picker-select","ql-hidden"),C.appendChild(y),C.appendChild(P),C.appendChild(I),C;}createDropdown(v,_){let C=document.createElement("div"),y=document.createElement("span"),P=document.createElement("span");return _==="dropdown"&&(P.innerHTML=ui,P.classList.add("ql-table-dropdown-icon")),v&&(y.innerText=v),C.classList.add("ql-table-dropdown-properties"),y.classList.add("ql-table-dropdown-text"),C.appendChild(y),_==="dropdown"&&C.appendChild(P),{dropdown:C,dropText:y};}createInput(v){let{attribute:_,message:C,propertyName:y,value:P,valid:I}=v,{placeholder:B=""}=_,H=document.createElement("div"),ie=document.createElement("div"),pe=document.createElement("label"),ue=document.createElement("input"),K=document.createElement("div");return H.classList.add("label-field-view"),ie.classList.add("label-field-view-input-wrapper"),pe.innerText=B,Z(ue,_),ue.classList.add("property-input"),ue.value=P,ue.addEventListener("input",Me=>{let ze=Me.target.value;I&&this.switchHidden(K,I(ze)),this.updateInputStatus(ie,I&&!I(ze)),this.setAttribute(y,ze,H);}),K.classList.add("label-field-view-status","ql-hidden"),C&&(K.innerText=C),ie.appendChild(ue),ie.appendChild(pe),H.appendChild(ie),I&&H.appendChild(K),H;}createList(v,_){let{options:C,propertyName:y}=v;if(!C.length)return null;let P=document.createElement("ul");for(let I of C){let B=document.createElement("li");B.innerText=I,P.appendChild(B);}return P.classList.add("ql-table-dropdown-list","ql-hidden"),P.addEventListener("click",I=>{let B=I.target.innerText;_.innerText=B,this.toggleBorderDisabled(B),this.setAttribute(y,B);}),P;}createPalette(v,_,C){let y=document.createElement("div"),P=document.createElement("div"),I=document.createElement("div"),B=document.createElement("div"),H=new TE.ColorPicker(B,{width:110,layout:[{component:TE.ui.Wheel,options:{}}]}),ie=this.createColorPickerIcon('<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 44C29.9601 44 26.3359 35.136 30 31C33.1264 27.4709 44 29.0856 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path d="M28 17C29.6569 17 31 15.6569 31 14C31 12.3431 29.6569 11 28 11C26.3431 11 25 12.3431 25 14C25 15.6569 26.3431 17 28 17Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/>
31<path d="M16 21C17.6569 21 19 19.6569 19 18C19 16.3431 17.6569 15 16 15C14.3431 15 13 16.3431 13 18C13 19.6569 14.3431 21 16 21Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path d="M17 34C18.6569 34 20 32.6569 20 31C20 29.3431 18.6569 28 17 28C15.3431 28 14 29.3431 14 31C14 32.6569 15.3431 34 17 34Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/></svg>',_("colorPicker"),()=>this.toggleHidden(P)),pe=this.createActionBtns(ue=>{let K=ue.target.closest("button");K&&(K.getAttribute("label")==="save"&&(this.setAttribute(v,H.color.hexString,C),this.updateInputStatus(y,!1,!0)),P.classList.add("ql-hidden"),C.classList.add("ql-hidden"));},!1);return P.classList.add("color-picker-palette","ql-hidden"),I.classList.add("color-picker-wrap"),B.classList.add("iro-container"),I.appendChild(B),I.appendChild(pe),P.appendChild(I),y.appendChild(ie),y.appendChild(P),y;}createProperty(v){let{content:_,children:C}=v,y=this.getUseLanguage(),P=document.createElement("div"),I=document.createElement("label");I.innerText=_,I.classList.add("ql-table-dropdown-label"),P.classList.add("properties-form-row"),C.length===1&&P.classList.add("properties-form-row-full"),P.appendChild(I);for(let B of C){let H=this.createPropertyChild(B);H&&P.appendChild(H),H&&_===y("border")&&this.borderForm.push(H);}return P;}createPropertyChild(v){let{category:_,value:C}=v;switch(_){case"dropdown":let{dropdown:y,dropText:P}=this.createDropdown(C,_),I=this.createList(v,P);return y.appendChild(I),y.addEventListener("click",()=>{this.toggleHidden(I),this.updateSelectedStatus(y,P.innerText,"dropdown");}),y;case"color":return this.createColorContainer(v);case"menus":return this.createCheckBtns(v);case"input":return this.createInput(v);}}createPropertiesForm(v){let _=this.getUseLanguage(),{title:C,properties:y}=function({type:H,attribute:ie},pe){return H==="table"?function(ue,K){return{title:K("tblProps"),properties:[{content:K("border"),children:[{category:"dropdown",propertyName:"border-style",value:ue["border-style"],options:["dashed","dotted","double","groove","inset","none","outset","ridge","solid"]},{category:"color",propertyName:"border-color",value:ue["border-color"],attribute:{type:"text",placeholder:K("color")},valid:Ze,message:K("colorMsg")},{category:"input",propertyName:"border-width",value:ce(ue["border-width"]),attribute:{type:"text",placeholder:K("width")},valid:kt,message:K("dimsMsg")}]},{content:K("background"),children:[{category:"color",propertyName:"background-color",value:ue["background-color"],attribute:{type:"text",placeholder:K("color")},valid:Ze,message:K("colorMsg")}]},{content:K("dimsAlm"),children:[{category:"input",propertyName:"width",value:ce(ue.width),attribute:{type:"text",placeholder:K("width")},valid:kt,message:K("dimsMsg")},{category:"input",propertyName:"height",value:ce(ue.height),attribute:{type:"text",placeholder:K("height")},valid:kt,message:K("dimsMsg")},{category:"menus",propertyName:"align",value:ue.align,menus:[{icon:f,describe:K("alTblL"),align:"left"},{icon:d,describe:K("tblC"),align:"center"},{icon:h,describe:K("alTblR"),align:"right"}]}]}]};}(ie,pe):function(ue,K){return{title:K("cellProps"),properties:[{content:K("border"),children:[{category:"dropdown",propertyName:"border-style",value:ue["border-style"],options:["dashed","dotted","double","groove","inset","none","outset","ridge","solid"]},{category:"color",propertyName:"border-color",value:ue["border-color"],attribute:{type:"text",placeholder:K("color")},valid:Ze,message:K("colorMsg")},{category:"input",propertyName:"border-width",value:ce(ue["border-width"]),attribute:{type:"text",placeholder:K("width")},valid:kt,message:K("dimsMsg")}]},{content:K("background"),children:[{category:"color",propertyName:"background-color",value:ue["background-color"],attribute:{type:"text",placeholder:K("color")},valid:Ze,message:K("colorMsg")}]},{content:K("dims"),children:[{category:"input",propertyName:"width",value:ce(ue.width),attribute:{type:"text",placeholder:K("width")},valid:kt,message:K("dimsMsg")},{category:"input",propertyName:"height",value:ce(ue.height),attribute:{type:"text",placeholder:K("height")},valid:kt,message:K("dimsMsg")},{category:"input",propertyName:"padding",value:ce(ue.padding),attribute:{type:"text",placeholder:K("padding")},valid:kt,message:K("dimsMsg")}]},{content:K("tblCellTxtAlm"),children:[{category:"menus",propertyName:"text-align",value:ue["text-align"],menus:[{icon:f,describe:K("alCellTxtL"),align:"left"},{icon:d,describe:K("alCellTxtC"),align:"center"},{icon:h,describe:K("alCellTxtR"),align:"right"},{icon:'<?xml version="1.0" encoding="UTF-8"?>
31<svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M42 19H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 9H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 29H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M42 39H6" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',describe:K("jusfCellTxt"),align:"justify"}]},{category:"menus",propertyName:"vertical-align",value:ue["vertical-align"],menus:[{icon:'<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 36.3056H42" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 42H42" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M30 12L24 6L18 12V12" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M24 6V29" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',describe:K("alCellTxtT"),align:"top"},{icon:'<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 36L24 30L30 36" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M23.9999 30.9998V43.9998" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M18 12L24 18L30 12" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M23.9999 17.0002V4.00022" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 24.0004H42" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',describe:K("alCellTxtM"),align:"middle"},{icon:'<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 36.3056H42" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 42H42" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M30 23L24 29L18 23V23" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M24 6V29" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>',describe:K("alCellTxtB"),align:"bottom"}]}]}]};}(ie,pe);}(v,_),P=document.createElement("div");P.classList.add("ql-table-properties-form");let I=document.createElement("h2"),B=this.createActionBtns(H=>{let ie=H.target.closest("button");ie&&this.checkBtnsAction(ie.getAttribute("label"));},!0);I.innerText=C,I.classList.add("properties-form-header"),P.appendChild(I);for(let H of y){let ie=this.createProperty(H);P.appendChild(ie);}return P.appendChild(B),this.setBorderDisabled(),this.tableMenus.quill.container.appendChild(P),this.updatePropertiesForm(P,v.type),this.setSaveButton(B),P.addEventListener("click",H=>{let ie=H.target;this.hiddenSelectList(ie);}),P;}getCellStyle(v,_){let C=(v.getAttribute("style")||"").split(";").filter(y=>y.trim()).reduce((y,P)=>{let I=P.split(":");return Object.assign(Object.assign({},y),{[I[0].trim()]:I[1].trim()});},{});return Object.assign(C,_),Object.keys(C).reduce((y,P)=>y+`${P}: ${C[P]}; `,"");}getColorClosest(v){return rt(v,".ql-table-color-container");}getComputeBounds(v){if(v==="table"){let{table:_}=this.tableMenus,[C,y]=this.tableMenus.getCorrectBounds(_);return C.bottom>y.bottom?Object.assign(Object.assign({},C),{bottom:y.height}):C;}{let{computeBounds:_}=this.tableMenus.getSelectedTdsInfo();return _;}}getDiffProperties(){let v=this.attrs,_=this.options.attribute;return Object.keys(v).reduce((C,y)=>{var P;return v[y]!==_[y]&&(C[y]=function(I){return!(!I.endsWith("width")&&!I.endsWith("height"));}(y)?(P=v[y])?P.replace(/\d+\.?\d*/,"")?P:P+"px":P:v[y]),C;},{});}getUseLanguage(){let{language:v}=this.tableMenus.tableBetter;return v.useLanguage.bind(v);}getViewportSize(){return{viewWidth:document.documentElement.clientWidth,viewHeight:document.documentElement.clientHeight};}hiddenSelectList(v){var _,C;let y=".ql-table-dropdown-properties",P=".color-picker",I=this.form.querySelectorAll(".ql-table-dropdown-list"),B=this.form.querySelectorAll(".color-picker-select");for(let H of[...I,...B])!((_=H.closest(y))===null||_===void 0)&&_.isEqualNode(v.closest(y))||!((C=H.closest(P))===null||C===void 0)&&C.isEqualNode(v.closest(P))||H.classList.add("ql-hidden");}removePropertiesForm(){this.form.remove(),this.borderForm=[];}saveAction(v){v==="table"?this.saveTableAction():this.saveCellAction();}saveCellAction(){var v;let{selectedTds:_}=this.tableMenus.tableBetter.cellSelection,{quill:C,table:y}=this.tableMenus,P=r().find(y),I=P.colgroup(),B=P.isPercent(),H=this.getDiffProperties(),ie=parseFloat(H.width),pe=!((v=H.width)===null||v===void 0)&&v.endsWith("%")?ie*ve()/100:ie,ue=H["text-align"];ue&&delete H["text-align"];let K=[];if(I&&pe){delete H.width;let{operateLine:Me}=this.tableMenus.tableBetter,{computeBounds:ze}=this.tableMenus.getSelectedTdsInfo(),ot=pt(ze,y,C.container);for(let Ct of ot)Me.setColWidth(Ct,`${pe}`,B);}for(let Me of _){let ze=r().find(Me),ot=ze.statics.blotName,Ct=ze.formats()[ot],dn=this.getCellStyle(Me,H);if(ue){let jn=ue==="left"?"":ue;
31ze.children.forEach(Qn=>{Qn.statics.blotName===A.blotName?Qn.children.forEach(uo=>{uo.format&&uo.format("align",jn);}):Qn.format("align",jn);});}let Dn=ze.replaceWith(ot,Object.assign(Object.assign({},Ct),{style:dn}));K.push(Dn.domNode);}this.tableMenus.tableBetter.cellSelection.setSelectedTds(K),B||this.updateTableWidth(y,P,B);}saveTableAction(){var v;let{table:_,tableBetter:C}=this.tableMenus,y=(v=r().find(_).temporary())===null||v===void 0?void 0:v.domNode,P=_.querySelector("td,th"),I=this.getDiffProperties(),B=I.align;switch(delete I.align,B){case"center":Object.assign(I,{margin:"0 auto"});break;case"left":Object.assign(I,{margin:""});break;case"right":Object.assign(I,{"margin-left":"auto","margin-right":""});}D(y||_,I),C.cellSelection.setSelected(P);}setAttribute(v,_,C){this.attrs[v]=_,v.includes("-color")&&this.updateSelectColor(this.getColorClosest(C),_);}setBorderDisabled(){let[v]=this.borderForm,_=v.querySelector(".ql-table-dropdown-text").innerText;this.toggleBorderDisabled(_);}setSaveButton(v){let _=v.querySelector('button[label="save"]');this.saveButton=_;}setSaveButtonDisabled(v){this.saveButton&&(v?this.saveButton.setAttribute("disabled","true"):this.saveButton.removeAttribute("disabled"));}switchButton(v,_){let C=v.querySelectorAll("span.ql-table-tooltip-hover");for(let y of C)y.classList.remove("ql-table-btns-checked");_.classList.add("ql-table-btns-checked");}switchHidden(v,_){_?v.classList.add("ql-hidden"):v.classList.remove("ql-hidden");}toggleBorderDisabled(v){let[,_,C]=this.borderForm;v!=="none"&&v?(_.classList.remove("ql-table-disabled"),C.classList.remove("ql-table-disabled")):(this.attrs["border-color"]="",this.attrs["border-width"]="",this.updateSelectColor(_,""),this.updateInputValue(C,""),_.classList.add("ql-table-disabled"),C.classList.add("ql-table-disabled"));}toggleHidden(v){v.classList.toggle("ql-hidden");}updateInputValue(v,_){v.querySelector(".property-input").value=_;}updateInputStatus(v,_,C){let y=(C?this.getColorClosest(v):rt(v,".label-field-view")).querySelector(".label-field-view-input-wrapper");_?(y.classList.add("label-field-view-error"),this.setSaveButtonDisabled(!0)):(y.classList.remove("label-field-view-error"),this.form.querySelectorAll(".label-field-view-error").length||this.setSaveButtonDisabled(!1));}updatePropertiesForm(v,_){v.classList.remove("ql-table-triangle-none");let{height:C,width:y}=v.getBoundingClientRect(),P=this.tableMenus.quill.container.getBoundingClientRect(),{top:I,left:B,right:H,bottom:ie}=this.getComputeBounds(_),{viewHeight:pe}=this.getViewportSize(),ue=ie+10,K=B+H-y>>1;ue+P.top+C>pe?(ue=I-C-10,ue<0?(ue=P.height-C>>1,v.classList.add("ql-table-triangle-none")):(v.classList.add("ql-table-triangle-up"),v.classList.remove("ql-table-triangle-down"))):(v.classList.add("ql-table-triangle-down"),v.classList.remove("ql-table-triangle-up")),K<P.left?(K=0,v.classList.add("ql-table-triangle-none")):K+y>P.right&&(K=P.right-y,v.classList.add("ql-table-triangle-none")),D(v,{left:`${K}px`,top:`${ue}px`});}updateSelectColor(v,_){let C=v.querySelector(".property-input"),y=v.querySelector(".color-button"),P=v.querySelector(".color-picker-select"),I=v.querySelector(".label-field-view-status");_?y.classList.remove("color-unselected"):y.classList.add("color-unselected"),C.value=_,D(y,{"background-color":_}),P.classList.add("ql-hidden"),this.switchHidden(I,Ze(_));}updateSelectedStatus(v,_,C){let y=C==="color"?".color-list":".ql-table-dropdown-list",P=v.querySelector(y);if(!P)return;let I=Array.from(P.querySelectorAll("li"));for(let H of I)H.classList.remove(`ql-table-${C}-selected`);let B=I.find(H=>(C==="color"?H.getAttribute("data-color"):H.innerText)===_);B&&B.classList.add(`ql-table-${C}-selected`);}updateTableWidth(v,_,C){let y=_.temporary();D(v,{width:"auto"});let{width:P}=v.getBoundingClientRect();v.style.removeProperty("width"),D(y.domNode,{width:Se(P,C)});}};(function(v){v.left="margin-left",v.right="margin-right";})(of||(of={}));var S9=class{constructor(v,_){this.quill=v,this.table=null,this.prevList=null,this.prevTooltip=null,this.scroll=!1,this.tableBetter=_,this.tablePropertiesForm=null,this.tableHeaderRow=null,this.quill.root.addEventListener("click",this.handleClick.bind(this)),this.root=this.createMenus();}convertToRow(){var v;let _=r().find(this.table),C=_.tbody(),y=C||this.quill.scroll.create(ht.blotName),P=(v=y?.children)===null||v===void 0?void 0:v.head,I=this.getCorrectRows(),B=[],H=I[0].next;for(;H;)I.unshift(H),H=H.next;for(let pe of I){let ue=this.quill.scroll.create(Oe.blotName);
31pe.children.forEach(K=>{let Me=K.formats()[K.statics.blotName],ze=K.domNode.cloneNode(!0),ot=this.quill.scroll.create(ze).replaceWith(Ne.blotName,Me);ue.insertBefore(ot,null);}),B.unshift([ue,P]),pe.remove();}for(let[pe,ue]of B)y.insertBefore(pe,ue);C||_.insertBefore(y,null);let[ie]=y.descendant(Ne);this.tableBetter.cellSelection.setSelected(ie.domNode);}convertToHeaderRow(){let v=r().find(this.table),_=v.thead();if(!_){let I=v.tbody();_=this.quill.scroll.create(qt.blotName),v.insertBefore(_,I);}let C=this.getCorrectRows(),y=C[0].prev;for(;y;)C.unshift(y),y=y.prev;for(let I of C){let B=this.quill.scroll.create(ct.blotName);I.children.forEach(H=>{let ie=H.formats()[H.statics.blotName],pe=H.domNode.cloneNode(!0),ue=this.quill.scroll.create(pe).replaceWith(Pe.blotName,ie);B.insertBefore(ue,null);}),_.insertBefore(B,null),I.remove();}let[P]=_.descendant(Pe);this.tableBetter.cellSelection.setSelected(P.domNode);}copyTable(){return function(v,_,C,y){return new(C||(C=Promise))(function(P,I){function B(pe){try{ie(y.next(pe));}catch(ue){I(ue);}}function H(pe){try{ie(y.throw(pe));}catch(ue){I(ue);}}function ie(pe){var ue;pe.done?P(pe.value):(ue=pe.value,ue instanceof C?ue:new C(function(K){K(ue);})).then(B,H);}ie((y=y.apply(v,_||[])).next());});}(this,void 0,void 0,function*(){if(!this.table)return;let v=r().find(this.table);if(!v)return;let _="<p><br></p>"+v.getCopyTable(),C=this.tableBetter.cellSelection.getText(_),y=new ClipboardItem({"text/html":new Blob([_],{type:"text/html"}),"text/plain":new Blob([C],{type:"text/plain"})});try{yield navigator.clipboard.write([y]);let P=this.quill.getIndex(v),I=v.length();this.quill.setSelection(P+I,r().sources.SILENT),this.tableBetter.hideTools(),this.quill.scrollSelectionIntoView();}catch(P){console.error("Failed to copy table:",P);}});}createList(v){if(!v)return null;let _=document.createElement("ul");for(let[,C]of Object.entries(v)){let{content:y,divider:P,createSwitch:I,handler:B}=C,H=document.createElement("li");if(I?(H.classList.add("ql-table-header-row"),H.appendChild(this.createSwitch(y)),this.tableHeaderRow=H):H.innerText=y,H.addEventListener("click",B.bind(this)),_.appendChild(H),P){let ie=document.createElement("li");ie.classList.add("ql-table-divider"),_.appendChild(ie);}}return _.classList.add("ql-table-dropdown-list","ql-hidden"),_;}createMenu(v,_,C,y){let P=document.createElement("div"),I=document.createElement("span");return I.innerHTML=C?v+_:v,P.classList.add("ql-table-dropdown"),I.classList.add("ql-table-tooltip-hover"),P.setAttribute("data-category",y),P.appendChild(I),P;}createMenus(){let{language:v,options:_={}}=this.tableBetter,{menus:C}=_,y=v.useLanguage.bind(v),P=document.createElement("div");P.classList.add("ql-table-menus-container","ql-hidden");for(let[I,B]of Object.entries(function(H,ie){let pe={column:{content:H("col"),icon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1692084271333" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2200" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M9.14372835 1039.20071111L1020.26808889 1039.20071111l0-1048.576L9.14372835-9.37528889 9.14372835 1039.20071111z m252.77672107-711.53454649l1e-8-262.144 175.00150897 0 0 262.144L261.92044942 327.66616462zM942.48705138 702.1592576l0 262.14400001-178.89289103-1e-8 1e-8-262.144 178.89289102 0z m-256.66810311 0l0 262.144-171.11595236 0 0-262.144 171.11595236 0z m-248.89698987 0l0 262.144L261.92044943 964.3032576l-1e-8-262.144 175.00150898 0z m505.56509298-299.59563948L942.48705139 627.26180409l-178.89289104 0 0-224.69818596 178.89289103-1e-8z m-256.66810311 1e-8L685.81894827 627.26180409l-171.11595236 0 0-224.69818596 171.11595236 0z m-248.89698987 0L436.9219584 627.26180409 261.92044943 627.26180409l0-224.69818596 175.00150897 0z m505.56509298-337.04145352l0 262.14400001-178.89289102 0-1e-8-262.144 178.89289103-1e-8z m-256.66810311 1e-8l0 262.144-171.11595236 0 0-262.144 171.11595236 0z" fill="#515151" p-id="2201"></path></svg>',handler(K,Me){this.toggleAttribute(K,Me);},children:{left:{content:H("insColL"),handler(){let{leftTd:K}=this.getSelectedTdsInfo(),Me=this.table.getBoundingClientRect();this.insertColumn(K,0),F(this.table,Me,72),this.updateMenus();}},right:{content:H("insColR"),handler(){let{rightTd:K}=this.getSelectedTdsInfo(),Me=this.table.getBoundingClientRect();this.insertColumn(K,1),F(this.table,Me,72),this.updateMenus();}},delete:{content:H("delCol"),handler(){this.deleteColumn();}},select:{content:H("selCol"),handler(){this.selectColumn();}}}},row:{content:H("row"),icon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
31<svg t="1692084279720" class="icon" viewBox="0 0 1181 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2344" xmlns:xlink="http://www.w3.org/1999/xlink" width="18.453125" height="16"><path d="M1142.15367111 0H39.38417778C7.99630222 0 0 8.27050667 0 39.38531555v945.2293689C0 1015.72949333 7.99516445 1024 39.38531555 1024h1102.76835556c31.39128889 0 39.38417778-8.27050667 39.38417778-39.38531555V39.38531555c0-31.11480889-7.99516445-39.38531555-39.38417778-39.38531555zM354.46328889 945.23050667l-276.992 3.26997333V749.568l276.992-1.25952v196.92202667z m0-275.69265778H78.76835555V472.61468445h275.69265778v196.92316444z m0-275.69152H78.76835555V236.30848h275.69265778v157.53671111z m393.84632889 551.38417778H433.23050667V748.30848h315.07683555v196.92202667z m0-275.69265778H433.23050667V472.61468445h315.07683555v196.92316444z m0-275.69152H433.23050667V236.30848h315.07683555v157.53671111z m354.46101333 551.38417778H827.07683555V748.30848h275.69265778v196.92202667z m0-275.69265778H827.07683555V472.61468445h275.69265778v196.92316444z m0-275.69152H827.07683555V236.30848h275.69265778v157.53671111z" fill="#515151" p-id="2345"></path></svg>',handler(K,Me,ze){this.toggleAttribute(K,Me,ze);},children:{header:{content:H("headerRow"),divider:!0,createSwitch:!0,handler(){this.toggleHeaderRow(),this.toggleHeaderRowSwitch();}},above:{content:H("insRowAbv"),handler(){let{leftTd:K}=this.getSelectedTdsInfo();this.insertRow(K,0),this.updateMenus();}},below:{content:H("insRowBlw"),handler(){let{rightTd:K}=this.getSelectedTdsInfo();this.insertRow(K,1),this.updateMenus();}},delete:{content:H("delRow"),handler(){this.deleteRow();}},select:{content:H("selRow"),handler(){this.selectRow();}}}},merge:{content:H("mCells"),icon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1692084199654" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1975" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M776.08580741 364.42263703c-15.53445925-7.76722963-31.06891852-7.76722963-46.60337778 0L589.6722963 512l139.81013333 147.57736297c15.53445925 7.76722963 31.06891852 7.76722963 46.60337778 0 15.53445925-15.53445925 15.53445925-31.06891852 0-46.60337779L706.18074075 543.06891852h163.11182222c15.53445925 0 31.06891852-15.53445925 31.06891851-31.06891852s-15.53445925-31.06891852-31.06891851-31.06891852H706.18074075l69.90506666-69.90506666c7.76722963-15.53445925 7.76722963-31.06891852 0-46.60337779z m-528.17161482 0c-15.53445925 15.53445925-15.53445925 31.06891852 0 46.60337779l69.90506666 69.90506666H154.70743703c-15.53445925 0-31.06891852 15.53445925-31.06891851 31.06891852s15.53445925 31.06891852 31.06891851 31.06891852H317.81925925l-69.90506666 69.90506666c-15.53445925 15.53445925-15.53445925 31.06891852 0 46.60337779 15.53445925 7.76722963 31.06891852 7.76722963 46.60337778 0L434.3277037 512 294.51757037 364.42263703c-15.53445925-7.76722963-31.06891852-7.76722963-46.60337778 0z" fill="#515151" p-id="1976"></path><path d="M317.81925925 939.19762963H84.80237037V84.80237037h233.01688888v116.50844445h77.6722963V7.13007408H7.13007408v1009.73985184h388.36148147V822.68918518h-77.6722963zM628.50844445 7.13007408v194.18074074h77.6722963v-116.50844445h233.01688888v854.39525926H706.18074075v-116.50844445h-77.6722963v194.18074074h388.36148147V7.13007408z" fill="#515151" p-id="1977"></path></svg>',handler(K,Me){this.toggleAttribute(K,Me);},children:{merge:{content:H("mCells"),handler(){this.mergeCells(),this.updateMenus();}},split:{content:H("sCell"),handler(){this.splitCell(),this.updateMenus();}}}},table:{content:H("tblProps"),icon:$a,handler(K,Me){let ze=Object.assign(Object.assign({},Be(this.table,O)),{align:this.getTableAlignment(this.table)});this.toggleAttribute(K,Me),this.tablePropertiesForm=new IE(this,{attribute:ze,type:"table"}),this.hideMenus();}},cell:{content:H("cellProps"),icon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
31<svg t="1692084286647" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2488" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M1058.13333333 0v1024H-34.13333333V0h1092.26666666zM460.8 563.2H68.26666667V921.6h392.53333333V563.2z m494.93333333 0H563.2V921.6h392.53333333V563.2zM460.8 102.4H68.26666667v358.4h392.53333333V102.4z" fill="#515151" p-id="2489"></path></svg>',handler(K,Me){let{selectedTds:ze}=this.tableBetter.cellSelection,ot=ze.length>1?this.getSelectedTdsAttrs(ze):this.getSelectedTdAttrs(ze[0]);this.toggleAttribute(K,Me),this.tablePropertiesForm=new IE(this,{attribute:ot,type:"cell"}),this.hideMenus();}},wrap:{content:H("insParaOTbl"),icon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1692084879007" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="968" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M512 332.57913685H49.39294151c-20.56031346 0-41.12062691-17.13359531-41.12062805-41.12062692V44.73474502c0-20.56031346 17.13359531-41.12062691 41.12062805-41.12062691H512c20.56031346 0 41.12062691 17.13359531 41.12062691 41.12062691v246.72376491c0 23.98703275-17.13359531 41.12062691-41.12062691 41.12062692zM90.51356843 250.33788188h380.36580466V85.85537308H90.51356843v164.4825088z m884.09349006 757.30488889h-925.21411698c-20.56031346 0-41.12062691-17.13359531-41.12062805-41.12062692v-246.72376491c0-20.56031346 17.13359531-41.12062691 41.12062805-41.12062691h921.78739883c20.56031346 0 41.12062691 17.13359531 41.12062691 41.12062691v246.72376491c0 23.98703275-17.13359531 41.12062691-37.69390876 41.12062692zM90.51356843 928.82823509h842.97286314v-164.48250994H90.51356843v164.48250994z" fill="#515151" p-id="969"></path><path d="M974.60705849 1017.92292864h-925.21411698c-27.41375203 0-47.97406549-20.56031346-47.97406549-47.97406549v-246.72376491c0-27.41375203 20.56031346-47.97406549 47.97406549-47.97406549h921.78739883c27.41375203 0 47.97406549 20.56031346 47.97406435 47.97406549v246.72376491c3.42671929 23.98703275-20.56031346 47.97406549-44.5473462 47.97406549z m-925.21411698-325.53830173c-17.13359531 0-30.84047019 13.70687602-30.84047132 30.84047133v246.72376491c0 17.13359531 13.70687602 30.84047019 30.84047132 30.84047018h921.78739883c17.13359531 0 30.84047019-13.70687602 30.84047019-30.84047018v-246.72376491c0-17.13359531-13.70687602-30.84047019-30.84047019-30.84047133H49.39294151z m890.9469275 243.29704675h-856.67973802v-181.61610523h860.10645731v181.61610523h-3.42671929zM100.79372515 921.97479765h825.83926784V774.62588188H100.79372515v147.34891577z m411.20627485-582.54222223H49.39294151c-27.41375203 0-47.97406549-20.56031346-47.97406549-47.97406549V44.73474502c0-27.41375203 20.56031346-47.97406549 47.97406549-47.97406549H512c27.41375203 0 47.97406549 20.56031346 47.97406549 47.97406549v246.72376491c0 27.41375203-20.56031346 47.97406549-47.97406549 47.97406549zM49.39294151 13.89427484c-17.13359531 0-30.84047019 13.70687602-30.84047132 30.84047018v246.72376491c0 17.13359531 13.70687602 30.84047019 30.84047132 30.84047019H512c17.13359531 0 30.84047019-13.70687602 30.84047019-30.84047019V44.73474502c0-17.13359531-13.70687602-30.84047019-30.84047019-30.84047018H49.39294151zM481.15952981 260.61803974H83.66013099V79.00193451h397.49939882V260.61803974zM100.79372515 243.48444444h363.23220936V96.13552981H100.79372515v147.34891463z" fill="#515151" p-id="970"></path><path d="M974.60705849 130.40271929H628.50844445c-6.85343744 0-10.28015673 3.42671929-10.28015674 10.28015672v58.25422223c0 6.85343744 3.42671929 10.28015673 10.28015674 10.28015673h304.97798712V466.2211766H546.26718947l27.41375204-20.56031345c3.42671929-3.42671929 6.85343744-10.28015673 6.85343744-17.13359531v-58.25422223c0-6.85343744-3.42671929-10.28015673-10.28015673-10.28015672-3.42671929 0-3.42671929 0-6.85343744 3.42671928L409.19843157 486.78149006c-10.28015673 6.85343744-10.28015673 20.56031346-3.42671928 27.41375203l3.42671928 3.42671816 157.62907136 130.21532045c3.42671929 3.42671929 10.28015673 3.42671929 13.70687602 0 0-3.42671929 3.42671929-3.42671929 3.42671929-6.85343744v-61.
316809415c0-6.85343744-3.42671929-10.28015673-6.85343858-13.70687602l-20.56031345-17.13359417h421.48643157c20.56031346 0 41.12062691-17.13359531 41.12062691-41.12062805V168.09662691c-6.85343744-20.56031346-23.98703275-37.69390877-44.5473462-37.69390762z" fill="#515151" p-id="971"></path><path d="M573.68094151 661.54415673c-3.42671929 0-6.85343744 0-10.28015673-3.42671929l-157.62907249-130.21531933-3.4267193-3.42671928c-3.42671929-6.85343744-6.85343744-13.70687602-6.85343744-20.56031346 0-6.85343744 3.42671929-13.70687602 10.28015674-20.5603146l157.62907249-126.78860117c3.42671929-3.42671929 6.85343744-3.42671929 10.28015673-3.42671815 10.28015673 0 17.13359531 6.85343744 17.13359417 17.13359416v58.25422223c0 10.28015673-3.42671929 17.13359531-10.28015673 23.98703275l-10.28015673 6.85343744H923.20627485v-239.87032634h-294.6978304c-10.28015673 0-17.13359531-6.85343744-17.13359531-17.13359416V140.68287601c0-10.28015673 6.85343744-17.13359531 17.13359531-17.13359531h346.09861404c27.41375203 0 47.97406549 20.56031346 47.97406549 47.9740655v335.81845732c0 27.41375203-20.56031346 47.97406549-47.97406549 47.97406549H577.10765966l3.42671929 3.42671929c6.85343744 6.85343744 10.28015673 13.70687602 10.28015673 20.56031346v61.6809415c0 3.42671929 0 6.85343744-3.42671815 10.28015674-3.42671929 6.85343744-10.28015673 10.28015673-13.70687602 10.28015673z m0-291.27111112l-157.6290725 126.78860117c-3.42671929 3.42671929-3.42671929 3.42671929-3.42671815 6.85343859s0 6.85343744 3.42671815 10.28015672l157.6290725 130.21532047h3.42671815v-61.68094151c0-3.42671929 0-6.85343744-3.42671815-10.28015673l-41.12062805-34.26718948h442.04674503c17.13359531 0 30.84047019-13.70687602 30.84047132-30.84047132V168.09662691c0-17.13359531-13.70687602-30.84047019-30.84047132-30.84047018H628.50844445v61.68094151h311.83142456v274.1375158H522.28015673l47.97406549-37.69390763c3.42671929-3.42671929 3.42671929-6.85343744 3.42671929-10.28015787v-54.82750293z" fill="#515151" p-id="972"></path></svg>',handler(K,Me){this.toggleAttribute(K,Me);},children:{before:{content:H("insB4"),handler(){this.insertParagraph(-1);}},after:{content:H("insAft"),handler(){this.insertParagraph(1);}}}},delete:{content:H("delTable"),icon:'<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 10V44H39V10H9Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path d="M20 20V33" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M28 20V33" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 10H44" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M16 10L19.289 4H28.7771L32 10H16Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/></svg>',handler(){this.deleteTable();}}},ue={copy:{content:H("copyTable"),icon:'<?xml version="1.0" encoding="UTF-8"?><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 12.4316V7.8125C13 6.2592 14.2592 5 15.8125 5H40.1875C41.7408 5 43 6.2592 43 7.8125V32.1875C43 33.7408 41.7408 35 40.1875 35H35.5163" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M32.1875 13H7.8125C6.2592 13 5 14.2592 5 15.8125V40.1875C5 41.7408 6.2592 43 7.8125 43H32.1875C33.7408 43 35 41.7408 35 40.1875V15.8125C35 14.2592 33.7408 13 32.1875 13Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/></svg>',handler(){this.copyTable();}}};return ie?.length?Object.values(ie).reduce((K,Me)=>{let ze=Object.assign({},pe,ue);return typeof Me=="string"&&(K[Me]=ze[Me]),Me!=null&&typeof Me=="object"&&Me.name&&(K[Me.name]=Ai()(ze[Me.name],Me)),K;},{}):pe;}(y,C))){let{content:H,icon:ie,children:pe,handler:ue}=B,K=this.createList(pe),Me=W(H),ze=this.createMenu(ie,ui,!!pe,I);ze.appendChild(Me),K&&ze.appendChild(K),P.appendChild(ze),ze.addEventListener("click",ue.bind(this,K,Me));}return this.quill.container.appendChild(P),P;}createSwitch(v){let _=document.createDocumentFragment(),C=document.createElement("span"),y=document.createElement("span"),P=document.createElement("span");return C.innerText=v,y.classList.add("ql-table-switch"),P.classList.add("ql-table-switch-inner"),P.setAttribute("aria-checked","fal
31se"),y.appendChild(P),_.append(C,y),_;}deleteColumn(v=!1){let{computeBounds:_,leftTd:C,rightTd:y}=this.getSelectedTdsInfo(),P=this.table.getBoundingClientRect(),I=ft(_,this.table,this.quill.container,"column"),B=pt(_,this.table,this.quill.container),H=r().find(C).table(),{changeTds:ie,selTds:pe}=this.getCorrectTds(I,_,C,y);v&&pe.length!==this.tableBetter.cellSelection.selectedTds.length||(this.tableBetter.cellSelection.updateSelected("column"),H.deleteColumn(ie,pe,this.deleteTable.bind(this),B),F(this.table,P,_.left-_.right),this.updateMenus());}deleteRow(v=!1){let _=this.tableBetter.cellSelection.selectedTds,C=this.getCorrectRows();v&&C.reduce((y,P)=>y+P.children.length,0)!==_.length||(this.tableBetter.cellSelection.updateSelected("row"),r().find(_[0]).table().deleteRow(C,this.deleteTable.bind(this)),this.updateMenus());}deleteTable(){let v=r().find(this.table);if(!v)return;let _=v.offset(this.quill.scroll);v.remove(),this.tableBetter.hideTools(),this.quill.setSelection(_-1,0,r().sources.USER);}destroyTablePropertiesForm(){this.tablePropertiesForm&&(this.tablePropertiesForm.removePropertiesForm(),this.tablePropertiesForm=null);}disableMenu(v,_){if(!this.root)return;let C=this.root.querySelector(`[data-category=${v}]`);C&&(_?C.classList.add("ql-table-disabled"):C.classList.remove("ql-table-disabled"));}getCellsOffset(v,_,C,y){let P=r().find(this.table).descendants(Ne),I=Math.max(_.left,v.left),B=Math.min(_.right,v.right),H=new Map(),ie=new Map(),pe=new Map();for(let ue of P){let{left:K,right:Me}=ke(ue.domNode,this.quill.container);K+2>=I&&Me<=B+2?this.setCellsMap(ue,H):K+2>=v.left&&Me<=_.left+2?this.setCellsMap(ue,ie):K+2>=_.right&&Me<=v.right+2&&this.setCellsMap(ue,pe);}return this.getDiffOffset(H)||this.getDiffOffset(ie,C)+this.getDiffOffset(pe,y);}getColsOffset(v,_,C){let y=v.children.head,P=Math.max(C.left,_.left),I=Math.min(C.right,_.right),B=null,H=null,ie=0;for(;y;){let{width:pe}=y.domNode.getBoundingClientRect();if(B||H?(B=H,H+=pe):(B=ke(y.domNode,this.quill.container).left,H=B+pe),B>I)break;B>=P&&H<=I&&ie--,y=y.next;}return ie;}getCorrectBounds(v){let _=this.quill.container.getBoundingClientRect(),C=ke(v,this.quill.container);return C.width>=_.width?[Object.assign(Object.assign({},C),{left:0,right:_.width}),_]:[C,_];}getCorrectTds(v,_,C,y){let P=[],I=[],B=r().find(C).table().colgroup(),H=~~C.getAttribute("colspan")||1,ie=~~y.getAttribute("colspan")||1;if(B)for(let pe of v){let ue=ke(pe,this.quill.container);if(ue.left+2>=_.left&&ue.right<=_.right+2)I.push(pe);else{let K=this.getColsOffset(B,_,ue);P.push([pe,K]);}}else for(let pe of v){let ue=ke(pe,this.quill.container);if(ue.left+2>=_.left&&ue.right<=_.right+2)I.push(pe);else{let K=this.getCellsOffset(_,ue,H,ie);P.push([pe,K]);}}return{changeTds:P,selTds:I};}getCorrectRows(){let v=this.tableBetter.cellSelection.selectedTds,_={};for(let C of v){let y=~~C.getAttribute("rowspan")||1,P=r().find(C.parentElement);if(y>1)for(;P&&y;){let I=P.children.head.domNode.getAttribute("data-row");_[I]||(_[I]=P),P=P.next,y--;}else{let I=C.getAttribute("data-row");_[I]||(_[I]=P);}}return Object.values(_);}getDiffOffset(v,_){let C=0,y=this.getTdsFromMap(v);if(y.length)if(_){for(let P of y)C+=~~P.getAttribute("colspan")||1;C-=_;}else for(let P of y)C-=~~P.getAttribute("colspan")||1;return C;}getRefInfo(v,_){let C=null;if(!v)return{id:di(),ref:C};let y=v.children.head,P=y.domNode.getAttribute("data-row");for(;y;){let{left:I}=y.domNode.getBoundingClientRect();if(Math.abs(I-_)<=2)return{id:P,ref:y};Math.abs(I-_)>=2&&!C&&(C=y),y=y.next;}return{id:P,ref:C};}getSelectedTdAttrs(v){let _=function(C){let y="left",P=null,I=C.descendants(Je),B=C.descendants(J),H=C.descendants(U);function ie(ue){for(let K of ue.domNode.classList)if(/ql-align-/.test(K))return K.split("ql-align-")[1];return y;}for(let ue of[...I,...B,...H]){let K=ie(ue);if((pe=P)!=null&&pe!==K)return y;P=K;}var pe;return P??y;}(r().find(v));return _?Object.assign(Object.assign({},Be(v,w)),{"text-align":_}):Be(v,w);}getSelectedTdsAttrs(v){let _=new Map(),C=null;for(let y of v){let P=this.getSelectedTdAttrs(y);if(C)for(let I of Object.keys(C))_.has(I)||P[I]!==C[I]&&_.set(I,!1);else C=P;}for(let y of Object.keys(C))_.has(y)&&(C[y]=b[y]);return C;}getSelectedTdsInfo(){let{startTd:v,endTd:_}=this.tableBetter.cellSelection,C=ke(v,this.quill.container),y=ke(_,this.quill.container),P=et(C,y);return C.left<=y.left&&C.top<=y.top?{computeBounds:P,leftTd:v,rightTd:_}:{computeBounds:P,leftTd:_,rightTd:v};}getTableAlignment(v){let _=v.getAttribute("align");if(!_){let{[of.left]:C,[of.right]:y}=Be(v,[of.left,of.right]);return C==="auto"?y==="auto"?"center":"right":"left";}return _||"center";}getTdsFromMap(v){return Object.values(Object.fromEntries(v)).reduce((_,C)=>_.length>C.length?_:C,[]);}handleClick(v){if(!this.quill.isEnabled())return;let _=v.target.closest("table");if(!_||this.quill.root.contains(_)){if(this.prevList&&this.prevList.classList.add("ql-hidden"),this.prevTooltip&&this.prevTooltip.classList.remove("ql-table-tooltip-hidden"),this.prevList=null,this.prevTooltip=null,!_&&!this.tableBetter.cellSelection.selectedTds.length)return this.hideMenus(),void this.destroyTablePropertiesForm();this.tablePropertiesForm||(this.showMenus(),this.updateMenus(_),(_&&!_.isEqualNode(this.table)||this.scroll)&&this.updateScroll(!1),this.table=_);}}hideMenus(){this.root.classList.add("ql-hidden");}insertColumn(v,_){let{left:C,right:y,width:P}=v.getBoundingClientRect(),I=r().find(v).table(),B=v.parentElement.lastChild.isEqualNode(v),H=_>0?y:C;I.insertColumn(H,B,P,_),this.quill.scrollSelectionIntoView();}insertParagraph(v){let _=r().find(this.table),C=this.quill.getIndex(_),y=v>
310?_.length():0,P=new(p())().retain(C+y).insert(` 32`);this.quill.updateContents(P,r().sources.USER),this.quill.setSelection(C+y,r().sources.SILENT),this.tableBetter.hideTools(),this.quill.scrollSelectionIntoView();}insertRow(v,_){let C=r().find(v),y=C.rowOffset(),P=C.table(),I=C.statics.blotName===Pe.blotName;if(_>0){let B=~~v.getAttribute("rowspan")||1;P.insertRow(y+_+B-1,_,I);}else P.insertRow(y+_,_,I);this.quill.scrollSelectionIntoView();}mergeCells(){var v,_;let{selectedTds:C}=this.tableBetter.cellSelection,{computeBounds:y,leftTd:P}=this.getSelectedTdsInfo(),I=r().find(P),[B,H]=de(I),ie=I.children.head,pe=I.table().tbody().children,ue=I.row(),K=ue.children.reduce((ot,Ct)=>{let dn=ke(Ct.domNode,this.quill.container);return dn.left>=y.left&&dn.right<=y.right&&(ot+=~~Ct.domNode.getAttribute("colspan")||1),ot;},0),Me=pe.reduce((ot,Ct)=>{let dn=ke(Ct.domNode,this.quill.container);if(dn.top>=y.top&&dn.bottom<=y.bottom){let Dn=Number.MAX_VALUE;Ct.children.forEach(jn=>{let Qn=~~jn.domNode.getAttribute("rowspan")||1;Dn=Math.min(Dn,Qn);}),ot+=Dn;}return ot;},0),ze=0;for(let ot of C){if(P.isEqualNode(ot))continue;let Ct=r().find(ot);Ct.moveChildren(I),Ct.remove(),!((_=(v=Ct.parent)===null||v===void 0?void 0:v.children)===null||_===void 0)&&_.length||ze++;}ze&&ue.children.forEach(ot=>{if(ot.domNode.isEqualNode(P))return;let Ct=ot.domNode.getAttribute("rowspan"),[dn]=de(ot);ot.replaceWith(ot.statics.blotName,Object.assign(Object.assign({},dn),{rowspan:Ct-ze}));}),I.setChildrenId(H),ie.format(I.statics.blotName,Object.assign(Object.assign({},B),{colspan:K,rowspan:Me-ze})),this.tableBetter.cellSelection.setSelected(ie.parent.domNode),this.quill.scrollSelectionIntoView();}selectColumn(){let{computeBounds:v,leftTd:_,rightTd:C}=this.getSelectedTdsInfo(),y=ft(v,this.table,this.quill.container,"column"),{selTds:P}=this.getCorrectTds(y,v,_,C);this.tableBetter.cellSelection.setSelectedTds(P),this.updateMenus();}selectRow(){let v=this.getCorrectRows().reduce((_,C)=>(_.push(...Array.from(C.domNode.children)),_),[]);this.tableBetter.cellSelection.setSelectedTds(v),this.updateMenus();}setCellsMap(v,_){let C=v.domNode.getAttribute("data-row");_.has(C)?_.set(C,[..._.get(C),v.domNode]):_.set(C,[v.domNode]);}showMenus(){this.root.classList.remove("ql-hidden");}splitCell(){let{selectedTds:v}=this.tableBetter.cellSelection,{leftTd:_}=this.getSelectedTdsInfo(),C=r().find(_).children.head;for(let y of v){let P=~~y.getAttribute("colspan")||1,I=~~y.getAttribute("rowspan")||1;if(P===1&&I===1)continue;let B=[],{width:H,right:ie}
32=y.getBoundingClientRect(),pe=r().find(y),ue=pe.table(),K=pe.next,Me=pe.row();if(I>1)if(P>1){let ot=Me.next;for(let Ct=1;Ct<I;Ct++){let{ref:dn,id:Dn}=this.getRefInfo(ot,ie);for(let jn=0;jn<P;jn++)B.push([ot,Dn,dn]);ot&&(ot=ot.next);}}else{let ot=Me.next;for(let Ct=1;Ct<I;Ct++){let{ref:dn,id:Dn}=this.getRefInfo(ot,ie);B.push([ot,Dn,dn]),ot&&(ot=ot.next);}}if(P>1){let ot=y.getAttribute("data-row");for(let Ct=1;Ct<P;Ct++)B.push([Me,ot,K]);}for(let[ot,Ct,dn]of B)ue.insertColumnCell(ot,Ct,dn);let[ze]=de(pe);pe.replaceWith(pe.statics.blotName,Object.assign(Object.assign({},ze),{width:~~(H/P),colspan:null,rowspan:null}));}this.tableBetter.cellSelection.setSelected(C.parent.domNode),this.quill.scrollSelectionIntoView();}toggleAttribute(v,_,C){C&&C.target.closest("li.ql-table-header-row")||(this.prevList&&!this.prevList.isEqualNode(v)&&(this.prevList.classList.add("ql-hidden"),this.prevTooltip.classList.remove("ql-table-tooltip-hidden")),v&&(v.classList.toggle("ql-hidden"),_.classList.toggle("ql-table-tooltip-hidden"),this.prevList=v,this.prevTooltip=_));}toggleHeaderRow(){let{selectedTds:v,hasTdTh:_}=this.tableBetter.cellSelection,{hasTd:C,hasTh:y}=_(v);!C&&y?this.convertToRow():this.convertToHeaderRow();}toggleHeaderRowSwitch(v){if(!this.tableHeaderRow)return;let _=this.tableHeaderRow.querySelector(".ql-table-switch-inner");v||(v=_.getAttribute("aria-checked")==="false"?"true":"false"),_.setAttribute("aria-checked",v);}updateMenus(v=this.table){v&&requestAnimationFrame(()=>{this.root.classList.remove("ql-table-triangle-none");let[_,C]=this.getCorrectBounds(v),{left:y,right:P,top:I,bottom:B}=_,{height:H,width:ie}=this.root.getBoundingClientRect(),pe=this.quill.getModule("toolbar"),ue=getComputedStyle(pe.container),K=I-H-10,Me=y+P-ie>>1;K>-parseInt(ue.paddingBottom)?(this.root.classList.add("ql-table-triangle-up"),this.root.classList.remove("ql-table-triangle-down")):(K=B>C.height?C.height+10:B+10,this.root.classList.add("ql-table-triangle-down"),this.root.classList.remove("ql-table-triangle-up")),Me<C.left?(Me=0,this.root.classList.add("ql-table-triangle-none")):Me+ie>C.right&&(Me=C.right-ie,this.root.classList.add("ql-table-triangle-none")),D(this.root,{left:`${Me}px`,top:`${K}px`});});}updateScroll(v){this.scroll=v;}updateTable(v){this.table=v;}};let M9=r().import("blots/inline");r().import("ui/icons")["table-better"]=$a;class O9 extends M9{}class E9{constructor(){this.computeChildren=[],this.root=this.createContainer();}clearSelected(_){for(let C of _)C.classList&&C.classList.remove("ql-cell-selected");this.computeChildren=[],this.root&&this.setLabelContent(this.root.lastElementChild,null);}createContainer(){let _=document.createElement("div"),C=document.createElement("div"),y=document.createElement("div"),P=document.createDocumentFragment();for(let I=1;I<=10;I++)for(let B=1;B<=10;B++){let H=document.createElement("span");H.setAttribute("row",`${I}`),H.setAttribute("column",`${B}`),P.appendChild(H);}return y.innerHTML="0 x 0",_.classList.add("ql-table-select-container","ql-hidden"),C.classList.add("ql-table-select-list"),y.classList.add("ql-table-select-label"),C.appendChild(P),_.appendChild(C),_.appendChild(y),_.addEventListener("mousemove",I=>this.handleMouseMove(I,_)),_;}getClickInfo(_){let C=_.target,y=C.closest("div.ql-table-select-container"),P=C.closest("span[row]");return y&&!P?[!0,P]:[!1,P];}getComputeChildren(_,C){let y=[],{clientX:P,clientY:I}=C;for(let B of _){let{left:H,top:ie}=B.getBoundingClientRect();P>=H&&I>=ie&&y.push(B);}return y;}getSelectAttrs(_){return[~~_.getAttribute("row"),~~_.getAttribute("column")];}handleClick(_,C){let[y,P]=this.getClickInfo(_);if(this.toggle(this.root,y),P)this.insertTable(P,C);else{let I=this.computeChildren[this.computeChildren.length-1];I&&this.insertTable(I,C);}}handleMouseMove(_,C){let y=C.firstElementChild.children;this.clearSelected(this.computeChildren);let P=this.getComputeChildren(y,_);for(let I of P)I.classList&&I.classList.add("ql-cell-selected");this.computeChildren=P,this.setLabelContent(C.lastElementChild,P[P.length-1]);}hide(_){this.clearSelected(this.computeChildren),_&&_.classList.add("ql-hidden");}insertTable(_,C){let[y,P]=this.getSelectAttrs(_);C(y,P),this.hide(this.root);}setLabelContent(_,C){if(C){let[y,P]=this.getSelectAttrs(C);_.innerHTML=`${y} x ${P}`;}else _.innerHTML="0 x 0";}show(_){this.clearSelected(this.computeChildren),_&&_.classList.remove("ql-hidden");}toggle(_,C){C||this.clearSelected(this.computeChildren),_&&_.classList.toggle("ql-hidden");}}r().import("core/module");let T9=r().import("blots/container"),kE=r().import("modules/toolbar");class RE extends kE{attach(_){let C=Array.from(_.classList).find(P=>P.indexOf("ql-")===0);if(!C)return;if(C=C.slice(3),_.tagName==="BUTTON"&&_.setAttribute("type","button"),this.handlers[C]==null&&this.quill.scroll.query(C)==null)return void console.warn("ignoring attaching to nonexistent format",C,_);let y=_.tagName==="SELECT"?"change":"click";_.addEventListener(y,P=>{var I;let{cellSelection:B}=this.getTableBetter();((I=B?.selectedTds)===null||I===void 0?void 0:I.length)>1?this.cellSelectionAttach(_,C,P,B):this.toolbarAttach(_,C,P);}),this.controls.push([C,_]);}cellSelectionAttach(_,C,y,P){if(_.tagName==="SELECT"){if(_.selectedIndex<0)return;let I=_.options[_.selectedIndex],B=typeof I?.value!="string"||I?.value,H=P.getCorrectValue(C,B);P.setSelectedTdsFormat(C,H);}else{let I=_?.value||!0,B=P.getCorrectValue(C,I);P.setSelectedTdsFormat(C,B),y.preventDefault();}}getTableBetter(){return this.quill.getModule("table-better");}setTableFormat(_,C,y,P,I){let B=null,{cellSelection:H,tableMenus:ie}=this.getTableBetter(),pe=function(ue,K,Me){if(K.length===1){let ze=function(ot,Ct=0,dn=Number.MAX_VALUE){let Dn=(jn,Qn,uo)=>{let Da=[],_l=uo;
32return jn.children.forEachAt(Qn,uo,(Ir,Ns,gl)=>{Ir instanceof T9&&(Da.push(Ir),Da=Da.concat(Dn(Ir,Ns,_l))),_l-=gl;}),Da;};return Dn(ot,Ct,dn);}(r().find(K[0]),ue.index,ue.length);return NE(ze)===NE(Me);}return K.length>1;}(_,C,I);for(let ue of I){let K=I9(C,P,ue,pe);B=ue.format(P,y,K);}if(C.length<2){if(pe||I.length===1){let ue=Ke(B);Promise.resolve().then(()=>{ue&&this.quill.root.contains(ue.domNode)?H.setSelected(ue.domNode,!1):H.setSelected(C[0],!1);});}else H.setSelected(C[0],!1);this.quill.setSelection(_,r().sources.SILENT);}return ie.updateMenus(),B;}toolbarAttach(_,C,y){let P;if(_.tagName==="SELECT"){if(_.selectedIndex<0)return;let B=_.options[_.selectedIndex];P=!B.hasAttribute("selected")&&(B.value||!1);}else P=!_.classList.contains("ql-active")&&(_.value||!_.hasAttribute("value")),y.preventDefault();this.quill.focus();let[I]=this.quill.selection.getRange();if(this.handlers[C]!=null)this.handlers[C].call(this,P);else if(this.quill.scroll.query(C).prototype instanceof wn){if(P=prompt(`Enter ${C}`),!P)return;this.quill.updateContents(new(p())().retain(I.index).delete(I.length).insert({[C]:P}),r().sources.USER);}else this.quill.format(C,P,r().sources.USER);this.update(I);}}function I9(v,_,C,y){return v.length===1&&_==="list"&&C.statics.blotName===U.blotName||y;}function NE(v){return v.reduce((_,C)=>_+C.length(),0);}function AE(v,_,C,y){let P=this.quill.getSelection();if(!y)if(P.length||_.length!==1)y=this.quill.getLines(P);else{let[I]=this.quill.getLine(P.index);y=[I];}return this.setTableFormat(P,_,v,C,y);}RE.DEFAULTS=Ai()({},kE.DEFAULTS,{handlers:{header(v,_){let{cellSelection:C}=this.getTableBetter(),y=C?.selectedTds;if(y?.length)return AE.call(this,v,y,"header",_);this.quill.format("header",v,r().sources.USER);},list(v,_){let{cellSelection:C}=this.getTableBetter(),y=C?.selectedTds;if(y?.length){if(y.length===1){let B=this.quill.getSelection(!0),H=this.quill.getFormat(B);v=C.getListCorrectValue("list",v,H);}return AE.call(this,v,y,"list",_);}let P=this.quill.getSelection(!0),I=this.quill.getFormat(P);v==="check"?I.list==="checked"||I.list==="unchecked"?this.quill.format("list",!1,r().sources.USER):this.quill.format("list","unchecked",r().sources.USER):this.quill.format("list",v,r().sources.USER);},"table-better"(){}}});var k9=RE;let Ew=["error","warn","log","info"],Tw="warn";function DE(v){if(Tw&&Ew.indexOf(v)<=Ew.indexOf(Tw)){for(var _=arguments.length,C=new Array(_>1?_-1:0),y=1;y<_;y++)C[y-1]=arguments[y];console[v](...C);}}function Iw(v){return Ew.reduce((_,C)=>(_[C]=DE.bind(console,C,v),_),{});}Iw.level=v=>{Tw=v;},DE.level=Iw.level;var R9=Iw;r().import("core/module");let N9=r().import("modules/clipboard"),A9=R9("quill:clipboard");var D9=class extends N9{onPaste(v,{text:_,html:C}){let y=this.quill.getFormat(v.index),P=this.getTableDelta({text:_,html:C},y);A9.log("onPaste",P,{text:_,html:C});let I=new(p())().retain(v.index).delete(v.length).concat(P);this.quill.updateContents(I,r().sources.USER),this.quill.setSelection(I.length()-v.length,r().sources.SILENT),this.quill.scrollSelectionIntoView();}getTableDelta({html:v,text:_},C){var y,P,I,B,H;let ie=this.convert({text:_,html:v},C);if(C[Je.blotName]||C[Ge.blotName])for(let pe of ie.ops){if(!((y=pe?.attributes)===null||y===void 0)&&y[zt.blotName])return new(p())();!(!((P=pe?.attributes)===null||P===void 0)&&P.header)&&!(!((I=pe?.attributes)===null||I===void 0)&&I.list)&&!((B=pe?.attributes)===null||B===void 0)&&B[Je.blotName]&&!((H=pe?.attributes)===null||H===void 0)&&H[Ge.blotName]||(pe.attributes=Object.assign(Object.assign({},pe.attributes),C));}return ie;}};let j9=r().import("core/module");class jE extends j9{constructor(_,C){super(_,C),_.clipboard.addMatcher("td, th",Pn),_.clipboard.addMatcher("tr",sn),_.clipboard.addMatcher("col",_i),_.clipboard.addMatcher("table",so),this.language=new $r(C?.language),this.cellSelection=new na(_,this),this.operateLine=new Es(_,this),this.tableMenus=new S9(_,this),this.tableSelect=new E9(),_.root.addEventListener("keyup",this.handleKeyup.bind(this)),_.root.addEventListener("mousedown",this.handleMousedown.bind(this)),_.root.addEventListener("scroll",this.handleScroll.bind(this)),this.listenDeleteTable(),this.registerToolbarTable(C?.toolbarTable);}static register(){r().register(Je,!0),r().register(Ge,!0),r().register(Ne,!0),r().register(Pe,!0),r().register(Oe,!0),r().register(ct,!0),r().register(ht,!0),r().register(qt,!0),r().register(zt,!0),r().register(Vn,!0),r().register(rn,!0),r().register(ni,!0),r().register({"modules/toolbar":k9,"modules/clipboard":D9},!0);}clearHistorySelected(){let[_]=this.getTable();if(!_)return;let C=Array.from(_.domNode.querySelectorAll("td.ql-cell-focused, td.ql-cell-selected"));for(let y of C)y.classList&&y.classList.remove("ql-cell-focused","ql-cell-selected");}deleteTable(){let[_]=this.getTable();if(_==null)return;let C=_.offset();_.remove(),this.hideTools(),this.quill.update(r().sources.USER),this.quill.setSelection(C,r().sources.SILENT);}deleteTableTemporary(_=r().sources.API){let C=this.quill.scroll.descendants(zt);for(let y of C)y.remove();this.hideTools(),this.quill.update(_);}
32getTable(_=this.quill.getSelection()){if(_==null)return[null,null,null,-1];let[C,y]=this.quill.getLine(_.index);if(C==null||C.statics.blotName!==Je.blotName)return[null,null,null,-1];let P=C.parent,I=P.parent;return[I.parent.parent,I,P,y];}handleKeyup(_){this.quill.isEnabled()&&(this.cellSelection.handleKeyup(_),!_.ctrlKey||_.key!=="z"&&_.key!=="y"||(this.hideTools(),this.clearHistorySelected()),this.updateMenus(_));}handleMousedown(_){var C;if(!this.quill.isEnabled())return;(C=this.tableSelect)===null||C===void 0||C.hide(this.tableSelect.root);let y=_.target.closest("table");if(!y||this.quill.root.contains(y)){if(!y)return this.hideTools(),void this.handleMouseMove();this.cellSelection.handleMousedown(_),this.cellSelection.setDisabled(!0);}else this.hideTools();}handleMouseMove(){let _=null,C=P=>{_||(_=P.target.closest("table"));},y=P=>{if(_){let I=r().find(_);if(!I)return;let B=I.offset(this.quill.scroll),H=I.length(),ie=this.quill.getSelection(),pe=Math.min(ie.index,B),ue=Math.max(ie.index+ie.length,B+H);this.quill.setSelection(pe,ue-pe,r().sources.USER);}this.quill.root.removeEventListener("mousemove",C),this.quill.root.removeEventListener("mouseup",y);};this.quill.root.addEventListener("mousemove",C),this.quill.root.addEventListener("mouseup",y);}handleScroll(){var _;this.quill.isEnabled()&&(this.hideTools(),(_=this.tableMenus)===null||_===void 0||_.updateScroll(!0));}hideTools(){var _,C,y,P,I,B,H;(_=this.cellSelection)===null||_===void 0||_.clearSelected(),(C=this.cellSelection)===null||C===void 0||C.setDisabled(!1),(y=this.operateLine)===null||y===void 0||y.hideDragBlock(),(P=this.operateLine)===null||P===void 0||P.hideDragTable(),(I=this.operateLine)===null||I===void 0||I.hideLine(),(B=this.tableMenus)===null||B===void 0||B.hideMenus(),(H=this.tableMenus)===null||H===void 0||H.destroyTablePropertiesForm();}insertTable(_,C){let y=this.quill.getSelection(!0);if(y==null||this.isTable(y))return;let P=this.quill.getFormat(y.index-1),[,I]=this.quill.getLine(y.index),B=!!P[Je.blotName]||I!==0,H=B?2:1,ie=B?new(p())().insert(` 33`):new(p())(),pe=new(p())().retain(y.index).delete(y.length).concat(ie).insert(` 34`,{[zt.blotName]:{style:"width: 100%"}}),ue=new Array(_).fill(0).reduce(K=>{let Me=di();return new Array(C).fill(` 35`).reduce((ze,ot)=>ze.insert(ot,{[Je.blotName]:pi(),[Ne.blotName]:{"data-row":Me}}),K);},pe);this.quill.updateContents(ue,r().sources.USER),this.quill.setSelection(y.index+H,r().sources.SILENT),this.showTools();}isTable(_){return!!this.quill.getFormat(_.index)[Je.blotName];}listenDeleteTable(){this.quill.on(r().events.TEXT_CHANGE,(_,C,y)=>{if(y!==r().sources.USER)return;let P=this.quill.scroll.descendants(Vn);if(!P.length)return;let I=[];if(P.forEach(B=>{let H=B.tbody(),ie=B.thead();H||ie||I.push(B);}),I.length){for(let B of I)B.remove();this.hideTools(),this.quill.update(r().sources.API);}});}registerToolbarTable(_){if(!_)return;r().register({"formats/table-better":O9},!0);let C=this.quill.getModule("toolbar").container.querySelector("button.ql-table-better");C&&this.tableSelect.root&&(C.appendChild(this.tableSelect.root),C.addEventListener("click",y=>{this.tableSelect.handleClick(y,this.insertTable.bind(this));}),document.addEventListener("click",y=>{y.composedPath().includes(C)||this.tableSelect.root.classList.contains("ql-hidden")||this.tableSelect.hide(this.tableSelect.root);}));}showTools(_){let[C,,y]=this.getTable();C&&y&&(this.cellSelection.setDisabled(!0),this.cellSelection.setSelected(y.domNode,_),this.tableMenus.showMenus(),this.tableMenus.updateMenus(C.domNode),this.tableMenus.updateTable(C.domNode));}updateMenus(_){this.cellSelection.selectedTds.length&&(_.key==="Enter"||_.ctrlKey&&_.key==="v")&&this.tableMenus.updateMenus();}}let L9={"table-cell down":zE(!1),"table-cell up":zE(!0),"table-cell-block backspace":LE("Backspace"),"table-cell-block delete":LE("Delete"),"table-header backspace":FE("Backspace"),"table-header delete":FE("Delete"),"table-header enter":{key:"Enter",collapsed:!0,format:["table-header"],suffix:/^$/,handler(v,_){let[C,y]=this.quill.getLine(v.index),P=new(p())().retain(v.index).insert(` 36`,_.format).retain(C.length()-y-1).retain(1,{header:null});this.quill.updateContents(P,r().sources.USER),this.quill.setSelection(v.index+1,r().sources.SILENT),this.quill.scrollSelectionIntoView();}},"table-list backspace":BE("Backspace"),"table-list delete":BE("Delete"),"table-list empty enter":{key:"Enter",collapsed:!0,format:["table-list"],empty:!0,handler(v,_){let{line:C}=_,{cellId:y}=C.parent.formats()[C.parent.statics.blotName],P=C.replaceWith(Je.blotName,y),I=this.quill.getModule("table-better"),B=Ke(P);
36B&&I.cellSelection.setSelected(B.domNode,!1);}}};function LE(v){return{key:v,format:["table-cell-block","table-th-block"],collapsed:!0,handler(_,C){var y;let[P]=this.quill.getLine(_.index),{offset:I,suffix:B}=C;if(I===0&&!P.prev)return!1;let H=(y=P.prev)===null||y===void 0?void 0:y.statics.blotName;return I!==0||H!==A.blotName&&H!==Je.blotName&&H!==U.blotName?!(I!==0&&!B&&v==="Delete"):$E.call(this,P,_);}};}function zE(v){return{key:v?"ArrowUp":"ArrowDown",collapsed:!0,format:["table-cell","table-th"],handler(){return!1;}};}function FE(v){return{key:v,format:["table-header"],collapsed:!0,empty:!0,handler(_,C){let[y]=this.quill.getLine(_.index);if(y.prev)return $E.call(this,y,_);{let P=Ae(y.formats()[y.statics.blotName]);y.replaceWith(Je.blotName,P);}}};}function BE(v){return{key:v,format:["table-list"],collapsed:!0,empty:!0,handler(_,C){let[y]=this.quill.getLine(_.index),P=Ae(y.parent.formats()[y.parent.statics.blotName]);y.replaceWith(Je.blotName,P);}};}function $E(v,_){let C=this.quill.getModule("table-better");return v.remove(),C?.tableMenus.updateMenus(),this.quill.setSelection(_.index-1,r().sources.SILENT),!1;}jE.keyboardBindings=L9;var z9=jE;}(),o.default;}();});});var B9=(()=>{class n extends d1{constructor(e,i,o){super(e,i,o);}ngOnDestroy(){this.flush();}static ɵfac=function(i){return new(i||n)(rr(Bm),rr(J_),rr(p1));};static ɵprov=Sn({token:n,factory:n.ɵfac});}return n;})();function $9(){return new WT();}function V9(){return new YT(re(r1),re(d1),re(ya));}var SI=[{provide:p1,useFactory:$9},{provide:d1,useClass:B9},{provide:B_,useFactory:V9}],JCe=[{provide:J_,useClass:UT},{provide:F_,useValue:"NoopAnimations"},...SI],G9=[{provide:J_,useFactory:()=>new XT()},{provide:F_,useFactory:()=>"BrowserAnimations"},...SI];function MI(){return Qx("NgEagerAnimations"),[...G9];}var q9="@",J9=(()=>{class n{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;
36scheduler=null;injector=re(Hr);loadingSchedulerFn=re(H9,{optional:!0});_engine;constructor(e,i,o,a,r){this.doc=e,this.delegate=i,this.zone=o,this.animationType=a,this.moduleImpl=r;}ngOnDestroy(){this._engine?.flush();}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-LNJKWVMB.js").then(o=>o),i;return this.loadingSchedulerFn?i=this.loadingSchedulerFn(e):i=e(),i.catch(o=>{throw new L_(5300,!1);}).then(({ɵcreateEngine:o,ɵAnimationRendererFactory:a})=>{this._engine=o(this.animationType,this.doc);let r=new a(this.delegate,this._engine,this.zone);return this.delegate=r,r;});}createRenderer(e,i){let o=this.delegate.createRenderer(e,i);if(o.ɵtype===0)return o;typeof o.throwOnSyntheticProps=="boolean"&&(o.throwOnSyntheticProps=!1);let a=new Uw(o);return i?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(r=>{let l=r.createRenderer(e,i);a.use(l),this.scheduler??=this.injector.get(aT,null,{optional:!0}),this.scheduler?.notify(10);}).catch(r=>{a.use(o);}),a;}begin(){this.delegate.begin?.();}end(){this.delegate.end?.();}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve();}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e);}static ɵfac=function(i){sT();};static ɵprov=Sn({token:n,factory:n.ɵfac});}return n;})(),Uw=class{delegate;replay=[];ɵtype=1;constructor(t){this.delegate=t;}use(t){if(this.delegate=t,this.replay!==null){for(let e of this.replay)e(t);this.replay=null;}}get data(){return this.delegate.data;}destroy(){this.replay=null,this.delegate.destroy();}createElement(t,e){return this.delegate.createElement(t,e);}createComment(t){return this.delegate.createComment(t);}createText(t){return this.delegate.createText(t);}get destroyNode(){return this.delegate.destroyNode;}appendChild(t,e){this.delegate.appendChild(t,e);}insertBefore(t,e,i,o){this.delegate.insertBefore(t,e,i,o);}removeChild(t,e,i,o){this.delegate.removeChild(t,e,i,o);}selectRootElement(t,e){return this.delegate.selectRootElement(t,e);}parentNode(t){return this.delegate.parentNode(t);}nextSibling(t){return this.delegate.nextSibling(t);}setAttribute(t,e,i,o){this.delegate.setAttribute(t,e,i,o);}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i);}addClass(t,e){this.delegate.addClass(t,e);}removeClass(t,e){this.delegate.removeClass(t,e);}setStyle(t,e,i,o){this.delegate.setStyle(t,e,i,o);}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i);}setProperty(t,e,i){this.shouldReplay(e)&&this.replay.push(o=>o.setProperty(t,e,i)),this.delegate.setProperty(t,e,i);}setValue(t,e){this.delegate.setValue(t,e);}listen(t,e,i,o){return this.shouldReplay(e)&&this.replay.push(a=>a.listen(t,e,i,o)),this.delegate.listen(t,e,i,o);}shouldReplay(t){return this.replay!==null&&t.startsWith(q9);}},H9=new qi("");function OI(n="animations"){return Qx("NgAsyncAnimations"),af([{provide:B_,useFactory:()=>new J9(re(Bm),re(r1),re(ya),n)},{provide:F_,useValue:n==="noop"?"NoopAnimations":"BrowserAnimations"}]);}var qm={production:!0,localhost:!1,domain:"skycortex.ai",firebase:{apiKey:"AIzaSyCntLhWKsVjxgKJSQ3G760R7a0pW6RW9CQ",authDomain:"method-ai.firebaseapp.com",projectId:"method-ai",storageBucket:"method-ai.appspot.com",messagingSenderId:"473592902444",appId:"1:473592902444:web:a06b9df8c18f4a26ec7289",measurementId:"G-8LCRX38WEN"},socialAuth:{google:{clientId:"your-google-client-id"},facebook:{appId:"your-facebook-app-id"},github:{clientId:"your-github-client-id"}},appcheck:{recaptchaEntrepriseKey:"6Le1_jYqAAAAABTVFNm4pHoDgpvLvgkh90H0Wl-d",debugToken:void 0}};var{min:U9,max:W9}=Math,Rl=(n,t=0,e=1)=>U9(W9(t,n),e);var Jm=n=>{n._clipped=!1,n._unclipped=n.slice(0);for(let t=0;t<=3;t++)t<3?((n[t]<0||n[t]>255)&&(n._clipped=!0),n[t]=Rl(n[t],0,255)):t===3&&(n[t]=Rl(n[t],0,1));return n;};var EI={};for(let n of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])EI[`[object ${n}]`]=n.toLowerCase();function cn(n){return EI[Object.prototype.toString.call(n)]||"object";}var vt=(n,t=null)=>n.length>=3?Array.prototype.slice.call(n):cn(n[0])=="object"&&t?t.split("").filter(e=>n[0][e]!==void 0).map(e=>n[0][e]):n[0].slice(0);var Ys=n=>{if(n.length<2)return null;let t=n.length-1;return cn(n[t])=="string"?n[t].toLowerCase():null;};var{PI:Y1,min:K1,max:Z1}=Math,Nr=n=>Math.round(n*100)/100,K_=n=>Math.round(n*100)/100,Nl=Y1*2,Q1=Y1/3,TI=Y1/180,II=180/Y1;function eC(n){return[...n.slice(0,3).reverse(),...n.slice(3)];}var xn={format:{},autodetect:[]};var Ww=class{constructor(...t){let e=this;if(cn(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let i=Ys(t),o=!1;if(!i){o=!0,xn.sorted||(xn.autodetect=xn.autodetect.sort((a,r)=>r.p-a.p),xn.sorted=!0);for(let a of xn.autodetect)if(i=a.test(...t),i)break;}if(xn.format[i]){let a=xn.format[i].apply(null,o?t:t.slice(0,-1));e._rgb=Jm(a);}else throw new Error("unknown format: "+t);e._rgb.length===3&&e._rgb.push(1);}toString(){return cn(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`;}}
36,He=Ww;var kI="3.2.0";var RI=(...n)=>new He(...n);RI.version=kI;var Ln=RI;var X9={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},yd=X9;var Y9=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,K9=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Z9=n=>
36{if(n.match(Y9)){(n.length===4||n.length===7)&&(n=n.substr(1)),n.length===3&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]);let t=parseInt(n,16),e=t>>16,i=t>>8&255,o=t&255;return[e,i,o,1];}if(n.match(K9)){(n.length===5||n.length===9)&&(n=n.substr(1)),n.length===4&&(n=n.split(""),n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]);let t=parseInt(n,16),e=t>>24&255,i=t>>16&255,o=t>>8&255,a=Math.round((t&255)/255*100)/100;return[e,i,o,a];}throw new Error(`unknown hex color: ${n}`);},tC=Z9;var{round:nC}=Math,Q9=(...n)=>{let[t,e,i,o]=vt(n,"rgba"),a=Ys(n)||"auto";o===void 0&&(o=1),a==="auto"&&(a=o<1?"rgba":"rgb"),t=nC(t),e=nC(e),i=nC(i);let l="000000"+(t<<16|e<<8|i).toString(16);l=l.substr(l.length-6);let p="0"+nC(o*255).toString(16);switch(p=p.substr(p.length-2),a.toLowerCase()){case"rgba":return`#${l}${p}`;case"argb":return`#${p}${l}`;default:return`#${l}`;}},iC=Q9;He.prototype.name=function(){let n=iC(this._rgb,"rgb");for(let t of Object.keys(yd))if(yd[t]===n)return t.toLowerCase();return n;};xn.format.named=n=>{if(n=n.toLowerCase(),yd[n])return tC(yd[n]);throw new Error("unknown color name: "+n);};xn.autodetect.push({p:5,test:(n,...t)=>{if(!t.length&&cn(n)==="string"&&yd[n.toLowerCase()])return"named";}}
36);He.prototype.alpha=function(n,t=!1){return n!==void 0&&cn(n)==="number"?t?(this._rgb[3]=n,this):new He([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3];};He.prototype.clipped=function(){return this._rgb._clipped||!1;};var Z_={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:.008856451679035631,kKE:8,kK:903.2962962962963,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},Nc=Z_,ez=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Al(n){let t=ez.get(String(n).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+n);Z_.labWhitePoint=n,Z_.Xn=t[0],Z_.Zn=t[1];}function Pd(){return Z_.labWhitePoint;}var tz=(...n)=>{n=vt(n,"lab");let[t,e,i]=n,[o,a,r]=nz(t,e,i),[l,p,d]=Yw(o,a,r);return[l,p,d,n.length>3?n[3]:1];},nz=(n,t,e)=>{let{kE:i,kK:o,kKE:a,Xn:r,Yn:l,Zn:p}=Nc,d=(n+16)/116,f=.002*t+d,h=d-.005*e,g=f*f*f,b=h*h*h,w=g>i?g:(116*f-16)/o,T=n>a?Math.pow((n+16)/116,3):n/o,O=b>i?b:(116*h-16)/o,V=w*r,j=T*l,L=O*p;return[V,j,L];},Xw=n=>{let t=Math.sign(n);return n=Math.abs(n),(n<=.0031308?n*12.92:1.055*Math.pow(n,1/2.4)-.055)*t;},Yw=(n,t,e)=>{let{MtxAdaptMa:i,MtxAdaptMaI:o,MtxXYZ2RGB:a,RefWhiteRGB:r,Xn:l,Yn:p,Zn:d}=Nc,f=l*i.m00+p*i.m10+d*i.m20,h=l*i.m01+p*i.m11+d*i.m21,g=l*i.m02+p*i.m12+d*i.m22,b=r.X*i.m00+r.Y*i.m10+r.Z*i.m20,w=r.X*i.m01+r.Y*i.m11+r.Z*i.m21,T=r.X*i.m02+r.Y*i.m12+r.Z*i.m22,O=(n*i.m00+t*i.m10+e*i.m20)*(b/f),V=(n*i.m01+t*i.m11+e*i.m21)*(w/h),j=(n*i.m02+t*i.m12+e*i.m22)*(T/g),L=O*o.m00+V*o.m10+j*o.m20,A=O*o.m01+V*o.m11+j*o.m21,J=O*o.m02+V*o.m12+j*o.m22,Q=Xw(L*a.m00+A*a.m10+J*a.m20),te=Xw(L*a.m01+A*a.m11+J*a.m21),U=Xw(L*a.m02+A*a.m12+J*a.m22);return[Q*255,te*255,U*255];},yf=tz;var iz=(...n)=>{let[t,e,i,...o]=vt(n,"rgb"),[a,r,l]=Zw(t,e,i),[p,d,f]=oz(a,r,l);return[p,d,f,...(o.length>0&&o[0]<1?[o[0]]:[])];};function oz(n,t,e){let{Xn:i,Yn:o,Zn:a,kE:r,kK:l}=Nc,p=n/i,d=t/o,f=e/a,h=p>r?Math.pow(p,1/3):(l*p+16)/116,g=d>r?Math.pow(d,1/3):(l*d+16)/116,b=f>r?Math.pow(f,1/3):(l*f+16)/116;return[116*g-16,500*(h-g),200*(g-b)];}function Kw(n){let t=Math.sign(n);return n=Math.abs(n),(n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4))*t;}var Zw=(n,t,e)=>{n=Kw(n/255),t=Kw(t/255),e=Kw(e/255);let{MtxRGB2XYZ:i,MtxAdaptMa:o,MtxAdaptMaI:a,Xn:r,Yn:l,Zn:p,As:d,Bs:f,Cs:h}=Nc,g=n*i.m00+t*i.m10+e*i.m20,b=n*i.m01+t*i.m11+e*i.m21,w=n*i.m02+t*i.m12+e*i.m22,T=r*o.m00+l*o.m10+p*o.m20,O=r*o.m01+l*o.m11+p*o.m21,V=r*o.m02+l*o.m12+p*o.m22,j=g*o.m00+b*o.m10+w*o.m20,L=g*o.m01+b*o.m11+w*o.m21,A=g*o.m02+b*o.m12+w*o.m22;return j*=T/d,L*=O/f,A*=V/h,g=j*a.m00+L*a.m10+A*a.m20,b=j*a.m01+L*a.m11+A*a.m21,w=j*a.m02+L*a.m12+A*a.m22,[g,b,w];},Pf=iz;He.prototype.lab=function(){return Pf(this._rgb);};var az=(...n)=>new He(...n,"lab");Object.assign(Ln,{lab:az,getLabWhitePoint:Pd,setLabWhitePoint:Al});xn.format.lab=yf;xn.autodetect.push({p:2,test:(...n)=>{if(n=vt(n,"lab"),cn(n)==="array"&&n.length===3)return"lab";}});He.prototype.darken=function(n=1){let t=this,e=t.lab();return e[0]-=Nc.Kn*n,new He(e,"lab").alpha(t.alpha(),!0);};He.prototype.brighten=function(n=1){return this.darken(-n);};He.prototype.darker=He.prototype.darken;He.prototype.brighter=He.prototype.brighten;He.prototype.get=function(n){let[t,e]=n.split("."),i=this[t]();if(e){let o=t.indexOf(e)-(t.substr(0,2)==="ok"?2:0);if(o>-1)return i[o];throw new Error(`unknown channel ${e} in mode ${t}`);}else return i;};var{pow:rz}=Math,sz=1e-7,lz=20;He.prototype.luminance=function(n,t="rgb"){if(n!==void 0&&cn(n)==="number"){if(n===0)return new He([0,0,0,this._rgb[3]],"rgb");if(n===1)return new He([255,255,255,this._rgb[3]],"rgb");let e=this.luminance(),i=lz,o=(r,l)=>{let p=r.interpolate(l,.5,t),d=p.luminance();return Math.abs(n-d)<sz||!i--?p:d>n?o(r,p):o(p,l);},a=(e>n?o(new He([0,0,0]),this):o(this,new He([255,255,255]))).rgb();return new He([...a,this._rgb[3]]);}return cz(...this._rgb.slice(0,3));};var cz=(n,t,e)=>(n=Qw(n),t=Qw(t),e=Qw(e),.2126*n+.7152*t+.0722*e),Qw=n=>(n/=255,n<=.03928?n/12.92:rz((n+.055)/1.055,2.4));var Go={};var Ac=(n,t,e=.5,...i)=>{let o=i[0]||"lrgb";if(!Go[o]&&!i.length&&(o=Object.keys(Go)[0]),!Go[o])throw new Error(`interpolation mode ${o} is not defined`);return cn(n)!=="object"&&(n=new He(n)),cn(t)!=="object"&&(t=new He(t)),Go[o](n,t,e).alpha(n.alpha()+e*(t.alpha()-n.alpha()));};He.prototype.mix=He.prototype.interpolate=function(n,t=.5,...e){return Ac(this,n,t,...e);};He.prototype.premultiply=function(n=!1){let t=this._rgb,e=t[3];return n?(this._rgb=[t[0]*e,t[1]*e,t[2]*e,e],this):new He([t[0]*e,t[1]*e,t[2]*e,e],"rgb");};var{sin:pz,cos:dz}=Math,mz=(...n)=>{let[t,e,i]=vt(n,"lch");
36return isNaN(i)&&(i=0),i=i*TI,[t,dz(i)*e,pz(i)*e];},oC=mz;var uz=(...n)=>{n=vt(n,"lch");let[t,e,i]=n,[o,a,r]=oC(t,e,i),[l,p,d]=yf(o,a,r);return[l,p,d,n.length>3?n[3]:1];},wf=uz;var fz=(...n)=>{let t=eC(vt(n,"hcl"));return wf(...t);},NI=fz;var{sqrt:hz,atan2:_z,round:gz}=Math,xz=(...n)=>{let[t,e,i]=vt(n,"lab"),o=hz(e*e+i*i),a=(_z(i,e)*II+360)%360;return gz(o*1e4)===0&&(a=Number.NaN),[t,o,a];},aC=xz;var Cz=(...n)=>{let[t,e,i,...o]=vt(n,"rgb"),[a,r,l]=Pf(t,e,i),[p,d,f]=aC(a,r,l);return[p,d,f,...(o.length>0&&o[0]<1?[o[0]]:[])];},Q_=Cz;He.prototype.lch=function(){return Q_(this._rgb);};He.prototype.hcl=function(){return eC(Q_(this._rgb));};var vz=(...n)=>new He(...n,"lch"),bz=(...n)=>new He(...n,"hcl");Object.assign(Ln,{lch:vz,hcl:bz});xn.format.lch=wf;xn.format.hcl=NI;["lch","hcl"].forEach(n=>xn.autodetect.push({p:2,test:(...t)=>{if(t=vt(t,n),cn(t)==="array"&&t.length===3)return n;}}));He.prototype.saturate=function(n=1){let t=this,e=t.lch();return e[1]+=Nc.Kn*n,e[1]<0&&(e[1]=0),new He(e,"lch").alpha(t.alpha(),!0);};He.prototype.desaturate=function(n=1){return this.saturate(-n);};He.prototype.set=function(n,t,e=!1){let[i,o]=n.split("."),a=this[i]();if(o){let r=i.indexOf(o)-(i.substr(0,2)==="ok"?2:0);if(r>-1){if(cn(t)=="string")switch(t.charAt(0)){case"+":a[r]+=+t;break;case"-":a[r]+=+t;break;case"*":a[r]*=+t.substr(1);break;case"/":a[r]/=+t.substr(1);break;default:a[r]=+t;}else if(cn(t)==="number")a[r]=t;else throw new Error("unsupported value for Color.set");let l=new He(a,i);return e?(this._rgb=l._rgb,this):l;}throw new Error(`unknown channel ${o} in mode ${i}`);}else return a;};He.prototype.tint=function(n=.5,...t){return Ac(this,"white",n,...t);};He.prototype.shade=function(n=.5,...t){return Ac(this,"black",n,...t);};var yz=(n,t,e)=>{let i=n._rgb,o=t._rgb;return new He(i[0]+e*(o[0]-i[0]),i[1]+e*(o[1]-i[1]),i[2]+e*(o[2]-i[2]),"rgb");};Go.rgb=yz;var{sqrt:eS,pow:Sf}=Math,Pz=(n,t,e)=>{let[i,o,a]=n._rgb,[r,l,p]=t._rgb;return new He(eS(Sf(i,2)*(1-e)+Sf(r,2)*e),eS(Sf(o,2)*(1-e)+Sf(l,2)*e),eS(Sf(a,2)*(1-e)+Sf(p,2)*e),"rgb");};Go.lrgb=Pz;var wz=(n,t,e)=>{let i=n.lab(),o=t.lab();return new He(i[0]+e*(o[0]-i[0]),i[1]+e*(o[1]-i[1]),i[2]+e*(o[2]-i[2]),"lab");};Go.lab=wz;var Dl=(n,t,e,i)=>{let o,a;i==="hsl"?(o=n.hsl(),a=t.hsl()):i==="hsv"?(o=n.hsv(),a=t.hsv()):i==="hcg"?(o=n.hcg(),a=t.hcg()):i==="hsi"?(o=n.hsi(),a=t.hsi()):i==="lch"||i==="hcl"?(i="hcl",o=n.hcl(),a=t.hcl()):i==="oklch"&&(o=n.oklch().reverse(),a=t.oklch().reverse());let r,l,p,d,f,h;(i.substr(0,1)==="h"||i==="oklch")&&([r,p,f]=o,[l,d,h]=a);let g,b,w,T;return!isNaN(r)&&!isNaN(l)?(l>r&&l-r>180?T=l-(r+360):l<r&&r-l>180?T=l+360-r:T=l-r,b=r+e*T):isNaN(r)?isNaN(l)?b=Number.NaN:(b=l,(f==1||f==0)&&i!="hsv"&&(g=d)):(b=r,(h==1||h==0)&&i!="hsv"&&(g=p)),g===void 0&&(g=p+e*(d-p)),w=f+e*(h-f),i==="oklch"?new He([w,g,b],i):new He([b,g,w],i);};var AI=(n,t,e)=>Dl(n,t,e,"lch");Go.lch=AI;Go.hcl=AI;var Sz=n=>{if(cn(n)=="number"&&n>=0&&n<=16777215){let t=n>>16,e=n>>8&255,i=n&255;return[t,e,i,1];}throw new Error("unknown num color: "+n);},DI=Sz;var Mz=(...n)=>{let[t,e,i]=vt(n,"rgb");return(t<<16)+(e<<8)+i;},jI=Mz;He.prototype.num=function(){return jI(this._rgb);};var Oz=(...n)=>new He(...n,"num");Object.assign(Ln,{num:Oz});xn.format.num=DI;xn.autodetect.push({p:5,test:(...n)=>{if(n.length===1&&cn(n[0])==="number"&&n[0]>=0&&n[0]<=16777215)return"num";}});var Ez=(n,t,e)=>{let i=n.num(),o=t.num();return new He(i+e*(o-i),"num");};Go.num=Ez;var{floor:Tz}=Math,Iz=(...n)=>{n=vt(n,"hcg");let[t,e,i]=n,o,a,r;i=i*255;let l=e*255;if(e===0)o=a=r=i;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let p=Tz(t),d=t-p,f=i*(1-e),h=f+l*(1-d),g=f+l*d,b=f+l;switch(p){case 0:[o,a,r]=[b,g,f];break;case 1:[o,a,r]=[h,b,f];break;case 2:[o,a,r]=[f,b,g];break;case 3:[o,a,r]=[f,h,b];break;case 4:[o,a,r]=[g,f,b];break;case 5:[o,a,r]=[b,f,h];break;}}return[o,a,r,n.length>3?n[3]:1];},LI=Iz;var kz=(...n)=>{let[t,e,i]=vt(n,"rgb"),o=K1(t,e,i),a=Z1(t,e,i),r=a-o,l=r*100/255,p=o/(255-r)*100,d;return r===0?d=Number.NaN:(t===a&&(d=(e-i)/r),e===a&&(d=2+(i-t)/r),i===a&&(d=4+(t-e)/r),d*=60,d<0&&(d+=360)),[d,l,p];},zI=kz;He.prototype.hcg=function(){return zI(this._rgb);};var Rz=(...n)=>new He(...n,"hcg");Ln.hcg=Rz;xn.format.hcg=LI;xn.autodetect.push({p:1,test:(...n)=>{if(n=vt(n,"hcg"),cn(n)==="array"&&n.length===3)return"hcg";}});var Nz=(n,t,e)=>Dl(n,t,e,"hcg");Go.hcg=Nz;var{cos:Mf}=Math,Az=(...n)=>{n=vt(n,"hsi");let[t,e,i]=n,o,a,r;return isNaN(t)&&(t=0),isNaN(e)&&(e=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(r=(1-e)/3,o=(1+e*Mf(Nl*t)/Mf(Q1-Nl*t))/3,a=1-(r+o)):t<2/3?(t-=1/3,o=(1-e)/3,a=(1+e*Mf(Nl*t)/Mf(Q1-Nl*t))/3,r=1-(o+a)):(t-=2/3,a=(1-e)/3,r=(1+e*Mf(Nl*t)/Mf(Q1-Nl*t))/3,o=1-(a+r)),o=Rl(i*o*3),a=Rl(i*a*3),r=Rl(i*r*3),[o*255,a*255,r*255,n.length>3?n[3]:1];},FI=Az;var{min:Dz,sqrt:jz,acos:Lz}=Math,zz=(...n)=>{let[t,e,i]=vt(n,"rgb");t/=255,e/=255,i/=255;let o,a=Dz(t,e,i),r=(t+e+i)/3,l=r>0?1-a/r:0;return l===0?o=NaN:(o=(t-e+(t-i))/2,o/=jz((t-e)*(t-e)+(t-i)*(e-i)),o=Lz(o),i>e&&(o=Nl-o),o/=Nl),[o*360,l,r];},BI=zz;He.prototype.hsi=function(){return BI(this._rgb);};var Fz=(...n)=>new He(...n,"hsi");Ln.hsi=Fz;xn.format.hsi=FI;xn.autodetect.push({p:2,test:(...n)=>{if(n=vt(n,"hsi"),cn(n)==="array"&&n.length===3)return"hsi";}});var Bz=(n,t,e)=>Dl(n,t,e,"hsi");Go.hsi=Bz;var $z=(...n)=>{n=vt(n,"hsl");let[t,e,i]=n,o,a,r;if(e===0)o=a=r=i*255;else{let l=[0,0,0],p=[0,0,0],d=i<.5?i*(1+e):i+e-i*e,f=2*i-d,h=t/360;l[0]=h+1/3,l[1]=h,l[2]=h-1/3;for(let g=0;g<3;g++)l[g]<0&&(l[g]+=1),l[g]>1&&(l[g]-=1),6*l[g]<1?p[g]=f+(d-f)*6*l[g]:2*l[g]<1?p[g]=d:3*l[g]<2?p[g]=f+(d-f)*(2/3-l[g])*6:p[g]=f;[o,a,r]=[p[0]*255,p[1]*255,p[2]*255];}return n.length>3?[o,a,r,n[3]]:[o,a,r,1];},e0=$z;var Vz=(...n)=>{n=vt(n,"rgba");let[t,e,i]=n;t/=255,e/=255,i/=255;let o=K1(t,e,i),a=Z1(t,e,i),r=(a+o)/2,l,p;return a===o?(l=0,p=Number.NaN):l=r<.5?(a-o)/(a+o):(a-o)/(2-a-o),t==a?p=(e-i)/(a-o):e==a?p=2+(i-t)/(a-o):i==a&&(p=4+(t-e)/(a-o)),p*=60,p<0&&(p+=360),n.length>3&&n[3]!==void 0?[p,l,r,n[3]]:[p,l,r];},rC=Vz;He.prototype.hsl=function(){return rC(this._rgb);};var Gz=(...n)=>new He(...n,"hsl");Ln.hsl=Gz;xn.format.hsl=e0;xn.autodetect.push({p:2,test:(...n)=>{if(n=vt(n,"hsl"),cn(n)==="array"&&n.length===3)return"hsl";}});var qz=(n,t,e)=>Dl(n,t,e,"hsl");Go.hsl=qz;var{floor:Jz}=Math,Hz=(...n)=>{n=vt(n,"hsv");let[t,e,i]=n,o,a,r;if(i*=255,e===0)o=a=r=i;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;let l=Jz(t),p=t-l,d=i*(1-e),f=i*(1-e*p),h=i*(1-e*(1-p));switch(l){case 0:[o,a,r]=[i,h,d];break;case 1:[o,a,r]=[f,i,d];break;case 2:[o,a,r]=[d,i,h];break;case 3:[o,a,r]=[d,f,i];break;case 4:[o,a,r]=[h,d,i];break;case 5:[o,a,r]=[i,d,f];break;}}return[o,a,r,n.length>3?n[3]:1];},$I=Hz;var{min:Uz,max:Wz}=Math,Xz=(...n)=>{n=vt(n,"rgb");let[t,e,i]=n,o=Uz(t,e,i),a=Wz(t,e,i),r=a-o,l,p,d;return d=a/255,a===0?(l=Number.NaN,p=0):(p=r/a,t===a&&(l=(e-i)/r),e===a&&(l=2+(i-t)/r),i===a&&(l=4+(t-e)/r),l*=60,l<0&&(l+=360)),[l,p,d];},VI=Xz;He.prototype.hsv=function(){return VI(this._rgb);};var Yz=(...n)=>new He(...n,"hsv");Ln.hsv=Yz;xn.format.hsv=$I;xn.autodetect.push({p:2,test:(...n)=>{if(n=vt(n,"hsv"),cn(n)==="array"&&n.length===3)return"hsv";}});var Kz=(n,t,e)=>Dl(n,t,e,"hsv");Go.hsv=Kz;function Hm(n,t){let e=n.length;Array.isArray(n[0])||(n=[n]),Array.isArray(t[0])||(t=t.map(r=>[r]));let i=t[0].length,o=t[0].map((r,l)=>t.map(p=>p[l])),a=n.map(r=>o.map(l=>Array.isArray(r)?r.reduce((p,d,f)=>p+d*(l[f]||0),0):l.reduce((p,d)=>p+d*r,0)));return e===1&&(a=a[0]),i===1?a.map(r=>r[0]):a;}var Zz=(...n)=>{n=vt(n,"lab");let[t,e,i,...o]=n,[a,r,l]=Qz([t,e,i]),[p,d,f]=Yw(a,r,l);return[p,d,f,...(o.length>0&&o[0]<1?[o[0]]:[])];};function Qz(n){var t=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.11228680328
360317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],e=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],i=Hm(e,n);return Hm(t,i.map(o=>o**3));}var Of=Zz;var eF=(...n)=>{let[t,e,i,...o]=vt(n,"rgb"),a=Zw(t,e,i);return[...tF(a),...(o.length>0&&o[0]<1?[o[0]]:[])];};function tF(n){let t=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],e=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],i=Hm(t,n);return Hm(e,i.map(o=>Math.cbrt(o)));}var Ef=eF;He.prototype.oklab=function(){return Ef(this._rgb);};var nF=(...n)=>new He(...n,"oklab");Object.assign(Ln,{oklab:nF});xn.format.oklab=Of;xn.autodetect.push({p:2,test:(...n)=>{if(n=vt(n,"oklab"),cn(n)==="array"&&n.length===3)return"oklab";}});var iF=(n,t,e)=>{let i=n.oklab(),o=t.oklab();return new He(i[0]+e*(o[0]-i[0]),i[1]+e*(o[1]-i[1]),i[2]+e*(o[2]-i[2]),"oklab");};Go.oklab=iF;var oF=(n,t,e)=>Dl(n,t,e,"oklch");Go.oklch=oF;var{pow:tS,sqrt:nS,PI:iS,cos:GI,sin:qI,atan2:aF}=Math,JI=(n,t="lrgb",e=null)=>{let i=n.length;e||(e=Array.from(new Array(i)).map(()=>1));let o=i/e.reduce(function(h,g){return h+g;});if(e.forEach((h,g)=>{e[g]*=o;}),n=n.map(h=>new He(h)),t==="lrgb")return rF(n,e);let a=n.shift(),r=a.get(t),l=[],p=0,d=0;for(let h=0;h<r.length;h++)if(r[h]=(r[h]||0)*e[0],l.push(isNaN(r[h])?0:e[0]),t.charAt(h)==="h"&&!isNaN(r[h])){let g=r[h]/180*iS;p+=GI(g)*e[0],d+=qI(g)*e[0];}let f=a.alpha()*e[0];n.forEach((h,g)=>{let b=h.get(t);f+=h.alpha()*e[g+1];for(let w=0;w<r.length;w++)if(!isNaN(b[w]))if(l[w]+=e[g+1],t.charAt(w)==="h"){let T=b[w]/180*iS;p+=GI(T)*e[g+1],d+=qI(T)*e[g+1];}else r[w]+=b[w]*e[g+1];});for(let h=0;h<r.length;h++)if(t.charAt(h)==="h"){let g=aF(d/l[h],p/l[h])/iS*180;for(;g<0;)g+=360;for(;g>=360;)g-=360;r[h]=g;}else r[h]=r[h]/l[h];return f/=i,new He(r,t).alpha(f>.99999?1:f,!0);},rF=(n,t)=>{let e=n.length,i=[0,0,0,0];for(let o=0;o<n.length;o++){let a=n[o],r=t[o]/e,l=a._rgb;i[0]+=tS(l[0],2)*r,i[1]+=tS(l[1],2)*r,i[2]+=tS(l[2],2)*r,i[3]+=l[3]*r;}return i[0]=nS(i[0]),i[1]=nS(i[1]),i[2]=nS(i[2]),i[3]>.9999999&&(i[3]=1),new He(Jm(i));};var{pow:sF}=Math;function Um(n){let t="rgb",e=Ln("#ccc"),i=0,o=[0,1],a=[0,1],r=[],l=[0,0],p=!1,d=[],f=!1,h=0,g=1,b=!1,w={},T=!0,O=1,V=function(U){if(U=U||["#fff","#000"],U&&cn(U)==="string"&&Ln.brewer&&Ln.brewer[U.toLowerCase()]&&(U=Ln.brewer[U.toLowerCase()]),cn(U)==="array"){U.length===1&&(U=[U[0],U[0]]),U=U.slice(0);for(let ce=0;ce<U.length;ce++)U[ce]=Ln(U[ce]);r.length=0;for(let ce=0;ce<U.length;ce++)r.push(ce/(U.length-1));}return Q(),d=U;},j=function(U){if(p!=null){let ce=p.length-1,W=0;for(;W<ce&&U>=p[W];)W++;return W-1;}return 0;},L=U=>U,A=U=>U,J=function(U,ce){let W,Y;if(ce==null&&(ce=!1),isNaN(U)||U===null)return e;ce?Y=U:p&&p.length>2?Y=j(U)/(p.length-2):g!==h?Y=(U-h)/(g-h):Y=1,Y=A(Y),ce||(Y=L(Y)),O!==1&&(Y=sF(Y,O)),Y=l[0]+Y*(1-l[0]-l[1]),Y=Rl(Y,0,1);let se=Math.floor(Y*1e4);if(T&&w[se])W=w[se];else{if(cn(d)==="array")for(let de=0;de<r.length;de++){let Ae=r[de];if(Y<=Ae){W=d[de];break;}if(Y>=Ae&&de===r.length-1){W=d[de];break;}if(Y>Ae&&Y<r[de+1]){Y=(Y-Ae)/(r[de+1]-Ae),W=Ln.interpolate(d[de],d[de+1],Y,t);break;}}else cn(d)==="function"&&(W=d(Y));T&&(w[se]=W);}return W;};var Q=()=>w={};V(n);let te=function(U){let ce=Ln(J(U));return f&&ce[f]?ce[f]():ce;};return te.classes=function(U){if(U!=null){if(cn(U)==="array")p=U,o=[U[0],U[U.length-1]];else{let ce=Ln.analyze(o);U===0?p=[ce.min,ce.max]:p=Ln.limits(ce,"e",U);}return te;}return p;},te.domain=function(U){if(!arguments.length)return a;a=U.slice(0),h=U[0],g=U[U.length-1],r=[];let ce=d.length;if(U.length===ce&&h!==g)for(let W of Array.from(U))r.push((W-h)/(g-h));else{for(let W=0;W<ce;W++)r.push(W/(ce-1));if(U.length>2){let W=U.map((se,de)=>de/(U.length-1)),Y=U.map(se=>(se-h)/(g-h));Y.every((se,de)=>W[de]===se)||(A=se=>{if(se<=0||se>=1)return se;let de=0;for(;se>=Y[de+1];)de++;let Ae=(se-Y[de])/(Y[de+1]-Y[de]);return W[de]+Ae*(W[de+1]-W[de]);});}}return o=[h,g],te;},te.mode=function(U){return arguments.length?(t=U,Q(),te):t;},te.range=function(U,ce){return V(U,ce),te;},te.out=function(U){return f=U,te;},te.spread=function(U){return arguments.length?(i=U,te):i;},te.correctLightness=function(U){return U==null&&(U=!0),b=U,Q(),b?L=function(ce){let W=J(0,!0).lab()[0],Y=J(1,!0).lab()[0],se=W>Y,de=J(ce,!0).lab()[0],Ae=W+(Y-W)*ce,rt=de-Ae,et=0,pt=1,ft=20;for(;Math.abs(rt)>.01&&ft-->0;)(function(){return se&&(rt*=-1),rt<0?(et=ce,ce+=(pt-ce)*.5):(pt=ce,ce+=(et-ce)*.5),de=J(ce,!0).lab()[0],rt=de-Ae;})();return ce;}:L=ce=>ce,te;},te.padding=function(U){return U!=null?(cn(U)==="number"&&(U=[U,U]),l=U,te):l;}
36,te.colors=function(U,ce){arguments.length<2&&(ce="hex");let W=[];if(arguments.length===0)W=d.slice(0);else if(U===1)W=[te(.5)];else if(U>1){let Y=o[0],se=o[1]-Y;W=lF(0,U,!1).map(de=>te(Y+de/(U-1)*se));}else{n=[];let Y=[];if(p&&p.length>2)for(let se=1,de=p.length,Ae=1<=de;Ae?se<de:se>de;Ae?se++:se--)Y.push((p[se-1]+p[se])*.5);else Y=o;W=Y.map(se=>te(se));}return Ln[ce]&&(W=W.map(Y=>Y[ce]())),W;},te.cache=function(U){return U!=null?(T=U,te):T;},te.gamma=function(U){return U!=null?(O=U,te):O;},te.nodata=function(U){return U!=null?(e=Ln(U),te):e;},te;}function lF(n,t,e){let i=[],o=n<t,a=e?o?t+1:t-1:t;for(let r=n;o?r<a:r>a;o?r++:r--)i.push(r);return i;}var cF=function(n){let t=[1,1];for(let e=1;e<n;e++){let i=[1];for(let o=1;o<=t.length;o++)i[o]=(t[o]||0)+t[o-1];t=i;}return t;},pF=function(n){let t,e,i,o;if(n=n.map(a=>new He(a)),n.length===2)[e,i]=n.map(a=>a.lab()),t=function(a){let r=[0,1,2].map(l=>e[l]+a*(i[l]-e[l]));return new He(r,"lab");};else if(n.length===3)[e,i,o]=n.map(a=>a.lab()),t=function(a){let r=[0,1,2].map(l=>(1-a)*(1-a)*e[l]+2*(1-a)*a*i[l]+a*a*o[l]);return new He(r,"lab");};else if(n.length===4){let a;[e,i,o,a]=n.map(r=>r.lab()),t=function(r){let l=[0,1,2].map(p=>(1-r)*(1-r)*(1-r)*e[p]+3*(1-r)*(1-r)*r*i[p]+3*(1-r)*r*r*o[p]+r*r*r*a[p]);return new He(l,"lab");};}else if(n.length>=5){let a,r,l;a=n.map(p=>p.lab()),l=n.length-1,r=cF(l),t=function(p){let d=1-p,f=[0,1,2].map(h=>a.reduce((g,b,w)=>g+r[w]*d**(l-w)*p**w*b[h],0));return new He(f,"lab");};}else throw new RangeError("No point in running bezier with only one color.");return t;},HI=n=>{let t=pF(n);return t.scale=()=>Um(t),t;};var{round:UI}=Math;He.prototype.rgb=function(n=!0){return n===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(UI);};He.prototype.rgba=function(n=!0){return this._rgb.slice(0,4).map((t,e)=>e<3?n===!1?t:UI(t):t);};var dF=(...n)=>new He(...n,"rgb");Object.assign(Ln,{rgb:dF});xn.format.rgb=(...n)=>{let t=vt(n,"rgba");return t[3]===void 0&&(t[3]=1),t;};xn.autodetect.push({p:3,test:(...n)=>{if(n=vt(n,"rgba"),cn(n)==="array"&&(n.length===3||n.length===4&&cn(n[3])=="number"&&n[3]>=0&&n[3]<=1))return"rgb";}});var lc=(n,t,e)=>{if(!lc[e])throw new Error("unknown blend mode "+e);return lc[e](n,t);},wd=n=>(t,e)=>{let i=Ln(e).rgb(),o=Ln(t).rgb();return Ln.rgb(n(i,o));},Sd=n=>(t,e)=>{let i=[];return i[0]=n(t[0],e[0]),i[1]=n(t[1],e[1]),i[2]=n(t[2],e[2]),i;},mF=n=>n,uF=(n,t)=>n*t/255,fF=(n,t)=>n>t?t:n,hF=(n,t)=>n>t?n:t,_F=(n,t)=>255*(1-(1-n/255)*(1-t/255)),gF=(n,t)=>t<128?2*n*t/255:255*(1-2*(1-n/255)*(1-t/255)),xF=(n,t)=>255*(1-(1-t/255)/(n/255)),CF=(n,t)=>n===255?255:(n=255*(t/255)/(1-n/255),n>255?255:n);lc.normal=wd(Sd(mF));lc.multiply=wd(Sd(uF));lc.screen=wd(Sd(_F));lc.overlay=wd(Sd(gF));lc.darken=wd(Sd(fF));lc.lighten=wd(Sd(hF));lc.dodge=wd(Sd(CF));lc.burn=wd(Sd(xF));var WI=lc;var{pow:vF,sin:bF,cos:yF}=Math;function XI(n=300,t=-1.5,e=1,i=1,o=[0,1]){let a=0,r;cn(o)==="array"?r=o[1]-o[0]:(r=0,o=[o,o]);let l=function(p){let d=Nl*((n+120)/360+t*p),f=vF(o[0]+r*p,i),g=(a!==0?e[0]+p*a:e)*f*(1-f)/2,b=yF(d),w=bF(d),T=f+g*(-.14861*b+1.78277*w),O=f+g*(-.29227*b-.90649*w),V=f+g*(1.97294*b);return Ln(Jm([T*255,O*255,V*255,1]));};return l.start=function(p){return p==null?n:(n=p,l);},l.rotations=function(p){return p==null?t:(t=p,l);},l.gamma=function(p){return p==null?i:(i=p,l);},l.hue=function(p){return p==null?e:(e=p,cn(e)==="array"?(a=e[1]-e[0],a===0&&(e=e[1])):a=0,l);},l.lightness=function(p){return p==null?o:(cn(p)==="array"?(o=p,r=p[1]-p[0]):(o=[p,p],r=0),l);},l.scale=()=>Ln.scale(l),l.hue(e),l;}var PF="0123456789abcdef",{floor:wF,random:SF}=Math,YI=(n=SF)=>{let t="#";for(let e=0;e<6;e++)t+=PF.charAt(wF(n()*16));return new He(t,"hex");};var{log:KI,pow:MF,floor:OF,abs:EF}=Math;function oS(n,t=null){let e={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return cn(n)==="object"&&(n=Object.values(n)),n.forEach(i=>{t&&cn(i)==="object"&&(i=i[t]),i!=null&&!isNaN(i)&&(e.values.push(i),e.sum+=i,i<e.min&&(e.min=i),i>e.max&&(e.max=i),e.count+=1);}),e.domain=[e.min,e.max],e.limits=(i,o)=>aS(e,i,o),e;}function aS(n,t="equal",e=7){cn(n)=="array"&&(n=oS(n));let{min:i,max:o}=n,a=n.values.sort((l,p)=>l-p);if(e===1)return[i,o];let r=[];if(t.substr(0,1)==="c"&&(r.push(i),r.push(o)),t.substr(0,1)==="e"){r.pu
36sh(i);for(let l=1;l<e;l++)r.push(i+l/e*(o-i));r.push(o);}else if(t.substr(0,1)==="l"){if(i<=0)throw new Error("Logarithmic scales are only possible for values > 0");let l=Math.LOG10E*KI(i),p=Math.LOG10E*KI(o);r.push(i);for(let d=1;d<e;d++)r.push(MF(10,l+d/e*(p-l)));r.push(o);}else if(t.substr(0,1)==="q"){r.push(i);for(let l=1;l<e;l++){let p=(a.length-1)*l/e,d=OF(p);if(d===p)r.push(a[d]);else{let f=p-d;r.push(a[d]*(1-f)+a[d+1]*f);}}r.push(o);}else if(t.substr(0,1)==="k"){let l,p=a.length,d=new Array(p),f=new Array(e),h=!0,g=0,b=null;b=[],b.push(i);for(let O=1;O<e;O++)b.push(i+O/e*(o-i));for(b.push(o);h;){for(let V=0;V<e;V++)f[V]=0;for(let V=0;V<p;V++){let j=a[V],L=Number.MAX_VALUE,A;for(let J=0;J<e;J++){let Q=EF(b[J]-j);Q<L&&(L=Q,A=J),f[A]++,d[V]=A;}}let O=new Array(e);for(let V=0;V<e;V++)O[V]=null;for(let V=0;V<p;V++)l=d[V],O[l]===null?O[l]=a[V]:O[l]+=a[V];for(let V=0;V<e;V++)O[V]*=1/f[V];h=!1;for(let V=0;V<e;V++)if(O[V]!==b[V]){h=!0;break;}b=O,g++,g>200&&(h=!1);}let w={};for(let O=0;O<e;O++)w[O]=[];for(let O=0;O<p;O++)l=d[O],w[l].push(a[O]);let T=[];for(let O=0;O<e;O++)T.push(w[O][0]),T.push(w[O][w[O].length-1]);T=T.sort((O,V)=>O-V),r.push(T[0]);for(let O=1;O<T.length;O+=2){let V=T[O];!isNaN(V)&&r.indexOf(V)===-1&&r.push(V);}}return r;}var ZI=(n,t)=>{n=new He(n),t=new He(t);let e=n.luminance(),i=t.luminance();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05);};var QI=.027,TF=5e-4,IF=.1,ek=1.14,sC=.022,tk=1.414,ik=(n,t)=>{n=new He(n),t=new He(t),n.alpha()<1&&(n=Ac(t,n,n.alpha(),"rgb"));let e=nk(...n.rgb()),i=nk(...t.rgb()),o=e>=sC?e:e+Math.pow(sC-e,tk),a=i>=sC?i:i+Math.pow(sC-i,tk),r=Math.pow(a,.56)-Math.pow(o,.57),l=Math.pow(a,.65)-Math.pow(o,.62),p=Math.abs(a-o)<TF?0:o<a?r*ek:l*ek;return(Math.abs(p)<IF?0:p>0?p-QI:p+QI)*100;};
36function nk(n,t,e){return .2126729*Math.pow(n/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(e/255,2.4);}var{sqrt:Cp,pow:Xa,min:kF,max:RF,atan2:ok,abs:ak,cos:lC,sin:rk,exp:NF,PI:sk}=Math;function lk(n,t,e=1,i=1,o=1){var a=function(Se){return 360*Se/(2*sk);},r=function(Se){return 2*sk*Se/360;};n=new He(n),t=new He(t);let[l,p,d]=Array.from(n.lab()),[f,h,g]=Array.from(t.lab()),b=(l+f)/2,w=Cp(Xa(p,2)+Xa(d,2)),T=Cp(Xa(h,2)+Xa(g,2)),O=(w+T)/2,V=.5*(1-Cp(Xa(O,7)/(Xa(O,7)+Xa(25,7)))),j=p*(1+V),L=h*(1+V),A=Cp(Xa(j,2)+Xa(d,2)),J=Cp(Xa(L,2)+Xa(g,2)),Q=(A+J)/2,te=a(ok(d,j)),U=a(ok(g,L)),ce=te>=0?te:te+360,W=U>=0?U:U+360,Y=ak(ce-W)>180?(ce+W+360)/2:(ce+W)/2,se=1-.17*lC(r(Y-30))+.24*lC(r(2*Y))+.32*lC(r(3*Y+6))-.2*lC(r(4*Y-63)),de=W-ce;de=ak(de)<=180?de:W<=ce?de+360:de-360,de=2*Cp(A*J)*rk(r(de)/2);let Ae=f-l,rt=J-A,et=1+.015*Xa(b-50,2)/Cp(20+Xa(b-50,2)),pt=1+.045*Q,ft=1+.015*Q*se,je=30*NF(-Xa((Y-275)/25,2)),Ke=-(2*Cp(Xa(Q,7)/(Xa(Q,7)+Xa(25,7))))*rk(2*r(je)),ve=Cp(Xa(Ae/(e*et),2)+Xa(rt/(i*pt),2)+Xa(de/(o*ft),2)+Ke*(rt/(i*pt))*(de/(o*ft)));return RF(0,kF(100,ve));}function ck(n,t,e="lab"){n=new He(n),t=new He(t);let i=n.get(e),o=t.get(e),a=0;for(let r in i){let l=(i[r]||0)-(o[r]||0);a+=l*l;}return Math.sqrt(a);}var pk=(...n)=>{try{return new He(...n),!0;}catch(t){return!1;}};var dk={cool(){return Um([Ln.hsl(180,1,.9),Ln.hsl(250,.7,.4)]);},hot(){return Um(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb");}};var rS={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},uk=Object.keys(rS),mk=new Map(uk.map(n=>[n.toLowerCase(),n])),AF=typeof Proxy=="function"?new Proxy(rS,{get(n,t){let e=t.toLowerCase();if(mk.has(e))return n[mk.get(e)];},getOwnPropertyNames(){return Object.getOwnPropertyNames(uk);}}):rS,fk=AF;var DF=(...n)=>{n=vt(n,"cmyk");let[t,e,i,o]=n,a=n.length>4?n[4]:1;return o===1?[0,0,0,a]:[t>=1?0:255*(1-t)*(1-o),e>=1?0:255*(1-e)*(1-o),i>=1?0:255*(1-i)*(1-o),a];},hk=DF;var{max:_k}=Math,jF=(...n)=>{let[t,e,i]=vt(n,"rgb");t=t/255,e=e/255,i=i/255;let o=1-_k(t,_k(e,i)),a=o<1?1/(1-o):0,r=(1-t-o)*a,l=(1-e-o)*a,p=(1-i-o)*a;return[r,l,p,o];},gk=jF;He.prototype.cmyk=function(){return gk(this._rgb);};var LF=(...n)=>new He(...n,"cmyk");Object.assign(Ln,{cmyk:LF});xn.format.cmyk=hk;xn.autodetect.push({p:2,test:(...n)=>{if(n=vt(n,"cmyk"),cn(n)==="array"&&n.length===4)return"cmyk";}});var zF=(...n)=>{let t=vt(n,"hsla"),e=Ys(n)||"lsa";return t[0]=Nr(t[0]||0)+"deg",t[1]=Nr(t[1]*100)+"%",t[2]=Nr(t[2]*100)+"%",e==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),e="hsla"):t.length=3,`${e.substr(0,3)}(${t.join(" ")})`;},xk=zF;var FF=(...n)=>{let t=vt(n,"lab"),e=Ys(n)||"lab";return t[0]=Nr(t[0])+"%",t[1]=Nr(t[1]),t[2]=Nr(t[2]),e==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`;},Ck=FF;var BF=(...n)=>{let t=vt(n,"lch"),e=Ys(n)||"lab";return t[0]=Nr(t[0])+"%",t[1]=Nr(t[1]),t[2]=isNaN(t[2])?"none":Nr(t[2])+"deg",e==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`;},vk=BF;var $F=(...n)=>{let t=vt(n,"lab");return t[0]=Nr(t[0]*100)+"%",t[1]=K_(t[1]),t[2]=K_(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`;},bk=$F;var VF=(...n)=>{let[t,e,i,...o]=vt(n,"rgb"),[a,r,l]=Ef(t,e,i),[p,d,f]=aC(a,r,l);return[p,d,f,...(o.length>0&&o[0]<1?[o[0]]:[])];},cC=VF;var GF=(...n)=>{let t=vt(n,"lch");return t[0]=Nr(t[0]*100)+"%",t[1]=K_(t[1]),t[2]=isNaN(t[2])?"none":Nr(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`;},yk=GF;var{round:sS}=Math,qF=(...n)=>{let t=vt(n,"rgba"),e=Ys(n)||"rgb";if(e.substr(0,3)==="hsl")return xk(rC(t),e);if(e.substr(0,3)==="lab"){let i=Pd();Al("d50");let o=Ck(Pf(t),e);return Al(i),o;}if(e.substr(0,3)==="lch"){let i=Pd();Al("d50");let o=vk(Q_(t),e);return Al(i),o;}return e.substr(0,5)==="oklab"?bk(Ef(t)):e.substr(0,5)==="oklch"?yk(cC(t)):(t[0]=sS(t[0]),t[1]=sS(t[1]),t[2]=sS(t[2]),(e==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),e="rgba"),`${e.substr(0,3)}(${t.slice(0,e==="rgb"?3:4).join(" ")})`);},Pk=qF;var JF=(...n)=>{n=vt(n,"lch");let[t,e,i,...o]=n,[a,r,l]=oC(t,e,i),[p,d,f]=Of(a,r,l);return[p,d,f,...(o.length>0&&o[0]<1?[o[0]]:[])];},pC=JF;var vp=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,cc=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,dC=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,jl=/\s*/.source,If=/\s+/.source,lS=/\s*,\s*/.source,mC=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,kf=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,wk=new RegExp("^rgba?\\("+jl+[vp,vp,vp].join(If)+kf+"\\)$"),Sk=new RegExp("^rgb\\("+jl+[vp,vp,vp].join(lS)+jl+"\\)$"),Mk=new RegExp("^rgba\\("+jl+[vp,vp,vp,cc].join(lS)+jl+"\\)$"),Ok=new RegExp("^hsla?\\("+jl+[mC,dC,dC].join(If)+kf+"\\)$"),Ek=new RegExp("^hsl?\\("+jl+[mC,dC,dC].join(lS)+jl+"\\)$"),Tk=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ik=new RegExp("^lab\\("+jl+[cc,cc,cc].join(If)+kf+"\\)$"),kk=new RegExp("^lch\\("+jl+[cc,cc,mC].join(If)+kf+"\\)$"),Rk=new RegExp("^oklab\\("+jl+[cc,cc,cc].join(If)+kf+"\\)$"),Nk=new RegExp("^oklch\\("+jl+[cc,cc,mC].join(If)+kf+"\\)$"),{round:Ak}=Math,Tf=n=>n.map((t,e)=>e<=2?Rl(Ak(t),0,255):t),Ya=(n,t=0,e=100,i=!1)=>(typeof n=="string"&&n.endsWith("%")&&(n=parseFloat(n.substring(0,n.length-1))/100,i?n=t+(n+1)*.5*(e-t):n=t+n*(e-t)),+n),hs=(n,t)=>n==="none"?t:n,Dk=n=>{if(n=n.toLowerCase().trim(),n==="transparent")return[0,0,0,0];let t;if(xn.format.named)try{return xn.format.named(n);}catch(e){}
36if((t=n.match(wk))||(t=n.match(Sk))){let e=t.slice(1,4);for(let o=0;o<3;o++)e[o]=+Ya(hs(e[o],0),0,255);e=Tf(e);let i=t[4]!==void 0?+Ya(t[4],0,1):1;return e[3]=i,e;}if(t=n.match(Mk)){let e=t.slice(1,5);for(let i=0;i<4;i++)e[i]=+Ya(e[i],0,255);return e;}if((t=n.match(Ok))||(t=n.match(Ek))){let e=t.slice(1,4);e[0]=+hs(e[0].replace("deg",""),0),e[1]=+Ya(hs(e[1],0),0,100)*.01,e[2]=+Ya(hs(e[2],0),0,100)*.01;let i=Tf(e0(e)),o=t[4]!==void 0?+Ya(t[4],0,1):1;return i[3]=o,i;}if(t=n.match(Tk)){let e=t.slice(1,4);e[1]*=.01,e[2]*=.01;let i=e0(e);for(let o=0;o<3;o++)i[o]=Ak(i[o]);return i[3]=+t[4],i;}if(t=n.match(Ik)){let e=t.slice(1,4);e[0]=Ya(hs(e[0],0),0,100),e[1]=Ya(hs(e[1],0),-125,125,!0),e[2]=Ya(hs(e[2],0),-125,125,!0);let i=Pd();Al("d50");let o=Tf(yf(e));Al(i);let a=t[4]!==void 0?+Ya(t[4],0,1):1;return o[3]=a,o;}if(t=n.match(kk)){let e=t.slice(1,4);e[0]=Ya(e[0],0,100),e[1]=Ya(hs(e[1],0),0,150,!1),e[2]=+hs(e[2].replace("deg",""),0);let i=Pd();Al("d50");let o=Tf(wf(e));Al(i);let a=t[4]!==void 0?+Ya(t[4],0,1):1;return o[3]=a,o;}if(t=n.match(Rk)){let e=t.slice(1,4);e[0]=Ya(hs(e[0],0),0,1),e[1]=Ya(hs(e[1],0),-.4,.4,!0),e[2]=Ya(hs(e[2],0),-.4,.4,!0);let i=Tf(Of(e)),o=t[4]!==void 0?+Ya(t[4],0,1):1;return i[3]=o,i;}if(t=n.match(Nk)){let e=t.slice(1,4);e[0]=Ya(hs(e[0],0),0,1),e[1]=Ya(hs(e[1],0),0,.4,!1),e[2]=+hs(e[2].replace("deg",""),0);let i=Tf(pC(e)),o=t[4]!==void 0?+Ya(t[4],0,1):1;return i[3]=o,i;}};Dk.test=n=>wk.test(n)||Ok.test(n)||Ik.test(n)||kk.test(n)||Rk.test(n)||Nk.test(n)||Sk.test(n)||Mk.test(n)||Ek.test(n)||Tk.test(n)||n==="transparent";var cS=Dk;He.prototype.css=function(n){return Pk(this._rgb,n);};var HF=(...n)=>new He(...n,"css");Ln.css=HF;xn.format.css=cS;xn.autodetect.push({p:5,test:(n,...t)=>{if(!t.length&&cn(n)==="string"&&cS.test(n))return"css";}});xn.format.gl=(...n)=>{let t=vt(n,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t;};var UF=(...n)=>new He(...n,"gl");Ln.gl=UF;He.prototype.gl=function(){let n=this._rgb;return[n[0]/255,n[1]/255,n[2]/255,n[3]];};He.prototype.hex=function(n){return iC(this._rgb,n);};var WF=(...n)=>new He(...n,"hex");Ln.hex=WF;xn.format.hex=tC;xn.autodetect.push({p:4,test:(n,...t)=>{if(!t.length&&cn(n)==="string"&&[3,4,5,6,7,8,9].indexOf(n.length)>=0)return"hex";}});var{log:uC}=Math,XF=n=>{let t=n/100,e,i,o;return t<66?(e=255,i=t<6?0:-155.25485562709179-.44596950469579133*(i=t-2)+104.49216199393888*uC(i),o=t<20?0:-254.76935184120902+.8274096064007395*(o=t-10)+115.67994401066147*uC(o)):(e=351.97690566805693+.114206453784165*(e=t-55)-40.25366309332127*uC(e),i=325.4494125711974+.07943456536662342*(i=t-50)-28.0852963507957*uC(i),o=255),[e,i,o,1];},fC=XF;var{round:YF}=Math,KF=(...n)=>{let t=vt(n,"rgb"),e=t[0],i=t[2],o=1e3,a=4e4,r=.4,l;for(;a-o>r;){l=(a+o)*.5;let p=fC(l);p[2]/p[0]>=i/e?a=l:o=l;}return YF(l);},jk=KF;He.prototype.temp=He.prototype.kelvin=He.prototype.temperature=function(){return jk(this._rgb);};var pS=(...n)=>new He(...n,"temp");Object.assign(Ln,{temp:pS,kelvin:pS,temperature:pS});xn.format.temp=xn.format.kelvin=xn.format.temperature=fC;He.prototype.oklch=function(){return cC(this._rgb);};var ZF=(...n)=>new He(...n,"oklch");Object.assign(Ln,{oklch:ZF});xn.format.oklch=pC;xn.autodetect.push({p:2,test:(...n)=>{if(n=vt(n,"oklch"),cn(n)==="array"&&n.length===3)return"oklch";}});Object.assign(Ln,{analyze:oS,average:JI,bezier:HI,blend:WI,brewer:fk,Color:He,colors:yd,contrast:ZI,contrastAPCA:ik,cubehelix:XI,deltaE:lk,distance:ck,input:xn,interpolate:Ac,limits:aS,mix:Ac,random:YI,scale:Um,scales:dk,valid:pk});var dS=Ln;function Lk(n,t,e,i=1e-5){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i;}function mS(n){return{left:n.top,right:n.bottom,top:n.left,bottom:n.right,horizontal:!n.horizontal};}var bp=class extends C1{constructor(){super(...arguments),this.align="center",this.next=void 0,this.previous=void 0;}getBounds(t=!1){let{x:e,y:i,base:o,width:a,height:r,horizontal:l}=this.getProps(["x","y","base","width","height","horizontal"],t);if(l){let p=Math.abs(e-o),d=o-(this.align!=="left"?p:0),f=o+(this.align!=="right"?p:0),h=r/2,g=i-h,b=i+h;return{left:d,top:g,right:f,bottom:b,horizontal:l};}else{let p=Math.abs(i-o),d=a/2,f=e-d,h=e+d,g=o-(this.align!=="right"?p:0),b=o+(this.align!=="left"?p:0);return{left:f,top:g,right:h,bottom:b,horizontal:l};}}inRange(t,e,i){let o=this.getBounds(i),a=t==null||Lk(t,o.left,o.right),r=e==null||Lk(e,o.top,o.bottom);return a&&r;}inXRange(t,e){return this.inRange(t,null,e);}inYRange(t,e){return this.inRange(null,t,e);}getCenterPoint(t){let{x:e,y:i,base:o,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{center:{x:a?o:e,y:a?i:o},left:{x:a?(o+e)/2:e,y:a?i:(o+i)/2},right:{x:a?o-(e-o)/2:e,y:a?i:o-(i+o)/2}}[this.align];}tooltipPosition(t){return this.getCenterPoint(t);}getRange(t){let{width:e,height:i}=this.getProps(["width","height"]);return t==="x"?e:i;}computeWayPoints(t=!1){let e=this.options.shrinkAnchor,i=Math.max(Math.min(this.options.shrinkFraction,1),0);i===0&&(e="none",i=1);let o=this.getBounds(t),a=o.horizontal,r=this.next&&(e==="top"||e==="middle")?this.next.getBounds(t):o,l=this.previous&&(e==="bottom"||e==="middle")?this.previous.getBounds(t):o;a||(o=mS(o),r=mS(r),l=mS(l));let p=Math.floor((o.bottom-o.top)*(1-i)),d=Math.floor((o.bottom-o.top-p)/2),f=[],h=[];if(e==="none"||e==="top")f.push([o.left,o.top],[o.right,o.top]);else{let g=1;if(e==="middle"){let b=Math.floor((l.bottom-l.top)*i*.5);g=d/(b+d);}f.push([o.left+(l.left-o.left)*g,o.top],[o.right+(l.right-o.right)*g,o.top]);}if(e==="middle"?(f.push([o.right,o.top+d]),f.push([o.right,o.bottom-d]),h.push([o.left,o.top+d]),h.push([o.left,o.bottom-d])):e==="top"&&i<1?(f.push([o.right,o.top+p]),h.push([o.left,o.top+p])):e==="bottom"&&i<1&&(f.push([o.right,o.bottom-p]),h.push([o.left,o.bottom-p])),e==="none"||e==="bottom")f.push([o.right,o.bottom],[o.left,o.bottom]);else{let g=1;if(e==="middle"){let b=Math.floor((r.bottom-r.top)*i*.5);g=d/(b+d);}f.push([o.right+(r.right-o.right)*g,o.bottom],[o.left+(r.left-o.left)*g,o.bottom]);}return f.push(...h.reverse()),a?f:f.map(([g,b])=>[b,g]);}draw(t){let{options:e}=this;t.save(),t.beginPath();let i=this.computeWayPoints();t.moveTo(i[0][0],i[0][1]);for(let o of i.slice(1))t.lineTo(o[0],o[1]);e.backgroundColor&&(t.fillStyle=e.backgroundColor,t.fill()),e.borderColor&&(t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.stroke()),t.restore(
36);}};bp.id="trapezoid";bp.defaults=Ve(X({},C1.defaults),{shrinkAnchor:"top",shrinkFraction:1});bp.defaultRoutes=C1.defaultRoutes;function QF(n,t="#000000",e="#ffffff"){return dS(n).luminance()>.5?t:e;}function eB(n,t){return dS.scale("Blues")(n/(t-1)).hex();}function tB(n,t,e,i=[],o=[]){mf.addControllers(e),Array.isArray(i)?mf.addElements(...i):mf.addElements(i),Array.isArray(o)?mf.addScales(...o):mf.addScales(o);let a=t;return a.type=n,a;}var yp=class extends x1{getMinMax(t,e){let{max:i}=super.getMinMax(t,e);return{center:{min:-i,max:i},left:{min:0,max:i},right:{min:-i,max:0}}[this.options.align];}update(t){super.update(t);let i=this._cachedMeta.data||[];for(let o=0;o<i.length;o++)i[o].align=this.options.align,i[o].next=i[o+1],i[o].previous=i[o-1];}};yp.id="funnel";yp.defaults=g1({},[x1.defaults,{dataElementType:bp.id,barPercentage:1,align:"center",categoryPercentage:.98}]);yp.overrides=g1({},[x1.overrides,{plugins:{legend:{display:!1},colors:{enabled:!1},datalabels:{anchor:"start",textAlign:"center",font:{size:20},color:n=>{let t=n.chart.getDatasetMeta(n.datasetIndex).data[n.dataIndex].options.backgroundColor;return QF(t,yl.defaults.color,"#ffffff");},formatter:(n,t)=>{var e,i;return`${(i=(e=t.chart.data.labels)===null||e===void 0?void 0:e[t.dataIndex])!==null&&i!==void 0?i:""} 37${(n*100).toLocaleString()}%`;}}},scales:{_index_:{display:!1,padding:10,grid:{display:!1}},_value_:{display:!1,beginAtZero:!1,grace:0,grid:{display:!1}}},elements:{trapezoid:{backgroundColor(n){let t=n.chart.data.datasets[n.datasetIndex].data.length;return eB(n.dataIndex,t);}}}}]);var uS=class extends yl{constructor(t,e){super(t,tB("funnel",e,yp,bp,[uf,ff]));}};uS.id=yp.id;
37var nB=["funnelCanvas"],iB=(n,t)=>t.id,oB=(n,t)=>t.value;function aB(n,t){n&1&&(s(0,"div",21)(1,"mat-icon",41),u(2,"hourglass_empty"),c(),s(3,"span"),u(4,"Loading\u2026"),c()());}function rB(n,t){n&1&&(s(0,"div",22)(1,"mat-icon"),u(2,"inbox"),c(),s(3,"span"),u(4,"No projects yet \u2014 create one to get started!"),c()());}function sB(n,t){if(n&1){let e=oe();s(0,"div",43),E("click",function(){k(e);let o=x(2);return R(o.navigateTo("projects"));}),s(1,"div",44)(2,"mat-icon",45),u(3),c(),s(4,"span"),u(5),c()(),s(6,"div",46),ee(7,"div",47),c(),s(8,"div",48),u(9),c()();}if(n&2){let e=t.$implicit,i=x(2);m(2),Ci("color",e.color),m(),G(e.icon),m(2),G(e.label),m(2),Ci("width",i.getBarWidth(e.count),"%")("background-color",e.color),m(),Ci("color",e.count>0?e.color:"rgba(255,255,255,0.2)"),m(),_e(" ",e.count," ");}}function lB(n,t){if(n&1&&(s(0,"div",23),be(1,sB,10,11,"div",42,oB),c()),n&2){let e=x();m(),ye(e.pipelinePhases);}}function cB(n,t){n&1&&(s(0,"div",21)(1,"mat-icon",41),u(2,"hourglass_empty"),c(),s(3,"span"),u(4,"Loading\u2026"),c()());}function pB(n,t){n&1&&(s(0,"div",22)(1,"mat-icon"),u(2,"inbox"),c(),s(3,"span"),u(4,"No data yet"),c()());}function dB(n,t){n&1&&(s(0,"div",25),ee(1,"canvas",null,0),c());}function mB(n,t){n&1&&(s(0,"div",22)(1,"mat-icon"),u(2,"inbox"),c(),s(3,"span"),u(4,"No projects yet"),c()());}function uB(n,t){if(n&1&&(s(0,"div",52),u(1),c()),n&2){let e=x().$implicit;m(),G(e.identifier);}}function fB(n,t){if(n&1){let e=oe();s(0,"div",49),E("click",function(){let o=k(e).$implicit,a=x();return R(a.navigateToProject(o.id));}),s(1,"mat-icon",50),u(2),c(),s(3,"div",51),u(4),c(),S(5,uB,2,1,"div",52),s(6,"div",53),u(7),c(),s(8,"mat-icon",54),u(9,"chevron_right"),c()();}if(n&2){let e=t.$implicit,i=x();m(),Ci("color",i.getPhaseColor(e.phase)),m(),_e(" ",i.getPhaseIcon(e.phase)," "),m(2),G(e.name||"(Untitled)"),m(),M(e.identifier?5:-1),m(),Ci("border-color",i.getPhaseColor(e.phase))("color",i.getPhaseColor(e.phase)),m(),_e(" ",i.getPhaseLabel(e.phase)," ");}}var zk=["Mooring lines cast off \u2014 sky's the limit today! \u{1F388}","Control tower to Captain: your projects are cleared for takeoff! \u{1F6EB}","Barometric pressure optimal \u2014 no turbulence in sight! \u{1F324}\uFE0F","Gasbag inflated, compass calibrated. Navigate to victory! \u{1F9ED}","All systems go \u2014 your portfolio is reaching cruising altitude! \u2708\uFE0F","Steady skies ahead, Commander. Time to chart a new course! \u{1F4CD}","Ballast released \u2014 you're lighter than air and ready to soar! \u{1F4A8}","Full steam on the hydrogen burners \u2014 let's elevate those KPIs! \u{1F525}","The blimp is fueled and the gondola awaits. Where shall we fly today? \u{1F5FA}\uFE0F","Zeppelin protocol engaged. Prepare for a smooth ascent! \u{1F680}","Your airship is hovering at peak performance altitude. Onward! \u26A1","Propellers spinning at maximum efficiency. Stratosphere, here we come! \u{1F300}","The helium tank is full. Your ideas are lighter than ever! \u{1F4A1}","Crow's nest to bridge: fair weather and tailwinds all the way! \u26C5","The dirigible is docked and ready. Mind the sandbag on the way out. \u2693","Altitude check complete \u2014 you're above the clouds, where you belong! \u2601\uFE0F","Every great journey starts with a single lift-off. Today's your day! \u{1F31F}","Sky pirates ahead? Fear not \u2014 your analytics are impenetrable armor! \u{1F3F4}\u200D\u2620\uFE0F","Cabin pressure stable. Time to deploy the roadmap from 10 000 feet! \u{1F4CA}","Warning: this dashboard may cause extreme altitude euphoria. Enjoy! \u{1F604}"];yl.register(uf,ff,b1,v1,yp,bp);var hC=class n{constructor(t,e,i,o){this.firebase=t;this.auth=e;this.router=i;this.cdr=o;}firebase;auth;router;cdr;funnelCanvasRef;userName="Captain";greetingMessage="";totalProjects=0;activeProjects=0;totalPortfolios=0;totalCompliances=0;recentProjects=[];pipelinePhases=[];maxPhaseCount=1;loading=!0;funnelChart=null;airshipOffsetX=0;airshipOffsetY=0;airshipHovered=!1;get airshipTransform(){return`translateX(calc(-50% + ${this.airshipOffsetX}px)) translateY(calc(-50% + ${this.airshipOffsetY}px))`;}onSkyMouseMove(t){let i=t.currentTarget.getBoundingClientRect(),o=(t.clientX-i.left-i.width/2)/(i.width/2),a=(t.clientY-i.top-i.height/2)/(i.height/2);this.airshipOffsetX=o*40,this.airshipOffsetY=a*25,this.airshipHovered=!0;}onSkyMouseLeave(){this.airshipOffsetX=0,this.airshipOffsetY=0,this.airshipHovered=!1;}PHASES=[{value:"initiation",label:"Initiation",icon:"flag",color:"#798
376cb"},{value:"opportunity",label:"Opportunity",icon:"star_outline",color:"#4db6ac"},{value:"feasibility",label:"Feasibility",icon:"search",color:"#ffb74d"},{value:"design",label:"Design",icon:"architecture",color:"#f06292"},{value:"realization",label:"Realization",icon:"rocket_launch",color:"#81c784"},{value:"closed",label:"Closed",icon:"check_circle",color:"#90a4ae"}];ngOnInit(){return $(this,null,function*(){let t=this.auth.getUserLoggedIn(),e=t?.email?.split("@")[0]??null;this.userName=t?.displayName??e??"Captain",this.greetingMessage=zk[Math.floor(Math.random()*zk.length)],yield Promise.all([this.loadProjects(),this.loadPortfolios(),this.loadCompliances()]),this.loading=!1,this.cdr.detectChanges(),this.buildChart();});}ngAfterViewInit(){this.loading||this.buildChart();}ngOnDestroy(){this.funnelChart?.destroy();}loadProjects(){return $(this,null,function*(){let e=(yield at(mt(we(this.firebase.firestore,"projects"),Jt("creationDate","desc")))).docs.map(o=>X({id:o.id},o.data()));this.totalProjects=e.length,this.activeProjects=e.filter(o=>o.phase!=="closed").length,this.recentProjects=e.slice(0,5);let i={};for(let o of e){let a=o.phase??"initiation";i[a]=(i[a]??0)+1;}this.pipelinePhases=this.PHASES.map(o=>Ve(X({},o),{count:i[o.value]??0})),this.maxPhaseCount=Math.max(1,...this.pipelinePhases.map(o=>o.count));});}loadPortfolios(){return $(this,null,function*(){let t=yield at(we(this.firebase.firestore,"portfolios"));this.totalPortfolios=t.size;});}loadCompliances(){return $(this,null,function*(){let t=yield at(we(this.firebase.firestore,"compliances"));this.totalCompliances=t.size;});}buildChart(){if(!this.funnelCanvasRef?.nativeElement||this.pipelinePhases.length===0)return;this.funnelChart?.destroy();let e=this.funnelCanvasRef.nativeElement.getContext("2d"),i={id:"funnelLabels",afterDatasetsDraw:o=>{let a=o.ctx;o.data.datasets.forEach((r,l)=>{o.getDatasetMeta(l).data.forEach((d,f)=>{let h=r.data[f];if(h===0)return;let g=o.data.labels[f]??"",b=d.getCenterPoint();a.save(),a.fillStyle="rgba(255,255,255,0.92)",a.font='bold 12px "Rubik", sans-serif',a.textAlign="center",a.textBaseline="middle",a.fillText(`${h}`,b.x,b.y),a.restore();});});}};this.funnelChart=new yl(e,{type:"funnel",data:{labels:this.pipelinePhases.map(o=>o.label),datasets:[{label:"Projects",data:this.pipelinePhases.map(o=>o.count),backgroundColor:this.pipelinePhases.map(o=>o.color+"cc"),borderColor:this.pipelinePhases.map(o=>o.color),borderWidth:1}]},plugins:[i],options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{callbacks:{label:o=>` ${o.parsed.x} project${o.parsed.x!==1?"s":""}`}}},onClick:()=>this.navigateTo("projects")}});}getBarWidth(t){return Math.round(t/this.maxPhaseCount*100);}getPhaseLabel(t){return this.PHASES.find(e=>e.value===(t??"initiation"))?.label??"Initiation";}getPhaseIcon(t){return this.PHASES.find(e=>e.value===(t??"initiation"))?.icon??"flag";}getPhaseColor(t){return this.PHASES.find(e=>e.value===(t??"initiation"))?.color??"#7986cb";}navigateToProject(t){this.router.navigate(["/dashboard/project",t]);}navigateTo(t){this.router.navigate(["/dashboard",t]);}clickNewProject(){this.router.navigate(["/dashboard/project/new"]);}static ɵfac=function(e){return new(e||n)(le(On),le(Oo),le(Et),le(Pa));};static ɵcmp=Te({type:n,selectors:[["app-dashboard-home"]],viewQuery:function(e,i){if(e&1&&go(nB,5),e&2){let o;qn(o=Jn())&&(i.funnelCanvasRef=o.first);}},decls:119,vars:17,consts:[["funnelCanvas",""],[1,"home-layout"],[1,"left-strip"],[1,"center-col"],[1,"kpi-row"],[1,"greeting-banner"],[1,"user-avatar"],[1,"greeting-text"],[1,"greeting-name"],[1,"greeting-msg"],[1,"kpi-card",3,"click"],[1,"kpi-icon"],[1,"kpi-body"],[1,"kpi-value"],[1,"kpi-label"],[1,"kpi-icon","kpi-icon--active"],[1,"kpi-icon","kpi-icon--portfolio"],[1,"kpi-icon","kpi-icon--compliance"],[1,"pipeline-section"],[1,"content-card","pipeline-bars-card"],[1,"section-title"],[1,"loading-state"],[1,"empty-state"],[1,"pipeline-chart"],[1,"content-card","funnel-card"],[1,"funnel-wrap"],[1,"lower
37-section"],[1,"content-card","lower-card"],[1,"recent-row"],[1,"content-card","lower-card","quick-actions-card"],[1,"actions-list"],[1,"action-btn",3,"click"],[1,"sky-panel",3,"mousemove","mouseleave"],[1,"cloud","cloud--1"],[1,"cloud","cloud--2"],[1,"cloud","cloud--3"],[1,"cloud","cloud--4"],[1,"cloud","cloud--5"],[1,"airship-anchor"],[1,"airship-float"],["src","assets/dirigeable_clipart_green.svg","alt","Dirigible airship",1,"airship-img"],[1,"spin-icon"],[1,"pipeline-row"],[1,"pipeline-row",3,"click"],[1,"phase-label"],[1,"phase-icon"],[1,"bar-track"],[1,"bar-fill"],[1,"phase-count"],[1,"recent-row",3,"click"],[1,"recent-phase-icon"],[1,"recent-name"],[1,"recent-id"],[1,"recent-phase-chip"],[1,"recent-arrow"]],template:function(e,i){e&1&&(s(0,"div",1),ee(1,"div",2),s(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"mat-icon"),u(7,"person"),c()(),s(8,"div",7)(9,"div",8),u(10),c(),s(11,"div",9),u(12),c()()(),s(13,"div",10),E("click",function(){return i.navigateTo("projects");}),s(14,"div",11)(15,"mat-icon"),u(16,"category"),c()(),s(17,"div",12)(18,"div",13),u(19),c(),s(20,"div",14),u(21,"Projects"),c()()(),s(22,"div",10),E("click",function(){return i.navigateTo("projects");}),s(23,"div",15)(24,"mat-icon"),u(25,"rocket_launch"),c()(),s(26,"div",12)(27,"div",13),u(28),c(),s(29,"div",14),u(30,"Active"),c()()(),s(31,"div",10),E("click",function(){return i.navigateTo("portfolios");}),s(32,"div",16)(33,"mat-icon"),u(34,"folder"),c()(),s(35,"div",12)(36,"div",13),u(37),c(),s(38,"div",14),u(39,"Portfolios"),c()()(),s(40,"div",10),E("click",function(){return i.navigateTo("compliances");}),s(41,"div",17)(42,"mat-icon"),u(43,"assignment_turned_in"),c()(),s(44,"div",12)(45,"div",13),u(46),c(),s(47,"div",14),u(48,"Compliance"),c()()()(),s(49,"div",18)(50,"div",19)(51,"div",20)(52,"mat-icon"),u(53,"stacked_bar_chart"),c(),s(54,"span"),u(55,"Project Pipeline"),c()(),S(56,aB,5,0,"div",21),S(57,rB,5,0,"div",22),S(58,lB,3,0,"div",23),c(),s(59,"div",24)(60,"div",20)(61,"mat-icon"),u(62,"filter_alt"),c(),s(63,"span"),u(64,"Funnel View"),c()(),S(65,cB,5,0,"div",21),S(66,pB,5,0,"div",22),S(67,dB,3,0,"div",25),c()(),s(68,"div",26)(69,"div",27)(70,"div",20)(71,"mat-icon"),u(72,"history"),c(),s(73,"span"),u(74,"Recent Projects"),c()(),S(75,mB,5,0,"div",22),be(76,fB,10,10,"div",28,iB),c(),s(78,"div",29)(79,"div",20)(80,"mat-icon"),u(81,"bolt"),c(),s(82,"span"),u(83,"Quick Actions"),c()(),s(84,"div",30)(85,"button",31),E("click",function(){return i.clickNewProject();}),s(86,"mat-icon"),u(87,"add_circle"),c(),s(88,"span"),u(89,"New Project"),c()(),s(90,"button",31),E("click",function(){return i.navigateTo("askarchitect");}),s(91,"mat-icon"),u(92,"chat"),c(),s(93,"span"),u(94,"Ask Architect"),c()(),s(95,"button",31),E("click",function(){return i.navigateTo("portfolios");}),s(96,"mat-icon"),u(97,"folder"),c(),s(98,"span"),u(99,"Portfolios"),c()(),s(100,"button",31),E("click",function(){return i.navigateTo("compliances");}),s(101,"mat-icon"),u(102,"assignment_turned_in"),c(),s(103,"span"),u(104,"Compliance"),c()(),s(105,"button",31),E("click",function(){return i.navigateTo("projects");}),s(106,"mat-icon"),u(107,"category"),c(),s(108,"span"),u(109,"All Projects"),c()()()()()(),s(110,"div",32),E("mousemove",function(a){return i.onSkyMouseMove(a);})("mouseleave",function(){return i.onSkyMouseLeave();}),ee(111,"div",33)(112,"div",34)(113,"div",35)(114,"div",36)(115,"div",37),s(116,"div",38)(117,"div",39),ee(118,"img",40),c()()()()),e&2&&(m(10),_e("Welcome, ",i.userName),m(2),G(i.greetingMessage),m(7),G(i.totalProjects),m(9),G(i.activeProjects),m(9),G(i.totalPortfolios),m(9),G(i.totalCompliances),m(10),M(i.loading?56:-1),m(),M(!i.loading&&i.totalProjects===0?57:-1),m(),M(!i.loading&&i.totalProjects>0?58:-1),m(7),M(i.loading?65:-1),m(),M(!i.loading&&i.totalProjects===0?66:-1),m(),M(!i.loading&&i.totalProjects>0?67:-1),m(8),M(!i.loading&&i.recentProjects.length===0?75:-1),m(),ye(i.recentProjects),m(40),Ci("transform",i.airshipTransform),m(),Ue("is-tracking",i.airshipHovered));},dependencies:[ut,$e,We,Xe,$t],styles:['[_nghost-%COMP%]{display:block;height:calc(100vh - 85px);overflow:hidden;padding:20px 24px 16px;box-sizing:border-box}.home-layout[_ngcontent-%COMP%]{display:grid;grid-template-rows:1fr;grid-template-columns:minmax(10%,auto) 1fr 25%;grid-template-areas:"left center sky";height:100%;column-gap:0}.left-strip[_ngcontent-%COMP%]{grid-area:left}.center-col[_ngcontent-%COMP%]{grid-area:center;display:flex;flex-direction:column;gap:14px;overflow:hidden;width:100%;height:90%;margin:auto}
37.kpi-row[_ngcontent-%COMP%]{grid-area:kpi;display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.greeting-banner[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;align-items:center;gap:14px;padding:8px 4px;margin-bottom:2px}.user-avatar[_ngcontent-%COMP%]{width:70px;height:70px;border-radius:50%;background:linear-gradient(135deg,#7986cb66,#91f5ad40);border:none;display:flex;align-items:center;justify-content:center;flex-shrink:0}.user-avatar[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:40px;width:40px;height:40px;color:#ffffffb3}.greeting-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.greeting-name[_ngcontent-%COMP%]{font-size:1.9rem;font-weight:700;color:#ffffffe6;letter-spacing:.1px}.greeting-msg[_ngcontent-%COMP%]{font-size:1.15rem;color:#ffffff73;font-style:italic;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi-card[_ngcontent-%COMP%]{background:#ffffff1a;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:none;border-radius:16px;padding:18px 22px;display:flex;align-items:center;justify-content:center;gap:16px;cursor:pointer;transition:background .2s ease,transform .2s ease,box-shadow .2s ease}.kpi-card[_ngcontent-%COMP%]:hover{background:#ffffff29;transform:translateY(-2px);box-shadow:0 10px 28px #0000004d}.kpi-icon[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:16px;background:#91f5ad2e;display:flex;align-items:center;justify-content:center;flex-shrink:0}.kpi-icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#91f5ad;font-size:34px;width:34px;height:34px}.kpi-icon.kpi-icon--active[_ngcontent-%COMP%]{background:#ffb74d2e}.kpi-icon.kpi-icon--active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#ffb74d}.kpi-icon.kpi-icon--portfolio[_ngcontent-%COMP%]{background:#64b5f62e}.kpi-icon.kpi-icon--portfolio[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#64b5f6}.kpi-icon.kpi-icon--compliance[_ngcontent-%COMP%]{background:#f062922e}.kpi-icon.kpi-icon--compliance[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#f06292}.kpi-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.kpi-value[_ngcontent-%COMP%]{font-size:2.8rem;font-weight:800;color:#fff;line-height:1;letter-spacing:-1px}.kpi-label[_ngcontent-%COMP%]{font-size:.95rem;color:#ffffff80;text-transform:uppercase;letter-spacing:.9px;font-weight:500}.content-card[_ngcontent-%COMP%]{background:#00002899;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:none;border-radius:16px;padding:18px 22px;display:flex;flex-direction:column;gap:14px}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:1rem;font-weight:700;color:#fff;text-transform:uppercase;letter-spacing:.9px;flex-shrink:0}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#fff}.pipeline-section[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:row;gap:14px;overflow:hidden;min-height:0}.pipeline-bars-card[_ngcontent-%COMP%]{flex:55;overflow:hidden;min-height:0;display:flex;flex-direction:column}.funnel-card[_ngcontent-%COMP%]{flex:45;overflow:hidden;min-height:0;display:flex;flex-direction:column;
37cursor:pointer}.funnel-wrap[_ngcontent-%COMP%]{position:relative;height:260px;overflow:hidden;margin:auto 0}.funnel-wrap[_ngcontent-%COMP%] canvas[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%!important;height:100%!important}.pipeline-chart[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-evenly;flex:1;min-height:0}.pipeline-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;cursor:pointer;border-radius:8px;padding:5px 6px;transition:background .15s ease}.pipeline-row[_ngcontent-%COMP%]:hover{background:#ffffff0d}.phase-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:165px;flex-shrink:0;font-size:1.15rem;color:#ffffffc7;font-weight:500}.phase-icon[_ngcontent-%COMP%]{font-size:17px!important;width:17px!important;height:17px!important;flex-shrink:0}.bar-track[_ngcontent-%COMP%]{flex:1;height:28px;background:#ffffff12;border-radius:5px;overflow:hidden}.bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:6px;min-width:0;transition:width .7s cubic-bezier(.34,1.2,.64,1);opacity:.82}.phase-count[_ngcontent-%COMP%]{width:36px;text-align:right;font-size:1.2rem;font-weight:700;flex-shrink:0;font-variant-numeric:tabular-nums}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:#ffffff52;font-size:.85rem;padding:10px 0}.loading-state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#ffffff40}.spin-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1.8s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.lower-section[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr auto;gap:14px;overflow:hidden}.lower-card[_ngcontent-%COMP%]{overflow-y:auto}.lower-card[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.lower-card[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.lower-card[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:2px}.recent-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:10px;cursor:pointer;transition:background .15s ease}.recent-row[_ngcontent-%COMP%]:hover{background:#ffffff12}.recent-phase-icon[_ngcontent-%COMP%]{font-size:17px!important;width:17px!important;height:17px!important;flex-shrink:0}.recent-name[_ngcontent-%COMP%]{flex:1;font-size:1.1rem;font-weight:500;color:#ffffffd9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-id[_ngcontent-%COMP%]{font-size:.7rem;color:#ffffff47;flex-shrink:0;min-width:36px;font-variant-numeric:tabular-nums}.recent-phase-chip[_ngcontent-%COMP%]{font-size:.78rem;padding:2px 8px;border-radius:10px;border:1px solid;flex-shrink:0;font-weight:600;letter-spacing:.2px;white-space:nowrap}.recent-arrow[_ngcontent-%COMP%]{font-size:15px!important;width:15px!important;height:15px!important;color:#ffffff38!important;flex-shrink:0}.quick-actions-card[_ngcontent-%COMP%]{width:220px;flex-shrink:0}.actions-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px}.action-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;width:100%;padding:10px 14px;border-radius:10px;border:none;background:#ffffff12;color:#ffffffc7;cursor:pointer;font-size:1.08rem;font-weight:500;transition:background .15s ease,color .15s ease;text-align:left;font-family:inherit}.action-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#91f5ad;flex-shrink:0;opacity:.8}.action-btn[_ngcontent-%COMP%]:hover{background:#ffffff21;color:#fff}.action-btn[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.sky-panel[_ngcontent-%COMP%]{grid-area:sky;position:relative;overflow:hidden}.airship-anchor[_ngcontent-%COMP%]{position:absolute;left:50%;top:50%;transform:translate(-50%) translateY(-50%);z-index:10;transition:transform .12s ease-out}.airship-float[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_airshipFloat 12s ease-in-out infinite}.airship-float.is-tracking[_ngcontent-%COMP%]{animation-play-state:paused}.airship-img[_ngcontent-%COMP%]{width:320px;height:auto;filter:drop-shadow(0 8px 20px rgba(0,0,20,.35))}@keyframes _ngcontent-%COMP%_airshipFloat{0%{transform:translate(0)}12%{transform:translate(12px,-7px)}25%{transform:translate(-5px,-21px)}37%{transform:translate(18px,-18px)}50%{transform:translate(-3px,-25px)}63%{transform:translate(15px,-9px)}75%{transform:translate(-12px,-15px)}88%{transform:translate(6px,-4px)}to{transform:translate(0)}}.cloud[_ngcontent-%COMP%]{position:absolute;background:#fffc;border-radius:60px;pointer-events:none;z-index:3}.cloud[_ngcontent-%COMP%]:before, .cloud[_ngcontent-%COMP%]:after{content:"";position:absolute;background:#fffc;border-radius:50%}.cloud[_ngcontent-%COMP%]:before{width:55%;height:95%;top:-48%;left:13%}.cloud[_ngcontent-%COMP%]:after{width:40%;height:80%;top:-38%;right:12%}.cloud--1[_ngcontent-%COMP%]{width:100px;height:34px;bottom:15%;left:5%;animation:_ngcontent-%COMP%_cloudDrift 30s ease-in-out infinite;opacity:.75;filter:blur(4px)}.cloud--2[_ngcontent-%COMP%]{width:78px;height:26px;top:10%;right:10%;animation:_ngcontent-%COMP%_cloudDrift 22s ease-in-out infinite reverse;animation-delay:-9s;opacity:.55}.cloud--3[_ngcontent-%COMP%]{width:90px;height:30px;top:55%;left:20%;animation:_ngcontent-%COMP%_cloudDrift 26s ease-in-out infinite;animation-delay:-14s;opacity:.4;filter:blur(2px)}.cloud--4[_ngcontent-%COMP%]{width:60px;height:20px;bottom:68%;right:18%;animation:_ngcontent-%COMP%_cloudDrift 19s ease-in-out infinite reverse;animation-delay:-7s;opacity:.3;filter:blur(4px)}.cloud--5[_ngcontent-%COMP%]{width:50px;height:17px;bottom:85%;left:28%;animation:_ngcontent-%COMP%_cloudDrift 15s ease-in-out infinite;animation-delay:-4s;opacity:.25}@keyframes _ngcontent-%COMP%_cloudDrift{0%{transform:translate(0)}50%{transform:translate(24px)}to{transform:translate(0)}}']});};function Pp(n){n||(n=re(rf));let t=new Lo(e=>{if(n.destroyed){e.next();return;}return n.onDestroy(e.next.bind(e));});return e=>e.pipe(vo(t));}function Fk(n,t){let i=!t?.manualCleanup?t?.injector?.get(rf)??re(rf):null,o=hB(t?.equal),a;t?.requireSync?a=tc({kind:0},{equal:o}):a=tc({kind:1,value:t?.initialValue},{equal:o});let r,l=n.subscribe({next:p=>a.set({kind:1,value:p}),error:p=>{a.set({kind:2,error:p}),r?.();},complete:()=>{r?.();}}
37);if(t?.requireSync&&a().kind===0)throw new L_(601,!1);return r=i?.onDestroy(l.unsubscribe.bind(l)),Ha(()=>{let p=a();switch(p.kind){case 1:return p.value;case 2:throw p.error;case 0:throw new L_(601,!1);}},{equal:t?.equal});}function hB(n=Object.is){return(t,e)=>t.kind===1&&e.kind===1&&n(t.value,e.value);}function gS(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};}var Ym=gS();function Hk(n){Ym=n;}var Wm={exec:()=>null};function Qi(n,t=""){let e=typeof n=="string"?n:n.source,i={replace:(o,a)=>{let r=typeof a=="string"?a:a.source;return r=r.replace(_s.caret,"$1"),e=e.replace(o,r),i;},getRegex:()=>new RegExp(e,t)};return i;}var _B=(()=>{try{return!!new RegExp("(?<=1)(?<!1)");}catch(n){return!1;}})(),_s={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}>`)},gB=/^(?:[ \t]*(?:\n|$))+/,xB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,CB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,o0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vB=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xS=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Uk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wk=Qi(Uk).replace(/bull/g,xS).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),bB=Qi(Uk).replace(/bull/g,xS).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),CS=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,yB=/^[^\n]+/,vS=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,PB=Qi(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vS).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wB=Qi(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xS).getRegex(),CC="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",bS=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,SB=Qi("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
37)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",bS).replace("tag",CC).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xk=Qi(CS).replace("hr",o0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",CC).getRegex(),MB=Qi(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xk).getRegex(),yS={blockquote:MB,code:xB,def:PB,fences:CB,heading:vB,hr:o0,html:SB,lheading:Wk,list:wB,newline:gB,paragraph:Xk,table:Wm,text:yB},Bk=Qi("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",o0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",CC).getRegex(),OB=Ve(X({},yS),{lheading:bB,table:Bk,paragraph:Qi(CS).replace("hr",o0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bk).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",CC).getRegex()}),EB=Ve(X({},yS),{html:Qi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bS).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Wm,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Qi(CS).replace("hr",o0).replace("heading",` *#{1,6} *[^ 38]`).replace("lheading",Wk).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),TB=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IB=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yk=/^( {2,}|\\)\n(?!\s*$)/,kB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rf=/[\p{P}\p{S}]/u,vC=/[\s\p{P}\p{S}]/u,PS=/[^\s\p{P}\p{S}]/u,RB=Qi(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,vC).getRegex(),Kk=/(?!~)[\p{P}\p{S}]/u,NB=/(?!~)[\s\p{P}\p{S}]/u,AB=/(?:[^\s\p{P}\p{S}]|~)/u,DB=Qi(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",_B?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Zk=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,jB=Qi(Zk,"u").replace(/punct/g,Rf).getRegex(),LB=Qi(Zk,"u").replace(/punct/g,Kk).getRegex(),Qk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",zB=Qi(Qk,"gu").replace(/notPunctSpace/g,PS).replace(/punctSpace/g,vC).replace(/punct/g,Rf).getRegex(),FB=Qi(Qk,"gu").replace(/notPunctSpace/g,AB).replace(/punctSpace/g,NB).replace(/punct/g,Kk).getRegex(),BB=Qi("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,PS).replace(/punctSpace/g,vC).replace(/punct/g,Rf).getRegex(),$B=Qi(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Rf).getRegex(),VB="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",GB=Qi(VB,"gu").replace(/notPunctSpace/g,PS).replace(/punctSpace/g,vC).replace(/punct/g,Rf).getRegex(),qB=Qi(/\\(punct)/,"gu").replace(/punct/g,Rf).getRegex(),JB=Qi(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),HB=Qi(bS).replace("(?:-->|$)","-->").getRegex(),UB=Qi("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",HB).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gC=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,WB=Qi(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",gC).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),eR=Qi(/^!?\[(label)\]\[(ref)\]/).replace("label",gC).replace("ref",vS).getRegex(),tR=Qi(/^!?\[(ref)\](?:\[\])?/).replace("ref",vS).getRegex(),XB=Qi("reflink|nolink(?!\\()","g").replace("reflink",eR).replace("nolink",tR).getRegex(),$k=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,wS={_backpedal:Wm,anyPunctuation:qB,autolink:JB,blockSkip:DB,br:Yk,code:IB,del:Wm,delLDelim:Wm,delRDelim:Wm,emStrongLDelim:jB,emStrongRDelimAst:zB,emStrongRDelimUnd:BB,escape:TB,link:WB,nolink:tR,punctuation:RB,reflink:eR,reflinkSearch:XB,tag:UB,text:kB,url:Wm},YB=Ve(X({},wS),{link:Qi(/^!?\[(label)\]\((.*?)\)/).replace("label",gC).getRegex(),reflink:Qi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",gC).getRegex()}),fS=Ve(X({},wS),{emStrongRDelimAst:FB,emStrongLDelim:LB,delLDelim:$B,delRDelim:GB,url:Qi(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",$k).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Qi(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",$k).getRegex()}),KB=Ve(X({},fS),{br:Qi(Yk).replace("{2,}","*").getRegex(),text:Qi(fS.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),_C={normal:yS,gfm:OB,pedantic:EB},t0={normal:wS,gfm:fS,breaks:KB,pedantic:YB},ZB={"&":"&","<":"<",">":">",'"':""","'":"'"},Vk=n=>ZB[n];function Dc(n,t){if(t){if(_s.escapeTest.test(n))return n.replace(_s.escapeReplace,Vk);}else if(_s.escapeTestNoEncode.test(n))return n.replace(_s.escapeReplaceNoEncode,Vk);return n;}function Gk(n){try{n=encodeURI(n).replace(_s.percentDecode,"%");}catch(t){return null;}return n;}function qk(n,t){let e=n.replace(_s.findPipe,(a,r,l)=>{let p=!1,d=r;for(;--d>=0&&l[d]==="\\";)p=!p;return p?"|":" |";}),i=e.split(_s.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(_s.slashPipe,"|");return i;}function n0(n,t,e){let i=n.length;if(i===0)return"";let o=0;for(;o<i;){let a=n.charAt(i-o-1);if(a===t&&!e)o++;else if(a!==t&&e)o++;else break;}return n.slice(0,i-o);}function QB(n,t){if(n.indexOf(t[1])===-1)return-1;let e=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===t[0])e++;else if(n[i]===t[1]&&(e--,e<0))return i;return e>0?-2:-1;}function e$(n,t=0){let e=t,i="";for(let o of n)if(o===" "){let a=4-e%4;i+=" ".repeat(a),e+=a;}else i+=o,e++;return i;}function Jk(n,t,e,i,o){let a=t.href,r=t.title||null,l=n[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let p={type:n[0].charAt(0)==="!"?"image":"link",raw:e,href:a,title:r,text:l,tokens:i.inl
vendor: 17,227 bytes, lines 38-76
38ineTokens(l)};return i.state.inLink=!1,p;}function t$(n,t,e){let i=n.match(e.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(` 39`).map(a=>{let r=a.match(e.other.beginningSpace);if(r===null)return a;let[l]=r;return l.length>=o.length?a.slice(o.length):a;}).join(` 40`);}var xC=class{options;rules;lexer;constructor(n){this.options=n||Ym;}space(n){let t=this.rules.block.newline.exec(n);if(t&&t[0].length>0)return{type:"space",raw:t[0]};}code(n){let t=this.rules.block.code.exec(n);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:n0(e,` 41`)};}}fences(n){let t=this.rules.block.fences.exec(n);if(t){let e=t[0],i=t$(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i};}}heading(n){let t=this.rules.block.heading.exec(n);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let i=n0(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(e=i.trim());}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)};}}hr(n){let t=this.rules.block.hr.exec(n);if(t)return{type:"hr",raw:n0(t[0],` 42`)};}blockquote(n){let t=this.rules.block.blockquote.exec(n);if(t){let e=n0(t[0],` 43`).split(` 44`),i="",o="",a=[];for(;e.length>0;){let r=!1,l=[],p;for(p=0;p<e.length;p++)if(this.rules.other.blockquoteStart.test(e[p]))l.push(e[p]),r=!0;else if(!r)l.push(e[p]);else break;e=e.slice(p);let d=l.join(` 45`),f=d.replace(this.rules.other.blockquoteSetextReplace,` 46 $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i} 47${d}`:d,o=o?`${o} 48${f}`:f;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,a,!0),this.lexer.state.top=h,e.length===0)break;let g=a.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let b=g,w=b.raw+` 49`+e.join(` 50`),T=this.blockquote(w);a[a.length-1]=T,i=i.substring(0,i.length-b.raw.length)+T.raw,o=o.substring(0,o.length-b.text.length)+T.text;break;}else if(g?.type==="list"){let b=g,w=b.raw+` 51`+e.join(` 52`),T=this.list(w);a[a.length-1]=T,i=i.substring(0,i.length-g.raw.length)+T.raw,o=o.substring(0,o.length-b.raw.length)+T.raw,e=w.substring(a.at(-1).raw.length).split(` 53`);continue;}}return{type:"blockquote",raw:i,tokens:a,text:o};}}list(n){let t=this.rules.block.list.exec(n);if(t){let e=t[1].trim(),i=e.length>1,o={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let a=this.rules.other.listItemRegex(e),r=!1;for(;n;){let p=!1,d="",f="";if(!(t=a.exec(n))||this.rules.block.hr.test(n))break;d=t[0],n=n.substring(d.length);let h=e$(t[2].split(` 54`,1)[0],t[1].length),g=n.split(` 55`,1)[0],b=!h.trim(),w=0;if(this.options.pedantic?(w=2,f=h.trimStart()):b?w=t[1].length+1:(w=h.search(this.rules.other.nonSpaceChar),w=w>4?1:w,f=h.slice(w),w+=t[1].length),b&&this.rules.other.blankLine.test(g)&&(d+=g+` 56`,n=n.substring(g.length+1),p=!0),!p){let T=this.rules.other.nextBulletRegex(w),O=this.rules.other.hrRegex(w),V=this.rules.other.fencesBeginRegex(w),j=this.rules.other.headingBeginRegex(w),L=this.rules.other.htmlBeginRegex(w),A=this.rules.other.blockquoteBeginRegex(w);for(;n;){let J=n.split(` 57`,1)[0],Q;if(g=J,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),Q=g):Q=g.replace(this.rules.other.tabCharGlobal," "),V.test(g)||j.test(g)||L.test(g)||A.test(g)||T.test(g)||O.test(g))break;if(Q.search(this.rules.other.nonSpaceChar)>=w||!g.trim())f+=` 58`+Q.slice(w);else{if(b||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||V.test(h)||j.test(h)||O.test(h))break;f+=` 59`+g;}b=!g.trim(),d+=J+` 60`,n=n.substring(J.length+1),h=Q.slice(w);}}o.loose||(r?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(r=!0)),o.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),o.raw+=d;}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let p of o.items){if(this.lexer.state.top=!1,p.tokens=this.lexer.blockTokens(p.text,[]),p.task){if(p.text=p.text.replace(this.rules.other.listReplaceTask,""),p.tokens[0]?.type==="text"||p.tokens[0]?.type==="paragraph"){p.tokens[0].raw=p.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),p.tokens[0].text=p.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break;}}let d=this.rules.other.listTaskCheckbox.exec(p.raw);if(d){let f={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};p.checked=f.checked,o.loose?p.tokens[0]&&["paragraph","text"].includes(p.tokens[0].type)&&"tokens"in p.tokens[0]&&p.tokens[0].tokens?(p.tokens[0].raw=f.raw+p.tokens[0].raw,p.tokens[0].text=f.raw+p.tokens[0].text,p.tokens[0].tokens.unshift(f)):p.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):p.tokens.unshift(f);}}if(!o.loose){let d=p.tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>this.rules.other.anyLine.test(h.raw));o.loose=f;}}if(o.loose)for(let p of o.items){p.loose=!0;for(let d of p.tokens)d.type==="text"&&(d.type="paragraph");}return o;}}html(n){let t=this.rules.block.html.exec(n);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]};}def(n){let t=this.rules.block.def.exec(n);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:o};}}table(n){let t=this.rules.block.table.exec(n);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=qk(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` 61`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.length===i.length){for(let r of i)this.rules.other.tableAlignRight.test(r)?a.align.push("right"):this.rules.other.tableAlignCenter.test(r)?a.align.push("center"):this.rules.other.tableAlignLeft.test(r)?a.align.push("left"):a.align.push(null);for(let r=0;r<e.length;r++)a.header.push({text:e[r],tokens:this.lexer.inline(e[r]),header:!0,align:a.align[r]});for(let r of o)a.rows.push(qk(r,a.header.length).map((l,p)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[p]})));return a;}}lheading(n){let t=this.rules.block.lheading.exec(n);if(t){let e=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:e,tokens:this.lexer.inline(e)};}}paragraph(n){let t=this.rules.block.paragraph.exec(n);if(t){let e=t[1].charAt(t[1].length-1)===` 62`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)};}}text(n){let t=this.rules.block.text.exec(n);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])};}escape(n){let t=this.rules.inline.escape.exec(n);if(t)return{type:"escape",raw:t[0],text:t[1]};}tag(n){let t=this.rules.inline.tag.exec(n);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]};}link(n){let t=this.rules.inline.link.exec(n);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let a=n0(e.slice(0,-1),"\\");if((e.length-a.length)%2===0)return;}else{let a=QB(t[2],"()");if(a===-2)return;if(a>-1){let r=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,r).trim(),t[3]="";}}let i=t[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],o=a[3]);}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i=i.slice(1):i=i.slice(1,-1)),Jk(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules);}}reflink(n,t){let e;if((e=this.rules.inline.reflink.exec(n))||(e=this.rules.inline.nolink.exec(n))){let i=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[i.toLowerCase()];if(!o){let a=e[0].charAt(0);return{type:"text",raw:a,text:a};}return Jk(e,o,e[0],this.lexer,this.rules);}}emStrong(n,t,e=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!e||this.rules.inline.punctuation.exec(e))){let o=[...i[0]].length-1,a,r,l=o,p=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*n.length+o);(i=d.exec(t))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(r=[...a].length,i[3]||i[4]){l+=r;continue;}else if((i[5]||i[6])&&o%3&&!((o+r)%3)){p+=r;continue;}if(l-=r,l>0)continue;r=Math.min(r,r+l+p);let f=[...i[0]][0].length,h=n.slice(0,o+i.index+f+r);if(Math.min(o,r)%2){let b=h.slice(1,-1);return{type:"em",raw:h,text:b,tokens:this.lexer.inlineTokens(b)};}let g=h.slice(2,-2);return{type:"strong",raw:h,text:g,tokens:this.lexer.inlineTokens(g)};}}}codespan(n){let t=this.rules.inline.code.exec(n);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),o=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&o&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e};}}br(n){let t=this.rules.inline.br.exec(n);if(t)return{type:"br",raw:t[0]};}del(n,t,e=""){let i=this.rules.inline.delLDelim.exec(n);if(i&&(!i[1]||!e||this.rules.inline.punctuation.exec(e))){let o=[...i[0]].length-1,a,r,l=o,p=this.rules.inline.delRDelim;for(p.lastIndex=0,t=t.slice(-1*n.length+o);(i=p.exec(t))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a||(r=[...a].length,r!==o))continue;if(i[3]||i[4]){l+=r;continue;}if(l-=r,l>0)continue;r=Math.min(r,r+l);let d=[...i[0]][0].length,f=n.slice(0,o+i.index+d+r),h=f.slice(o,-o);return{type:"del",raw:f,text:h,tokens:this.lexer.inlineTokens(h)};}}}autolink(n){let t=this.rules.inline.autolink.exec(n);if(t){let e,i;return t[2]==="@"?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]};}}url(n){let t;if(t=this.rules.inline.url.exec(n)){let e,i;if(t[2]==="@")e=t[0],i="mailto:"+e;else{let o;do o=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(o!==t[0]);e=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0];}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]};}}inlineText(n){let t=this.rules.inline.text.exec(n);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e};}}},pc=class hS{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ym,this.options.tokenizer=this.options.tokenizer||new xC(),this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:_s,block:_C.normal,inline:t0.normal};this.options.pedantic?(e.block=_C.pedantic,e.inline=t0.pedantic):this.options.gfm&&(e.block=_C.gfm,this.options.breaks?e.inline=t0.breaks:e.inline=t0.gfm),this.tokenizer.rules=e;}static get rules(){return{block:_C,inline:t0};}static lex(t,e){return new hS(e).lex(t);}static lexInline(t,e){return new hS(e).inlineTokens(t);}lex(t){t=t.replace(_s.carriageReturn,` 63`),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens);}return this.inlineQueue=[],this.tokens;}blockTokens(t,e=[],i=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(_s.tabCharGlobal," ").replace(_s.spaceLine,""));t;){let o;if(this.options.extensions?.block?.some(r=>(o=r.call({lexer:this},t,e))?(t=t.substring(o.raw.length),e.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let r=e.at(-1);o.raw.length===1&&r!==void 0?r.raw+=` 64`:e.push(o);continue;}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let r=e.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` 65`)?"":` 66`)+o.raw,r.text+=` 67`+o.text,this.inlineQueue.at(-1).src=r.text):e.push(o);continue;}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),e.push(o);continue;}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),e.push(o);continue;}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),e.push(o);continue;}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),e.push(o);continue;}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),e.push(o);continue;}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),e.push(o);continue;}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let r=e.at(-1);r?.type==="paragraph"||r?.type==="text"?(r.raw+=(r.raw.endsWith(` 68`)?"":` 69`)+o.raw,r.text+=` 70`+o.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},e.push(o));continue;}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),e.push(o);continue;}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),e.push(o);continue;}let a=t;if(this.options.extensions?.startBlock){let r=1/0,l=t.slice(1),p;this.options.extensions.startBlock.forEach(d=>{p=d.call({lexer:this},l),typeof p=="number"&&p>=0&&(r=Math.min(r,p));}),r<1/0&&r>=0&&(a=t.substring(0,r+1));}if(this.state.top&&(o=this.tokenizer.paragraph(a))){let r=e.at(-1);i&&r?.type==="paragraph"?(r.raw+=(r.raw.endsWith(` 71`)?"":` 72`)+o.raw,r.text+=` 73`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(o),i=a.length!==t.length,t=t.substring(o.raw.length);continue;}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let r=e.at(-1);r?.type==="text"?(r.raw+=(r.raw.endsWith(` 74`)?"":` 75`)+o.raw,r.text+=` 76`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(o);continue;}if(t){let r="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(r);break;}else throw new Error(r);}}return this.state.top=!0,e;}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e;}inlineTokens(t,e=[]){this.tokenizer.lexer=this;let i=t,o=null;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)p.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)a=o[2]?o[2].length:0,i=i.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let r=!1,l="";for(;t;){r||(l=""),r=!1;let p;if(this.options.extensions?.inline?.some(f=>(p=f.call({lexer:this},t,e))?(t=t.substring(p.raw.length),e.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),e.push(p);continue;}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),e.push(p);continue;}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),e.push(p);continue;}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);let f=e.at(-1);p.type==="text"&&f?.type==="text"?(f.raw+=p.raw,f.text+=p.text):e.push(p);continue;}if(p=this.tokenizer.emStrong(t,i,l)){t=t.substring(p.raw.length),e.push(p);continue;}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),e.push(p);continue;}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),e.push(p);continue;}if(p=this.tokenizer.del(t,i,l)){t=t.substring(p.raw.length),e.push(p);continue;}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),e.push(p);continue;}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),e.push(p);continue;}let d=t;if(this.options.extensions?.startInline){let f=1/0,h=t.slice(1),g;this.options.extensions.startInline.forEach(b=>{g=b.call({lexer:this},h),typeof g=="number"&&g>=0&&(f=Math.min(f,g));}),f<1/0&&f>=0&&(d=t.substring(0,f+1));}if(p=this.tokenizer.inlineText(d)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(l=p.raw.slice(-1)),r
vendor: 6,406 bytes, lines 76-94
76=!0;let f=e.at(-1);f?.type==="text"?(f.raw+=p.raw,f.text+=p.text):e.push(p);continue;}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break;}else throw new Error(f);}}return e;}},Md=class{options;parser;constructor(n){this.options=n||Ym;}space(n){return"";}code({text:n,lang:t,escaped:e}){let i=(t||"").match(_s.notSpaceStart)?.[0],o=n.replace(_s.endingNewline,"")+` 77`;return i?'<pre><code class="language-'+Dc(i)+'">'+(e?o:Dc(o,!0))+`</code></pre> 78`:"<pre><code>"+(e?o:Dc(o,!0))+`</code></pre> 79`;}blockquote({tokens:n}){return`<blockquote> 80${this.parser.parse(n)}</blockquote> 81`;}html({text:n}){return n;}def(n){return"";}heading({tokens:n,depth:t}){return`<h${t}>${this.parser.parseInline(n)}</h${t}> 82`;}hr(n){return`<hr> 83`;}list(n){let t=n.ordered,e=n.start,i="";for(let r=0;r<n.items.length;r++){let l=n.items[r];i+=this.listitem(l);}let o=t?"ol":"ul",a=t&&e!==1?' start="'+e+'"':"";return"<"+o+a+`> 84`+i+"</"+o+`> 85`;}listitem(n){return`<li>${this.parser.parse(n.tokens)}</li> 86`;}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox"> ';}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p> 87`;}table(n){let t="",e="";for(let o=0;o<n.header.length;o++)e+=this.tablecell(n.header[o]);t+=this.tablerow({text:e});let i="";for(let o=0;o<n.rows.length;o++){let a=n.rows[o];e="";for(let r=0;r<a.length;r++)e+=this.tablecell(a[r]);i+=this.tablerow({text:e});}return i&&(i=`<tbody>${i}</tbody>`),`<table> 88<thead> 89`+t+`</thead> 90`+i+`</table> 91`;}tablerow({text:n}){return`<tr> 92${n}</tr> 93`;}tablecell(n){let t=this.parser.parseInline(n.tokens),e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}> 94`;}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`;}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`;}codespan({text:n}){return`<code>${Dc(n,!0)}</code>`;}br(n){return"<br>";}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`;}link({href:n,title:t,tokens:e}){let i=this.parser.parseInline(e),o=Gk(n);if(o===null)return i;n=o;let a='<a href="'+n+'"';return t&&(a+=' title="'+Dc(t)+'"'),a+=">"+i+"</a>",a;}image({href:n,title:t,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let o=Gk(n);if(o===null)return Dc(e);n=o;let a=`<img src="${n}" alt="${Dc(e)}"`;return t&&(a+=` title="${Dc(t)}"`),a+=">",a;}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Dc(n.text);}},SS=class{strong({text:n}){return n;}em({text:n}){return n;}codespan({text:n}){return n;}del({text:n}){return n;}html({text:n}){return n;}text({text:n}){return n;}link({text:n}){return""+n;}image({text:n}){return""+n;}br(){return"";}checkbox({raw:n}){return n;}},dc=class _S{options;renderer;textRenderer;constructor(t){this.options=t||Ym,this.options.renderer=this.options.renderer||new Md(),this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new SS();}static parse(t,e){return new _S(e).parse(t);}static parseInline(t,e){return new _S(e).parseInline(t);}parse(t){this.renderer.parser=this;let e="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let r=o,l=this.options.extensions.renderers[r.type].call({parser:this},r);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(r.type)){e+=l||"";continue;}}let a=o;switch(a.type){case"space":{e+=this.renderer.space(a);break;}case"hr":{e+=this.renderer.hr(a);break;}case"heading":{e+=this.renderer.heading(a);break;}case"code":{e+=this.renderer.code(a);break;}case"table":{e+=this.renderer.table(a);break;}case"blockquote":{e+=this.renderer.blockquote(a);break;}case"list":{e+=this.renderer.list(a);break;}case"checkbox":{e+=this.renderer.checkbox(a);break;}case"html":{e+=this.renderer.html(a);break;}case"def":{e+=this.renderer.def(a);break;}case"paragraph":{e+=this.renderer.paragraph(a);break;}case"text":{e+=this.renderer.text(a);break;}default:{let r='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(r),"";throw new Error(r);}}}return e;}parseInline(t,e=this.renderer){this.renderer.parser=this;let i="";for(let o=0;o<t.length;o++){let a=t[o];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=l||"";continue;}}let r=a;switch(r.type){case"escape":{i+=e.text(r);break;}case"html":{i+=e.html(r);break;}case"link":{i+=e.link(r);break;}case"image":{i+=e.image(r);break;}case"checkbox":{i+=e.checkbox(r);break;}case"strong":{i+=e.strong(r);break;}case"em":{i+=e.em(r);break;}case"codespan":{i+=e.codespan(r);break;}case"br":{i+=e.br(r);break;}case"del":{i+=e.del(r);break;}case"text":{i+=e.text(r);break;}default:{let l='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l);}}}return i;}},i0=class{options;block;constructor(n){this.options=n||Ym;}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n;}postprocess(n){return n;}processAllTokens(n){return n;}emStrongMask(n){return n;}provideLexer(n=this.block){return n?pc.lex:pc.lexInline;}provideParser(n=this.block){return n?dc.parse:dc.parseInline;}},n$=class{defaults=gS();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=dc;Renderer=Md;TextRenderer=SS;Lexer=pc;Tokenizer=xC;Hooks=i0;constructor(...n){this.use(...n);}walkTokens(n,t){let e=[];for(let i of n)switch(e=e.concat(t.call(this,i)),i.type){case"table":{let o=i;for(let a of o.header)e=e.concat(this.walkTokens(a.tokens,t));for(let a of o.rows)for(let r of a)e=e.concat(this.walkTokens(r.tokens,t));break;}case"list":{let o=i;e=e.concat(this.walkTokens(o.items,t));break;}default:{let o=i;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let r=o[a].flat(1/0);e=e.concat(this.walkTokens(r,t));}):o.tokens&&(e=e.concat(this.walkTokens(o.tokens,t)));}}return e;}use(...n){let t=this.defaults.extensions||{renderers:{},childTokens:{}};
94return n.forEach(e=>{let i=X({},e);if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=t.renderers[o.name];a?t.renderers[o.name]=function(...r){let l=o.renderer.apply(this,r);return l===!1&&(l=a.apply(this,r)),l;}:t.renderers[o.name]=o.renderer;}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]));}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens);}),i.extensions=t),e.renderer){let o=this.defaults.renderer||new Md(this.defaults);for(let a in e.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let r=a,l=e.renderer[r],p=o[r];o[r]=(...d)=>{let f=l.apply(o,d);return f===!1&&(f=p.apply(o,d)),f||"";};}i.renderer=o;}if(e.tokenizer){let o=this.defaults.tokenizer||new xC(this.defaults);for(let a in e.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let r=a,l=e.tokenizer[r],p=o[r];o[r]=(...d)=>{let f=l.apply(o,d);return f===!1&&(f=p.apply(o,d)),f;};}i.tokenizer=o;}if(e.hooks){let o=this.defaults.hooks||new i0();for(let a in e.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let r=a,l=e.hooks[r],p=o[r];i0.passThroughHooks.has(a)?o[r]=d=>{if(this.defaults.async&&i0.passThroughHooksRespectAsync.has(a))return $(this,null,function*(){let h=yield l.call(o,d);return p.call(o,h);});let f=l.call(o,d);return p.call(o,f);}:o[r]=(...d)=>{if(this.defaults.async)return $(this,null,function*(){let h=yield l.apply(o,d);return h===!1&&(h=yield p.apply(o,d)),h;});let f=l.apply(o,d);return f===!1&&(f=p.apply(o,d)),f;};}i.hooks=o;}if(e.walkTokens){let o=this.defaults.walkTokens,a=e.walkTokens;i.walkTokens=function(r){let l=[];return l.push(a.call(this,r)),o&&(l=l.concat(o.call(this,r))),l;};}this.defaults=X(X({},this.defaults),i);}),this;}setOptions(n){return this.defaults=X(X({},this.defaults),n),this;}lexer(n,t){return pc.lex(n,t??this.defaults);}parser(n,t){return dc.parse(n,t??this.defaults);}parseMarkdown(n){return(t,e)=>{let i=X({},e),o=X(X({},this.defaults),i),a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=n),o.async)return $(this,null,function*(){let r=o.hooks?yield o.hooks.preprocess(t):t,l=yield(o.hooks?yield o.hooks.provideLexer(n):n?pc.lex:pc.lexInline)(r,o),p=o.hooks?yield o.hooks.processAllTokens(l):l;o.walkTokens&&(yield Promise.all(this.walkTokens(p,o.walkTokens)));let d=yield(o.hooks?yield o.hooks.provideParser(n):n?dc.parse:dc.parseInline)(p,o);return o.hooks?yield o.hooks.postprocess(d):d;}).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let r=(o.hooks?o.hooks.provideLexer(n):n?pc.lex:pc.lexInline)(t,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let l=(o.hooks?o.hooks.provideParser(n):n?dc.parse:dc.parseInline)(r,o);return o.hooks&&(l=o.hooks.postprocess(l)),l;}catch(r){return a(r);}};}onError(n,t){return e=>{if(e.message+=` 95Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+Dc(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i;}if(t)return Promise.reject(e);throw e;};}},Xm=new n$();function io(n,t){return Xm.parse(n,t);}io.options=io.setOptions=function(n){return Xm.setOptions(n),io.defaults=Xm.defaults,Hk(io.defaults),io;};io.getDefaults=gS;io.defaults=Ym;io.use=function(...n){return Xm.use(...n),io.defaults=Xm.defaults,Hk(io.defaults),io;};io.walkTokens=function(n,t){return Xm.walkTokens(n,t);};io.parseInline=Xm.parseInline;io.Parser=dc;io.parser=dc.parse;io.Renderer=Md;io.TextRenderer=SS;io.Lexer=pc;io.lexer=pc.lex;io.Tokenizer=xC;io.Hooks=i0;io.parse=io;var cTe=io.options,pTe=io.setOptions,dTe=io.use,mTe=io.walkTokens,uTe=io.parseInline;var fTe=dc.parse,hTe=pc.lex;var i$="Copy",o$="Copied",a$=(()=>{class n{constructor(){this._buttonClick$=new oa(),this.copied=Fk(this._buttonClick$.pipe(mr(()=>Va(Gi(!0),YE(3e3).pipe(Wx(!1)))),td(),Yx(1))),this.copiedText=Ha(()=>this.copied()?o$:i$);}onCopyToClipboardClick(){this._buttonClick$.next();}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵcmp=Te({type:n,selectors:[["markdown-clipboard"]],decls:2,vars:3,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(i,o){i&1&&(zo(0,"button",0),cT("click",function(){return o.onCopyToClipboardClick();}),u(1),Fo()),i&2&&(Ue("copied",o.copied()),m(),G(o.copiedText()));},encapsulation:2,changeDetection:0});}}return n;})(),r$=new qi("CLIPBOARD_OPTIONS");var s$=new qi("MARKED_EXTENSIONS"),l$=new qi("MARKED_OPTIONS"),c$=new qi("MERMAID_OPTIONS"),p$=new qi("SANITIZE");function d$(n){return typeof n=="function";}var m$="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",u$="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",f$="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",h$="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",_$="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",g$="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information";var a0=(()=>{class n{get options(){return this._options;}set options(e){this._options=X(X({},this.DEFAULT_MARKED_OPTIONS),e);}get renderer(){return this.options.renderer;}set renderer(e){this.options.renderer=e;}constructor(){this.clipboardOptions=re(r$,{optional:!0}),this.extensions=re(s$,{optional:!0}),this.http=re(Zr,{optional:!0}),this.mermaidOptions=re(c$,{optional:!0}),this.platform=re(Zx),this.sanitize=re(p$,{optional:!0}),this.sanitizer=re(sd),this.DEFAULT_MARKED_OPTIONS={renderer:new Md()},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this.DEFAULT_SECURITY_CONTEXT=z_.HTML,this._options=null,this._reload$=new oa(),this.reload$=this._reload$.asObservable(),this.options=re(l$,{optional:!0});}parse(e,i=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:o,inline:a,emoji:r,mermaid:l,disableSanitizer:p}=i,d=X(X({},this.options),i.markedOptions),f=d.renderer||this.renderer||new Md();this.extensions&&(this.renderer=this.extendsRendererForExtensions(f)),l&&(this.renderer=this.extendsRendererForMermaid(f));let h=this.trimIndentation(e),g=o?this.decodeHtml(h):h,b=r?this.parseEmoji(g):g,w=this.parseMarked(b,d,a);return p?w:this.sanitizeHtml(w);}render(e,i=this.DEFAULT_RENDER_OPTIONS,o){let{clipboard:a,clipboardOptions:r,katex:l,katexOptions:p,mermaid:d,mermaidOptions:f}=i;l&&this.renderKatex(e,X(X({},this.DEFAULT_KATEX_OPTIONS),p)),d&&this.renderMermaid(e,X(X(X({},this.DEFAULT_MERMAID_OPTIONS),this.mermaidOptions),f)),a&&this.renderClipboard(e,o,X(X(X({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),r)),this.highlight(e);}reload(){this._reload$.next();}getSource(e){if(!this.http)throw new Error(g$);return this.http.get(e,{responseType:"text"}).pipe(Xo(i=>this.handleExtension(e,i)));}highlight(e){if(!Gm(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;e||(e=document);let i=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(i,o=>o.classList.add("language-none")),Prism.highlightAllUnder(e);}decodeHtml(e){if(!Gm(this.platform))return e;let i=document.createElement("textarea");return i.innerHTML=e,i.value;}extendsRendererForExtensions(e){let i=e;return i.ɵNgxMarkdownRendererExtendedForExtensions===!0||(this.extensions&&this.extensions.length>0&&io.use(...this.extensions),i.ɵNgxMarkdownRendererExtendedForExtensions=!0),e;}extendsRendererForMermaid(e){let i=e;if(i.ɵNgxMarkdownRendererExtendedForMermaid===!0)return e;let o=e.code;return e.code=a=>a.lang==="mermaid"?`<div class="mermaid">${a.text}</div>`:o(a),i.ɵNgxMarkdownRendererExtendedForMermaid=!0,e;}handleExtension(e,i){let o=e.lastIndexOf("://"),a=o>-1?e.substring(o+4):e,r=a.lastIndexOf("/"),l=r>-1?a.substring(r+1).split("?")[0]:"",p=l.lastIndexOf("."),d=p>-1?l.substring(p+1):"";return d&&d!=="md"?"```"+d+` 96`+i+"\n```":i;}parseMarked(e,i,o=!1){if(i.renderer){let a=X({},i.renderer);delete a.ɵNgxMarkdownRendererExtendedForExtensions,delete a.ɵNgxMarkdownRendererExtendedForMermaid,delete i.renderer,io.use({renderer:a});}
96return o?io.parseInline(e,i):io.parse(e,i);}parseEmoji(e){if(!Gm(this.platform))return e;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error(m$);return joypixels.shortnameToUnicode(e);}renderKatex(e,i){if(Gm(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(u$);renderMathInElement(e,i);}}renderClipboard(e,i,o){if(!Gm(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(h$);if(!i)throw new Error(_$);let{buttonComponent:a,buttonTemplate:r}=o,l=e.querySelectorAll("pre");for(let p=0;p<l.length;p++){let d=l.item(p),f=document.createElement("div");f.style.position="relative",d.parentNode.insertBefore(f,d),f.appendChild(d);let h=document.createElement("div");h.classList.add("markdown-clipboard-toolbar"),h.style.position="absolute",h.style.top=".5em",h.style.right=".5em",h.style.zIndex="1",f.insertAdjacentElement("beforeend",h),f.onmouseenter=()=>h.classList.add("hover"),f.onmouseleave=()=>h.classList.remove("hover");let g;if(a){let w=i.createComponent(a);g=w.hostView,w.changeDetectorRef.markForCheck();}else if(r)g=i.createEmbeddedView(r);else{let w=i.createComponent(a$);g=w.hostView,w.changeDetectorRef.markForCheck();}let b;g.rootNodes.forEach(w=>{h.appendChild(w),b=new ClipboardJS(w,{text:()=>d.innerText});}),g.onDestroy(()=>b.destroy());}}renderMermaid(e,i=this.DEFAULT_MERMAID_OPTIONS){if(!Gm(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(f$);let o=e.querySelectorAll(".mermaid");o.length!==0&&(mermaid.initialize(i),mermaid.run({nodes:o}));}trimIndentation(e){if(!e)return"";let i;return e.split(` 97`).map(o=>{let a=i;return o.length>0&&(a=isNaN(a)?o.search(/\S|$/):Math.min(o.search(/\S|$/),a)),isNaN(i)&&(i=a),a?o.substring(a):o;}).join(` 98`);}sanitizeHtml(e){return $(this,null,function*(){return d$(this.sanitize)?this.sanitize(yield e):this.sanitize!==z_.NONE?this.sanitizer.sanitize(this.sanitize??this.DEFAULT_SECURITY_CONTEXT,e)??"":e;});}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵprov=Sn({token:n,factory:n.ɵfac});}}return n;})();function nR(n){return[a0,n?.loader??[],n?.clipboardOptions??[],n?.markedOptions??[],n?.mermaidOptions??[],n?.markedExtensions??[],n?.sanitize??[]];}var bC=class n{constructor(t,e,i,o){this.firebase=t;this.authService=e;this.markdownService=i;this.sanitizer=o;}firebase;authService;markdownService;sanitizer;createChat(t,e){return $(this,null,function*(){console.log("Create chat",t?`for ${t}/${e}`:"(global)");let i=this.authService.getUserLoggedIn();if(!i)throw new Error("User must be logged in to create a chat");let o={createdAt:new Date(),userId:i.uid};t&&e?(o.objectTypeId=t,o.objectId=e):o.objectTypeId="global";let a=we(this.firebase.firestore,"chats");return Ht(a,o);});}getUserChats(){let t=this.authService.getUserLoggedIn();if(!t)return Gi([]);let e=we(this.firebase.firestore,"chats"),i=mt(e,Ro("userId","==",t.uid),Ro("objectTypeId","==","global"),Jt("createdAt","desc"));return console.log("getUserChats (global only), userId:",t.uid),new Lo(o=>{let a=Bn(i,r=>$(this,null,function*(){let l=r.docs.map(d=>$(this,null,function*(){let f=we(this.firebase.firestore,`chats/${d.id}/messages`),h=mt(f,Jt("timestamp","asc"),Ro("role","==","user")),b=(yield at(h)).docs[0]?.data()?.content||"";return{id:d.id,createdAt:d.data().createdAt.toDate(),firstMessage:b};})),p=yield Promise.all(l);o.next(p);}));return()=>a();});}getObjectChats(t,e){let i=this.authService.getUserLoggedIn();if(!i)return Gi([]);let o=we(this.firebase.firestore,"chats"),a=mt(o,Ro("userId","==",i.uid),Ro("objectTypeId","==",t),Ro("objectId","==",e),Jt("createdAt","desc"));return console.log(`getObjectChats: userId=${i.uid}, objectTypeId=${t}, objectId=${e}`),new Lo(r=>{let l=Bn(a,p=>$(this,null,function*(){let d=p.docs.map(h=>$(this,null,function*(){let g=we(this.firebase.firestore,`chats/${h.id}/messages`),b=mt(g,Jt("timestamp","asc"),Ro("role","==","user")),T=(yield at(b)).docs[0]?.data()?.content||"";return{id:h.id,createdAt:h.data().createdAt.toDate(),firstMessage:T};})),f=yield Promise.all(d);r.next(f);}));return()=>l();});}sendMessage(t,e,i,o){return $(this,null,function*(){console.log("Context : "+o);let a={content:e,role:"user",timestamp:Rn.fromDate(new Date()),processed:!1},r=we(this.firebase.firestore,`chats/${t}/messages`);return yield Ht(r,a),console.log("Send message : ",a),yield this.generateAIResponseStream(t,e,i,o);});}generateAIResponseStream(t,e,i,o){return $(this,null,function*(){try{let a=this.firebase.functions,r=ei(a,"functionGenerateChatStream"),l={chatId:t,locale:i,userMessage:e,acceptsStreaming:!0};o&&(l.objectId=o.objectTypeId,l.object=o.object,o.object?.enginePath&&(l.enginePath=o.object.enginePath),o.object?.datastoreId&&(l.datastoreId=o.object.datastoreId),console.log("Adding object c
98ontext to chat request:",o.objectTypeId)),console.log("Starting AI response stream...",l);let p="";return r.stream(l);}catch(a){console.error("Error streaming AI response:",a);let r=we(this.firebase.firestore,`chats/${t}/messages`),l={content:"Sorry, I encountered an error while generating a response. Please try again.",role:"assistant",timestamp:Rn.fromDate(new Date()),processed:!0};throw yield Ht(r,l),a;}});}getMessages(t){let e=we(this.firebase.firestore,`chats/${t}/messages`),i=mt(e,Jt("timestamp","asc"));return console.log("chatId : ",t),new Lo(o=>{let a=Bn(i,r=>$(this,null,function*(){let l=r.docs.map(p=>$(this,null,function*(){let d=p.data(),f=yield this.markdownService.parse(d.content);return d.markdown=this.sanitizer.bypassSecurityTrustHtml(f),X({},d);}));o.next(yield Promise.all(l));}));return()=>a();});}static ɵfac=function(e){return new(e||n)(rr(On),rr(Oo),rr(a0),rr(sd));};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var b$=["scrollContainer"];function y$(n,t){if(n&1){let e=oe();s(0,"div",9)(1,"mat-toolbar",23)(2,"div",24)(3,"mat-icon",25),u(4,"smart_toy"),c(),s(5,"div",26),q(6,3),c()(),s(7,"div",27)(8,"button",28),E("click",function(){k(e);let o=x();return R(o.startNewChat());}),s(9,"mat-icon"),u(10,"chat_add_on"),c()(),s(11,"button",29)(12,"mat-icon"),u(13,"menu"),c()()()()();}if(n&2){x();let e=bn(4);m(11),N("matMenuTriggerFor",e);}}function P$(n,t){if(n&1){let e=oe();s(0,"button",30),E("click",function(){let o=k(e).$implicit,a=x();return R(a.loadChat(o.id));}),s(1,"mat-icon"),u(2,"chat"),c(),s(3,"span"),u(4),Zn(5,"slice"),Zn(6,"date"),c()();}if(n&2){let e=t.$implicit;m(4),Hn("",cf(5,2,e.firstMessage,0,50)+"..."," - ",kr(6,6,e.createdAt,"short"));}}function w$(n,t){n&1&&(s(0,"div",15)(1,"div",31)(2,"mat-icon"),u(3,"smart_toy"),c()(),s(4,"div",32)(5,"div",33),q(6,4),c()()());}function S$(n,t){n&1&&(s(0,"div",31)(1,"mat-icon"),u(2,"smart_toy"),c()());}function M$(n,t){if(n&1&&ee(0,"div",35),n&2){let e=x().$implicit;N("innerHTML",e.markdown,xl);}}function O$(n,t){if(n&1&&(s(0,"div",33),u(1),c()),n&2){let e=x().$implicit;m(),G(e.content);}}function E$(n,t){if(n&1&&(s(0,"li")(1,"a",40)(2,"mat-icon",41),u(3,"link"),c(),u(4),c()()),n&2){let e=t.$implicit;m(),N("href",e.retrievedContext.uri,$m)("matTooltip",e.retrievedContext.text),m(3),_e(" ",e.retrievedContext.title," ");}}function T$(n,t){if(n&1&&(s(0,"div",36)(1,"div",39)(2,"h4"),q(3,5),c(),s(4,"ol"),be(5,E$,5,3,"li",null,Pt),c()()()),n&2){let e=x().$implicit;m(5),ye(e.references);}}function I$(n,t){n&1&&(s(0,"div",38)(1,"mat-icon"),u(2,"person"),c()());}function k$(n,t){if(n&1&&(s(0,"div",15),S(1,S$,3,0,"div",31),s(2,"div",34),S(3,M$,1,1,"div",35)(4,O$,2,1,"div",33),S(5,T$,7,0,"div",36),s(6,"span",37),u(7),Zn(8,"date"),c()(),S(9,I$,3,0,"div",38),c()),n&2){let e=t.$implicit;Ue("message-row--user",e.role==="user"),m(),M(e.role==="assistant"?1:-1),m(),Ue("bubble--assistant",e.role==="assistant")("bubble--user",e.role==="user"),m(),M(e.markdown?3:4),m(2),M(e.role==="assistant"&&e.references?5:-1),m(2),G(kr(8,11,e.timestamp.toDate(),"short")),m(2),M(e.role==="user"?9:-1);}}function R$(n,t){if(n&1&&(s(0,"a",40)(1,"mat-icon",41),u(2,"link"),c(),u(3),c()),n&2){let e=x().$implicit;N("href",e.retrievedContext.uri,$m)("matTooltip",e.retrievedContext.text),m(3),_e(" ",e.retrievedContext.title," ");}}function N$(n,t){if(n&1&&(s(0,"li"),S(1,R$,4,3,"a",40),c()),n&2){let e=t.$implicit;m(),M(e.retrievedContext?1:-1);}}function A$(n,t){if(n&1&&(s(0,"div",39)(1,"h4"),q(2,6),c(),s(3,"ol"),be(4,N$,2,1,"li",null,Pt),c()()),n&2){let e=x(2);m(4),ye(e.groundingChunks);}}function D$(n,t){if(n&1&&(s(0,"div",15)(1,"div",31)(2,"mat-icon"),u(3,"smart_toy"),c()(),s(4,"div",42),ee(5,"div",35),S(6,A$,6,0,"div",39),c()()),n&2){let e=x();m(5),N("innerHTML",e.currentAnswerHtml,xl),m(),M(e.groundingChunks?6:-1);}}function j$(n,t){n&1&&(s(0,"div",17)(1,"div",31)(2,"mat-icon"),u(3,"smart_toy"),c()(),s(4,"div",43),ee(5,"span")(6,"span")(7,"span"),c()());}function L$(n,t){if(n&1){let e=oe();s(0,"button",44),E("click",function(){k(e);let o=x();return R(o.startNewChat());}),s(1,"mat-icon"),u(2,"chat_add_on"),c()(),s(3,"button",45)(4,"mat-icon"),u(5,"menu"),c()();}if(n&2){x();let e=bn(4);m(3),N("matMenuTriggerFor",e);}}function z$(n,t){n&1&&ee(0,"mat-progress-spinner",22);}function F$(n,t){n&1&&(s(0,"mat-icon"),u(1,"send"),c());}var zs=class n{constructor(t,e,i,o){this.chatService=t;this.dialog=e;this.markdownService=i;this.sanitizer=o;this.chatHistory$=Gi([]);}chatService;dialog;markdownService;sanitizer;scrollContainer;objectTypeId;object;standalone=!0;messages$=Gi([]);loading=!1;messageInput=new st("");chatId="";chatInitialized=!1;messagesSubscription;chatHistory$;showGreeting=!0;currentAnswer="";currentAnswerHtml="";groundingChunks;citations;shouldScrollToBottom=!1;resetStreamedChat(){this.currentAnswer="",this.currentAnswerHtml="",this.groundingChunks=void 0,this.citations=void 0;}
98ngOnInit(){this.objectTypeId?this.object?.id&&this.initializeChatSession():this.initializeChatSession();}ngOnChanges(t){t.object&&this.objectTypeId&&this.object?.id&&!this.chatInitialized&&this.initializeChatSession();}initializeChatSession(){this.objectTypeId&&this.object?.id?(this.chatHistory$=this.chatService.getObjectChats(this.objectTypeId,this.object.id),this.chatInitialized=!0):(this.chatHistory$=this.chatService.getUserChats(),this.chatInitialized=!0),this.chatHistory$.pipe(Ga(1)).subscribe(t=>{t.length>0&&this.loadChat(t[0].id);});}ngOnDestroy(){this.messagesSubscription&&this.messagesSubscription.unsubscribe();}ngAfterViewChecked(){this.shouldScrollToBottom&&(this.scrollToBottom(),this.shouldScrollToBottom=!1);}scrollToBottom(){try{if(this.scrollContainer){let t=this.scrollContainer.nativeElement;setTimeout(()=>{t.scrollTop=t.scrollHeight;},0);}}catch(t){console.error("Error scrolling to bottom:",t);}}initializeExistingChat(t){return $(this,null,function*(){try{this.chatId=t,this.messages$=this.chatService.getMessages(this.chatId),this.messagesSubscription?.unsubscribe(),this.messagesSubscription=this.messages$.subscribe(e=>{this.showGreeting=e.length===0,this.shouldScrollToBottom=!0;});}catch(e){console.error("Error loading chat:",e);}});}loadChat(t){this.initializeExistingChat(t);}startNewChat(){this.chatId="",this.messages$=Gi([]),this.messageInput.reset(),this.loading=!1,this.messagesSubscription?.unsubscribe(),this.showGreeting=!0;}processMarkdown(){return $(this,null,function*(){try{let t=yield this.markdownService.parse(this.currentAnswer);this.currentAnswerHtml=this.sanitizer.bypassSecurityTrustHtml(t);}catch(t){console.error("Error processing markdown:",t);}});}sendMessage(){return $(this,null,function*(){if(!(!this.messageInput.value?.trim()||this.loading))try{if(!this.chatId){let p=yield this.chatService.createChat(this.objectTypeId,this.object?.id);this.chatId=p.id,this.messages$=this.chatService.getMessages(this.chatId),this.messagesSubscription?.unsubscribe(),this.messagesSubscription=this.messages$.subscribe(d=>{this.shouldScrollToBottom=!0;});}this.loading=!0;let a;this.objectTypeId&&this.object&&(a={objectTypeId:this.objectTypeId,object:this.object},console.log("Using object context in chat:",this.objectTypeId));let{stream:r,data:l}=yield this.chatService.sendMessage(this.chatId,this.messageInput.value,"enCA",a);try{for(var t=Co(r),e,i,o;e=!(i=yield t.next()).done;e=!1){let p=i.value;if(p){console.log(p);try{if(p.candidates&&p.candidates[0]&&p.candidates[0].content){let f=p.candidates[0].content.parts.filter(h=>h.text);f.length>0&&(this.currentAnswer+=f[0].text,this.processMarkdown(),this.shouldScrollToBottom=!0);}p.candidates&&p.candidates[0]&&p.candidates[0].citationMetadata&&(this.citations=p.candidates[0].citationMetadata.citations),p.candidates&&p.candidates[0]&&p.candidates[0].groundingMetadata&&p.candidates[0].groundingMetadata.groundingChunks&&(this.groundingChunks=p.candidates[0].groundingMetadata.groundingChunks);}catch(f){console.error("Error processing chunk:",f);}}}}catch(i){o=[i];}finally{try{e&&(i=t.return)&&(yield i.call(t));}finally{if(o)throw o[0];}}this.messageInput.reset(),this.loading=!1,this.resetStreamedChat(),this.shouldScrollToBottom=!0;}catch(a){console.error("Error sending message:",a),this.loading=!1,this.resetStreamedChat();}});}static ɵfac=function(e){return new(e||n)(le(bC),le(Ti),le(a0),le(sd));};static ɵcmp=Te({type:n,selectors:[["app-ask-architect"]],viewQuery:function(e,i){if(e&1&&go(b$,5),e&2){let o;qn(o=Jn())&&(i.scrollContainer=o.first);}},inputs:{objectTypeId:"objectTypeId",object:"object",standalone:"standalone"},features:[ki],decls:28,vars:15,consts:()=>{let t;t="Ask about architecture, your project, best practices\u2026";let e;e="Send";let i;i="Chat History";let o;o="Start New Chat";let a;a="Conversation history";let r;r="Ask the Architect";let l;l=" Hello! I'm the Architect. Ask me anything about your project, architecture best practices, or technology choices. ";let p;p="Web References";let d;d="Web References";let f;f="Start New Chat";let h;return h="Conversation history",[["chatMenu","matMenu"],["scrollC
98ontainer",""],i,r,l,p,d,[1,"chat-wrapper"],[1,"chat-container"],[1,"standalone-header-card"],[1,"chat-history-menu"],["mat-subheader",""],["mat-menu-item",""],[1,"messages-container"],[1,"messages-list"],[1,"message-row"],[1,"message-row",3,"message-row--user"],[1,"message-row","agent-typing"],[1,"chat-input-row"],["appearance","outline",1,"chat-input-field"],["matInput","","placeholder",t,3,"keydown.enter","formControl","disabled"],["mat-icon-button","","color","primary","matTooltip",e,1,"send-btn",3,"click","disabled"],["mode","indeterminate","diameter","20","color","accent"],[1,"standalone-toolbar"],[1,"standalone-icon-title"],[1,"standalone-toolbar-icon"],[1,"standalone-objecttitle"],[1,"div-button-right"],["mat-icon-button","","matTooltip",o,3,"click"],["mat-icon-button","","matTooltip",a,3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[1,"msg-avatar","msg-avatar--assistant"],[1,"bubble","bubble--assistant"],[1,"bubble-text"],[1,"bubble"],[1,"bubble-text",3,"innerHTML"],[1,"references-section"],[1,"message-time"],[1,"msg-avatar","msg-avatar--user"],[1,"web-references"],["target","_blank",1,"web-link",3,"href","matTooltip"],[1,"link-icon"],[1,"bubble","bubble--assistant","bubble--streaming"],[1,"typing-dots"],["mat-icon-button","","matTooltip",f,3,"click"],["mat-icon-button","","matTooltip",h,3,"matMenuTriggerFor"]];},template:function(e,i){e&1&&(s(0,"div",7)(1,"div",8),S(2,y$,14,1,"div",9),s(3,"mat-menu",null,0)(5,"div",10)(6,"h3",11),q(7,2),c(),ee(8,"mat-divider"),be(9,P$,7,9,"button",12,Pt),Zn(11,"async"),c()(),s(12,"div",13,1)(14,"div",14),S(15,w$,7,0,"div",15),be(16,k$,10,14,"div",16,Pt),Zn(18,"async"),S(19,D$,7,2,"div",15),S(20,j$,8,0,"div",17),c()(),s(21,"div",18),S(22,L$,6,1),s(23,"mat-form-field",19)(24,"input",20),E("keydown.enter",function(){return i.sendMessage();}),c()(),s(25,"button",21),E("click",function(){return i.sendMessage();}),S(26,z$,1,0,"mat-progress-spinner",22)(27,F$,2,0,"mat-icon"),c()()()()),e&2&&(Ue("chat-wrapper--standalone",i.standalone),m(2),M(i.standalone?2:-1),m(7),ye(yo(11,11,i.chatHistory$)),m(6),M(i.showGreeting?15:-1),m(),ye(yo(18,13,i.messages$)),m(3),M(i.currentAnswer&&i.currentAnswer.length>0?19:-1),m(),M(i.loading&&(!i.currentAnswer||i.currentAnswer.length===0)?20:-1),m(2),M(i.standalone?-1:22),m(2),N("formControl",i.messageInput)("disabled",i.loading),m(),N("disabled",i.loading||!(i.messageInput.value!=null&&i.messageInput.value.trim())),m(),M(i.loading?26:27));},dependencies:[$e,Qt,jt,Xt,Vt,Fi,zi,ha,ln,yn,We,Xe,ut,hf,N1,R1,A1,Ua,Ml,$t,_n,Gt,tn,Ft,Tt,md,rd,pf,bl],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.chat-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;height:100%}.chat-wrapper.chat-wrapper--standalone[_ngcontent-%COMP%]{padding:10px;box-sizing:border-box}.chat-wrapper.chat-wrapper--standalone[_ngcontent-%COMP%] .chat-container[_ngcontent-%COMP%]{border-radius:10px;overflow:hidden}.chat-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;background:#fff;min-height:0;flex:1}.standalone-header-card[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid rgba(0,0,0,.08);flex-shrink:0}.standalone-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.standalone-icon-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;flex:1}.standalone-toolbar-icon[_ngcontent-%COMP%]{margin-right:20px;font-size:50px!important;width:50px!important;height:50px!important;color:var(--mdc-theme-primary, #1565c0)}.standalone-objecttitle[_ngcontent-%COMP%]{font-size:xx-large;font-weight:400;color:#000000de}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:4px}.chat-history-menu[_ngcontent-%COMP%]{padding:8px 0;min-width:220px}.chat-history-menu[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 4px;padding:0 16px;font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#00000073}.messages-container[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:20px 16px;min-height:0}.messages-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.message-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;
98gap:10px}.message-row.message-row--user[_ngcontent-%COMP%]{flex-direction:row-reverse}.msg-avatar[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.msg-avatar[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.msg-avatar--assistant[_ngcontent-%COMP%]{background:var(--mdc-theme-primary, #1565c0);color:#fff}.msg-avatar--user[_ngcontent-%COMP%]{background:#00000014;color:#0000008c}.bubble[_ngcontent-%COMP%]{max-width:82%;padding:11px 16px;border-radius:18px;line-height:1.55;font-size:.93rem;word-break:break-word}.bubble--assistant[_ngcontent-%COMP%]{background:#fff;color:#000000d9;border-bottom-left-radius:4px;box-shadow:0 1px 4px #0000001a;border:1px solid rgba(0,0,0,.07)}.bubble--user[_ngcontent-%COMP%]{background:var(--mdc-theme-primary, #1565c0);color:#fff;border-bottom-right-radius:4px;box-shadow:0 2px 8px #1565c047}.bubble--streaming[_ngcontent-%COMP%] .bubble-text[_ngcontent-%COMP%]:after{content:"\\258d";display:inline-block;color:var(--mdc-theme-primary, #1565c0);opacity:1;margin-left:2px;animation:_ngcontent-%COMP%_streamCursor .7s step-end infinite}@keyframes _ngcontent-%COMP%_streamCursor{0%,to{opacity:1}50%{opacity:0}}.bubble-text[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap}.bubble-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 8px}.bubble-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.bubble-text[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .bubble-text[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:6px 0 6px 18px;padding:0}.bubble-text[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:2px 0}.bubble-text[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:.88em;background:#0000000f;padding:1px 5px;border-radius:4px}.bubble-text[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:#0000000d;padding:10px 12px;border-radius:8px;overflow-x:auto;margin:8px 0}.bubble-text[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .bubble-text[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .bubble-text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .bubble-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:10px 0 4px;font-weight:600}.bubble-text[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:600}.bubble--user[_ngcontent-%COMP%] .bubble-text[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:#ffffff2e}.bubble--user[_ngcontent-%COMP%] .bubble-text[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:#ffffff1f}.message-time[_ngcontent-%COMP%]{display:block;font-size:.7rem;color:#00000061;margin-top:6px;letter-spacing:.1px}.bubble--user[_ngcontent-%COMP%] .message-time[_ngcontent-%COMP%]{color:#fff9}.typing-dots[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;background:#fff;padding:13px 18px;border-radius:18px 18px 18px 4px;box-shadow:0 1px 4px #0000001a;border:1px solid rgba(0,0,0,.07)}.typing-dots[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:#1565c08c;display:block;animation:_ngcontent-%COMP%_typingBounce 1.2s ease-in-out infinite}.typing-dots[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.typing-dots[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_typingBounce{0%,60%,to{transform:translateY(0);opacity:.4}30%{transform:translateY(-6px);opacity:1}}.references-section[_ngcontent-%COMP%]{margin-top:12px;padding-top:10px;border-top:1px solid rgba(0,0,0,.1);font-size:.85em}.web-references[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 6px;font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#00000080}.web-references[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{padding-left:18px;margin:0;list-style-position:outside}.web-references[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:3px 0}.web-references[_ngcontent-%COMP%] .web-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;color:var(--mdc-theme-primary, #1565c0);text-decoration:none;font-size:.82rem}.web-references[_ngcontent-%COMP%] .web-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.web-references[_ngcontent-%COMP%] .web-link[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;
98height:14px;vertical-align:middle}.bubble--user[_ngcontent-%COMP%] .web-references[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#ffffffa6}.bubble--user[_ngcontent-%COMP%] .web-references[_ngcontent-%COMP%] .web-link[_ngcontent-%COMP%]{color:#ffffffe6}.chat-input-row[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:12px;padding:12px 16px;align-items:center;background:#fff;border-top:1px solid rgba(0,0,0,.08);z-index:1}.chat-input-field[_ngcontent-%COMP%]{flex:1;margin-bottom:-1.25em}.send-btn[_ngcontent-%COMP%]{flex-shrink:0}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:5px;height:5px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000002e;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#0000006b}']});};var Od=class n{constructor(t){this.template=t;}template;columnName;static ɵfac=function(e){return new(e||n)(le(hp));};static ɵdir=bo({type:n,selectors:[["","appColumnTemplate",""]],inputs:{columnName:[0,"appColumnTemplate","columnName"]}});};var B$=["searchTextInput"],$$=["selectionTable"],V$=n=>({$implicit:n}),oR=()=>["view","name","remove"];function G$(n,t){n&1&&(s(0,"div",4),ee(1,"mat-spinner"),c());}function q$(n,t){if(n&1&&(s(0,"div")(1,"button",17)(2,"mat-icon"),u(3,"add"),c(),u(4," New "),c()()),n&2){let e=x();m(),N("routerLink","/"+e.documentRoute);}}function J$(n,t){n&1&&(s(0,"mat-header-cell"),u(1,"Selection"),c());}function H$(n,t){if(n&1){let e=oe();s(0,"mat-cell")(1,"mat-checkbox",20),E("click",function(o){return o.stopPropagation();})("change",function(o){let a=k(e).$implicit,r=x(2);return R(o?r.select(a):null);}),c()();}if(n&2){let e=t.$implicit,i=x(2);m(),N("checked",i.selection.isSelected(e.id));}}function U$(n,t){n&1&&(fi(0,10),Zt(1,J$,2,0,"mat-header-cell",18)(2,H$,2,1,"mat-cell",19),hi());}function W$(n,t){if(n&1){let e=oe();s(0,"mat-row",21),E("click",function(){let o=k(e).$implicit,a=x();return R(a.select(o));}),c();}if(n&2){let e=t.$implicit,i=x();Ue("table-row-selected",i.selectedObject==e);}}function X$(n,t){n&1&&ee(0,"mat-header-row");}function Y$(n,t){if(n&1&&(s(0,"mat-header-cell",23),u(1),c()),n&2){let e=x().$index,i=x();m(),G(i.displayedColumnsHeaders[e]);}}function K$(n,t){n&1&&Ma(0);}function Z$(n,t){if(n&1&&Zt(0,K$,1,0,"ng-container",24),n&2){let e=x().$implicit,i=x().$implicit,o=x();N("ngTemplateOutlet",o.getColumnTemplate(i).template)("ngTemplateOutletContext",Ds(2,V$,e));}}function Q$(n,t){if(n&1&&(u(0),Zn(1,"date")),n&2){let e=x(2).$implicit,i=x().$implicit,o=x();_e(" ",kr(1,1,o.isDate(e[i]),"dd/MM/yyyy")," ");}}function eV(n,t){if(n&1&&u(0),n&2){let e=x(2).$implicit,i=x().$implicit;_e(" ",e[i]," ");}}function tV(n,t){if(n&1&&(S(0,Q$,2,4),S(1,eV,1,1)),n&2){let e=x().$implicit,i=x().$implicit,o=x();M(o.isDate(e[i])?0:-1),m(),M(o.isDate(e[i])?-1:1);}}function nV(n,t){if(n&1&&(s(0,"mat-cell"),S(1,Z$,1,4,"ng-container")(2,tV,2,2),c()),n&2){let e=x().$implicit,i=x();m(),M(i.getColumnTemplate(e)?1:2);}}function iV(n,t){if(n&1&&(fi(0,13),Zt(1,Y$,2,1,"mat-header-cell",22)(2,nV,3,1,"mat-cell",19),hi()),n&2){let e=t.$implicit;N("matColumnDef",lf(e));}}function oV(n,t){n&1&&(s(0,"div",15)(1,"mat-icon",25),u(2,"swap_horiz"),c()());}function aV(n,t){n&1&&ee(0,"mat-header-row");}function rV(n,t){n&1&&ee(0,"mat-row");}function sV(n,t){n&1&&(s(0,"mat-header-cell"),u(1,"View detail"),c());}function lV(n,t){if(n&1){let e=oe();s(0,"mat-cell")(1,"button",32),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.onClickView(o));}),s(2,"mat-icon",33),u(3,"open_in_new"),c()()();}}function cV(n,t){n&1&&(s(0,"mat-header-cell"),u(1,"Selected records"),c());}function pV(n,t){if(n&1&&(s(0,"mat-cell",34),u(1),c()),n&2){let e=t.$implicit;m(),_e(" ",e.name," ");}}function dV(n,t){n&1&&(s(0,"mat-header-cell"),u(1,"Remove"),c());}function mV(n,t){if(n&1){let e=oe();s(0,"mat-cell")(1,"button",35),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.onRemoveSelection(o));}),s(2,"mat-icon",33),u(3,"delete"),c()()();}}function uV(n,t){if(n&1&&(s(0,"div",8)(1,"mat-table",26,2),Zt(3,aV,1,0,"mat-header-row",12)(4,rV,1,0,"mat-row",27),u(5,"> "),fi(6,28),Zt(7,sV,2,0,"mat-header-cell",18)(8,lV,4,0,"mat-cell",19),hi(),fi(9,29),Zt(10,cV,2,0,"mat-header-cell",18)(11,pV,2,1,"mat-cell",30),hi(),fi(12,31),Zt(13,dV,2,0,"mat-header-cell",18)(14,mV,4,0,"mat-cell",19),hi(),c()()),n&2){let e=x();m(),N("dataSource",e.selectedObjects),m(2),N("matHeaderRowDef",Oa(3,oR)),m(),N("matRowDefColumns",Oa(4,oR)
98);}}function fV(n,t){if(n&1){let e=oe();s(0,"div",16)(1,"button",36),E("click",function(){k(e);let o=x();return R(o.onClickCancel());}),u(2,"Cancel"),c(),s(3,"button",37),u(4,"Ok"),c()();}if(n&2){let e=x();m(3),N("mat-dialog-close",e.selectedObjects);}}var ho=class n{constructor(t,e,i){this.router=t;this.data=e;this.dialogRef=i;if(e){this.useSelectionModel=!0;let o=e.dialogData;this.dataSource=o.dataSource,this.displayedColumns=o.displayedColumns,this.displayedColumnsHeaders=o.displayedColumnsHeaders,this.collectionPath=o.collectionPath,this.documentRoute=o.documentRoute,o.sortField&&(this.defaultSortField=o.sortField),o.sortOrder&&(this.defaultSortOrder=o.sortOrder),o.searchText&&(this.searchText=o.searchText),o.whereField&&(this.whereField=o.whereField),o.whereValue&&(this.whereValue=o.whereValue),o.whereMapQuery&&(this.whereMapQuery=o.whereMapQuery),o.whereMapQueryIn&&(this.whereMapQueryIn=o.whereMapQueryIn),o.initialSelection&&(this.initialSelection=o.initialSelection),o.allowMultiSelect!=null&&(this.allowMultiSelect=o.allowMultiSelect);}this.displayedColumns&&(this.displayedColumnsWithSelect=this.displayedColumns.slice());}router;data;dialogRef;searchTextInput;selectionTable;sort;paginator;pageEvent;showNewButton=!0;forceRefresh=!1;displayedColumns;displayedColumnsHeaders;displayedColumnsWithSelect;defaultPageSize=15;defaultPageIndex=0;pageSizeOptions=[1,5,10,15,25,100];defaultSortField="creationDate";defaultSortOrder="desc";searchText="";whereField="";whereValue="";whereMapQuery=new Map();whereMapQueryIn=new Map();whereMapQueryOp=new Map();collectionPath="";documentRoute="";selectedObjects=[];selection;initialSelection;allowMultiSelect=!1;useSelectionModel=!1;selectedObject;dataSource;columnTemplates;getColumnTemplate(t){return this.columnTemplates?.find(e=>e.columnName===t);}ngOnInit(){if(!this.useSelectionModel&&this.dataSource&&this.dataSource.hasData()?(this.whereField=this.dataSource.getWhereField(),this.whereValue=this.dataSource.getWhereValue(),this.whereMapQuery=this.dataSource.getWhereMapQuery(),this.whereMapQueryIn=this.dataSource.getWhereMapQueryIn(),this.defaultSortField=this.dataSource.getSortField(),this.defaultSortOrder=this.dataSource.getSortOrder(),this.defaultPageSize=this.dataSource.getLimitNb(),this.defaultPageIndex=this.dataSource.getPage(),this.forceRefresh&&this.load()):this.load(),this.displayedColumnsWithSelect=this.displayedColumns.slice(),this.useSelectionModel&&this.dialogRef){this.dialogRef.updateSize("80%","80%"),this.displayedColumnsWithSelect.unshift("select");let t=[];if(this.initialSelection)for(let e of this.initialSelection)t.push(e.id),this.selectedObjects.push(e);this.selection=new Y_(this.allowMultiSelect,t);}}isDate(t){try{let e=t.toDate();if(e instanceof Date)return e;}catch(e){return;}}ngAfterViewInit(){ba(this.searchTextInput.nativeElement,"blur").pipe(Fm(150),td(),Jr(()=>{this.searchText&&this.searchText.length>0&&(this.whereField="keywords",this.whereValue=this.searchText,this.load());})).subscribe(),this.sort.sortChange.subscribe(()=>{this.load();}),this.paginator.page.subscribe(t=>{if(!this.dataSource)return;let e=0;t.previousPageIndex&&(e=t.previousPageIndex),this.paginator.pageSize!=this.dataSource.getLimitNb()?this.load():e<this.paginator.pageIndex?this.dataSource.next():e>this.paginator.pageIndex&&this.dataSource.previous();});}load(){if(!this.dataSource)return;let t=this.defaultPageSize;this.paginator&&(this.paginator.pageIndex=0,t=this.paginator.pageSize);let e=this.defaultSortField;this.sort&&this.sort.active&&(e=this.sort.active);let i=this.defaultSortOrder;this.sort&&(this.sort.direction=="desc"||this.sort.direction=="asc")&&(i=this.sort.direction),this.dataSource.load(this.collectionPath,t,e,i,this.whereField,this.whereValue,this.whereMapQuery,this.whereMapQueryIn,this.whereMapQueryOp.size>0?this.whereMapQueryOp:void 0);}onRemoveSelection(t){if(this.selection&&this.useSelectionModel&&this.allowMultiSelect){this.selection.toggle(t.id);let e=this.selectedObjects.indexOf(t);this.selectedObjects.splice(e,1),this.selectionTable&&this.selectionTable.renderRows();}}select(t){if(this.selection&&this.useSelectionModel&&this.allowMultiSelect){if(this.selection.toggle(t.id),this.selection.isSelected(t.id))this.selectedObjects.push(t),this.selectionTable&&this.selectionTable.renderRows();else{let e=this.selectedObjects.indexOf(t);this.selectedObjects.splice(e,1),this.selectionTable&&this.selectionTable.renderRows();}}else this.selection&&this.useSelectionModel&&!this.allowMultiSelect?(this.selection.toggle(t.id),this.selectedObject=t,this.selectedObjects=[t]):(this.selectedObject=t,this.selectedObjects=[t],this.router.navigate([this.documentRoute+"/"+t.id]));}onClickCancel(){this.dialogRef&&this.dialogRef.close();}onClickView(t){this.router.navigate([this.documentRoute+"/"+t.id]);}static ɵfac=function(e){return new(e||n)(le(Et),le(fo,8),le(Li,8));};static ɵcmp=Te({type:n,selectors:[["app-object-list"]],contentQueries:function(e,i,o){if(e&1&&rc(o,Od,4),e&2){let a;qn(a=Jn())&&(i.columnTemplates=a);}},viewQuery:function(e,i){if(e&1&&go(B$,5)($$,5)(L1,5)(j1,5),e&2){let o;qn(o=Jn())&&(i.searchTextInput=o.first),qn(o=Jn())&&(i.selectionTable=o.first),qn(o=Jn())&&(i.sort=o.first),qn(o=Jn())&&(i.paginator=o.first);}},inputs:{showNewButton:"showNewButton",forceRefresh:"forceRefresh",displayedColumns:"displayedColumns",displayedColumnsHeaders:"displayedColumnsHeaders",defaultPageSize:"defaultPageSize",defaultSortField:"defaultSortField",defaultSortOrder:"defaultSortOrder",searchText:"searchText",whereField:"whereField",whereValue:"whereValue",whereMapQuery:"whereMapQuery",whereMapQueryIn:"whereMapQueryIn",whereMapQueryOp:"whereMapQueryOp",collectionPath:"collectionPath",documentRoute:"documentRoute",initialSelection:"initialSelection",allowMultiSelect:"allowMultiSelect",useSelectionModel:"useSelectionModel",dataSource:"dataSource"},decls:21,vars:18,consts:[["searchTextInput",""],["paginator",""],["selectionTable",""],[1,"div-main-container"],[1,"spinner-container"],[1,"div-action-container"],["matInput","","placeholder","Search",3,"ngModelChange","ngModel"],[1,"div-table-container"],[1,"div-column-container"],["matSort","","matSortDisableClear","",1,"mat-elevation-z8",3,"dataSource","matSortActive","matSortDirection"],["matColumnDef","select"],[3,"table-row-selected","click",4,"matRowDef","matRowDefColumns"],[4,"matHeaderRowDef"],[3,"matColumnDef"],["aria-label","Select page",3,"page","length","pageSize","pageIndex","pageSizeOptions"],[1,"div-icon-middle-arrow"],["mat-dialog-actions",""],["mat-raised-button","","color","primary",3,"routerLink"],[4,"matHeaderCellDef"],[4,"matCellDef"],[3,"click","change","checked"],[3,"click"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-sort-header",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-icon-middle-arrow"],[1,"mat-elevation-z8",3,"dataSource"],[4,"matRowDef","matRowDefColumns"],["matColumnDef","view"],["matColumnDef","name"],["class","name-cell",4,"matCellDef"],["matColumnDef","remove"],["mat-icon-button","","aria-label","View",3,"click"],[1,"mat-icon-table"],[1,"name-cell"],["mat-icon-button","","aria-label","Remove",3,"click"],["mat-button","",3,"click"],["mat-button","","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(e,i){if(e&1){let o=oe();s(0,"div",3),S(1,G$,2,0,"div",4),Zn(2,"async"),s(3,"div",5)(4,"mat-form-field")(5,"input",6,0),Mt("ngModelChange",function(r){return k(o),St(i.searchText,r)||(i.searchText=r),R(r);}),c()(),S(7,q$,5,1,"div"),c(),s(8,"div",7)(9,"div",8)(10,"mat-table",9),S(11,U$,3,0,"ng-container",10),Zt(12,W$,1,2,"mat-row",11)(13,X$,1,0,"mat-header-row",12),be(14,iV,3,2,"ng-container",13,Pt),c(),s(16,"mat-paginator",14,1),E("page",function(r){return i.pageEvent=r;}),c()(),S(18,oV,3,0,"div",15),S(19,uV,15,5,"div",8),c(),S(20,fV,5,1,"div",16),c();}e&2&&(m(),M(yo(2,16,i.dataSource.loading$)?1:-1),m(4),wt("ngModel",i.searchText),m(2),M(i.showNewButton?7:-1),m(3),N("dataSource",i.dataSource)("matSortActive",i.defaultSortField)("matSortDirection",i.defaultSortOrder),m(),M(i.selection?11:-1),m(),N("matRowDefColumns",i.displayedColumnsWithSelect),m(),N("matHeaderRowDef",i.displayedColumnsWithSelect),m(),ye(i.displayedColumns),m(2),N("length",i.dataSource.length)("pageSize",i.defaultPageSize)("pageIndex",i.defaultPageIndex)("pageSizeOptions",i.pageSizeOptions),m(2),M(i.selection&&i.useSelectionModel&&i.allowMultiSelect?18:-1),m(),M(i.selection&&i.useSelectionModel&&i.allowMultiSelect?19:-1),m(),M(i.useSelectionModel?20:-1));},dependencies:[$e,Qe,Qt,Zi,S1,Vo,pd,u1,ra,xr,We,Xe,jt,Xt,Vt,gn,Ft,Tt,Po,Fi,zi,ut,ad,Gt,eI,q3,H3,Y3,U3,J3,K3,W3,X3,Z3,Q3,G3,L1,V3,$3,j1,rd,bl],styles:[".div-main-container[_ngcontent-%COMP%]{height:100%}.mat-mdc-table[_ngcontent-%COMP%]{width:100%}.div-table-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;width:100%;height:80%}.div-action-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;width:100%;gap:16px}.div-action-container[_ngcontent-%COMP%] button[mat-raised-button][_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.div-action-container[_ngcontent-%COMP%] button[mat-raised-button][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:0;margin-left:0}.div-action-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center}.div-column-container[_ngcontent-%COMP%]{width:100%}.div-icon-middle-arrow[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;
98width:200px;margin-top:50px}.mat-icon-middle-arrow[_ngcontent-%COMP%]{height:50px!important;width:50px!important;font-size:50px!important}.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{border-bottom:1px solid transparent;border-top:1px solid transparent;cursor:pointer}.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{border-color:currentColor}.table-row-selected[_ngcontent-%COMP%]{font-weight:700}.mat-icon-table[_ngcontent-%COMP%]{height:28px!important;width:28px!important;font-size:28px!important}.mat-column-remove[_ngcontent-%COMP%]{text-align:right;justify-content:flex-end}.mat-column-select[_ngcontent-%COMP%]{overflow:initial}"]});};var yC=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="businessCapabilityModels";documentRoute="dashboard/business-capability-model";displayedColumns=["name","description"];displayedColumnsHeaders=["Name","Description"];ngOnInit(){}clickNewModel(){this.router.navigate(["/dashboard/business-capability-model"]);}static ɵfac=function(e){return new(e||n)(le(H1),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-business-capability-list"]],decls:18,vars:6,consts:()=>{let t;t="Business Capability Models";let e;return e="New Model",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],["defaultSortField","name","defaultSortOrder","asc",3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"hub"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewModel();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10),ee(17,"app-object-list",11),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,ho,ln,yn,We,Xe],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
98.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var MS=class{dataNodes;expansionModel=new Y_(!0);trackBy;getLevel;isExpandable;getChildren;toggle(t){this.expansionModel.toggle(this._trackByValue(t));}expand(t){this.expansionModel.select(this._trackByValue(t));}collapse(t){this.expansionModel.deselect(this._trackByValue(t));}isExpanded(t){return this.expansionModel.isSelected(this._trackByValue(t));}toggleDescendants(t){this.expansionModel.isSelected(this._trackByValue(t))?this.collapseDescendants(t):this.expandDescendants(t);}collapseAll(){this.expansionModel.clear();}expandDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.select(...e.map(i=>this._trackByValue(i)));}collapseDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.deselect(...e.map(i=>this._trackByValue(i)));}_trackByValue(t){return this.trackBy?this.trackBy(t):t;}};var Td=class extends MS{getChildren;options;constructor(t,e){super(),this.getChildren=t,this.options=e,this.options&&(this.trackBy=this.options.trackBy),this.options?.isExpandable&&(this.isExpandable=this.options.isExpandable);}
98expandAll(){this.expansionModel.clear();let t=this.dataNodes.reduce((e,i)=>[...e,...this.getDescendants(i),i],[]);this.expansionModel.select(...t.map(e=>this._trackByValue(e)));}getDescendants(t){let e=[];return this._getDescendants(e,t),e.splice(1);}_getDescendants(t,e){t.push(e);let i=this.getChildren(e);Array.isArray(i)?i.forEach(o=>this._getDescendants(t,o)):D_(i)&&i.pipe(Ga(1),ms(Boolean)).subscribe(o=>{for(let a of o)this._getDescendants(t,a);});}},l0=new qi("CDK_TREE_NODE_OUTLET_NODE"),s0=(()=>{class n{viewContainer=re(oc);_node=re(l0,{optional:!0});constructor(){}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","cdkTreeNodeOutlet",""]]});}return n;})(),OS=class{$implicit;level;index;count;constructor(t){this.$implicit=t;}},PC=(()=>{class n{template=re(hp);when;constructor(){}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:[0,"cdkTreeNodeDefWhen","when"]}});}return n;})();function aR(){return Error("Could not find a tree control, levelAccessor, or childrenAccessor for the tree.");}var wC=(()=>{class n{_differs=re(Lw);_changeDetectorRef=re(Pa);_elementRef=re(qa);_dir=re(sc);_onDestroy=new oa();_dataDiffer;_defaultNodeDef=null;_dataSubscription;_levels=new Map();_parents=new Map();_ariaSets=new Map();get dataSource(){return this._dataSource;}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e);}_dataSource;treeControl;levelAccessor;childrenAccessor;trackBy;expansionKey;_nodeOutlet;_nodeDefs;viewChange=new Ic({start:0,end:Number.MAX_VALUE});_expansionModel;_flattenedNodes=new Ic([]);_nodeType=new Ic(null);_nodes=new Ic(new Map());_keyManagerNodes=new Ic([]);_keyManagerFactory=re(jT);_keyManager;_viewInit=!1;constructor(){}ngAfterContentInit(){this._initializeKeyManager();}ngAfterContentChecked(){this._updateDefaultNodeDefinition(),this._subscribeToDataChanges();}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this._nodes.complete(),this._keyManagerNodes.complete(),this._nodeType.complete(),this._flattenedNodes.complete(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription?.unsubscribe(),this._dataSubscription=void 0,this._keyManager?.destroy();}ngOnInit(){this._checkTreeControlUsage(),this._initializeDataDiffer();}ngAfterViewInit(){this._viewInit=!0;}_updateDefaultNodeDefinition(){let e=this._nodeDefs.filter(i=>!i.when);e.length>1,this._defaultNodeDef=e[0];}_setNodeTypeIfUnset(e){this._nodeType.value===null&&this._nodeType.next(e);}_switchDataSource(e){this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription?.unsubscribe(),this._dataSubscription=void 0,e||this._nodeOutlet.viewContainer.clear(),this._dataSource=e,this._nodeDefs&&this._subscribeToDataChanges();}_getExpansionModel(){return this.treeControl?this.treeControl.expansionModel:(this._expansionModel??=new Y_(!0),this._expansionModel);}_subscribeToDataChanges(){if(this._dataSubscription)return;let e;i3(this._dataSource)?e=this._dataSource.connect(this):D_(this._dataSource)?e=this._dataSource:Array.isArray(this._dataSource)&&(e=Gi(this._dataSource)),e&&(this._dataSubscription=this._getRenderData(e).pipe(vo(this._onDestroy)).subscribe(i=>{this._renderDataChanges(i);}));}_getRenderData(e){let i=this._getExpansionModel();return j_([e,this._nodeType,i.changed.pipe(qr(null),Jr(o=>{this._emitExpansionChanges(o);}))]).pipe(mr(([o,a])=>a===null?Gi({renderNodes:o,flattenedNodes:null,nodeType:a}):this._computeRenderingData(o,a).pipe(Xo(r=>Ve(X({},r),{nodeType:a})))));}_renderDataChanges(e){if(e.nodeType===null){this.renderNodeChanges(e.renderNodes);return;}this._updateCachedData(e.flattenedNodes),this.renderNodeChanges(e.renderNodes),this._updateKeyManagerItems(e.flattenedNodes);}_emitExpansionChanges(e){if(!e)return;let i=this._nodes.value;for(let o of e.added)i.get(o)?._emitExpansionState(!0);for(let o of e.removed)i.get(o)?._emitExpansionState(!1);}_initializeKeyManager(){let e=j_([this._keyManagerNodes,this._nodes]).pipe(Xo(([o,a])=>o.reduce((r,l)=>{let p=a.get(this._getExpansionKey(l));return p&&r.push(p),r;},[]))),i={trackBy:o=>this._getExpansionKey(o.data),skipPredicate:o=>!!o.isDisabled,typeAheadDebounceInterval:!0,horizontalOrientation:this._dir.value};this._keyManager=this._keyManagerFactory(e,i);}_initializeDataDiffer(){let e=this.trackBy??((i,o)=>this._getExpansionKey(o));this._dataDiffer=this._differs.find([]).create(e);}_checkTreeControlUsage(){}renderNodeChanges(e,i=this._dataDiffer,o=this._nodeOutlet.viewContainer,a){let r=i.diff(e);!r&&!this._viewInit||(r?.forEachOperation((l,p,d)=>
98{if(l.previousIndex==null)this.insertNode(e[d],d,o,a);else if(d==null)o.remove(p);else{let f=o.get(p);o.move(f,d);}}),r?.forEachIdentityChange(l=>{let p=l.item;if(l.currentIndex!=null){let d=o.get(l.currentIndex);d.context.$implicit=p;}}),a?this._changeDetectorRef.markForCheck():this._changeDetectorRef.detectChanges());}_getNodeDef(e,i){if(this._nodeDefs.length===1)return this._nodeDefs.first;let o=this._nodeDefs.find(a=>a.when&&a.when(i,e))||this._defaultNodeDef;return o;}insertNode(e,i,o,a){let r=this._getLevelAccessor(),l=this._getNodeDef(e,i),p=this._getExpansionKey(e),d=new OS(e);d.index=i,a??=this._parents.get(p)??void 0,r?d.level=r(e):a!==void 0&&this._levels.has(this._getExpansionKey(a))?d.level=this._levels.get(this._getExpansionKey(a))+1:d.level=0,this._levels.set(p,d.level),(o||this._nodeOutlet.viewContainer).createEmbeddedView(l.template,d,i),Id.mostRecentTreeNode&&(Id.mostRecentTreeNode.data=e);}isExpanded(e){return!!(this.treeControl?.isExpanded(e)||this._expansionModel?.isSelected(this._getExpansionKey(e)));}toggle(e){this.treeControl?this.treeControl.toggle(e):this._expansionModel&&this._expansionModel.toggle(this._getExpansionKey(e));}expand(e){this.treeControl?this.treeControl.expand(e):this._expansionModel&&this._expansionModel.select(this._getExpansionKey(e));}collapse(e){this.treeControl?this.treeControl.collapse(e):this._expansionModel&&this._expansionModel.deselect(this._getExpansionKey(e));}toggleDescendants(e){this.treeControl?this.treeControl.toggleDescendants(e):this._expansionModel&&(this.isExpanded(e)?this.collapseDescendants(e):this.expandDescendants(e));}expandDescendants(e){if(this.treeControl)this.treeControl.expandDescendants(e);else if(this._expansionModel){let i=this._expansionModel;i.select(this._getExpansionKey(e)),this._getDescendants(e).pipe(Ga(1),vo(this._onDestroy)).subscribe(o=>{i.select(...o.map(a=>this._getExpansionKey(a)));});}}collapseDescendants(e){if(this.treeControl)this.treeControl.collapseDescendants(e);else if(this._expansionModel){let i=this._expansionModel;i.deselect(this._getExpansionKey(e)),this._getDescendants(e).pipe(Ga(1),vo(this._onDestroy)).subscribe(o=>{i.deselect(...o.map(a=>this._getExpansionKey(a)));});}}expandAll(){this.treeControl?this.treeControl.expandAll():this._expansionModel&&this._forEachExpansionKey(e=>this._expansionModel?.select(...e));}collapseAll(){this.treeControl?this.treeControl.collapseAll():this._expansionModel&&this._forEachExpansionKey(e=>this._expansionModel?.deselect(...e));}_getLevelAccessor(){return this.treeControl?.getLevel?.bind(this.treeControl)??this.levelAccessor;}_getChildrenAccessor(){return this.treeControl?.getChildren?.bind(this.treeControl)??this.childrenAccessor;}_getDirectChildren(e){let i=this._getLevelAccessor(),o=this._expansionModel??this.treeControl?.expansionModel;if(!o)return Gi([]);let a=this._getExpansionKey(e),r=o.changed.pipe(mr(p=>p.added.includes(a)?Gi(!0):p.removed.includes(a)?Gi(!1):UE),qr(this.isExpanded(e)));if(i)return j_([r,this._flattenedNodes]).pipe(Xo(([p,d])=>p?this._findChildrenByLevel(i,d,e,1):[]));let l=this._getChildrenAccessor();if(l)return l1(l(e)??[]);throw aR();}_findChildrenByLevel(e,i,o,a){let r=this._getExpansionKey(o),l=i.findIndex(h=>this._getExpansionKey(h)===r),p=e(o),d=p+a,f=[];for(let h=l+1;h<i.length;h++){let g=e(i[h]);if(g<=p)break;g<=d&&f.push(i[h]);}return f;}_registerNode(e){this._nodes.value.set(this._getExpansionKey(e.data),e),this._nodes.next(this._nodes.value);}_unregisterNode(e){this._nodes.value.delete(this._getExpansionKey(e.data)),this._nodes.next(this._nodes.value);}_getLevel(e){return this._levels.get(this._getExpansionKey(e));}_getSetSize(e){return this._getAriaSet(e).length;}_getPositionInSet(e){let i=this._getAriaSet(e),o=this._getExpansionKey(e);return i.findIndex(a=>this._getExpansionKey(a)===o)+1;}_getNodeParent(e){let i=this._parents.get(this._getExpansionKey(e.data));return i&&this._nodes.value.get(this._getExpansionKey(i));}_getNodeChildren(e){return this._getDirectChildren(e.data).pipe(Xo(i=>i.reduce((o,a)=>{let r=this._nodes.value.get(this._getExpansionKey(a));return r&&o.push(r),o;},[])));}_sendKeydownToKeyManager(e){if(e.target===this._elementRef.nativeElement)this._keyManager.onKeydown(e);else{let i=this._nodes.getValue();for(let[,o]of i)if(e.target===o._elementRef.nativeElement){this._keyManager.onKeydown(e);break;}}}_getDescendants(e){if(this.treeControl)return Gi(this.treeControl.getDescendants(e));
98if(this.levelAccessor){let i=this._findChildrenByLevel(this.levelAccessor,this._flattenedNodes.value,e,1/0);return Gi(i);}if(this.childrenAccessor)return this._getAllChildrenRecursively(e).pipe(Aw((i,o)=>(i.push(...o),i),[]));throw aR();}_getAllChildrenRecursively(e){return this.childrenAccessor?l1(this.childrenAccessor(e)).pipe(Ga(1),mr(i=>{for(let o of i)this._parents.set(this._getExpansionKey(o),e);return Gi(...i).pipe(Dw(o=>Rw(Gi([o]),this._getAllChildrenRecursively(o))));})):Gi([]);}_getExpansionKey(e){return this.expansionKey?.(e)??e;}_getAriaSet(e){let i=this._getExpansionKey(e),o=this._parents.get(i),a=o?this._getExpansionKey(o):null;return this._ariaSets.get(a)??[e];}_findParentForNode(e,i,o){if(!o.length)return null;let a=this._levels.get(this._getExpansionKey(e))??0;for(let r=i-1;r>=0;r--){let l=o[r];if((this._levels.get(this._getExpansionKey(l))??0)<a)return l;}return null;}_flattenNestedNodesWithExpansion(e,i=0){let o=this._getChildrenAccessor();return o?Gi(...e).pipe(Dw(a=>{let r=this._getExpansionKey(a);this._parents.has(r)||this._parents.set(r,null),this._levels.set(r,i);let l=l1(o(a));return Rw(Gi([a]),l.pipe(Ga(1),Jr(p=>{this._ariaSets.set(r,[...(p??[])]);for(let d of p??[]){let f=this._getExpansionKey(d);this._parents.set(f,a),this._levels.set(f,i+1);}}),mr(p=>p?this._flattenNestedNodesWithExpansion(p,i+1).pipe(Xo(d=>this.isExpanded(a)?d:[])):Gi([]))));}),Aw((a,r)=>(a.push(...r),a),[])):Gi([...e]);}_computeRenderingData(e,i){if(this.childrenAccessor&&i==="flat")return this._clearPreviousCache(),this._ariaSets.set(null,[...e]),this._flattenNestedNodesWithExpansion(e).pipe(Xo(o=>({renderNodes:o,flattenedNodes:o})));if(this.levelAccessor&&i==="nested"){let o=this.levelAccessor;return Gi(e.filter(a=>o(a)===0)).pipe(Xo(a=>({renderNodes:a,flattenedNodes:e})),Jr(({flattenedNodes:a})=>{this._calculateParents(a);}));}else return i==="flat"?Gi({renderNodes:e,flattenedNodes:e}).pipe(Jr(({flattenedNodes:o})=>{this._calculateParents(o);})):(this._clearPreviousCache(),this._ariaSets.set(null,[...e]),this._flattenNestedNodesWithExpansion(e).pipe(Xo(o=>({renderNodes:e,flattenedNodes:o}))));}_updateCachedData(e){this._flattenedNodes.next(e);}_updateKeyManagerItems(e){this._keyManagerNodes.next(e);}_calculateParents(e){let i=this._getLevelAccessor();if(i){this._clearPreviousCache();for(let o=0;o<e.length;o++){let a=e[o],r=this._getExpansionKey(a);this._levels.set(r,i(a));let l=this._findParentForNode(a,o,e);this._parents.set(r,l);let p=l?this._getExpansionKey(l):null,d=this._ariaSets.get(p)??[];d.splice(o,0,a),this._ariaSets.set(p,d);}}}_forEachExpansionKey(e){let i=[],o=[];this._nodes.value.forEach(a=>{i.push(this._getExpansionKey(a.data)),o.push(this._getDescendants(a.data));}),o.length>0?j_(o).pipe(Ga(1),vo(this._onDestroy)).subscribe(a=>{a.forEach(r=>r.forEach(l=>i.push(this._getExpansionKey(l)))),e(i);}):e(i);}_clearPreviousCache(){this._parents.clear(),this._levels.clear(),this._ariaSets.clear();}static ɵfac=function(i){return new(i||n)();};static ɵcmp=Te({type:n,selectors:[["cdk-tree"]],contentQueries:function(i,o,a){if(i&1&&rc(a,PC,5),i&2){let r;qn(r=Jn())&&(o._nodeDefs=r);}},viewQuery:function(i,o){if(i&1&&go(s0,7),i&2){let a;qn(a=Jn())&&(o._nodeOutlet=a.first);}},hostAttrs:["role","tree",1,"cdk-tree"],hostBindings:function(i,o){i&1&&E("keydown",function(r){return o._sendKeydownToKeyManager(r);});},inputs:{dataSource:"dataSource",treeControl:"treeControl",levelAccessor:"levelAccessor",childrenAccessor:"childrenAccessor",trackBy:"trackBy",expansionKey:"expansionKey"},exportAs:["cdkTree"],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(i,o){i&1&&Ma(0,0);},dependencies:[s0],encapsulation:2});}return n;})(),Id=(()=>{class n{_elementRef=re(qa);_tree=re(wC);_tabindex=-1;_type="flat";get role(){return"treeitem";}set role(e){}get isExpandable(){return this._isExpandable();}set isExpandable(e){this._inputIsExpandable=e,!(this.data&&!this._isExpandable||!this._inputIsExpandable)&&(this._inputIsExpanded?this.expand():this._inputIsExpanded===!1&&this.collapse());}get isExpanded(){return this._tree.isExpanded(this._data);}set isExpanded(e){this._inputIsExpanded=e,e?this.expand():this.collapse();}isDisabled=!1;typeaheadLabel=null;getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||"";}activation=new At();expandedChange=new At();static mostRecentTreeNode=null;_destroyed=new oa();_dataChanges=new oa();_inputIsExpandable=!1;_inputIsExpanded=void 0;_shouldFocus=!0;_parentNodeAriaLevel;get data(){return this._data;}set data(e){e!==this._data&&(this._data=e,this._dataChanges.next());}_data;
98get isLeafNode(){return this._tree.treeControl?.isExpandable!==void 0&&!this._tree.treeControl.isExpandable(this._data)?!0:this._tree.treeControl?.isExpandable===void 0&&this._tree.treeControl?.getDescendants(this._data).length===0;}get level(){return this._tree._getLevel(this._data)??this._parentNodeAriaLevel;}_isExpandable(){return this._tree.treeControl?!this.isLeafNode:this._inputIsExpandable;}_getAriaExpanded(){return this._isExpandable()?String(this.isExpanded):null;}_getSetSize(){return this._tree._getSetSize(this._data);}_getPositionInSet(){return this._tree._getPositionInSet(this._data);}_changeDetectorRef=re(Pa);constructor(){n.mostRecentTreeNode=this;}ngOnInit(){this._parentNodeAriaLevel=hV(this._elementRef.nativeElement),this._tree._getExpansionModel().changed.pipe(Xo(()=>this.isExpanded),td(),vo(this._destroyed)).pipe(vo(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._tree._setNodeTypeIfUnset(this._type),this._tree._registerNode(this);}ngOnDestroy(){n.mostRecentTreeNode===this&&(n.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete();}getParent(){return this._tree._getNodeParent(this)??null;}getChildren(){return this._tree._getNodeChildren(this);}focus(){this._tabindex=0,this._shouldFocus&&this._elementRef.nativeElement.focus(),this._changeDetectorRef.markForCheck();}unfocus(){this._tabindex=-1,this._changeDetectorRef.markForCheck();}activate(){this.isDisabled||this.activation.next(this._data);}collapse(){this.isExpandable&&this._tree.collapse(this._data);}expand(){this.isExpandable&&this._tree.expand(this._data);}makeFocusable(){this._tabindex=0,this._changeDetectorRef.markForCheck();}_focusItem(){this.isDisabled||this._tree._keyManager.focusItem(this);}_setActiveItem(){this.isDisabled||(this._shouldFocus=!1,this._tree._keyManager.focusItem(this),this._shouldFocus=!0);}_emitExpansionState(e){this.expandedChange.emit(e);}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["cdk-tree-node"]],hostAttrs:["role","treeitem",1,"cdk-tree-node"],hostVars:5,hostBindings:function(i,o){i&1&&E("click",function(){return o._setActiveItem();})("focus",function(){return o._focusItem();}),i&2&&(Cl("tabIndex",o._tabindex),Yo("aria-expanded",o._getAriaExpanded())("aria-level",o.level+1)("aria-posinset",o._getPositionInSet())("aria-setsize",o._getSetSize()));},inputs:{role:"role",isExpandable:[2,"isExpandable","isExpandable",Yi],isExpanded:"isExpanded",isDisabled:[2,"isDisabled","isDisabled",Yi],typeaheadLabel:[0,"cdkTreeNodeTypeaheadLabel","typeaheadLabel"]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["cdkTreeNode"]});}return n;})();function hV(n){let t=n.parentElement;for(;t&&!_V(t);)t=t.parentElement;return t?t.classList.contains("cdk-nested-tree-node")?Yr(t.getAttribute("aria-level")):0:-1;}function _V(n){let t=n.classList;return!!(t?.contains("cdk-nested-tree-node")||t?.contains("cdk-tree"));}var ES=(()=>{class n extends Id{_type="nested";_differs=re(Lw);_dataDiffer;_children;nodeOutlet;constructor(){super();}ngAfterContentInit(){this._dataDiffer=this._differs.find([]).create(this._tree.trackBy),this._tree._getDirectChildren(this.data).pipe(vo(this._destroyed)).subscribe(e=>this.updateChildrenNodes(e)),this.nodeOutlet.changes.pipe(vo(this._destroyed)).subscribe(()=>this.updateChildrenNodes());}ngOnDestroy(){this._clear(),super.ngOnDestroy();}updateChildrenNodes(e){let i=this._getNodeOutlet();if(e&&(this._children=e),i&&this._children){let o=i.viewContainer;this._tree.renderNodeChanges(this._children,this._dataDiffer,o,this._data);}else this._dataDiffer.diff([]);}_clear(){let e=this._getNodeOutlet();e&&(e.viewContainer.clear(),this._dataDiffer.diff([]));}_getNodeOutlet(){let e=this.nodeOutlet;return e&&e.find(i=>!i._node||i._node===this);}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["cdk-nested-tree-node"]],contentQueries:function(i,o,a){if(i&1&&rc(a,s0,5),i&2){let r;qn(r=Jn())&&(o.nodeOutlet=r);}},hostAttrs:[1,"cdk-nested-tree-node"],exportAs:["cdkNestedTreeNode"],features:[aa([{provide:Id,useExisting:n},{provide:l0,useExisting:n}]),Ja]});}return n;})();var rR=(()=>{class n{static ɵfac=function(i){return new(i||n)();};static ɵmod=sr({type:n});static ɵinj=ar({});}return n;})();function gV(n){return!!n._isNoopTreeKeyManager;}var Nf=(()=>{class n extends Id{get tabIndexInputBinding(){return this._tabIndexInputBinding;}set tabIndexInputBinding(e){this._tabIndexInputBinding=e;}_tabIndexInputBinding;defaultTabIndex=0;_getTabindexAttribute(){return gV(this._tree._keyManager)?this.tabIndexInputBinding:this._tabindex;}get disabled(){return this.isDisabled;}set disabled(e){this.isDisabled=e;}constructor(){super();let e=re(new gT("tabindex"),{optional:!0});this.tabIndexInputBinding=Number(e)||this.defaultTabIndex;}ngOnInit(){super.ngOnInit();}ngOnDestroy(){super.ngOnDestroy();}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],hostVars:5,hostBindings:function(i,o){i&1&&E("click",function(){return o._focusItem();}),i&2&&(Cl("tabIndex",o._getTabindexAttribute()),Yo("aria-expanded",o._getAriaExpanded())("aria-level",o.level+1)("aria-posinset",o._getPositionInSet())("aria-setsize",o._getSetSize()));},inputs:{tabIndexInputBinding:[2,"tabIndex","tabIndexInputBinding",e=>e==null?0:Yr(e)],disabled:[2,"disabled","disabled",Yi]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["matTreeNode"],features:[aa([{provide:Id,useExisting:n}]),Ja]});}return n;})(),Af=(()=>{class n extends PC{data;static ɵfac=(()=>{let e;return function(o){return(e||(e=nc(n)))(o||n);};})();static ɵdir=bo({type:n,selectors:[["","matTreeNodeDef",""]],inputs:{when:[0,"matTreeNodeDefWhen","when"],data:[0,"matTreeNode","data"]},features:[aa([{provide:PC,useExisting:n}]),Ja]});}return n;})(),Df=(()=>
98{class n extends ES{node;get disabled(){return this.isDisabled;}set disabled(e){this.isDisabled=e;}get tabIndex(){return this.isDisabled?-1:this._tabIndex;}set tabIndex(e){this._tabIndex=e;}_tabIndex;ngOnInit(){super.ngOnInit();}ngAfterContentInit(){super.ngAfterContentInit();}ngOnDestroy(){super.ngOnDestroy();}static ɵfac=(()=>{let e;return function(o){return(e||(e=nc(n)))(o||n);};})();static ɵdir=bo({type:n,selectors:[["mat-nested-tree-node"]],hostAttrs:[1,"mat-nested-tree-node"],inputs:{node:[0,"matNestedTreeNode","node"],disabled:[2,"disabled","disabled",Yi],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Yr(e)]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["matNestedTreeNode"],features:[aa([{provide:ES,useExisting:n},{provide:Id,useExisting:n},{provide:l0,useExisting:n}]),Ja]});}return n;})();var kd=(()=>{class n{viewContainer=re(oc);_node=re(l0,{optional:!0});static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","matTreeNodeOutlet",""]],features:[aa([{provide:s0,useExisting:n}])]});}return n;})(),jf=(()=>{class n extends wC{_nodeOutlet=void 0;static ɵfac=(()=>{let e;return function(o){return(e||(e=nc(n)))(o||n);};})();static ɵcmp=Te({type:n,selectors:[["mat-tree"]],viewQuery:function(i,o){if(i&1&&go(kd,7),i&2){let a;qn(a=Jn())&&(o._nodeOutlet=a.first);}},hostAttrs:[1,"mat-tree"],exportAs:["matTree"],features:[aa([{provide:wC,useExisting:n}]),Ja],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(i,o){i&1&&Ma(0,0);},dependencies:[kd],styles:[`.mat-tree { 99 display: block; 100 background-color: var(--mat-tree-container-background-color, var(--mat-sys-surface)); 101} 102 103.mat-tree-node, 104.mat-nested-tree-node { 105 color: var(--mat-tree-node-text-color, var(--mat-sys-on-surface)); 106 font-family: var(--mat-tree-node-text-font, var(--mat-sys-body-large-font)); 107 font-size: var(--mat-tree-node-text-size, var(--mat-sys-body-large-size)); 108 font-weight: var(--mat-tree-node-text-weight, var(--mat-sys-body-large-weight)); 109} 110 111.mat-tree-node { 112 display: flex; 113 align-items: center; 114 flex: 1; 115 word-wrap: break-word; 116 min-height: var(--mat-tree-node-min-height, 48px); 117} 118 119.mat-nested-tree-node { 120 border-bottom-width: 0; 121} 122`],encapsulation:2});}return n;})();var Lf=(()=>{class n{static ɵfac=function(i){return new(i||n)();};static ɵmod=sr({type:n});static ɵinj=ar({imports:[rR,cd]});}return n;})();var Rd=class extends n3{get data(){return this._data.value;}set data(t){this._data.next(t);}_data=new Ic([]);connect(t){return Va(t.viewChange,this._data).pipe(Xo(()=>this.data));}disconnect(){}};var dR=["*"],xV=(n,t,e,i,o,a)=>({areaBefore:n,areaAfter:t,gutterNum:e,first:i,last:o,isDragged:a});function CV(n,t){n&1&&Ma(0);}function vV(n,t){if(n&1&&(fi(0),Zt(1,CV,1,0,"ng-container",5),hi()),n&2){let e=t.$implicit,i=x(3),o=i.$implicit,a=i.$index,r=i.$index,l=x();m(),N("ngTemplateOutlet",l.customGutter().template)("ngTemplateOutletContext",fT(3,xV,o,l._areas()[a+1],a+1,r===0,a===l._areas().length-2,l.draggedGutterIndex()===a))("ngTemplateOutletInjector",e);}}function bV(n,t){if(n&1&&Zt(0,vV,2,10,"ng-container",4),n&2){let e=x(2).$index;N("asSplitGutterDynamicInjector",e+1);}}function yV(n,t){n&1&&ee(0,"div",3);}function PV(n,t){if(n&1){let e=oe();s(0,"div",2,0),E("asSplitCustomClick",function(){k(e);let o=x().$index,a=x();return R(a.gutterClicked(o));})("asSplitCustomDblClick",function(){k(e);let o=x().$index,a=x();return R(a.gutterDoubleClicked(o));})("asSplitCustomMouseDown",function(o){k(e);let a=bn(1),r=x().$index,l=x();return R(l.gutterMouseDown(o,a,r,r,r+1));})("asSplitCustomKeyDown",function(o){k(e);let a=x().$index,r=x();return R(r.gutterKeyDown(o,a,a,a+1));}),S(2,bV,1,1,"ng-container")(3,yV,1,0,"div",3),c();}if(n&2){let e,i=x(),o=i.$implicit,a=i.$index,r=x();Ue("as-dragged",r.draggedGutterIndex()===a),N("ngStyle",r.getGutterGridStyle(a+1))("asSplitCustomMultiClickThreshold",r.gutterDblClickDuration())("asSplitCustomClickDeltaInPx",r.gutterClickDeltaPx()),Yo("aria-label",r.gutterAriaLabel())("aria-orientation",r.direction())("aria-valuemin",r.getAriaValue(o.minSize()))("aria-valuemax",r.getAriaValue(o.maxSize()))("aria-valuenow",r.getAriaValue(o._internalSize()))("aria-valuetext",r.getAriaAreaSizeText(o)),m(2),M((e=r.customGutter())!=null&&e.template?2:3);}}function wV(n,t){if(n&1&&S(0,PV,4,12,"div",1),n&2){let e=t.$index,i=t.$count;M(e!==i-1?0:-1);}}function SV(n,t){n&1&&Ur(0,"div",0);}var MV={dir:"ltr",direction:"horizontal",disabled:!1,gutterDblClickDuration:0,gutterSize:11,gutterStep:1,gutterClickDeltaPx:2,restrictMove:!1,unit:"percent",useTransition:!1},OV=new qi("angular-split-global-config",{providedIn:"root",factory:()=>MV});var sR=(()=>{class n{constructor(){this.template=re(hp),this._gutterToHandleElementMap=new Map(),this._gutterToExcludeDragElementMap=new Map();}_canStartDragging(e,i){return this._gutterToExcludeDragElementMap.has(i)&&this._gutterToExcludeDragElementMap.get(i).some(a=>a.nativeElement.contains(e))?!1:this._gutterToHandleElementMap.has(i)?this._gutterToHandleElementMap.get(i).some(o=>o.nativeElement.contains(e)):!0;}_addToMap(e,i,o){e.has(i)?e.get(i).push(o):e.set(i,[o]);}_removedFromMap(e,i,o){let a=e.get(i);a.splice(a.indexOf(o),1),a.length===0&&e.delete(i);}static ngTemplateContextGuard(e,i){return!0;}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵdir=bo({type:n,selectors:[["","asSplitGutter",""]]});}}return n;})(),EV=new qi("Gutter num");var TV=(()=>{class n{constructor(){this.vcr=re(oc),this.templateRef=re(hp),this.gutterNum=Un.required({alias:"asSplitGutterDynamicInjector"}),kc(()=>{this.vcr.clear();let e=Hr.create({providers:[{provide:EV,useValue:this.gutterNum()}],parent:this.vcr.injector});this.vcr.createEmbeddedView(this.templateRef,{$implicit:e});});}static ngTemplateContextGuard(e,i){return!0;}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵdir=bo({type:n,selectors:[["","asSplitGutterDynamicInjector",""]],inputs:{gutterNum:[1,"asSplitGutterDynamicInjector","gutterNum"]}});}}
122return n;})();function c0(n){if((e=>window.TouchEvent&&n instanceof TouchEvent)(n)){if(n.changedTouches.length===0)return;let{clientX:e,clientY:i}=n.changedTouches[0];return{x:e,y:i};}if(n instanceof KeyboardEvent){let e=n.target;return{x:e.offsetLeft+e.offsetWidth/2,y:e.offsetTop+e.offsetHeight/2};}return{x:n.clientX,y:n.clientY};}function mR(n,t,e,i){if(!i.contains(n.target)||!i.contains(t.target))return!1;let o=c0(n),a=c0(t);return Math.abs(a.x-o.x)<=e&&Math.abs(a.y-o.y)<=e;}function lR(n){return Va(ba(n,"mousedown").pipe(ms(t=>t.button===0)),ba(n,"touchstart",{passive:!1}));}function IS(n){return Va(ba(n,"mousemove"),ba(n,"touchmove"));}function MC(n,t=!1){let e=Va(ba(n,"mouseup"),ba(n,"touchend"));return t?Va(e,ba(n,"touchcancel")):e;}function kS(n,t){return n.reduce((e,i)=>e+t(i),0);}function IV(n,t){return n.reduce((e,i,o)=>{let[a,r]=t(i,o);return e[a]=r,e;},{});}function uR(n){return Object.entries(n).filter(([,t])=>t).map(([t])=>t).join(" ");}function RS(){return n=>new Lo(t=>re(ya).runOutsideAngular(()=>n.subscribe(t)));}var SC=n=>t=>Yr(t,n),kV=(n,t)=>{throw new Error(`as-split: unknown value "${n}" for "${t}"`);},RV=(()=>{class n{constructor(){this.elementRef=re(qa),this.document=re(Bm),this.multiClickThreshold=Un.required({alias:"asSplitCustomMultiClickThreshold"}),this.deltaInPx=Un.required({alias:"asSplitCustomClickDeltaInPx"}),this.mouseDown=Rc({alias:"asSplitCustomMouseDown"}),this.click=Rc({alias:"asSplitCustomClick"}),this.dblClick=Rc({alias:"asSplitCustomDblClick"}),this.keyDown=Rc({alias:"asSplitCustomKeyDown"}),ba(this.elementRef.nativeElement,"keydown").pipe(RS(),Pp()).subscribe(i=>this.keyDown.emit(i));let e=lR(this.elementRef.nativeElement).pipe(mr(i=>IS(this.document).pipe(ms(o=>!mR(i,o,this.deltaInPx(),this.elementRef.nativeElement)),Ga(1),Xo(()=>!0),vo(MC(this.document)))));lR(this.elementRef.nativeElement).pipe(Jr(i=>this.mouseDown.emit(i)),jw(),eT((i,{interval:o})=>o>=this.multiClickThreshold()?1:i+1,0),mr(i=>MC(this.elementRef.nativeElement).pipe(jw(),Ga(1),i===2?Xo(()=>i):zm(({interval:o})=>o>=this.multiClickThreshold()?Gi(i):Gi(i).pipe(Xx(this.multiClickThreshold()-o))))),vo(e),QE(),RS(),Pp()).subscribe(i=>{i===1?this.click.emit():i===2&&this.dblClick.emit();});}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵdir=bo({type:n,selectors:[["","asSplitCustomEventsBehavior",""]],inputs:{multiClickThreshold:[1,"asSplitCustomMultiClickThreshold","multiClickThreshold"],deltaInPx:[1,"asSplitCustomClickDeltaInPx","deltaInPx"]},outputs:{mouseDown:"asSplitCustomMouseDown",click:"asSplitCustomClick",dblClick:"asSplitCustomDblClick",keyDown:"asSplitCustomKeyDown"}});}}return n;})();function cR(n,t,e){if(n.length===0)return!0;let i=n.map(r=>{let l=r.size();return l==="auto"?"*":l;}),o=i.filter(r=>r==="*");if(o.length>1)return e&&console.warn("as-split: Maximum one * area is allowed"),!1;if(t==="pixel")return o.length===1?!0:(e&&console.warn("as-split: Pixel mode must have exactly one * area"),!1);let a=kS(i,r=>r==="*"?0:r);return o.length===1?a<=100.1?!0:(e&&console.warn("as-split: Percent areas must total 100%"),!1):a<99.9||a>100.1?(e&&console.warn("as-split: Percent areas must total 100%"),!1):!0;}var NS=new qi("Split Area Contract"),cr=(()=>{class n{get hostClassesBinding(){return this.hostClasses();}get hostDirBinding(){return this.dir();}constructor(){this.document=re(Bm),this.elementRef=re(qa),this.ngZone=re(ya),this.defaultOptions=re(OV),this.gutterMouseDownSubject=new oa(),this.dragProgressSubject=ne
122w oa(),this._areas=CT(NS),this.customGutter=xT(sR),this.gutterSize=Un(this.defaultOptions.gutterSize,{transform:SC(this.defaultOptions.gutterSize)}),this.gutterStep=Un(this.defaultOptions.gutterStep,{transform:SC(this.defaultOptions.gutterStep)}),this.disabled=Un(this.defaultOptions.disabled,{transform:Yi}),this.gutterClickDeltaPx=Un(this.defaultOptions.gutterClickDeltaPx,{transform:SC(this.defaultOptions.gutterClickDeltaPx)}),this.direction=Un(this.defaultOptions.direction),this.dir=Un(this.defaultOptions.dir),this.unit=Un(this.defaultOptions.unit),this.gutterAriaLabel=Un(),this.restrictMove=Un(this.defaultOptions.restrictMove,{transform:Yi}),this.useTransition=Un(this.defaultOptions.useTransition,{transform:Yi}),this.gutterDblClickDuration=Un(this.defaultOptions.gutterDblClickDuration,{transform:SC(this.defaultOptions.gutterDblClickDuration)}),this.gutterClick=Rc(),this.gutterDblClick=Rc(),this.dragStart=Rc(),this.dragEnd=Rc(),this.transitionEnd=Rc(),this.dragProgress$=this.dragProgressSubject.asObservable(),this._visibleAreas=Ha(()=>this._areas().filter(e=>e.visible())),this.gridTemplateColumnsStyle=Ha(()=>this.createGridTemplateColumnsStyle()),this.hostClasses=Ha(()=>uR({[`as-${this.direction()}`]:!0,[`as-${this.unit()}`]:!0,"as-disabled":this.disabled(),"as-dragging":this._isDragging(),"as-transition":this.useTransition()&&!this._isDragging()})),this.draggedGutterIndex=tc(void 0),this._isDragging=Ha(()=>this.draggedGutterIndex()!==void 0),this._alignedVisibleAreasSizes=Ha(()=>this.createAlignedVisibleAreasSize()),Vm()&&$_({read:()=>{this.unit()==="percent"&&this._visibleAreas().every(e=>e.size()==="auto")||cR(this._visibleAreas(),this.unit(),!0);}}),$_({write:()=>{this.elementRef.nativeElement.style.gridTemplate=this.gridTemplateColumnsStyle();}}),this.gutterMouseDownSubject.pipe(ms(e=>!this.customGutter()||this.customGutter()._canStartDragging(e.mouseDownEvent.target,e.gutterIndex+1)),mr(e=>IS(this.document).pipe(qr(e.mouseDownEvent),ZE(),Kx(([,i])=>mR(e.mouseDownEvent,i,this.gutterClickDeltaPx(),e.gutterElement)),Ga(1),vo(Va(MC(this.document,!0),ba(this.document,"blur"))),Jr(()=>{this.ngZone.run(()=>{this.dragStart.emit(this.createDragInteractionEvent(e.gutterIndex)),this.draggedGutterIndex.set(e.gutterIndex);});}),Xo(([i])=>this.createDragStartContext(i,e.areaBeforeGutterIndex,e.areaAfterGutterIndex)),mr(i=>IS(this.document).pipe(Jr(o=>this.mouseDragMove(o,i)),vo(MC(this.document,!0)),Jr({complete:()=>this.ngZone.run(()=>{this.dragEnd.emit(this.createDragInteractionEvent(this.draggedGutterIndex())),this.draggedGutterIndex.set(void 0);})}))))),Pp()).subscribe(),ba(this.elementRef.nativeElement,"transitionend").pipe(ms(e=>e.propertyName.startsWith("grid-template")),RS(),Pp()).subscribe(()=>this.ngZone.run(()=>this.transitionEnd.emit(this.createAreaSizes())));}gutterClicked(e){this.ngZone.run(()=>this.gutterClick.emit(this.createDragInteractionEvent(e)));}gutterDoubleClicked(e){this.ngZone.run(()=>this.gutterDblClick.emit(this.createDragInteractionEvent(e)));}gutterMouseDown(e,i,o,a,r){e.preventDefault(),e.stopPropagation(),!this.disabled()&&this.gutterMouseDownSubject.next({mouseDownEvent:e,gutterElement:i,gutterIndex:o,areaBeforeGutterIndex:a,areaAfterGutterIndex:r});}gutterKeyDown(e,i,o,a){if(this.disabled())return;let r=50,l=10,p=0,d=0;if(this.direction()==="horizontal")switch(e.key){case"ArrowLeft":p-=r;break;case"ArrowRight":p+=r;break;case"PageUp":this.dir()==="rtl"?p-=r*l:p+=r*l;break;case"PageDown":this.dir()==="rtl"?p+=r*l:p-=r*l;break;default:return;}else switch(e.key){case"ArrowUp":d-=r;break;case"ArrowDown":d+=r;break;case"PageUp":d-=r*l;break;case"PageDown":d+=r*l;break;default:return;}e.preventDefault(),e.stopPropagation();let f=c0(e),h=this.createDragStartContext(e,o,a);this.ngZone.run(()=>{this.dragStart.emit(this.createDragInteractionEvent(i)),this.draggedGutterIndex.set(i);}),this.dragMoveToPoint({x:f.x+p,y:f.y+d},h),this.ngZone.run(()=>{this.dragEnd.emit(this.createDragInteractionEvent(i)),this.draggedGutterIndex.set(void 0);});}getGutterGridStyle(e){let i=e*2,o=`${i} / ${i}`;return{"grid-column":this.direction()==="horizontal"?o:"1","grid-row":this.direction()==="vertical"?o:"1"};}getAriaAreaSizeText(e){let i=e._internalSize();if(i!=="*")return`${i.toFixed(0)} ${this.unit()}`;}getAriaValue(e){return e==="*"?void 0:e;}createDragInteractionEvent(e){return{gutterNum:e+1,sizes:this.createAreaSizes()};}createAreaSizes(){return this._visibleAreas().map(e=>e._internalSize());}createDragStartContext(e,i,o){let a=this.elementRef.nativeElement.getBoundingClientRect(),l=(this.direction()==="horizontal"?a.width:a.height)-(this._visibleAreas().length-1)*this.gutterSize(),p=this._areas().map(h=>{if(this.unit()==="pixel")return h._internalSize();{let g=h._internalSize();return g==="*"?g:g/100*l;}}),d=Math.max(0,l-kS(p,h=>
122h==="*"?0:h)),f=p.map(h=>h==="*"?d:h);return{startEvent:e,areaBeforeGutterIndex:i,areaAfterGutterIndex:o,areasPixelSizes:f,totalAreasPixelSize:l,areaIndexToBoundaries:IV(this._areas(),(h,g)=>{let b=T=>T/100*l,w=this.unit()==="pixel"?{min:h._normalizedMinSize(),max:h._normalizedMaxSize()}:{min:b(h._normalizedMinSize()),max:b(h._normalizedMaxSize())};return[g.toString(),w];})};}mouseDragMove(e,i){e.preventDefault(),e.stopPropagation();let o=c0(e);this.dragMoveToPoint(o,i);}dragMoveToPoint(e,i){let o=c0(i.startEvent),a=this.direction()==="horizontal"?e.x-o.x:e.y-o.y,r=this.direction()==="horizontal"&&this.dir()==="rtl"?-a:a,l=r>0,p=Math.abs(Math.round(r/this.gutterStep())*this.gutterStep()),d=[...i.areasPixelSizes],f=d.map((j,L)=>L),h=this.restrictMove()?[i.areaBeforeGutterIndex]:f.slice(0,i.areaBeforeGutterIndex+1).filter(j=>this._areas()[j].visible()).reverse(),g=this.restrictMove()?[i.areaAfterGutterIndex]:f.slice(i.areaAfterGutterIndex).filter(j=>this._areas()[j].visible()),b=l?g:h,w=l?h:g,T=p,O=0,V=0;for(;T!==0&&O<b.length&&V<w.length;){let j=b[O],L=w[V],A=d[j],J=d[L],Q=i.areaIndexToBoundaries[j].min,te=i.areaIndexToBoundaries[L].max,U=A-Q,ce=te-J,W=Math.min(U,ce,T);d[j]-=W,d[L]+=W,T-=W,d[j]===Q&&O++,d[L]===te&&V++;}this._areas().forEach((j,L)=>{if(j._internalSize()!=="*")if(this.unit()==="pixel")j._internalSize.set(d[L]);else{let A=d[L]/i.totalAreasPixelSize*100;j._internalSize.set(parseFloat(A.toFixed(10)));}}),this.dragProgressSubject.next(this.createDragInteractionEvent(this.draggedGutterIndex()));}createGridTemplateColumnsStyle(){let e=[],i=kS(this._visibleAreas(),r=>{let l=r._internalSize();return l==="*"?0:l;}),o=this._visibleAreas().length,a=0;return this._areas().forEach((r,l,p)=>{let d=this.unit(),f=r._internalSize();if(!r.visible())e.push(d==="percent"||f==="*"?"0fr":"0px");else{if(d==="pixel"){let b=f==="*"?"1fr":`${f}px`;e.push(b);}else{let w=`${f==="*"?100-i:f}fr`;e.push(w);}a++;}if(l===p.length-1)return;let g=o-a;r.visible()&&g>0?e.push(`${this.gutterSize()}px`):e.push("0px");}),this.direction()==="horizontal"?`1fr / ${e.join(" ")}`:`${e.join(" ")} / 1fr`;}createAlignedVisibleAreasSize(){let e=this._visibleAreas().map(a=>{let r=a.size();return r==="auto"?"*":r;});if(cR(this._visibleAreas(),this.unit(),!1))return e;let o=this.unit();if(o==="percent"){let a=100/e.length;return e.map(()=>a);}if(o==="pixel"){if(e.filter(r=>r==="*").length===0)return["*",...e.slice(1)];{let r=e.findIndex(p=>p==="*"),l=100;return e.map((p,d)=>d===r||p!=="*"?p:l);}}return kV(o,"SplitUnit");}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵcmp=Te({type:n,selectors:[["as-split"]],contentQueries:function(i,o,a){i&1&&pT(a,o._areas,NS,4)(a,o.customGutter,sR,5),i&2&&dT(2);},hostVars:3,hostBindings:function(i,o){i&2&&(Cl("dir",o.hostDirBinding),ji(o.hostClassesBinding));},inputs:{gutterSize:[1,"gutterSize"],gutterStep:[1,"gutterStep"],disabled:[1,"disabled"],gutterClickDeltaPx:[1,"gutterClickDeltaPx"],direction:[1,"direction"],dir:[1,"dir"],unit:[1,"unit"],gutterAriaLabel:[1,"gutterAriaLabel"],restrictMove:[1,"restrictMove"],useTransition:[1,"useTransition"],gutterDblClickDuration:[1,"gutterDblClickDuration"]},outputs:{gutterClick:"gutterClick",gutterDblClick:"gutterDblClick",dragStart:"dragStart",dragEnd:"dragEnd",transitionEnd:"transitionEnd"},exportAs:["asSplit"],ngContentSelectors:dR,decls:3,vars:0,consts:[["gutter",""],["role","separator","tabindex","0","asSplitCustomEventsBehavior","",1,"as-split-gutter",3,"ngStyle","as-dragged","asSplitCustomMultiClickThreshold","asSplitCustomClickDeltaInPx"],["role","separator","tabindex","0","asSplitCustomEventsBehavior","",1,"as-split-gutter",3,"asSplitCustomClick","asSplitCustomDblClick","asSplitCustomMouseDown","asSplitCustomKeyDown","ngStyle","asSplitCustomMultiClickThreshold","asSplitCustomClickDeltaInPx"],[1,"as-split-gutter-icon"],[4,"asSplitGutterDynamicInjector"],[4,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"]],template:function(i,o){i&1&&(vl(),As(0),be(1,wV,1,1,null,null,Pt)),i&2&&(m(),ye(o._areas()));},dependencies:[PT,RV,TV,ad],styles:['@property --as-gutter-background-color{syntax: "<color>"; inherits: true; initial-value: #eeeeee;}@property --as-gutter-icon-horizontal{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);}@property --as-gutter-icon-vertical{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC);}@property --as-gutter-icon-disabled{syntax: "<url>"; inherits: true; initial-value: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);}@property --as-transition-duration{syntax: "<time>"; inherits: true; initial-value: .3s;}@property --as-gutter-disabled-cursor{syntax: "*"; inherits: true; initial-value: default;}[_nghost-%COMP%]{--_as-gutter-background-color: var(--as-gutter-background-color, #eeeeee);--_as-gutter-icon-horizontal: var( --as-gutter-icon-horizontal, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) );--_as-gutter-icon-vertical: var( --as-gutter-icon-vertical, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC) );--_as-gutter-icon-disabled: var( --as-gutter-icon-disabled, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==) );--_as-transition-duration: var(--as-transition-duration, .3s);--_as-gutter-disabled-cursor: var(--as-gutter-disabled-cursor, default)}[_nghost-%COMP%]{display:grid;overflow:hidden;height:100%;width:100%}.as-transition[_nghost-%COMP%]{transition:grid-template var(--_as-transition-duration)}.as-split-gutter[_ngcontent-%COMP%]{background-color:var(--_as-gutter-background-color);display:flex;align-items:center;justify-content:center;touch-action:none}.as-horizontal[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:col-resize;height:100%}.as-vertical[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:row-resize;width:100%}.as-disabled[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%]{cursor:var(--_as-gutter-disabled-cursor)}.as-split-gutter-icon[_ngcontent-%COMP%]{width:100%;height:100%;background-position:center center;background-repeat:no-repeat}.as-horizontal[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-horizontal)}.as-vertical[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-vertical)}.as-disabled[_nghost-%COMP%] > .as-split-gutter[_ngcontent-%COMP%] > .as-split-gutter-icon[_ngcontent-%COMP%]{background-image:var(--_as-gutter-icon-disabled)}'],changeDetection:0});}}return n;})(),fR=n=>n==null||n==="*"?"*":+n,NV=n=>fR(n),pR=n=>fR(n),Cr=(()=>{class n{constructor(){this.split=re(cr),this.size=Un("auto",{transform:NV}),this.minSize=Un("*",{transform:pR}),this.maxSize=Un("*",{transform:pR}),this.lockSize=Un(!1,{transform:Yi}),this.visible=Un(!0,{transform:Yi}),this._internalSize=_T(()=>{if(!this.visible())return 0;let e=this.split._visibleAreas().findIndex(i=>i===this);return this.split._alignedVisibleAreasSizes()[e];}),this._normalizedMinSize=Ha(()=>this.normalizeMinSize()),this._normalizedMaxSize=Ha(()=>this.normalizeMaxSize()),this.index=Ha(()=>this.split._areas().findIndex(e=>e===this)),this.gridAreaNum=Ha(()=>this.index()*2+1),this.hostClasses=Ha(()=>uR({"as-split-area":!0,"as-min":this.visible()&&this._internalSize()===this._normalizedMinSize(),"as-max":this.visible()&&this._internalSize()===this._normalizedMaxSize(),"as-hidden":!this.visible()}));}get hostClassesBinding(){return this.hostClasses();}get hostGridColumnStyleBinding(){return this.split.direction()==="horizontal"?`${this.gridAreaNum()} / ${this.gridAreaNum()}`:void 0;}get hostGridRowStyleBinding(){return this.split.direction()==="vertical"?`${this.gridAreaNum()} / ${this.gridAreaNum()}`:void 0;}get hostPositionStyleBinding(){return this.split._isDragging()?"relative":void 0;}normalizeMinSize(){if(!this.visible())return 0;let i=this.normalizeSizeBoundary(this.minSize,0),o=this.size();return o!=="*"&&o!=="auto"&&o<i?(Vm()&&console.warn("as-split: size cannot be smaller than minSize"),0):i;}normalizeMaxSize(){if(!this.visible())return 1/0;let i=this.normalizeSizeBoundary(this.maxSize,1/0),o=this.size();return o!=="*"&&o!=="auto"&&o>i?(Vm()&&console.warn("as-split: size cannot be larger than maxSize"),1/0):i;}normalizeSizeBoundary(e,i){let o=this.size(),a=this.lockSize(),r=e();return a?(Vm()&&r!=="*"&&console.warn("as-split: lockSize overwrites maxSize/minSize"),o==="*"||o==="auto"?(Vm()&&console.warn("as-split: lockSize isn't supported on area with * size or without size"),i):o):r==="*"?i:o==="*"||o==="auto"?(Vm()&&console.warn("as-split: maxSize/minSize not allowed on * or without size"),i):r;}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵcmp=Te({type:n,selectors:[["as-split-area"]],hostVars:8,hostBindings:function(i,o){i&2&&(ji(o.hostClassesBinding),Ci("grid-column",o.hostGridColumnStyleBinding)("grid-row",o.hostGridRowStyleBinding)("position",o.hostPositionStyleBinding));},inputs:{size:[1,"size"],minSize:[1,"minSize"],maxSize:[1,"maxSize"],lockSize:[1,"lockSize"],visible:[1,"visible"]},exportAs:["asSplitArea"],features:[aa([{provide:NS,useExisting:n}])],ngContentSelectors:dR,decls:2,vars:1,consts:[[1,"as-iframe-fix"]],template:function(i,o){i&1&&(vl(),As(0),S(1,SV,1,0,"div",0)),i&2&&(m(),M(o.split._isDragging()?1:-1));},styles:["[_nghost-%COMP%]{overflow-x:hidden;overflow-y:auto}.as-horizontal > [_nghost-%COMP%]{height:100%}.as-vertical > [_nghost-%COMP%]{width:100%}.as-iframe-fix[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}"],changeDetection:0});}}return n;})(),vr=(()=>{class n{static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵmod=sr({type:n});}static{this.ɵinj=ar({});}}return n;})();var zf=class n{firestore=re(ai);collectionName="businessCapabilities";getCapabilitiesByModel(t){return new Lo(e=>{let i=we(this.firestore,this.collectionName),o=mt(i,Ro("businessCapabilityModelId","==",t),Jt("level"),Jt("name"));return Bn(o,r=>{let l=r.docs.map(p=>X({id:p.id},p.data()));e.next(l);},r=>{console.error("Error getting business capabilities:",r),e.error(r);});});}getCapability(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t),i=yield yt(e);return i.exists()?X({id:i.id},i.data()):null;}catch(e){throw console.error("Error getting business capability:",e),e;}});}createCapability(t){return $(this,null,function*(){try{let e=we(this.firestore,this.collectionName);return(yield Ht(e,Ve(X({},t),{creationDate:xo(),active:!0}))).id;}catch(e){throw console.error("Error creating business capability:",e),e;}});}updateCapability(t,e){return $(this,null,function*(){try{let i=ge(this.firestore,this.collectionName,t);yield hn(i,X({},e));}catch(i){throw console.error("Error updating business capability:",i),i;}});}deleteCapability(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t);yield no(e);}catch(e){throw console.error("Error deleting business capability:",e),e;}});}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var AV=(n,t)=>t.id;function DV(n,t){if(n&1&&u(0),n&2){let e=x();_e(" ",e.model.name," ");}}function jV(n,t){n&1&&u(0," New Model ");}function LV(n,t){n&1&&u(0," Model ");}function zV(n,t){if(n&1){let e=oe();s(0,"button",16),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(1,"mat-icon"),u(2,"arrow_back"),c()(),s(3,"button",17),E("click",function(){k(e);let o=x();return R(o.deleteModel());}),s(4,"mat-icon"),u(5,"delete"),c()();}}function FV(n,t){n&1&&(s(0,"div",13),u(1," Loading model... "),c());}function BV(n,t){if(n&1){let e=oe();s(0,"div",14)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c(),s(5,"button",18),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(6,"mat-icon"),u(7,"arrow_back"),c(),u(8," Back "),c()();}if(n&2){let e=x();m(4),G(e.error);}}function $V(n,t){n&1&&(s(0,"mat-icon"),u(1,"save"),c());}function VV(n,t){n&1&&(s(0,"mat-icon",25),u(1,"autorenew"),c());}function GV(n,t){n&1&&(s(0,"mat-icon"),u(1,"add"),c());}function qV(n,t){n&1&&(s(0,"mat-icon",25),u(1,"autorenew"),c());}function JV(n,t){if(n&1){let e=oe();s(0,"div",32)(1,"button",33),E("click",function(){k(e);let o=x(3);return R(o.clickSave());}),S(2,GV,2,0,"mat-icon"),S(3,qV,2,0,"mat-icon",25),u(4," Create Model "),c()();}if(n&2){let e=x(3);
122m(),N("disabled",e.form.invalid||e.isSaving),m(),M(e.isSaving?-1:2),m(),M(e.isSaving?3:-1);}}function HV(n,t){if(n&1){let e=oe();s(0,"as-split-area",19)(1,"div",20)(2,"div",21)(3,"mat-icon",22),u(4,"category"),c(),s(5,"span",23),u(6,"Model Details"),c(),s(7,"div",11)(8,"button",24),E("click",function(){k(e);let o=x(2);return R(o.clickSave());}),S(9,$V,2,0,"mat-icon"),S(10,VV,2,0,"mat-icon",25),c()()(),s(11,"div",26)(12,"form",27)(13,"div",28)(14,"mat-form-field",29)(15,"mat-label"),u(16,"Model Name"),c(),s(17,"input",30),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c(),s(18,"mat-error"),u(19,"Name is required"),c()()(),s(20,"div",28)(21,"mat-form-field",29)(22,"mat-label"),u(23,"Description"),c(),s(24,"textarea",31),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c()()(),S(25,JV,5,3,"div",32),c()()()();}if(n&2){let e=x(2);N("size",30),m(8),N("disabled",e.form.invalid||e.isSaving),m(),M(e.isSaving?-1:9),m(),M(e.isSaving?10:-1),m(2),N("formGroup",e.form),m(13),M(e.isCreationMode?25:-1);}}function UV(n,t){if(n&1){let e=oe();s(0,"mat-tree-node")(1,"div",41),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.onCapabilityClick(o.cap));}),ee(2,"span",42),s(3,"span",43),u(4),c(),s(5,"mat-icon",44),u(6,"subdirectory_arrow_right"),c(),s(7,"div",45)(8,"code",46),u(9),c(),s(10,"span",47),u(11),c()(),s(12,"mat-icon",48),E("click",function(o){let a=k(e).$implicit;return x(5).clickEditCapability(a.cap),R(o.stopPropagation());}),u(13," edit "),c()()();}if(n&2){let e=t.$implicit,i=x(5);m(),Ue("cap-tree-row-selected",i.isCapabilitySelected(e.cap)),m(2),ji("level-"+e.cap.level),m(),_e(" ",e.cap.level," "),m(5),G(e.cap.identifier||e.cap.id),m(2),G(e.cap.name);}}function WV(n,t){if(n&1){let e=oe();s(0,"mat-nested-tree-node")(1,"div",41),E("click",function(){let o=k(e).$implicit,a=x(5);return a.onCapabilityClick(o.cap),R(a.treeControl.toggle(o));}),s(2,"button",49),E("click",function(o){let a=k(e).$implicit,r=x(5);return o.stopPropagation(),R(r.treeControl.toggle(a));}),s(3,"mat-icon",50),u(4),c()(),s(5,"span",43),u(6),c(),s(7,"div",45)(8,"code",46),u(9),c(),s(10,"span",51),u(11),c()(),s(12,"mat-icon",48),E("click",function(o){let a=k(e).$implicit;return x(5).clickEditCapability(a.cap),R(o.stopPropagation());}),u(13," edit "),c()(),s(14,"div",52),Ma(15,53),c()();}if(n&2){let e=t.$implicit,i=x(5);m(),Ue("cap-tree-row-selected",i.isCapabilitySelected(e.cap)),m(),Yo("aria-label","Toggle "+e.cap.name),m(2),_e(" ",i.treeControl.isExpanded(e)?"expand_more":"chevron_right"," "),m(),ji("level-"+e.cap.level),m(),_e(" ",e.cap.level," "),m(3),G(e.cap.identifier||e.cap.id),m(2),G(e.cap.name),m(3),Ue("cap-tree-hidden",!i.treeControl.isExpanded(e));}}function XV(n,t){if(n&1&&(s(0,"mat-tree",37),Zt(1,UV,14,7,"mat-tree-node",39)(2,WV,16,11,"mat-nested-tree-node",40),c()),n&2){let e=x(4);N("dataSource",e.treeDataSource)("treeControl",e.treeControl),m(2),N("matTreeNodeDefWhen",e.hasChildren);}}function YV(n,t){n&1&&(s(0,"span",38),u(1,"No capabilities found. Click + to add one."),c());}function KV(n,t){if(n&1){let e=oe();s(0,"as-split-area",19)(1,"div",20)(2,"div",21)(3,"mat-icon",22),u(4,"account_tree"),c(),s(5,"span",23),u(6,"Business Capabilities"),c(),s(7,"div",11)(8,"button",35),E("click",function(){k(e);let o=x(3);return R(o.clickAddCapability());}),s(9,"mat-icon"),u(10,"add"),c()()()(),s(11,"div",36),S(12,XV,3,3,"mat-tree",37),S(13,YV,2,0,"span",38),c()()();}if(n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?55:100),m(12),M(e.capabilities.length>0?12:-1),m(),M(e.capabilities.length===0?13:-1);}}function ZV(n,t){if(n&1&&(s(0,"mat-option",64),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function QV(n,t){if(n&1&&(s(0,"div",28)(1,"mat-form-field",29)(2,"mat-label"),u(3),c(),s(4,"mat-select",62)(5,"mat-option",63),u(6,"\u2014 None \u2014"),c(),be(7,ZV,2,2,"mat-option",64,AV),c()()()),n&2){let e=x(5);m(3),_e("Parent Capability (Level ",e.capabilityForm.value.level-1,")"),m(4),ye(e.getParentCandidates(e.capabilityForm.value.level));}}function eG(n,t){n&1&&u(0," Update ");}function tG(n,t){n&1&&u(0," Create ");}function nG(n,t){if(n&1){let e=oe();s(0,"button",65),E("click",function(){k(e);let o=x(5);
122return R(o.deleteCapability(o.selectedCapability));}),s(1,"mat-icon"),u(2,"delete"),c()();}}function iG(n,t){if(n&1){let e=oe();s(0,"form",54)(1,"div",28)(2,"mat-form-field",29)(3,"mat-label"),u(4,"Identifier"),c(),ee(5,"input",55),s(6,"mat-hint"),u(7,"Human-readable stable ID (= Firestore doc ID). Read-only when editing."),c()()(),s(8,"div",28)(9,"mat-form-field",29)(10,"mat-label"),u(11,"Name"),c(),ee(12,"input",56),s(13,"mat-error"),u(14,"Name is required"),c()()(),s(15,"div",28)(16,"mat-form-field",29)(17,"mat-label"),u(18,"Description"),c(),ee(19,"textarea",57),c()(),s(20,"div",28)(21,"mat-form-field",29)(22,"mat-label"),u(23,"Level"),c(),ee(24,"input",58),s(25,"mat-hint"),u(26,"Level 1 = top-level capability"),c()()(),S(27,QV,9,1,"div",28),s(28,"div",59)(29,"button",18),E("click",function(){k(e);let o=x(4);return R(o.cancelCapabilityForm());}),u(30," Cancel "),c(),s(31,"button",60),E("click",function(){k(e);let o=x(4);return R(o.saveCapability());}),s(32,"mat-icon"),u(33,"save"),c(),S(34,eG,1,0)(35,tG,1,0),c(),S(36,nG,3,0,"button",61),c()();}if(n&2){let e=x(4);N("formGroup",e.capabilityForm),m(5),N("readonly",!!(e.selectedCapability!=null&&e.selectedCapability.id)),m(22),M(e.capabilityForm.value.level>1?27:-1),m(4),N("disabled",e.capabilityForm.invalid),m(3),M(e.selectedCapability!=null&&e.selectedCapability.id?34:35),m(2),M(e.selectedCapability!=null&&e.selectedCapability.id?36:-1);}}function oG(n,t){if(n&1&&(s(0,"div",67)(1,"span",68),u(2,"Identifier:"),c(),s(3,"span",69)(4,"code",46),u(5),c()()()),n&2){let e=x(5);m(5),G(e.selectedCapability.identifier);}}function aG(n,t){if(n&1&&(s(0,"div",67)(1,"span",68),u(2,"Parent:"),c(),s(3,"span",69),u(4),c()()),n&2){let e=x(5);m(4),G(e.getParentName(e.selectedCapability));}}function rG(n,t){if(n&1&&(s(0,"div",67)(1,"span",68),u(2,"Description:"),c(),s(3,"span",69),u(4),c()()),n&2){let e=x(5);m(4),G(e.selectedCapability.description);}}function sG(n,t){if(n&1){let e=oe();s(0,"div",66),S(1,oG,6,1,"div",67),s(2,"div",67)(3,"span",68),u(4,"Name:"),c(),s(5,"span",69),u(6),c()(),s(7,"div",67)(8,"span",68),u(9,"Level:"),c(),s(10,"span",69)(11,"span",43),u(12),c()()(),S(13,aG,5,1,"div",67),S(14,rG,5,1,"div",67),c(),s(15,"div",70)(16,"button",71),E("click",function(){k(e);let o=x(4);return R(o.clickEditCapability(o.selectedCapability));}),s(17,"mat-icon"),u(18,"edit"),c(),u(19," Edit "),c(),s(20,"button",72),E("click",function(){k(e);let o=x(4);return R(o.deleteCapability(o.selectedCapability));}),s(21,"mat-icon"),u(22,"delete"),c(),u(23," Delete "),c()();}if(n&2){let e=x(4);m(),M(e.selectedCapability.identifier?1:-1),m(5),G(e.selectedCapability.name),m(5),ji("level-"+e.selectedCapability.level),m(),_e(" ",e.selectedCapability.level," "),m(),M(e.selectedCapability.level>1&&e.getParentName(e.selectedCapability)?13:-1),m(),M(e.selectedCapability.description?14:-1);}}function lG(n,t){n&1&&(s(0,"span",38),u(1," Select a capability from the list to see its details, or click + to add one. "),c());}function cG(n,t){if(n&1&&(s(0,"as-split-area",19)(1,"div",20)(2,"div",21)(3,"mat-icon",22),u(4,"info"),c(),s(5,"span",23),u(6,"Capability Detail"),c()(),s(7,"div",26),S(8,iG,37,6,"form",54),S(9,sG,24,7),S(10,lG,2,0,"span",38),c()()()),n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?45:100),m(8),M(e.showCapabilityForm?8:-1),m(),M(!e.showCapabilityForm&&e.selectedCapability?9:-1),m(),M(!e.showCapabilityForm&&!e.selectedCapability?10:-1);}}function pG(n,t){if(n&1&&(s(0,"as-split-area",19)(1,"as-split",34),S(2,KV,14,3,"as-split-area",19),S(3,cG,11,4,"as-split-area",19),c()()),n&2){let e=x(2);N("size",70),m(),N("gutterSize",20),m(),M(e.panelVisibility.capabilities&&!e.isCreationMode?2:-1),m(),M(e.panelVisibility.capabilityDetail&&!e.isCreationMode?3:-1);}}function dG(n,t){if(n&1&&(s(0,"as-split",15),S(1,HV,26,6,"as-split-area",19),S(2,pG,4,4,"as-split-area",19),c()),n&2){let e=x();N("gutterSize",20),m(),M(e.panelVisibility.fields?1:-1),m(),M(e.panelVisibility.capabilities||e.panelVisibility.capabilityDetail?2:-1);}}var p0=class n{route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);modelService=re(H1);capabilityService=re(zf);modelId=null;model=null;isCreationMode=!1;
122isLoading=!0;isSaving=!1;error=null;capabilities=[];selectedCapability=null;showCapabilityForm=!1;capabilityForm;pendingCapabilityId=null;treeControl=new Td(t=>t.children);treeDataSource=new Rd();hasChildren=(t,e)=>e.children.length>0;panelVisibility={fields:!0,capabilities:!0,capabilityDetail:!0};form;subscriptions=[];constructor(){this.form=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:[""]}),this.capabilityForm=this.fb.group({identifier:[""],name:["",Ye.required],description:[""],level:[1,[Ye.required,Ye.min(1)]],parentBusinessCapabilityId:[""]});}ngOnInit(){this.route.params.subscribe(t=>{this.modelId=t.id??null,this.modelId?(this.isCreationMode=!1,this.loadModel()):(this.isCreationMode=!0,this.isLoading=!1);}),this.route.queryParams.subscribe(t=>{this.pendingCapabilityId=t.capabilityId??null,this.applyPendingSelection();});}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe());}loadModel(){return $(this,null,function*(){try{if(this.isLoading=!0,this.error=null,!this.modelId){this.error="No model ID provided",this.isLoading=!1;return;}let t=yield this.modelService.getModel(this.modelId);if(!t){this.error="Business capability model not found",this.isLoading=!1;return;}this.model=t,this.form.patchValue({name:t.name??"",description:t.description??""});let e=this.capabilityService.getCapabilitiesByModel(this.modelId).subscribe(i=>{this.capabilities=i,this.buildCapabilityTree();});this.subscriptions.push(e),this.isLoading=!1;}catch(t){console.error("Error loading model:",t),this.error="Failed to load business capability model",this.isLoading=!1;}});}togglePanel(t){this.panelVisibility[t]=!this.panelVisibility[t];}get visibleRightPanelKeys(){return["capabilities","capabilityDetail"].filter(t=>this.panelVisibility[t]);}clickSave(){return $(this,null,function*(){if(!this.form.invalid)try{this.isSaving=!0;let t=this.form.value;if(this.isCreationMode){let e=yield this.modelService.createModel({name:t.name,description:t.description??"",identifier:"",active:!0});this.snackBar.open("Model created","Close",{duration:2e3}),this.router.navigate(["/dashboard/business-capability-model",e]);}else yield this.modelService.updateModel(this.modelId,{name:t.name,description:t.description??""}),this.model&&(this.model=Ve(X({},this.model),{name:t.name,description:t.description})),this.snackBar.open("Saved","Close",{duration:1500});}catch(t){console.error("Error saving model:",t),this.snackBar.open("Failed to save","Close",{duration:3e3});}finally{this.isSaving=!1;}});}deleteModel(){return $(this,null,function*(){if(!(!this.model||!this.modelId)&&confirm(`Delete "${this.model.name}"? This will not automatically delete its capabilities.`))try{yield this.modelService.deleteModel(this.modelId),this.snackBar.open("Model deleted","Close",{duration:2e3}),this.router.navigate(["/dashboard/business-capability-models"]);}catch(t){console.error("Error deleting model:",t),this.snackBar.open("Failed to delete","Close",{duration:3e3});}});}goBack(){this.router.navigate(["/dashboard/business-capability-models"]);}buildCapabilityTree(){let t=o=>this.capabilities.filter(a=>a.parentBusinessCapabilityId===o).map(a=>({cap:a,children:t(a.id)})),e=new Set(this.capabilities.map(o=>o.id)),i=this.capabilities.filter(o=>!o.parentBusinessCapabilityId||!e.has(o.parentBusinessCapabilityId));this.treeDataSource.data=i.map(o=>({cap:o,children:t(o.id)})),this.pendingCapabilityId&&this.expandPathToCapability(this.pendingCapabilityId),this.applyPendingSelection();}expandAllNodes(t){for(let e of t)this.treeControl.expand(e),e.children.length>0&&this.expandAllNodes(e.children);}expandPathToCapability(t){let e=new Set(),i=this.capabilities.find(o=>o.id===t);for(;i?.parentBusinessCapabilityId;)e.add(i.parentBusinessCapabilityId),i=this.capabilities.find(o=>o.id===i.parentBusinessCapabilityId);this.expandMatchingNodes(this.treeDataSource.data,e);}expandMatchingNodes(t,e){for(let i of t)e.has(i.cap.id)&&this.treeControl.expand(i),i.children.length>0&&this.expandMatchingNodes(i.children,e);}applyPendingSelection(){if(!this.pendingCapabilityId||!this.capabilities.length)return;let t=this.capabilities.find(e=>e.id===this.pendingCapabilityId);t&&(this.selectedCapability=t,this.expandPathToCapability(this.pendingCapabilityId),this.pendingCapabilityId=null);}getParentCandidates(t){return t<=1?[]:this.capabilities.filter(e=>e.level===t-1);}getParentName(t){return t.parentBusinessCapabilityId?this.capabilities.find(i=>i.id===t.parentBusinessCapabilityId)?.name??"":"";}getIndentStyle(t){return{"padding-left":`${(t-1)*20}px`};}onCapabilityClick(t){this.selectedCapability=t,this.showCapabilityForm=!1;}isCapabilitySelected(t){return this.selectedCapability?.id===t.id;}clickAddCapability(){this.selectedCapability=null,this.capabilityForm.reset({level:1,parentBusinessCapabilityId:""}),this.showCapabilityForm=!0;}clickEditCapability(t){this.selectedCapability=t,this.capabilityForm.patchValue({identifier:t.identifier??t.id??"",name:t.name,description:t.description??"",level:t.level??1,parentBusinessCapabilityId:t.parentBusinessCapabilityId??""}),this.showCapabilityForm=!0;}saveCapability(){return $(this,null,function*(){if(!(this.capabilityForm.invali
122d||!this.modelId))try{let t=this.capabilityForm.value,e={identifier:t.identifier??"",name:t.name,description:t.description??"",level:t.level,businessCapabilityModelId:this.modelId,businessCapabilityModelName:this.model?.name??"",parentBusinessCapabilityId:t.parentBusinessCapabilityId??""};this.selectedCapability?.id?(yield this.capabilityService.updateCapability(this.selectedCapability.id,e),this.snackBar.open("Capability updated","Close",{duration:1500})):(yield this.capabilityService.createCapability(e),this.snackBar.open("Capability created","Close",{duration:1500})),this.showCapabilityForm=!1,this.selectedCapability=null;}catch(t){console.error("Error saving capability:",t),this.snackBar.open("Failed to save capability","Close",{duration:3e3});}});}deleteCapability(t){return $(this,null,function*(){if(t.id&&confirm(`Delete capability "${t.name}"?`))try{yield this.capabilityService.deleteCapability(t.id),this.selectedCapability?.id===t.id&&(this.selectedCapability=null,this.showCapabilityForm=!1),this.snackBar.open("Capability deleted","Close",{duration:1500});}catch(e){this.snackBar.open("Failed to delete capability","Close",{duration:3e3});}});}cancelCapabilityForm(){this.showCapabilityForm=!1;}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-business-capability-detail"]],decls:30,vars:19,consts:[[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-panel-toggles"],["mat-icon-button","","matTooltip","Show/hide model fields",3,"click"],["mat-icon-button","","matTooltip","Show/hide capabilities",3,"click"],["mat-icon-button","","matTooltip","Show/hide capability detail",3,"click"],[1,"div-button-right"],[1,"div-content"],[1,"div-insight-disabled",2,"padding","40px","text-align","center"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","color","#f44336"],["direction","horizontal",3,"gutterSize"],["mat-icon-button","","matTooltip","Back to list",3,"click"],["mat-icon-button","","color","warn","matTooltip","Delete model",3,"click"],["mat-stroked-button","",3,"click"],[3,"size"],[1,"container-right-panel"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],["mat-icon-button","","matTooltip","Save changes",3,"click","disabled"],[1,"icon-loading"],[1,"container-tile-body-strong"],[3,"formGroup"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","name",3,"change"],["matInput","","formControlName","description","rows","5",3,"change"],[1,"div-form-element",2,"padding-top","16px"],["mat-flat-button","","color","primary",2,"width","100%",3,"click","disabled"],["direction","vertical",3,"gutterSize"],["mat-icon-button","","color","primary","matTooltip","Add a new capability",3,"click"],[1,"container-tile-body-strong","sp-list-body"],[1,"cap-tree",3,"dataSource","treeControl"],[1,"div-insight-disabled"],[4,"matTreeNodeDef"],[4,"matTreeNodeDef","matTreeNodeDefWhen"],[1,"cap-tree-row",3,"click"],[1,"cap-tree-toggle-spacer"],[1,"level-badge"],[1,"cap-child-icon"],[1,"cap-tree-content"],[1,"cap-identifier"],[1,"cap-name"],["matTooltip","Edit capability",1,"sp-link-icon","sp-edit-icon",3,"click"],["mat-icon-button","",1,"cap-tree-toggle",3,"click"],[1,"cap-tree-toggle-icon"],[1,"cap-name","cap-name-strong"],["role","group",1,"cap-tree-children"],["matTreeNodeOutlet",""],[1,"capability-form",3,"formGroup"],["matInput","","formControlName","identifier","placeholder","e.g. c1-2-3",3,"readonly"],["matInput","","formControlName","name"],["matInput","","formControlName","description","rows","3"],["matInput","","type","number","formControlName","level","min","1"],[1,"form-actions"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-icon-button","","color","warn","matTooltip","Delete this capability"],["formControlName","parentBusinessCapabilityId"],["value",""],[3,"value"],["mat-icon-button","","color","warn","matTooltip","Delete this capability",3,"click"],[1,"detail-section"],[1,"detail-row"],[1,"detail-key"],[1,"detail-value"],[1,"link-controls"],["mat-stroked-button","","color","primary",3,"click"],["mat-stroked-button","","color","warn",3,"click"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-toolbar",2)(3,"div",3)(4,"div")(5,"mat-icon",4),u(6,"hub"),c()(),s(7,"div")(8,"div",5),u(9,"Business Capability Model"),c(),s(10,"div",6),S(11,DV,1,1),S(12,jV,1,0),S(13,LV,1,0),c()()(),s(14,"div",7)(1
1225,"button",8),E("click",function(){return i.togglePanel("fields");}),s(16,"mat-icon"),u(17,"category"),c()(),s(18,"button",9),E("click",function(){return i.togglePanel("capabilities");}),s(19,"mat-icon"),u(20,"account_tree"),c()(),s(21,"button",10),E("click",function(){return i.togglePanel("capabilityDetail");}),s(22,"mat-icon"),u(23,"info"),c()()(),s(24,"div",11),S(25,zV,6,0),c()()(),s(26,"div",12),S(27,FV,2,0,"div",13),S(28,BV,9,1,"div",14),S(29,dG,3,3,"as-split",15),c()()),e&2&&(m(11),M(!i.isCreationMode&&i.model?11:-1),m(),M(i.isCreationMode?12:-1),m(),M(!i.isCreationMode&&!i.model&&!i.isLoading?13:-1),m(2),Ue("toggle-active",i.panelVisibility.fields)("toggle-inactive",!i.panelVisibility.fields),m(3),Ue("toggle-active",i.panelVisibility.capabilities)("toggle-inactive",!i.panelVisibility.capabilities),m(3),Ue("toggle-active",i.panelVisibility.capabilityDetail)("toggle-inactive",!i.panelVisibility.capabilityDetail),m(4),M(i.isCreationMode?-1:25),m(2),M(i.isLoading?27:-1),m(),M(i.error&&!i.isLoading?28:-1),m(),M(!i.isLoading&&!i.error?29:-1));},dependencies:[ut,gn,Nn,Ft,Ea,Tt,Mn,Qr,tn,An,Wn,ln,yn,$e,Qe,Qt,We,Xe,Gt,Vt,Wt,Ki,ti,jt,Xt,bi,So,Ei,$t,_n,Lf,Df,Af,jf,Nf,kd,vr,cr,Cr],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
122.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.title[_ngcontent-%COMP%]{padding-left:10px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.div-panel-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:4px;padding:0 16px}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important;filter:none;text-shadow:none}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-inactive[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important;filter:none;text-shadow:none}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:56px;max-height:56px;flex-shrink:0}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.sp-list-body[_ngcontent-%COMP%]{padding:0!important}.sp-list-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.9em}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;background-color:#fafafa}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:8px 10px;font-weight:600;color:#0009;font-size:.85em;text-transform:uppercase;letter-spacing:.3px;border-bottom:2px solid rgba(0,0,0,.08)}.sp-list-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.05)}.sp-list-row[_ngcontent-%COMP%]{cursor:pointer;transition:background-color .15s ease,border-left .15s ease;border-left:3px solid transparent}.sp-list-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 10px;vertical-align:middle}.sp-list-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%]{background-color:#465d9114;border-left:3px solid #465d91}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-weight:500}.sp-col-level[_ngcontent-%COMP%]{width:50px;text-align:center;padding-right:6px!important}.sp-col-identifier[_ngcontent-%COMP%]{width:90px;white-space:nowrap;padding-right:8px!important}.cap-identifier[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:.78em;background-color:#0000000f;border-radius:3px;padding:1px 4px;color:#000000a6;letter-spacing:.3px}
122.sp-col-name[_ngcontent-%COMP%]{word-break:break-word}.sp-col-link[_ngcontent-%COMP%]{width:50px;text-align:center;padding-right:6px!important;white-space:nowrap}.sp-link-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#465d91;opacity:.7}.sp-edit-icon[_ngcontent-%COMP%]{cursor:pointer;border-radius:4px;transition:background-color .15s ease,opacity .15s ease;opacity:.5}.sp-edit-icon[_ngcontent-%COMP%]:hover{opacity:1;background-color:#465d911f} .cap-tree{background:transparent} .cap-tree mat-tree-node, .cap-tree mat-nested-tree-node{min-height:unset!important} .cap-tree .mat-tree-node{min-height:unset!important;padding-left:0!important}.cap-tree-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:6px;padding:6px 10px 6px 0;cursor:pointer;border-left:3px solid transparent;border-bottom:1px solid rgba(0,0,0,.04);transition:background-color .15s ease,border-left .15s ease}.cap-tree-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.cap-tree-row.cap-tree-row-selected[_ngcontent-%COMP%]{background-color:#465d9114;border-left:3px solid #465d91}.cap-tree-row.cap-tree-row-selected[_ngcontent-%COMP%] .cap-name[_ngcontent-%COMP%]{font-weight:600}.cap-tree-toggle[_ngcontent-%COMP%]{width:32px!important;height:32px!important;line-height:32px!important;flex-shrink:0}.cap-tree-toggle-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:#00000073!important}.cap-tree-toggle-spacer[_ngcontent-%COMP%]{display:inline-block;width:32px;flex-shrink:0}.cap-child-icon[_ngcontent-%COMP%]{font-size:14px!important;width:14px!important;height:14px!important;color:#0000004d!important;flex-shrink:0}.cap-tree-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:baseline;gap:8px;flex:1;min-width:0;overflow:hidden}.cap-name[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cap-name-strong[_ngcontent-%COMP%]{font-weight:600}.cap-tree-children[_ngcontent-%COMP%]{padding-left:20px;border-left:1px dashed rgba(0,0,0,.12);margin-left:22px}.cap-tree-hidden[_ngcontent-%COMP%]{display:none}.level-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;font-size:.75em;font-weight:700;color:#fff}.level-badge.level-1[_ngcontent-%COMP%]{background-color:#465d91}.level-badge.level-2[_ngcontent-%COMP%]{background-color:#465d91b3}.level-badge.level-3[_ngcontent-%COMP%]{background-color:#465d9180}.level-badge.level-4[_ngcontent-%COMP%], .level-badge.level-5[_ngcontent-%COMP%], .level-badge.level-6[_ngcontent-%COMP%]{background-color:#465d9159}.detail-section[_ngcontent-%COMP%]{padding:10px 0;border-bottom:1px solid rgba(0,0,0,.08)}.detail-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding:4px 0;font-size:.9em}.detail-key[_ngcontent-%COMP%]{font-weight:500;color:#0009;min-width:80px;flex-shrink:0}.detail-value[_ngcontent-%COMP%]{color:#000000de;word-break:break-word}.link-controls[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:12px}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-shrink:0}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit!important;filter:none!important;text-shadow:none!important}.capability-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}.div-form-element[_ngcontent-%COMP%]{margin:0;width:100%;overflow-x:hidden;padding-bottom:2px}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px;display:block} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter{background-color:transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}"]});};var OC=class n extends Wa{constructor(){super();}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var d0=class n{constructor(t){this.dataSource=t;}dataSource;collectionPath="";baseRoute;showNewButton=!0;init=!1;documentRoute;displayedColumns=["number","name"];displayedColumnsHeaders=["Nb.","Name"];ngOnInit(){this.documentRoute=this.baseRoute,this.init=!0;}static ɵfac=function(e){return new(e||n)(le(OC));};static ɵcmp=Te({type:n,selectors:[["app-business-process-list"]],inputs:{collectionPath:"collectionPath",baseRoute:"baseRoute"},decls:2,vars:6,consts:[[1,"div-content"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]],template:function(e,i){e&1&&(s(0,"div",0),ee(1,"app-object-list",1),c()),e&2&&(m(),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,ho],encapsulation:2});};function uG(n,t){n&1&&(s(0,"div",1),u(1," No items available. Basic information may be missing, please review provided fields. "),c());}function fG(n,t){if(n&1&&(s(0,"div",5),u(1),c()),n&2){let e=x().$implicit,i=x(2);m(),_e(" ",e[i.descriptionField]," ");}}function hG(n,t){if(n&1&&(s(0,"span")(1,"strong"),u(2),c(),u(3),c()),n&2){let e=x().$implicit,i=x().$implicit,o=x(2);m(2),_e("",o.formatFieldName(e),":"),m(),_e(" ",i[e]," ");}}function _G(n,t){if(n&1&&(s(0,"div",5),S(1,hG,4,2,"span"),c()),n&2){let e=t.$implicit,i=x().$implicit;m(),M(i[e]!==void 0&&i[e]!==null&&i[e]!==""?1:-1);}}function gG(n,t){if(n&1){let e=oe();s(0,"div")(1,"div",5)(2,"mat-checkbox",6),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.selected,o)||(a.selected=o),R(o);}),u(3),c(),S(4,fG,2,1,"div",5),be(5,_G,2,1,"div",5,Pt),c()();}if(n&2){let e=t.$implicit,i=x(2);m(2),wt("ngModel",e.selected),m(),_e(" ",e[i.titleField]," "),m(),M(i.descriptionField&&e[i.descriptionField]?4:-1),m(),ye(i.additionalFields);}}function xG(n,t){if(n&1&&(s(0,"div",2),be(1,gG,7,3,"div",null,Pt),c()),n&2){let e=x();m(),ye(e.list);}}var gs=class n{constructor(t,e,i){this.dialogRef=t;this.data=e;this.messagingService=i;}dialogRef;data;messagingService;list;titleField="title";descriptionField="description";additionalFields=[];ngOnInit(){try{Array.isArray(this.data.rawData)?(this.list=this.data.rawData.map(t=>Ve(X({},t),{selected:!1})),this.detectSchema()):typeof this.data.rawData=="object"&&this.data.rawData!==null&&(this.list=[this.data.rawData].map(t=>Ve(X({},t),{selected:!1})),this.detectSchema());}catch(t){this.messagingService.open("An error has occured, please try again later or contact the administrator.","",{duration:3e3});}}detectSchema(){if(!this.list||this.list.length===0)return;let t=this.list[0],e=Object.keys(t).filter(i=>i!=="selected");this.titleField=e.find(i=>["title","name","label"].includes(i.toLowerCase()))||e[0]||"title",this.descriptionField=e.find(i=>["description","detail","summary","text"].includes(i.toLowerCase()))||e.find(i=>i!==this.titleField)||"description",this.additionalFields=e.filter(i=>i!==this.titleField&&i!==this.descriptionField),console.log("Schema detected:",{titleField:this.titleField,descriptionField:this.descriptionField,additionalFields:this.additionalFields});}formatFieldName(t){return t.replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()).trim();}clickCancel(){this.dialogRef.close();}clickAccept(){let t=this.list?.map(e=>ts.stripUndefined(e));this.dialogRef.close(t);}static ɵfac=function(e){return new(e||n)(le(Li),le(fo),le(Bt));};static ɵcmp=Te({type:n,selectors:[["app-select-list"]],decls:10,vars:2,consts:[["mat-dialog-title",""],[1,"div-text-disabled"],[1,"div-flex-container"],["mat-button","",3,"click"],["mat-button","","cdkFocusInitial","",3,"click"],[1,"div-item"],["color","primary",3,"ngModelChange","ngModel"]],template:function(e,i){e&1&&(s(0,"h2",0),u(1,"Select items to create"),c(),s(2,"mat-dialog-content"),S(3,uG,2,0,"div",1),S(4,xG,3,0,"div",2),c(),s(5,"mat-dialog-actions")(6,"button",3),E("click",function(){return i.clickCancel();}),u(7,"Cancel"),c(),s(8,"button",4),E("click",function(){return i.clickAccept();}),u(9,"Ok"),c()()),e&2&&(m(3),M(i.list?-1:3),m(),M(i.list?4:-1));},dependencies:[tn,Tt,gn,Po,ra,xr,$e,Qe,Bo,$o,Vo],styles:["mat-dialog-content[_ngcontent-%COMP%]{max-height:60vh;overflow-y:auto;padding:0 24px}.div-flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.div-item[_ngcontent-%COMP%]{padding:16px;background:#fafafa;border-radius:8px;transition:background-color .2s ease,box-shadow .2s ease;border:1px solid #e0e0e0;margin-bottom:20px}.div-item[_ngcontent-%COMP%]:hover{background:#f0f0f0;cursor:pointer;box-shadow:0 2px 8px #0000001a}.div-item[_ngcontent-%COMP%] .div-item[_ngcontent-%COMP%]{padding:8px 0;background:transparent;font-size:.9em;color:#666;border:none;border-radius:0}.div-item[_ngcontent-%COMP%] .div-item[_ngcontent-%COMP%]:hover{background:transparent;cursor:default;box-shadow:none}mat-checkbox[_ngcontent-%COMP%]{display:block;margin-bottom:8px;font-weight:500;font-size:1.1em}mat-checkbox[_ngcontent-%COMP%] .mat-checkbox-label{color:#333;line-height:1.4}mat-divider[_ngcontent-%COMP%]{margin:8px 0;opacity:.6}mat-dialog-actions[_ngcontent-%COMP%]{padding:16px 24px;gap:8px;justify-content:flex-end;border-top:1px solid #e0e0e0;background:#fafafa}.div-text-disabled[_ngcontent-%COMP%]{color:#999;text-align:center;padding:40px 20px;font-style:italic;background:#f9f9f9;border-radius:8px;margin:16px 0}strong[_ngcontent-%COMP%]{color:#555;font-size:.85em;text-transform:uppercase;letter-spacing:.5px;margin-right:8px}h2[mat-dialog-title][_ngcontent-%COMP%]{color:#333;font-weight:500;margin-bottom:16px;padding:24px 24px 0;font-size:1.3em}@media(max-width:600px){mat-dialog-content[_ngcontent-%COMP%]{padding:0 16px}.div-item[_ngcontent-%COMP%]{padding:12px}mat-dialog-actions[_ngcontent-%COMP%]{padding:12px 16px}h2[mat-dialog-title][_ngcontent-%COMP%]{padding:16px 16px 0;font-size:1.2em}}*[_ngcontent-%COMP%]{transition:all .2s ease}"]});};var xR=(()=>{class n{static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],features:[aa([{provide:Jw,useClass:Jw}])]});}return n;})(),zS=new qi("cdk-menu"),Nd=function(n){return n[n.nextItem=0]="nextItem",n[n.previousItem=1]="previousItem",n[n.currentItem=2]="currentItem",n;}(Nd||{}),Sp=new qi("cdk-menu-stack"),CG={provide:Sp,useFactory:()=>re(Sp,{optional:!0,skipSelf:!0})||new FS()},vG=n=>({provide:Sp,useFactory:()=>re(Sp,{optional:!0,skipSelf:!0})||FS.inline(n)}),FS=(()=>{class n{id=re(q_).getId("cdk-menu-stack-");_elements=[];_close=new oa();_empty=new oa();_hasFocus=new oa();closed=this._close;hasFocus=this._hasFocus.pipe(qr(!1),Fm(0),td());emptied=this._empty;
122_inlineMenuOrientation=null;static inline(e){let i=new n();return i._inlineMenuOrientation=e,i;}push(e){this._elements.push(e);}close(e,i){let{focusNextOnEmpty:o,focusParentTrigger:a}=X({},i);if(this._elements.indexOf(e)>=0){let r;do r=this._elements.pop(),this._close.next({item:r,focusParentTrigger:a});while(r!==e);this.isEmpty()&&this._empty.next(o);}}closeSubMenuOf(e){let i=!1;if(this._elements.indexOf(e)>=0)for(i=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return i;}closeAll(e){let{focusNextOnEmpty:i,focusParentTrigger:o}=X({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let a=this._elements.pop();a&&this._close.next({item:a,focusParentTrigger:o});}this._empty.next(i);}}isEmpty(){return!this._elements.length;}length(){return this._elements.length;}peek(){return this._elements[this._elements.length-1];}hasInlineMenu(){return this._inlineMenuOrientation!=null;}inlineMenuOrientation(){return this._inlineMenuOrientation;}setHasFocus(e){this._hasFocus.next(e);}static ɵfac=function(i){return new(i||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac});}return n;})(),EC=new qi("cdk-menu-trigger"),bG=new qi("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=re(Hr);return()=>h1(n);}}),CR=(()=>{class n{static _openMenuTrigger;update(e){n._openMenuTrigger!==e&&(n._openMenuTrigger?.close(),n._openMenuTrigger=e);}static ɵfac=function(i){return new(i||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});}return n;})(),vR=(()=>{class n{injector=re(Hr);viewContainerRef=re(oc);menuStack=re(Sp);menuScrollStrategy=re(bG);menuPosition;opened=new At();closed=new At();menuTemplateRef=null;menuData;transformOriginSelector=null;overlayRef=null;destroyed=new oa();stopOutsideClicksListener=Va(this.closed,this.destroyed);childMenu;_menuPortal;_childMenuInjector;ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete();}isOpen(){return!!this.overlayRef?.hasAttached();}registerChildMenu(e){this.childMenu=e;}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new f1(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal;}isElementInsideMenuStack(e){for(let i=e;i;i=i?.parentElement??null)if(i.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1;}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null);}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||Hr.create({providers:[{provide:EC,useValue:this},{provide:Sp,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector;}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,hostVars:2,hostBindings:function(i,o){i&2&&Yo("aria-controls",o.childMenu==null?null:o.childMenu.id)("data-cdk-menu-stack-id",o.menuStack.id);}});}return n;})();var BS=new qi("cdk-menu-aim");function bR(n,t){if(!t.isTrusted)return!1;let e=n.nativeElement,i=t.keyCode;return e.nodeName==="BUTTON"&&!e.disabled?i===13||i===32:e.nodeName==="A"?i===13:!1;}var yG=(()=>{class n extends vR{_elementRef=re(qa);_ngZone=re(ya);_changeDetectorRef=re(Pa);_inputModalityDetector=re(zw);_directionality=re(sc,{optional:!0});_renderer=re(ic);_injector=re(Hr);_cleanupMouseenter;_menuTracker=re(CR);_parentMenu=re(zS,{optional:!0});_menuAim=re(BS,{optional:!0});constructor(){super(),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType();}toggle(){this.isOpen()?this.close():this.open();}open(){this._parentMenu||this._menuTracker.update(this),!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||X_(this._injector,this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks());}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers();}getMenu(){return this.childMenu;}ngOnChanges(e){e.menuPosition&&this.overlayRef&&this.overlayRef.updatePositionStrategy(this._getOverlayPositionStrategy());}ngOnDestroy(){this._cleanupMouseenter(),super.ngOnDestroy();}_toggleOnKeydown(e){let i=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!Rr(e)&&!bR(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:Rr(e)||this._parentMenu&&i&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:Rr(e)||this._parentMenu&&i&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:Rr(e)||i||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break;}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse");}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e);}_subscribeToMouseEnter(){this._cleanupMouseenter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{if(this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()){let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open();});this._menuAim?this._menuAim.toggle(e):e();}}));}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll();}_getOverlayConfig(){return new U_({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0});}_getOverlayPositionStrategy(){let e=W_(this._injector,this._elementRef).withLockedPosition().withFlexibleDimensions(!1).withPositions(this._getOverlayPositions());return this.transformOriginSelector&&e.withTransformOriginOn(this.transformOriginSelector),e;}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?qw:c3);}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(vo(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close();});}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(vo(this.stopOutsideClicksListener)).subscribe(e=>{let i=G_(e),o=this._elementRef.nativeElement;i!==o&&!o.contains(i)&&(this.isElementInsideMenuStack(i)?this._closeSiblingTriggers():this.menuStack.closeAll());});}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(vo(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll();});}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus();});}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button");}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button");}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(i,o){i&1&&E("focusin",function(){return o._setHasFocus(!0);})("focusout",function(){return o._setHasFocus(!1);})("keydown",function(r){return o._toggleOnKeydown(r);})("click",function(){return o._handleClick();}),i&2&&Yo("aria-haspopup",o.menuTemplateRef?"menu":null)("aria-expanded",o.menuTemplateRef==null?null:o.isOpen());},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"],transformOriginSelector:[0,"cdkMenuTriggerTransformOriginOn","transformOriginSelector"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],features:[aa([{provide:EC,useExisting:n},CG]),Ja,ki]});}return n;})(),PG=(()=>{class n{_dir=re(sc,{optional:!0});_elementRef=re(qa);_ngZone=re(ya);_inputModalityDetector=re(zw);_renderer=re(ic);_cleanupMouseEnter;_menuAim=re(BS,{optional:!0});_menuStack=re(Sp);_parentMenu=re(zS,{optional:!0});_menuTrigger=re(yG,{optional:!0,self:!0});disabled=!1;typeaheadLabel=null;triggered=new At();get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null;}_tabindex=-1;closeOnSpacebarTrigger=!0;destroyed=new oa();constructor(){this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0);}
122ngOnDestroy(){this._cleanupMouseEnter?.(),this.destroyed.next(),this.destroyed.complete();}focus(){this._elementRef.nativeElement.focus();}trigger(e){let{keepOpen:i}=X({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),i||this._menuStack.closeAll({focusParentTrigger:!0}));}isMenuOpen(){return!!this._menuTrigger?.isOpen();}getMenu(){return this._menuTrigger?.getMenu();}getMenuTrigger(){return this._menuTrigger;}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||"";}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1);}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0);}_handleClick(e){this.disabled?(e.preventDefault(),e.stopPropagation()):this.trigger();}_onKeydown(e){switch(e.keyCode){case 32:case 13:if(!Rr(e)&&!bR(this._elementRef,e)){let i=this._elementRef.nativeElement.nodeName;i!=="A"&&i!=="BUTTON"&&e.preventDefault(),this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger});}break;case 39:Rr(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:Rr(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break;}}_isStandaloneItem(){return!this._parentMenu;}_backArrowPressed(e){let i=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(i,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?Nd.previousItem:Nd.currentItem,focusParentTrigger:!0}));}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:Nd.nextItem,focusParentTrigger:!0}));}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._cleanupMouseEnter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu&&(this._menuAim?this._menuAim.toggle(e):e());}));}}_isParentVertical(){return this._parentMenu?.orientation==="vertical";}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button");}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:4,hostBindings:function(i,o){i&1&&E("blur",function(){return o._resetTabIndex();})("focus",function(){return o._setTabIndex();})("click",function(r){return o._handleClick(r);})("keydown",function(r){return o._onKeydown(r);}),i&2&&(Cl("tabIndex",o._tabindex),Yo("aria-disabled",o.disabled||null),Ue("cdk-menu-item-disabled",o.disabled));},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",Yi],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"]});}return n;})(),jS=class{_renderer;_items;_eventCleanups;_itemsSubscription;entered=new oa();exited=new oa();activeElement;previousElement;constructor(t,e){this._renderer=t,this._items=e,this._bindEvents(),this.entered.subscribe(i=>this.activeElement=i),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0;});}destroy(){this._cleanupEvents(),this._itemsSubscription?.unsubscribe();}_bindEvents(){this._itemsSubscription=this._items.changes.pipe(qr(this._items)).subscribe(()=>{this._cleanupEvents(),this._eventCleanups=[],this._items.forEach(t=>{let e=t._elementRef.nativeElement;this._eventCleanups.push(this._renderer.listen(e,"mouseenter",()=>{this.entered.next(t);}),this._renderer.listen(e,"mouseout",()=>{this.exited.next(t);}));});});}_cleanupEvents(){this._eventCleanups?.forEach(t=>t()),this._eventCleanups=void 0;}},wG=(()=>{class n extends xR{_focusMonitor=re(RT);ngZone=re(ya);_renderer=re(ic);nativeElement=re(qa).nativeElement;menuStack=re(Sp);menuAim=re(BS,{optional:!0,self:!0});dir=re(sc,{optional:!0});_allItems;id=re(q_).getId("cdk-menu-");items=new rT();orientation="vertical";isInline=!1;keyManager;destroyed=new oa();triggerItem;pointerTracker;_menuStackHasFocus=tc(!1);_tabIndexSignal=Ha(()=>{let e=this._menuStackHasFocus()?-1:0;return this.isInline?e:null;});ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setItems(),this._setKeyManager(),this._handleFocus(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker();}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.nativeElement),this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy();}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive();}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive();}setActiveMenuItem(e){this.keyManager?.setActiveItem(e);}_getTabIndex(){return this._tabIndexSignal();}closeOpenMenu(e,i){let{focusParentTrigger:o}=X({},i),a=this.keyManager,r=this.triggerItem;e===r?.getMenuTrigger()?.getMenu()&&(r?.getMenuTrigger()?.close(),o&&(r?a.setActiveItem(r):a.setFirstItemActive()));}_setItems(){this._allItems.changes.pipe(qr(this._allItems),vo(this.destroyed)).subscribe(e=>{this.items.reset(e.filter(i=>i._parentMenu===this)),this.items.notifyOnChanges();});}_setKeyManager(){this.keyManager=new DT(this.items).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate(()=>!1),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation();}_subscribeToMenuOpen(){let e=Va(this.items.changes,this.destroyed);this.items.changes.pipe(qr(this.items),zm(i=>i.filter(o=>o.hasMenu).map(o=>o.getMenuTrigger().opened.pipe(Wx(o),vo(e)))),XE(),mr(i=>(this.triggerItem=i,i.getMenuTrigger().closed)),vo(this.destroyed)).subscribe(()=>this.triggerItem=void 0);}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(vo(this.destroyed)).subscribe(({item:e,focusParentTrigger:i})=>this.closeOpenMenu(e,{focusParentTrigger:i}));}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(vo(this.destroyed)).subscribe(e=>{this._menuStackHasFocus.set(e);});}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new jS(this._renderer,this.items);}),this.menuAim.initialize(this,this.pointerTracker));}_handleFocus(){this._focusMonitor.monitor(this.nativeElement,!1).pipe(vo(this.destroyed)).subscribe(e=>{e!==null&&e!=="mouse"&&this.focusFirstItem(e);});}static ɵfac=(()=>{let e;return function(o){return(e||(e=nc(n)))(o||n);};})();static ɵdir=bo({type:n,contentQueries:function(i,o,a){if(i&1&&rc(a,PG,5),i&2){let r;qn(r=Jn())&&(o._allItems=r);}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(i,o){i&1&&E("focusin",function(){return o.menuStack.setHasFocus(!0);})("focusout",function(){return o.menuStack.setHasFocus(!1);}
122),i&2&&(Cl("tabIndex",o._getTabIndex())("id",o.id),Yo("aria-orientation",o.orientation)("data-cdk-menu-stack-id",o.menuStack.id));},inputs:{id:"id"},features:[Ja]});}return n;})(),yR=(()=>{class n extends wG{_parentTrigger=re(EC,{optional:!0});closed=new At();orientation="vertical";isInline=!this._parentTrigger;constructor(){super(),this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this);}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied();}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete();}_handleKeyEvent(e){let i=this.keyManager;switch(e.keyCode){case 37:case 39:Rr(e)||(e.preventDefault(),i.setFocusOrigin("keyboard"),i.onKeydown(e));break;case 27:Rr(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:Nd.currentItem,focusParentTrigger:!0}));break;case 9:Rr(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:i.onKeydown(e);}}_toggleMenuFocus(e){let i=this.keyManager;switch(e){case Nd.nextItem:i.setFocusOrigin("keyboard"),i.setNextItemActive();break;case Nd.previousItem:i.setFocusOrigin("keyboard"),i.setPreviousItemActive();break;case Nd.currentItem:i.activeItem&&(i.setFocusOrigin("keyboard"),i.setActiveItem(i.activeItem));break;}}
122_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(vo(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e));}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(i,o){i&1&&E("keydown",function(r){return o._handleKeyEvent(r);}),i&2&&Ue("cdk-menu-inline",o.isInline);},outputs:{closed:"closed"},exportAs:["cdkMenu"],features:[aa([{provide:xR,useExisting:n},{provide:zS,useExisting:n},vG("vertical")]),Ja]});}return n;})();var SG=qw.map(n=>{let t=n.overlayX==="start"?2:-2,e=n.overlayY==="top"?2:-2;return Ve(X({},n),{offsetX:t,offsetY:e});}),PR=(()=>{class n extends vR{_injector=re(Hr);_directionality=re(sc,{optional:!0});_menuTracker=re(CR);_changeDetectorRef=re(Pa);disabled=!1;constructor(){super(),this._setMenuStackCloseListener();}open(e){this._open(null,e),this._changeDetectorRef.markForCheck();}close(){this.menuStack.closeAll();}_openOnContextMenu(e){this.disabled||(e.preventDefault(),e.stopPropagation(),this._menuTracker.update(this),this._open(e,{x:e.clientX,y:e.clientY}),e.button===2?this.childMenu?.focusFirstItem("mouse"):e.button===0?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusFirstItem("program"));}_getOverlayConfig(e){return new U_({positionStrategy:this._getOverlayPositionStrategy(e),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0});}_getOverlayPositionStrategy(e){let i=W_(this._injector,e).withLockedPosition().withGrowAfterOpen().withPositions(this.menuPosition??SG);return this.transformOriginSelector&&i.withTransformOriginOn(this.transformOriginSelector),i;}_setMenuStackCloseListener(){this.menuStack.closed.pipe(vo(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this.childMenu=void 0,this._changeDetectorRef.markForCheck());});}_subscribeToOutsideClicks(e){if(this.overlayRef){let i=this.overlayRef.outsidePointerEvents();if(e){let[o,a]=KE(i,({type:r})=>r==="auxclick");i=Va(a.pipe(Kx((r,l)=>e.ctrlKey&&l===0&&r.ctrlKey)),o.pipe(tT(1)));}i.pipe(vo(this.stopOutsideClicksListener)).subscribe(o=>{this.isElementInsideMenuStack(G_(o))||this.menuStack.closeAll();});}}_open(e,i){this.disabled||(this.isOpen()?(this.menuStack.closeSubMenuOf(this.childMenu),this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):(this.opened.next(),this.overlayRef?(this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):this.overlayRef=X_(this._injector,this._getOverlayConfig(i)),this.overlayRef.attach(this.getMenuContentPortal()),this._subscribeToOutsideClicks(e)));}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["","cdkContextMenuTriggerFor",""]],hostVars:1,hostBindings:function(i,o){i&1&&E("contextmenu",function(r){return o._openOnContextMenu(r);}),i&2&&Yo("data-cdk-menu-stack-id",null);},inputs:{menuTemplateRef:[0,"cdkContextMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkContextMenuPosition","menuPosition"],menuData:[0,"cdkContextMenuTriggerData","menuData"],transformOriginSelector:[0,"cdkContextMenuTriggerTransformOriginOn","transformOriginSelector"],disabled:[2,"cdkContextMenuDisabled","disabled",Yi]},outputs:{opened:"cdkContextMenuOpened",closed:"cdkContextMenuClosed"},exportAs:["cdkContextMenuTriggerFor"],features:[aa([{provide:EC,useExisting:n},{provide:Sp,useClass:FS}]),Ja]});}return n;})();var wR=(()=>{class n{static ɵfac=function(i){return new(i||n)();};static ɵmod=sr({type:n});static ɵinj=ar({imports:[_1]});}return n;})();function OG(n,t){n&1&&(s(0,"mat-error"),u(1," Context is required "),c());}var TC=class n{constructor(t,e){this.dialogRef=t;this.data=e;this.form=new Ri({additionalContext:new st(e.additionalContext||"",Ye.required)});}dialogRef;data;form;ngOnInit(){}onCancel(){this.dialogRef.close();}onSave(){this.form.valid&&this.dialogRef.close({fieldName:this.data.fieldName,locale:this.data.locale,additionalContext:this.form.value.additionalContext});}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-context-dialog"]],decls:17,vars:3,consts:[[1,"context-dialog-container"],["mat-dialog-title",""],[3,"formGroup"],["mat-dialog-content",""],[1,"form-col"],["appearance","fill",1,"form-field"],["matInput","","formControlName","additionalContext","placeholder","Add context to improve AI generation...","rows","6"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"click","disabled"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"h2",1),u(2,"Additional Context"),c(),s(3,"form",2)(4,"div",3)(5,"div",4)(6,"mat-form-field",5)(7,"mat-label"),u(8,"Enter additional context or instructions"),c(),s(9,"textarea",6),u(10," "),c(),S(11,OG,2,0,"mat-error"),c()()(),s(12,"div",7)(13,"button",8),E("click",function(){return i.onCancel();}),u(14,"Cancel"),c(),s(15,"button",9),E("click",function(){return i.onSave();}),u(16," Save "),c()()()()),e&2&&(m(3),N("formGroup",i.form),m(8),M(i.form.controls.additionalContext.hasError("required")?11:-1),m(4),N("disabled",i.form.invali
122d));},dependencies:[tn,Nn,Ft,Tt,Mn,An,Wn,Zi,Bo,Vo,$o,$e,Qe,Gt,Vt,Wt,ti,jt,Xt,We],styles:[".context-dialog-container[_ngcontent-%COMP%]{padding:16px;min-width:400px;max-width:600px}.form-field[_ngcontent-%COMP%]{width:100%}.form-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:16px}mat-dialog-actions[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:flex-end}textarea[_ngcontent-%COMP%]{min-height:120px;resize:vertical}"]});};var Km=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;onCancel(){this.dialogRef.close(!1);}onConfirm(){this.dialogRef.close(!0);}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-confirm-discard-dialog"]],decls:19,vars:2,consts:[["mat-dialog-title",""],["color","warn"],[1,"item-preview"],["align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","warn",3,"click"]],template:function(e,i){e&1&&(s(0,"h2",0)(1,"mat-icon",1),u(2,"warning"),c(),u(3," Confirm "),c(),s(4,"mat-dialog-content")(5,"p"),u(6),c(),s(7,"div",2),u(8),c(),s(9,"p")(10,"strong"),u(11,"This action cannot be undone."),c()()(),s(12,"mat-dialog-actions",3)(13,"button",4),E("click",function(){return i.onCancel();}),u(14,"Cancel"),c(),s(15,"button",5),E("click",function(){return i.onConfirm();}),s(16,"mat-icon"),u(17,"check"),c(),u(18," OK "),c()()),e&2&&(m(6),_e("Are you sure you want to go forward with this ",i.data.type,"?"),m(2),_e(' "',i.data.item,'" '));},dependencies:[Zi,Bo,Vo,$o,$e,Qe,We,Xe],styles:[".item-preview[_ngcontent-%COMP%]{background-color:#f5f5f5;padding:12px;border-radius:4px;margin:12px 0;font-style:italic;border-left:4px solid #2196f3}h2[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}mat-dialog-content[_ngcontent-%COMP%]{min-width:350px}"]});};function EG(n,t){if(n&1&&(s(0,"li",15),u(1),c()),n&2){let e=t.$implicit;m(),G(e);}}function TG(n,t){if(n&1&&(s(0,"div",8)(1,"div",11)(2,"mat-icon",12),u(3,"thumb_up"),c(),s(4,"span",13),q(5,2),c()(),s(6,"ul",14),be(7,EG,2,1,"li",15,Pt),c()(),ee(9,"mat-divider")),n&2){let e=x();m(7),ye(e.data.strengths);}}function IG(n,t){if(n&1&&(s(0,"li",18),u(1),c()),n&2){let e=t.$implicit;m(),G(e);}}function kG(n,t){if(n&1&&(s(0,"div",8)(1,"div",16)(2,"mat-icon",17),u(3,"warning"),c(),s(4,"span",13),q(5,3),c()(),s(6,"ul",14),be(7,IG,2,1,"li",18,Pt),c()(),ee(9,"mat-divider")),n&2){let e=x();m(7),ye(e.data.weaknesses);}}function RG(n,t){if(n&1&&(s(0,"li",21),u(1),c()),n&2){let e=t.$implicit;m(),G(e);}}function NG(n,t){if(n&1&&(s(0,"div",8)(1,"div",19)(2,"mat-icon",20),u(3,"lightbulb"),c(),s(4,"span",13),q(5,4),c()(),s(6,"ul",14),be(7,RG,2,1,"li",21,Pt),c()()),n&2){let e=x();m(7),ye(e.data.recommendations);}}var IC=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;onClose(){this.dialogRef.close();}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-ai-insights-dialog"]],decls:12,vars:3,consts:()=>{let t;t="AI Insights";let e;e="Close";let i;i="Strengths";let o;o="Weaknesses";let a;return a="Recommendations",[t,e,i,o,a,["mat-dialog-title","",1,"insights-dialog-title"],[1,"title-icon"],["mat-dialog-content","",1,"insights-content"],[1,"insights-section"],["mat-dialog-actions","","align","end"],["mat-raised-button","","color","primary",3,"click"],[1,"section-header","strengths-header"],[1,"section-icon","strengths-icon"],[1,"section-title"],[1,"insights-list"],[1,"insights-item","strengths-item"],[1,"section-header","weaknesses-header"],[1,"section-icon","weaknesses-icon"],[1,"insights-item","weaknesses-item"],[1,"section-header","recommendations-header"],[1,"section-icon","recommendations-icon"],[1,"insights-item","recommendations-item"]];},template:function(e,i){e&1&&(s(0,"h2",5)(1,"mat-icon",6),u(2,"insights"),c(),s(3,"span"),q(4,0),c()(),s(5,"div",7),S(6,TG,10,0),S(7,kG,10,0),S(8,NG,9,0,"div",8),c(),s(9,"div",9)(10,"button",10),E("click",function(){return i.onClose();}),q(11,1),c()()),e&2&&(m(6),M(i.data.strengths.length>0?6:-1),m(),M(i.data.weaknesses.length>0?7:-1),m(),M(i.data.recommendations.length>0?8:-1));}
122,dependencies:[ut,Zi,Bo,Vo,$o,$e,Qe,We,Xe,Ua,Ml],styles:[".insights-dialog-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.insights-dialog-title[_ngcontent-%COMP%] .title-icon[_ngcontent-%COMP%]{font-size:22px;width:22px;height:22px}.insights-content[_ngcontent-%COMP%]{min-width:460px;max-width:600px;padding-top:8px}.insights-section[_ngcontent-%COMP%]{padding:12px 0}.section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.section-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;letter-spacing:.01em}.section-header[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.strengths-header[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{color:#4caf50}.strengths-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#2e7d32}.weaknesses-header[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{color:#f57c00}.weaknesses-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#e65100}.recommendations-header[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{color:#1976d2}.recommendations-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{color:#0d47a1}.insights-list[_ngcontent-%COMP%]{margin:0;padding-left:20px;list-style:disc}.insights-item[_ngcontent-%COMP%]{font-size:14px;line-height:1.6;margin-bottom:6px;color:#000c}.strengths-item[_ngcontent-%COMP%]{border-left:3px solid #a5d6a7;padding-left:8px;list-style:none}.weaknesses-item[_ngcontent-%COMP%]{border-left:3px solid #ffcc80;padding-left:8px;list-style:none}.recommendations-item[_ngcontent-%COMP%]{border-left:3px solid #90caf9;padding-left:8px;list-style:none}mat-divider[_ngcontent-%COMP%]{margin:4px 0}"]});};function AG(n,t){}var SR="_mat-bottom-sheet-enter",MR="_mat-bottom-sheet-exit",DG=(()=>{class n extends k3{_breakpointSubscription;_animationsDisabled=ld();_animationState="void";_animationStateChanged=new At();_destroyed=!1;constructor(){super();let e=re(s1);this._breakpointSubscription=e.observe([xp.Medium,xp.Large,xp.XLarge]).subscribe(()=>{let i=this._elementRef.nativeElement.classList;i.toggle("mat-bottom-sheet-container-medium",e.isMatched(xp.Medium)),i.toggle("mat-bottom-sheet-container-large",e.isMatched(xp.Large)),i.toggle("mat-bottom-sheet-container-xlarge",e.isMatched(xp.XLarge));});}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(SR));}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(MR));}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0;}_simulateAnimation(e){this._ngZone.run(()=>{this._handleAnimationEvent(!0,e),setTimeout(()=>this._handleAnimationEvent(!1,e));});}_trapFocus(){super._trapFocus({preventScroll:!0});}_handleAnimationEvent(e,i){let o=i===SR;(o||i===MR)&&this._animationStateChanged.emit({toState:o?"visible":"hidden",phase:e?"start":"done"});}static ɵfac=function(i){return new(i||n)();};static ɵcmp=Te({type:n,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(i,o){i&1&&E("animationstart",function(r){return o._handleAnimationEvent(!0,r.animationName);})("animationend",function(r){return o._handleAnimationEvent(!1,r.animationName);})("animationcancel",function(r){return o._handleAnimationEvent(!1,r.animationName);}),i&2&&(Yo("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-label",o._config.ariaLabel),Ue("mat-bottom-sheet-container-animations-enabled",!o._animationsDisabled)("mat-bottom-sheet-container-enter",o._animationState==="visible")("mat-bottom-sheet-container-exit",o._animationState==="hidden"));},features:[Ja],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,o){i&1&&Zt(0,AG,0,0,"ng-template",0);},dependencies:[r3],styles:[`@keyframes _mat-bottom-sheet-enter { 123 from { 124 transform: translateY(100%); 125 } 126 to { 127 transform: none; 128 } 129} 130@keyframes _mat-bottom-sheet-exit { 131 from { 132 transform: none; 133 } 134 to { 135 transform: translateY(100%); 136 } 137} 138.mat-bottom-sheet-container { 139 box-shadow: 0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12); 140 padding: 8px 16px; 141 min-width: 100vw; 142 box-sizing: border-box; 143 display: block; 144 outline: 0; 145 max-height: 80vh; 146 overflow: auto; 147 position: relative; 148 background: var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low)); 149 color: var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface)); 150 font-family: var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font)); 151 font-size: var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size)); 152 line-height: var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height)); 153 font-weight: var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight)); 154 letter-spacing: var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking)); 155} 156@media (forced-colors: active) { 157 .mat-bottom-sheet-container { 158 outline: 1px solid; 159 } 160} 161 162.mat-bottom-sheet-container-animations-enabled { 163 transform: translateY(100%); 164} 165.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter { 166 animation: _mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards; 167} 168.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit { 169 animation: _mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards; 170} 171 172.mat-bottom-sheet-container-xlarge, .mat-bottom-sheet-container-large, .mat-bottom-sheet-container-medium { 173 border-top-left-radius: var(--mat-bottom-sheet-container-shape, 28px); 174 border-top-right-radius: var(--mat-bottom-sheet-container-shape, 28px); 175} 176 177.mat-bottom-sheet-container-medium { 178 min-width: 384px; 179 max-width: calc(100vw - 128px); 180} 181 182.mat-bottom-sheet-container-large { 183 min-width: 512px; 184 max-width: calc(100vw - 256px); 185} 186 187.mat-bottom-sheet-container-xlarge { 188 min-width: 576px; 189 max-width: calc(100vw - 384px); 190} 191`],encapsulation:2});}return n;})(),VS=new qi("MatBottomSheetData"),$S=class{viewContainerRef;injector;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;
191autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight;},Ff=class{_ref;get instance(){return this._ref.componentInstance;}get componentRef(){return this._ref.componentRef;}containerInstance;disableClose;_afterOpened=new oa();_result;_closeFallbackTimeout;constructor(t,e,i){this._ref=t,this.containerInstance=i,this.disableClose=e.disableClose,i._animationStateChanged.pipe(ms(o=>o.phase==="done"&&o.toState==="visible"),Ga(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete();}),i._animationStateChanged.pipe(ms(o=>o.phase==="done"&&o.toState==="hidden"),Ga(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result);}),t.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result);}),Va(this.backdropClick(),this.keydownEvents().pipe(ms(o=>o.keyCode===27))).subscribe(o=>{!this.disableClose&&(o.type!=="keydown"||!Rr(o))&&(o.preventDefault(),this.dismiss());});}dismiss(t){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(ms(e=>e.phase==="start"),Ga(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop();}),this._result=t,this.containerInstance.exit(),this.containerInstance=null);}afterDismissed(){return this._ref.closed;}afterOpened(){return this._afterOpened;}backdropClick(){return this._ref.backdropClick;}keydownEvents(){return this._ref.keydownEvents;}},jG=new qi("mat-bottom-sheet-default-options"),f0=(()=>{class n{_injector=re(Hr);_parentBottomSheet=re(n,{optional:!0,skipSelf:!0});_animationsDisabled=ld();_defaultOptions=re(jG,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=re(R3);get _openedBottomSheetRef(){let e=this._parentBottomSheet;return e?e._openedBottomSheetRef:this._bottomSheetRefAtThisLevel;}set _openedBottomSheetRef(e){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=e:this._bottomSheetRefAtThisLevel=e;}constructor(){}open(e,i){let o=X(X({},this._defaultOptions||new $S()),i),a;return this._dialog.open(e,Ve(X({},o),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:DG,scrollStrategy:o.scrollStrategy||l3(this._injector),positionStrategy:p3(this._injector).centerHorizontally().bottom("0"),disableAnimations:this._animationsDisabled,templateContext:()=>({bottomSheetRef:a}),providers:(r,l,p)=>(a=new Ff(r,o,p),[{provide:Ff,useValue:a},{provide:VS,useValue:o.data}])})),a.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===a&&(this._openedBottomSheetRef=null);}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>a.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):a.containerInstance.enter(),this._openedBottomSheetRef=a,a;}dismiss(e){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(e);}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss();}static ɵfac=function(i){return new(i||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});}return n;})(),kC=(()=>{class n{static ɵfac=function(i){return new(i||n)();};static ɵmod=sr({type:n});static ɵinj=ar({providers:[f0],imports:[N3,s3,cd]});}return n;})();var RC=class n{constructor(t,e){this.bottomSheetRef=t;this.data=e;}bottomSheetRef;data;openLink(t){this.bottomSheetRef.dismiss(),t.preventDefault();}static ɵfac=function(e){return new(e||n)(le(Ff),le(VS));};static ɵcmp=Te({type:n,selectors:[["app-intelligent-field-info"]],standalone:!1,decls:2,vars:1,consts:[[1,"content"]],template:function(e,i){e&1&&(s(0,"div",0),u(1),c()),e&2&&(m(),_e(" ",i.data.text,` 192`));},styles:[".content[_ngcontent-%COMP%]{margin-bottom:100px;margin-top:50px;width:100%}.div-text[_ngcontent-%COMP%]{margin:0;width:100%}"]});};var LG=["knob"],zG=["valueIndicatorContainer"];function FG(n,t){if(n&1&&(s(0,"div",2,1)(2,"div",5)(3,"span",6),u(4),c()()()),n&2){let e=x();m(4),G(e.valueIndicatorText);}}var BG=["trackActive"],$G=["*"];function VG(n,t){if(n&1&&ee(0,"div"),n&2){let e=t.$implicit,i=t.$index,o=x(3);ji(e===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),Ci("transform",o._calcTickMarkTransform(i));}}function GG(n,t){if(n&1&&be(0,VG,1,4,"div",8,ac),n&2){let e=x(2);ye(e._tickMarks);}}function qG(n,t){if(n&1&&(s(0,"div",6,1),S(2,GG,2,0),c()),n&2){let e=x();m(2),M(e._cachedWidth?2:-1);}}function JG(n,t){if(n&1&&ee(0,"mat-slider-visual-thumb",7),n&2){let e=x();N("discrete",e.discrete)("thumbPosition",1)("valueIndicatorText",e.startValueIndicatorText);}}var ii=function(n){return n[n.START=1]="START",n[n.END=2]="END",n;}(ii||{}),Bf=function(n){return n[n.ACTIVE=0]="ACTIVE",n[n.INACTIVE=1]="INACTIVE",n;}(Bf||{}),qS=new qi("_MatSlider"),OR=new qi("_MatSliderThumb"),HG=new qi("_MatSliderRangeThumb"),ER=new qi("_MatSliderVisualThumb");var UG=(()=>{class n{_cdr=re(Pa);_ngZone=re(ya);_slider=re(qS);_renderer=re(ic);_listenerCleanups;discrete=!1;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=re(qa).nativeElement;_platform=re(df);constructor(){}ngAfterViewInit(){let e=this._slider._getInput(this.thumbPosition);e&&(this._ripple.radius=24,this._sliderInput=e,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{let i=this._sliderInputEl,o=this._renderer;this._listenerCleanups=[o.listen(i,"pointermove",this._onPointerMove),o.listen(i,"pointerdown",this._onDragStart),o.listen(i,"pointerup",this._onDragEnd),o.listen(i,"pointerleave",this._onMouseLeave),o.listen(i,"focus",this._onFocus),o.listen(i,"blur",this._onBlur)];}));}
192ngOnDestroy(){this._listenerCleanups?.forEach(e=>e());}_onPointerMove=e=>{if(this._sliderInput._isFocused)return;let i=this._hostElement.getBoundingClientRect(),o=this._slider._isCursorOnSliderThumb(e,i);this._isHovered=o,o?this._showHoverRipple():this._hideRipple(this._hoverRippleRef);};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef);};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused");};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused");};_onDragStart=e=>{e.button===0&&(this._isActive=!0,this._showActiveRipple());};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple();};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"));}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"));}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"));}_isShowingRipple(e){return e?.state===Bw.FADING_IN||e?.state===Bw.VISIBLE;}_showRipple(e,i){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===ii.START?ii.END:ii.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!i)))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:e,centered:!0,persistent:!0});}_hideRipple(e){if(e?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let i=this._getSibling();i._isShowingAnyRipple()||(this._hideValueIndicator(),i._hideValueIndicator());}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator");}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator");}_getSibling(){return this._slider._getThumb(this.thumbPosition===ii.START?ii.END:ii.START);}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement;}_getKnob(){return this._knob.nativeElement;}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef);}static ɵfac=function(i){return new(i||n)();};static ɵcmp=Te({type:n,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(i,o){if(i&1&&go($w,5)(LG,5)(zG,5),i&2){let a;qn(a=Jn())&&(o._ripple=a.first),qn(a=Jn())&&(o._knob=a.first),qn(a=Jn())&&(o._valueIndicatorContainer=a.first);}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[aa([{provide:ER,useExisting:n}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(i,o){i&1&&(S(0,FG,5,1,"div",2),ee(1,"div",3,0)(3,"div",4)),i&2&&(M(o.discrete?0:-1),m(3),N("matRippleDisabled",!0));},dependencies:[$w],styles:[`.mat-mdc-slider-visual-thumb .mat-ripple { 193 height: 100%; 194 width: 100%; 195} 196 197.mat-mdc-slider .mdc-slider__tick-marks { 198 justify-content: start; 199} 200.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active, 201.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive { 202 position: absolute; 203 left: 2px; 204} 205`],encapsulation:2,changeDetection:0});}return n;})(),NC=(()=>{class n{_ngZone=re(ya);_cdr=re(Pa);_elementRef=re(qa);_dir=re(sc,{optional:!0});_globalRippleOptions=re(LT,{optional:!0});_trackActive;_thumbs;_input;_inputs;get disabled(){return this._disabled;}set disabled(e){this._disabled=e;let i=this._getInput(ii.END),o=this._getInput(ii.START);i&&(i.disabled=this._disabled),o&&(o.disabled=this._disabled);}_disabled=!1;get discrete(){return this._discrete;}
205set discrete(e){this._discrete=e,this._updateValueIndicatorUIs();}_discrete=!1;get showTickMarks(){return this._showTickMarks;}set showTickMarks(e){this._showTickMarks=e,this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI());}_showTickMarks=!1;get min(){return this._min;}set min(e){let i=e==null||isNaN(e)?this._min:e;this._min!==i&&this._updateMin(i);}_min=0;color;disableRipple=!1;_updateMin(e){let i=this._min;this._min=e,this._isRange?this._updateMinRange({old:i,new:e}):this._updateMinNonRange(e),this._onMinMaxOrStepChange();}_updateMinRange(e){let i=this._getInput(ii.END),o=this._getInput(ii.START),a=i.value,r=o.value;o.min=e.new,i.min=Math.max(e.new,o.value),o.max=Math.min(i.max,i.value),o._updateWidthInactive(),i._updateWidthInactive(),e.new<e.old?this._onTranslateXChangeBySideEffect(i,o):this._onTranslateXChangeBySideEffect(o,i),a!==i.value&&this._onValueChange(i),r!==o.value&&this._onValueChange(o);}_updateMinNonRange(e){let i=this._getInput(ii.END);if(i){let o=i.value;i.min=e,i._updateThumbUIByValue(),this._updateTrackUI(i),o!==i.value&&this._onValueChange(i);}}get max(){return this._max;}set max(e){let i=e==null||isNaN(e)?this._max:e;this._max!==i&&this._updateMax(i);}_max=100;_updateMax(e){let i=this._max;this._max=e,this._isRange?this._updateMaxRange({old:i,new:e}):this._updateMaxNonRange(e),this._onMinMaxOrStepChange();}_updateMaxRange(e){let i=this._getInput(ii.END),o=this._getInput(ii.START),a=i.value,r=o.value;i.max=e.new,o.max=Math.min(e.new,i.value),i.min=o.value,i._updateWidthInactive(),o._updateWidthInactive(),e.new>e.old?this._onTranslateXChangeBySideEffect(o,i):this._onTranslateXChangeBySideEffect(i,o),a!==i.value&&this._onValueChange(i),r!==o.value&&this._onValueChange(o);}_updateMaxNonRange(e){let i=this._getInput(ii.END);if(i){let o=i.value;i.max=e,i._updateThumbUIByValue(),this._updateTrackUI(i),o!==i.value&&this._onValueChange(i);}}get step(){return this._step;}set step(e){let i=isNaN(e)?this._step:e;this._step!==i&&this._updateStep(i);}_step=1;_updateStep(e){this._step=e,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange();}_updateStepRange(){let e=this._getInput(ii.END),i=this._getInput(ii.START),o=e.value,a=i.value,r=i.value;e.min=this._min,i.max=this._max,e.step=this._step,i.step=this._step,this._platform.SAFARI&&(e.value=e.value,i.value=i.value),e.min=Math.max(this._min,i.value),i.max=Math.min(this._max,e.value),i._updateWidthInactive(),e._updateWidthInactive(),e.value<r?this._onTranslateXChangeBySideEffect(i,e):this._onTranslateXChangeBySideEffect(e,i),o!==e.value&&this._onValueChange(e),a!==i.value&&this._onValueChange(i);}_updateStepNonRange(){let e=this._getInput(ii.END);if(e){let i=e.value;e.step=this._step,this._platform.SAFARI&&(e.value=e.value),e._updateThumbUIByValue(),i!==e.value&&this._onValueChange(e);}}displayWith=e=>`${e}`;_tickMarks;_noopAnimations=ld();_resizeObserver=null;_cachedWidth;_cachedLeft;_rippleRadius=24;startValueIndicatorText="";endValueIndicatorText="";_endThumbTransform;_startThumbTransform;_isRange=!1;_isRtl=Ha(()=>this._dir?.valueSignal()==="rtl");_hasViewInitialized=!1;_tickMarkTrackWidth=0;_hasAnimation=!1;_resizeTimer=null;_platform=re(df);constructor(){re(NT).load(zT);let e=this._isRtl();$_(()=>{let i=this._isRtl();i!==e&&(e=i,this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI());});}_knobRadius=8;_inputPadding;ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();let e=this._getInput(ii.END),i=this._getInput(ii.START);this._isRange=!!e&&!!i,this._cdr.detectChanges();let o=this._getThumb(ii.END);this._rippleRadius=o._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(e,i):this._initUINonRange(e),this._updateTrackUI(e),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges();}_initUINonRange(e){e.initProps(),e.initUI(),this._updateValueIndicatorUI(e),this._hasViewInitialized=!0,e._updateThumbUIByValue();}_initUIRange(e,i){e.initProps(),e.initUI(),i.initProps(),i.initUI(),e._updateMinMax(),i._updateMinMax(),e._updateStaticStyles(),i._updateStaticStyles(),this._updateV
205alueIndicatorUIs(),this._hasViewInitialized=!0,e._updateThumbUIByValue(),i._updateThumbUIByValue();}ngOnDestroy(){this._resizeObserver?.disconnect(),this._resizeObserver=null;}_onDirChangeRange(){let e=this._getInput(ii.END),i=this._getInput(ii.START);e._setIsLeftThumb(),i._setIsLeftThumb(),e.translateX=e._calcTranslateXByValue(),i.translateX=i._calcTranslateXByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateWidthInactive(),i._updateWidthInactive(),e._updateThumbUIByValue(),i._updateThumbUIByValue();}_onDirChangeNonRange(){this._getInput(ii.END)._updateThumbUIByValue();}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize());}),this._resizeObserver.observe(this._elementRef.nativeElement);});}_isActive(){return this._getThumb(ii.START)._isActive||this._getThumb(ii.END)._isActive;}_getValue(e=ii.END){let i=this._getInput(e);return i?i.value:this.min;}_skipUpdate(){return!!(this._getInput(ii.START)?._skipUIUpdate||this._getInput(ii.END)?._skipUIUpdate);}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left;}_setTrackActiveStyles(e){let i=this._trackActive.nativeElement.style;i.left=e.left,i.right=e.right,i.transformOrigin=e.transformOrigin,i.transform=e.transform;}_calcTickMarkTransform(e){let i=e*(this._tickMarkTrackWidth/(this._tickMarks.length-1));return`translateX(${this._isRtl()?this._cachedWidth-6-i:i}px)`;}_onTranslateXChange(e){this._hasViewInitialized&&(this._updateThumbUI(e),this._updateTrackUI(e),this._updateOverlappingThumbUI(e));}_onTranslateXChangeBySideEffect(e,i){this._hasViewInitialized&&(e._updateThumbUIByValue(),i._updateThumbUIByValue());}_onValueChange(e){this._hasViewInitialized&&(this._updateValueIndicatorUI(e),this._updateTickMarkUI(),this._cdr.detectChanges());}_onMinMaxOrStepChange(){this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck());}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){let e=this._getInput(ii.END),i=this._getInput(ii.START);e._updateThumbUIByValue(),i._updateThumbUIByValue(),e._updateStaticStyles(),i._updateStaticStyles(),e._updateMinMax(),i._updateMinMax(),e._updateWidthInactive(),i._updateWidthInactive();}else{let e=this._getInput(ii.END);e&&e._updateThumbUIByValue();}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges();}}_thumbsOverlap=!1;_areThumbsOverlapping(){let e=this._getInput(ii.START),i=this._getInput(ii.END);return!e||!i?!1:i.translateX-e.translateX<20;}_updateOverlappingThumbClassNames(e){let i=e.getSibling(),o=this._getThumb(e.thumbPosition);this._getThumb(i.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),o._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap);}_updateOverlappingThumbUI(e){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(e));}_updateThumbUI(e){if(this._skipUpdate())return;let i=this._getThumb(e.thumbPosition===ii.END?ii.END:ii.START);i._hostElement.style.transform=`translateX(${e.translateX}px)`;}_updateValueIndicatorUI(e){if(this._skipUpdate())return;let i=this.displayWith(e.value);if(this._hasViewInitialized?e._valuetext.set(i):e._hostElement.setAttribute("aria-valuetext",i),this.discrete){e.thumbPosition===ii.START?this.startValueIndicatorText=i:this.endValueIndicatorText=i;let o=this._getThumb(e.thumbPosition);i.length<3?o._hostElement.classList.add("mdc-slider__thumb--short-value"):o._hostElement.classList.remove("mdc-slider__thumb--short-value");}}_updateValueIndicatorUIs(){let e=this._getInput(ii.END),i=this._getInput(ii.START);e&&this._updateValueIndicatorUI(e),i&&this._updateValueIndicatorUI(i);}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;let e=this._step&&this._step>0?this._step:1,o=(Math.floor(this.max/e)*e-this.min)/(this.max-this.min);this._tickMarkTrackWidth=(this._cachedWidth-6)*o;}_updateTrackUI(e){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(e):this._updateTrackUINonRange(e));}_updateTrackUIRange(e){let i=e.getSibling();if(!i||!this._cachedWidth)return;let o=Math.abs(i.translateX-e.translateX)/this._cachedWidth;e._isLeftThumb&&this._cachedWidth?this._setTrackActiveStyles({left:"auto",right:`${this._cachedWidth-i.translateX}px`,transformOrigin:"right",transform:`scaleX(${o})`}):this._setTrackActiveStyles({left:`${i.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${o})`});}_updateTrackUINonRange(e){this._isRtl()?this._setTrackActiveStyles({left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-e.fillPercentage})`}):this._setTrackActiveStyles({left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${e.fillPercentage})`});}_updateTickMarkUI(){if(!this.showTickMarks||this.step===void 0||this.min===void 0||this.max===void 0)return;let e=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(e):this._updateTickMarkUINonRange(e);}_updateTickMarkUINonRange(e){let i=this._getValue(),o=Math.max(Math.round((i-this.min)/e),0)+1,a=Math.max(Math.round((this.max-i)/e),0)-1;this._isRtl()?o++:a++,this._tickMarks=Array(o).fill(Bf.ACTIVE).concat(Array(a).fill(Bf.INACTIVE));}_updateTickMarkUIRange(e){let i=this._getValue(),o=this._getValue(ii.START),a=Math.max(Math.round((o-this.min)/e),0),r=Math.max(Math.round((i-o)/e)+1,0),l=Math.max(Math.round((this.max-i)/e),0);this._tickMarks=Array(a).fill(Bf.INACTIVE).concat(Array(r).fill(Bf.ACTIVE),Array(l).fill(Bf.INACTIVE));}_getInput(e){if(e===ii.END&&this._input)return this._input;if(this._inputs?.length)return e===ii.START?this._inputs.first:this._inputs.last;}_getThumb(e){return e===ii.END?this._thumbs?.last:this._thumbs?.first;}
205_setTransition(e){this._hasAnimation=!this._platform.IOS&&e&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation);}_isCursorOnSliderThumb(e,i){let o=i.width/2,a=i.x+o,r=i.y+o,l=e.clientX-a,p=e.clientY-r;return Math.pow(l,2)+Math.pow(p,2)<Math.pow(o,2);}static ɵfac=function(i){return new(i||n)();};static ɵcmp=Te({type:n,selectors:[["mat-slider"]],contentQueries:function(i,o,a){if(i&1&&rc(a,OR,5)(a,HG,4),i&2){let r;qn(r=Jn())&&(o._input=r.first),qn(r=Jn())&&(o._inputs=r);}},viewQuery:function(i,o){if(i&1&&go(BG,5)(ER,5),i&2){let a;qn(a=Jn())&&(o._trackActive=a.first),qn(a=Jn())&&(o._thumbs=a);}},hostAttrs:[1,"mat-mdc-slider","mdc-slider"],hostVars:12,hostBindings:function(i,o){i&2&&(ji("mat-"+(o.color||"primary")),Ue("mdc-slider--range",o._isRange)("mdc-slider--disabled",o.disabled)("mdc-slider--discrete",o.discrete)("mdc-slider--tick-marks",o.showTickMarks)("_mat-animation-noopable",o._noopAnimations));},inputs:{disabled:[2,"disabled","disabled",Yi],discrete:[2,"discrete","discrete",Yi],showTickMarks:[2,"showTickMarks","showTickMarks",Yi],min:[2,"min","min",Yr],color:"color",disableRipple:[2,"disableRipple","disableRipple",Yi],max:[2,"max","max",Yr],step:[2,"step","step",Yr],displayWith:"displayWith"},exportAs:["matSlider"],features:[aa([{provide:qS,useExisting:n}])],ngContentSelectors:$G,decls:9,vars:5,consts:[["trackActive",""],["tickMarkContainer",""],[1,"mdc-slider__track"],[1,"mdc-slider__track--inactive"],[1,"mdc-slider__track--active"],[1,"mdc-slider__track--active_fill"],[1,"mdc-slider__tick-marks"],[3,"discrete","thumbPosition","valueIndicatorText"],[3,"class","transform"]],template:function(i,o){i&1&&(vl(),As(0),s(1,"div",2),ee(2,"div",3),s(3,"div",4),ee(4,"div",5,0),c(),S(6,qG,3,1,"div",6),c(),S(7,JG,1,3,"mat-slider-visual-thumb",7),ee(8,"mat-slider-visual-thumb",7)),i&2&&(m(6),M(o.showTickMarks?6:-1),m(),M(o._isRange?7:-1),m(),N("discrete",o.discrete)("thumbPosition",2)("valueIndicatorText",o.endValueIndicatorText));},dependencies:[UG],styles:[`.mdc-slider__track { 206 position: absolute; 207 top: 50%; 208 transform: translateY(-50%); 209 width: 100%; 210 pointer-events: none; 211 height: var(--mat-slider-inactive-track-height, 4px); 212} 213 214.mdc-slider__track--active, 215.mdc-slider__track--inactive { 216 display: flex; 217 height: 100%; 218 position: absolute; 219 width: 100%; 220} 221 222.mdc-slider__track--active { 223 overflow: hidden; 224 border-radius: var(--mat-slider-active-track-shape, var(--mat-sys-corner-full)); 225 height: var(--mat-slider-active-track-height, 4px); 226 top: calc((var(--mat-slider-inactive-track-height, 4px) - var(--mat-slider-active-track-height, 4px)) / 2); 227} 228 229.mdc-slider__track--active_fill { 230 border-top-style: solid; 231 box-sizing: border-box; 232 height: 100%; 233 width: 100%; 234 position: relative; 235 transform-origin: left; 236 transition: transform 80ms ease; 237 border-color: var(--mat-slider-active-track-color, var(--mat-sys-primary)); 238 border-top-width: var(--mat-slider-active-track-height, 4px); 239} 240.mdc-slider--disabled .mdc-slider__track--active_fill { 241 border-color: var(--mat-slider-disabled-active-track-color, var(--mat-sys-on-surface)); 242} 243[dir=rtl] .mdc-slider__track--active_fill { 244 -webkit-transform-origin: right; 245 transform-origin: right; 246} 247 248.mdc-slider__track--inactive { 249 left: 0; 250 top: 0; 251 opacity: 0.24; 252 background-color: var(--mat-slider-inactive-track-color, var(--mat-sys-surface-variant)); 253 height: var(--mat-slider-inactive-track-height, 4px); 254 border-radius: var(--mat-slider-inactive-track-shape, var(--mat-sys-corner-full)); 255} 256.mdc-slider--disabled .mdc-slider__track--inactive { 257 background-color: var(--mat-slider-disabled-inactive-track-color, var(--mat-sys-on-surface)); 258 opacity: 0.24; 259} 260.mdc-slider__track--inactive::before { 261 position: absolute; 262 box-sizing: border-box; 263 width: 100%; 264 height: 100%; 265 top: 0; 266 left: 0; 267 border: 1px solid transparent; 268 border-radius: inherit; 269 content: ""; 270 pointer-events: none; 271} 272@media (forced-colors: active) { 273 .mdc-slider__track--inactive::before { 274 border-color: CanvasText; 275 } 276} 277 278.mdc-slider__value-indicator-container { 279 bottom: 44px; 280 left: 50%; 281 pointer-events: none; 282 position: absolute;
283 transform: var(--mat-slider-value-indicator-container-transform, translateX(-50%) rotate(-45deg)); 284} 285.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container { 286 pointer-events: auto; 287} 288 289.mdc-slider__value-indicator { 290 display: flex; 291 align-items: center; 292 transform: scale(0); 293 transform-origin: var(--mat-slider-value-indicator-transform-origin, 0 28px); 294 transition: transform 100ms cubic-bezier(0.4, 0, 1, 1); 295 word-break: normal; 296 background-color: var(--mat-slider-label-container-color, var(--mat-sys-primary)); 297 color: var(--mat-slider-label-label-text-color, var(--mat-sys-on-primary)); 298 width: var(--mat-slider-value-indicator-width, 28px); 299 height: var(--mat-slider-value-indicator-height, 28px); 300 padding: var(--mat-slider-value-indicator-padding, 0); 301 opacity: var(--mat-slider-value-indicator-opacity, 1); 302 border-radius: var(--mat-slider-value-indicator-border-radius, 50% 50% 50% 0); 303} 304.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator { 305 transition: transform 100ms cubic-bezier(0, 0, 0.2, 1); 306 transform: scale(1); 307} 308.mdc-slider__value-indicator::before { 309 border-left: 6px solid transparent; 310 border-right: 6px solid transparent; 311 border-top: 6px solid; 312 bottom: -5px; 313 content: ""; 314 height: 0; 315 left: 50%; 316 position: absolute; 317 transform: translateX(-50%); 318 width: 0; 319 display: var(--mat-slider-value-indicator-caret-display, none); 320 border-top-color: var(--mat-slider-label-container-color, var(--mat-sys-primary)); 321} 322.mdc-slider__value-indicator::after { 323 position: absolute; 324 box-sizing: border-box; 325 width: 100%; 326 height: 100%; 327 top: 0; 328 left: 0; 329 border: 1px solid transparent; 330 border-radius: inherit; 331 content: ""; 332 pointer-events: none; 333} 334@media (forced-colors: active) { 335 .mdc-slider__value-indicator::after { 336 border-color: CanvasText; 337 } 338} 339 340.mdc-slider__value-indicator-text { 341 text-align: center; 342 width: var(--mat-slider-value-indicator-width, 28px); 343 transform: var(--mat-slider-value-indicator-text-transform, rotate(45deg)); 344 font-family: var(--mat-slider-label-label-text-font, var(--mat-sys-label-medium-font)); 345 font-size: var(--mat-slider-label-label-text-size, var(--mat-sys-label-medium-size)); 346 font-weight: var(--mat-slider-label-label-text-weight, var(--mat-sys-label-medium-weight)); 347 line-height: var(--mat-slider-label-label-text-line-height, var(--mat-sys-label-medium-line-height)); 348 letter-spacing: var(--mat-slider-label-label-text-tracking, var(--mat-sys-label-medium-tracking)); 349} 350 351.mdc-slider__thumb { 352 -webkit-user-select: none; 353 user-select: none; 354 display: flex; 355 left: -24px; 356 outline: none; 357 position: absolute; 358 height: 48px; 359 width: 48px; 360 pointer-events: none; 361} 362.mdc-slider--discrete .mdc-slider__thumb { 363 transition: transform 80ms ease; 364} 365.mdc-slider--disabled .mdc-slider__thumb { 366 pointer-events: none; 367} 368 369.mdc-slider__thumb--top { 370 z-index: 1; 371} 372 373.mdc-slider__thumb-knob { 374 position: absolute; 375 box-sizing: border-box; 376 left: 50%; 377 top: 50%; 378 transform: translate(-50%, -50%); 379 border-style: solid; 380 width: var(--mat-slider-handle-width, 20px); 381 height: var(--mat-slider-handle-height, 20px); 382 border-width: calc(var(--mat-slider-handle-height, 20px) / 2) calc(var(--mat-slider-handle-width, 20px) / 2); 383 box-shadow: var(--mat-slider-handle-elevation, var(--mat-sys-level1)); 384 background-color: var(--mat-slider-handle-color, var(--mat-sys-primary)); 385 border-color: var(--mat-slider-handle-color, var(--mat-sys-primary)); 386 border-radius: var(--mat-slider-handle-shape, var(--mat-sys-corner-full)); 387} 388.mdc-slider__thumb:hover .mdc-slider__thumb-knob { 389 background-color: var(--mat-slider-hover-handle-color, var(--mat-sys-primary)); 390 border-color: var(--mat-slider-hover-handle-color, var(--mat-sys-primary)); 391} 392.mdc-slider__thumb--focused .mdc-slider__thumb-knob { 393 background-color: var(--mat-slider-focus-handle-color, var(--mat-sys-primary)); 394 border-color: var(--mat-slider-focus-handle-color, var(--mat-sys-primary)); 395} 396.mdc-slider--disabled .mdc-slider__thumb-knob { 397 background-color: var(--mat-slider-disabled-handle-color, var(--mat-sys-on-surface));
398 border-color: var(--mat-slider-disabled-handle-color, var(--mat-sys-on-surface)); 399} 400.mdc-slider__thumb--top .mdc-slider__thumb-knob, .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob, .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob { 401 border: solid 1px #fff; 402 box-sizing: content-box; 403 border-color: var(--mat-slider-with-overlap-handle-outline-color, var(--mat-sys-on-primary)); 404 border-width: var(--mat-slider-with-overlap-handle-outline-width, 1px); 405} 406 407.mdc-slider__tick-marks { 408 align-items: center; 409 box-sizing: border-box; 410 display: flex; 411 height: 100%; 412 justify-content: space-between; 413 padding: 0 1px; 414 position: absolute; 415 width: 100%; 416} 417 418.mdc-slider__tick-mark--active, 419.mdc-slider__tick-mark--inactive { 420 width: var(--mat-slider-with-tick-marks-container-size, 2px); 421 height: var(--mat-slider-with-tick-marks-container-size, 2px); 422 border-radius: var(--mat-slider-with-tick-marks-container-shape, var(--mat-sys-corner-full)); 423} 424 425.mdc-slider__tick-mark--inactive { 426 opacity: var(--mat-slider-with-tick-marks-inactive-container-opacity, 0.38); 427 background-color: var(--mat-slider-with-tick-marks-inactive-container-color, var(--mat-sys-on-surface-variant)); 428} 429.mdc-slider--disabled .mdc-slider__tick-mark--inactive { 430 opacity: var(--mat-slider-with-tick-marks-inactive-container-opacity, 0.38); 431 background-color: var(--mat-slider-with-tick-marks-disabled-container-color, var(--mat-sys-on-surface)); 432} 433 434.mdc-slider__tick-mark--active { 435 opacity: var(--mat-slider-with-tick-marks-active-container-opacity, 0.38); 436 background-color: var(--mat-slider-with-tick-marks-active-container-color, var(--mat-sys-on-primary)); 437} 438 439.mdc-slider__input { 440 cursor: pointer; 441 left: 2px; 442 margin: 0; 443 height: 44px; 444 opacity: 0; 445 position: absolute; 446 top: 2px; 447 width: 44px; 448 box-sizing: content-box; 449} 450.mdc-slider__input.mat-mdc-slider-input-no-pointer-events { 451 pointer-events: none; 452} 453.mdc-slider__input.mat-slider__right-input { 454 left: auto; 455 right: 0; 456} 457 458.mat-mdc-slider { 459 display: inline-block; 460 box-sizing: border-box; 461 outline: none; 462 vertical-align: middle; 463 cursor: pointer; 464 height: 48px; 465 margin: 0 8px; 466 position: relative; 467 touch-action: pan-y; 468 width: auto; 469 min-width: 112px; 470 -webkit-tap-highlight-color: transparent; 471} 472.mat-mdc-slider.mdc-slider--disabled { 473 cursor: auto; 474 opacity: 0.38; 475} 476.mat-mdc-slider.mdc-slider--disabled .mdc-slider__input { 477 cursor: auto; 478} 479.mat-mdc-slider .mdc-slider__thumb, 480.mat-mdc-slider .mdc-slider__track--active_fill { 481 transition-duration: 0ms; 482} 483.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb, 484.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill { 485 transition-duration: 80ms; 486} 487.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb, 488.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill { 489 transition-duration: 0ms; 490} 491.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb, 492.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill { 493 transition-duration: 80ms; 494} 495.mat-mdc-slider .mat-ripple .mat-ripple-element { 496 background-color: var(--mat-slider-ripple-color, var(--mat-sys-primary)); 497} 498.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple { 499 background-color: var(--mat-slider-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 5%, transparent)); 500} 501.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple, 502.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple { 503 background-color: var(--mat-slider-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent)); 504} 505.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb, .mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill, 506.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator { 507 transition: none; 508} 509.mat-mdc-slider .mat-focus-indicator::before { 510 border-radius: 50%; 511} 512 513.mdc-slider__thumb--focused .mat-focus-indicator::before { 514 content: ""; 515} 516`],encapsulation:2,changeDetection:0});}return n;})();var WG={provide:dd,useExisting:fp(()=>h0),multi:!0};var h0=(()=>{class n{_ngZone=re(ya);_elementRef=re(qa);_cdr=re(Pa);_slider=re(qS);_platform=re(df);_listenerCleanups;get value(){return Yr(this._hostElement.value,0);}set value(e){e===null&&(e=this._getDefaultValue()),e=isNaN(e)?0:e;let i=e+"";if(!this._hasSetInitialValue){this._initialValue=i;return;}this._isActive||this._setValue(i);}_setValue(e){this._hostElement.value=e,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges(),this._slider._cdr.markForCheck();}valueChange=new At();dragStart=new At();dragEnd=new At();get translateX(){return this._slider.min>=this._slider.max?(this._translateX=this._tickMarkOffset,this._translateX):(this._translateX===void 0&&(this._translateX=this._calcTranslateXByValue()),this._translateX);}set translateX(e){this._translateX=e;}_translateX;thumbPosition=ii.END;get min(){return Yr(this._hostElement.min,0);}set min(e){this._hostElement.min=e+"",this._cdr.detectChanges();}get max(){return Yr(this._hostElement.max,0);}set max(e){this._hostElement.max=e+"",this._cdr.detectChanges();}get step(){return Yr(this._hostElement.step,0);}set step(e){this._hostElement.step=e+"",this._cdr.detectChanges();}get disabled(){return Yi(this._hostElement.disabled);}set disabled(e){this._hostElement.disabled=e,this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled);}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl()?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min);}get fillPercentage(){return this._slider._cachedWidth?this._translateX===0?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl()?1:0;}_hostElement=this._elementRef.nativeElement;_valuetext=tc("");_knobRadius=8;_tickMarkOffset=3;_isActive=!1;_isFocused=!1;_setIsFocused(e){this._isFocused=e;}_hasSetInitialValue=!1;_initialValue;_formControl;_destroyed=new oa();_skipUIUpdate=!1;_onChangeFn;_onTouchedFn=()=>{};_isControlInitialized=!1;constructor(){let e=re(ic);this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[e.listen(this._hostElement,"pointerdown",this._onPointerDown.bind(this)),e.listen(this._hostElement,"pointermove",this._onPointerMove.bind(this)),e.listen(this._hostElement,"pointerup",this._onPointerUp.bind(this))];});}
516ngOnDestroy(){this._listenerCleanups.forEach(e=>e()),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete();}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue();}initUI(){this._updateThumbUIByValue();}_initValue(){this._hasSetInitialValue=!0,this._initialValue===void 0?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges());}_getDefaultValue(){return this.min;}_onBlur(){this._setIsFocused(!1),this._onTouchedFn();}_onFocus(){this._slider._setTransition(!1),this._slider._updateTrackUI(this),this._setIsFocused(!0);}_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0});}_onInput(){this._onChangeFn?.(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this);}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled;}_onPointerDown(e){if(!(this.disabled||e.button!==0)){if(this._platform.IOS){let i=this._slider._isCursorOnSliderThumb(e,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());this._isActive=i,this._updateWidthActive(),this._slider._updateDimensions();return;}this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(e,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(e),this.dragStart.emit({source:this,parent:this._slider,value:this.value}));}}_handleValueCorrection(e){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(e);},0);}_fixValue(e){let i=e.clientX-this._slider._cachedLeft,o=this._slider._cachedWidth,a=this._slider.step===0?1:this._slider.step,r=Math.floor((this._slider.max-this._slider.min)/a),l=this._slider._isRtl()?1-i/o:i/o,d=Math.round(l*r)/r*(this._slider.max-this._slider.min)+this._slider.min,f=Math.round(d/a)*a,h=this.value;if(f===h){this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation});return;}this.value=f,this.valueChange.emit(this.value),this._onChangeFn?.(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(e,{withAnimation:this._slider._hasAnimation});}_onPointerMove(e){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(e);}_onPointerUp(){this._isActive&&(this._isActive=!1,this._platform.SAFARI&&this._setIsFocused(!1),this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive(),this._platform.IOS?10:0));}_clamp(e){let i=this._tickMarkOffset,o=this._slider._cachedWidth-this._tickMarkOffset;return Math.max(Math.min(e,o),i);}_calcTranslateXByValue(){return this._slider._isRtl()?(1-this.percentage)*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset:this.percentage*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset;}_calcTranslateXByPointerEvent(e){return e.clientX-this._slider._cachedLeft;}_updateWidthActive(){}_updateWidthInactive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding-this._tickMarkOffset*2}px)`,this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`;}_updateThumbUIByValue(e){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(e);}_updateThumbUIByPointerEvent(e,i){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(e)),this._updateThumbUI(i);}_updateThumbUI(e){this._slider._setTransition(!!e?.withAnimation),this._slider._onTranslateXChange(this);}writeValue(e){(this._isControlInitialized||e!==null)&&(this.value=e);}registerOnChange(e){this._onChangeFn=e,this._isControlInitialized=!0;}registerOnTouched(e){this._onTouchedFn=e;}setDisabledState(e){this.disabled=e;}focus(){this._hostElement.focus();}blur(){this._hostElement.blur();}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-sli
516der__input"],hostVars:1,hostBindings:function(i,o){i&1&&E("change",function(){return o._onChange();})("input",function(){return o._onInput();})("blur",function(){return o._onBlur();})("focus",function(){return o._onFocus();}),i&2&&Yo("aria-valuetext",o._valuetext());},inputs:{value:[2,"value","value",Yr]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[aa([WG,{provide:OR,useExisting:n}])]});}return n;})();var $f=(()=>{class n{static ɵfac=function(i){return new(i||n)();};static ɵmod=sr({type:n});static ɵinj=ar({imports:[qT,cd]});}return n;})();var AC={toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["link","image","video"],["table"]]},JS=new qi("config",{providedIn:"root",factory:()=>({modules:AC})});var IR=n=>af([{provide:JS,useValue:n}]);var XG=[[["","above-quill-editor-toolbar",""]],[["","quill-editor-toolbar",""]],[["","below-quill-editor-toolbar",""]]],YG=["[above-quill-editor-toolbar]","[quill-editor-toolbar]","[below-quill-editor-toolbar]"];function KG(n,t){n&1&&Ur(0,"div",0);}function ZG(n,t){n&1&&Ur(0,"div",0);}var QG=(()=>{class n{constructor(){this.config=re(JS)||{modules:AC},this.quill$=Ux(()=>$(this,null,function*(){if(!this.Quill){let{Quill:e}=yield import("./chunk-KGBJPSES.js");this.Quill=e;}return this.config.customOptions?.forEach(e=>{let i=this.Quill.import(e.import);i.whitelist=e.whitelist,this.Quill.register(i,!0,this.config.suppressGlobalRegisterWarning);}),new Promise(e=>{this.registerCustomModules(this.Quill,this.config.customModules,this.config.suppressGlobalRegisterWarning).subscribe(e);});})).pipe(Yx({bufferSize:1,refCount:!1})),this.registeredModules=new Set();}getQuill(){return this.quill$;}beforeRender(e,i,o=this.config.beforeRender){let a=[this.registerCustomModules(e,i)];return o&&a.push(o()),Nw(a).pipe(Xo(()=>e));}registerCustomModules(e,i,o){if(!Array.isArray(i))return Gi(e);let a=[];for(let r of i){let{path:l,implementation:p}=r;this.registeredModules.has(l)||(this.registeredModules.add(l),D_(p)?a.push(p.pipe(Jr(d=>{e.register(l,d,o);}))):e.register(l,p,o));}return a.length>0?Nw(a).pipe(Xo(()=>e)):Gi(e);}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});}}return n;})();var _0=(n,t)=>n||t||"html",eq=(()=>{class n{constructor(){this.format=Un(),this.theme=Un(),this.modules=Un(),this.debug=Un(!1),this.readOnly=Un(!1,{transform:Yi}),this.placeholder=Un(),this.maxLength=Un(),this.minLength=Un(),this.required=Un(!1,{transform:Yi}),this.formats=Un(),this.customToolbarPosition=Un("top"),this.sanitize=Un(),this.beforeRender=Un(),this.styles=Un(null),this.registry=Un(),this.bounds=Un(),this.customOptions=Un([]),this.customModules=Un([]),this.trackChanges=Un(),this.classes=Un(),this.trimOnValidation=Un(!1,{transform:Yi}),this.linkPlaceholder=Un(),this.compareValues=Un(!1,{transform:Yi}),this.filterNull=Un(!1,{transform:Yi}),this.debounceTime=Un(),this.onlyFormatEventData=Un(!1),this.defaultEmptyValue=Un(null),this.onEditorCreated=new At(),this.onEditorChanged=new At(),this.onContentChanged=new At(),this.onSelectionChanged=new At(),this.onFocus=new At(),this.onBlur=new At(),this.onNativeFocus=new At(),this.onNativeBlur=new At(),this.disabled=!1,this.toolbarPosition=tc("top"),this.eventsSubscription=null,this.quillSubscription=null,this.elementRef=re(qa),this.domSanitizer=re(sd),this.platformId=re(Zx),this.renderer=re(ic),this.service=re(QG),this.destroyRef=re(rf),this.init=!1,this.valueGetter=Un(this.getter.bind(this)),this.valueSetter=Un((e,i)=>{let o=_0(this.format(),this.service.config.format);if(o==="html")return(typeof this.sanitize()=="boolean"?this.sanitize():this.service.config.sanitize)&&(i=this.domSanitizer.sanitize(z_.HTML,i)),e.clipboard.convert({html:i});if(o==="json")try{return JSON.parse(i);}catch(a){return[{insert:i}];}return i;}),this.selectionChangeHandler=(e,i,o)=>{let a=this.trackChanges()||this.service.config.trackChanges,r=!e&&!!this.onModelTouched&&(o==="user"||a&&a==="all");!this.onBlur.observed&&!this.onFocus.observed&&!this.onSelectionChanged.observed&&!r||(e===null?this.onBlur.emit({editor:this.quillEditor,source:o}):i===null&&this.onFocus.emit({editor:this.quillEditor,source:o}),this.onSelectionChanged.emit({editor:this.quillEditor,oldRange:i,range:e,source:o}),r&&this.onModelTouched());},this.textChangeHandler=(e,i,o)=>{let a=this.trackChanges()||this.service.config.trackChanges,r=(o==="user"||a&&a==="all")&&!!this.onModelChange;if(!this.onContentChanged.observed&&!r)return;let l=this.eventCallbackFormats();r&&this.onModelChange(l.noFormat?this.valueGetter()(this.quillEditor):l[l.format]),this.onContentChanged.emit({content:l.object,delta:e,editor:this.quillEditor,html:l.html,oldDelta:i,source:o,text:l.text});},this.editorChangeHandler=(e,i,o,a)=>
516{if(this.onEditorChanged.observed)if(e==="text-change"){let r=this.eventCallbackFormats();this.onEditorChanged.emit({content:r.object,delta:i,editor:this.quillEditor,event:e,html:r.html,oldDelta:o,source:a,text:r.text});}else this.onEditorChanged.emit({editor:this.quillEditor,event:e,oldRange:o,range:i,source:a});},e1(()=>{MT(this.platformId)||(this.quillSubscription=this.service.getQuill().pipe(zm(e=>this.service.beforeRender(e,this.customModules(),this.beforeRender()))).subscribe(e=>{this.editorElem=this.elementRef.nativeElement.querySelector("[quill-editor-element]");let i=this.elementRef.nativeElement.querySelector("[quill-editor-toolbar]"),o=Object.assign({},this.modules()||this.service.config.modules);i?o.toolbar=i:o.toolbar===void 0&&(o.toolbar=AC.toolbar);let a=this.placeholder()!==void 0?this.placeholder():this.service.config.placeholder;a===void 0&&(a="Insert text here ...");let r=this.styles();r&&(this.previousStyles=r,Object.keys(r).forEach(g=>{this.renderer.setStyle(this.editorElem,g,r[g]);}));let l=this.classes();l&&(this.previousClasses=l,this.addClasses(l)),this.customOptions().forEach(g=>{let b=e.import(g.import);b.whitelist=g.whitelist,e.register(b,!0);});let p=this.bounds()&&this.bounds()==="self"?this.editorElem:this.bounds();p||(p=this.service.config.bounds?this.service.config.bounds:document.body);let d=this.debug();!d&&d!==!1&&this.service.config.debug&&(d=this.service.config.debug);let f=this.readOnly();!f&&this.readOnly()!==!1&&(f=this.service.config.readOnly!==void 0?this.service.config.readOnly:!1);let h=this.formats();if(!h&&h===void 0&&(h=this.service.config.formats?[...this.service.config.formats]:this.service.config.formats===null?null:void 0),this.quillEditor=new e(this.editorElem,{bounds:p,debug:d,formats:h,modules:o,placeholder:a,readOnly:f,registry:this.registry(),theme:this.theme()||(this.service.config.theme?this.service.config.theme:"snow")}),this.onNativeBlur.observed){ba(this.quillEditor.scroll.domNode,"blur").pipe(Pp(this.destroyRef)).subscribe(()=>this.onNativeBlur.next({editor:this.quillEditor,source:"dom"}));let g=this.quillEditor.getModule("toolbar");g.container&&ba(g.container,"mousedown").pipe(Pp(this.destroyRef)).subscribe(b=>b.preventDefault());}if(this.onNativeFocus.observed&&ba(this.quillEditor.scroll.domNode,"focus").pipe(Pp(this.destroyRef)).subscribe(()=>this.onNativeFocus.next({editor:this.quillEditor,source:"dom"})),this.linkPlaceholder()){let b=this.quillEditor?.theme?.tooltip?.root?.querySelector("input[data-link]");b?.dataset&&(b.dataset.link=this.linkPlaceholder());}if(this.content){if(_0(this.format(),this.service.config.format)==="text")this.quillEditor.setText(this.content,"silent");else{let T=this.valueSetter()(this.quillEditor,this.content);this.quillEditor.setContents(T,"silent");}this.quillEditor.getModule("history").clear();}if(this.setDisabledState(),this.addQuillEventListeners(),!this.onEditorCreated.observed&&!this.onValidatorChanged){this.init=!0;return;}this.onValidatorChanged&&this.onValidatorChanged(),this.onEditorCreated.emit(this.quillEditor),this.init=!0;}));}),kc(()=>{let e=this.customToolbarPosition();this.toolbarPosition()!==e&&this.toolbarPosition.set(e);}),kc(()=>{let e=this.readOnly();this.init&&(e?this.quillEditor?.disable():this.quillEditor?.enable(!0));}),kc(()=>{let e=this.placeholder();this.init&&this.quillEditor&&(this.quillEditor.root.dataset.placeholder=e);}),kc(()=>{let e=this.styles();if(!this.init||!this.editorElem)return;let i=e,o=this.previousStyles;o&&Object.keys(o).forEach(a=>{this.renderer.removeStyle(this.editorElem,a);}
516),i&&Object.keys(i).forEach(a=>{this.renderer.setStyle(this.editorElem,a,i[a]);});}),kc(()=>{let e=this.classes();if(!this.init||!this.quillEditor)return;let i=e,o=this.previousClasses;o&&this.removeClasses(o),i&&this.addClasses(i);}),kc(()=>{let e=this.debounceTime();!this.init||!this.quillEditor||e&&this.addQuillEventListeners();}),this.destroyRef.onDestroy(()=>{this.dispose(),this.quillSubscription?.unsubscribe(),this.quillSubscription=null;});}static normalizeClassNames(e){return e.trim().split(" ").reduce((o,a)=>{let r=a.trim();return r&&o.push(r),o;},[]);}addClasses(e){n.normalizeClassNames(e).forEach(i=>{this.renderer.addClass(this.editorElem,i);});}removeClasses(e){n.normalizeClassNames(e).forEach(i=>{this.renderer.removeClass(this.editorElem,i);});}writeValue(e){if(this.filterNull()&&e===null||(this.content=e,!this.quillEditor))return;let i=_0(this.format(),this.service.config.format),a=this.valueSetter()(this.quillEditor,e);if(this.compareValues()){let r=this.quillEditor.getContents();if(JSON.stringify(r)===JSON.stringify(a))return;}if(e){i==="text"?this.quillEditor.setText(e):this.quillEditor.setContents(a);return;}this.quillEditor.setText("");}setDisabledState(e=this.disabled){this.disabled=e,this.quillEditor&&(e?(this.quillEditor.disable(),this.renderer.setAttribute(this.elementRef.nativeElement,"disabled","disabled")):(this.readOnly()||this.quillEditor.enable(),this.renderer.removeAttribute(this.elementRef.nativeElement,"disabled")));}registerOnChange(e){this.onModelChange=e;}registerOnTouched(e){this.onModelTouched=e;}registerOnValidatorChange(e){this.onValidatorChanged=e;}validate(){if(!this.quillEditor)return null;let e={},i=!0,o=this.quillEditor.getText(),a=this.trimOnValidation()?o.trim().length:o.length===1&&o.trim().length===0?0:o.length-1,r=this.quillEditor.getContents().ops,l=!!r&&r.length===1&&[` 517`,""].includes(r[0].insert?.toString()||""),p=this.minLength();p&&a&&a<p&&(e.minLengthError={given:a,minLength:p},i=!1);let d=this.maxLength();return d&&a>d&&(e.maxLengthError={given:a,maxLength:d},i=!1),this.required()&&!a&&l&&(e.requiredError={empty:!0},i=!1),i?null:e;}addQuillEventListeners(){this.dispose(),this.eventsSubscription=new jo(),this.eventsSubscription.add(ba(this.quillEditor,"selection-change").subscribe(([a,r,l])=>{this.selectionChangeHandler(a,r,l);}));let e=ba(this.quillEditor,"text-change"),i=ba(this.quillEditor,"editor-change"),o=this.debounceTime();typeof o=="number"&&(e=e.pipe(Fm(o)),i=i.pipe(Fm(o))),this.eventsSubscription.add(e.subscribe(([a,r,l])=>{this.textChangeHandler(a,r,l);})),this.eventsSubscription.add(i.subscribe(([a,r,l,p])=>{this.editorChangeHandler(a,r,l,p);}));}dispose(){this.eventsSubscription?.unsubscribe(),this.eventsSubscription=null;}isEmptyValue(e){return e==="<p></p>"||e==="<div></div>"||e==="<p><br></p>"||e==="<div><br></div>";}getter(e,i){let o=null,a=i??_0(this.format(),this.service.config.format);if(a==="html"){let r=e.getSemanticHTML();this.isEmptyValue(r)&&(r=this.defaultEmptyValue()),o=r;}else if(a==="text")o=e.getText();else if(a==="object")o=e.getContents();else if(a==="json")try{o=JSON.stringify(e.getContents());}catch(r){o=e.getText();}return o;}eventCallbackFormats(){let e=_0(this.format(),this.service.config.format),i=this.onlyFormatEventData()===!0,o=this.onlyFormatEventData()==="none",a=null,r=null,l=null,p=null;if(o)return{format:e,onlyFormat:i,noFormat:o,text:a,object:l,json:p,html:r};let d=this.valueGetter()(this.quillEditor);return e==="text"?a=d:e==="html"?r=d:e==="object"?(l=d,p=JSON.stringify(d)):e==="json"&&(p=d,l=JSON.parse(d)),i?{format:e,onlyFormat:i,noFormat:o,text:a,json:p,html:r,object:l}:{format:e,onlyFormat:i,noFormat:o,text:e==="text"?a:this.getter(this.quillEditor,"text"),json:e==="json"?p:this.getter(this.quillEditor,"json"),html:e==="html"?r:this.getter(this.quillEditor,"html"),object:e==="object"?l:this.getter(this.quillEditor,"object")};}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵdir=bo({type:n,inputs:{format:[1,"format"],theme:[1,"theme"],modules:[1,"modules"],debug:[1,"debug"],readOnly:[1,"readOnly"],placeholder:[1,"placeholder"],maxLength:[1,"maxLength"],minLength:[1,"minLength"],required:[1,"required"],formats:[1,"formats"],customToolbarPosition:[1,"customToolbarPosition"],sanitize:[1,"sanitize"],beforeRender:[1,"beforeRender"],styles:[1,"styles"],registry:[1,"registry"],bounds:[1,"bounds"],customOptions:[1,"customOptions"],customModules:[1,"customModules"],trackChanges:[1,"trackChanges"],classes:[1,"classes"],trimOnValidation:[1,"trimOnValidation"],linkPlaceholder:[1,"linkPlaceholder"],compareValues:[1,"compareValues"],filterNull:[1,"filterNull"],debounceTime:[1,"debounceTime"],onlyFormatEventData:[1,"onlyFormatEventData"],defaultEmptyValue:[1,"defaultEmptyValue"],valueGetter:[1,"valueGetter"],valueSetter:[1,"valueSetter"]},outputs:{onEditorCreated:"onEditorCreated",onEditorChanged:"onEditorChanged",onContentChanged:"onContentChanged",onSelectionChanged:"onSelectionChanged",onFocus:"onFocus",onBlur:"onBlur",onNativeFocus:"onNativeFocus",onNativeBlur:"onNativeBlur"}});}}return n;})(),DC=(()=>{class n extends eq{static{this.ɵfac=(()=>{let e;return function(o){return(e||(e=nc(n)))(o||n);};})();}static{this.ɵcmp=Te({type:n,selectors:[["quill-editor"]],features:[aa([{multi:!0,provide:dd,useExisting:fp(()=>n)},{multi:!0,provide:v3,useExisting:fp(()=>n)}]),Ja],ngContentSelectors:YG,decls:5,vars:2,consts:[["quill-editor-element",""]],template:function(i,o){i&1&&(vl(XG),S(0,KG,1,0,"div",0),As(1),As(2,1),As(3,2),S(4,ZG,1,0,"div",0)),i&2&&(M(o.toolbarPosition()!=="top"?0:-1),m(4),M(o.toolbarPosition()==="top"?4:-1));},styles:["[_nghost-%COMP%]{display:inline-block}"],changeDetection:0});}}return n;})();function tq(n,t){n&1&&u(0," 1. General field information ");}function nq(n,t){n&1&&u(0," 2. Generate Prompt ");}
517function iq(n,t){n&1&&u(0," 3. Compliance Prompt ");}function oq(n,t){n&1&&u(0," 4. Latest Prompts ");}function aq(n,t){n&1&&(fi(0),s(1,"p",27),u(2,"No generation prompt debug data found."),c(),hi());}function rq(n,t){if(n&1&&(s(0,"mat-expansion-panel",29)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),u(3),c()(),s(4,"div",30),u(5),c(),s(6,"mat-expansion-panel",31)(7,"mat-expansion-panel-header")(8,"mat-panel-title"),u(9,"Parameters sent to cloud function"),c()(),s(10,"pre",32),u(11),c()()()),n&2){let e=t.$implicit,i=t.index,o=x(2);N("expanded",i===0),m(3),G(e.id),m(2),G(e.prompt),m(6),G(o.formatJson(e.data));}}function sq(n,t){if(n&1&&(s(0,"mat-accordion"),Zt(1,rq,12,4,"mat-expansion-panel",28),c()),n&2){let e=x();m(),N("ngForOf",e.generationDebugList);}}function lq(n,t){n&1&&(fi(0),s(1,"p",27),u(2,"No compliance prompt debug data found."),c(),hi());}function cq(n,t){if(n&1&&(s(0,"mat-expansion-panel",29)(1,"mat-expansion-panel-header")(2,"mat-panel-title"),u(3),c()(),s(4,"div",30),u(5),c(),s(6,"mat-expansion-panel",31)(7,"mat-expansion-panel-header")(8,"mat-panel-title"),u(9,"Parameters sent to cloud function"),c()(),s(10,"pre",32),u(11),c()()()),n&2){let e=t.$implicit,i=t.index,o=x(2);N("expanded",i===0),m(3),G(e.id),m(2),G(e.prompt),m(6),G(o.formatJson(e.data));}}function pq(n,t){if(n&1&&(s(0,"mat-accordion"),Zt(1,cq,12,4,"mat-expansion-panel",28),c()),n&2){let e=x();m(),N("ngForOf",e.complianceDebugList);}}var jC=class n{constructor(t,e,i,o,a){this.authService=t;this.firebase=e;this.bottomSheet=i;this.dialogRef=o;this.data=a;this.data&&(this.dialogData=a,this.dialogData&&(this.field=this.dialogData.field,this.version=this.dialogData.version,this.objectType=this.dialogData.objectType)),this.fieldForm=new Ri({label_enCA:new st("",Ye.required),label_frCA:new st("",Ye.required),description_summary_enCA:new st("",Ye.required),description_summary_frCA:new st("",Ye.required),description_enCA:new st("",Ye.required),description_frCA:new st("",Ye.required),instructions:new st("",Ye.required),default_wordcount:new st("",Ye.required)}),this.compliancePromptForm=new Ri({prompt:new st("",Ye.required)}),this.generationPromptForm=new Ri({prompt:new st("",Ye.required)});}authService;firebase;bottomSheet;dialogRef;data;onDebugData=new At();fieldForm;compliancePromptForm;generationPromptForm;field;version;dialogData;objectType;fieldRef;fieldObj;compliancePromptRef;generationPromptRef;compliancePromptObj;generationPromptObj;generationDebugList=[];complianceDebugList=[];ngOnInit(){return $(this,null,function*(){try{this.getLatestDebugPrompt(),this.fieldRef=ge(this.firebase.firestore,"objects/"+this.objectType+"/fields/"+this.field+"_"+this.version);let t=yield yt(this.fieldRef);if(!t.exists())throw new Error("Could not load intelligent field");if(this.fieldObj=X({id:t.id},t.data()),!this.fieldObj)return;if(this.fieldForm.patchValue({label_enCA:this.fieldObj.label_enCA,label_frCA:this.fieldObj.label_frCA,description_summary_enCA:this.fieldObj.description_summary_enCA,description_summary_frCA:this.fieldObj.description_summary_frCA,description_enCA:this.fieldObj.description_enCA,description_frCA:this.fieldObj.description_frCA,instructions:this.fieldObj.instructions,default_wordcount:this.fieldObj.default_wordcount}),this.compliancePromptRef=ge(this.firebase.firestore,"objects/"+this.objectType+"/fields/"+this.field+"_"+this.version+"/prompts/compliance"),this.generationPromptRef=ge(this.firebase.firestore,"objects/"+this.objectType+"/fields/"+this.field+"_"+this.version+"/prompts/generation"),this.compliancePromptRef){let e=yield yt(this.compliancePromptRef);e.exists()&&(this.compliancePromptObj=X({id:e.id},e.data())),this.compliancePromptObj&&this.compliancePromptForm.patchValue({prompt:this.compliancePromptObj.prompt});}if(this.generationPromptRef){let e=yield yt(this.generationPromptRef);e.exists()&&(this.generationPromptObj=X({id:e.id},e.data())),this.generationPromptObj&&this.generationPromptForm.patchValue({prompt:this.generationPromptObj.prompt});}}catch(t){throw console.log(t),t;}});}submitForm(t,e){return $(this,null,function*(){let i=ts.extractDataFromFormGroup(t);e?yield Dt(e,i,{merge:!0}):yield Ht(we(this.firebase.firestore,e),i);});}getLatestDebugPrompt(){return $(this,null,function*(){let t="objects/"+this.objectType+"/fields/"+this.field+"_"+this.version,e=we(this.firebase.firestore,t+"/prompts/generation/debug"),i=mt(e,Jt("__name__","desc"),H_(10)),o=yield at(i);this.generationDebugList=o.docs.map(p=>X({id:p.id},p.data()));let a=we(this.firebase.firestore,t+"/prompts/compliance/debug"),r=mt(a,Jt("__name__","desc"),H_(10)),l=yield at(r);this.complianceDebugList=l.docs.map(p=>X({id:p.id},p.data()));});}formatJson(t){try{return JSON.stringify(t,null,2);}catch(e){return String(t);}}onCancel(){this.dialogRef.close();}clickSubmitAll(){this.fieldRef&&this.submitForm(this.fieldForm,this.fieldRef),this.compliancePromptRef&&this.submitForm(this.compliancePromptForm,this.compliancePromptRef),this.generationPromptRef&&this.submitForm(this.generationPromptForm,this.generationPromptRef),this.dialogRef&&this.dialogRef.close();}closeDialog(){this.dialogRef&&this.dialogRef.close();}static ɵfac=function(e){return new(e||n)(le(Oo),le(On),le(f0),le(Li,8),le(fo,8));};static ɵcmp=Te({type:n,selectors:[["app-intelligent-field-edit"]],inputs:{field:"field",version:"version"},outputs:{onDebugData:"onDebugData"},decls:129,vars:7,consts:[["autosize","cdkTextareaAutosize"],[1,"main-container"],[1,"modal-header"],[1,"modal-title"],["mat-icon-button","",1,"close-button",3,"click"],[1,"content"],["mat-tab-label",""],[1,"flex-container"],[3,"formGroup"],[1,"div-title"],[1,"div-form-element"],[1,"mat-form-field-form"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","25","formControlName","label_enCA"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","25","formControlName","label_frCA"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","25","formControlName","description_summary_enCA"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","25","formControlName","description_summary_frCA"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","25","formControlName","description_enCA"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","25","formControlName","description_frCA"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","2","cdkAutosizeMaxRows","25","formControlName","instructions"],["matInput","","type","number","formControlName","default_wordcount"],["matInput","","cdkTextareaAutosize","","cdkAutosizeMinRows","4","cdkAutosizeMaxRows","40","formControlName","prompt"],[4,"ngIf"],[1,"div-title",2,"margin-top","24px"],[1,"button-container"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"click"],[1,"n
517o-data"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],[1,"debug-prompt-text"],[1,"params-panel"],[1,"debug-params"]],template:function(e,i){e&1&&(s(0,"div",1)(1,"div",2)(2,"div",3),u(3,"Edit intelligent field"),c(),s(4,"button",4),E("click",function(){return i.closeDialog();}),s(5,"mat-icon"),u(6,"close"),c()()(),s(7,"div",5)(8,"mat-tab-group")(9,"mat-tab"),Zt(10,tq,1,0,"ng-template",6),s(11,"div",7)(12,"form",8)(13,"div",9),u(14," Labels "),c(),s(15,"div",10)(16,"mat-form-field",11)(17,"mat-label"),u(18,"Label (EN)"),c(),ee(19,"textarea",12,0),s(21,"mat-error"),u(22,"Invalid"),c()()(),s(23,"div",10)(24,"mat-form-field",11)(25,"mat-label"),u(26,"Label (FR)"),c(),ee(27,"textarea",13,0),s(29,"mat-error"),u(30,"Invalid"),c()()(),s(31,"div",9),u(32," Short description "),c(),s(33,"div",10)(34,"mat-form-field",11)(35,"mat-label"),u(36,"Short Description (EN)"),c(),ee(37,"textarea",14,0),s(39,"mat-error"),u(40,"Invalid"),c()()(),s(41,"div",10)(42,"mat-form-field",11)(43,"mat-label"),u(44,"Short Description (FR)"),c(),ee(45,"textarea",15,0),s(47,"mat-error"),u(48,"Invalid"),c()()(),s(49,"div",9),u(50," Long definition "),c(),s(51,"div",10)(52,"mat-form-field",11)(53,"mat-label"),u(54,"Long Description (EN)"),c(),ee(55,"textarea",16,0),s(57,"mat-error"),u(58,"Invalid"),c()()(),s(59,"div",10)(60,"mat-form-field",11)(61,"mat-label"),u(62,"Long Description (FR)"),c(),ee(63,"textarea",17,0),s(65,"mat-error"),u(66,"Invalid"),c()()(),s(67,"div",9),u(68," AI Instructions "),c(),s(69,"div",10)(70,"mat-form-field",11)(71,"mat-label"),u(72,"Instructions"),c(),ee(73,"textarea",18,0),s(75,"mat-error"),u(76,"Invalid"),c()()(),s(77,"div",10)(78,"mat-form-field",11)(79,"mat-label"),u(80,"Default word count"),c(),ee(81,"input",19),s(82,"mat-error"),u(83,"Invalid"),c()()()()()(),s(84,"mat-tab"),Zt(85,nq,1,0,"ng-template",6),s(86,"div",7)(87,"form",8)(88,"div",9),u(89," Prompt "),c(),s(90,"div",10)(91,"mat-form-field",11)(92,"mat-label"),u(93,"Prompt"),c(),ee(94,"textarea",20,0),s(96,"mat-error"),u(97,"Invalid"),c()()()()()(),s(98,"mat-tab"),Zt(99,iq,1,0,"ng-template",6),s(100,"div",7)(101,"form",8)(102,"div",9),u(103," Prompt "),c(),s(104,"div",10)(105,"mat-form-field",11)(106,"mat-label"),u(107,"Prompt"),c(),ee(108,"textarea",20,0),s(110,"mat-error"),u(111,"Invalid"),c()()()()()(),s(112,"mat-tab"),Zt(113,oq,1,0,"ng-template",6),s(114,"div",7)(115,"div",9),u(116,"Generation Prompts"),c(),Zt(117,aq,3,0,"ng-container",21)(118,sq,2,1,"mat-accordion",21),s(119,"div",22),u(120,"Compliance Prompts"),c(),Zt(121,lq,3,0,"ng-container",21)(122,pq,2,1,"mat-accordion",21),c()()()(),s(123,"div",23)(124,"div",24)(125,"button",25),E("click",function(){return i.onCancel();}),u(126,"Cancel"),c(),s(127,"button",26),E("click",function(){return i.clickSubmitAll();}),u(128," Save "),c()()()()),e&2&&(m(12),N("formGroup",i.fieldForm),m(75),N("formGroup",i.generationPromptForm),m(14),N("formGroup",i.compliancePromptForm),m(16),N("ngIf",i.generationDebugList.length===0),m(),N("ngIf",i.generationDebugList.length>0),m(3),N("ngIf",i.complianceDebugList.length===0),m(),N("ngIf",i.complianceDebugList.length>0));},dependencies:[gn,Nn,Ft,Ea,Tt,Mn,tn,An,Wn,ut,bT,yT,kC,es,gr,Sl,fr,hr,_r,Gt,Vt,Wt,ti,We,Xe,jt,Xt,ud,$e,Qe,Qt,Tl,vd,Ol,El],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
517.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.modal-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:16px}.modal-title[_ngcontent-%COMP%]{font-size:20px;font-weight:500;color:#465d91}.close-button[_ngcontent-%COMP%]{margin-left:auto}.div-title[_ngcontent-%COMP%]{color:#465d91;margin-bottom:10px;font-weight:700;display:flex;flex-direction:row;justify-content:space-between}.content[_ngcontent-%COMP%]{width:100%}.main-container[_ngcontent-%COMP%]{margin:10px;max-height:80vh}.button-container[_ngcontent-%COMP%]{width:100%;gap:20px;
517display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}.flex-container[_ngcontent-%COMP%]{margin:20px;display:flex;flex-direction:column;flex-wrap:nowrap;padding-left:5px;border-left:5px solid #465d91}.flex-container-noborder[_ngcontent-%COMP%]{margin:20px;display:flex;flex-direction:column;flex-wrap:nowrap}.div-form-element[_ngcontent-%COMP%]{margin:auto;width:100%}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}mat-dialog-actions[_ngcontent-%COMP%]{margin-top:16px;display:flex;justify-content:flex-end}.debug-prompt-text[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word;font-family:monospace;font-size:12px;line-height:1.5;background:#0000000a;border-radius:4px;padding:12px;margin-bottom:12px;max-height:300px;overflow-y:auto}.params-panel[_ngcontent-%COMP%]{margin-top:8px;box-shadow:none!important;border:1px solid rgba(0,0,0,.12);border-radius:4px}.debug-params[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word;font-family:monospace;font-size:11px;line-height:1.4;max-height:300px;overflow-y:auto;margin:0}.no-data[_ngcontent-%COMP%]{color:#0006;font-style:italic;margin:8px 0}"]});};var dq=["editorContainer"],mq="[_nghost-%COMP%]{display:block;height:200px}.editor-container[_ngcontent-%COMP%]{width:100%;height:98%}",US=new qi("NGX_MONACO_EDITOR_CONFIG"),kR=!1,RR,NR=(()=>{class n{constructor(){this.config=re(US),this.onInit=new At(),this._insideNg=!1;}set insideNg(e){this._insideNg=e,this._editor&&(this._editor.dispose(),this.initMonaco(this._options,this.insideNg));}get insideNg(){return this._insideNg;}ngAfterViewInit(){kR?RR.then(()=>{this.initMonaco(this._options,this.insideNg);}):(kR=!0,RR=new Promise(e=>{let i=this.config.baseUrl;if((i==="assets"||!i)&&(i="./assets/monaco/min/vs"),typeof window.monaco=="object"){this.initMonaco(this._options,this.insideNg),e();return;}let o=l=>{let p=l||window.require,d={paths:{vs:`${i}`}};Object.assign(d,this.config.requireConfig||{}),p.config(d),p(["vs/editor/editor.main"],()=>{typeof this.config.onMonacoLoad=="function"&&this.config.onMonacoLoad(),this.initMonaco(this._options,this.insideNg),e();});};if(this.config.monacoRequire)o(this.config.monacoRequire);else if(window.require){if(window.require.config)o();else{var a=`${i}/loader.js`,r=new XMLHttpRequest();r.addEventListener("load",()=>{let l=document.createElement("script");l.type="text/javascript",l.text=["var nodeRequire = require;",r.responseText.replace('"use strict";',""),"var monacoAmdRequire = require;","require = nodeRequire;","require.nodeRequire = require;"].join(` 518`),document.body.appendChild(l),o(window.monacoAmdRequire);}),r.open("GET",a),r.send();}}else{let l=document.createElement("script");l.type="text/javascript",l.src=`${i}/loader.js`,l.addEventListener("load",()=>{o();}),document.body.appendChild(l);}}));}ngOnDestroy(){this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._editor&&(this._editor.dispose(),this._editor=void 0);}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵcmp=Te({type:n,selectors:[["ng-component"]],viewQuery:function(i,o){if(i&1&&go(dq,7),i&2){let a;qn(a=Jn())&&(o._editorContainer=a.first);}},inputs:{insideNg:"insideNg"},outputs:{onInit:"onInit"},standalone:!1,decls:0,vars:0,template:function(i,o){},encapsulation:2});}}return n;})(),AR=(()=>{class n extends NR{constructor(){super(...arguments),this.zone=re(ya),this._value="",this.propagateChange=e=>{},this.onTouched=()=>{};}set options(e){this._options=Object.assign({},this.config.defaultOptions,e),this._editor&&(this._editor.dispose(),this.initMonaco(this._options,this.insideNg));}get options(){return this._options;}set model(e){this.options.model=e,this._editor&&(this._editor.dispose(),this.initMonaco(this.options,this.insideNg));}writeValue(e){this._value=e||"",setTimeout(()=>{this._editor&&!this.options.model&&this._editor.setValue(this._value);});}registerOnChange(e){this.propagateChange=e;}registerOnTouched(e){this.onTouched=e;}setDisabledState(e){this.options.readOnly=e||this._options.readOnly;}initMonaco(e,i){let o=!!e.model;if(o){let a=monaco.editor.getModel(e.model.uri||"");a?(e.model=a,e.model.setValue(this._value)):e.model=monaco.editor.createModel(e.model.value,e.model.language,e.model.uri);}i?this._editor=monaco.editor.create(this._editorContainer.nativeElement,e):this.zone.runOutsideAngular(()=>{this._editor=monaco.editor.create(this._editorContainer.nativeElement,e);}),o||this._editor.setValue(this._value),this._editor.onDidChangeModelContent(a=>{let r=this._editor.getValue();this.zone.run(()=>
518{this.propagateChange(r),this._value=r;});}),this._editor.onDidBlurEditorWidget(()=>{this.onTouched();}),this._editor.setTheme=a=>{this.options.theme=a,monaco.editor.setTheme(a);},this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._windowResizeSubscription=ba(window,"resize").subscribe(()=>this._editor.layout()),this.onInit.emit(this._editor);}static{this.ɵfac=(()=>{let e;return function(o){return(e||(e=nc(n)))(o||n);};})();}static{this.ɵcmp=Te({type:n,selectors:[["ngx-monaco-editor"]],inputs:{options:"options",model:"model"},features:[aa([{provide:dd,useExisting:fp(()=>n),multi:!0}]),Ja],decls:2,vars:0,consts:[["editorContainer",""],[1,"editor-container"]],template:function(i,o){i&1&&Ur(0,"div",1,0);},styles:["[_nghost-%COMP%]{display:block;height:200px}.editor-container[_ngcontent-%COMP%]{width:100%;height:98%}"],changeDetection:0});}}return n;})(),DR=(()=>{class n extends NR{constructor(){super(...arguments),this.zone=re(ya);}set options(e){this._options=Object.assign({},this.config.defaultOptions,e),this._editor&&(this._editor.dispose(),this.initMonaco(this._options,this.insideNg));}get options(){return this._options;}set originalModel(e){this._originalModel=e,this._editor&&(this._editor.dispose(),this.initMonaco(this.options,this.insideNg));}set modifiedModel(e){this._modifiedModel=e,this._editor&&(this._editor.dispose(),this.initMonaco(this.options,this.insideNg));}initMonaco(e,i){if(!this._originalModel||!this._modifiedModel)throw new Error("originalModel or modifiedModel not found for ngx-monaco-diff-editor");this._originalModel.language=this._originalModel.language||e.language,this._modifiedModel.language=this._modifiedModel.language||e.language;let o=monaco.editor.createModel(this._originalModel.code,this._originalModel.language),a=monaco.editor.createModel(this._modifiedModel.code,this._modifiedModel.language);this._editorContainer.nativeElement.innerHTML="";let r=e.theme;i?this._editor=monaco.editor.createDiffEditor(this._editorContainer.nativeElement,e):this.zone.runOutsideAngular(()=>{this._editor=monaco.editor.createDiffEditor(this._editorContainer.nativeElement,e);}),e.theme=r,this._editor.setModel({original:o,modified:a}),this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._windowResizeSubscription=ba(window,"resize").subscribe(()=>this._editor.layout()),this.onInit.emit(this._editor);}static{this.ɵfac=(()=>{let e;return function(o){return(e||(e=nc(n)))(o||n);};})();}static{this.ɵcmp=Te({type:n,selectors:[["ngx-monaco-diff-editor"]],inputs:{options:"options",originalModel:"originalModel",modifiedModel:"modifiedModel"},features:[Ja],decls:2,vars:0,consts:[["editorContainer",""],[1,"editor-container"]],template:function(i,o){i&1&&Ur(0,"div",1,0);},styles:[mq],changeDetection:0});}}return n;})(),jR=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[{provide:US,useValue:e}]};}static{this.ɵfac=function(i){return new(i||n)();};}static{this.ɵmod=sr({type:n});}static{this.ɵinj=ar({imports:[ut]});}}return n;})();function LR(n={}){return af([{provide:US,useValue:n}]);}var LC=class n{compareText(t,e){let i=t.split(/(\s+)/),o=e.split(/(\s+)/);return this.calculateDifferences(i,o);}calculateDifferences(t,e){let i=t.length,o=e.length,a=Array.from({length:i+1},()=>Array(o+1).fill(0));for(let f=1;f<=i;f++)for(let h=1;h<=o;h++)t[f-1]===e[h-1]?a[f][h]=a[f-1][h-1]+1:a[f][h]=Math.max(a[f-1][h],a[f][h-1]);let r=i,l=o,p=[],d=[];for(;r>0||l>0;)r>0&&l>0&&t[r-1]===e[l-1]?(p.unshift({value:t[r-1],type:"equal"}),d.unshift({value:e[l-1],type:"equal"}),r--,l--):l>0&&(r===0||a[r][l-1]>=a[r-1][l])?(d.unshift({value:e[l-1],type:"changed"}),l--):r>0&&(l===0||a[r][l-1]<a[r-1][l])&&(p.unshift({value:t[r-1],type:"changed"}),r--);return{diff1:p,diff2:d};}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var WS=n=>({"icon-highlight":n}),Mp=()=>({standalone:!0});function hq(n,t){if(n&1){let e=oe();s(0,"button",47),E("click",function(){k(e);let o=x(2);return R(o.openAiModeDialog());}),s(1,"mat-icon",32),u(2),c()();}if(n&2){let e=x(2);m(),N("ngClass",Ds(2,WS,e.aiMode)),m(),G((e.aiMode,"smart_toy"));}}function _q(n,t){if(n&1){let e=oe();s(0,"button",48),E("click",function(){k(e);let o=x(2);return R(o.clickShowAdvancedHelp());}),s(1,"mat-icon",49),u(2,"help"),c()();}if(n&2){let e=x(2);m(),N("ngClass",Ds(1,WS,e.showAdvancedHelp));}}
518function gq(n,t){if(n&1){let e=oe();s(0,"div",57)(1,"div",58)(2,"span",59),u(3),c(),s(4,"span",60),u(5),Zn(6,"date"),c()(),s(7,"mat-form-field",61)(8,"textarea",62),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.text,o)||(a.text=o),R(o);}),E("blur",function(){let o=k(e).$implicit,a=x(4);return R(a.updateComment(o));}),u(9," "),c()(),s(10,"button",63),E("click",function(){let o=k(e),a=o.$implicit,r=o.$index,l=x(4);return R(l.discardComment(r,a));}),s(11,"mat-icon"),u(12,"close"),c()()();}if(n&2){let e=t.$implicit;m(3),G(e.author),m(2),G(kr(6,4,e.timestamp.toDate(),"short")),m(3),wt("ngModel",e.text),N("ngModelOptions",Oa(7,Mp));}}function xq(n,t){if(n&1&&(s(0,"div",37)(1,"div",55)(2,"div",56),be(3,gq,13,8,"div",57,Pt),c()()()),n&2){let e=x(3);m(3),ye(e.comments);}}function Cq(n,t){if(n&1){let e=oe();s(0,"div",37)(1,"div",50)(2,"mat-form-field",51)(3,"mat-label"),q(4,1),c(),s(5,"textarea",52),Mt("ngModelChange",function(o){k(e);let a=x(2);return St(a.newCommentText,o)||(a.newCommentText=o),R(o);}),u(6," "),c(),s(7,"mat-hint"),u(8),c()(),s(9,"div",53)(10,"button",54),E("click",function(){k(e);let o=x(2);return R(o.sendComment());}),s(11,"mat-icon"),u(12,"send"),c(),s(13,"span"),q(14,2),c()()()(),S(15,xq,5,0,"div",37),c();}if(n&2){let e=x(2);m(5),wt("ngModel",e.newCommentText),N("ngModelOptions",Oa(5,Mp)),m(3),_e("",e.newCommentText.length||0,"/1000"),m(2),N("disabled",!e.newCommentText||e.newCommentText.trim().length===0),m(5),M(e.comments.length>0?15:-1);}}function vq(n,t){if(n&1&&(s(0,"div",37)(1,"div",50),ee(2,"div",64),c()()),n&2){let e=x(2);m(2),N("innerHTML",e.aiInsightContent,xl);}}function bq(n,t){if(n&1&&(s(0,"div",37)(1,"div",50),ee(2,"div",64),c()()),n&2){let e=x(2);m(2),N("innerHTML",e.description_advanced,xl);}}function yq(n,t){if(n&1){let e=oe();s(0,"div",65)(1,"quill-editor",67),E("onEditorCreated",function(o){k(e);let a=x(3);return R(a.onQuillUserEditorCreated(o));})("onBlur",function(){k(e);let o=x(3);return R(o.onQuillBlur());})("mouseup",function(o){k(e);let a=x(3);return R(a.captureSelection(o));})("contextmenu",function(o){k(e);let a=x(3);return R(a.captureSelection(o));}),c()();}if(n&2){let e=x(3),i=bn(3);m(),N("modules",e.quillModules)("valueGetter",e.quillValueGetter)("valueSetter",e.quillValueSetter)("cdkContextMenuTriggerFor",i)("placeholder","Type here...")("formControlName",e.controlName);}}function Pq(n,t){if(n&1){let e=oe();s(0,"div",66)(1,"ngx-monaco-editor",68),E("ngModelChange",function(o){k(e);let a=x(3);return R(a.onMonacoEditorChange(o));})("onInit",function(o){k(e);let a=x(3);return R(a.onMonacoEditorInit(o));}),c()();}if(n&2){let e=x(3);m(),N("options",e.monacoEditorOptions)("ngModel",e.form.controls[e.controlName].value)("ngModelOptions",Oa(3,Mp));}}function wq(n,t){if(n&1&&(s(0,"div"),S(1,yq,2,6,"div",65),S(2,Pq,2,4,"div",66),c()),n&2){let e=x(2);m(),M(!e.isMarkdownMode&&e.richTextEditor?1:-1),m(),M(e.isMarkdownMode?2:-1);}}function Sq(n,t){if(n&1&&(s(0,"mat-option",80),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),_e(" ",e.label," ");}}function Mq(n,t){if(n&1&&(s(0,"mat-option",80),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),_e(" ",e.label," ");}}function Oq(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function Eq(n,t){n&1&&(s(0,"mat-icon",41),u(1,"autorenew"),c());}function Tq(n,t){n&1&&(s(0,"span"),q(1,12),c());}function Iq(n,t){n&1&&(s(0,"span"),q(1,13),c());}function kq(n,t){if(n&1){let e=oe();s(0,"div",69)(1,"div",72)(2,"mat-label"),q(3,3),c()(),s(4,"div",73)(5,"div",74)(6,"mat-label",75),q(7,4),c(),s(8,"mat-slider",76)(9,"input",77),Mt("ngModelChange",function(o){k(e);let a=x(3);return St(a.wordCount,o)||(a.wordCount=o),R(o);}),E("ngModelChange",function(o){k(e);let a=x(3);return R(a.onWordCountChange(o));}),c()()(),s(10,"mat-form-field",78)(11,"mat-label"),q(12,5),c(),s(13,"mat-select",79),Mt("ngModelChange",function(o){k(e);let a=x(3);return St(a.textMode,o)||(a.textMode=o),R(o);}),E("selectionChange",function(o){k(e);let a=x(3);return R(a.onTextModeChange(o.value));}),be(14,Sq,2,2,"mat-option",80,Pt),c()(),s(16,"mat-form-field",81)(17,"mat-label"),q(18,6),c(),s(19,"mat-select",79),Mt("ngModelChange",function(o){k(e);let a=x(3);return St(a.localeCode,o)||(a.localeCode=o),R(o);}),E("selectionChange",function(o){k(e);let a=x(3);return R(a.onLanguageChange(o.value));}),be(20,Mq,2,2,"mat-option",80,Pt),c()(),s(22,"button",82),E("click",function(){k(e);let o=x(3);return R(o.clickAddContext());}),s(23,"mat-icon"),u(24,"add_circle_outline"),c(),s(25,"span"),q(26,7),c()(),s(27,"button",83),E("click",function(){k(e);let o=x(3);return R(o.clickGenerateStream());}),S(28,Oq,2,0,"mat-icon"),S(29,Eq,2,0,"mat-icon",41),S(30,Tq,2,0,"span"),S(31,Iq,2,0,"span"),c(),s(32,"button",84),E("click",function(){k(e);let o=x(3);return R(o.clickRefine());}),s(33,"mat-icon"),u(34,"tune"),c(),s(35,"span"),q(36,8),c()(),s(37,"button",85),E("click",function(){k(e);let o=x(3);return R(o.clickAcceptWithConfirmation());}),s(38,"mat-icon"),u(39,"arrow_backward"),c(),s(40,"span"),q(41,9),c()(),s(42,"mat-button-toggle-group",86),E("change",function(o){k(e);let a=x(3);return R(a.onPanelViewChange(o));}),s(43,"mat-button-toggle",87)(44,"mat-icon"),u(45,"split_scene_left"),c()(),s(46,"mat-button-toggle",88)(47,"mat-icon"),u(48,"view_column_2"),c()(),s(49,"mat-button-toggle",89)(50,"mat-icon"),u(51,"split_scene_right"),c()()(),s(52,"button",90),E("click",function(){k(e);let o=x(3);return R(o.clickRevertWithConfirmation());}),s(53,"mat-icon"),u(54,"arrow_forward"),c(),s(55,"span"),q(56,10),c()(),s(57,"button",91),E("click",function(){k(e);let o=x(3);return R(o.clickCompareTexts());}),s(58,"mat-icon"),u(59,"compare_arrows"),c(),s(60,"span"),q(61,11),c()()()();}if(n&2){let e=x(3);m(7),us(e.wordCount),fs(7),m(),N("min",e.minWordCount)("max",e.maxWordCount)("step",10),m(),wt("ngModel",e.wordCount),N("ngModelOptions",Oa(25,Mp)),m(4),wt("ngModel",e.textMode),N("ngModelOptions",Oa(26,Mp)),m(),ye(e.textModeOptions),m(5),wt("ngModel",e.localeCode),N("ngModelOptions",Oa(27,Mp)),m(),ye(e.languageOptions),m(7),N("disabled",e.aiDescriptionSpinner),m(),M(e.aiDescriptionSpinner?-1:28),m(),M(e.aiDescriptionSpinner?29:-1),m(),M(e.aiDescriptionSpinner?30:-1),m(),M(e.aiDescriptionSpinner?-1:31),m(),N("disabled",e.aiDescriptionSpinner||!e.aiDescription),m(5),N("disabled",!e.aiDescription||e.aiDescriptionSpinner),m(5),N("value",e.panelView)("hideSingleSelectionIndicator",!0),m(),N("matTooltip","Show left panel only"),m(3),N("matTooltip","Show both panels"),m(3),N("matTooltip","Show right panel only"),m(8),N("color",e.compareActive?"warn":"primary")("matTooltip",e.compareActive?"Clear highlights":"Compare AI text with current text"),m(4),us(e.compareActive?"Clear compare":"Compare content"),fs(61);}}function Rq(n,t){n&1&&(s(0,"mat-icon",41),u(1,"autorenew"),c());}function Nq(n,t){if(n&1){let e=oe();s(0,"div",70)(1,"div",92)(2,"div",93),q(3,14),c(),s(4,"quill-editor",67),E("onEditorCreated",function(o){k(e);let a=x(3);return R(a.onQuillDualUserEditorCreated(o));})("onBlur",function(){k(e);let o=x(3);return R(o.onQuillBlur());})("mouseup",function(o){k(e);let a=x(3);return R(a.captureSelection(o));})("contextmenu",function(o){k(e);let a=x(3);return R(a.captureSelection(o));}),c()(),s(5,"div",94)(6,"div",93)(7,"span"),q(8,15),c(),S(9,Rq,2,0,"mat-icon",41),c(),s(10,"quill-editor",95),Mt("ngModelChange",function(o){k(e);let a=x(3);return St(a.aiDescription,o)||(a.aiDescription=o),R(o);}),E("onEditorCreated",function(o){k(e);let a=x(3);return R(a.onQuillAiEditorCreated(o));})("onBlur",function(){k(e);let o=x(3);return R(o.onQuillAiBlur());})("mouseup",function(o){k(e);let a=x(3);return R(a.captureSelectionAi(o));})("contextmenu",function(o){k(e);let a=x(3);return R(a.captureSelectionAi(o));}),c()()();}if(n&2){let e=x(3),i=bn(3);m(),Ue("hidden",e.isLeftPanelHidden)("full-width",e.isLeftPanelFullWidth),m(3),N("modules",e.quillModules)("valueGetter",e.quillValueGetter)("valueSetter",e.quillValueSetter)("cdkContextMenuTriggerFor",i)("placeholder","Current content...")("formControlName",e.controlName),m(),Ue("hidden",e.isRightPanelHidden)("full-width",e.isRightPanelFullWidth),m(4),M(e.aiDescriptionSpinner?9:-1),m(),N("modules",e.quillModules)("valueGetter",e.quillValueGetter)("valueSetter",e.quillValueSetter)("cdkContextMenuTriggerFor",i)("placeholder","AI content will appear here..."),wt("ngModel",e.aiDescription),N("ngModelOptions",Oa(22,Mp));}}function Aq(n,t){n&1&&(s(0,"div",99),q(1,16),c());}function Dq(n,t){n&1&&(s(0,"div",99),q(1,17),c());}function jq(n,t){n&1&&(s(0,"div",99),q(1,18),c());}function Lq(n,t){if(n&1&&(s(0,"div"),S(1,Aq,2,0,"div",99),S(2,Dq,2,0,"div",99),S(3,jq,2,0,"div",99),c()),n&2){let e=x(4);m(),M(e.panelView==="both"?1:-1),m(),M(e.panelView==="left"?2:-1),m(),M(e.panelView==="right"?3:-1);}}function zq(n,t){if(n&1){let e=oe();s(0,"div",96)(1,"div",100)(2,"mat-icon",101),u(3,"policy"),c(),s(4,"div",102)(5,"strong"),q(6,19),c(),s(7,"span"),u(8),c()()(),s(9,"div",103)(10,"button",104),E("click",function(){k(e);let o=x(4);return R(o.confirmComplianceChanges());}),s(11,"mat-icon"),u(12,"check"),c(),s(13,"span"),q(14,20),c()(),s(15,"button",105),E("click",function(){k(e);let o=x(4);return R(o.rejectComplianceChanges());}),s(16,"mat-icon"),u(17,"close"),c(),s(18,"span"),q(19,21),c()(),s(20,"button",106),E("click",function(){k(e);let o=x(4);return R(o.cancelComplianceReview());}),s(21,"mat-icon"),u(22,"undo"),c(),s(23,"span"),q(24,22),c()()()();}if(n&2){let e=x(4);m(8),G(e.complianceReviewIssue.description);}}function Fq(n,t){if(n&1){let e=oe();s(0,"div",97)(1,"div",107)(2,"ngx-monaco-diff-editor",108),E("onInit",function(o){k(e);let a=x(4);return R(a.onMonacoDiffEditorInit(o));}),c()()();}if(n&2){let e=x(4);m(2),N("options",e.monacoEditorOptions)("originalModel",e.diffOriginalModel)("modifiedModel",e.diffModifiedModel);}}function Bq(n,t){if(n&1){let e=oe();s(0,"div",98)(1,"ngx-monaco-editor",68),E("ngModelChange",function(o){k(e);let a=x(4);return R(a.onMonacoEditorChange(o));})("onInit",function(o){k(e);let a=x(4);return R(a.onMonacoLeftEditorInit(o));}),c()();}if(n&2){let e=x(4);m(),N("options",e.monacoEditorOptions)("ngModel",e.form.controls[e.controlName].value)("ngModelOptions",Oa(3,Mp));}}function $q(n,t){if(n&1){let e=oe();s(0,"div",98)(1,"ngx-monaco-editor",68),E("ngModelChange",function(o){k(e);let a=x(4);return R(a.onMonacoAiEditorChange(o));})("onInit",function(o){k(e);let a=x(4);return R(a.onMonacoRightEditorInit(o));}),c()();}if(n&2){let e=x(4);m(),N("options",e.monacoEditorOptions)("ngModel",e.aiDescription)("ngModelOptions",Oa(3,Mp));}}function Vq(n,t){if(n&1&&(s(0,"div",71),S(1,Lq,4,3,"div"),S(2,zq,25,1,"div",96),S(3,Fq,3,3,"div",97),S(4,Bq,2,4,"div",98),S(5,$q,2,4,"div",98),c()),n&2){let e=x(3);m(),M(e.complianceReviewMode?-1:1),m(),M(e.complianceReviewMode&&e.complianceReviewIssue?2:-1),m(),M(e.panelView==="both"||e.complianceReviewMode?3:-1),m(),M(e.panelView==="left"&&!e.complianceReviewMode?4
518:-1),m(),M(e.panelView==="right"&&!e.complianceReviewMode?5:-1);}}function Gq(n,t){if(n&1&&(s(0,"div",38),S(1,kq,62,28,"div",69),S(2,Nq,11,23,"div",70),S(3,Vq,6,5,"div",71),c()),n&2){let e=x(2);m(),M(e.complianceReviewMode?-1:1),m(),M(e.isMarkdownMode?-1:2),m(),M(e.isMarkdownMode?3:-1);}}function qq(n,t){n&1&&(s(0,"mat-icon"),u(1,"assessment"),c());}function Jq(n,t){n&1&&(s(0,"mat-icon",41),u(1,"autorenew"),c());}function Hq(n,t){if(n&1&&ee(0,"div",109),n&2){let e=t.$index,i=x(2);Ue("filled",e<i.complianceScore),N("ngClass",i.getComplianceCircleClass(e));}}function Uq(n,t){if(n&1&&(s(0,"div",50)(1,"div",110),u(2),c()()),n&2){let e=x(3);m(2),G(e.complianceComment);}}function Wq(n,t){n&1&&(s(0,"mat-icon",112),u(1,"remove_circle"),c());}function Xq(n,t){n&1&&(s(0,"mat-icon",112),u(1,"add_circle"),c());}function Yq(n,t){n&1&&(s(0,"mat-icon",112),u(1,"find_replace"),c());}function Kq(n,t){if(n&1){let e=oe();s(0,"div",114),S(1,Wq,2,0,"mat-icon",112),S(2,Xq,2,0,"mat-icon",112),S(3,Yq,2,0,"mat-icon",112),s(4,"span",115
518),u(5),c(),s(6,"button",116),E("click",function(){let o=k(e),a=o.$implicit,r=o.$index,l=x(5);return R(l.acceptComplianceIssue(r,a));}),s(7,"mat-icon"),u(8,"check_circle"),c()(),s(9,"button",117),E("click",function(){let o=k(e),a=o.$implicit,r=o.$index,l=x(5);return R(l.discardComplianceItem("issue",r,a));}),s(10,"mat-icon"),u(11,"close"),c()()();}if(n&2){let e=t.$implicit;m(),M(e.remove?1:-1),m(),M(e.add&&!e.remove?2:-1),m(),M(!e.add&&!e.remove?3:-1),m(2),G(e.description);}}function Zq(n,t){if(n&1&&(s(0,"div",111)(1,"mat-icon",112),u(2,"report_problem"),c(),s(3,"span",113),u(4),c()(),be(5,Kq,12,4,"div",114,Pt)),n&2){let e=t.$implicit;m(4),G(e.issue),m(),ye(e.actions);}}function Qq(n,t){if(n&1&&(s(0,"div",55)(1,"div",56),be(2,Zq,7,1,null,null,Pt),c()()),n&2){let e=x(3);m(2),ye(e.complianceRecommendations);}}function eJ(n,t){if(n&1&&(s(0,"div",37),S(1,Uq,3,1,"div",50),S(2,Qq,4,0,"div",55),c()),n&2){let e=x(2);m(),M(e.complianceComment?1:-1),m(),M(e.complianceRecommendations.length>0?2:-1);}}function tJ(n,t){if(n&1){let e=oe();s(0,"div",25)(1,"div",26)(2,"div",27)(3,"mat-label"),u(4),c()(),s(5,"div",28)(6,"button",29),E("click",function(){k(e);let o=x();return R(o.clickEdit());}),s(7,"mat-icon"),u(8,"edit_note"),c()(),S(9,hq,3,4,"button",30),s(10,"button",31),E("click",function(){k(e);let o=x();return R(o.toggleEditorMode());}),s(11,"mat-icon",32),u(12),c()(),s(13,"button",33),E("click",function(){k(e);let o=x();return R(o.formatDocument());}),s(14,"mat-icon",34),u(15,"format_align_left"),c()(),s(16,"button",35),E("click",function(){k(e);let o=x();return R(o.clickAddComment());}),s(17,"mat-icon"),u(18,"add_comment"),c()(),S(19,_q,3,3,"button",36),c()(),S(20,Cq,16,6,"div",37),S(21,vq,3,1,"div",37),S(22,bq,3,1,"div",37),S(23,wq,3,2,"div"),S(24,Gq,4,3,"div",38),s(25,"div",26),ee(26,"div",27),s(27,"div",28)(28,"button",39),E("click",function(){k(e);let o=x();return R(o.clickShowInsights());}),s(29,"mat-icon"),u(30,"insights"),c()(),s(31,"button",40),E("click",function(){k(e);let o=x();return R(o.clickCompliance());}),S(32,qq,2,0,"mat-icon"),S(33,Jq,2,0,"mat-icon",41),c(),s(34,"div",42),be(35,Hq,1,3,"div",43,Pt),c(),s(37,"button",44),E("click",function(){k(e);let o=x();return R(o.clickViewCompliance());}),s(38,"mat-icon"),u(39,"unfold_more"),c()()()(),S(40,eJ,3,2,"div",37),s(41,"div",45)(42,"div",46),u(43),c()()();}if(n&2){let e=x();m(4),G(e.label),m(5),M(e.generationAvailable||e.referenceAvailable?9:-1),m(2),N("ngClass",Ds(18,WS,e.isMarkdownMode)),m(),G((e.isMarkdownMode,"code")),m(),N("disabled",!e.isMarkdownMode),m(6),M(e.description_advanced?19:-1),m(),M(e.showComments?20:-1),m(),M(e.showAiInsight&&e.aiInsightContent?21:-1),m(),M(e.showAdvancedHelp&&e.description_advanced?22:-1),m(),M(e.aiMode?-1:23),m(),M(e.aiMode?24:-1),m(4),N("disabled",!e.hasAiInsights),m(3),N("disabled",!e.complianceAvailable||e.aiReferencesSpinner),m(),M(e.aiReferencesSpinner?-1:32),m(),M(e.aiReferencesSpinner?33:-1),m(2),ye(e.complianceCircles),m(2),N("disabled",!e.complianceComment&&e.complianceRecommendations.length===0),m(3),M(e.showComplianceMessages&&(e.complianceComment||e.complianceRecommendations.length>0)?40:-1),m(3),G(e.description);}}function nJ(n,t){if(n&1&&(s(0,"div",119)(1,"mat-icon",127),u(2,"format_quote"),c(),s(3,"span",128),u(4),Zn(5,"slice"),c()()),n&2){let e=x(2);m(4),G(e.selectedText.length>80?cf(5,1,e.selectedText,0,80)+"\u2026":e.selectedText);}}function iJ(n,t){n&1&&(s(0,"mat-icon",41),u(1,"autorenew"),c());}function oJ(n,t){n&1&&(s(0,"mat-icon"),u(1,"send"),c());}function aJ(n,t){if(n&1){let e=oe();s(0,"div",118),S(1,nJ,6,5,"div",119),s(2,"div",120)(3,"mat-icon",121),u(4,"auto_awesome"),c(),s(5,"span",122),q(6,23),c()(),s(7,"form",123),E("ngSubmit",function(){k(e);let o=x();return R(o.sendMessage());}),s(8,"mat-form-field",124),ee(9,"input",125),c(),s(10,"button",126),S(11,iJ,2,0,"mat-icon",41)(12,oJ,2,0,"mat-icon"),c()()();}if(n&2){let e=x();m(),M(e.selectedText?1:-1),m(8),N("formControl",e.messageInput)("disabled",e.loading),m(),N("disabled",e.loading||!(e.messageInput.value!=null&&e.messageInput.value.trim())),m(),M(e.loading?11:12);}}var br=class n{constructor(t,e,i,o,a,r,l){this.authService=t;this.firebase=e;this.bottomSheet=i;this.dialog=o;this.snackBar=a;this.cdr=r;this.textComparator=l;}authService;firebase;bottomSheet;dialog;snackBar;cdr;textComparator;objectType;field;object;objectRef;notesPath;localeCode="frCA";version="1.0";advanced=!0;agentContext;controlName;form;nextIntelligenField;onSave=new At();onInsight=new At();onInsightTitle=new At();onDebugData=new At();quillModules={toolbar:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],["link","clean"],["table-better"]],table:!1,"table-better":{language:"en_US",menus:["column","row","merge","table","cell","wrap","copy","delete"],toolbarTable:!0,toolbarButtons:{whiteList:["link","image"],singleWhiteList:["link","image"]}}};quillValueGetter=t=>t.root.innerHTML;quillValueSetter=(t,e)=>{if(!t._qtbPatched){t._qtbPatched=!0;let i=t.setContents.bind(t);t.setContents=(o,a)=>{i({ops:[{insert:` 519`}]},"silent"),t.updateContents(o,a??"api");};}return t.clipboard.convert({html:e??""});};label;description;hint;description_advanced;aiDescription;usrDescription;aiInsight;showAiInsight=!1;aiInsightContent="";aiInsightStrengths=[];aiInsightWeaknesses=[];aiInsightRecommendations=[];get hasAiInsights(){return this.aiInsightStrengths.length>0||this.aiInsightWeaknesses.length>0||this.aiInsightRecommendations.length>0;}complianceComment="";complianceRecommendations=[];complianceActions=[];complianceScore=0;
519showComplianceMessages=!1;showAdvancedHelp=!1;compareActive=!1;quillUserInstance=null;quillAiInstance=null;quillDualUserInstance=null;complianceReviewMode=!1;complianceReviewIssue=null;complianceReviewIssueIndex=-1;complianceReviewDecorations=[];savedContentBeforeReview="";savedAiContentBeforeReview="";comments=[];showComments=!1;newCommentText="";aiDescriptionSpinner=!1;aiReferencesSpinner=!1;aiMode=!1;editMode=!1;showReferences=!1;panelView="both";additionalContext="";wordCount=200;minWordCount=50;maxWordCount=500;textMode="not_specified";textModeOptions=[{value:"not_specified",label:"Not specified"},{value:"text_only",label:"Text only"},{value:"bullet_points_only",label:"Bullet points only"},{value:"text_and_bullets",label:"Text and bullets"}];languageOptions=[{value:"frCA",label:"French (Canada)"},{value:"enCA",label:"English (Canada)"},{value:"frFR",label:"French (France)"}];fieldRef;fieldObject;advancedObject;diffOriginalModel;diffModifiedModel;richTextEditor=!1;richTextEditorAi=!1;richTextEditorAiHtml="";monacoEditor;monacoEditorBlurSubscription;monacoLeftEditor;monacoLeftEditorBlurSubscription;monacoRightEditor;monacoRightEditorBlurSubscription;monacoDiffEditor;monacoDiffEditorOriginalBlurSubscription;monacoDiffEditorModifiedBlurSubscription;isMarkdownMode=!1;monacoEditorOptions={language:"html",minimap:{enabled:!1},lineNumbers:"on",wordWrap:"on",scrollBeyondLastLine:!1,wrappingIndent:"indent",automaticLayout:!0,readOnly:!1,originalEditable:!0,renderSideBySide:!0};ngOnDestroy(){this.monacoEditorBlurSubscription&&(this.monacoEditorBlurSubscription.dispose(),this.monacoEditorBlurSubscription=null),this.monacoLeftEditorBlurSubscription&&(this.monacoLeftEditorBlurSubscription.dispose(),this.monacoLeftEditorBlurSubscription=null),this.monacoRightEditorBlurSubscription&&(this.monacoRightEditorBlurSubscription.dispose(),this.monacoRightEditorBlurSubscription=null),this.monacoDiffEditorOriginalBlurSubscription&&(this.monacoDiffEditorOriginalBlurSubscription.dispose(),this.monacoDiffEditorOriginalBlurSubscription=null),this.monacoDiffEditorModifiedBlurSubscription&&(this.monacoDiffEditorModifiedBlurSubscription.dispose(),this.monacoDiffEditorModifiedBlurSubscription=null);}selectedText="";selectionStart=0;selectionEnd=0;selectionRange=null;selectionSource="main";captureSelection(t){this._captureFromDom("main");}captureSelectionAi(t){this._captureFromDom("ai");}_captureFromDom(t){let e=window.getSelection();if(e&&e.rangeCount>0){let i=e.toString();i&&(this.selectedText=i,this.selectionSource=t,this.selectionRange=e.getRangeAt(0).cloneRange(),this.selectionStart=0,this.selectionEnd=i.length,console.log(`[captureSelection:${t}] DOM:`,i));}}loading=!1;messageInput=new st("");sendMessage(){return $(this,null,function*(){let t=this.messageInput.value?.trim();if(!t||!this.selectedText){console.warn("[sendMessage] Aborted \u2014 missing command or selectedText",{command:t,selectedText:this.selectedText});return;}this.loading=!0;let e={command:t,selectedText:this.selectedText,fullContent:this.form.controls[this.controlName].value??"",locale:this.localeCode};console.log("[functionAdjustTextStream] payload:",e),console.log("[sendMessage] selectionSource:",this.selectionSource);try{let l=ei(this.firebase.functions,"functionAdjustTextStream"),p="",d="",{stream:f}=yield l.stream(e);try{for(var i=Co(f),o,a,r;o=!(a=yield i.next()).done;o=!1){let h=a.value;let g=h;g?.originalText&&(p=g.originalText),g?.adjustedText&&(d=g.adjustedText);}}catch(a){r=[a];}finally{try{o&&(a=i.return)&&(yield a.call(i));}finally{if(r)throw r[0];}}if(console.log("[functionAdjustTextStream] result:",{originalText:p,adjustedText:d}),p&&d){if(this.selectionSource==="ai"){let h=(this.aiDescription??"").replace(p,d);this.aiDescription=h,this.richTextEditorAiHtml=h,this.emitAiSave();}else{let g=(this.form.controls[this.controlName].value??"").replace(p,d);this.form.patchValue({[this.controlName]:g}),this.emitSave();}this.snackBar.open("Text adjusted successfully","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});}else this.snackBar.open("AI did not return a valid replacement","Close",{duration:4e3,horizontalPosition:"right",verticalPosition:"top"});}catch(l){console.error("[sendMessage] Error calling functionAdjustTextStream:",l),this.snackBar.open("Failed to adjust text. Please try again.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});}this.messageInput.reset(),this.loading=!1;});}emitSave(){this.onSave.emit(this.form.controls[this.controlName].value);}onQuillBlur(){setTimeout(()=>{let t=document.activeElement;t?.closest?.(".ql-table-better")||t?.closest?.(".ql-table-menus")||t?.closest?.(".ql-table-tools")||t?.closest?.("button.ql-table-better")||this.emitSave();},200);}onQuillAiBlur(){setTimeout(()=>{let t=document.activeElement;t?.closest?.(".ql-table-better")||t?.closest?.(".ql-table-menus")||t?.closest?.(".ql-table-tools")||t?.closest?.("button.ql-table-better")||this.emitAiSave();},200);}openBottomSheet(t){this.bottomSheet.open(RC,{data:{object:this.fieldObject,locale:this.localeCode,text:t}});}complianceAvailable=!1;generationAvailable=!1;referenceAvailable=!1;advancedDescriptionAvailable=!1;complianceCircles=[1,2,3,4,5];getComplianceCircleClass(t){let e="compliance-circle";if(t>=this.complianceScore||this.complianceScore===0)return e;switch(this.complianceScore-1){case 0:return`${e} circle-red`;case 1:return`${e} circle-orange`;case 2:return`${e} circle-yellow`;case 3:return`${e} circle-light-green`;case 4:return`${e} circle-green`;default:return e;}}ngOnInit(){return $(this,null,function*(){let t=ge(this.firebase.firestore,"objects/"+this.objectType+"/fields/"+this.field+"_"+this.version+"/prompts/compliance/");this.complianceAvailable=(yield yt(t)).exists();let e=ge(this.firebase.firestore,"objects/"+this.objectType+"/fields/"+this.field+"_"+this.version+"/prompts/generation/");this.generationAvailable=(yield yt(e)).exists(),yield this.loadAdditionalContext(),yield this.loadComplianceResults(),yield this.loadComments(),this.fieldRef=ge(this.firebase.firestore,"objects/"+this.objectType+"/fields/"+this.field+"_"+this.version);try{let i=yield yt(this.fieldRef);i.exists()?(this.fieldObject=X({id:i.id},i.data()),this.localeCode=="frCA"?(this.label=this.fieldObject.label_frCA,this.description=this.fieldObject.description_summary_frCA):this.localeCode=="enCA"&&(this.label=this.fieldObject.label_enCA,this.description=this.fieldObject.description_summary_enCA)):(console.warn(`Could not load intelligent field definition for "${this.field}_${this.version}". The field will render without metadata.`),this.label=this.field||this.controlName||"Untitled Field"),this.richTextEditor=!0,this.richTextEditorAi=!0,this.richTextEditorAiHtml=this.aiDescription||"",yield this.loadAiSettings(),this.advanced&&this.fieldObject&&(this.localeCode=="frCA"?this.description_advanced=this.fieldObject.description_frCA:this.localeCode=="enCA"&&(this.description_advanced=this.fieldObject.description_enCA)),this.diffOriginalModel={code:this.form.controls[this.controlName].value,language:"html"},this.diffModifiedModel={code:this.aiDescription||"",language:"html"};}catch(i){console.warn("Error initializing intelligent field:",i);}});}clickGenerateStream(){return $(this,null,function*(){this.aiMode=!0;let t=this.firebase.functions,e=ei(t,"functionGeneratePromptStream"),i=X(X({objectType:this.objectType,fieldId:this.field,version:this.version,locale:this.localeCode,object:this.agentContext?Ve(X({},this.object),{agentContext:this.agentContext}):this.object,wordCount:this.wordCount,textMode:this.textMode,additionalContext:this.additionalContext,objectDocPath:this.notesPath},this.object?.enginePath?{enginePath:this.object.enginePath}:{}),this.object?.datastoreId?{datastoreId:this.object.datastoreId}:{});console.log(i),this.aiDescriptionSpinner=!0,this.aiDescription="",this.aiInsightStrengths=[],this.aiInsightWeaknesses=[],this.aiInsightRecommendations=[];let{stream:o,data:a}=yield e.stream(i);try{try{for(var r=Co(o),l,p,d;l=!(p=yield r.next()).done;l=!1){let f=p.value;let h=f[0];h&&(this.aiDescription=h.description,h.strengths&&(this.aiInsightStrengths=h.strengths),h.weaknesses&&(this.aiInsightWeaknesses=h.weaknesses),h.recommendations&&(this.aiInsightRecommendations=h.recommendations),this.syncAiContentToEditors(),this.cdr.detectChanges());}}
519catch(p){d=[p];}finally{try{l&&(p=r.return)&&(yield p.call(r));}finally{if(d)throw d[0];}}this.aiDescriptionSpinner=!1;}catch(f){console.error("Error streaming menu item:",f),this.aiDescriptionSpinner=!1;}finally{this.aiDescriptionSpinner=!1,this.richTextEditorAiHtml=this.aiDescription||"",this.updateDiffEditorContent(),this.syncAiContentToEditors(),this.cdr.detectChanges(),this.emitAiSave();}});}clickGenerate(){let t=this.firebase.functions,e=ei(t,"functionGeneratePrompt"),i={objectType:this.objectType,fieldId:this.field,version:this.version,locale:this.localeCode,object:this.object,wordCount:this.wordCount,textMode:this.textMode,additionalContext:this.additionalContext,objectDocPath:this.notesPath};this.aiDescriptionSpinner=!0,e(i).then(o=>$(this,null,function*(){console.log(o.data),this.aiDescription=o.data,this.aiDescriptionSpinner=!1,this.clickRobot();})).catch(o=>{console.log(o),this.aiDescriptionSpinner=!1;});}clickCompliance(){return $(this,null,function*(){let t=this.firebase.functions,e=ei(t,"functionCompliancePromptStream"),i=X(X({objectType:this.objectType,fieldId:this.field,version:this.version,locale:this.localeCode,object:this.agentContext?Ve(X({},this.object),{agentContext:this.agentContext}):this.object,wordCount:this.wordCount,textMode:this.textMode,additionalContext:this.additionalContext,objectDocPath:this.notesPath},this.object?.enginePath?{enginePath:this.object.enginePath}:{}),this.object?.datastoreId?{datastoreId:this.object.datastoreId}:{});this.aiReferencesSpinner=!0,this.complianceComment="",this.complianceActions=[],this.complianceRecommendations=[],this.complianceScore=0,console.log("Starting compliance stream..."),console.log(i);try{let{stream:p,data:d}=yield e.stream(i);try{for(var o=Co(p),a,r,l;a=!(r=yield o.next()).done;a=!1){let h=r.value;console.log("Compliance chunk received:",h),h&&typeof h=="object"&&(h.compliance_level!==void 0&&(this.complianceScore=h.compliance_level,console.log("Compliance level:",h.compliance_level)),h.recommendations&&Array.isArray(h.recommendations)&&this.parseRecommendations(h.recommendations),h.comment&&(this.complianceComment=h.comment,console.log("Compliance comment:",this.complianceComment)));}}catch(r){l=[r];}finally{try{a&&(r=o.return)&&(yield r.call(o));}finally{if(l)throw l[0];}}let f=yield d;if(console.log("Final compliance output:",f),f&&typeof f=="object"){let h=f;h.compliance_level!==void 0&&(this.complianceScore=h.compliance_level),h.recommendations&&Array.isArray(h.recommendations)&&this.parseRecommendations(h.recommendations),h.comment&&(this.complianceComment=h.comment);}yield this.saveComplianceResults(),this.aiReferencesSpinner=!1;}catch(p){console.error("Error streaming compliance data:",p),this.aiReferencesSpinner=!1;}finally{this.aiReferencesSpinner=!1;}});}onQuillUserEditorCreated(t){this.quillUserInstance=t;}onQuillDualUserEditorCreated(t){this.quillDualUserInstance=t;}onQuillAiEditorCreated(t){this.quillAiInstance=t;}clickCompareTexts(){let t=this.quillDualUserInstance??this.quillUserInstance,e=this.quillAiInstance;if(!t||!e){this.snackBar.open("Compare requires both editors to be open in AI mode.","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});return;}if(this.compareActive){t.formatText(0,t.getLength(),"background",!1,"api"),e.formatText(0,e.getLength(),"background",!1,"api"),this.compareActive=!1;return;}let i=t.getText(),o=e.getText();if(!i.trim()&&!o.trim()){this.snackBar.open("Nothing to compare \u2014 both editors are empty.","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});return;}let{diff1:a,diff2:r}=this.textComparator.compareText(i,o);this._applyQuillHighlights(t,a,"#ffcdd2"),this._applyQuillHighlights(e,r,"#c8e6c9"),this.compareActive=!0;}_applyQuillHighlights(t,e,i){let o=0;for(let a of e){let r=a.value.length;a.type==="changed"&&r>0&&t.formatText(o,r,"background",i,"api"),o+=r;}}toMarkup(t){return t=t.replace(/\*\*(.*?)\*\*/g,"<b>$1</b>"),t=t.replace(/\n(.*?)/g,"<p>$1"),t=t.replace(/__(.*?)__/g,"<u>$1</u>"),t=t.replace(/~~(.*?)~~/g,"<i>$1</i>"),t=t.replace(/<<(.*?)>>/g,"<a href='$1'>Link</a>"),t;}clickReferences(){this.showReferences=!this.showReferences;}
519clickViewCompliance(){this.showComplianceMessages=!this.showComplianceMessages;}clickShowAdvancedHelp(){this.showAdvancedHelp=!this.showAdvancedHelp;}clickRobot(){this.aiMode=!this.aiMode;}clickRefine(){return $(this,null,function*(){this.aiMode=!0;let t=this.firebase.functions,e=ei(t,"functionGeneratePromptStream"),i=X(X({objectType:this.objectType,fieldId:this.field,version:this.version,locale:this.localeCode,object:this.agentContext?Ve(X({},this.object),{agentContext:this.agentContext}):this.object,wordCount:this.wordCount,textMode:this.textMode,additionalContext:this.additionalContext,currentField:this.aiDescription,objectDocPath:this.notesPath},this.object?.enginePath?{enginePath:this.object.enginePath}:{}),this.object?.datastoreId?{datastoreId:this.object.datastoreId}:{});this.aiDescriptionSpinner=!0,this.aiDescription="",this.aiInsightStrengths=[],this.aiInsightWeaknesses=[],this.aiInsightRecommendations=[],console.log("Starting stream...");let{stream:o,data:a}=yield e.stream(i);try{try{for(var r=Co(o),l,p,d;l=!(p=yield r.next()).done;l=!1){let f=p.value;let h=f[0];h&&(this.aiDescription=h.description,h.strengths&&(this.aiInsightStrengths=h.strengths),h.weaknesses&&(this.aiInsightWeaknesses=h.weaknesses),h.recommendations&&(this.aiInsightRecommendations=h.recommendations),this.syncAiContentToEditors(),this.cdr.detectChanges());}}catch(p){d=[p];}finally{try{l&&(p=r.return)&&(yield p.call(r));}finally{if(d)throw d[0];}}this.aiDescriptionSpinner=!1;}catch(f){console.error("Error streaming menu item:",f),this.aiDescriptionSpinner=!1;}finally{this.aiDescriptionSpinner=!1,this.richTextEditorAiHtml=this.aiDescription||"",this.updateDiffEditorContent(),this.syncAiContentToEditors(),this.cdr.detectChanges(),this.emitAiSave();}});}onPanelViewChange(t){t&&t.value&&(this.panelView=t.value,console.log("Panel view changed to:",this.panelView));}toggleLeftPanel(){switch(this.panelView){case"both":this.panelView="right";break;case"right":this.panelView="left";break;case"left":this.panelView="both";break;default:this.panelView="both";break;}console.log("Panel view toggled to:",this.panelView);}get isLeftPanelVisible(){return this.panelView==="both"||this.panelView==="left";}get isRightPanelVisible(){return this.panelView==="both"||this.panelView==="right";}get isLeftPanelHidden(){return this.panelView==="right";}get isRightPanelHidden(){return this.panelView==="left";}get isLeftPanelFullWidth(){return this.panelView==="left";}get isRightPanelFullWidth(){return this.panelView==="right";}get currentPanelIcon(){switch(this.panelView){case"both":return"view_column";case"left":return"first_page";case"right":return"last_page";default:return"view_column";}}get currentPanelTooltip(){switch(this.panelView){case"both":return"Show AI content only";case"left":return"Show both panels";case"right":return"Show current content only";default:return"Toggle panel view";}}clickAccept(){this.form.patchValue({[this.controlName]:this.aiDescription}),this.emitSave(),this.aiMode=!1;}clickAcceptWithConfirmation(){return $(this,null,function*(){(yield this.dialog.open(Km,{width:"400px",data:{type:"content replacement",item:"Current content will be replaced with AI-generated content. This action cannot be undone."}}).afterClosed().toPromise())&&(this.form.patchValue({[this.controlName]:this.aiDescription}),this.emitSave(),this.object&&this.field&&(this.object[this.field+"_ai_content"]=this.aiDescription,yield this.saveAiSettings()),this.updateDiffEditorContent(),this.syncCurrentContentToEditors(),this.syncAiContentToEditors(),this.cdr.detectChanges(),this.snackBar.open("Content replaced successfully","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"}));});}clickRevertWithConfirmation(){return $(this,null,function*(){if(yield this.dialog.open(Km,{width:"400px",data:{type:"content replacement",item:"AI-generated content will be replaced with current content. This action cannot be undone."}}).afterClosed().toPromise()){let i=this.form.controls[this.controlName].value;this.aiDescription=i,this.richTextEditorAiHtml=i,this.emitAiSave(),this.updateDiffEditorContent(),this.syncAiContentToEditors(),this.cdr.detectChanges(),this.snackBar.open("AI content replaced with current content successfully","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});}});}onWordCountChange(t){return $(this,null,function*(){t!==null&&(this.wordCount=t,this.object&&this.field&&(this.object[this.field+"_wordcount"]=t,yield this.saveAiSettings()));});}onTextModeChange(t){return $(this,null,function*(){this.textMode=t,this.object&&this.field&&(this.object[this.field+"_textmode"]=t,yield this.saveAiSettings());});}onLanguageChange(t){return $(this,null,function*(){this.localeCode=t,this.fieldObject&&(this.localeCode==="frCA"?(this.label=this.fieldObject.label_frCA,this.description=this.fieldObject.description_summary_frCA):this.localeCode==="enCA"&&(this.label=this.fieldObject.label_enCA,this.description=this.fieldObject.description_summary_enCA)),this.object&&this.field&&(this.object[this.field+"_locale"]=t,yield this.saveAiSettings());});}clickNext(){this.nextIntelligenField&&(this.nextIntelligenField.setAiMode(!0),this.nextIntelligenField.clickGenerate());}setAiMode(t){this.aiMode=t;}toggleEditorMode(){this.updateDiffEditorContent(),this.isMarkdownMode=!this.isMarkdownMode,console.log("Editor mode toggled to:",this.isMarkdownMode?"Markdown":"WYSIWYG");}onMonacoEditorChange(t){this.form.patchValue({[this.controlName]:t});}onMonacoEditorInit(t){this.monacoEditor=t,this.monacoEditorBlurSubscription=t.onDidBlurEditorText(()=>{console.log("Monaco Editor lost focus - saving..."),this.emitSave();}),setTimeout(()=>$(this,null,function*(){try{let e=t.getAction("editor.action.formatDocument");e&&(yield e.run(),console.log("Monaco Editor auto-formatted on init"));}catch(e){console.warn("Auto-format on init failed for Monaco Editor:",e);}}),300),console.log("Monaco Editor initialized with blur listener");}onMonacoAiEditorChange(t){this.aiDescription=t,this.diffModifiedModel.code=t;}onMonacoLeftEditorInit(t){this.monacoLeftEditorBlurSubscription&&this.monacoLeftEditorBlurSubscription.dispose(),this.monacoLeftEditor=t,this.monacoLeftEditorBlurSubscription=t.onDidBlurEditorText(()=>{console.log("Monaco Left Editor lost focus - saving original content...");let e=t.getValue();this.form.patchValue({[this.controlName]:e}),this.emitSave();}),setTimeout(()=>$(this,null,function*(){try{let e=t.getAction("editor.action.formatDocument");e&&(yield e.run(),console.log("Monaco Left Editor auto-formatted on init"));}catch(e){console.warn("Auto-format on init failed for Monaco Left Editor:",e);}}),300),console.log("Monaco Left Editor (original/current content) initialized with blur listener");}onMonacoRightEditorInit(t){this.monacoRightEditorBlurSubscription&&this.monacoRightEditorBlurSubscription.dispose(),this.monacoRightEditor=t,this.monacoRightEditorBlurSubscription=t.onDidBlurEditorText(()=>{console.log("Monaco Right Editor lost focus - saving AI content...");let e=t.getValue();this.aiDescription=e,this.diffModifiedModel.code=e,this.object&&this.field&&(this.object[this.field+"_ai_content"]=this.aiDescription),this.saveAiSettings();}),setTimeout(()=>$(this,null,function*(){try{let e=t.getAction("editor.action.formatDocument");e&&(yield e.run(),console.log("Monaco Right Editor auto-formatted on init"));}catch(e){console.warn("Auto-format on init failed for Monaco Right Editor:",e);}}),300),console.log("Monaco Right Editor (AI content) initialized with blur listener");}onMonacoDiffEditorInit(t){this.monacoDiffEditor=t;let e=t.getOriginalEditor(),i=t.getModifiedEditor();e&&(this.monacoDiffEditorOriginalBlurSubscription=e.onDidBlurEditorText(()=>{console.log("Monaco Diff Editor (original/left) lost focus - saving...");let o=e.getValue();this.form.patchValue({[this.controlName]:o}),this.emitSave();})),i&&(this.monacoDiffEditorModifiedBlurSubscription=i.onDidBlurEditorText(()=>{console.log("Monaco Diff Editor (modified/right) lost focus - saving...");let o=i.getValue();this.aiDescription=o,this.diffModifiedModel.code=o,console.log("Modified model updated:",o.substring(0,50)+"..."),this.object&&this.field&&(this.object[this.field+"_ai_content"]=this.aiDescription),this.saveAiSettings();})),console.log("Monaco Diff Editor initialized with blur listeners on both editors"),setTimeout(()=>$(this,null,function*(){try{if(e){let o=e.getAction("editor.action.formatDocument");o&&(yield o.run(),console.log("Diff Editor original (left) auto-formatted on init"));}if(i){let o=i.getAction("editor.action.formatDocument");o&&(yield o.run(),console.log("Diff Editor modified (right) auto-formatted on init"));}}catch(o){console.warn("Auto-format on init failed for Diff Editor:",o);}}),300),this.complianceReviewMode&&setTimeout(()=>this.applyComplianceDecorations(),500);}syncAiContentToEditors(){let t=this.aiDescription||"";if(this.monacoDiffEditor)try{let e=this.monacoDiffEditor.getModifiedEditor();e&&e.getValue()!==t&&e.setValue(t);}catch(e){}if(this.monacoRightEditor)try{this.monacoRightEditor.getValue()!==t&&this.monacoRightEditor.setValue(t);}catch(e){}}syncCurrentContentToEditors(){let t=this.form.controls[this.controlName].value||"";if(this.monacoDiffEditor)try{let e=this.monacoDiffEditor.getOriginalEditor();e&&e.getValue()!==t&&e.setValue(t);}catch(e){}if(this.monacoLeftEditor)try{this.monacoLeftEditor.getValue()!==t&&this.monacoLeftEditor.setValue(t);}catch(e){}}emitAiSave(){this.diffModifiedModel.code=this.aiDescription,this.object&&this.field&&(this.object[this.field+"_ai_content"]=this.aiDescription,this.object[this.field+"_ai_strengths"]=this.aiInsightStrengths,this.object[this.field+"_ai_weaknesses"]=this.aiInsightWeaknesses,this.object[this.field+"_ai_recommendations"]=this.aiInsightRecommendations),this.saveAiSettings();}updateDiffEditorContent(){this.diffOriginalModel={code:this.form.controls[this.controlName].value,language:"html"},this.diffModifiedModel={code:this.aiDescription||"",language:"html"},console.log("Diff editor models updated with current content");}onOriginalModelChange(t){console.log(t);let e;if(typeof t=="string")e=t;else if(t&&t.target&&t.target.value)e=t.target.value;else if(t&&t.code)e=t.code;else if(t&&typeof t.getValue=="function")e=t.getValue();else{console.warn("Unable to extract content from original model change event:",t);return;}this.form.patchValue({[this.controlName]:e}),this.diffOriginalModel.code=e,console.log("Original model updated:",e.substring(0,50)+"...");}onModifiedModelChange(t){console.log(t);let e;if(typeof t=="string")e=t;else if(t&&t.target&&t.target.value)e=t.target.value;else if(t&&t.code)e=t.code;else if(t&&typeof t.getValue=="function")e=t.getValue();else{console.warn("Unable to extract content from modified model change event:",t);return;}this.aiDescription=e,this.diffModifiedModel.code=e,console.log("Modified model updated:",e.substring(0,50)+"..."),this.object&&this.field&&(this.object[this.field+"_ai_content"]=this.aiDescription);}formatDocument(){return $(this,null,function*(){let t=!1,e=!1,i=!1;if(this.monacoEditor)try{let o=this.monacoEditor.getValue();console.log("Monaco editor text before formatting:",o);let a=this.monacoEditor.getAction("editor.action.formatDocument");a&&(yield a.run(),console.log("Monaco editor formatting completed"));let r=this.monacoEditor.getValue();console.log("Monaco editor text after formatting:",r),this.form.patchValue({[this.controlName]:r}),e=!0,console.log("Monaco editor document formatted successfully"),t=!0;}catch(o){console.error("Error formatting Monaco editor document:",o);}if(this.monacoDiffEditor)try{let o=this.monacoDiffEditor.getOriginalEditor(),a=this.monacoDiffEditor.getModifiedEditor();if(o)try{let r=o.getValue();console.log("Diff editor original text before formatting:",r);let l=o.getAction("editor.action.formatDocument");l&&(yield l.run(),console.log("Diff editor original formatting completed"));let p=o.getValue();console.log("Diff editor original text after formatting:",p),this.form.patchValue({[this.controlName]:p}),this.diffOriginalModel.code=p,e=!0,console.log("Diff editor original content formatted successfully");}catch(r){console.error("Error formatting diff editor original content:",r);}if(a)try{let r=a.getValue();console.log("Diff editor modified text before formatting:",r);let l=a.getAction("editor.action.formatDocument");l&&(yield l.run(),console.log("Diff editor modified formatting completed"));let p=a.getValue();console.log("Diff editor modified text after formatting:",p),this.aiDescription=p,this.diffModifiedModel.code=p,this.object&&this.field&&(this.object[this.field+"_ai_content"]=this.aiDescription),i=!0,console.log("Diff editor modified content formatted successfully");}catch(r){console.error("Error formatting diff editor modified content:",r);}t=!0;}catch(o){console.error("Error accessing diff editor for formatting:",o);}e&&(console.log("Saving formatted original content..."),this.emitSave()),i&&(console.log("Saving formatted AI content..."),this.emitAiSave()),t?
519console.log("Document formatting completed. Original saved:",e,"AI saved:",i):console.warn("No Monaco editor instances available for formatting");});}clickEdit(){let t=this.dialog.open(jC,{width:"1200px",maxWidth:"90vw",height:"80%",data:{field:this.field,version:this.version,objectType:this.objectType}});t.componentInstance.onDebugData.subscribe(e=>{this.onDebugData.emit(e);}),t.afterClosed().subscribe(e=>{});}clickAddContext(){return $(this,null,function*(){this.dialog.open(TC,{width:"500px",data:{fieldName:this.field,locale:this.localeCode,additionalContext:this.additionalContext}}).afterClosed().subscribe(e=>$(this,null,function*(){e&&(this.additionalContext=e.additionalContext,this.object&&this.field&&(this.object[this.field+"_context"]=this.additionalContext),yield this.saveAiSettings(),console.log("Additional context saved:",this.additionalContext));}));});}clickShowInsights(){this.dialog.open(IC,{width:"640px",maxWidth:"95vw",data:{strengths:this.aiInsightStrengths,weaknesses:this.aiInsightWeaknesses,recommendations:this.aiInsightRecommendations}});}openAiModeDialog(){if(!this.field){console.warn("Cannot toggle AI mode: missing field name");return;}this.fieldObject||console.warn("AI mode toggled without field definition data \u2014 some features may be limited."),this.aiMode=!this.aiMode,console.log("AI mode toggled:",this.aiMode?"activated":"deactivated");}loadAiSettings(){return $(this,null,function*(){try{if(!this.field||!this.object)return;this.object[this.field+"_wordcount"]!=null?this.wordCount=this.object[this.field+"_wordcount"]:this.fieldObject&&this.fieldObject.default_wordcount!=null&&(this.wordCount=this.fieldObject.default_wordcount),this.object[this.field+"_textmode"]?this.textMode=this.object[this.field+"_textmode"]:this.fieldObject&&this.fieldObject.default_textmode&&(this.textMode=this.fieldObject.default_textmode),this.object[this.field+"_ai_content"]&&(this.aiDescription=this.object[this.field+"_ai_content"],this.richTextEditorAiHtml=this.aiDescription),this.object[this.field+"_context"]&&(this.additionalContext=this.object[this.field+"_context"]),this.object[this.field+"_ai_strengths"]&&(this.aiInsightStrengths=this.object[this.field+"_ai_strengths"]),this.object[this.field+"_ai_weaknesses"]&&(this.aiInsightWeaknesses=this.object[this.field+"_ai_weaknesses"]),this.object[this.field+"_ai_recommendations"]&&(this.aiInsightRecommendations=this.object[this.field+"_ai_recommendations"]),console.log("Loaded AI settings:",{wordCount:this.wordCount,textMode:this.textMode,aiDescription:this.aiDescription?this.aiDescription.substring(0,100)+"...":"none",additionalContext:this.additionalContext?this.additionalContext.substring(0,100)+"...":"none",insights:{strengths:this.aiInsightStrengths.length,weaknesses:this.aiInsightWeaknesses.length,recommendations:this.aiInsightRecommendations.length}});}catch(t){console.error("Error loading AI settings:",t);}});}saveAiSettings(){return $(this,null,function*(){try{if(!this.field||!this.objectRef){console.warn("Cannot save AI settings: missing field name or object reference");return;}let t={};this.object&&this.field&&(t[this.field+"_wordcount"]=this.wordCount,t[this.field+"_textmode"]=this.textMode,t[this.field+"_ai_content"]=this.aiDescription,t[this.field+"_context"]=this.additionalContext,t[this.field+"_locale"]=this.localeCode,t[this.field+"_ai_strengths"]=this.aiInsightStrengths,t[this.field+"_ai_weaknesses"]=this.aiInsightWeaknesses,t[this.field+"_ai_recommendations"]=this.aiInsightRecommendations),yield hn(this.objectRef,t),console.log("AI settings saved successfully:",t);}catch(t){console.error("Error saving AI settings to Firestore:",t);}});}loadAdditionalContext(){return $(this,null,function*(){try{if(!this.field)return;let t=ge(this.firebase.firestore,`objects/${this.objectType}/fields/${this.field}_${this.version}/context/${this.localeCode}`),e=yield yt(t);if(e.exists()){let i=e.data();i&&i.additionalContext&&(this.additionalContext=i.additionalContext,console.log("Loaded additional context:",this.additionalContext));}}catch(t){console.error("Error loading additional context:",t);}});}loadComplianceResults(){return $(this,null,function*(){try{if(!this.field||!this.objectRef){console.warn("Cannot load compliance results: missing field name or object reference");return;}let t=ge(this.firebase.firestore,`${this.objectRef.path}/compliance/${this.field}`),e=yield yt(t);if(e.exists()){let i=e.data();if(i){this.complianceComment=i.complianceComment||"",this.complianceScore=i.complianceScore||0;let o=i.complianceRecommendations||[];o.length>0&&this.parseRecommendations(o),console.log("Loaded compliance results:",{comment:this.complianceComment,
519issues:this.complianceActions,recommendations:this.complianceActions,score:this.complianceScore});}}}catch(t){console.error("Error loading compliance results:",t);}});}saveComplianceResults(){return $(this,null,function*(){try{if(!this.field||!this.objectRef){console.warn("Cannot save compliance results: missing field name or object reference");return;}let t={complianceComment:this.complianceComment,complianceRecommendations:this.complianceRecommendations,complianceScore:this.complianceScore,timestamp:Rn.now(),fieldName:this.field,locale:this.localeCode},e=ge(this.firebase.firestore,`${this.objectRef.path}/compliance/${this.field}`);yield Dt(e,t,{merge:!0}),console.log("Compliance results saved successfully:",t);}catch(t){console.error("Error saving compliance results to Firestore:",t);}});}parseRecommendations(t){let e=[],i=[];for(let o of t)if(o&&typeof o=="object"&&o.issue&&Array.isArray(o.actions)){let a=[];for(let r of o.actions)r&&typeof r=="object"&&r.description&&a.push(r);a.length>0&&(e.push({issue:o.issue,actions:a}),i.push(...a));}else if(o&&typeof o=="object"&&o.description){let a=o;i.push(a),e.push({issue:a.description,actions:[a]});}this.complianceRecommendations=e,this.complianceActions=i,console.log("Parsed recommendations:",{groups:e.length,actions:i.length});}discardComplianceItem(t,e,i){return $(this,null,function*(){try{let o=typeof i=="string"?i:i.description;if(!(yield this.dialog.open(Km,{width:"400px",data:{type:t,item:o}}).afterClosed().toPromise()))return;this.complianceActions.splice(e,1),console.log(`Removed compliance issue at index ${e}:`,o),yield this.saveComplianceResults();let l=t==="issue"?"Issue":"Recommendation";this.snackBar.open(`${l} discarded successfully`,"Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});}catch(o){console.error(`Error discarding compliance ${t}:`,o),this.snackBar.open(`Failed to discard ${t}. Please try again.`,"Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});}});}acceptComplianceIssue(t,e){let i=this.form.controls[this.controlName].value||"",o;if(e.remove){if(!i.includes(e.remove)){this.snackBar.open("Could not locate the text to remove in current content. The content may have changed since the compliance check.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});return;}o=i.replace(e.remove,"");}else if(e.add){if(e.search){if(!i.includes(e.search)){this.snackBar.open("Could not locate the anchor text for insertion. The content may have changed since the compliance check.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});return;}o=i.replace(e.search,e.search+e.add);}else o=i+e.add;}else if(e.search&&e.replace!==void 0){if(!i.includes(e.search)){this.snackBar.open("Could not locate the text to replace in current content. The content may have changed since the compliance check.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});return;}o=i.replace(e.search,e.replace);}else{this.snackBar.open("This compliance issue has no actionable fix data.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});return;}this.savedContentBeforeReview=i,this.savedAiContentBeforeReview=this.aiDescription||"",this.complianceReviewIssue=e,this.complianceReviewIssueIndex=t,this.diffOriginalModel={code:i,language:"html"},this.diffModifiedModel={code:o,language:"html"},this.aiDescription=o,this.aiMode=!0,this.isMarkdownMode=!0,this.complianceReviewMode=!0,console.log("Entered compliance review mode for issue:",e.description);}applyComplianceDecorations(){if(!this.monacoDiffEditor||!this.complianceReviewMode)return;let t=this.monacoDiffEditor.getModifiedEditor();if(!t)return;let e=this.savedContentBeforeReview,i=t.getValue(),o=e.split(` 520`),a=i.split(` 521`),r=[],l=Math.max(o.length,a.length);for(let p=0;p<l;p++){let d=p<o.length?o[p]:void 0,f=p<a.length?a[p]:void 0;d!==f&&f!==void 0&&r.push({range:{startLineNumber:p+1,startColumn:1,endLineNumber:p+1,endColumn:f.length+1},options:{isWholeLine:!0,className:"compliance-change-highlight",glyphMarginClassName:"compliance-change-glyph",overviewRuler:{color:"#4caf50",position:4}}});}this.complianceReviewDecorations=t.deltaDecorations(this.complianceReviewDecorations,r),console.log(`Applied ${r.length} compliance deltaDecorations`);}confirmComplianceChanges(){return $(this,null,function*(){if(!this.complianceReviewIssue)return;let t=this.aiDescription;this.form.patchValue({[this.controlName]:t}),this.emitSave(),this.removeActionFromRecommendations(this.complianceReviewIssue),yield this.saveComplianceResults(),this.clearComplianceReviewDecorations(),this.complianceReviewMode=!1,this.complianceReviewIssue=null,this.complianceReviewIssueIndex=-1,this.updateDiffEditorContent(),this.snackBar.open("Compliance fix applied successfully","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"}),console.log("Compliance changes confirmed and applied");});}
521cancelComplianceReview(){this.clearComplianceReviewDecorations(),this.aiDescription=this.savedAiContentBeforeReview,this.updateDiffEditorContent(),this.complianceReviewMode=!1,this.complianceReviewIssue=null,this.complianceReviewIssueIndex=-1,this.snackBar.open("Compliance review cancelled","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"}),console.log("Compliance review cancelled \u2014 action kept in recommendations");}rejectComplianceChanges(){return $(this,null,function*(){this.complianceReviewIssue&&(this.removeActionFromRecommendations(this.complianceReviewIssue),yield this.saveComplianceResults()),this.clearComplianceReviewDecorations(),this.aiDescription=this.savedAiContentBeforeReview,this.updateDiffEditorContent(),this.complianceReviewMode=!1,this.complianceReviewIssue=null,this.complianceReviewIssueIndex=-1,this.snackBar.open("Compliance fix rejected","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"}),console.log("Compliance changes rejected");});}removeActionFromRecommendations(t){let e=this.complianceActions.indexOf(t);e>=0&&this.complianceActions.splice(e,1);for(let i=this.complianceRecommendations.length-1;i>=0;i--){let o=this.complianceRecommendations[i],a=o.actions.indexOf(t);if(a>=0){o.actions.splice(a,1),o.actions.length===0&&this.complianceRecommendations.splice(i,1);break;}}}clearComplianceReviewDecorations(){if(this.monacoDiffEditor&&this.complianceReviewDecorations.length>0)try{let t=this.monacoDiffEditor.getModifiedEditor();t&&t.deltaDecorations(this.complianceReviewDecorations,[]);}catch(t){console.warn("Could not clear compliance decorations:",t);}this.complianceReviewDecorations=[];}clickAddComment(){this.showComments=!this.showComments;}sendComment(){return $(this,null,function*(){try{if(!this.newCommentText.trim()){this.snackBar.open("Please enter a comment","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});return;}let t=this.authService.getUserLoggedIn(),e=this.authService.getUserAppLoggedIn();if(!t||!e){this.snackBar.open("You must be logged in to add comments","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});return;}let i={text:this.newCommentText.trim(),author:e.displayName||e.name||t.email||"Anonymous",authorId:t.uid,timestamp:Rn.now(),fieldName:this.field||"unknown"},o=yield this.saveComment(i),a=X({id:o.id},i);this.comments.unshift(a),this.newCommentText="",this.snackBar.open("Comment added successfully","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});}catch(t){console.error("Error adding comment:",t),this.snackBar.open("Failed to add comment. Please try again.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});}});}updateComment(t){return $(this,null,function*(){try{yield this.saveCommentUpdate(t),this.snackBar.open("Comment updated successfully","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});}catch(e){console.error("Error updating comment:",e),this.snackBar.open("Failed to update comment. Please try again.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});}});}discardComment(t,e){return $(this,null,function*(){try{if(!(yield this.dialog.open(Km,{width:"400px",data:{type:"comment",item:e.text.length>50?e.text.substring(0,50)+"...":e.text}}).afterClosed().toPromise()))return;yield this.deleteComment(e.id),this.comments.splice(t,1),console.log(`Removed comment at index ${t}:`,e),this.snackBar.open("Comment discarded successfully","Close",{duration:3e3,horizontalPosition:"right",verticalPosition:"top"});}catch(i){console.error("Error discarding comment:",i),this.snackBar.open("Failed to discard comment. Please try again.","Close",{duration:5e3,horizontalPosition:"right",verticalPosition:"top"});}});}loadComments(){return $(this,null,function*(){try{if(!this.field||!this.objectRef){console.warn("Cannot load comments: missing field name or object reference");return;}let t=we(this.firebase.firestore,`${this.objectRef.path}/comments/${this.field}/items`),e=yield at(t);this.comments=e.docs.map(i=>X({id:i.id},i.data())).sort((i,o)=>o.timestamp.toMillis()-i.timestamp.toMillis()),console.log(`Loaded ${this.comments.length} comments for field ${this.field}`);}catch(t){console.error("Error loading comments:",t);}});}saveComment(t){return $(this,null,function*(){if(!this.field||!this.objectRef)throw new Error("Cannot save comment: missing field name or object reference");let e=we(this.firebase.firestore,`${this.objectRef.path}/comments/${this.field}/items`);return yield Ht(e,t);});}saveCommentUpdate(t){return $(this,null,function*(){if(!this.field||!this.objectRef)throw new Error("Cannot update comment: missing field name or object reference");let e=ge(this.firebase.firestore,`${this.objectRef.path}/comments/${this.field}/items/${t.id}`);yield hn(e,{text:t.text,timestamp:Rn.now()});});}deleteComment(t){return $(this,null,function*(){if(!this.field||!this.objectRef)throw new Error("Cannot delete comment: missing field name or object reference");let e=ge(this.firebase.firestore,`${this.objectRef.path}/comments/${this.field}/items/${t}`);yield hn(e,{deleted:!0,deletedAt:Rn.now()});});}static ɵfac=function(e){return new(e||n)(le(Oo),le(On),le(f0),le(Ti),le(Bt),le(Pa),le(LC));};static ɵcmp=Te({type:n,selectors:[["app-intelligent-field"]],inputs:{objectType:"objectType",field:"field",object:"object",objectRef:"objectRef",notesPath:"notesPath",localeCode:"localeCode",version:"version",advanced:"advanced",agentContext:"agentContext",controlName:"controlName",form:"form",nextIntelligenField:"nextIntelligenField"},outputs:{onSave:"onSave",onInsight:"onInsight",onInsightTitle:"onInsightTitle",onDebugData:"onDebugData"},decls:4,vars:2,consts:()=>{let t;t="Edit content";let e;e="Toggle AI Mode";let i;i="Advanced view";let o;o="Format Document";let a;a="Add comments";let r;r="Show advanced help";let l;l="View AI insights (Strengths, Weaknesses, Recommendations)";let p;p="Evaluate quality and compliance";let d;d="View issues and recommendations";let f;f="Enter your comment...";let h;h="Add a comment";let g;g="Send";let b;b="Discard this comment";let w;w="Add additional context or instructions";let T;T="Generate AI content";let O;O="Refine AI content";let V;V="Accept AI content and replace current content";let j;j="Panel View";let L;L="Replace AI content with current content";let A;A="AI Generation Controls";let J;J="Word Count: "+"\uFFFD0\uFFFD"+"";let Q;Q="Text Mode";let te;te="Language";let U;U="Context";let ce;ce="Refine";let W;W="Accept AI content";let Y;Y="Revert content";let se;se=""+"\uFFFD0\uFFFD"+"";let de;de="Generating...";let Ae;Ae="Generate";let rt;rt="Current Content";let et;et="AI Generated Content";let pt;pt="Content Comparison (Current vs AI Generated)";let ft;ft="Current Content";let je;je="AI Generated Content";let ke;ke="Accept these changes and apply them to the content";let Ke;Ke="Reject these changes and return to the editor";let ve;ve="Cancel review and return to the editor without accepting or rejecting";let Se;Se="Review Recommendation";let Be;Be="Accept Changes";let Ze;Ze="Reject";let kt;
521kt="Cancel";let Z;Z="Review and accept this fix";let D;D="Discard this issue";let F;F="e.g. Make it more concise, translate to French\u2026";let fe;fe="Send command";let he;return he="Adjust with AI",[["inner",""],h,g,A,J,Q,te,U,ce,W,Y,se,de,Ae,rt,et,pt,ft,je,Se,Be,Ze,kt,he,[3,"formGroup"],[1,"NgxEditor__Wrapper"],[1,"div-top-buttons"],[1,"div-top-buttons-title"],[1,"ai-buttons-menu"],["matSuffix","","color","primary","mat-icon-button","","matTooltip",t,1,"button-select",3,"click"],["matPrefix","","mat-icon-button","","matTooltip",e,1,"button-view"],["matPrefix","","mat-icon-button","","matTooltip",i,1,"button-view",3,"click"],[1,"mat-icon-medium",3,"ngClass"],["matPrefix","","mat-icon-button","","matTooltip",o,1,"button-view",3,"click","disabled"],[1,"mat-icon-medium"],["matSuffix","","color","primary","mat-icon-button","","matTooltip",a,1,"button-view",3,"click"],["matSuffix","","color","primary","mat-icon-button","","matTooltip",r,1,"button-view"],[1,"compliance-messages-zone"],[1,"editors-side-by-side"],["matSuffix","","color","accent","mat-icon-button","","matTooltip",l,1,"button-view",3,"click","disabled"],["matSuffix","","color","primary","mat-icon-button","","matTooltip",p,1,"button-view",3,"click","disabled"],[1,"icon-loading"],[1,"compliance-circles-display"],[1,"compliance-circle",3,"ngClass","filled"],["matSuffix","","color","primary","mat-icon-button","","matTooltip",d,1,"button-view",3,"click","disabled"],[1,"div-bottom-buttons"],[1,"div-hint"],["matPrefix","","mat-icon-button","","matTooltip",e,1,"button-view",3,"click"],["matSuffix","","color","primary","mat-icon-button","","matTooltip",r,1,"button-view",3,"click"],[3,"ngClass"],[1,"compliance-comment"],["appearance","outline",1,"comment-input-field"],["matInput","","placeholder",f,"rows","3","maxlength","1000",3,"ngModelChange","ngModel","ngModelOptions"],[1,"comment-actions"],["mat-raised-button","","color","primary",3,"click","disabled"],[1,"compliance-section"],[1,"bubbles-container"],[1,"compliance-bubble","comment-bubble"],[1,"comment-header"],[1,"comment-author"],[1,"comment-timestamp"],["appearance","outline",1,"comment-edit-field"],["matInput","","rows","2","maxlength","1000",3,"ngModelChange","blur","ngModel","ngModelOptions"],["mat-icon-button","","matTooltip",b,"color","warn",1,"discard-button",3,"click"],[1,"comment-content",3,"innerHTML"],[1,"NgxEditor__Wrapper__Editor"],[1,"NgxEditor__Wrapper__Editor","monaco-editor-container"],[3,"onEditorCreated","onBlur","mouseup","contextmenu","modules","valueGetter","valueSetter","cdkContextMenuTriggerFor","placeholder","formControlName"],[3,"ngModelChange","onInit","options","ngModel","ngModelOptions"],[1,"ai-controls-panel"],[1,"dual-editors-container"],[1,"monaco-diff-container"],[1,"ai-controls-title"],[1,"ai-controls-row"],[1,"word-count-slider"],[1,"word-count-label"],[1,"word-count-slider-control",3,"min","max","step"],["matSliderThumb","",3,"ngModelChange","ngModel","ngModelOptions"],["appearance","outline",1,"text-mode-select"],[3,"ngModelChange","selectionChange","ngModel","ngModelOptions"],[3,"value"],["appearance","outline",1,"language-select"],["mat-raised-button","","color","accent","matTooltip",w,3,"click"],["mat-raised-button","","color","primary","matTooltip",T,3,"click","disabled"],["mat-raised-button","","color","accent","matTooltip",O,3,"click","disabled"],["mat-raised-button","","color","primary","matTooltip",V,3,"click","disabled"],["name","panelView","aria-label",j,3,"change","value","hideSingleSelectionIndicator"],["value","left",3,"matTooltip"],["value","both",3,"matTooltip"],["value","right",3,"matTooltip"],["mat-raised-button","","color","primary","matTooltip",L,3,"click"],["mat-raised-button","",3,"click","color","matTooltip"],[1,"editor-left"],[1,"editor-label"],[1,"editor-right"],[3,"ngModelChange","onEditorCreated","onBlur","mouseup","contextmenu","modules","valueGetter","valueSetter","cdkContextMenuTriggerFor","placeholder","ngModel","ngModelOptions"],[1,"compliance-review-banner"],["id","monaco-diff-editor-container",1,"monaco-diff-editor"],[1,"monaco-single-editor"],[1,"diff-editor-label"],[1,"compliance-review-info"],[1,"compliance-review-icon"],[1,"compliance-review-text"],[1,"compliance-review-actions"],["mat-raised-button","","color","primary","matTooltip",ke,3,"click"],["mat-raised-button","","color","warn","matTooltip",Ke,3,"click"],["mat-raised-button","","matTooltip",ve,3,"click"],[1,"diff-note"],[3,"onInit","o
521ptions","originalModel","modifiedModel"],[1,"compliance-circle",3,"ngClass"],[1,"comment-content"],[1,"compliance-bubble","issue-header-bubble"],[1,"bubble-icon"],[1,"bubble-text","issue-label"],[1,"compliance-bubble","issue-bubble","action-indent"],[1,"bubble-text"],["mat-icon-button","","matTooltip",Z,"color","primary",1,"accept-button",3,"click"],["mat-icon-button","","matTooltip",D,"color","warn",1,"discard-button",3,"click"],["cdkMenu","",1,"div-chat-container"],[1,"chat-selection-preview"],[1,"chat-header"],[1,"chat-header-icon"],[1,"chat-header-title"],[1,"chat-input-form",3,"ngSubmit"],["appearance","outline","subscriptSizing","dynamic",1,"chat-input"],["matInput","","placeholder",F,"autocomplete","off",3,"formControl","disabled"],["mat-mini-fab","","color","primary","type","submit","matTooltip",fe,1,"chat-send-button",3,"disabled"],[1,"chat-selection-icon"],[1,"chat-selection-text"]];},template:function(e,i){e&1&&(s(0,"div",24),S(1,tJ,44,20,"div",25),c(),Zt(2,aJ,13,5,"ng-template",null,0,od)),e&2&&(N("formGroup",i.form),m(),M(i.richTextEditor||i.isMarkdownMode?1:-1));},dependencies:[$e,Qe,t3,Qt,xf,_f,gf,jt,Xt,Vt,Wt,Ki,Pl,ur,jR,AR,DR,tn,Nn,Ft,Tt,Mn,S3,md,An,Wn,gn,Po,b3,Cf,$f,NC,h0,ut,Kr,Gt,We,Xe,kC,es,wR,yR,PR,Zi,$t,_n,js,bi,So,Ei,DC,pf,bl],styles:['@charset "UTF-8";.mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
521.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.input-field[_ngcontent-%COMP%]{margin-right:30px}.form-field[_ngcontent-%COMP%]{width:100%;padding-top:20px;padding-bottom:20px}.icon-highlight[_ngcontent-%COMP%]{color:var(--mat-badge-background-color)}.icon-loading[_ngcontent-%COMP%]{transition:transform .5s}.icon-loading.animate[_ngcontent-%COMP%]{transform:rotate(360deg)}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.div-chat-container[_ngcontent-%COMP%]{border:2px solid #465d91;border-radius:12px;padding:12px 16px 16px;background-color:#fff;box-shadow:0 4px 16px #0000001f;min-width:340px;max-width:480px}.chat-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:12px}.chat-header[_ngcontent-%COMP%] .chat-header-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#465d91}.chat-header[_ngcontent-%COMP%] .chat-header-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#465d91;letter-spacing:.02em}
521.chat-selection-preview[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:6px;background-color:#0000000a;border-left:3px solid #465d91;border-radius:4px;padding:6px 10px;margin-bottom:10px}.chat-selection-preview[_ngcontent-%COMP%] .chat-selection-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#465d91;flex-shrink:0;margin-top:1px}.chat-selection-preview[_ngcontent-%COMP%] .chat-selection-text[_ngcontent-%COMP%]{font-size:12px;color:#0009;font-style:italic;line-height:1.4;word-break:break-word}.chat-input-form[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.chat-input[_ngcontent-%COMP%]{flex:1}.chat-send-button[_ngcontent-%COMP%]{flex-shrink:0;width:40px;height:40px;box-shadow:none!important}.loading-indicator[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:10px 0}textarea[_ngcontent-%COMP%]::selection{background-color:#ff06!important;color:inherit!important}textarea[_ngcontent-%COMP%]::-moz-selection{background-color:#ff06!important;color:inherit!important}.div-top-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;color:#000000de;font-size:16px}.div-top-buttons-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;padding-left:10px;align-items:center;font-weight:700;font-size:xx-large}.word-count-slider[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;
521min-width:200px;margin:0 10px}.word-count-label[_ngcontent-%COMP%]{font-size:12px;color:#0009;margin-bottom:4px}mat-slider[_ngcontent-%COMP%]{width:100%}.div-bottom-buttons[_ngcontent-%COMP%]{display:flex;gap:16px;padding:10px;flex-direction:row;justify-content:flex-end;align-items:center;color:#000000de;transition:opacity .3s ease-in-out;opacity:0;visibility:visible;margin-bottom:50px;border:none;border-radius:0}.NgxEditor__Wrapper__Editor[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%], .NgxEditor__Wrapper__Editor-aimode[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%]{min-height:300px}.monaco-editor-container[_ngcontent-%COMP%]{min-height:600px}.monaco-editor-container[_ngcontent-%COMP%] ngx-monaco-editor[_ngcontent-%COMP%]{width:100%;height:800px;display:block;border:1px solid rgba(0,0,0,.12);border-radius:4px}.monaco-editor-container[_ngcontent-%COMP%] ngx-monaco-editor[_ngcontent-%COMP%] .monaco-editor[_ngcontent-%COMP%]{border-radius:4px}.NgxEditor__Wrapper[_ngcontent-%COMP%]{border:none;border-radius:0;box-sizing:border-box}.NgxEditor__Wrapper-aimode[_ngcontent-%COMP%]{border:none;background-color:snow;box-sizing:border-box}.NgxEditor__Wrapper__Editor[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px;border:none;box-sizing:border-box;border:3px solid transparent;min-height:150px}.NgxEditor__Wrapper__Editor-aimode[_ngcontent-%COMP%]{margin-left:10px;margin-right:10px;border:3px solid #465d91;border-radius:5px;box-sizing:border-box;min-height:150px}.div-hint[_ngcontent-%COMP%]{font-size:10px}.toolbar-container[_ngcontent-%COMP%]{transition:opacity .3s ease-in-out;opacity:0;background-color:#fff;visibility:visible}.ai-buttons-menu[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;gap:16px;align-items:center;transition:opacity .3s ease-in-out;opacity:0;visibility:visible}.NgxEditor__Wrapper-aimode[_ngcontent-%COMP%] .ai-buttons-menu[_ngcontent-%COMP%]{background-color:snow}.NgxEditor__Wrapper[_ngcontent-%COMP%]:hover .toolbar-container[_ngcontent-%COMP%], .NgxEditor__Wrapper-aimode[_ngcontent-%COMP%]:hover .toolbar-container[_ngcontent-%COMP%], .NgxEditor__Wrapper[_ngcontent-%COMP%]:hover .ai-buttons-menu[_ngcontent-%COMP%], .NgxEditor__Wrapper-aimode[_ngcontent-%COMP%]:hover .ai-buttons-menu[_ngcontent-%COMP%], .NgxEditor__Wrapper[_ngcontent-%COMP%]:hover .div-bottom-buttons[_ngcontent-%COMP%], .NgxEditor__Wrapper-aimode[_ngcontent-%COMP%]:hover .div-bottom-buttons[_ngcontent-%COMP%], .toolbar-container[_ngcontent-%COMP%]:hover, .ai-buttons-menu[_ngcontent-%COMP%]:hover, .div-bottom-buttons[_ngcontent-%COMP%]:hover{opacity:1}.NgxEditor__Wrapper-aimode[_ngcontent-%COMP%] .div-bottom-buttons[_ngcontent-%COMP%]{background-color:snow}.compliance-rating-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;cursor:pointer;padding:8px;border-radius:4px;transition:background-color .2s ease}.compliance-rating-container[_ngcontent-%COMP%]:hover:not(.disabled){background-color:#0000000a}.compliance-rating-container.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.6}.compliance-circles-display[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;padding:4px}.compliance-circle[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:50%;background-color:#e0e0e0;border:2px solid #e0e0e0;transition:all .3s ease}.compliance-circle.circle-red.filled[_ngcontent-%COMP%]{background-color:#f44336;border-color:#f44336}.compliance-circle.circle-orange.filled[_ngcontent-%COMP%]{background-color:#ff9800;border-color:#ff9800}.compliance-circle.circle-yellow.filled[_ngcontent-%COMP%]{background-color:#ffeb3b;border-color:#ffeb3b}.compliance-circle.circle-light-green.filled[_ngcontent-%COMP%]{background-color:#8bc34a;border-color:#8bc34a}.compliance-circle.circle-green.filled[_ngcontent-%COMP%]{background-color:#4caf50;border-color:#4caf50}.compliance-rating-container.disabled[_ngcontent-%COMP%] .compliance-circle[_ngcontent-%COMP%]{opacity:.3}.compliance-messages-zone[_ngcontent-%COMP%]{margin:10px;padding:16px;background-color:#f8f9fa;border-radius:8px}
521.compliance-comment[_ngcontent-%COMP%]{margin-bottom:20px}.compliance-comment[_ngcontent-%COMP%] .comment-content[_ngcontent-%COMP%]{font-size:14px;line-height:1.5;color:#212529;word-wrap:break-word;overflow-wrap:break-word;word-break:break-word;white-space:normal;max-width:100%}.compliance-section[_ngcontent-%COMP%]{margin-bottom:20px}.compliance-section[_ngcontent-%COMP%]:last-child{margin-bottom:0}.bubbles-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.compliance-bubble[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;padding:12px;border-radius:8px;font-size:13px;line-height:1.4;transition:all .2s ease}.compliance-bubble[_ngcontent-%COMP%] .bubble-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:16px;width:16px;height:16px;margin-top:1px}.compliance-bubble[_ngcontent-%COMP%] .bubble-text[_ngcontent-%COMP%]{flex:1;word-wrap:break-word;overflow-wrap:break-word;word-break:break-word;white-space:normal;max-width:100%}.compliance-bubble[_ngcontent-%COMP%] .discard-button[_ngcontent-%COMP%]{flex-shrink:0;opacity:0;transition:opacity .2s ease;width:32px;height:32px;min-width:32px;display:flex;align-items:center;justify-content:center}.compliance-bubble[_ngcontent-%COMP%] .discard-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.compliance-bubble[_ngcontent-%COMP%]:hover .discard-button[_ngcontent-%COMP%]{opacity:1}.issue-header-bubble[_ngcontent-%COMP%]{background-color:#ff980014;font-weight:500}.issue-header-bubble[_ngcontent-%COMP%] .issue-label[_ngcontent-%COMP%]{font-weight:600}.action-indent[_ngcontent-%COMP%]{margin-left:24px}.issue-bubble[_ngcontent-%COMP%]{background-color:#fff5f5;border:1px solid #fed7d7;color:#742a2a}.issue-bubble[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e53e3e}.issue-bubble[_ngcontent-%COMP%] .bubble-icon[_ngcontent-%COMP%]{color:#e53e3e}.recommendation-bubble[_ngcontent-%COMP%]{background-color:#f0fff4;border:1px solid #c6f6d5;color:#1a202c}.recommendation-bubble[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#38a169}.recommendation-bubble[_ngcontent-%COMP%] .bubble-icon[_ngcontent-%COMP%]{color:#38a169}.compliance-section[_ngcontent-%COMP%]:has(.issue-bubble) .section-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e53e3e}.compliance-section[_ngcontent-%COMP%]:has(.issue-bubble) .section-header[_ngcontent-%COMP%] .section-label[_ngcontent-%COMP%]{color:#742a2a}.compliance-section[_ngcontent-%COMP%]:has(.recommendation-bubble) .section-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#38a169}.compliance-section[_ngcontent-%COMP%]:has(.recommendation-bubble) .section-header[_ngcontent-%COMP%] .section-label[_ngcontent-%COMP%]{color:#1a202c}.editors-side-by-side[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:10px;background-color:#f8f9fa;border-radius:8px;margin:10px}.ai-controls-panel[_ngcontent-%COMP%]{background-color:#fff;border-radius:8px;padding:16px;box-shadow:0 2px 4px #0000001a}.ai-controls-title[_ngcontent-%COMP%]{margin-bottom:12px;font-weight:600;color:#333}.ai-controls-row[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.word-count-slider[_ngcontent-%COMP%]{display:flex;flex-direction:column;
521min-width:200px;margin-right:16px}.word-count-slider[_ngcontent-%COMP%] .word-count-label[_ngcontent-%COMP%]{font-size:12px;color:#0009;margin-bottom:8px}.word-count-slider[_ngcontent-%COMP%] .word-count-slider-control[_ngcontent-%COMP%]{width:100%}.text-mode-select[_ngcontent-%COMP%]{min-width:150px}.dual-editors-container[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:stretch;min-height:400px}.editor-left[_ngcontent-%COMP%], .editor-right[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;background-color:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden;transition:flex .4s cubic-bezier(.25,.8,.25,1),opacity .4s cubic-bezier(.25,.8,.25,1),transform .4s cubic-bezier(.25,.8,.25,1),width .4s cubic-bezier(.25,.8,.25,1),margin .4s cubic-bezier(.25,.8,.25,1);transform:translate(0);opacity:1;width:auto;min-width:300px;max-width:none}.editor-left[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%], .editor-right[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%]{background-color:#f5f5f5;padding:12px 16px;font-weight:600;color:#333;border-bottom:1px solid #e0e0e0;display:flex;align-items:center;gap:8px;transition:opacity .4s ease}.editor-left[_ngcontent-%COMP%] .toolbar-container[_ngcontent-%COMP%], .editor-right[_ngcontent-%COMP%] .toolbar-container[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #e0e0e0;opacity:1;transition:opacity .4s ease}.editor-left[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%], .editor-right[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%]{flex:1;min-height:300px;transition:opacity .4s ease}.editor-left[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%], .editor-right[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%]{border:none;height:100%}.editor-left[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%] .ql-editor[_ngcontent-%COMP%], .editor-right[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%] .ql-editor[_ngcontent-%COMP%]{min-height:300px;max-height:500px;overflow-y:auto}.editor-left.hidden[_ngcontent-%COMP%], .editor-right.hidden[_ngcontent-%COMP%]{flex:0 0 0;width:0;min-width:0;max-width:0;opacity:0;margin-left:0;margin-right:0;padding:0}.editor-left.hidden[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%], .editor-left.hidden[_ngcontent-%COMP%] .toolbar-container[_ngcontent-%COMP%], .editor-left.hidden[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%], .editor-right.hidden[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%], .editor-right.hidden[_ngcontent-%COMP%] .toolbar-container[_ngcontent-%COMP%], .editor-right.hidden[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%]{opacity:0}.editor-left.full-width[_ngcontent-%COMP%], .editor-right.full-width[_ngcontent-%COMP%]{flex:1;width:100%;max-width:100%;transform:translate(0);opacity:1}.editor-left.hidden[_ngcontent-%COMP%]{transform:translate(-100%)}.editor-right.hidden[_ngcontent-%COMP%]{transform:translate(100%)}.dual-editors-container[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:stretch;min-height:400px;transition:all .4s cubic-bezier(.25,.8,.25,1);overflow:hidden}.dual-editors-container[_ngcontent-%COMP%]:has(.editor-left.hidden){gap:0}.dual-editors-container[_ngcontent-%COMP%]:has(.editor-right.hidden){gap:0}.editors-side-by-side[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:10px;background-color:#f8f9fa;border-radius:8px;margin:10px;transition:all .3s ease-in-out;overflow:hidden}.editor-center-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:80px}.editor-center-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:56px;width:56px}.editor-center-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px}.monaco-diff-container[_ngcontent-%COMP%]{background-color:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;padding:16px;min-height:400px}.monaco-diff-container[_ngcontent-%COMP%] .diff-editor-label[_ngcontent-%COMP%]{font-weight:600;color:#333;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #e0e0e0}.monaco-diff-container[_ngcontent-%COMP%] .diff-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:16px;justify-content:flex-end}.monaco-diff-container[_ngcontent-%COMP%] .diff-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.monaco-diff-container[_ngcontent-%COMP%] .diff-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.monaco-diff-container[_ngcontent-%COMP%] .monaco-diff-editor[_ng
521content-%COMP%]{height:400px;border:1px solid #e0e0e0;border-radius:4px}.monaco-diff-container[_ngcontent-%COMP%] .monaco-diff-editor[_ngcontent-%COMP%] ngx-monaco-diff-editor[_ngcontent-%COMP%]{width:100%;height:100%;display:block}.monaco-diff-container[_ngcontent-%COMP%] .monaco-diff-editor[_ngcontent-%COMP%] ngx-monaco-diff-editor[_ngcontent-%COMP%] .monaco-diff-editor[_ngcontent-%COMP%]{border-radius:4px}.monaco-diff-container[_ngcontent-%COMP%] .diff-note[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;color:#666;font-style:italic}.monaco-single-editor[_ngcontent-%COMP%]{background-color:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;padding:16px;min-height:400px}.monaco-single-editor[_ngcontent-%COMP%] .single-editor-label[_ngcontent-%COMP%]{font-weight:600;color:#333;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #e0e0e0}.monaco-single-editor[_ngcontent-%COMP%] ngx-monaco-editor[_ngcontent-%COMP%]{width:100%;height:400px;display:block;border:1px solid #e0e0e0;border-radius:4px}@media(max-width:1200px){.dual-editors-container[_ngcontent-%COMP%]{flex-direction:column;gap:12px}.editor-center-button[_ngcontent-%COMP%]{flex-direction:row;justify-content:center;min-width:auto}.editor-center-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transform:rotate(90deg)}.ai-controls-row[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.ai-controls-row[_ngcontent-%COMP%] .word-count-slider[_ngcontent-%COMP%]{min-width:auto;margin-right:0}}.comment-input-field[_ngcontent-%COMP%]{width:100%!important;margin-bottom:16px}.comment-input-field[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.comment-input-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;resize:vertical;min-height:60px}.comment-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.comment-bubble[_ngcontent-%COMP%]{background-color:#fff;flex-direction:column;align-items:stretch;gap:12px}.comment-bubble[_ngcontent-%COMP%] .comment-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:8px;padding-right:40px}.comment-bubble[_ngcontent-%COMP%] .comment-header[_ngcontent-%COMP%] .comment-author[_ngcontent-%COMP%]{font-weight:500}.comment-bubble[_ngcontent-%COMP%] .comment-header[_ngcontent-%COMP%] .comment-timestamp[_ngcontent-%COMP%]{opacity:.7}.comment-bubble[_ngcontent-%COMP%] .comment-edit-field[_ngcontent-%COMP%]{width:100%;flex:1}.comment-bubble[_ngcontent-%COMP%] .comment-edit-field[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.comment-bubble[_ngcontent-%COMP%] .comment-edit-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;resize:vertical;min-height:40px}.comment-bubble[_ngcontent-%COMP%] .discard-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;opacity:0;transition:opacity .2s ease}.comment-bubble[_ngcontent-%COMP%]:hover .discard-button[_ngcontent-%COMP%]{opacity:1}.compliance-bubble.comment-bubble[_ngcontent-%COMP%]{position:relative}.compliance-bubble.comment-bubble[_ngcontent-%COMP%] .discard-button[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px}.compliance-bubble[_ngcontent-%COMP%] .accept-button[_ngcontent-%COMP%]{flex-shrink:0;opacity:0;transition:opacity .2s ease;width:32px;height:32px;min-width:32px;display:flex;align-items:center;justify-content:center}.compliance-bubble[_ngcontent-%COMP%] .accept-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#4caf50}.compliance-bubble[_ngcontent-%COMP%]:hover .accept-button[_ngcontent-%COMP%]{opacity:1}.compliance-review-banner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;margin-bottom:20px;background:linear-gradient(135deg,#e8f5e9,#c8e6c9);border:2px solid #4caf50;border-radius:8px}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-info[_ngcontent-%COMP%] .compliance-review-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:28px;width:28px;height:28px;color:#2e7d32}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-info[_ngcontent-%COMP%] .compliance-review-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;min-width:0}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-info[_ngcontent-%COMP%] .compliance-review-text[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:14px;color:#1b5e20;letter-spacing:.02em}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-info[_ngcontent-%COMP%] .compliance-review-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:13px;color:#2e7d32;line-height:1.4;word-wrap:break-word;overflow-wrap:break-word}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-actions[_ngcontent-%COMP%]{display:flex;gap:8px;flex-shrink:0}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.compliance-review-banner[_ngcontent-%COMP%] .compliance-review-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}']}
521);};var zC=class n extends Wa{constructor(){super();}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var Zm=class n{constructor(t){this.dataSource=t;}dataSource;collectionPath="";baseRoute;showNewButton=!0;init=!1;documentRoute;displayedColumns=["number","name"];displayedColumnsHeaders=["Nb.","Name"];ngOnInit(){this.documentRoute=this.baseRoute,this.init=!0;}static ɵfac=function(e){return new(e||n)(le(zC));};static ɵcmp=Te({type:n,selectors:[["app-sub-process-list"]],inputs:{collectionPath:"collectionPath",baseRoute:"baseRoute"},decls:2,vars:9,consts:[[1,"div-content"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute","defaultSortField","defaultSortOrder","forceRefresh"]],template:function(e,i){e&1&&(s(0,"div",0),ee(1,"app-object-list",1),c()),e&2&&(m(),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute)("defaultSortField","number")("defaultSortOrder","asc")("forceRefresh",!0));},dependencies:[$e,ho],encapsulation:2});};var Vf=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;result=!1;ngOnInit(){}onNoClick(){this.dialogRef.close({result:!1});}onYesClick(){this.dialogRef.close({result:!0});}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-confirm-dialog"]],decls:10,vars:2,consts:[["mat-dialog-title",""],["mat-button","",3,"click"],["mat-button","","cdkFocusInitial","",3,"click"]],template:function(e,i){e&1&&(s(0,"h2",0),u(1),c(),s(2,"mat-dialog-content")(3,"p"),u(4),c()(),s(5,"mat-dialog-actions")(6,"button",1),E("click",function(){return i.onNoClick();}),u(7,"Cancel"),c(),s(8,"button",2),E("click",function(){return i.onYesClick();}),u(9,"Ok"),c()()),e&2&&(m(),G(i.data.title),m(3),G(i.data.message));},dependencies:[Zi,Bo,Vo,$o],encapsulation:2});};var To=class n{constructor(t){this.localeCode=t;t.startsWith("fr")?this.locales=this.localesFr:this.locales=this.localesEn;let e=t;this.selectedLocale=null,this.changeLocale(e);}localeCode;locales;selectedLocale;defaultLocale={name:"English",code:"en",lang:"en"};localesFr=[{name:"Anglais (\xC9tats-Unis)",code:"en-CA",lang:"en"},{name:"Anglais (Canada)",code:"en-CA",lang:"en"},{name:"Fran\xE7ais (Canada)",code:"fr-CA",lang:"fr"},{name:"Fran\xE7ais (France)",code:"fr-FR",lang:"fr"}];localesEn=[{name:"English (United-States)",code:"en-US",lang:"en"},{name:"English (Canada)",code:"en-CA",lang:"en"},{name:"Fran\xE7ais (Canada)",code:"fr-CA",lang:"fr"},{name:"Fran\xE7ais (France)",code:"fr-FR",lang:"fr"}];setLocale(t){t.lang=="fr"?this.locales=this.localesFr:this.locales=this.localesEn,this.selectedLocale=this.getLocaleObjectFromCode(t.code);}changeLocale(t){return this.setLocale(this.getLocaleObjectFromCode(t)),this.redirectLocale();}getLocaleObjectFromCode(t){for(let e of Object.keys(this.locales)){let i=e,o=this.locales[i];if(o.code==t)return o;}if(!this.selectedLocale){let i=t.split("-")[0];for(let o of Object.keys(this.locales)){let a=o,r=this.locales[a];if(r.lang==i)return r;}}return this.locales[0];}refreshLocale(){return $(this,null,function*(){this.selectedLocale&&this.changePath(this.selectedLocale.code);});}redirectLocale(){return this.selectedLocale?this.changePath(this.selectedLocale.code):!1;}changePath(t){if(console.log("changePath",t),location.hostname==="localhost"||location.hostname==="127.0.0.1")return!1;let e=/^\/[a-z]{2}-[A-Z]{2}(\/|$)/,i;e.test(location.pathname)?i=location.pathname.replace(e,"/"):i=location.pathname;let o=`/${t}${i}`;return console.log("URL : ",o),location.pathname!=o?(window.location.href=o,!0):!1;}getSelectedLocale(){return this.selectedLocale?this.selectedLocale:this.defaultLocale;}getSelectedLocaleShort(){return this.selectedLocale?this.selectedLocale.code.replace("-",""):this.defaultLocale.code.replace("-","");}getSupportedLocales(){return this.locales;}static ɵfac=function(e){return new(e||n)(rr(hT));};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var sJ=()=>({"min-height":"200px"}),lJ=()=>({standalone:!0}),cJ=(n,t)=>t.description;function pJ(n,t){n&1&&(s(0,"mat-error"),u(1,"Title is required"),
521c());}function dJ(n,t){n&1&&(s(0,"div",11),u(1," Content is required "),c());}function mJ(n,t){n&1&&ee(0,"mat-spinner",14);}function uJ(n,t){n&1&&(s(0,"mat-icon"),u(1,"rate_review"),c());}function fJ(n,t){n&1&&(s(0,"p",15),u(1,"Save the note first to enable AI review."),c());}function hJ(n,t){n&1&&(s(0,"p",15),u(1,"Save the note first to enable AI review."),c());}function _J(n,t){if(n&1){let e=oe();s(0,"mat-card",16)(1,"mat-card-header")(2,"mat-card-title"),u(3," Summary "),s(4,"mat-chip-set")(5,"mat-chip"),u(6),c()()()(),s(7,"mat-card-content")(8,"mat-form-field",23)(9,"textarea",24),Mt("ngModelChange",function(o){k(e);let a=x();return St(a.reviewSummary,o)||(a.reviewSummary=o),R(o);}),c()()()();}if(n&2){let e=x();m(6),_e("~",e.reviewTokenEstimate," tokens"),m(3),wt("ngModel",e.reviewSummary),N("ngModelOptions",Oa(3,lJ));}}function gJ(n,t){if(n&1&&(s(0,"mat-list-item")(1,"mat-icon",25),u(2,"lightbulb"),c(),s(3,"div",26),u(4),c()()),n&2){let e=t.$implicit;m(4),G(e);}}function xJ(n,t){if(n&1&&(s(0,"div",17)(1,"h4"),u(2,"Review Points:"),c(),s(3,"mat-list"),be(4,gJ,5,1,"mat-list-item",null,Pt),c()()),n&2){let e=x();m(4),ye(e.reviewItems);}}function CJ(n,t){n&1&&u(0," compare_arrows ");}function vJ(n,t){n&1&&u(0," find_in_page ");}function bJ(n,t){n&1&&u(0," swap_horiz ");}function yJ(n,t){n&1&&u(0," error_outline ");}function PJ(n,t){n&1&&u(0," warning ");}function wJ(n,t){if(n&1&&(s(0,"mat-list-item",27)(1,"mat-icon",25),S(2,CJ,1,0)(3,vJ,1,0)(4,bJ,1,0)(5,yJ,1,0)(6,PJ,1,0),c(),s(7,"div",28)(8,"mat-chip",29),u(9),c(),s(10,"span",30),u(11),c()(),s(12,"div",31),u(13),c(),s(14,"div",32)(15,"mat-icon",33),u(16,"tips_and_updates"),c(),u(17),c()()),n&2){let e,i=t.$implicit;m(),ji("inconsistency-icon inconsistency-"+i.inconsistency_type),m(),M((e=i.inconsistency_type)==="contradiction"?2:e==="gap"?3:e==="misalignment"?4:e==="factual_error"?5:6),m(7),G(i.inconsistency_type),m(2),G(i.fieldName),m(2),G(i.description),m(4),_e(" ",i.recommendation," ");}}function SJ(n,t){if(n&1&&(s(0,"div",18)(1,"h4"),u(2,"Project Inconsistencies:"),c(),s(3,"mat-list"),be(4,wJ,18,7,"mat-list-item",27,cJ),c()()),n&2){let e=x();m(4),ye(e.reviewProjectInconsistencies);}}function MJ(n,t){if(n&1){let e=oe();s(0,"button",34),E("click",function(){k(e);let o=x();return R(o.onDelete());}),u(1,"Delete"),c();}}var Dd=class n{constructor(t,e,i,o,a){this.dialogRef=t;this.data=e;this.dialog=i;this.firebase=o;this.localeService=a;this.form=new Ri({title:new st("",Ye.required),content:new st("",Ye.required),useForGenAI:new st(!0)});let r=e?.note;r&&(this.form.patchValue({title:r.title,content:r.content,useForGenAI:r.useForGenAI!==void 0?r.useForGenAI:!0}),r.review&&(this.reviewSummary=r.review.summary||"",this.reviewTokenEstimate=r.review.summaryTokenEstimate||0,this.reviewItems=r.review.reviewItems||[],this.reviewProjectInconsistencies=r.review.projectInconsistencies||[]));}dialogRef;data;dialog;firebase;localeService;form;isEditMode=!1;reviewSpinner=!1;reviewSummary="";reviewTokenEstimate=0;reviewItems=[];reviewProjectInconsistencies=[];get note(){return this.data?.note??null;}get canSubmitForReview(){return!!(this.note?.id&&this.data?.noteDocPath);}onSubmitForReview(){return $(this,null,function*(){let t=this.form.get("content")?.value,e=this.form.get("title")?.value;if(!t||!e||!this.canSubmitForReview)return;let i=`${this.data.noteDocPath}/${this.note.id}`,o=this.localeService.getSelectedLocaleShort(),a=ei(this.firebase.functions,"functionReviewNoteStream"),r={noteDocPath:i,content:t,title:e,locale:o};this.data?.projectObject&&(r.projectObject=this.data.projectObject,this.data.projectObject?.enginePath&&(r.enginePath=this.data.projectObject.enginePath),this.data.projectObject?.datastoreId&&(r.datastoreId=this.data.projectObject.datastoreId)),this.reviewSpinner=!0,this.reviewSummary="",this.reviewTokenEstimate=0,this.reviewItems=[],this.reviewProjectInconsistencies=[];try{let{stream:h,data:g}=yield a.stream(r);try{for(var l=Co(h),p,d,f;p=!(d=yield l.next()).done;p=!1){let w=d.value;if(w&&typeof w=="object"){let T=w;T.summary&&(this.reviewSummary=T.summary),T.summaryTokenEstimate&&(this.reviewTokenEstimate=T.summaryTokenEstimate),T.reviewItems&&Array.isArray(T.reviewItems)&&(this.reviewItems=T.reviewItems),T.projectInconsistencies&&Array.isArray(T.projectInconsistencies)&&
521(this.reviewProjectInconsistencies=T.projectInconsistencies);}}}catch(d){f=[d];}finally{try{p&&(d=l.return)&&(yield d.call(l));}finally{if(f)throw f[0];}}let b=yield g;if(b&&typeof b=="object"){let w=b;w.summary&&(this.reviewSummary=w.summary),w.summaryTokenEstimate&&(this.reviewTokenEstimate=w.summaryTokenEstimate),w.reviewItems&&Array.isArray(w.reviewItems)&&(this.reviewItems=w.reviewItems),w.projectInconsistencies&&Array.isArray(w.projectInconsistencies)&&(this.reviewProjectInconsistencies=w.projectInconsistencies);}}catch(h){console.error("Error streaming note review:",h);}finally{this.reviewSpinner=!1;}});}onCancel(){this.dialogRef.close();}onSave(){if(this.form.valid){let t={title:this.form.value.title,content:this.form.value.content,useForGenAI:this.form.value.useForGenAI,date:new Date()};this.note?.id&&(t.id=this.note.id),this.dialogRef.close(t);}}onDelete(){let t={title:"Delete Note",message:"Are you sure you want to delete this note? This action cannot be undone.",acceptLabel:"Delete",rejectLabel:"Cancel"};this.dialog.open(Vf,{width:"350px",data:t}).afterClosed().subscribe(i=>{i&&i.result===!0&&this.dialogRef.close({delete:!0,id:this.note?.id});});}static ɵfac=function(e){return new(e||n)(le(Li),le(fo),le(Ti),le(On),le(To));};static ɵcmp=Te({type:n,selectors:[["app-project-note-dialog"]],decls:34,vars:16,consts:[[1,"note-dialog-container"],["mat-dialog-title",""],[3,"formGroup"],["mat-dialog-content",""],[1,"form-row"],["formControlName","useForGenAI","color","primary",1,"genai-toggle"],["appearance","fill",1,"form-field"],["matInput","","formControlName","title","placeholder","Enter a title for the note"],[1,"form-col"],[1,"editor-container"],["formControlName","content","placeholder","Enter note content here...",3,"styles"],[1,"editor-error"],[1,"form-col","review-section"],["mat-raised-button","","color","accent",3,"click","disabled"],["diameter","18",1,"btn-spinner"],[1,"review-hint"],[1,"review-summary-card"],[1,"review-results"],[1,"review-results","review-inconsistencies"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],["mat-button","","color","warn"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","fill",1,"summary-field"],["matInput","","rows","6","cdkTextareaAutosize","","placeholder","AI-generated summary (editable)",3,"ngModelChange","ngModel","ngModelOptions"],["matListItemIcon",""],["matListItemTitle",""],[1,"inconsistency-item"],["matListItemTitle","",1,"inconsistency-title"],[1,"inconsistency-type-chip"],[1,"inconsistency-field"],["matListItemLine","",1,"inconsistency-description"],["matListItemLine","",1,"inconsistency-recommendation"],[1,"recommendation-icon"],["mat-button","","color","warn",3,"click"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"h2",1),u(2),c(),s(3,"form",2)(4,"div",3)(5,"div",4)(6,"mat-slide-toggle",5),u(7," Use for GenAI "),c()(),s(8,"div",4)(9,"mat-form-field",6)(10,"mat-label"),u(11,"Title"),c(),ee(12,"input",7),S(13,pJ,2,0,"mat-error"),c()(),s(14,"div",8)(15,"div",9),ee(16,"quill-editor",10),S(17,dJ,2,0,"div",11),c()()(),s(18,"div",12)(19,"button",13),E("click",function(){return i.onSubmitForReview();}),S(20,mJ,1,0,"mat-spinner",14)(21,uJ,2,0,"mat-icon"),u(22," Summarize and review "),c(),S(23,fJ,2,0,"p",15),S(24,hJ,2,0,"p",15),S(25,_J,10,4,"mat-card",16),S(26,xJ,6,0,"div",17),S(27,SJ,6,0,"div",18),c(),s(28,"div",19)(29,"button",20),E("click",function(){return i.onCancel();}),u(30,"Cancel"),c(),S(31,MJ,2,0,"button",21),s(32,"button",22),E("click",function(){return i.onSave();}),u(33),c()()()()),e&2&&(m(2),G(i.note?"Edit Note":"Add New Note"),m(),N("formGroup",i.form),m(10),M(i.form.controls.title.hasError("required")?13:-1),m(3),N("styles",Oa(15,sJ)),m(),M(i.form.controls.content.hasError("required")&&i.form.controls.content.touched?17:-1),m(2),N("disabled",!i.canSubmitForReview||i.reviewSpinner),m(),M(i.reviewSpinner?20:21),m(3),M(!i.canSubmitForReview&&i.note?23:-1),m(),M(i.note?-1:24),m(),M(i.reviewSummary?25:-1),m(),M(i.reviewItems&&i.reviewItems.length>0?26:-1),m(),M(i.reviewProjectInconsistencies&&i.reviewProjectInconsistencies.length>0?27:-1),m(4),M(i.note!=null&&i.note.id?31:-1),m(),N("disabled",i.form.invali
521d),m(),_e(" ",i.note?"Update":"Save"," "));},dependencies:[gn,Nn,Ft,Tt,Mn,Po,tn,An,Wn,Zi,Bo,Vo,$o,$e,Qe,Gt,Vt,Wt,ti,jt,Xt,ud,Cf,aI,ha,hd,gd,xd,_d,es,E1,T1,fd,O1,M1,We,Xe,Fi,zi,yi,Ta,Ls,DC],styles:[".form-row[_ngcontent-%COMP%]{margin-bottom:16px;display:flex;align-items:center;gap:16px}.form-col[_ngcontent-%COMP%]{margin-bottom:16px;display:flex;width:100%;flex-direction:column;align-items:center;gap:16px}.form-field[_ngcontent-%COMP%]{flex:1}.genai-toggle[_ngcontent-%COMP%]{margin-top:4px;white-space:nowrap}.editor-label[_ngcontent-%COMP%]{font-size:12px;color:#0009;margin-bottom:4px}.editor-container[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12);border-radius:4px;width:100%;overflow:hidden}.editor-error[_ngcontent-%COMP%]{color:#f44336;font-size:12px;margin-top:4px} quill-editor{min-height:200px;display:block} .ql-container .ql-editor{min-height:150px}.review-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.review-summary-card[_ngcontent-%COMP%]{width:100%}.review-summary-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding-top:8px}.summary-field[_ngcontent-%COMP%]{width:100%}.review-results[_ngcontent-%COMP%]{width:100%;margin-top:16px}.review-results[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-top:0;margin-bottom:8px} .mat-mdc-list-item{height:auto!important;margin-bottom:8px}.review-inconsistencies[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.12);padding-top:8px}.review-inconsistencies[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#e65100}.inconsistency-item[_ngcontent-%COMP%]{display:block!important;padding:8px 0!important;border-bottom:1px solid rgba(0,0,0,.06)}.inconsistency-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.inconsistency-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.inconsistency-type-chip[_ngcontent-%COMP%]{font-size:11px!important;min-height:20px!important;padding:2px 8px!important;text-transform:uppercase;font-weight:500}.inconsistency-field[_ngcontent-%COMP%]{font-weight:500;font-size:13px;color:#555}.inconsistency-description[_ngcontent-%COMP%]{font-size:13px;line-height:1.5;white-space:normal!important;margin-top:4px;color:#000c}.inconsistency-recommendation[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;font-size:12px;color:#388e3c;margin-top:4px;white-space:normal!important}.inconsistency-recommendation[_ngcontent-%COMP%] .recommendation-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;margin-top:1px;flex-shrink:0}.inconsistency-icon.inconsistency-contradiction[_ngcontent-%COMP%]{color:#d32f2f}.inconsistency-icon.inconsistency-gap[_ngcontent-%COMP%]{color:#f57c00}.inconsistency-icon.inconsistency-misalignment[_ngcontent-%COMP%]{color:#7b1fa2}.inconsistency-icon.inconsistency-factual_error[_ngcontent-%COMP%]{color:#c62828}"]});};function OJ(n,t){n&1&&Ma(0);}function EJ(n,t){if(n&1&&(s(0,"div",4)(1,"mat-icon",5),u(2,"library_books"),c(),s(3,"span",6),u(4,"Organisation contexts"),c()(),s(5,"div",7),Zt(6,OJ,1,0,"ng-container",8),c()),n&2){x();let e=bn(5);m(6),N("ngTemplateOutlet",e);}}function TJ(n,t){n&1&&Ma(0);}function IJ(n,t){if(n&1){let e=oe();s(0,"div",4)(1,"mat-icon",5),u(2,"note"),c(),s(3,"span",6),u(4,"Process notes"),c(),s(5,"div",9)(6,"button",10),E("click",function(){k(e);let o=x();return R(o.openNoteDialog());}),s(7,"mat-icon"),u(8,"add"),c()()()(),s(9,"div",7),Zt(10,TJ,1,0,"ng-container",8),c();}if(n&2){x();let e=bn(7);m(10),N("ngTemplateOutlet",e);}}function kJ(n,t){n&1&&(s(0,"mat-icon",17),u(1,"library_books"),c(),s(2,"span"),u(3,"Contexts"),c());}function RJ(n,t){n&1&&Ma(0);}function NJ(n,t){n&1&&(s(0,"mat-icon",17),u(1,"note"),c(),s(2,"span"),u(3,"Notes"),c());}function AJ(n,t){n&1&&Ma(0);}function DJ(n,t){if(n&1){let e=oe();s(0,"mat-tab-group",11),Mt("selectedIndexChange",function(o){k(e);let a=x();return St(a.selectedTabIndex,o)||(a.selectedTabIndex=o),R(o);}),s(1,"mat-tab"),Zt(2,kJ,4,0,"ng-template",12),s(3,"div",13),Zt(4,RJ,1,0,"ng-container",8),c()(),s(5,"mat-tab"),Zt(6,NJ,4,0,"ng-template",12),s(7,"div",13)(8,"div",14),ee(9,"span",15),s(10,"button",16),E("click",function(){k(e);let o=x();return R(o.openNoteDialog());}),s(11,"mat-icon"),u(12,"add"),c()()(),Zt(13,AJ,1,0,"ng-container",8),c()()();}if(n&2){let e=x(),i=bn(5),o=bn(7);wt("selectedIndex",e.selectedTabIndex),m(4),N("ngTemplateOutlet",i),m(9),N("ngTemplateOutlet",o);}}function jJ(n,t){if(n&1){let e=oe();s(0,"div",19)(1,"mat-checkbox",20),E("change",function(o){let a=k(e).$implicit,r=x(3);return R(r.toggleContext(a.id,o.checked));}),u(2),c()();}if(n&2){let e=t.$implicit,i=x(3);m(),N("checked",i.isContextSelected(e.id))("matTooltip",e.description),m(),_e(" ",e.name," ");}}function LJ(n,t){if(n&1&&(s(0,"div"),be(1,jJ,3,3,"div",19,Pt),c()),n&2){let e=x(2);m(),ye(e.availableContexts);}}
521function zJ(n,t){n&1&&(s(0,"span",18),u(1," No contexts available. "),c());}function FJ(n,t){if(n&1&&(S(0,LJ,3,0,"div"),S(1,zJ,2,0,"span",18)),n&2){let e=x();M(e.availableContexts&&e.availableContexts.length>0?0:-1),m(),M(!e.availableContexts||e.availableContexts.length===0?1:-1);}}function BJ(n,t){if(n&1){let e=oe();s(0,"mat-chip",22),Zn(1,"date"),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.openNoteDialog(o));}),u(2),c();}if(n&2){let e=t.$implicit;Ue("not-for-genai",!e.useForGenAI),N("matTooltip",e.title+" - "+kr(1,5,e.date,"medium"))("color",e.useForGenAI?"primary":"warn"),m(2),_e(" ",e.title," ");}}function $J(n,t){if(n&1&&(s(0,"mat-chip-set"),be(1,BJ,3,8,"mat-chip",21,Pt),c()),n&2){let e=x(2);m(),ye(e.processNotes);}}function VJ(n,t){n&1&&(s(0,"span",18),u(1," No notes available. Click the + button to add your first note. "),c());}function GJ(n,t){if(n&1&&(S(0,$J,3,0,"mat-chip-set"),S(1,VJ,2,0,"span",18)),n&2){let e=x();M(e.processNotes&&e.processNotes.length>0?0:-1),m(),M(!e.processNotes||e.processNotes.length===0?1:-1);}}var jd=class n{constructor(t,e,i,o){this.firebase=t;this.loggingService=e;this.messagingService=i;this.dialog=o;}firebase;loggingService;messagingService;dialog;objectRef;notesPath="";showContexts=!0;showNotes=!0;projectObject;availableContexts=[];selectedContextIds=[];processNotes=[];selectedTabIndex=0;ngOnInit(){this.loadAvailableContexts(),this.objectRef&&this.loadSelectedContexts(),this.notesPath&&this.loadProcessNotes();}ngOnChanges(t){t.objectRef&&this.objectRef&&this.loadSelectedContexts(),t.notesPath&&this.notesPath&&this.loadProcessNotes(),(t.showContexts||t.showNotes)&&(this.selectedTabIndex=0);}loadAvailableContexts(){return $(this,null,function*(){try{let e=mt(we(this.firebase.firestore,"/contexts"),Jt("name","asc")),i=yield at(e);this.availableContexts=[],i.forEach(o=>{let a=o.data();this.availableContexts.push({id:o.id,name:a.name,description:a.description||""});});}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading contexts","",{duration:3e3});}});}loadSelectedContexts(){return $(this,null,function*(){try{if(!this.objectRef)return;let t=yield yt(this.objectRef);if(t.exists()){let e=t.data();this.selectedContextIds=e.selectedContextIds||[];}}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading selected contexts","",{duration:3e3});}});}isContextSelected(t){return this.selectedContextIds.includes(t);}toggleContext(t,e){return $(this,null,function*(){try{if(!this.objectRef)return;e?this.selectedContextIds.includes(t)||this.selectedContextIds.push(t):this.selectedContextIds=this.selectedContextIds.filter(i=>i!==t),yield hn(this.objectRef,{selectedContextIds:this.selectedContextIds}),this.messagingService.open("Context selection updated","",{duration:2e3});}catch(i){this.loggingService.error(i),this.messagingService.open("Error updating context selection","",{duration:3e3});}});}loadProcessNotes(){return $(this,null,function*(){try{if(!this.notesPath)return;let t=mt(we(this.firebase.firestore,this.notesPath),Jt("date","desc")),e=yield at(t);this.processNotes=[],e.forEach(i=>{let o=i.data();this.processNotes.push({id:i.id,title:o.title,content:o.content,useForGenAI:o.useForGenAI!==void 0?o.useForGenAI:!0,date:o.date.toDate(),review:o.review??void 0});});}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading notes","",{duration:3e3});}});}openNoteDialog(t){let e={note:t||null,noteDocPath:this.notesPath,projectObject:this.projectObject};this.dialog.open(Dd,{width:"1200px",maxWidth:"90vw",height:"80%",data:e}).afterClosed().subscribe(o=>{o&&(o.delete?this.deleteProcessNote(o.id):this.saveProcessNote(o));});}saveProcessNote(t){return $(this,null,function*(){try{if(!this.notesPath)return;t.id?(yield hn(ge(this.firebase.firestore,this.notesPath,t.id),{title:t.title,content:t.content,useForGenAI:t.useForGenAI!==void 0?t.useForGenAI:!0,date:t.date}),this.messagingService.open("Note updated successfully","",{duration:3e3})):(yield Ht(we(this.firebase.firestore,this.notesPath),{title:t.title,content:t.content,useForGenAI:t.useForGenAI!==void 0?t.useForGenAI:!0,date:new Date()}),this.messagingService.open("Note added successfully","",{duration:3e3})),yield this.loadProcessNotes();}catch(e){this.loggingService.error(e),this.messagingService.open("Error saving note","",{duration:3e3});}});}deleteProcessNote(t){return $(this,null,function*(){try{if(!this.notesPath||!t)return;yield no(ge(this.firebase.firestore,this.notesPath,t)),this.messagingService.open("Note deleted successfully","",{duration:3e3}),yield this.loadProcessNotes();}catch(e){this.loggingService.error(e),this.messagingService.open("Error deleting note","",{duration:3e3});}});}static ɵfac=function(e){return new(e||n)(le(On),le(Mo),le(Bt),le(Ti));};static ɵcmp=Te({type:n,selectors:[["app-context-notes-panel"]],inputs:{objectRef:"objectRef",notesPath:"notesPath",showContexts:"showContexts",showNotes:"showNotes",projectObject:"projectObject"}
521,features:[ki],decls:8,vars:3,consts:[["contextsContent",""],["notesContent",""],[1,"container-right-panel"],[1,"context-notes-tabs",3,"selectedIndex"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],[1,"container-tile-body-strong"],[4,"ngTemplateOutlet"],[1,"div-button-right"],["mat-icon-button","","color","primary","matTooltip","Add new note",3,"click"],[1,"context-notes-tabs",3,"selectedIndexChange","selectedIndex"],["mat-tab-label",""],[1,"tab-body"],[1,"tab-body-toolbar"],[1,"tab-body-toolbar-spacer"],["mat-icon-button","","matTooltip","Add new note",3,"click"],[1,"tab-label-icon"],[1,"div-insight-disabled"],[1,"context-item"],[3,"change","checked","matTooltip"],[3,"matTooltip","color","not-for-genai"],[3,"click","matTooltip","color"]],template:function(e,i){e&1&&(s(0,"div",2),S(1,EJ,7,1),S(2,IJ,11,1),S(3,DJ,14,3,"mat-tab-group",3),c(),Zt(4,FJ,2,2,"ng-template",null,0,od)(6,GJ,2,2,"ng-template",null,1,od)),e&2&&(m(),M(i.showContexts&&!i.showNotes?1:-1),m(),M(i.showNotes&&!i.showContexts?2:-1),m(),M(i.showContexts&&i.showNotes?3:-1));},dependencies:[ut,ad,We,Xe,$e,Qt,ra,xr,yi,Ta,Ls,$t,_n,Tl,vd,Ol,El,bl],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
521.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:20px;max-height:20px}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.container-tile-title-strong[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}.context-notes-tabs[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.context-notes-tabs[_ngcontent-%COMP%] .mat-mdc-tab-header{background-color:#465d91;border-radius:10px 10px 0 0}.context-notes-tabs[_ngcontent-%COMP%] .mat-mdc-tab .mdc-tab__text-label{color:#ffffffb3!important}.context-notes-tabs[_ngcontent-%COMP%] .mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:#fff!important}.context-notes-tabs[_ngcontent-%COMP%] .mat-mdc-tab .mdc-tab__text-label mat-icon{color:#ffffffb3!important}.context-notes-tabs[_ngcontent-%COMP%] .mat-mdc-tab.mdc-tab--active .mdc-tab__text-label mat-icon{color:#fff!important}.context-notes-tabs[_ngcontent-%COMP%] .mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:#fff!important}.context-notes-tabs[_ngcontent-%COMP%] .mat-mdc-tab-body-wrapper{flex:1;overflow:hidden}.tab-label-icon[_ngcontent-%COMP%]{margin-right:6px;font-size:20px;width:20px;height:20px}.tab-body[_ngcontent-%COMP%]{padding:10px;height:100%;overflow:auto;display:flex;flex-direction:column}.tab-body-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;margin-bottom:4px;flex-shrink:0}.tab-body-toolbar-spacer[_ngcontent-%COMP%]{flex:1}.context-item[_ngcontent-%COMP%]{padding:4px 0}.not-for-genai[_ngcontent-%COMP%]{opacity:.6}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};function qJ(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function JJ(n,t){n&1&&(s(0,"mat-icon",43),u(1,"autorenew"),c());}function HJ(n,t){n&1&&(s(0,"span"),u(1,"Generating..."),c());}function UJ(n,t){n&1&&(s(0,"span"),u(1,"Generate"),c());}function WJ(n,t){if(n&1&&(s(0,"as-split-area",21),ee(1,"app-context-notes-panel",46),c()),n&2){let e=x(2);N("size",e.splitSizesRight.contextNotes),m(),N("objectRef",e.objectRef)("notesPath",e.getNotesPath())("showContexts",!0)("showNotes",!0);}}function XJ(n,t){if(n&1&&(s(0,"as-split-area",21)(1,"div",47)(2,"div",48)(3,"mat-icon",49),u(4,"chat"),c(),s(5,"span",50),u(6,"Chat with the architect"),c()(),s(7,"div",51),ee(8,"app-ask-architect",52),c()()()),n&2){let e=x(2);N("size",e.splitSizesRight.chat),m(8),N("objectTypeId","businessProcess")("object",e.object);}}function YJ(n,t){if(n&1){let e=oe();s(0,"as-split-area",21)(1,"as-split",45),E("dragEnd",function(o){k(e);let a=x();
521return R(a.onVerticalDragEnd(o));}),S(2,WJ,2,5,"as-split-area",21),S(3,XJ,9,3,"as-split-area",21),c()();}if(n&2){let e=x();N("size",e.splitSizes.right),m(),N("gutterSize",6),m(),M(e.panelVisibility.contextNotes?2:-1),m(),M(e.panelVisibility.chat?3:-1);}}var Gf=class n{constructor(t,e,i,o,a,r,l,p,d){this.firebase=t;this.router=e;this.route=i;this.authService=o;this.httpClient=a;this.messagingService=r;this.loggingService=l;this.localeService=p;this.dialog=d;this.objectLabel="Business Process",this.collectionPath="/businessprocesses/",this.collectionLabel="Business Processes",this.parentRouterLink="/dashboard/businessprocesses",this.currentRouterLink="/dashboard/businessprocess",this.form=new Ri({number:new st("",Ye.required),name:new st("",Ye.required),description:new st(""),keySteps:new st(""),actors:new st(""),io:new st(""),kpi:new st(""),volume:new st("")}),this.restoreSplitSizes(),this.restorePanelVisibility();}firebase;router;route;authService;httpClient;messagingService;loggingService;localeService;dialog;subscriptions=new jo();formControlRef;object;objectRef;form;objectLabel;collectionPath;collectionLabel;parentRouterLink;currentRouterLink;id;pid;insightTitle="";insight="";debugData;subProcesses;processNotes=[];availableContexts=[];selectedContextIds=[];selectedTabIndex=0;SPLIT_H_KEY="bp-split-horizontal";SPLIT_V_KEY="bp-split-vertical";PANEL_VIS_KEY="bp-panel-visibility";splitSizes={left:70,right:30};splitSizesRight={contextNotes:50,chat:50};panelVisibility={contextNotes:!0,chat:!0};get isProcessCreated(){return!!this.object?.id;}setInsightTitle(t){this.insightTitle=t;}setInsight(t){this.insight=t;}setDebugData(t){this.debugData=t;}ngOnInit(){return $(this,null,function*(){try{let t=this.route.snapshot.paramMap.get("pid");if(t!=null&&(this.pid=t),!this.pid)return;this.collectionPath="/projects/"+this.pid+"/businessprocesses/",this.parentRouterLink="/dashboard/project/"+this.pid,this.currentRouterLink="/dashboard/project/"+this.pid+"/businessprocess";let e=this.route.snapshot.paramMap.get("id");if(e!=null&&(this.id=e),!this.id){this.selectedTabIndex=1;return;}this.objectRef=ge(this.firebase.firestore,this.collectionPath,this.id),this.subProcesses=yield this.getSubProcessList(),yield this.loadProcessNotes(),yield this.loadAvailableContexts(),yield this.loadSelectedContexts(),this.subscriptions.add(Bn(this.objectRef,i=>$(this,null,function*(){this.object=X({id:i.id},i.data()),this.form.patchValue({number:this.object.number,name:this.object.name,description:this.object.description,keySteps:this.object.keySteps,actors:this.object.actors,io:this.object.io,kpi:this.object.kpi,volume:this.object.volume});})));}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading data","",{duration:3e3});}});}ngOnDestroy(){this.subscriptions.unsubscribe();}getSubProcessRoute(){return this.currentRouterLink+"/"+this.id+"/subprocess";}getSubProcessPath(){return this.getSubProcessBasePath()+this.getSubProcessCollection();}getSubProcessCollection(){return"/subprocesses";}getSubProcessBasePath(){return this.collectionPath+this.id;}getNotesPath(){return`/projects/${this.pid}/notes`;}getSubProcessList(){return $(this,null,function*(){let t=[],e=mt(we(this.firebase.firestore,this.getSubProcessPath()),Jt("number","asc")),i=yield at(e);for(let o of i.docs){let a=X({id:o.id},o.data());t.push(a);}return t;});}references=[];clickField(t,e){return $(this,null,function*(){console.log(t),this.references=[];let i=mt(we(this.firebase.firestore,"fields/"+t+"_"+e+"/references"),Jt("name","asc")),o=yield at(i);for(let a of o.docs){let r=X({id:a.id},a.data());this.references.push({detail:r.detail,name:r.name,web:r.web,truncated:r.detail.substring(0,400)+"..."});}});}clickSave(){let t=ts.extractDataFromFormGroup(this.form);this.saveObject(t);}clickOpenLink(t){}saveObject(t){return $(this,null,function*(){if(this.objectRef)yield Dt(this.objectRef,t,{merge:!0}),this.messagingService.open("Data saved","",{duration:3e3});else{t.creationDate=new Date();let e=yield Ht(we(this.firebase.firestore,this.collectionPath),t);this.messagingService.open("Business process created","",{duration:3e3}),this.router.navigate([this.currentRouterLink+"/"+e.id]);}});}generateSpinner=!1;clickGenerate(){return $(this,null,function*(){if(!this.object)return;let t=yield this.generateSubProcessList(this.object);try{t?this.dialog.open(gs,{height:"50%",width:"1000px",data:{rawData:t}}).afterClosed().subscribe(i=>$(this,null,function*(){if(i){let o=this.getNextNumber();for(let a of i)a.selected&&a.selected==!0&&this.object&&(this.addSubProcess(this.object,o,a.title,a.description,a.main_actors),o++);this.messagingService.open("Sub-processes added.","",{duration:3e3});}})):this.messagingService.open("No results.","",{duration:3e3});}catch(e){this.messagingService.open("An error has occured, please try again later or contact the administrator.","",{duration:3e3});}});}generateSubProcessList(t){return $(this,null,function*(){let e=this.firebase.functions,i=ei(e,"functionCallFunctionStream"),o,a={functionName:"generate_subprocesses",version:"1.0",locale:this.localeService.getSelectedLocaleShort(),objectType:"businessProcess",object:{businessProcess:t},acceptsStreaming:!0,objectDocPath:`projects/${this.pid}`};console.log(a),this.generateSpinner=!0;try{let{stream:f,data:h}=yield i.stream(a);try{for(var r=Co(f),l,p,d;l=!(p=yield r.next()).done;l=!1){let g=p.value;g&&(o=g);}}catch(p){d=[p];}finally{try{l&&(p=r.return)&&(yield p.call(r));}finally{if(d)throw d[0];}}}catch(f){console.error("Error streaming subprocess generation:",f),this.generateSpinner=!1;return;}finally{this.generateSpinner=!1;}return o;});}getNextNumber(){let t=0;if(this.subProcesses)for(let e of this.subProcesses){let i=parseInt(e.number);!isNaN(i)&&i>t&&(t=i);}return t+1;}
521addSubProcess(t,e,i,o,a){return $(this,null,function*(){let r="/projects/"+this.pid+"/businessprocesses/"+t.id+"/subprocesses",l=we(this.firebase.firestore,r),p=ts.stripUndefined({number:e+"",name:i,description:o,actors:a,projectId:this.pid,businessProcessId:t.id,creationDate:Rn.fromDate(new Date())});yield Ht(l,p);});}openNoteDialog(t){this.dialog.open(Dd,{width:"1200px",maxWidth:"90vw",height:"80%",data:t||null}).afterClosed().subscribe(i=>{i&&(i.delete?this.deleteProcessNote(i.id):this.saveProcessNote(i));});}deleteProcessNote(t){return $(this,null,function*(){try{if(!this.id||!t||!this.collectionPath)return;let e=this.getNotesPath();yield no(ge(this.firebase.firestore,e,t)),this.messagingService.open("Note deleted successfully","",{duration:3e3}),yield this.loadProcessNotes();}catch(e){this.loggingService.error(e),this.messagingService.open("Error deleting note","",{duration:3e3});}});}saveProcessNote(t){return $(this,null,function*(){try{if(!this.id||!this.collectionPath)return;let e=this.getNotesPath();t.id?(yield hn(ge(this.firebase.firestore,e,t.id),{title:t.title,content:t.content,useForGenAI:t.useForGenAI!==void 0?t.useForGenAI:!0,date:t.date}),this.messagingService.open("Note updated successfully","",{duration:3e3})):(yield Ht(we(this.firebase.firestore,e),{title:t.title,content:t.content,useForGenAI:t.useForGenAI!==void 0?t.useForGenAI:!0,date:new Date()}),this.messagingService.open("Note added successfully","",{duration:3e3})),yield this.loadProcessNotes();}catch(e){this.loggingService.error(e),this.messagingService.open("Error saving note","",{duration:3e3});}});}loadProcessNotes(){return $(this,null,function*(){try{if(!this.id||!this.collectionPath)return;let t=this.getNotesPath(),e=mt(we(this.firebase.firestore,t),Jt("date","desc")),i=yield at(e);this.processNotes=[],i.forEach(o=>{let a=o.data();this.processNotes.push({id:o.id,title:a.title,content:a.content,useForGenAI:a.useForGenAI!==void 0?a.useForGenAI:!0,date:a.date.toDate()});});}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading notes","",{duration:3e3});}});}loadAvailableContexts(){return $(this,null,function*(){try{let e=mt(we(this.firebase.firestore,"/contexts"),Jt("name","asc")),i=yield at(e);this.availableContexts=[],i.forEach(o=>{let a=o.data();this.availableContexts.push({id:o.id,name:a.name,description:a.description||""});});}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading contexts","",{duration:3e3});}});}loadSelectedContexts(){return $(this,null,function*(){try{if(!this.id||!this.objectRef)return;let t=yield yt(this.objectRef);if(t.exists()){let e=t.data();this.selectedContextIds=e.selectedContextIds||[];}}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading selected contexts","",{duration:3e3});}});}isContextSelected(t){return this.selectedContextIds.includes(t);}toggleContext(t,e){return $(this,null,function*(){try{if(!this.objectRef)return;e?this.selectedContextIds.includes(t)||this.selectedContextIds.push(t):this.selectedContextIds=this.selectedContextIds.filter(i=>i!==t),yield hn(this.objectRef,{selectedContextIds:this.selectedContextIds}),this.messagingService.open("Context selection updated","",{duration:2e3});}catch(i){this.loggingService.error(i),this.messagingService.open("Error updating context selection","",{duration:3e3});}});}foldablePanel=new Map();isFolded(t,e){e==null&&(e=!1);let i=this.foldablePanel.get(t);return i??(this.foldablePanel.set(t,e),!1);}foldPanel(t){}unfoldPanel(t){}togglePanel(t){let e=this.isFolded(t);e=!e,this.foldablePanel.set(t,e);}restoreSplitSizes(){try{let t=localStorage.getItem(this.SPLIT_H_KEY);if(t){let i=JSON.parse(t);i.left&&i.right&&(this.splitSizes=i);}let e=localStorage.getItem(this.SPLIT_V_KEY);if(e){let i=JSON.parse(e);i.contextNotes&&i.chat&&(this.splitSizesRight=i);}}catch(t){}}onHorizontalDragEnd(t){let e=t.sizes;e&&e.length===2&&(this.splitSizes={left:e[0],right:e[1]},localStorage.setItem(this.SPLIT_H_KEY,JSON.stringify(this.splitSizes)));}restorePanelVisibility(){try{let t=localStorage.getItem(this.PANEL_VIS_KEY);if(t){let e=JSON.parse(t);typeof e.contextNotes=="boolean"&&typeof e.chat=="boolean"&&(this.panelVisibility=e);}}catch(t){}}togglePanelVisibility(t){this.panelVisibility[t]=!this.panelVisibility[t],localStorage.setItem(this.PANEL_VIS_KEY,JSON.stringify(this.panelVisibility));}onVerticalDragEnd(t){let e=t.sizes,i=[];this.panelVisibility.contextNotes&&i.push("contextNotes"),this.panelVisibility.chat&&i.push("chat"),e&&e.length===i.length&&(i.forEach((o,a)=>{this.splitSizesRight[o]=e[a];}),localStorage.setItem(this.SPLIT_V_KEY,JSON.stringify(this.splitSizesRight)));}clickDesignBpmn(){this.router.navigate(["dashboard/project/"+this.pid+"/business-process-designer/"+this.id+"/"]);}clickGapAnalysis(){this.router.navigate(["dashboard/gapanalysis/"+this.pid]);}clickBack(){this.router.navigate([this.parentRouterLink]);}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Oo),le(Zr),le(Bt),le(Mo),le(To),le(Ti));};static ɵcmp=Te({type:n,selectors:[["app-business-process"]],inputs:{collectionPath:"collectionPath"},decls:87,vars:47,consts:[["businessprocess_description",""],["businessprocess_keysteps",""],["businessprocess_actors",""],["businessprocess_io",""],["businessprocess_kpi",""],[1,"project-wrapper"],[1,"project-header"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-panel-toggles"],["mat-icon-button","","matTooltip","Show/hide contexts & notes panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide chat panel",3,"click"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-flat-button","",3,"disabled"],["mat-flat-button","","color","primary",3,"click"],[1,"div-content"],["direction","horizontal",3,"dragEnd","gutterSize"],[3,"size"],[1,"container-left"],[1,"container-tile"],[3,"selectedIndexChange","selectedIndex"],["label","Process",3,"disabled"],[1,"tab-content"],[3,"formGroup"],[1,"div-form-element"],["objectType","businessProcess","field","businessprocess_description","controlName","description",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],["objectType","businessProcess","field","businessprocess_keysteps","controlName","keySteps",3,"click","onDebugData","onInsightTitle","onInsight","onSave","object","form","notesPath"],["objectType","businessProcess","field","businessprocess_actors","controlName","actors",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],["objectType","businessProcess","field","businessprocess_io","controlName","io",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],["objectType","businessProcess","field","businessprocess_kpi","controlName","kpi",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],["label","Detail"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","number"],[1,"mat-subfield-text"],["matInput","","formControlName","name"],[1,"div-container-button"],["mat-raised-button","","color","primary",3,"click","disabled"],["label","Sub-Processes",3,"disabled"],["mat-raised-button","","color","primary","color","primary","matTooltip","Generate sub-processes",3,"click","disabled"],[1,"icon-loading"],[3,"collectionPath","baseRoute"],["direction","vertical",3,"dragEnd","gutterSize"],[3,"objectRef","notesPath","showContexts","showNotes"],[1,"container-right-panel","container-right-chat"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],[1,"container-tile-body-strong","chat-body"],[3,"objectTypeId","object"]],template:function(e,i){if(e&1&&(s(0,"div",5)(1,"div",6)(2,"mat-toolbar",7)(3,"div",8)(4,"div")(5,"mat-icon",9),u(6,"account_tree"),c()(),s(7,"div")(8,"div",10),u(9),c(),s(10,"div",11),u(11),c()()(),s(12,"div",12)(13,"button",13),E("click",function(){return i.togglePanelVisibility("contextNotes");}),s(14,"mat-icon"),u(15,"library_books"),c()(),s(16,"button",14),E("click",function(){return i.togglePanelVisibility("chat");}),s(17,"mat-icon"),u(18,"chat"),c()()(),s(19,"div",15)(20,"button",16),E("click",function(){return i.clickDesignBpmn();}),u(21," Design BPMS "),s(22,"mat-icon"),u(23,"schema"),c()(),s(24,"button",17),u(25," Design process mode "),s(26,"mat-icon"),u(27,"category"),c()(),s(28,"button",18),E("click",function(){return i.clickGapAnalysis();}),u(29," Gap analysis mode "),s(30,"mat-icon"),u(31,"tune"),c()()()(),s(32,"div",19)(33,"as-split",20),E("dragEnd",function(a){return i.onHorizontalDragEnd(a);}),s(34,"as-split-area",21)(35,"div",22)(36,"div",23)(37,"mat-tab-group",24),E("selectedIndexChange",function(a){return i.selectedTabIndex=a;}),s(38,"mat-tab",25)(39,"div",26)(40,"form",27)(41,"div",28)(42,"app-intelligent-field",29,0),E("click",function(){return i.click
521Field("businessprocess_description","2.0");})("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()(),s(44,"div",28)(45,"app-intelligent-field",30,1),E("click",function(){return i.clickField("businessprocess_keysteps","2.0");})("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()(),s(47,"div",28)(48,"app-intelligent-field",31,2),E("click",function(){return i.clickField("businessprocess_actors","2.0");})("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()(),s(50,"div",28)(51,"app-intelligent-field",32,3),E("click",function(){return i.clickField("businessprocess_io","2.0");})("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()(),s(53,"div",28)(54,"app-intelligent-field",33,4),E("click",function(){return i.clickField("businessprocess_kpi","2.0");})("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()()()()(),s(56,"mat-tab",34)(57,"div",26)(58,"form",27)(59,"div",28)(60,"mat-form-field",35)(61,"mat-label"),u(62,"Process number"),c(),ee(63,"input",36),s(64,"mat-error",37),u(65,"Field is required"),c()()(),s(66,"div",28)(67,"mat-form-field",35)(68,"mat-label"),u(69,"Name"),c(),ee(70,"input",38),s(71,"mat-error",37),u(72,"Field is required"),c()()(),s(73,"div",39)(74,"button",40),E("click",function(){return i.clickSave();}),u(75,"Save"),c()()()()(),s(76,"mat-tab",41)(77,"div",26)(78,"div",23)(79,"div",15)(80,"button",42),E("click",function(){return i.clickGenerate();}),S(81,qJ,2,0,"mat-icon"),S(82,JJ,2,0,"mat-icon",43),S(83,HJ,2,0,"span"),S(84,UJ,2,0,"span"),c()(),ee(85,"app-sub-process-list",44),c()()()()()()(),S(86,YJ,4,4,"as-split-area",21),c()()()()),e&2){let o=bn(46),a=bn(52),r=bn(55);m(9),G(i.objectLabel),m(2),Hn("",i.form.value.number,". ",i.form.value.name),m(2),Ue("toggle-active",i.panelVisibility.contextNotes)("toggle-inactive",!i.panelVisibility.contextNotes),m(3),Ue("toggle-active",i.panelVisibility.chat)("toggle-inactive",!i.panelVisibility.chat),m(4),N("disabled",!i.isProcessCreated),m(4),N("disabled",!0),m(9),N("gutterSize",6),m(),N("size",i.splitSizes.left),m(3),N("selectedIndex",i.selectedTabIndex),m(),N("disabled",!i.isProcessCreated),m(2),N("formGroup",i.form),m(2),N("nextIntelligenField",o)("object",i.object)("form",i.form)("notesPath","projects/"+i.pid),m(3),N("object",i.object)("form",i.form)("notesPath","projects/"+i.pid),m(3),N("nextIntelligenField",a)("object",i.object)("form",i.form)("notesPath","projects/"+i.pid),m(3),N("nextIntelligenField",r)("object",i.object)("form",i.form)("notesPath","projects/"+i.pid),m(3),N("object",i.object)("form",i.form)("notesPath","projects/"+i.pid),m(4),N("formGroup",i.form),m(16),N("disabled",!i.form.valid),m(2),N("disabled",!i.isProcessCreated),m(4),N("disabled",i.generateSpinner),m(),M(i.generateSpinner?-1:81),m(),M(i.generateSpinner?82:-1),m(),M(i.generateSpinner?83:-1),m(),M(i.generateSpinner?-1:84),m(),N("collectionPath",i.getSubProcessPath())("baseRoute",i.getSubProcessRoute()),m(),M(i.panelVisibility.contextNotes||i.panelVisibility.chat?86:-1);}},dependencies:[$e,Qe,Qt,jt,Xt,Vt,Wt,ti,ut,We,Xe,Gt,br,tn,Nn,Ft,Tt,Mn,An,Wn,ln,yn,Zm,$t,_n,Tl,Ol,El,yi,ra,Cf,zs,vr,cr,Cr,jd],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
521.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.project-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:transparent;height:100%}.project-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.div-toolbar[_ngcontent-%COMP%]{height:100px;margin-bottom:10px;background-color:transparent}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.toolbar-icon[_ngcontent-%COMP%]{padding-right:30px;font-size:50px;width:50px;height:100%}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.title[_ngcontent-%COMP%]{padding-left:10px}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin-left:10px;margin-right:10px;margin-bottom:20px;padding-bottom:0;min-height:0}.div-insight-title[_ngcontent-%COMP%]{font-weight:700;padding-bottom:10px}.div-insight[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%}.no-bullet[_ngcontent-%COMP%]{list-style-type:none}.div-reference-title-link[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;display:flex;flex-direction:row;align-items:baseline;gap:16px}.reference-link[_ngcontent-%COMP%]{color:#1976d2;text-decoration:none;font-weight:700}.reference-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.div-reference-detail[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;text-wrap-mode:wrap;white-space:wrap;max-width:100%}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray}.container-tile-icon[_ngcontent-%COMP%]{color:#465d91}.container-tile[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;padding:20px;margin-bottom:10px}.container-tile-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#faf9fd;color:#465d91;border-bottom:2px solid #465d91;border-radius:10px 10px 0 0;margin-top:10px;max-height:20px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:20px;max-height:20px}.container-tile-folded[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#faf9fd;color:#465d91;border-radius:10px;padding:20px;margin-top:10px;max-height:20px}.div-panel-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:4px;padding:0 16px}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important;filter:none;text-shadow:none}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-inactive[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important;filter:none;text-shadow:none}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end}.container-left[_ngcontent-%COMP%]{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;border-radius:10px}.tab-content[_ngcontent-%COMP%]{padding-top:20px}.tab-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;color:#465d91;padding:20px;margin-bottom:10px;background-color:#faf9fd;border-radius:10px}.tab-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-left:10px;flex:1}.tab-header[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}
521.container-right-chat[_ngcontent-%COMP%] .chat-body[_ngcontent-%COMP%]{flex:1;overflow:auto;display:flex;flex-direction:column}.container-right-chat[_ngcontent-%COMP%] .chat-body[_ngcontent-%COMP%] app-ask-architect[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;width:100%;height:100%} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}.container-bottom[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#fff;margin-top:10px;border-radius:10px;height:100px}.div-container-button[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;height:100%;gap:20px}.input-field[_ngcontent-%COMP%]{margin-right:30px}.form-field[_ngcontent-%COMP%]{width:100%;padding-top:20px;padding-bottom:20px}.icon-highlight[_ngcontent-%COMP%]{color:var(--mat-badge-background-color)}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}.icon-loading[_ngcontent-%COMP%]{transition:transform .5s}.icon-loading.animate[_ngcontent-%COMP%]{transform:rotate(360deg)}.div-form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:no-wrap;align-content:space-around;gap:30px;width:100%}.div-debug-prompt[_ngcontent-%COMP%]{width:100%}.div-form-element[_ngcontent-%COMP%]{margin:auto;width:100%;overflow-x:hidden}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.mat-subfield-text[_ngcontent-%COMP%]{font-size:small}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};var qf=class n{firestore=re(ai);firebase=re(On);createPortfolioCompliance(t,e,i){return $(this,null,function*(){try{let o={portfolioId:t,complianceId:e,complianceName:i,createdAt:xo(),updatedAt:xo()},a=we(this.firestore,"portfolioCompliance");return(yield Ht(a,o)).id;}catch(o){throw console.error("Error creating portfolio compliance:",o),o;}});}createComplianceProject(t,e,i,o=0){return $(this,null,function*(){try{let a={portfolioComplianceId:t,projectId:e,projectName:i,overallScore:0,lastAssessed:xo(),itemsTotal:o,itemsEvaluated:0},r=we(this.firestore,"portfolioCompliance",t,"complianceProject");return(yield Ht(r,a)).id;}catch(a){throw console.error("Error creating compliance project:",a),a;}});}getProjectComplianceSummary(t,e){return new Lo(i=>{let o=we(this.firestore,"portfolioCompliance"),a=mt(o,Ro("portfolioId","==",t));return Bn(a,l=>$(this,null,function*(){try{if(l.empty){i.next(null);return;}let p=[],d="";for(let g of l.docs){let b=X({id:g.id},g.data()),w=we(this.firestore,"portfolioCompliance",b.id,"complianceProject"),T=mt(w,Ro("projectId","==",e)),O=yield at(T);if(!O.empty){let V=X({id:O.docs[0].id},O.docs[0].data());d||(d=V.projectName),p.push({complianceId:b.complianceId,complianceName:b.complianceName,overallScore:V.overallScore,itemsTotal:V.itemsTotal,itemsEvaluated:V.itemsEvaluated,lastAssessed:V.lastAssessed});}}if(p.length===0){i.next(null);return;}let f=Math.round(p.reduce((g,b)=>g+b.overallScore,0)/p.length),h={projectId:e,projectName:d||`Project ${e}`,globalComplianceScore:f,complianceScores:p,lastUpdated:xo()};i.next(h);}catch(p){console.error("Error getting project compliance summary:",p),i.next(null);}}));});}initializeComplianceAssessment(t,e,i,o){return $(this,null,function*(){try{let a=we(this.firestore,"portfolioCompliance"),r=mt(a,Ro("portfolioId","==",t),Ro("complianceId","==",e)),l=yield at(r),p;if(l.empty){let b=yield yt(ge(this.firestore,"compliances",e)),w=b.exists()?b.data().name:"Unknown Compliance";p=yield this.createPortfolioCompliance(t,e,w);}else p=l.docs[0].id;let d=we(this.firestore,"portfolioCompliance",p,"complianceProject"),f=mt(d,Ro("projectId","==",i)),h=yield at(f),g;if(h.empty){let b=we(this.firestore,"compliances",e,"items"),w=yield at(b);g=yield this.createComplianceProject(p,i,o,w.size);}else g=h.docs[0].id;return{portfolioComplianceId:p,complianceProjectId:g};}catch(a){throw console.error("Error initializing compliance assessment:",a),a;}});}getComplianceAssessment(t,e){return $(this,null,function*(){try{let i=ge(this.firestore,"portfolioCompliance",t,"complianceProject",e),o=yield yt(i);if(!o.exists())return null;let a=X({id:o.id},o.data()),r=ge(this.firestore,"portfolioCompliance",t),l=yield yt(r);if(!l.exists())return null;let p=X({id:l.id},l.data()),d=ge(this.firestore,"compliances",p.complianceId),f=yield yt(d);if(!f.exists())return null;let h=X({id:f.id},f.data()),g=we(this.firestore,"compliances",h.id,"items"),b=yield at(g);h.items=b.docs.map(V=>X({id:parseInt(V.id)},V.data()));let w=we(this.firestore,"portfolioCompliance",t,"complianceProject",e,"itemResults"),O=(yield at(w)).docs.map(V=>X({id:V.id},V.data()));return{complianceProject:a,itemResults:O,compliance:h};}catch(i){throw console.error("Error getting compliance assessment:",i),i;}});}saveComplianceItemResult(t,e,i){return $(this,null,function*(){try{let o=Ve(X({},i),{assessedAt:xo()}),a=we(this.firestore,"portfolioCompliance",t,"complianceProject",e,"itemResults"),r=yield Ht(a,o);return yield this.updateComplianceProjectScore(t,e),r.id;}catch(o){throw console.error("Error saving compliance item result:",o),o;}});}updateComplianceItemResult(t,e,i,o){return $(this,null,function*(){try{let a=Ve(X({},o),{assessedAt:xo()}
521),r=ge(this.firestore,"portfolioCompliance",t,"complianceProject",e,"itemResults",i);yield hn(r,a),yield this.updateComplianceProjectScore(t,e);}catch(a){throw console.error("Error updating compliance item result:",a),a;}});}evaluateComplianceItemWithAI(t,e,i,o="en-CA"){return $(this,null,function*(){return(yield ei(this.firebase.functions,"functionEvaluateComplianceItem")({projectId:t,complianceItem:e,complianceName:i,locale:o})).data;});}updateComplianceProjectScore(t,e){return $(this,null,function*(){try{let i=we(this.firestore,"portfolioCompliance",t,"complianceProject",e,"itemResults"),r=(yield at(i)).docs.map(d=>X({id:d.id},d.data())).filter(d=>d.status==="evaluated"||d.status==="not-applicable"),l=0;if(r.length>0){let d=r.reduce((f,h)=>f+h.score,0);l=Math.round(d/r.length);}let p=ge(this.firestore,"portfolioCompliance",t,"complianceProject",e);yield hn(p,{overallScore:l,itemsEvaluated:r.length,lastAssessed:xo()});}catch(i){throw console.error("Error updating compliance project score:",i),i;}});}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};function KJ(n,t){if(n&1&&u(0),n&2){let e=x();_e(" ",e.assessment.compliance.name," ");}}function ZJ(n,t){n&1&&u(0," Loading... ");}function QJ(n,t){n&1&&u(0," Assessment ");}function eH(n,t){if(n&1&&(s(0,"div",8),u(1),c()),n&2){let e=x();m(),_e(" ",e.assessment.complianceProject.projectName||"Unknown project"," ");}}function tH(n,t){if(n&1&&(s(0,"div",9)(1,"div",16)(2,"span",17),u(3,"Overall Score"),c(),s(4,"span",18),u(5),c()(),s(6,"div",16)(7,"span",17),u(8,"Completion"),c(),s(9,"span",18),u(10),c()(),s(11,"div",16)(12,"span",17),u(13,"Items"),c(),s(14,"span",18),u(15),c()(),s(16,"div",19),ee(17,"mat-progress-bar",20),c()()),n&2){let e=x();m(4),Ci("color",e.getScoreColor(e.getOverallScore())),m(),_e(" ",e.getOverallScore(),"% "),m(5),_e("",e.getCompletionPercentage(),"%"),m(5),G((e.assessment.compliance.items==null?null:e.assessment.compliance.items.length)||0),m(2),N("value",e.getCompletionPercentage())("color",e.getCompletionPercentage()>=80?"primary":"accent");}}function nH(n,t){n&1&&u(0," Cancelling\u2026 ");}function iH(n,t){if(n&1&&u(0),n&2){let e=x(3);Hn(" Cancel (",e.batchProgress.done,"/",e.batchProgress.total,") ");}}function oH(n,t){if(n&1){let e=oe();s(0,"button",23),E("click",function(){k(e);let o=x(2);return R(o.evaluateWithAI());}),s(1,"mat-icon"),u(2,"cancel"),c(),S(3,nH,1,0)(4,iH,1,2),c();}if(n&2){let e=x(2);N("disabled",e.batchEvaluationCancelled),m(3),M(e.batchEvaluationCancelled?3:4);}}function aH(n,t){if(n&1){let e=oe();s(0,"button",24),E("click",function(){k(e);let o=x(2);return R(o.evaluateWithAI());}),s(1,"mat-icon"),u(2,"auto_awesome"),c(),u(3," Evaluate with AI "),c();}}function rH(n,t){if(n&1&&S(0,oH,5,2,"button",21)(1,aH,4,0,"button",22),n&2){let e=x();M(e.isBatchEvaluating?0:1);}}function sH(n,t){n&1&&(s(0,"div",13),ee(1,"mat-spinner"),s(2,"p"),u(3,"Loading compliance assessment..."),c()());}function lH(n,t){if(n&1){let e=oe();s(0,"div",14)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c(),s(5,"button",25),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(6,"mat-icon"),u(7,"arrow_back"),c(),u(8," Back "),c()();}if(n&2){let e=x();m(4),G(e.error);}}function cH(n,t){n&1&&(s(0,"div",29)(1,"mat-icon"),u(2,"assignment"),c(),s(3,"h3"),u(4,"No Items Found"),c(),s(5,"p"),u(6,"This compliance checklist doesn't contain any items yet."),c()());}function pH(n,t){if(n&1&&(s(0,"span",74),u(1),c()),n&2){let e=x().$implicit;m(),Hn(" ",e.value,". ",e.label," ");}}function dH(n,t){if(n&1&&S(0,pH,2,2,"span",74),n&2){let e,i=t.$implicit,o=x().$implicit,a=x(4);M(i.value===((e=a.getItemForm(o.id).get("currentLevel"))==null?null:e.value)?0:-1);}}function mH(n,t){n&1&&(s(0,"span",52),u(1,"Not set"),c());}function uH(n,t){if(n&1&&(s(0,"span",75),u(1),c()),n&2){let e,i,o=x().$implicit,a=x(4);Ci("background-color",a.getScoreColor(((e=a.itemResults.get(o.id.toString()))==null?null:e.score)||0)),m(),_e(" ",((i=a.itemResults.get(o.id.toString()))==null?null:i.score)||0,"% ");}}function fH(n,t){n&1&&(fi(0),s(1,"mat-icon",76),u(2,"autorenew"),c(),u(3," Evaluating\u2026 "),hi());}function hH(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"hourglass_empty"),c(),u(3," Queued\u2026 "),hi());}function _H(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"auto_awesome"),c(),u(3," Evaluate with AI "),hi());}function gH(n,t){if(n&1&&(s(0,"mat-option",64),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),_p(" ",e.value,". ",e.label," - ",e.description," ");}}function xH(n,t){if(n&1&&(s(0,"div",82)(1,"div",83)(2,"span",84),u(3,"Find:"),c(),s(4,"span",85),u(5),c()(),s(6,"div",86)(7,"span",84),u(8,"Replace:"),c(),s(9,"span",85),u(10),c()()()),n&2){let e=x().$implicit;m(5),G(e.search),m(5),G(e.replace);}}function CH(n,t){if(n&1&&(s(0,"div",78)(1,"div",79)(2,"span",80),u(3),c(),s(4,"span",81),u(5),c()(),S(6,xH,11,2,"div",82),c()),n&2){let e=t.$implicit;m(3),G(e.field_name),m(2),G(e.description),m(),M(e.search&&e.replace?6:-1);}}function vH(n,t){if(n&1&&(s(0,"div",72)(1,"div",77)(2,"mat-icon"),u(3,"lightbulb"),c(),s(4,"span"),u(5),c()(),be(6,CH,7,3,"div",78,ac),c()),n&2){let e=x().$implicit,i=x(4);m(5),_e("Recommendations (",i.getItemRecommendations(e.id).length,")"),m(),ye(i.getItemRecommendations(e.id));}}function bH(n,t){if(n&1&&(s(0,"div",73)(1,"span",45),u(2),c()()),n&2){let e,i,o=x().$implicit,a=x(4);m(),Ci("background-color",a.getScoreColor(((e=a.itemResults.get(o.id.toString()))==null?null:e.score)||0)),m(),_e(" Score: ",((i=a.itemResults.get(o.id.toString()))==null?null:i.score)||0,"% ");}}function yH(n,t){if(n&1){let e=oe();s(0,"mat-card",48)(1,"mat-card-header")(2,"mat-card-title"),u(3),c(),s(4,"mat-card-subtitle"),u(5),c()(),s(6,"mat-card-content",49)(7,"mat-expansion-panel",50)(8,"mat-expansion-panel-header")(9,"mat-panel-title",51),be(10,dH,1,1,null,null,Pt),S(12,mH,2,0,"span",52),S(13,uH,2,3,"span",53),c()(),s(14,"form",54)(15,"div",55)(16,"mat-form-field",56)(17,"mat-label"),u(18,"Status"),c(),s(19,"mat-select",57)(20,"mat-option",58),u(21,"Not Evaluated"),
521c(),s(22,"mat-option",59),u(23,"Evaluated"),c(),s(24,"mat-option",60),u(25,"Not Applicable"),c()()(),s(26,"button",61),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.evaluateItemWithAI(o.id));}),S(27,fH,4,0,"ng-container")(28,hH,4,0,"ng-container")(29,_H,4,0,"ng-container"),c()(),s(30,"mat-form-field",62)(31,"mat-label"),u(32,"Compliance Level"),c(),s(33,"mat-select",63),be(34,gH,2,4,"mat-option",64,Pt),c()(),s(36,"mat-form-field",65)(37,"mat-label"),u(38,"Evaluation Date"),c(),ee(39,"input",66)(40,"mat-datepicker-toggle",67)(41,"mat-datepicker",null,0),c(),s(43,"mat-form-field",68)(44,"mat-label"),u(45,"Rationale"),c(),ee(46,"textarea",69),c(),s(47,"mat-form-field",70)(48,"mat-label"),u(49,"Notes"),c(),ee(50,"textarea",71),c()(),S(51,vH,8,1,"div",72),S(52,bH,3,3,"div",73),c()()();}if(n&2){let e,i,o,a=t.$implicit,r=bn(42),l=x(4);m(3),G(a.title),m(2),G(a.description),m(5),ye(a.scale.levels),m(2),M(((e=l.getItemForm(a.id).get("currentLevel"))==null?null:e.value)===null||((e=l.getItemForm(a.id).get("currentLevel"))==null?null:e.value)===void 0?12:-1),m(),M(((i=l.getItemForm(a.id).get("status"))==null?null:i.value)==="evaluated"?13:-1),m(),N("formGroup",l.getItemForm(a.id)),m(12),N("disabled",l.evaluatingItems.has(a.id)||l.isBatchEvaluating),m(),M(l.evaluatingItems.has(a.id)?27:l.isBatchEvaluating?28:29),m(7),ye(a.scale.levels),m(5),N("matDatepicker",r),m(),N("for",r),m(11),M(l.getItemRecommendations(a.id).length>0?51:-1),m(),M(((o=l.getItemForm(a.id).get("status"))==null?null:o.value)==="evaluated"?52:-1);}}function PH(n,t){if(n&1&&(s(0,"mat-expansion-panel",41)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"div",42)(4,"span",43),u(5),c(),s(6,"div",44)(7,"span",45),u(8),c(),s(9,"span",46),u(10),c()()()()(),s(11,"div",47),be(12,yH,53,11,"mat-card",48,sf().trackByItem,!0),c()()),n&2){let e=t.$implicit,i=x(3);N("expanded",!0),m(5),G(e.category),m(2),Ci("background-color",i.getScoreColor(e.score)),m(),_e(" ",e.score,"% "),m(2),Hn(" ",e.evaluatedCount,"/",e.totalCount," "),m(2),ye(e.items);}}function wH(n,t){if(n&1&&(s(0,"mat-accordion",30),be(1,PH,14,7,"mat-expansion-panel",41,sf().trackByCategory,!0),c()),n&2){let e=x(2);m(),ye(e.categoryGroups);}}function SH(n,t){if(n&1&&(s(0,"div",39)(1,"div",87)(2,"span",88),u(3),c(),s(4,"span",89),u(5),c()(),s(6,"div",90)(7,"span",45),u(8),c()()()),n&2){let e=t.$implicit,i=x(2);m(3),G(e.category),m(2),Hn("",e.evaluatedCount,"/",e.totalCount," items"),m(2),Ci("background-color",i.getScoreColor(e.score)),m(),_e(" ",e.score,"% ");}}function MH(n,t){n&1&&(s(0,"span",40),u(1,"No categories available."),c());}function OH(n,t){if(n&1&&(s(0,"as-split",15)(1,"as-split-area",26)(2,"div",27)(3,"div",28),S(4,cH,7,0,"div",29),S(5,wH,3,0,"mat-accordion",30),c()()(),s(6,"as-split-area",26)(7,"as-split",31)(8,"as-split-area",26)(9,"div",27)(10,"div",32)(11,"mat-icon",33),u(12,"analytics"),c(),s(13,"span",34),u(14,"Assessment Summary"),c()(),s(15,"div",28)(16,"div",35)(17,"span",36),u(18,"Overall Score"),c(),s(19,"span",37),u(20),c()(),s(21,"div",35)(22,"span",36),u(23,"Assessment Progress"),c(),s(24,"span",37),u(25),c()(),s(26,"div",35)(27,"span",36),u(28,"Total Items"),c(),s(29,"span",37),u(30),c()(),s(31,"div",35)(32,"span",36),u(33,"Evaluated Items"),c(),s(34,"span",37),u(35),c()()()()(),s(36,"as-split-area",26)(37,"div",27)(38,"div",32)(39,"mat-icon",33),u(40,"bar_chart"),c(),s(41,"span",34),u(42,"Category Breakdown"),c()(),s(43,"div",38),be(44,SH,9,6,"div",39,Pt),S(46,MH,2,0,"span",40),c()()()()()()),n&2){let e=x();N("gutterSize",20),m(),N("size",70),m(3),M(e.categoryGroups.length===0?4:-1),m(),M(e.categoryGroups.length>0?5:-1),m(),N("size",30),m(),N("gutterSize",20),m(),N("size",50),m(11),Ci("color",e.getScoreColor(e.getOverallScore())),m(),_e(" ",e.getOverallScore(),"% "),m(5),_e("",e.getCompletionPercentage(),"%"),m(5),G((e.assessment.compliance.items==null?null:e.assessment.compliance.items.length)||0),m(5),G(e.getEvaluatedItemsCount()),m(),N("size",50),m(8),ye(e.categoryGroups),m(2),M(e.categoryGroups.length===0?46:-1);}}var FC=class n{route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);portfolioComplianceService=re(qf);localeService=re(To);portfolioId="";complianceId="";projectId="";portfolioComplianceId="";complianceProjectId="";projectName="";assessment=null;itemResults=new Map();itemRecommendations=new Map();categoryGroups=[];isLoading=!0;isSaving=!1;error=null;selectedTabIndex=0;evaluatingItems=new Set();isBatchEvaluating=!1;batchEvaluationCancelled=!1;batchProgress={done:0,total:0};itemForms=new Map();subscriptions=[];evaluateWithAI(){return $(this,null,function*(){if(!this.assessment){this.snackBar.open("No assessment data available","Close",{duration:3e3});return;}if(this.isBatchEvaluating){this.batchEvaluationCancelled=!0;return;}let t=this.assessment.compliance.items??[];if(t.length===0){this.snackBar.open("No compliance items to evaluate","Close",{duration:3e3});return;}this.isBatchEvaluating=!0,this.batchEvaluationCancelled=!1,this.batchProgress={done:0,total:t.length};let e=3;for(let o=0;o<t.length&&(yield new Promise(r=>setTimeout(r,0)),!this.batchEvaluationCancelled);o+=e){let a=t.slice(o,o+e);yield Promise.allSettled(a.map(r=>this.evaluateItemWithAI(r.id,!0))),this.batchProgress={done:Math.min(o+e,t.length),total:t.length};}let i=this.batchEvaluationCancelled;this.isBatchEvaluating=!1,this.batchEvaluationCancelled=!1,i?this.snackBar.open("AI evaluation cancelled.","Close",{duration:3e3}):this.snackBar.open("AI evaluation complete for all items!","Close",{duration:4e3});});}evaluateItemWithAI(t,e=!1){return $(this,null,function*(){if(!this.assessment){e||this.snackBar.open("No assessment data available","Close",{duration:3e3});return;}let i=this.assessment.compliance.items?.find(o=>o.id===t);if(!i){e||this.snackBar.open("Item not found","Close",{duration:3e3});return;}if(!this.evaluatingItems.has(t)){this.evaluatingItems.add(t),e||this.snackBar.open(`Evaluating "${i.title}" with AI\u2026`,"Close",{duration:5e3});try{let o=yield this.portfolioComplianceService.evaluateComplianceItemWithAI(this.projectId,i,this.assessment.compliance.name,this.localeService.getSelectedLocale().code);o.recommendations?.length&&this.itemRecommendations.set(i.id.toString(),o.recommendations),this.getItemForm(t).patchValue({status:o.status,currentLevel:o.level,evidence:o.evidence.join(", "),notes:o.notes,evaluationDate:new Date()}),e||this.snackBar.open(`AI evaluation complete for "${i.title}"`,"Close",{duration:3e3});}catch(o){console.error("AI evaluation failed:",o),e||this.snackBar.open("AI evaluation failed. Please try again.","Close",{duration:5e3});}finally{this.evaluatingItems.delete(t);}}});}ngOnInit(){this.route.queryParams.subscribe(t=>{t.projectName&&(this.projectName=t.projectName);}),this.route.params.subscribe(t=>{this.portfolioId=t.portfolioId,this.complianceId=t.complianceId,this.projectId=t.projectId,this.portfolioComplianceId=t.portfolioComplianceId,this.complianceProjectId=t.complianceProjectId,this.portfolioId&&this.complianceId&&this.projectId&&this.loadAssessment();});}
521ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe());}loadAssessment(){return $(this,null,function*(){try{this.isLoading=!0,this.error=null;let t=this.projectName||"Project",e=yield this.portfolioComplianceService.initializeComplianceAssessment(this.portfolioId,this.complianceId,this.projectId,t),i=yield this.portfolioComplianceService.getComplianceAssessment(e.portfolioComplianceId,e.complianceProjectId);i&&(this.assessment=i,this.portfolioComplianceId=e.portfolioComplianceId,this.complianceProjectId=e.complianceProjectId,this.projectName&&(!i.complianceProject.projectName||i.complianceProject.projectName==="Project Name")&&(i.complianceProject.projectName=this.projectName),this.initializeItemResults(),this.createItemForms(),this.groupItemsByCategory()),this.isLoading=!1;}catch(t){console.error("Error loading assessment:",t),this.error="Failed to load compliance assessment",this.isLoading=!1;}});}initializeItemResults(){this.assessment&&this.assessment.itemResults.forEach(t=>{this.itemResults.set(t.complianceItemId,t),t.recommendations?.length&&this.itemRecommendations.set(t.complianceItemId,t.recommendations);});}createItemForms(){this.assessment?.compliance.items&&this.assessment.compliance.items.forEach(t=>{let e=this.itemResults.get(t.id.toString()),i=this.fb.group({status:[e?.status||"not-evaluated"],currentLevel:[e?.currentLevel||null],notes:[e?.notes||""],evidence:[e?.evidence?.join(", ")||""],evaluationDate:[e?.assessedAt?e.assessedAt.toDate():null]});i.valueChanges.subscribe(()=>{this.saveItemResult(t);}),this.itemForms.set(t.id.toString(),i);});}groupItemsByCategory(){if(!this.assessment?.compliance.items)return;let t=new Map();this.assessment.compliance.items.forEach(e=>{let i=e.category||"Uncategorized";t.has(i)||t.set(i,[]),t.get(i).push(e);}),this.categoryGroups=Array.from(t.entries()).map(([e,i])=>{let o=i.filter(r=>{let l=this.itemResults.get(r.id.toString());return l?.status==="evaluated"||l?.status==="not-applicable";}),a=o.reduce((r,l)=>{let p=this.itemResults.get(l.id.toString());return r+(p?.score||0);},0);return{category:e,items:i,score:o.length>0?Math.round(a/o.length):0,evaluatedCount:o.length,totalCount:i.length};});}saveItemResult(t){return $(this,null,function*(){let e=this.itemForms.get(t.id.toString());if(!(!e||!this.assessment))try{let i=e.value,o=i.currentLevel,a=Math.max(...t.scale.levels.map(f=>f.value)),r=0;i.status==="evaluated"&&o!==null?r=Math.round(o/a*100):i.status==="not-applicable"&&(r=100);let l=this.itemRecommendations.get(t.id.toString())||[],p={complianceProjectId:this.complianceProjectId,complianceItemId:t.id.toString(),itemTitle:t.title,status:i.status,currentLevel:i.status==="evaluated"?o:null,maxLevel:a,score:r,notes:i.notes||"",evidence:i.evidence?i.evidence.split(",").map(f=>f.trim()).filter(f=>f):[],assessedAt:i.evaluationDate?Rn.fromDate(new Date(i.evaluationDate)):Rn.now(),scale:t.scale,recommendations:l.length?l:void 0},d=this.itemResults.get(t.id.toString());if(d?.id)yield this.portfolioComplianceService.updateComplianceItemResult(this.portfolioComplianceId,this.complianceProjectId,d.id,p),this.itemResults.set(t.id.toString(),Ve(X({},p),{id:d.id}));else{let f=yield this.portfolioComplianceService.saveComplianceItemResult(this.portfolioComplianceId,this.complianceProjectId,p);this.itemResults.set(t.id.toString(),Ve(X({},p),{id:f}));}this.groupItemsByCategory();}catch(i){console.error("Error saving item result:",i),this.snackBar.open("Failed to save assessment","Close",{duration:3e3});}});}getItemForm(t){return this.itemForms.get(t.toString())||this.fb.group({});}getScoreColor(t){return t>=80?"#28a745":t>=60?"#20c997":t>=40?"#ffc107":t>=20?"#fd7e14":"#dc3545";}getOverallScore(){if(!this.assessment?.compliance.items)return 0;let t=this.assessment.compliance.items.filter(i=>{let o=this.itemResults.get(i.id.toString());return o?.status==="evaluated"||o?.status==="not-applicable";});if(t.length===0)return 0;let e=t.reduce((i,o)=>{let a=this.itemResults.get(o.id.toString());return i+(a?.score||0);},0);return Math.round(e/t.length);}getCompletionPercentage(){if(!this.assessment?.compliance.items)return 0;let t=this.assessment.compliance.items.filter(e=>{let i=this.itemResults.get(e.id.toString());return i?.status==="evaluated"||i?.status==="not-applicable";}).length;return Math.round(t/this.assessment.compliance.items.length*100);}getLevelLabel(t,e){let i=t.scale.levels.find(o=>o.value===e);return i?i.label:e.toString();}goBack(){this.router.navigate(["/dashboard/portfolio",this.portfolioId]);}trackByCategory(t,e){return e.category;}trackByItem(t,e){return e.id;}getEvaluatedItemsCount(){return this.assessment?.compliance.items?this.assessment.compliance.items.filter(t=>{let e=this.itemResults.get(t.id.toString());return e?.status==="evaluated"||e?.status==="not-applicable";}).length:0;}getItemRecommendations(t){return this.itemRecommendations.get(t.toString())||[];}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-compliance-analysis"]],decls:25,vars:9,consts:[["picker",""],[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"project-subtitle"],[1,"div-header-stats"],[1,"div-button-right"],["mat-icon-button","","matTooltip","Back",3,"click"],[1,"div-content"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","display","flex","flex-direction","column","align-items","center","gap","16px"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","color","#f44336"],["direction","horizontal",3,"gutterSize"],[1,"header-stat"],[1,"header-stat-label"],[1,"header-stat-value"],[1,"header-progress"],["mode","determinate",3,"value","color"],["mat-flat-button","","color","warn","matTooltip","Cancel AI evaluation",1,"ai-evaluate-button",3,"disabled"],["mat-flat-button","","color","primary","matTooltip","Run AI evaluation across all compliance items",1,"ai-evaluate-button"],["mat-flat-button","","color","warn","matTooltip","Cancel AI evaluation",1,"ai-evaluate-button",3,"click","disabled"],["mat-flat-button","","color","primary","matTooltip","Run AI evaluation across all compliance items",1,"ai-evaluate-button",3,"click"],["mat-stroked-button","",3,"click"],[3,"size"],[1,"container-right-panel"],[1,"container-tile-body-strong"],[1,"no-items"],[1,"category-accordion"],["direction","vertical",3,"gutterSize"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],[1,"summary-stat-row"],[1,"summary-stat-label"],[1,"summary-stat-value"],[1,"container-tile-body-strong","sp-list-body"],[1,"breakdown-row"],[1,"div-insight-disabled"],[1,"category-panel",3,"expanded"],[1,"category-header"],[1,"category-name"],[1,"category-stats"],[1,"score-badge"],[1,"count-badge"],[1,"category-items"],[1,"item-card"],[1,"item-card-content"],[1,"item-details-panel"],[1,"item-panel-title"],[1,"item-level-summary","muted"],[1,"score-badge","item-score-badge",3,"background-color"],[1,"item-form",3,"formGroup"],[1,"status-with-ai"],["appearance","outline",1,"status-field"],["formControlName","status"],["value","not-evaluated"],["value","evaluated"],["value","not-applicable"],["mat-flat-button","","color","primary","matTooltip","Run AI evaluation for this item",1,"ai-item-button",3,"click","disabled"],["appearance","outline",1,"level-field"],["formControlName","currentLevel"],[3,"value"],["appearance","outline",1,"date-field"],["matInput","","formControlName","evaluationDate",3,"matDatepicker"],["matIconSuffix","",3,"for"],["appearance","outline",1,"evidence-field"],["matInput","","formControlName","evidence","rows","5","placeholder","List evidence sources (comma-separated)..."],["appearance","outline",1,"notes-field"],["matInput","","formControlName","notes","rows","2","placeholder","Add assessment notes..."],[1,"recommendations-section"],[1,"item-score"],[1,"item-level-summary"],[1,"score-badge","item-score-badge"],[1,"icon-spin"],[1,"section-title"],[1,"action-card"],[1,"action-header"],[1,"field-chip","small"],[1,"action-desc"],[1,"action-diff"],[1,"diff-search"],[1,"diff-label"],[1,"diff-text"],[1,"diff-replace"],[1,"breakdown-info"],[1,"breakdown-name"],[1,"breakdown-progress"],[1,"breakdown-score"]],template:function(e,i){e&1&&(s(0,"div",1)(1,"div",2)(2,"mat-toolbar",3)(3,"div",4)(4,"div")(5,"mat-icon",5),u(6,"fact_check"),c()(),s(7,"div")(8,"div",6),u(9,"Compliance Assessment"),c(),s(10,"div",7),S(11,KJ,1,1),S(12,ZJ,1,0),S(13,QJ,1,0),c(),S(14,eH,2,1,"div",8),c()(),S(15,tH,18,7,"div",9),s(16,"div",10),S(17,rH,2,1),s(18,"button",11),E("click",function(){return i.goBack();}),s(19,"mat-icon"),u(20,"arrow_back"),c()()()()(),s(21,"div",12),S(22,sH,4,0,"div",13),S(23,lH,9,1,"div",14),S(24,OH,47,15,"as-split",15),c()()),e&2&&(m(11),M(i.assessment?11:-1),m(),M(!i.assessment&&i.isLoading?12:-1),m(),M(!i.assessment&&!i.isLoading?13:-1),m(),M(i.assessment?14:-1),m(),M(i.assessment&&!i.isLoading?15:-1),m(2),M(i.assessment&&!i.isLoading?17:-1),m(5),M(i.isLoading?22:-1),m(),M(i.error&&!i.isLoading?23:-1),m(),M(i.assessment&&!i.isLoading?24:-1));},dependencies:[gn,Nn,Ft,Tt,Mn,tn,An,Wn,ha,hd,gd,xd,z1,_d,$e,Qe,Qt,We,Xe,ln,yn,Gt,Vt,Wt,ur,bi,So,Ei,jt,Xt,D1,B3,yi,Fi,zi,gr,Sl,fr,hr,_r,$t,_n,I3,O3,E3,T3,JT,vr,cr,Cr],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
521.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0}.div-toolbar[_ngcontent-%COMP%]{height:auto;min-height:80px;background-color:transparent;flex-wrap:wrap;gap:8px;padding:8px 16px}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;flex-shrink:0}.objecttitle[_ngcontent-%COMP%]{font-size:x-large;line-height:1.2}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.project-subtitle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:3px;font-size:.75em;color:#00000080;margin-top:1px}.project-subtitle-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px;line-height:13px;color:#0006}.toolbar-icon[_ngcontent-%COMP%]{margin-right:20px;font-size:42px;width:42px;height:42px;display:flex;align-items:center;color:#465d91}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;flex-shrink:0;margin-left:auto}.div-header-stats[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:24px;padding:0 24px;flex:1;min-width:0}.header-stat[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;flex-shrink:0}.header-stat-label[_ngcontent-%COMP%]{font-size:.68em;color:#00000080;white-space:nowrap;text-transform:uppercase;letter-spacing:.3px}.header-stat-value[_ngcontent-%COMP%]{font-size:1.1em;font-weight:700;color:#000c}.header-progress[_ngcontent-%COMP%]{flex:1;min-width:80px}
521.header-progress[_ngcontent-%COMP%] mat-progress-bar[_ngcontent-%COMP%]{border-radius:4px}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:48px;max-height:48px;flex-shrink:0}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-left:10px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sp-list-body[_ngcontent-%COMP%]{padding:0!important}.no-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center}.no-items[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;color:#ccc;margin-bottom:12px}.no-items[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 6px;color:#666}.no-items[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#999;margin:0;font-size:.9em}.category-accordion[_ngcontent-%COMP%] .category-panel[_ngcontent-%COMP%]{margin-bottom:12px;border-radius:8px!important;box-shadow:0 1px 3px #0000001a}.category-accordion[_ngcontent-%COMP%] .category-panel[_ngcontent-%COMP%] .category-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px}.category-accordion[_ngcontent-%COMP%] .category-panel[_ngcontent-%COMP%] .category-header[_ngcontent-%COMP%] .category-name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#333;flex:1}.category-accordion[_ngcontent-%COMP%] .category-panel[_ngcontent-%COMP%] .category-header[_ngcontent-%COMP%] .category-stats[_ngcontent-%COMP%]{display:flex;gap:6px;flex-shrink:0}.category-accordion[_ngcontent-%COMP%] .category-panel[_ngcontent-%COMP%] .category-items[_ngcontent-%COMP%]{padding:0 16px 16px}.item-card[_ngcontent-%COMP%]{margin-bottom:12px;border-radius:8px;box-shadow:0 1px 3px #00000014}.item-card[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#333}.item-card[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;line-height:1.4}.item-card-content[_ngcontent-%COMP%]{padding:0!important}.item-details-panel[_ngcontent-%COMP%]{box-shadow:none!important;border-top:1px solid rgba(0,0,0,.07);border-radius:0 0 8px 8px!important}.item-details-panel[_ngcontent-%COMP%] .mat-expansion-panel-header{padding:0 16px;height:40px;min-height:40px;background-color:#00000005}.item-details-panel[_ngcontent-%COMP%] .mat-expansion-panel-header:hover{background-color:#0000000a!important}.item-details-panel[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:12px 16px 16px}.item-panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;overflow:hidden;min-width:0}.item-level-summary[_ngcontent-%COMP%]{font-size:.82em;font-weight:500;color:#000000a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.item-level-summary.muted[_ngcontent-%COMP%]{color:#00000059;font-style:italic}.item-score-badge[_ngcontent-%COMP%]{flex-shrink:0}.item-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{padding:16px 16px 8px}.item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;margin-bottom:8px}.item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .status-with-ai[_ngcontent-%COMP%]{grid-column:span 2;display:flex;gap:10px;align-items:center}.item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .status-with-ai[_ngcontent-%COMP%] .status-field[_ngcontent-%COMP%]{flex:1}.item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .status-with-ai[_ngcontent-%COMP%] .ai-item-button[_ngcontent-%COMP%]{flex-shrink:0;white-space:nowrap;margin-bottom:1.34375em}.item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .status-with-ai[_ngcontent-%COMP%] .ai-item-button[_ngcontent-%COMP%] .mdc-button__label{display:flex;align-items:center;gap:6px}.item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .status-field[_ngcontent-%COMP%], .item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .level-field[_ngcontent-%COMP%], .item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .date-field[_ngcontent-%COMP%], .item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .notes-field[_ngcontent-%COMP%], .item-card[_ngcontent-%COMP%] .item-form[_ngcontent-%COMP%] .evidence-field[_ngcontent-%COMP%]{grid-column:span 2;width:100%}.item-card[_ngcontent-%COMP%] .item-score[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-top:4px}.summary-stat-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:10px 8px;border-bottom:1px solid rgba(0,0,0,.06)}.summary-stat-row[_ngcontent-%COMP%]:last-of-type{border-bottom:none}.summary-stat-label[_ngcontent-%COMP%]{font-size:.85em;color:#0000008c}.summary-stat-value[_ngcontent-%COMP%]{font-size:1em;font-weight:700;color:#000c}.summary-progress-wrap[_ngcontent-%COMP%]{padding:10px 8px 4px}.summary-progress-wrap[_ngcontent-%COMP%] mat-progress-bar[_ng
521content-%COMP%]{border-radius:4px}.breakdown-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.05)}.breakdown-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.breakdown-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0;overflow:hidden}.breakdown-name[_ngcontent-%COMP%]{font-size:.85em;font-weight:600;color:#000c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.breakdown-progress[_ngcontent-%COMP%]{font-size:.75em;color:#00000073}.breakdown-score[_ngcontent-%COMP%]{flex-shrink:0;margin-left:8px}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px;display:block} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter{background-color:transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}.score-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:2px 8px;border-radius:10px;font-size:.75em;font-weight:700;color:#fff;white-space:nowrap;line-height:1.4}.count-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:2px 8px;border-radius:10px;font-size:.75em;font-weight:600;color:#0009;background-color:#00000014;white-space:nowrap;line-height:1.4}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}.recommendations-section[_ngcontent-%COMP%]{margin-top:12px;margin-bottom:4px}.section-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:.9em;font-weight:600;color:#000000b3;margin-bottom:8px}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91;font-size:18px;width:18px;height:18px}.action-card[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid rgba(0,0,0,.06);border-radius:8px;padding:10px 12px;margin-bottom:6px}.action-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-bottom:6px}.action-desc[_ngcontent-%COMP%]{font-size:.85em;color:#000000b3}.field-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:12px;font-size:.75em;font-weight:500;background-color:#e8eaf6;color:#283593}.field-chip.small[_ngcontent-%COMP%]{font-size:.7em;padding:1px 8px}.action-diff[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;font-size:.82em;font-family:Courier New,monospace}.diff-search[_ngcontent-%COMP%]{background-color:#fdecea;border-left:3px solid #b71c1c;padding:5px 10px;border-radius:4px}.diff-replace[_ngcontent-%COMP%]{background-color:#e8f5e9;border-left:3px solid #2e7d32;padding:5px 10px;border-radius:4px}.diff-label[_ngcontent-%COMP%]{font-weight:600;font-family:Rubik,sans-serif;font-size:.85em;margin-right:6px;color:#0009}.diff-text[_ngcontent-%COMP%]{word-break:break-word;white-space:pre-wrap}.icon-spin[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-spin 1.2s infinite linear}@keyframes _ngcontent-%COMP%_icon-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}"]});};var FR=["user","model","function","system"];var BC=function(n){return n.FINISH_REASON_UNSPECIFIED="FINISH_REASON_UNSPECIFIED",n.STOP="STOP",n.MAX_TOKENS="MAX_TOKENS",n.SAFETY="SAFETY",n.RECITATION="RECITATION",n.LANGUAGE="LANGUAGE",n.BLOCKLIST="BLOCKLIST",n.PROHIBITED_CONTENT="PROHIBITED_CONTENT",n.SPII="SPII",n.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",n.OTHER="OTHER",n;}(BC||{});
521var yr=class extends Error{constructor(t){super(`[GoogleGenerativeAI Error]: ${t}`);}},Ld=class extends yr{constructor(t,e){super(t),this.response=e;}},VC=class extends yr{constructor(t,e,i,o){super(t),this.status=e,this.statusText=i,this.errorDetails=o;}},Lc=class extends yr{},GC=class extends yr{};var EH="https://generativelanguage.googleapis.com",TH="v1beta",IH="0.24.1",kH="genai-js",Jf=function(n){return n.GENERATE_CONTENT="generateContent",n.STREAM_GENERATE_CONTENT="streamGenerateContent",n.COUNT_TOKENS="countTokens",n.EMBED_CONTENT="embedContent",n.BATCH_EMBED_CONTENTS="batchEmbedContents",n;}(Jf||{}),KS=class{constructor(t,e,i,o,a){this.model=t,this.task=e,this.apiKey=i,this.stream=o,this.requestOptions=a;}toString(){var t,e;let i=((t=this.requestOptions)===null||t===void 0?void 0:t.apiVersion)||TH,a=`${((e=this.requestOptions)===null||e===void 0?void 0:e.baseUrl)||EH}/${i}/${this.model}:${this.task}`;return this.stream&&(a+="?alt=sse"),a;}};function RH(n){let t=[];return n?.apiClient&&t.push(n.apiClient),t.push(`${kH}/${IH}`),t.join(" ");}function NH(n){return $(this,null,function*(){var t;let e=new Headers();e.append("Content-Type","application/json"),e.append("x-goog-api-client",RH(n.requestOptions)),e.append("x-goog-api-key",n.apiKey);let i=(t=n.requestOptions)===null||t===void 0?void 0:t.customHeaders;if(i){if(!(i instanceof Headers))try{i=new Headers(i);}catch(o){throw new Lc(`unable to convert customHeaders value ${JSON.stringify(i)} to Headers: ${o.message}`);}for(let[o,a]of i.entries()){if(o==="x-goog-api-key")throw new Lc(`Cannot set reserved header name ${o}`);if(o==="x-goog-api-client")throw new Lc(`Header name ${o} can only be set using the apiClient field`);e.append(o,a);}}return e;});}function AH(n,t,e,i,o,a){return $(this,null,function*(){let r=new KS(n,t,e,i,a);return{url:r.toString(),fetchOptions:Object.assign(Object.assign({},zH(a)),{method:"POST",headers:yield NH(r),body:o})};});}function b0(l,p,d,f,h){return $(this,arguments,function*(n,t,e,i,o,a={},r=fetch){let{url:g,fetchOptions:b}=yield AH(n,t,e,i,o,a);return DH(g,b,r);});}function DH(i,o){return $(this,arguments,function*(n,t,e=fetch){let a;try{a=yield e(n,t);}catch(r){jH(r,n);}return a.ok||(yield LH(a,n)),a;});}function jH(n,t){let e=n;throw e.name==="AbortError"?(e=new GC(`Request aborted when fetching ${t.toString()}: ${n.message}`),e.stack=n.stack):n instanceof VC||n instanceof Lc||(e=new yr(`Error fetching from ${t.toString()}: ${n.message}`),e.stack=n.stack),e;}function LH(n,t){return $(this,null,function*(){let e="",i;try{let o=yield n.json();e=o.error.message,o.error.details&&(e+=` ${JSON.stringify(o.error.details)}`,i=o.error.details);}catch(o){}throw new VC(`Error fetching from ${t.toString()}: [${n.status} ${n.statusText}] ${e}`,n.status,n.statusText,i);});}function zH(n){let t={};if(n?.signal!==void 0||n?.timeout>=0){let e=new AbortController();n?.timeout>=0&&setTimeout(()=>e.abort(),n.timeout),n?.signal&&n.signal.addEventListener("abort",()=>{e.abort();}),t.signal=e.signal;}return t;}function QS(n){return n.text=()=>{if(n.candidates&&n.candidates.length>0){if(n.candidates.length>1&&console.warn(`This response had ${n.candidates.length} candidates. Returning text from the first candidate only. Access response.candidates directly to use the other candidates.`),$C(n.candidates[0]))throw new Ld(`${zd(n)}`,n);return FH(n);}else if(n.promptFeedback)throw new Ld(`Text not available. ${zd(n)}`,n);return"";},n.functionCall=()=>{if(n.candidates&&n.candidates.length>0){if(n.candidates.length>1&&console.warn(`This response had ${n.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),$C(n.candidates[0]))throw new Ld(`${zd(n)}`,n);return console.warn("response.functionCall() is deprecated. Use response.functionCalls() instead."),BR(n)[0];}else if(n.promptFeedback)throw new Ld(`Function call not available. ${zd(n)}`,n);},n.functionCalls=()=>{if(n.candidates&&n.candidates.length>0){if(n.candidates.length>1&&console.warn(`This response had ${n.candidates.length} candidates. Returning function calls from the first candidate only. Access response.candidates directly to use the other candidates.`),$C(n.candidates[0]))throw new Ld(`${zd(n)}`,n);return BR(n);}else if(n.promptFeedback)throw new Ld(`Function call not available. ${zd(n)}`,n);},n;}function FH(n){var t,e,i,o;let a=[];if(!((e=(t=n.candidates)===null||t===void 0?void 0:t[0].content)===null||e===void 0)&&e.parts)for(let r of(o=(i=n.candidates)===null||i===void 0?void 0:i[0].content)===null||o===void 0?void 0:o.parts)r.text&&a.push(r.text),r.executableCode&&a.push("\n```"+r.executableCode.language+` 522`+r.executableCode.code+"\n```\n"),r.codeExecutionResult&&a.push("\n```\n"+r.codeExecutionResult.output+"\n```\n");return a.length>0?a.join(""):"";}function BR(n){var t,e,i,o;let a=[];if(!((e=(t=n.candidates)===null||t===void 0?void 0:t[0].content)===null||e===void 0)&&e.parts)for(let r of(o=(i=n.candidates)===null||i===void 0?void 0:i[0].content)===null||o===void 0?void 0:o.parts)r.functionCall&&a.push(r.functionCall);if(a.length>0)return a;}var BH=[BC.RECITATION,BC.SAFETY,BC.LANGUAGE];function $C(n){return!!n.finishReason&&BH.includes(n.finishReason);}function zd(n){var t,e,i;let o="";if((!n.candidates||n.candidates.length===0)&&n.promptFeedback)o+="Response was blocked",!((t=n.promptFeedback)===null||t===void 0)&&t.blockReason&&(o+=` due to ${n.promptFeedback.blockReason}`),!((e=n.promptFeedback)===null||e===void 0)&&e.blockReasonMessage&&(o+=`: ${n.promptFeedback.blockReasonMessage}`);else if(!((i=n.candidates)===null||i===void 0)&&i[0]){let a=n.candidates[0];$C(a)&&(o+=`Candidate was blocked due to ${a.finishReason}`,a.finishMessage&&(o+=`: ${a.finishMessage}`));}return o;}function C0(n){return this instanceof C0?(this.v=n,this):new C0(n);}function $H(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(n,t||[]),o,a=[];return o={},r("next"),r("throw"),r("return"),o[Symbol.asyncIterator]=function(){return this;},o;function r(g){i[g]&&(o[g]=function(b){return new Promise(function(w,T){a.push([g,b,w,T])>1||l(g,b);});});}function l(g,b){try{p(i[g](b));}catch(w){h(a[0][3],w);}}function p(g){g.value instanceof C0?Promise.resolve(g.value.v).then(d,f):h(a[0][2],g);}function d(g){l("next",g);}function f(g){l("throw",g);}function h(g,b){g(b),a.shift(),a.length&&l(a[0][0],a[0][1]);}}var $R=/^data\: (.*)(?:\n\n|\r\r|\r\n\r\n)/;function VH(n){let t=n.body.pipeThrough(new TextDecoderStream("utf8",{fatal:!0})),e=JH(t),[i,o]=e.tee();
522return{stream:qH(i),response:GH(o)};}function GH(n){return $(this,null,function*(){let t=[],e=n.getReader();for(;;){let{done:i,value:o}=yield e.read();if(i)return QS(HH(t));t.push(o);}});}function qH(n){return $H(this,arguments,function*(){let e=n.getReader();for(;;){let{value:i,done:o}=yield C0(e.read());if(o)break;yield yield C0(QS(i));}});}function JH(n){let t=n.getReader();return new ReadableStream({start(i){let o="";return a();function a(){return t.read().then(({value:r,done:l})=>{if(l){if(o.trim()){i.error(new yr("Failed to parse stream"));return;}i.close();return;}o+=r;let p=o.match($R),d;for(;p;){try{d=JSON.parse(p[1]);}catch(f){i.error(new yr(`Error parsing JSON response: "${p[1]}"`));return;}i.enqueue(d),o=o.substring(p[0].length),p=o.match($R);}return a();}).catch(r=>{let l=r;throw l.stack=r.stack,l.name==="AbortError"?l=new GC("Request aborted when reading from the stream"):l=new yr("Error reading from the stream"),l;});}}});}function HH(n){let t=n[n.length-1],e={promptFeedback:t?.promptFeedback};for(let i of n){if(i.candidates){let o=0;for(let a of i.candidates)if(e.candidates||(e.candidates=[]),e.candidates[o]||(e.candidates[o]={index:o}),e.candidates[o].citationMetadata=a.citationMetadata,e.candidates[o].groundingMetadata=a.groundingMetadata,e.candidates[o].finishReason=a.finishReason,e.candidates[o].finishMessage=a.finishMessage,e.candidates[o].safetyRatings=a.safetyRatings,a.content&&a.content.parts){e.candidates[o].content||(e.candidates[o].content={role:a.content.role||"user",parts:[]});let r={};for(let l of a.content.parts)l.text&&(r.text=l.text),l.functionCall&&(r.functionCall=l.functionCall),l.executableCode&&(r.executableCode=l.executableCode),l.codeExecutionResult&&(r.codeExecutionResult=l.codeExecutionResult),Object.keys(r).length===0&&(r.text=""),e.candidates[o].content.parts.push(r);}o++;}i.usageMetadata&&(e.usageMetadata=i.usageMetadata);}return e;}function HR(n,t,e,i){return $(this,null,function*(){let o=yield b0(t,Jf.STREAM_GENERATE_CONTENT,n,!0,JSON.stringify(e),i);return VH(o);});}function UR(n,t,e,i){return $(this,null,function*(){let a=yield(yield b0(t,Jf.GENERATE_CONTENT,n,!1,JSON.stringify(e),i)).json();return{response:QS(a)};});}function WR(n){if(n!=null){if(typeof n=="string")return{role:"system",parts:[{text:n}]};if(n.text)return{role:"system",parts:[n]};if(n.parts)return n.role?n:{role:"system",parts:n.parts};}}function v0(n){let t=[];if(typeof n=="string")t=[{text:n}];else for(let e of n)typeof e=="string"?t.push({text:e}):t.push(e);return UH(t);}function UH(n){let t={role:"user",parts:[]},e={role:"function",parts:[]},i=!1,o=!1;for(let a of n)"functionResponse"in a?(e.parts.push(a),o=!0):(t.parts.push(a),i=!0);if(i&&o)throw new yr("Within a single message, FunctionResponse cannot be mixed with other type of part in the request for sending chat message.");if(!i&&!o)throw new yr("No content is provided for sending chat message.");return i?t:e;}function WH(n,t){var e;let i={model:t?.model,generationConfig:t?.generationConfig,safetySettings:t?.safetySettings,tools:t?.tools,toolConfig:t?.toolConfig,systemInstruction:t?.systemInstruction,cachedContent:(e=t?.cachedContent)===null||e===void 0?void 0:e.name,contents:[]},o=n.generateContentRequest!=null;if(n.contents){if(o)throw new Lc("CountTokensRequest must have one of contents or generateContentRequest, not both.");i.contents=n.contents;}else if(o)i=Object.assign(Object.assign({},i),n.generateContentRequest);else{let a=v0(n);i.contents=[a];}return{generateContentRequest:i};}function VR(n){let t;return n.contents?t=n:t={contents:[v0(n)]},n.systemInstruction&&(t.systemInstruction=WR(n.systemInstruction)),t;}function XH(n){return typeof n=="string"||Array.isArray(n)?{content:v0(n)}:n;}var GR=["text","inlineData","functionCall","functionResponse","executableCode","codeExecutionResult"],YH={user:["text","inlineData"],function:["functionResponse"],model:["text","functionCall","executableCode","codeExecutionResult"],system:["text"]};function KH(n){let t=!1;for(let e of n){let{role:i,parts:o}=e;if(!t&&i!=="user")throw new yr(`First content should be with role 'user', got ${i}`);if(!FR.includes(i))throw new yr(`Each item should include role field. Got ${i} but valid roles are: ${JSON.stringify(FR)}`);if(!Array.isArray(o))throw new yr("Content should have 'parts' property with an array of Parts");if(o.length===0)throw new yr("Each Content should have at least one part");let a={text:0,inlineData:0,functionCall:0,functionResponse:0,fileData:0,executableCode:0,codeExecutionResult:0};for(let l of o)for(let p of GR)p in l&&(a[p]+=1);let r=YH[i];for(let l of GR)if(!r.includes(l)&&a[l]>0)throw new yr(`Content with role '${i}' can't contain '${l}' part`);t=!0;}}function qR(n){var t;if(n.candidates===void 0||n.candidates.length===0)return!1;let e=(t=n.candidates[0])===null||t===void 0?void 0:t.content;if(e===void 0||e.parts===void 0||e.parts.length===0)return!1;for(let i of e.parts)if(i===void 0||Object.keys(i).length===0||i.text!==void 0&&i.text==="")return!1;return!0;}var JR="SILENT_ERROR",ZS=class{constructor(t,e,i,o={}){this.model=e,this.params=i,this._requestOptions=o,this._history=[],this._sendPromise=Promise.resolve(),this._apiKey=t,i?.history&&(KH(i.history),this._history=i.history);}getHistory(){return $(this,null,function*(){return yield this._sendPromise,this._history;});}sendMessage(i){return $(this,arguments,function*(t,e={}){var o,a,r,l,p,d;yield this._sendPromise;let f=v0(t),h={safetySettings:(o=this.params)===null||o===void 0?void 0:o.safetySettings,generationConfig:(a=this.params)===null||a===void 0?void 0:a.generationConfig,tools:(r=this.params)===null||r===void 0?void 0:r.tools,toolConfig:(l=this.params)===null||l===void 0?void 0:l.toolConfig,systemInstruction:(p=this.params)===null||p===void 0?void 0:p.systemInstruction,cachedContent:(d=this.params)===null||d===void 0?void 0:d.cachedContent,contents:[...this._history,f]},g=Object.assign(Object.assign({},this._requestOptions),e),b;return this._sendPromise=this._sendPromise.then(()=>UR(this._apiKey,this.model,h,g)).then(w=>
522{var T;if(qR(w.response)){this._history.push(f);let O=Object.assign({parts:[],role:"model"},(T=w.response.candidates)===null||T===void 0?void 0:T[0].content);this._history.push(O);}else{let O=zd(w.response);O&&console.warn(`sendMessage() was unsuccessful. ${O}. Inspect response object for details.`);}b=w;}).catch(w=>{throw this._sendPromise=Promise.resolve(),w;}),yield this._sendPromise,b;});}sendMessageStream(i){return $(this,arguments,function*(t,e={}){var o,a,r,l,p,d;yield this._sendPromise;let f=v0(t),h={safetySettings:(o=this.params)===null||o===void 0?void 0:o.safetySettings,generationConfig:(a=this.params)===null||a===void 0?void 0:a.generationConfig,tools:(r=this.params)===null||r===void 0?void 0:r.tools,toolConfig:(l=this.params)===null||l===void 0?void 0:l.toolConfig,systemInstruction:(p=this.params)===null||p===void 0?void 0:p.systemInstruction,cachedContent:(d=this.params)===null||d===void 0?void 0:d.cachedContent,contents:[...this._history,f]},g=Object.assign(Object.assign({},this._requestOptions),e),b=HR(this._apiKey,this.model,h,g);return this._sendPromise=this._sendPromise.then(()=>b).catch(w=>{throw new Error(JR);}).then(w=>w.response).then(w=>{if(qR(w)){this._history.push(f);let T=Object.assign({},w.candidates[0].content);T.role||(T.role="model"),this._history.push(T);}else{let T=zd(w);T&&console.warn(`sendMessageStream() was unsuccessful. ${T}. Inspect response object for details.`);}}).catch(w=>{w.message!==JR&&console.error(w);}),b;});}};function ZH(n,t,e,i){return $(this,null,function*(){return(yield b0(t,Jf.COUNT_TOKENS,n,!1,JSON.stringify(e),i)).json();});}function QH(n,t,e,i){return $(this,null,function*(){return(yield b0(t,Jf.EMBED_CONTENT,n,!1,JSON.stringify(e),i)).json();});}function eU(n,t,e,i){return $(this,null,function*(){let o=e.requests.map(r=>Object.assign(Object.assign({},r),{model:t}));return(yield b0(t,Jf.BATCH_EMBED_CONTENTS,n,!1,JSON.stringify({requests:o}),i)).json();});}var qC=class{constructor(t,e,i={}){this.apiKey=t,this._requestOptions=i,e.model.includes("/")?this.model=e.model:this.model=`models/${e.model}`,this.generationConfig=e.generationConfig||{},this.safetySettings=e.safetySettings||[],this.tools=e.tools,this.toolConfig=e.toolConfig,this.systemInstruction=WR(e.systemInstruction),this.cachedContent=e.cachedContent;}generateContent(i){return $(this,arguments,function*(t,e={}){var o;let a=VR(t),r=Object.assign(Object.assign({},this._requestOptions),e);return UR(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(o=this.cachedContent)===null||o===void 0?void 0:o.name},a),r);});}generateContentStream(i){return $(this,arguments,function*(t,e={}){var o;let a=VR(t),r=Object.assign(Object.assign({},this._requestOptions),e);return HR(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(o=this.cachedContent)===null||o===void 0?void 0:o.name},a),r);});}startChat(t){var e;return new ZS(this.apiKey,this.model,Object.assign({generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:(e=this.cachedContent)===null||e===void 0?void 0:e.name},t),this._requestOptions);}countTokens(i){return $(this,arguments,function*(t,e={}){let o=WH(t,{model:this.model,generationConfig:this.generationConfig,safetySettings:this.safetySettings,tools:this.tools,toolConfig:this.toolConfig,systemInstruction:this.systemInstruction,cachedContent:this.cachedContent}),a=Object.assign(Object.assign({},this._requestOptions),e);return ZH(this.apiKey,this.model,o,a);});}embedContent(i){return $(this,arguments,function*(t,e={}){let o=XH(t),a=Object.assign(Object.assign({},this._requestOptions),e);return QH(this.apiKey,this.model,o,a);});}batchEmbedContents(i){return $(this,arguments,function*(t,e={}){let o=Object.assign(Object.assign({},this._requestOptions),e);return eU(this.apiKey,this.model,t,o);});}};var JC=class{constructor(t){this.apiKey=t;}getGenerativeModel(t,e){if(!t.model)throw new yr("Must provide a model name. Example: genai.getGenerativeModel({ model: 'my-model-name' })");return new qC(this.apiKey,t,e);}getGenerativeModelFromCachedContent(t,e,i){if(!t.name)throw new Lc("Cached content must contain a `name` field.");
522if(!t.model)throw new Lc("Cached content must contain a `model` field.");let o=["model","systemInstruction"];for(let r of o)if(e?.[r]&&t[r]&&e?.[r]!==t[r]){if(r==="model"){let l=e.model.startsWith("models/")?e.model.replace("models/",""):e.model,p=t.model.startsWith("models/")?t.model.replace("models/",""):t.model;if(l===p)continue;}throw new Lc(`Different value for "${r}" specified in modelParams (${e[r]}) and cachedContent (${t[r]})`);}let a=Object.assign(Object.assign({},e),{model:t.model,tools:t.tools,toolConfig:t.toolConfig,systemInstruction:t.systemInstruction,cachedContent:t});return new qC(this.apiKey,a,i);}};function tU(n,t){if(n&1&&(s(0,"div",0),ee(1,"mat-spinner"),s(2,"p"),u(3),c()()),n&2){let e=x();m(3),G(e.isEditMode?"Loading item...":"Saving item...");}}function nU(n,t){n&1&&(s(0,"mat-error"),u(1,"Title is required"),c());}function iU(n,t){n&1&&(s(0,"mat-error"),u(1,"Title must be at least 3 characters"),c());}function oU(n,t){n&1&&(s(0,"mat-error"),u(1,"Description is required"),c());}function aU(n,t){n&1&&(s(0,"mat-error"),u(1,"Description must be at least 10 characters"),c());}function rU(n,t){if(n&1&&(s(0,"mat-option",9),u(1),Zn(2,"titlecase"),c()),n&2){let e=t.$implicit;N("value",e),m(),G(yo(2,2,e));}}function sU(n,t){if(n&1&&(s(0,"mat-option",9),u(1),c()),n&2){let e=t.$implicit;N("value",e),m(),G(e);}}function lU(n,t){n&1&&(s(0,"mat-error"),u(1,"Order number is required"),c());}function cU(n,t){n&1&&(s(0,"mat-error"),u(1,"Order number must be at least 1"),c());}function pU(n,t){if(n&1){let e=oe();
522s(0,"div",33)(1,"div",37)(2,"span",38),u(3),c()(),s(4,"div",39)(5,"mat-form-field",40)(6,"mat-label"),u(7,"Label"),c(),s(8,"input",41),E("input",function(o){let a=k(e).$index,r=x(3);return R(r.onLabelInput(o,a));}),c()(),s(9,"mat-form-field",42)(10,"mat-label"),u(11,"Description"),c(),s(12,"textarea",43),E("input",function(o){let a=k(e).$index,r=x(3);return R(r.onDescriptionInput(o,a));}),c()()()();}if(n&2){let e=t.$implicit;m(3),_e("Level ",e.value),m(5),N("value",e.label),m(4),N("value",e.description);}}function dU(n,t){if(n&1){let e=oe();s(0,"div",26)(1,"h4"),u(2),c(),be(3,pU,13,3,"div",33,Pt),s(5,"div",34)(6,"button",35),E("click",function(){k(e);let o=x(2);return R(o.saveCustomScale());}),s(7,"mat-icon"),u(8,"save"),c(),u(9," Save Customization "),c(),s(10,"button",36),E("click",function(){k(e);let o=x(2);return R(o.cancelCustomizeScale());}),s(11,"mat-icon"),u(12,"cancel"),c(),u(13," Cancel "),c()()();}if(n&2){let e,i=x(2);m(2),_e("Customize ",(e=i.itemForm.get("scaleType"))==null?null:e.value," Labels"),m(),ye(i.customScaleLevels);}}function mU(n,t){n&1&&ee(0,"mat-spinner",31);}function uU(n,t){if(n&1){let e=oe();s(0,"form",2),E("ngSubmit",function(){k(e);let o=x();return R(o.saveItem());}),s(1,"mat-form-field",3)(2,"mat-label"),u(3,"Title"),c(),ee(4,"input",4),S(5,nU,2,0,"mat-error"),S(6,iU,2,0,"mat-error"),c(),s(7,"mat-form-field",3)(8,"mat-label"),u(9,"Description"),c(),ee(10,"textarea",5),S(11,oU,2,0,"mat-error"),S(12,aU,2,0,"mat-error"),c(),s(13,"div",6)(14,"mat-form-field",7)(15,"mat-label"),u(16,"Priority"),c(),s(17,"mat-select",8),be(18,rU,3,4,"mat-option",9,Pt),c()(),s(20,"mat-form-field",7)(21,"mat-label"),u(22,"Category"),c(),s(23,"mat-select",10),be(24,sU,2,2,"mat-option",9,Pt),c()(),s(26,"mat-form-field",7)(27,"mat-label"),u(28,"Order Number"),c(),ee(29,"input",11),S(30,lU,2,0,"mat-error"),S(31,cU,2,0,"mat-error"),c()(),s(32,"div",12)(33,"h3"),u(34,"Compliance Scale Configuration"),c(),s(35,"mat-form-field",3)(36,"mat-label"),u(37,"Compliance Scale"),c(),s(38,"mat-select",13)(39,"mat-option",14),u(40,"2-Point Scale"),c(),s(41,"mat-option",15),u(42,"3-Point Scale"),c(),s(43,"mat-option",16),u(44,"5-Point Scale"),c(),s(45,"mat-option",17),u(46,"6-Point Scale"),c(),s(47,"mat-option",18),u(48,"7-Point Scale"),c(),s(49,"mat-option",19),u(50,"8-Point Scale"),c(),s(51,"mat-option",20),u(52,"9-Point Scale"),c(),s(53,"mat-option",21),u(54,"10-Point Scale"),c()(),s(55,"mat-hint"),u(56,"Define the evaluation scale for this compliance item"),c()(),s(57,"div",22)(58,"div",23)(59,"button",24),E("click",function(){k(e);let o=x();return R(o.startCustomizeScale());}),s(60,"mat-icon"),u(61,"edit"),c(),u(62," Customize Scale Labels "),c(),s(63,"button",25),E("click",function(){k(e);let o=x();return R(o.resetScaleToDefault());}),s(64,"mat-icon"),u(65,"restore"),c(),u(66," Reset to Default "),c()(),S(67,dU,14,1,"div",26),c()(),s(68,"mat-form-field",3)(69,"mat-label"),u(70,"Evaluation Notes"),c(),ee(71,"textarea",27),c(),s(72,"div",28),E("click",function(o){return o.stopPropagation();}),ee(73,"span",29),s(74,"button",30),S(75,mU,1,0,"mat-spinner",31),s(76,"span"),u(77),c()(),s(78,"button",32),E("click",function(){k(e);let o=x();return R(o.cancelled.emit());}),u(79,"Cancel"),c()()();}if(n&2){let e,i,o,a,r,l,p=x();N("formGroup",p.itemForm),m(5),M((e=p.itemForm.get("title"))!=null&&e.hasError("required")?5:-1),m(),M((i=p.itemForm.get("title"))!=null&&i.hasError("minlength")?6:-1),m(5),M((o=p.itemForm.get("description"))!=null&&o.hasError("required")?11:-1),m(),M((a=p.itemForm.get("description"))!=null&&a.hasError("minlength")?12:-1),m(6),ye(p.priorities),m(6),ye(p.categories),m(6),M((r=p.itemForm.get("orderNumber"))!=null&&r.hasError("required")?30:-1),m(),M((l=p.itemForm.get("orderNumber"))!=null&&l.hasError("min")?31:-1),m(28),N("disabled",p.isCustomizingScale),m(8),M(p.isCustomizingScale?67:-1),m(7),N("disabled",!p.itemForm.valid||p.isLoading),m(),M(p.isLoading?75:-1),m(2),G(p.isLoading?p.isEditMode?"Updating...":"Creating...":p.isEditMode?"Update":"Create");}}var Qm=class n{fb=re(wo);route=re(vi);router=re(Et);snackBar=re(Bt);firestore=re(ai);inlineComplianceId;inlineItem;saved=new At();cancelled=new At();complianceId="";itemId=null;isEditMode=!1;isLoading=!1;itemForm;currentItem=null;availableScales=[{min:1,max:2,levels:[{value:1,label:"Not Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},{min:1,max:3,levels:[{value:1,label:"Non-Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Partially Compliant",description:"Meets some requirements",color:"#ffc107"},{value:3,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},{min:1,max:5,levels:[{value:1,label:"Critical Gap",description:"Major non-compliance issues",color:"#dc3545"},{value:2,label:"Significant Gap",description:"Important requirements missing",color:"#fd7e14"},{value:3,label:"Moderate Gap",description:"Some requirements need attention",color:"#ffc107"},{value:4,label:"Minor Gap",description:"Minor improvements needed",color:"#20c997"},{value:5,label:"Excellent",description:"Exceeds all requirements",color:"#28a745"}]},{min:1,max:6,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Poor",description:"Significant gaps in compliance",color:"#e74c3c"},{value:3,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:4,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:5,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:6,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:7,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:7,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:8,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Above Average",description:"Requirements met with some excellence",color:"#17a2b8"},{value:7,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:8,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:9,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Above Average",description:"Requirements met with some excellence",color:"#17a2b8"},{value:7,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:8,label:"Very Good",description:"Requirements significantly exceeded",color:"#198754"},{value:9,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:10,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Above Average",description:"Requirements met with some excellence",color:"#17a2b8"},{value:7,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:8,label:"Very Good",description:"Requirements significantly exceeded",color:"#198754"},{value:9,label:"Excellent",description:"Requirements exceeded with distinction",color:"#155724"},{value:10,label:"Outstanding",description:"Perfect compliance, industry leading",color:"#28a745"}]}];isCustomizingScale=!1;customScaleLevels=[];categories=["Policy","Training","Documentation","Process","Security","Vendor Management","Legal","Technical"];priorities=["low","medium","high"];constructor(){this.itemForm=this.fb.group({title:["",[Ye.required,Ye.minLength(3)]],description:["",[Ye.required,Ye.minLength(10)]],priority:["medium",Ye.required],category:["",Ye.required],scaleType:["3-point",Ye.required],evaluationNotes:[""],orderNumber:[1,[Ye.required,Ye.min(1)]]});}
522ngOnInit(){this.complianceId=this.inlineComplianceId||"",this.initFromInlineItem(this.inlineItem);}ngOnChanges(t){t.inlineComplianceId&&(this.complianceId=this.inlineComplianceId||""),t.inlineItem&&this.initFromInlineItem(this.inlineItem);}initFromInlineItem(t){t?(this.isEditMode=!0,this.currentItem=t,this.itemId=t.id.toString(),this.itemForm.patchValue({title:t.title,description:t.description,priority:t.priority,category:t.category,scaleType:`${t.scale.max}-point`,evaluationNotes:t.evaluationNotes||"",orderNumber:t.orderNumber||1})):(this.isEditMode=!1,this.currentItem=null,this.itemId=null,this.itemForm.reset({priority:"medium",scaleType:"3-point"}));}loadItem(){return $(this,null,function*(){if(!(!this.itemId||!this.complianceId)){this.isLoading=!0;try{let t=ge(this.firestore,"compliances",this.complianceId,"items",this.itemId),e=yield yt(t);if(e.exists()){let i=e.data();this.currentItem={id:parseInt(this.itemId),title:i.title,description:i.description,isCompleted:i.isCompleted||!1,priority:i.priority,category:i.category,isApproved:i.isApproved||!1,createdDate:i.createdDate?.toDate()||new Date(),source:i.source||"manual",scale:i.scale,currentLevel:i.currentLevel,evaluationNotes:i.evaluationNotes||"",orderNumber:i.orderNumber||1},this.itemForm.patchValue({title:this.currentItem.title,description:this.currentItem.description,priority:this.currentItem.priority,category:this.currentItem.category,scaleType:`${this.currentItem.scale.max}-point`,evaluationNotes:this.currentItem.evaluationNotes,orderNumber:this.currentItem.orderNumber});}else this.snackBar.open("Item not found","Close",{duration:3e3}),this.goBack();}catch(t){console.error("Error loading item:",t),this.snackBar.open("Error loading item","Close",{duration:5e3});}finally{this.isLoading=!1;}}});}saveItem(){return $(this,null,function*(){if(this.itemForm.valid){this.isLoading=!0;try{let t=this.itemForm.value,e=this.getScaleByType(t.scaleType),i;this.isEditMode&&this.currentItem?i=Ve(X({},this.currentItem),{title:t.title,description:t.description,priority:t.priority,category:t.category,scale:e,evaluationNotes:t.evaluationNotes,orderNumber:t.orderNumber}):i={id:yield this.getNextId(),title:t.title,description:t.description,priority:t.priority,category:t.category,isCompleted:!1,isApproved:!1,createdDate:new Date(),source:"manual",scale:e,evaluationNotes:t.evaluationNotes,orderNumber:t.orderNumber||(yield this.getNextOrderNumber())},yield this.saveItemToFirestore(i);let o=this.isEditMode?"Item updated successfully":"Item created successfully";this.snackBar.open(o,"Close",{duration:3e3}),this.saved.emit();}catch(t){console.error("Error saving item:",t),this.snackBar.open("Error saving item","Close",{duration:5e3});}finally{this.isLoading=!1;}}});}saveItemToFirestore(t){return $(this,null,function*(){let e=we(this.firestore,"compliances",this.complianceId,"items"),i=ge(e,t.id.toString()),o={title:t.title,description:t.description,isCompleted:t.isCompleted,priority:t.priority,category:t.category,isApproved:t.isApproved??!1,createdDate:t.createdDate??new Date(),source:t.source??"manual",scale:t.scale,currentLevel:t.currentLevel??null,evaluationNotes:t.evaluationNotes??"",orderNumber:t.orderNumber??1};yield Dt(i,o);});}getNextId(){return $(this,null,function*(){let t=we(this.firestore,"compliances",this.complianceId,"items"),e=yield at(t),i=0;return e.forEach(o=>{let a=parseInt(o.id);a>i&&(i=a);}),i+1;});}getNextOrderNumber(){return $(this,null,function*(){let t=we(this.firestore,"compliances",this.complianceId,"items"),e=yield at(t),i=0;return e.forEach(o=>{let r=o.data().orderNumber||0;r>i&&(i=r);}),i+1;});}goBack(){this.router.navigate(["/dashboard/compliance",this.complianceId]);}getScaleByType(t){let i={"2-point":0,"3-point":1,"5-point":2,"6-point":3,"7-point":4,"8-point":5,"9-point":6,"10-point":7}[t];return i!==void 0?this.availableScales[i]:this.availableScales[1];}getCurrentScale(){let t=this.itemForm.get("scaleType")?.value;return this.getScaleByType(t);}startCustomizeScale(){let t=this.getCurrentScale();this.customScaleLevels=[...t.levels],this.isCustomizingScale=!0;}updateCustomLevel(t,e,i){this.customScaleLevels[t]&&(this.customScaleLevels[t][e]=i);}onLabelInput(t,e){let i=t.target;this.updateCustomLevel(e,"label",i.value);}onDescriptionInput(t,e){let i=t.target;this.updateCustomLevel(e,"description",i.value);}saveCustomScale(){let t=this.itemForm.get("scaleType")?.value,e=this.availableScales.findIndex(i=>`${i.max}-point`===t);e!==-1&&(this.availableScales[e].levels=[...this.customScaleLevels],this.snackBar.open("Scale customization saved","Close",{duration:3e3})),this.cancelCustomizeScale();}
522cancelCustomizeScale(){this.isCustomizingScale=!1,this.customScaleLevels=[];}resetScaleToDefault(){let t=this.itemForm.get("scaleType")?.value,e=this.availableScales.findIndex(i=>`${i.max}-point`===t);e!==-1&&(this.availableScales[e]=this.getDefaultScale(t),this.snackBar.open("Scale reset to default","Close",{duration:3e3}));}getDefaultScale(t){let e={"2-point":{min:1,max:2,levels:[{value:1,label:"Not Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},"3-point":{min:1,max:3,levels:[{value:1,label:"Non-Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Partially Compliant",description:"Meets some requirements",color:"#ffc107"},{value:3,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},"5-point":{min:1,max:5,levels:[{value:1,label:"Critical Gap",description:"Major non-compliance issues",color:"#dc3545"},{value:2,label:"Significant Gap",description:"Important requirements missing",color:"#fd7e14"},{value:3,label:"Moderate Gap",description:"Some requirements need attention",color:"#ffc107"},{value:4,label:"Minor Gap",description:"Minor improvements needed",color:"#20c997"},{value:5,label:"Excellent",description:"Exceeds all requirements",color:"#28a745"}]}};return e[t]||e["3-point"];}formatDate(t){return t.toLocaleDateString()+" "+t.toLocaleTimeString();}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-compliance-item"]],inputs:{inlineComplianceId:"inlineComplianceId",inlineItem:"inlineItem"},outputs:{saved:"saved",cancelled:"cancelled"},features:[ki],decls:2,vars:2,consts:[[1,"loading-container"],[1,"inline-form",3,"formGroup"],[1,"inline-form",3,"ngSubmit","formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","title","placeholder","Enter compliance item title"],["matInput","","formControlName","description","rows","4","placeholder","Enter detailed description"],[1,"form-row"],["appearance","outline"],["formControlName","priority"],[3,"value"],["formControlName","category"],["matInput","","type","number","formControlName","orderNumber","placeholder","Enter order number","min","1"],[1,"scale-section"],["formControlName","scaleType"],["value","2-point"],["value","3-point"],["value","5-point"],["value","6-point"],["value","7-point"],["value","8-point"],["value","9-point"],["value","10-point"],[1,"scale-customization-section"],[1,"scale-actions"],["type","button","mat-stroked-button","","color","primary",3,"click","disabled"],["type","button","mat-stroked-button","","color","warn",3,"click"],[1,"scale-customization-form"],["matInput","","formControlName","evaluationNotes","rows","3","placeholder","Optional notes about the evaluation"],[1,"form-actions-bar",3,"click"],[1,"spacer"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["diameter","20"],["mat-button","","type","button",3,"click"],[1,"level-customization"],[1,"customization-actions"],["type","button","mat-raised-button","","color","primary",3,"click"],["type","button","mat-button","",3,"click"],[1,"level-header"],[1,"level-number"],[1,"level-fields"],["appearance","outline",1,"level-label-field"],["matInput","",3,"input","value"],["appearance","outline",1,"level-description-field"],["matInput","","rows","2",3,"input","value"]],template:function(e,i){e&1&&(S(0,tU,4,1,"div",0),S(1,uU,80,12,"form",1)),e&2&&(M(i.isLoading?0:-1),m(),M(i.isLoading?-1:1));},dependencies:[ut,tn,Nn,Ft,Ea,Tt,Mn,Qr,An,Wn,gn,$e,Qe,ha,Gt,Vt,Wt,Ki,ti,jt,Xt,bi,So,Ei,We,Xe,js,ra,$t,Fi,zi,yi,ln,i1],styles:["[_nghost-%COMP%]{display:block}.inline-form[_ngcontent-%COMP%]{display:flex;flex-direction:column}.full-width[_ngcontent-%COMP%]{width:100%;margin-bottom:8px}.form-row[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:8px}.form-row[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{flex:1}@media(max-width:768px){.form-row[_ngcontent-%COMP%]{flex-direction:column;gap:0}}.scale-section[_ngcontent-%COMP%]{margin:16px 0;padding:12px;background-color:#f5f5f5;border-radius:8px}.scale-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 12px;font-size:1rem;font-weight:500;color:#000000bf}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%]{margin-top:12px}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-bottom:12px;flex-wrap:wrap}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%]{background-color:#fff;padding:16px;border-radius:4px}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] h4[_ng
522content-%COMP%]{margin:0 0 12px;font-size:.95rem;font-weight:500}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .level-customization[_ngcontent-%COMP%]{margin-bottom:12px;padding:10px;background-color:#fafafa;border-radius:4px}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .level-customization[_ngcontent-%COMP%] .level-header[_ngcontent-%COMP%]{margin-bottom:6px}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .level-customization[_ngcontent-%COMP%] .level-header[_ngcontent-%COMP%] .level-number[_ngcontent-%COMP%]{font-weight:500;color:#000c;font-size:.9rem}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .level-customization[_ngcontent-%COMP%] .level-fields[_ngcontent-%COMP%]{display:flex;gap:12px}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .level-customization[_ngcontent-%COMP%] .level-fields[_ngcontent-%COMP%] .level-label-field[_ngcontent-%COMP%]{flex:1;margin-bottom:0}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .level-customization[_ngcontent-%COMP%] .level-fields[_ngcontent-%COMP%] .level-description-field[_ngcontent-%COMP%]{flex:2;margin-bottom:0}@media(max-width:600px){.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .level-customization[_ngcontent-%COMP%] .level-fields[_ngcontent-%COMP%]{flex-direction:column}}.scale-section[_ngcontent-%COMP%] .scale-customization-section[_ngcontent-%COMP%] .scale-customization-form[_ngcontent-%COMP%] .customization-actions[_ngcontent-%COMP%]{display:flex;gap:12px;justify-content:flex-end;margin-top:12px}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;gap:16px}.loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#0009;font-size:.95rem;margin:0}.form-actions-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;background-color:#eef2f7;margin:16px -1.5rem -1.5rem;padding:.75rem 1.5rem}.form-actions-bar[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1 1 auto}@media(max-width:768px){.form-actions-bar[_ngcontent-%COMP%]{margin:12px -1rem -1rem;padding:.75rem 1rem}}@media(max-width:480px){.form-actions-bar[_ngcontent-%COMP%]{margin:12px -.75rem -.75rem;padding:.75rem}}"]});};var fU=(n,t)=>t.id;function hU(n,t){if(n&1&&(s(0,"mat-chip"),u(1),c()),n&2){let e=x(2);m(),_e("",e.getApprovedCount()," approved");}}function _U(n,t){if(n&1&&(s(0,"mat-chip-set",9)(1,"mat-chip"),u(2),c(),S(3,hU,2,1,"mat-chip"),c()),n&2){let e=x();m(2),_e("",e.getTotalCount()," items"),m(),M(e.getApprovedCount()>0?3:-1);}}function gU(n,t){if(n&1){let e=oe();s(0,"input",21,0),E("change",function(o){k(e);let a=x();return R(a.onFileSelected(o));}),c(),s(2,"button",22),E("click",function(){k(e);let o=x();return R(o.showAddForm());}),s(3,"mat-icon"),u(4,"add"),c(),u(5," Add Item "),c(),s(6,"button",23),E("click",function(){k(e);let o=bn(1);return R(o.click());}),s(7,"mat-icon"),u(8,"upload_file"),c(),u(9),c();}if(n&2){let e=x();m(6),N("disabled",e.isAnalyzing),m(3),_e(" ",e.isAnalyzing?"Analyzing...":"Upload for AI"," ");}}function xU(n,t){if(n&1){let e=oe();s(0,"button",24),E("click",function(){k(e);let o=x();return R(o.editHeader());}),s(1,"mat-icon"),u(2,"edit"),c()();}}function CU(n,t){if(n&1){let e=oe();s(0,"button",25),E("click",function(){k(e);let o=x();return R(o.saveHeader());}),s(1,"mat-icon"),u(2,"save"),c()(),s(3,"button",26),E("click",function(){k(e);let o=x();return R(o.cancelEditHeader());}),s(4,"mat-icon"),u(5,"cancel"),c()();}}function vU(n,t){if(n&1){let e=oe();s(0,"div",12)(1,"mat-form-field",27)(2,"mat-label"),u(3,"Checklist Title"),c(),s(4,"input",28),Mt("ngModelChange",function(o){k(e);let a=x();return St(a.tempComplianceName,o)||(a.tempComplianceName=o),R(o);}),c()(),s(5,"mat-form-field",27)(6,"mat-label"),u(7,"Checklist Description"),c(),s(8,"textarea",29),Mt("ngModelChange",function(o){k(e);let a=x();return St(a.tempComplianceDescription,o)||(a.tempComplianceDescription=o),R(o);}),c()()();}if(n&2){let e=x();m(4),wt("ngModel",e.tempComplianceName),m(4),wt("ngModel",e.tempComplianceDescription);}}function bU(n,t){if(n&1&&(s(0,"div",33)(1,"h4"),u(2),c(),s(3,"p"),u(4),c(),s(5,"div",36)(6,"span",37),u(7),c(),s(8,"span",38),u(9),c()()()),n&2){let e=t.$implicit,i=x(2);m(2),G(e.title),m(2),G(e.description),m(2),N("ngClass",i.getPriorityClass(e.priority)),m(),G(e.priority),m(2),G(e.category);}}function yU(n,t){if(n&1){let e=oe();s(0,"mat-card",17)(1,"mat-card-header")(2,"mat-card-title"),u(3,"AI Document Analysis Results"),c()(),s(4,"mat-card-content")(5,"p",30),u(6),c(),s(7,"p",31),u(8),c(),s(9,"div",32),be(10,bU,10,5,"div",33,Pt),c()(),s(12,"mat-card-actions")(13,"button",34),E("click",function(){k(e);let o=x();return R(o.addAnalyzedItems());}),s(14,"mat-icon"),u(15,"add_circle"),c(),u(16," Add All Items "),c(),s(17,"button",35),E("click",function(){k(e);let o=x();return R(o.dismissAnalysis());}),s(18,"mat-icon"),u(19,"close"),c(),u(20," Dismiss "),c()()();}if(n&2){let e=x();
522m(6),G(e.analysisResults.summary),m(2),_e("Found ",e.analysisResults.items.length," compliance items:"),m(2),ye(e.analysisResults.items);}}function PU(n,t){if(n&1){let e=oe();s(0,"div",18)(1,"app-compliance-item",39),E("saved",function(){k(e);let o=x();return R(o.onItemSaved());})("cancelled",function(){k(e);let o=x();return R(o.onItemCancelled());}),c()();}if(n&2){let e=x();m(),N("inlineComplianceId",e.complianceId)("inlineItem",null);}}function wU(n,t){n&1&&(s(0,"span",49),u(1,"AI Generated"),c());}function SU(n,t){if(n&1&&(s(0,"div",46)(1,"h3",47),u(2),c(),s(3,"div",48)(4,"span",37),u(5),c(),s(6,"span",38),u(7),c(),S(8,wU,2,0,"span",49),s(9,"span",50),u(10),c()()(),s(11,"p",51),u(12),c()),n&2){let e=x().$implicit,i=x(2);m(2),G(e.title),m(2),N("ngClass",i.getPriorityClass(e.priority)),m(),_e(" ",e.priority," "),m(2),G(e.category),m(),M(e.source==="ai-generated"?8:-1),m(2),_e("",e.scale.max,"-Point Scale"),m(2),G(e.description);}}function MU(n,t){if(n&1){let e=oe();s(0,"app-compliance-item",39),E("saved",function(){k(e);let o=x(3);return R(o.onItemSaved());})("cancelled",function(){k(e);let o=x(3);return R(o.onItemCancelled());}),c();}if(n&2){let e=x().$implicit,i=x(2);N("inlineComplianceId",i.complianceId)("inlineItem",e);}}function OU(n,t){if(n&1){let e=oe();s(0,"div",52),E("click",function(o){return o.stopPropagation();}),s(1,"div",53)(2,"mat-checkbox",54),E("change",function(){k(e);let o=x().$implicit,a=x(2);return R(a.toggleApproval(o));}),u(3," Reviewed "),c()(),s(4,"div",55)(5,"button",56),E("click",function(){k(e);let o=x().$implicit,a=x(2);return R(a.moveItemUp(o));}),s(6,"mat-icon"),u(7,"keyboard_arrow_up"),c()(),s(8,"button",57),E("click",function(){k(e);let o=x().$implicit,a=x(2);return R(a.moveItemDown(o));}),s(9,"mat-icon"),u(10,"keyboard_arrow_down"),c()(),s(11,"button",58),E("click",function(){k(e);let o=x().$implicit,a=x(2);return R(a.editItem(o));}),s(12,"mat-icon"),u(13),c()(),s(14,"button",59),E("click",function(){k(e);let o=x().$implicit,a=x(2);return R(a.deleteItem(o));}),s(15,"mat-icon"),u(16,"delete"),c()()()();}if(n&2){let e=x().$implicit,i=x(2);m(2),N("checked",e.isApproved),m(3),N("disabled",i.complianceItems.indexOf(e)===0),m(3),N("disabled",i.complianceItems.indexOf(e)===i.complianceItems.length-1),m(3),N("matTooltip",lf(i.editingItemId===e.id?"Close":"Edit item")),m(2),G(i.editingItemId===e.id?"expand_less":"edit");}}function EU(n,t){if(n&1){let e=oe();s(0,"div",41),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.editingItemId!==o.id&&a.editItem(o));}),s(1,"div",42),u(2),c(),s(3,"div",43),S(4,SU,13,7),S(5,MU,1,2,"app-compliance-item",44),S(6,OU,17,6,"div",45),c()();}if(n&2){let e=t.$implicit,i=x(2);Ue("approved",e.isApproved)("editing",i.editingItemId===e.id),N("ngClass",i.getPriorityClass(e.priority)),m(2),G(e.orderNumber||0),m(2),M(i.editingItemId!==e.id?4:-1),m(),M(i.editingItemId===e.id?5:-1),m(),M(i.editingItemId!==e.id?6:-1);}}function TU(n,t){if(n&1&&(s(0,"div",19),be(1,EU,7,9,"div",40,fU),c()),n&2){let e=x();m(),ye(e.complianceItems);}}function IU(n,t){if(n&1){let e=oe();s(0,"div",20)(1,"mat-icon",60),u(2,"assignment"),c(),s(3,"h2"),u(4,"No Compliance Items Yet"),c(),s(5,"p"),u(6,"Start building your compliance checklist by adding items manually or uploading a document for AI analysis."),c(),s(7,"button",34),E("click",function(){k(e);let o=x();return R(o.showAddForm());}),s(8,"mat-icon"),u(9,"add"),c(),u(10," Add Your First Item "),c()();}}var HC=class n{fb=re(wo);dialog=re(Ti);snackBar=re(Bt);firestore=re(ai);route=re(vi);router=re(Et);genAI=new JC("YOUR_GEMINI_API_KEY");complianceName="Compliance Checklist Manager";complianceDescription="Create, manage, and maintain compliance checklists for your organization.";isEditingHeader=!1;tempComplianceName="";tempComplianceDescription="";complianceId="";complianceItems=[];itemForm;editingItem=null;isFormVisible=!1;availableScales=[{min:1,max:2,levels:[{value:1,label:"Not Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},{min:1,max:3,levels:[{value:1,label:"Non-Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Partially Compliant",description:"Meets some requirements",color:"#ffc107"},{value:3,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},{min:1,max:5,levels:[{value:1,label:"Critical Gap",description:"Major non-compliance issues",color:"#dc3545"},{value:2,label:"Significant Gap",description:"Important requirements missing",color:"#fd7e14"},{value:3,label:"Moderate Gap",description:"Some requirements need attention",color:"#ffc107"},{value:4,label:"Minor Gap",description:"Minor improvements needed",color:"#20c997"},{value:5,label:"Excellent",description:"Exceeds all requirements",color:"#28a745"}]},{min:1,max:6,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Poor",description:"Significant gaps in compliance",color:"#e74c3c"},{value:3,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:4,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:5,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:6,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:7,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:7,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:8,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Above Average",description:"Requirements met with some excellence",color:"#17a2b8"},{value:7,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:8,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:9,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Above Average",description:"Requirements met with some excellence",color:"#17a2b8"},{value:7,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:8,label:"Very Good",description:"Requirements significantly exceeded",color:"#198754"},{value:9,label:"Excellent",description:"All requirements exceeded significantly",color:"#28a745"}]},{min:1,max:10,levels:[{value:1,label:"Critical",description:"Major non-compliance, immediate action required",color:"#dc3545"},{value:2,label:"Very Poor",description:"Severe compliance gaps",color:"#e74c3c"},{value:3,label:"Poor",description:"Significant gaps in compliance",color:"#fd7e14"},{value:4,label:"Below Average",description:"Some requirements not met",color:"#f39c12"},{value:5,label:"Average",description:"Basic requirements met",color:"#ffc107"},{value:6,label:"Above Average",description:"Requirements met with some excellence",color:"#17a2b8"},{value:7,label:"Good",description:"Most requirements exceeded",color:"#20c997"},{value:8,label:"Very Good",description:"Requirements significantly exceeded",color:"#198754"},{value:9,label:"Excellent",description:"Requirements exceeded with distinction",color:"#155724"},{value:10,label:"Outstanding",description:"Perfect compliance, industry leading",color:"#28a745"}]}];selectedScale=this.availableScales[0];isCustomizingScale=!1;customScaleLevels=[];
522statistics={totalItems:0,evaluatedItems:0,averageScore:0,globalCompliancePercentage:0,scoreDistribution:{},categoryBreakdown:{}};isAnalyzing=!1;analysisResults=null;categories=["Policy","Training","Documentation","Process","Security","Vendor Management","Legal","Technical"];priorities=["low","medium","high"];showBackButton=!0;editingItemId=null;isAddingItem=!1;constructor(){this.itemForm=this.fb.group({title:["",[Ye.required,Ye.minLength(3)]],description:["",[Ye.required,Ye.minLength(10)]],priority:["medium",Ye.required],category:["",Ye.required],scaleType:["3-point",Ye.required],evaluationNotes:[""]});}ngOnInit(){this.route.paramMap.subscribe(t=>{let e=t.get("id");this.complianceId=e||"default-checklist",this.loadComplianceData();});}editHeader(){this.tempComplianceName=this.complianceName,this.tempComplianceDescription=this.complianceDescription,this.isEditingHeader=!0;}saveHeader(){this.complianceName=this.tempComplianceName,this.complianceDescription=this.tempComplianceDescription,this.isEditingHeader=!1,this.saveComplianceToFirestore(),this.snackBar.open("Checklist header updated successfully","Close",{duration:3e3});}cancelEditHeader(){this.isEditingHeader=!1,this.tempComplianceName="",this.tempComplianceDescription="";}loadComplianceData(){return $(this,null,function*(){try{let t=ge(this.firestore,"compliances",this.complianceId);Bn(t,o=>{if(o.exists()){let a=o.data();this.complianceName=a.name||"Compliance Checklist Manager",this.complianceDescription=a.description||"Create, manage, and maintain compliance checklists for your organization.";}});let e=we(this.firestore,"compliances",this.complianceId,"items"),i=mt(e,Jt("orderNumber","asc"));Bn(i,o=>{this.complianceItems=[],o.forEach(a=>{let r=a.data(),l={id:parseInt(a.id),title:r.title,description:r.description,isCompleted:r.isCompleted||!1,priority:r.priority,category:r.category,isApproved:r.isApproved||!1,createdDate:r.createdDate?.toDate()||new Date(),source:r.source||"manual",scale:r.scale,currentLevel:r.currentLevel,evaluationNotes:r.evaluationNotes||"",orderNumber:r.orderNumber||0};this.complianceItems.push(l);}),this.complianceItems.sort((a,r)=>(a.orderNumber||0)-(r.orderNumber||0));});}catch(t){console.error("Error loading compliance data:",t),this.snackBar.open("Error loading data from Firestore","Close",{duration:5e3});}});}saveComplianceToFirestore(){return $(this,null,function*(){try{let t=ge(this.firestore,"compliances",this.complianceId);yield Dt(t,{name:this.complianceName,description:this.complianceDescription,updatedAt:new Date()},{merge:!0});}catch(t){console.error("Error saving compliance to Firestore:",t),this.snackBar.open("Error saving to Firestore","Close",{duration:5e3});}});}saveItemToFirestore(t){return $(this,null,function*(){try{let e=we(this.firestore,"compliances",this.complianceId,"items"),i=ge(e,t.id.toString()),o={title:t.title,description:t.description,isCompleted:t.isCompleted,priority:t.priority,category:t.category,isApproved:t.isApproved??!1,createdDate:t.createdDate??new Date(),source:t.source??"manual",scale:t.scale,currentLevel:t.currentLevel??null,evaluationNotes:t.evaluationNotes??"",orderNumber:t.orderNumber??0};yield Dt(i,o);}catch(e){console.error("Error saving item to Firestore:",e),this.snackBar.open("Error saving item to Firestore","Close",{duration:5e3});}});}deleteItemFromFirestore(t){return $(this,null,function*(){try{let e=ge(this.firestore,"compliances",this.complianceId,"items",t.toString());yield no(e);}catch(e){console.error("Error deleting item from Firestore:",e),this.snackBar.open("Error deleting item from Firestore","Close",{duration:5e3});}});}showAddForm(){this.editingItemId=null,this.isAddingItem=!0;}editItem(t){this.isAddingItem=!1,this.editingItemId=this.editingItemId===t.id?null:t.id;}viewItem(t){this.isAddingItem=!1,this.editingItemId=this.editingItemId===t.id?null:t.id;}onItemSaved(){this.editingItemId=null,this.isAddingItem=!1;}onItemCancelled(){this.editingItemId=null,this.isAddingItem=!1;}saveItem(){return $(this,null,function*(){if(this.itemForm.valid){let t=this.itemForm.value,e=this.getScaleByType(t.
522scaleType);if(this.editingItem)this.editingItem.title=t.title,this.editingItem.description=t.description,this.editingItem.priority=t.priority,this.editingItem.category=t.category,this.editingItem.scale=e,this.editingItem.evaluationNotes=t.evaluationNotes,yield this.saveItemToFirestore(this.editingItem),this.snackBar.open("Item updated successfully","Close",{duration:3e3});else{let i={id:this.getNextId(),title:t.title,description:t.description,priority:t.priority,category:t.category,isCompleted:!1,isApproved:!1,createdDate:new Date(),source:"manual",scale:e,evaluationNotes:t.evaluationNotes,orderNumber:this.getNextOrderNumber()};yield this.saveItemToFirestore(i),this.snackBar.open("Item added successfully","Close",{duration:3e3});}this.cancelEdit();}});}deleteItem(t){return $(this,null,function*(){confirm("Are you sure you want to delete this item?")&&(yield this.deleteItemFromFirestore(t.id),this.snackBar.open("Item deleted successfully","Close",{duration:3e3}));});}cancelEdit(){this.isFormVisible=!1,this.editingItem=null,this.itemForm.reset();}toggleApproval(t){return $(this,null,function*(){t.isApproved=!t.isApproved,yield this.saveItemToFirestore(t);let e=t.isApproved?"approved":"unapproved";this.snackBar.open(`Item ${e}`,"Close",{duration:2e3});});}onFileSelected(t){let e=t.target.files[0];e&&this.analyzeDocument(e);}analyzeDocument(t){return $(this,null,function*(){this.isAnalyzing=!0;try{let e=yield this.extractTextFromFile(t),i=this.genAI.getGenerativeModel({model:"gemini-pro"}),o=` 523 Analyze the following document and extract compliance requirements. 524 Return a JSON response with the following structure: 525 { 526 "items": [ 527 { 528 "title": "Brief title of the compliance requirement", 529 "description": "Detailed description of what needs to be done", 530 "priority": "high|medium|low", 531 "category": "Policy|Training|Documentation|Process|Security|Vendor Management|Legal|Technical", 532 "source": "ai-generated" 533 } 534 ], 535 "summary": "Brief summary of the document and compliance requirements found" 536 } 537 538 Document text: 539 ${e} 540 `,p=(yield(yield i.generateContent(o)).response).text().match(/\{[\s\S]*\}/);if(p)this.analysisResults=JSON.parse(p[0]),this.snackBar.open("Document analyzed successfully","Close",{duration:3e3});else throw new Error("Invalid response format from AI");}catch(e){console.error("Error analyzing document:",e),this.snackBar.open("Error analyzing document. Please try again.","Close",{duration:5e3});}finally{this.isAnalyzing=!1;}});}extractTextFromFile(t){return $(this,null,function*(){return new Promise((e,i)=>{let o=new FileReader();o.onload=a=>{e(a.target?.result);},o.onerror=i,o.readAsText(t);});});}addAnalyzedItems(){this.analysisResults&&(this.analysisResults.items.forEach(t=>{let e={id:this.getNextId(),title:t.title,description:t.description,priority:t.priority,category:t.category,isCompleted:!1,isApproved:!1,createdDate:new Date(),source:"ai-generated",scale:this.selectedScale,currentLevel:null,evaluationNotes:"",orderNumber:this.getNextOrderNumber()};this.complianceItems.push(e);}),this.snackBar.open(`Added ${this.analysisResults.items.length} items from analysis`,"Close",{duration:3e3}),this.analysisResults=null);}dismissAnalysis(){this.analysisResults=null;}getNextId(){return this.complianceItems.length>0?Math.max(...this.complianceItems.map(t=>t.id))+1:1;}getTotalCount(){return this.complianceItems.length;}getPriorityClass(t){return`priority-${t}`;}getApprovedCount(){return this.complianceItems.filter(t=>t.isApproved).length;}getScaleOptions(){return this.availableScales.map(t=>`${t.max}-point`);}getScaleByType(t){let i={"2-point":0,"3-point":1,"5-point":2,"6-point":3,"7-point":4,"8-point":5,"9-point":6,"10-point":7}[t];return i!==void 0?this.availableScales[i]:this.availableScales[1];}getCurrentScale(){let t=this.itemForm.get("scaleType")?.value;return this.getScaleByType(t);}startCustomizeScale(){let t=this.getCurrentScale();
540this.customScaleLevels=[...t.levels],this.isCustomizingScale=!0;}updateCustomLevel(t,e,i){this.customScaleLevels[t]&&(this.customScaleLevels[t][e]=i);}onLabelInput(t,e){let i=t.target;this.updateCustomLevel(e,"label",i.value);}onDescriptionInput(t,e){let i=t.target;this.updateCustomLevel(e,"description",i.value);}saveCustomScale(){let t=this.itemForm.get("scaleType")?.value,e=this.availableScales.findIndex(i=>`${i.max}-point`===t);e!==-1&&(this.availableScales[e].levels=[...this.customScaleLevels],this.snackBar.open("Scale customization saved","Close",{duration:3e3})),this.cancelCustomizeScale();}cancelCustomizeScale(){this.isCustomizingScale=!1,this.customScaleLevels=[];}resetScaleToDefault(){let t=this.itemForm.get("scaleType")?.value,e=this.availableScales.findIndex(i=>`${i.max}-point`===t);e!==-1&&(this.availableScales[e]=this.getDefaultScale(t),this.snackBar.open("Scale reset to default","Close",{duration:3e3}));}getDefaultScale(t){let e={"2-point":{min:1,max:2,levels:[{value:1,label:"Not Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},"3-point":{min:1,max:3,levels:[{value:1,label:"Non-Compliant",description:"Does not meet requirements",color:"#dc3545"},{value:2,label:"Partially Compliant",description:"Meets some requirements",color:"#ffc107"},{value:3,label:"Fully Compliant",description:"Meets all requirements",color:"#28a745"}]},"5-point":{min:1,max:5,levels:[{value:1,label:"Critical Gap",description:"Major non-compliance issues",color:"#dc3545"},{value:2,label:"Significant Gap",description:"Important requirements missing",color:"#fd7e14"},{value:3,label:"Moderate Gap",description:"Some requirements need attention",color:"#ffc107"},{value:4,label:"Minor Gap",description:"Minor improvements needed",color:"#20c997"},{value:5,label:"Excellent",description:"Exceeds all requirements",color:"#28a745"}]}};return e[t]||e["3-point"];}getStatisticsKeys(){return Object.keys(this.statistics.scoreDistribution);}getCategoryKeys(){return Object.keys(this.statistics.categoryBreakdown);}moveItemUp(t){return $(this,null,function*(){let e=this.complianceItems.findIndex(i=>i.id===t.id);if(e>0){let i=this.complianceItems[e-1],o=t.orderNumber||0;t.orderNumber=i.orderNumber||0,i.orderNumber=o,yield this.saveItemToFirestore(t),yield this.saveItemToFirestore(i),this.snackBar.open("Item moved up","Close",{duration:2e3});}});}moveItemDown(t){return $(this,null,function*(){let e=this.complianceItems.findIndex(i=>i.id===t.id);if(e<this.complianceItems.length-1){let i=this.complianceItems[e+1],o=t.orderNumber||0;t.orderNumber=i.orderNumber||0,i.orderNumber=o,yield this.saveItemToFirestore(t),yield this.saveItemToFirestore(i),this.snackBar.open("Item moved down","Close",{duration:2e3});}});}getNextOrderNumber(){return this.complianceItems.length===0?1:Math.max(...this.complianceItems.map(e=>e.orderNumber||0))+1;}goBack(){this.router.navigate(["/dashboard/compliances"]);}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-compliance"]],decls:27,vars:10,consts:[["fileInput",""],[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"header-subtitle"],[1,"objecttitle"],[1,"toolbar-spacer"],[1,"creation-date-chips"],[1,"div-button-right"],["mat-icon-button","","matTooltip","Edit header"],[1,"header-edit-form"],[1,"div-content"],[1,"container"],[1,"container-full"],[1,"container-tile"],[1,"analysis-card"],[1,"inline-expand-panel"],[1,"compliance-list"],[1,"empty-state"],["type","file","accept",".txt,.pdf,.doc,.docx",2,"display","none",3,"change"],["mat-stroked-button","","color","primary",1,"toolbar-action-btn",3,"click"],["mat-stroked-button","","color","accent",1,"toolbar-action-btn",3,"click","disabled"],["mat-icon-button","","matTooltip","Edit header",3,"click"],["mat-icon-button","","matTooltip","Save",3,"click"],["mat-icon-button","","matTooltip","Cancel",3,"click"],["appearance","outline",1,"full-width"],["matInput","","placeholder","Enter checklist title",3,"ngModelChange","ngModel"],["matInput","","rows","2","placeholder","Enter checklist description",3,"ngModelChange","ngModel"],[1,"analysis-summary"],[1,"analysis-count"],[1,"analyzed-items"],[1,"analyzed-item"],["mat-raised-button","","color","primary",3,"click"],["mat-button","",3,"click"],[1,"item-meta"],[1,"priority-badge",3,"ngClass"],[1,"category-badge"],[3,"saved","cancelled","inlineComplianceId","inlineItem"],[1,"compliance-item",2,"cursor","pointer",3,"approved","editing","ngClass"],[1,"compliance-item",2,"cursor","pointer",3,"click","ngClass"],[1,"item-number-col"],[1,"item-content"],[3,"inlineComplianceId","inlineItem"],[1,"item-approval-actions"],[1,"item-header"],[1,"item-title"],[1,"item-badges"],[1,"source-badge"],[1,"scale-badge"],[1,"item-description"],[1,"item-approval-actions",3,"click"],[1,"item-approval"],["color","accent",3,"change","checked"],[1,"item-actions"],["mat-icon-button","","matTooltip","Move up",3,"click","disabled"],["mat-icon-button","","matTooltip","Move down",3,"click","disabled"],["mat-icon-button","",3,"click","matTooltip"],["mat-icon-button","","color","warn","matTooltip","Delete item",3,"click"],[1,"empty-icon"]],template:function(e,i){e&1&&(s(0,"div",1)(1,"div",2)(2,"mat-toolbar",3)(3,"div",4)(4,"mat-icon",5),u(5,"assignment"),c(),s(6,"div")(7,"div",6),u(8,"Compliance Checklist"),c(),s(9,"div",7),u(10),c()()(),ee(11,"span",8),S(12,_U,4,2,"mat-chip-set",9),S(13,gU,10,2),s(14,"div",10),S(15,xU,3,0,"button",11),S(16,CU,6,0),c()(),S(17,vU,9,2,"div",12),c(),s(18,"div",13)(19,"div",14)(20,"div",15)(21,"div",16)(22,"div"),S(23,yU,21,2,"mat-card",17),S(24,PU,2,2,"div",18),S(25,TU,3,0,"div",19),S(26,IU,11,0,"div",20),c()()()()()()),e&2&&(m(10),G(i.complianceName||"Manage your compliance items"),m(2),M(i.isEditingHeader?-1:12),m(),M(i.isEditingHeader?-1:13),m(2),M(i.isEditingHeader?-1:15),m(),M(i.isEditingHeader?16:-1),m(),M(i.isEditingHeader?17:-1),m(6),M(i.analysisResults?23:-1),m(),M(i.isAddingItem?24:-1),m(),M(i.getTotalCount()>0?25:-1),m(),M(i.getTotalCount()===0&&!i.isAddingItem?26:-1));},dependencies:[ut,Kr,tn,Ft,Tt,gn,Po,$e,Qe,Qt,ha,hd,F1,gd,xd,_d,Gt,Vt,Wt,jt,Xt,bi,We,Xe,Zi,js,ra,xr,$t,_n,yi,Ta,Ls,ln,yn,Qm],styles:["[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center;color:#000000b3}.header-subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:50vw}.toolbar-spacer[_ngcontent-%COMP%]{flex:1 1 auto}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;flex-shrink:0}.toolbar-action-btn[_ngcontent-%COMP%]{margin-left:8px;flex-shrink:0}.creation-date-chips[_ngcontent-%COMP%]{margin-right:8px}.creation-date-chips[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{font-size:.8rem;height:24px;background-color:#00000014;color:#000000b3}.header-edit-form[_ngcontent-%COMP%]{padding:0 24px 20px;display:flex;flex-direction:column;gap:0}.header-edit-form[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;padding:20px 10px;overflow-y:auto;background-color:transparent}.div-content[_ngcontent-%COMP%] .container[_ngcontent-%COMP%] .container-full[_ngcontent-%COMP%] .container-tile[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-top:16px}.analysis-card[_ngcontent-%COMP%]{background-color:#fff;box-shadow:0 2px 8px #0000001a;margin-bottom:2rem;border-left:4px solid #007bff}.analysis-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{margin:0 0 24px;background-color:#00000005;padding:10px}.analysis-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{color:#000028;font-weight:500;font-size:1.25rem;margin:0}.analysis-card[_ngcontent-%COMP%] .analysis-summary[_ngcontent-%COMP%]{font-style:italic;color:#6c757d;margin-bottom:1rem}.analysis-card[_ngcontent-%COMP%] .analysis-count[_ngcontent-%COMP%]{font-weight:600;color:#495057;margin-bottom:1rem}.analysis-card[_ngcontent-%COMP%] .analyzed-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;max-height:400px;overflow-y:auto}.analysis-card[_ngcontent-%COMP%] .analyzed-item[_ngcontent-%COMP%]{padding:1rem;background-color:#f8f9fa;border-radius:8px;border-left:3px solid #007bff}.analysis-card[_ngcontent-%COMP%] .analyzed-item[_ngcontent-%COMP%] h4[_ng
540content-%COMP%]{margin:0 0 .5rem;color:#2c3e50;font-size:1rem}.analysis-card[_ngcontent-%COMP%] .analyzed-item[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5rem;color:#6c757d;font-size:.9rem}.analysis-card[_ngcontent-%COMP%] .analyzed-item[_ngcontent-%COMP%] .item-meta[_ngcontent-%COMP%]{display:flex;gap:.5rem}.inline-expand-panel[_ngcontent-%COMP%]{border-left:4px solid #1a3a5c;border-radius:0 12px 12px 0;background:#f8fafc;box-shadow:0 4px 16px #0000001f;margin-bottom:.5rem;overflow:hidden}.compliance-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.compliance-item[_ngcontent-%COMP%]{background:#fff;border-radius:12px;padding:0;box-shadow:0 2px 8px #0000001a;display:flex;overflow:hidden;transition:all .3s ease;position:relative;margin-bottom:1rem}.compliance-item[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 4px 16px #00000026}.compliance-item.approved[_ngcontent-%COMP%]{background-color:#fff}.compliance-item.editing[_ngcontent-%COMP%]{box-shadow:0 0 0 2px #1a3a5c,0 4px 16px #00000026;transform:none}.compliance-item.editing[_ngcontent-%COMP%]:hover{transform:none}.item-number-col[_ngcontent-%COMP%]{background-color:#1a3a5c;min-width:64px;width:64px;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700;color:#fff;letter-spacing:-.5px}.item-content[_ngcontent-%COMP%]{flex:1;padding:1.5rem;min-width:0}.item-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.5rem;gap:1rem}.item-title[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;color:#2c3e50;line-height:1.3}.item-badges[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-shrink:0;flex-wrap:wrap}.priority-badge[_ngcontent-%COMP%]{padding:.25rem .75rem;border-radius:20px;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.priority-badge.priority-high[_ngcontent-%COMP%]{background-color:#fee;color:#dc3545;border:1px solid #f5c6cb}.priority-badge.priority-medium[_ngcontent-%COMP%]{background-color:#fff8e1;color:#856404;border:1px solid #ffeaa7}.priority-badge.priority-low[_ngcontent-%COMP%]{background-color:#f0f9f0;color:#155724;border:1px solid #c3e6cb}.category-badge[_ngcontent-%COMP%]{padding:.25rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;background-color:#e9ecef;color:#495057;border:1px solid #ced4da}.source-badge[_ngcontent-%COMP%]{padding:.25rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;background-color:#e3f2fd;color:#1976d2;border:1px solid #bbdefb}.scale-badge[_ngcontent-%COMP%]{padding:.25rem .75rem;border-radius:20px;font-size:.75rem;font-weight:500;background-color:#f3e5f5;color:#7b1fa2;border:1px solid #ce93d8}.item-description[_ngcontent-%COMP%]{margin:0;color:#6c757d;line-height:1.5;font-size:.95rem;text-align:left}.item-approval-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem;background-color:#eef2f7;margin:1rem -1.5rem -1.5rem;padding:.75rem 1.5rem}.item-approval[_ngcontent-%COMP%]{display:flex;align-items:center}.item-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.empty-state[_ngcontent-%COMP%]{text-align:center;padding:4rem 2rem;background:#fff;border-radius:12px;box-shadow:0 2px 8px #0000001a}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:4rem;color:#6c757d;margin-bottom:1rem}.empty-state[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#2c3e50;margin-bottom:1rem}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#6c757d;margin-bottom:2rem;max-width:400px;margin-left:auto;margin-right:auto}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#000000b3}@media(max-width:768px){.header-card[_ngcontent-%COMP%]{margin:4px 6px 0}.div-toolbar[_ngcontent-%COMP%]{height:auto;min-height:64px;padding:8px 16px}.toolbar-icon[_ngcontent-%COMP%]{font-size:36px;width:36px;height:36px;margin-right:16px}.objecttitle[_ngcontent-%COMP%]{font-size:x-large;max-width:40vw}.div-content[_ngcontent-%COMP%]{padding:12px 6px}.item-number-col[_ngcontent-%COMP%]{min-width:48px;width:48px;font-size:1.5rem}.item-content[_ngcontent-%COMP%]{padding:1rem}.item-approval-actions[_ngcontent-%COMP%]{margin:.75rem -1rem -1rem;padding:.75rem 1rem}.item-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:.5rem}.item-badges[_ngcontent-%COMP%]{align-self:flex-start}.empty-state[_ngcontent-%COMP%]{padding:2rem 1rem}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:3rem}}@media(max-width:480px){.toolbar-icon[_ngcontent-%COMP%]{font-size:28px;width:28px;height:28px;margin-right:12px}.objecttitle[_ngcontent-%COMP%]{font-size:large;max-width:35vw}.item-number-col[_ngcontent-%COMP%]{min-width:40px;width:40px;font-size:1.25rem}.item-content[_ngcontent-%COMP%]{padding:.75rem}.item-approval-actions[_ngcontent-%COMP%]{margin:.75rem -.75rem -.75rem;padding:.75rem}}"]});};var UC=class n extends Wa{firestore=re(ai);collectionName="compliances";constructor(){super();}createCompliance(t){return $(this,null,function*(){try{let e=Ve(X({},t),{createdAt:xo(),updatedAt:xo(),creationDate:xo(),active:!0}),i=we(this.firestore,this.collectionName);return(yield Ht(i,e)).id;}catch(e){throw console.error("Error creating compliance:",e),e;}});}getCompliance(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t),i=yield yt(e);return i.exists()?X({id:i.id},i.data()):null;}catch(e){throw console.error("Error getting compliance:",e),e;}});}getCompliances(){return new Lo(t=>{let e=we(this.firestore,this.collectionName),i=mt(e,Jt("name"));return Bn(i,a=>{let r=a.docs.map(l=>X({id:l.id},l.data()));t.next(r);},a=>{console.error("Error getting compliances:",a),t.error(a);});});}updateCompliance(t,e){return $(this,null,function*(){try{let i=ge(this.firestore,this.collectionName,t),o=Ve(X({},e),{updatedAt:xo()});yield hn(i,o);}catch(i){throw console.error("Error updating compliance:",i),i;}});}deleteCompliance(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t);yield no(e);}catch(e){throw console.error("Error deleting compliance:",e),e;}});}searchCompliances(t){return new Lo(e=>{let i=we(this.firestore,this.collectionName),o=mt(i,Jt("name"));return Bn(o,r=>{let p=r.docs.map(d=>X({id:d.id},d.data())).filter(d=>d.name.toLowerCase().includes(t.toLowerCase())||d.description&&d.description.toLowerCase().includes(t.toLowerCase())||d.category&&d.category.toLowerCase().includes(t.toLowerCase()));e.next(p);},r=>{console.error("Error searching compliances:",r),e.error(r);});});}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var WC=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="compliances";documentRoute="dashboard/compliance";displayedColumns=["creationDate","name","description"];displayedColumnsHeaders=["Date","Name","Description"];
540ngOnInit(){}clickNewCompliance(){this.router.navigate(["/dashboard/compliance"]);}static ɵfac=function(e){return new(e||n)(le(UC),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-compliance-list"]],decls:18,vars:6,consts:()=>{let t;t="Compliance Checklists";let e;return e="New Checklist",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"assignment"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewCompliance();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10),ee(17,"app-object-list",11),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,ho,ln,yn,We,Xe],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var XC=class n{firestore=re(ai);collectionName="functionalities";getFunctionalitiesByComponent(t){return new Lo(e=>{let i=we(this.firestore,this.collectionName),o=mt(i,Ro("implementedBySystemComponentId","==",t),Jt("level"),Jt("name"));return Bn(o,r=>{let l=r.docs.map(p=>X({id:p.id},p.data()));e.next(l);},r=>{console.error("Error getting functionalities:",r),e.error(r);});});}getFunctionality(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t),i=yield yt(e);return i.exists()?X({id:i.id},i.data()):null;}catch(e){throw console.error("Error getting functionality:",e),e;}});}createFunctionality(t){return $(this,null,function*(){try{let e=we(this.firestore,this.collectionName);return(yield Ht(e,Ve(X({},t),{creationDate:xo(),active:!0}))).id;}catch(e){throw console.error("Error creating functionality:",e),e;}});}updateFunctionality(t,e){return $(this,null,function*(){try{let i=ge(this.firestore,this.collectionName,t);yield hn(i,X({},e));}catch(i){throw console.error("Error updating functionality:",i),i;}});}deleteFunctionality(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t);yield no(e);}catch(e){throw console.error("Error deleting functionality:",e),e;}});}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var eM=(n,t)=>t.id;function RU(n,t){if(n&1&&u(0),n&2){let e=x();_e(" ",e.component.name," ");}}function NU(n,t){n&1&&u(0," New Component ");}function AU(n,t){n&1&&u(0," Component ");}function DU(n,t){if(n&1){let e=oe();s(0,"button",18),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(1,"mat-icon"),u(2,"arrow_back"),c()(),s(3,"button",19),E("click",function(){k(e);let o=x();return R(o.deleteComponent());}),s(4,"mat-icon"),u(5,"delete"),c()();}}function jU(n,t){if(n&1){let e=oe();s(0,"nav",13)(1,"a",20),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(2,"mat-icon",21),u(3,"developer_board"),c(),s(4,"span",22),u(5,"Parent Component"),c()(),s(6,"mat-icon",23),u(7,"chevron_right"),c(),s(8,"span",24)(9,"mat-icon",21),u(10,"developer_board"),c(),s(11,"span",22),u(12),c()()();}if(n&2){let e=x();m(12),G(e.component==null?null:e.component.name);}}function LU(n,t){n&1&&(s(0,"div",15),u(1," Loading component... "),c());}function zU(n,t){if(n&1){let e=oe();s(0,"div",16)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c(),s(5,"button",25),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(6,"mat-icon"),u(7,"arrow_back"),c(),u(8," Back "),c()();}if(n&2){let e=x();m(4),G(e.error);}}function FU(n,t){n&1&&(s(0,"mat-icon"),u(1,"save"),c());}function BU(n,t){n&1&&(s(0,"mat-icon",32),u(1,"autorenew"),c());}function $U(n,t){if(n&1&&(s(0,"div",41)(1,"a",43)(2,"mat-icon",44),u(3,"open_in_new"),c(),u(4," Visit editor website "),c()()),n&2){let e=x(3);m(),N("href",e.form.value.url,$m);}}function VU(n,t){n&1&&(s(0,"mat-icon"),u(1,"add"),c());}function GU(n,t){n&1&&(s(0,"mat-icon",32),u(1,"autorenew"),c());}function qU(n,t){if(n&1){let e=oe();s(0,"div",42)(1,"button",45),E("click",function(){k(e);let o=x(3);return R(o.clickSave());}),S(2,VU,2,0,"mat-icon"),S(3,GU,2,0,"mat-icon",32),u(4," Create Component "),c()();}if(n&2){let e=x(3);
540m(),N("disabled",e.form.invalid||e.isSaving),m(),M(e.isSaving?-1:2),m(),M(e.isSaving?3:-1);}}function JU(n,t){if(n&1){let e=oe();s(0,"as-split-area",26)(1,"div",27)(2,"div",28)(3,"mat-icon",29),u(4,"category"),c(),s(5,"span",30),u(6,"Component Details"),c(),s(7,"div",12)(8,"button",31),E("click",function(){k(e);let o=x(2);return R(o.clickSave());}),S(9,FU,2,0,"mat-icon"),S(10,BU,2,0,"mat-icon",32),c()()(),s(11,"div",33)(12,"form",34)(13,"div",35)(14,"mat-form-field",36)(15,"mat-label"),u(16,"Component Name"),c(),s(17,"input",37),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c(),s(18,"mat-error"),u(19,"Name is required"),c()()(),s(20,"div",35)(21,"mat-form-field",36)(22,"mat-label"),u(23,"Editor (Company)"),c(),s(24,"input",38),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c(),s(25,"mat-error"),u(26,"Editor is required"),c()()(),s(27,"div",35)(28,"mat-form-field",36)(29,"mat-label"),u(30,"Description"),c(),s(31,"textarea",39),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c()()(),s(32,"div",35)(33,"mat-form-field",36)(34,"mat-label"),u(35,"Editor URL"),c(),s(36,"input",40),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c()()(),S(37,$U,5,1,"div",41),S(38,qU,5,3,"div",42),c()()()();}if(n&2){let e=x(2);N("size",35),m(8),N("disabled",e.form.invalid||e.isSaving),m(),M(e.isSaving?-1:9),m(),M(e.isSaving?10:-1),m(2),N("formGroup",e.form),m(25),M(e.form.value.url?37:-1),m(),M(e.isCreationMode?38:-1);}}function HU(n,t){if(n&1){let e=oe();s(0,"tr",55),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.navigateToSubComponent(o.id));})("dblclick",function(){let o=k(e).$implicit,a=x(5);return R(a.navigateToSubComponent(o.id));}),s(1,"td",51),u(2),c(),s(3,"td",52),u(4),c(),s(5,"td",53)(6,"mat-icon",56),E("click",function(o){let a=k(e).$implicit;return x(5).navigateToSubComponent(a.id),R(o.stopPropagation());}),u(7," open_in_new "),c()()();}if(n&2){let e=t.$implicit;m(2),G(e.name),m(2),G(e.editor);}}function UU(n,t){if(n&1&&(s(0,"table",49)(1,"thead")(2,"tr")(3,"th",51),u(4,"Name"),c(),s(5,"th",52),u(6,"Editor"),c(),ee(7,"th",53),c()(),s(8,"tbody"),be(9,HU,8,2,"tr",54,eM),c()()),n&2){let e=x(4);m(9),ye(e.subComponents);}}function WU(n,t){n&1&&(s(0,"span",50),u(1,"No sub-components found."),c());}function XU(n,t){if(n&1){let e=oe();s(0,"as-split-area",26)(1,"div",27)(2,"div",28)(3,"mat-icon",29),u(4,"account_tree"),c(),s(5,"span",30),u(6,"Sub-components"),c(),s(7,"div",12)(8,"button",47),E("click",function(){k(e);let o=x(3);return R(o.clickAddSubComponent());}),s(9,"mat-icon"),u(10,"add"),c()()()(),s(11,"div",48),S(12,UU,11,0,"table",49),S(13,WU,2,0,"span",50),c()()();}if(n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?33:100),m(12),M(e.subComponents.length>0?12:-1),m(),M(e.subComponents.length===0?13:-1);}}function YU(n,t){if(n&1){let e=oe();s(0,"mat-tree-node")(1,"div",61),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.onFunctionalityClick(o.func));}),ee(2,"span",62),s(3,"span",63),u(4),c(),s(5,"mat-icon",64),u(6,"subdirectory_arrow_right"),c(),s(7,"div",65)(8,"span",66),u(9),c()(),s(10,"mat-icon",67),E("click",function(o){let a=k(e).$implicit;return x(5).clickEditFunctionality(a.func),R(o.stopPropagation());}),u(11," edit "),c()()();}if(n&2){let e=t.$implicit,i=x(5);m(),Ue("cap-tree-row-selected",i.isFunctionalitySelected(e.func)),m(2),ji("level-"+e.func.level),m(),_e(" ",e.func.level," "),m(5),G(e.func.name);}}function KU(n,t){if(n&1){let e=oe();s(0,"mat-nested-tree-node")(1,"div",61),E("click",function(){let o=k(e).$implicit,a=x(5);return a.onFunctionalityClick(o.func),R(a.funcTreeControl.toggle(o));}),s(2,"button",68),E("click",function(o){let a=k(e).$implicit,r=x(5);return o.stopPropagation(),R(r.funcTreeControl.toggle(a));}),s(3,"mat-icon",69),u(4),c()(),s(5,"span",63),u(6),c(),s(7,"div",65)(8,"span",70),u(9),c()(),s(10,"mat-icon",67),E("click",function(o){let a=k(e).$implicit;return x(5).clickEditFunctionality(a.func),R(o.stopPropagation());}),u(11," edit "),c()(),s(12,"div",71),Ma(13,72),c()();}if(n&2){let e=t.$implicit,i=x(5);m(),Ue("cap-tree-row-selected",i.isFunctionalitySelected(e.func)),m(),Yo("aria-label","Toggle "+e.func.name),m(2),_e(" ",i.funcTree
540Control.isExpanded(e)?"expand_more":"chevron_right"," "),m(),ji("level-"+e.func.level),m(),_e(" ",e.func.level," "),m(3),G(e.func.name),m(3),Ue("cap-tree-hidden",!i.funcTreeControl.isExpanded(e));}}function ZU(n,t){if(n&1&&(s(0,"mat-tree",58),Zt(1,YU,12,6,"mat-tree-node",59)(2,KU,14,10,"mat-nested-tree-node",60),c()),n&2){let e=x(4);N("dataSource",e.funcTreeDataSource)("treeControl",e.funcTreeControl),m(2),N("matTreeNodeDefWhen",e.hasFuncChildren);}}function QU(n,t){n&1&&(s(0,"span",50),u(1,"No functionalities found."),c());}function eW(n,t){if(n&1){let e=oe();s(0,"as-split-area",26)(1,"div",27)(2,"div",28)(3,"mat-icon",29),u(4,"list"),c(),s(5,"span",30),u(6,"Functionalities"),c(),s(7,"div",12)(8,"button",57),E("click",function(){k(e);let o=x(3);return R(o.clickAddFunctionality());}),s(9,"mat-icon"),u(10,"add"),c()()()(),s(11,"div",48),S(12,ZU,3,3,"mat-tree",58),S(13,QU,2,0,"span",50),c()()();}if(n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?34:100),m(12),M(e.functionalities.length>0?12:-1),m(),M(e.functionalities.length===0?13:-1);}}function tW(n,t){if(n&1&&(s(0,"mat-option",84),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function nW(n,t){if(n&1&&(s(0,"div",35)(1,"mat-form-field",36)(2,"mat-label"),u(3),c(),s(4,"mat-select",82)(5,"mat-option",83),u(6,"\u2014 None \u2014"),c(),be(7,tW,2,2,"mat-option",84,eM),c()()()),n&2){let e=x(5);m(3),_e("Parent Functionality (Level ",e.functionalityForm.value.level-1,")"),m(4),ye(e.getFuncParentCandidates(e.functionalityForm.value.level));}}function iW(n,t){n&1&&u(0," Update ");}function oW(n,t){n&1&&u(0," Create ");}function aW(n,t){if(n&1){let e=oe();s(0,"button",85),E("click",function(){k(e);let o=x(5);return R(o.deleteFunctionality(o.selectedFunctionality));}),s(1,"mat-icon"),u(2,"delete"),c()();}}function rW(n,t){if(n&1){let e=oe();s(0,"form",73)(1,"div",35)(2,"mat-form-field",36)(3,"mat-label"),u(4,"Name"),c(),ee(5,"input",74),s(6,"mat-error"),u(7,"Name is required"),c()()(),s(8,"div",35)(9,"mat-form-field",36)(10,"mat-label"),u(11,"Description"),c(),ee(12,"textarea",75),c()(),s(13,"div",35)(14,"mat-form-field",36)(15,"mat-label"),u(16,"Level"),c(),ee(17,"input",76),s(18,"mat-hint"),u(19,"Level 1 = top-level functionality"),c()()(),S(20,nW,9,1,"div",35),s(21,"div",35)(22,"mat-form-field",36)(23,"mat-label"),u(24,"Business URL"),c(),ee(25,"input",77),c()(),s(26,"div",35)(27,"mat-form-field",36)(28,"mat-label"),u(29,"Developer URL"),c(),ee(30,"input",78),c()(),s(31,"div",79)(32,"button",25),E("click",function(){k(e);let o=x(4);return R(o.cancelFunctionalityForm());}),u(33," Cancel "),c(),s(34,"button",80),E("click",function(){k(e);let o=x(4);return R(o.saveFunctionality());}),s(35,"mat-icon"),u(36,"save"),c(),S(37,iW,1,0)(38,oW,1,0),c(),S(39,aW,3,0,"button",81),c()();}if(n&2){let e=x(4);N("formGroup",e.functionalityForm),m(20),M(e.functionalityForm.value.level>1?20:-1),m(14),N("disabled",e.functionalityForm.invalid),m(3),M(e.selectedFunctionality!=null&&e.selectedFunctionality.id?37:38),m(2),M(e.selectedFunctionality!=null&&e.selectedFunctionality.id?39:-1);}}function sW(n,t){if(n&1&&(s(0,"div",87)(1,"span",88),u(2,"Description:"),c(),s(3,"span",89),u(4),c()()),n&2){let e=x(5);m(4),G(e.selectedFunctionality.description);}}function lW(n,t){if(n&1&&(s(0,"div",87)(1,"span",88),u(2,"Business:"),c(),s(3,"span",89)(4,"a",43)(5,"mat-icon",44),u(6,"open_in_new"),c(),u(7," Open "),c()()()),n&2){let e=x(5);m(4),N("href",e.selectedFunctionality.businessUrl,$m);}}function cW(n,t){if(n&1&&(s(0,"div",87)(1,"span",88),u(2,"Dev docs:"),c(),s(3,"span",89)(4,"a",43)(5,"mat-icon",44),u(6,"open_in_new"),c(),u(7," Open "),c()()()),n&2){let e=x(5);m(4),N("href",e.selectedFunctionality.developperUrl,$m);}}function pW(n,t){n&1&&(s(0,"span",50),u(1,"Loading..."),c());}function dW(n,t){n&1&&(s(0,"span",50),u(1,"None linked."),c());}function mW(n,t){if(n&1){let e=oe();s(0,"a",97),E("click",function(){let o=k(e).$implicit,a=x(6);return R(a.navigateToBusinessCapability(o));}),s(1,"span",63),u(2),c(),s(3,"span",98),u(4),c(),s(5,"mat-icon",99),u(6,"open_in_new"),c()();}if(n&2){let e=t.$implicit;N("matTooltip","Level "+e.level+" \xB7 "+e.businessCapabilityModelName),m(),ji("level-"+e.level),m(),G(e.level),m(2),G(e.businessCapabilityModelName+" - Level "+e.level+" - "+e.name);}}function uW(n,t){if(n&1&&(s(0,"div",92),be(1,mW,7,5,"a",96,eM),c()),n&2){let e=x(5);m(),ye(e.selectedFunctionalityCapabilities);}}function fW(n,t){if(n&1){let e=oe();
540s(0,"div",86)(1,"div",87)(2,"span",88),u(3,"Name:"),c(),s(4,"span",89),u(5),c()(),s(6,"div",87)(7,"span",88),u(8,"Level:"),c(),s(9,"span",89),u(10),c()(),S(11,sW,5,1,"div",87),S(12,lW,8,1,"div",87),S(13,cW,8,1,"div",87),s(14,"div",90)(15,"span",88)(16,"mat-icon",91),u(17,"hub"),c(),u(18," Business Capabilities: "),c(),S(19,pW,2,0,"span",50),S(20,dW,2,0,"span",50),S(21,uW,3,0,"div",92),c()(),s(22,"div",93)(23,"button",94),E("click",function(){k(e);let o=x(4);return R(o.clickEditFunctionality(o.selectedFunctionality));}),s(24,"mat-icon"),u(25,"edit"),c(),u(26," Edit "),c(),s(27,"button",95),E("click",function(){k(e);let o=x(4);return R(o.deleteFunctionality(o.selectedFunctionality));}),s(28,"mat-icon"),u(29,"delete"),c(),u(30," Delete "),c()();}if(n&2){let e=x(4);m(5),G(e.selectedFunctionality.name),m(5),G(e.selectedFunctionality.level),m(),M(e.selectedFunctionality.description?11:-1),m(),M(e.selectedFunctionality.businessUrl?12:-1),m(),M(e.selectedFunctionality.developperUrl?13:-1),m(6),M(e.isLoadingCapabilities?19:-1),m(),M(!e.isLoadingCapabilities&&e.selectedFunctionalityCapabilities.length===0?20:-1),m(),M(!e.isLoadingCapabilities&&e.selectedFunctionalityCapabilities.length>0?21:-1);}}function hW(n,t){n&1&&(s(0,"span",50),u(1," Select a functionality from the list to see its details, or click + to add one. "),c());}function _W(n,t){if(n&1&&(s(0,"as-split-area",26)(1,"div",27)(2,"div",28)(3,"mat-icon",29),u(4,"info"),c(),s(5,"span",30),u(6,"Functionality Detail"),c()(),s(7,"div",33),S(8,rW,40,5,"form",73),S(9,fW,31,8),S(10,hW,2,0,"span",50),c()()()),n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?33:100),m(8),M(e.showFunctionalityForm?8:-1),m(),M(!e.showFunctionalityForm&&e.selectedFunctionality?9:-1),m(),M(!e.showFunctionalityForm&&!e.selectedFunctionality?10:-1);}}function gW(n,t){if(n&1&&(s(0,"as-split-area",26)(1,"as-split",46),S(2,XU,14,3,"as-split-area",26),S(3,eW,14,3,"as-split-area",26),S(4,_W,11,4,"as-split-area",26),c()()),n&2){let e=x(2);N("size",65),m(),N("gutterSize",20),m(),M(e.panelVisibility.subComponents&&!e.isCreationMode?2:-1),m(),M(e.panelVisibility.functionalities&&!e.isCreationMode?3:-1),m(),M(e.panelVisibility.functionalityDetail&&!e.isCreationMode?4:-1);}}function xW(n,t){if(n&1&&(s(0,"as-split",17),S(1,JU,39,7,"as-split-area",26),S(2,gW,5,5,"as-split-area",26),c()),n&2){let e=x();N("gutterSize",20),m(),M(e.panelVisibility.fields?1:-1),m(),M(e.panelVisibility.subComponents||e.panelVisibility.functionalities||e.panelVisibility.functionalityDetail?2:-1);}}var y0=class n{auth=re(Il);route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);systemComponentService=re(bd);functionalityService=re(XC);businessCapabilityService=re(zf);componentId=null;component=null;isCreationMode=!1;isLoading=!0;isSaving=!1;error=null;subComponents=[];functionalities=[];selectedFunctionality=null;selectedFunctionalityCapabilities=[];isLoadingCapabilities=!1;showFunctionalityForm=!1;functionalityForm;funcTreeControl=new Td(t=>t.children);funcTreeDataSource=new Rd();hasFuncChildren=(t,e)=>e.children.length>0;panelVisibility={fields:!0,subComponents:!0,functionalities:!0,functionalityDetail:!0};form;subscriptions=[];constructor(){this.form=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:[""],editor:["",Ye.required],url:[""]}),this.functionalityForm=this.fb.group({name:["",Ye.required],description:[""],level:[1,[Ye.required,Ye.min(1)]],parentFunctionalityId:[""],businessUrl:[""],developperUrl:[""]});}ngOnInit(){this.route.params.subscribe(t=>{this.componentId=t.id??null,this.componentId?(this.isCreationMode=!1,this.loadComponent()):(this.isCreationMode=!0,this.isLoading=!1);});}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe());}loadComponent(){return $(this,null,function*(){try{if(this.isLoading=!0,this.error=null,!this.componentId){this.error="No component ID provided",this.isLoading=!1;return;}let t=yield this.systemComponentService.getSystemComponent(this.componentId);if(!t){this.error="Component not found",this.isLoading=!1;return;}this.component=t,this.form.patchValue({name:t.name??"",description:t.description??"",editor:t.editor??"",url:t.url??""});let e=this.systemComponentService.getSubComponents(this.componentId).subscribe(o=>this.subComponents=o);this.subscriptions.push(e);let i=this.functionalityService.getFunctionalitiesByComponent(this.componentId).subscribe(o=>{this.functionalities=o,this.buildFunctionalityTree();});this.subscriptions.push(i),this.isLoading=!1;}catch(t){console.error("Error loading component:",t),this.error="Failed to load component",this.isLoading=!1;}});}togglePanel(t){this.panelVisibility[t]=!this.panelVisibility[t];}get visibleRightPanelKeys(){return["subComponents","functionalities","functionalityDetail"].filter(t=>this.panelVisibility[t]);}
540clickSave(){return $(this,null,function*(){if(!this.form.invalid)try{this.isSaving=!0;let t=this.form.value;if(this.isCreationMode){let e=yield this.systemComponentService.createSystemComponent({name:t.name,description:t.description,editor:t.editor,url:t.url||"",parentSystemComponentId:"",isSubComponent:!1,active:!0});this.snackBar.open("Component created","Close",{duration:2e3}),this.router.navigate(["/dashboard/component",e]);}else yield this.systemComponentService.updateSystemComponent(this.componentId,{name:t.name,description:t.description,editor:t.editor,url:t.url||""}),this.component&&(this.component=Ve(X({},this.component),{name:t.name,description:t.description,editor:t.editor,url:t.url})),this.snackBar.open("Saved","Close",{duration:1500});}catch(t){console.error("Error saving component:",t),this.snackBar.open("Failed to save","Close",{duration:3e3});}finally{this.isSaving=!1;}});}deleteComponent(){return $(this,null,function*(){if(!(!this.component||!this.componentId)&&confirm(`Delete "${this.component.name}"? This will also remove all sub-components.`))try{yield this.systemComponentService.deleteSystemComponent(this.componentId),this.snackBar.open("Component deleted","Close",{duration:2e3}),this.router.navigate(["/dashboard/components"]);}catch(t){console.error("Error deleting component:",t),this.snackBar.open("Failed to delete","Close",{duration:3e3});}});}goBack(){this.component?.isSubComponent&&this.component.parentSystemComponentId?this.router.navigate(["/dashboard/component",this.component.parentSystemComponentId]):this.router.navigate(["/dashboard/components"]);}clickAddSubComponent(){return $(this,null,function*(){if(this.componentId)try{let t=yield this.systemComponentService.createSystemComponent({name:"New Sub-component",description:"",editor:this.component?.editor??"",url:"",parentSystemComponentId:this.componentId,isSubComponent:!0,active:!0});this.router.navigate(["/dashboard/component",t]);}catch(t){console.error("Error creating sub-component:",t),this.snackBar.open("Failed to create sub-component","Close",{duration:3e3});}});}navigateToSubComponent(t){this.router.navigate(["/dashboard/component",t]);}buildFunctionalityTree(){let t=o=>this.functionalities.filter(a=>a.parentFunctionalityId===o).map(a=>({func:a,children:t(a.id)})),e=new Set(this.functionalities.map(o=>o.id)),i=this.functionalities.filter(o=>!o.parentFunctionalityId||!e.has(o.parentFunctionalityId));this.funcTreeDataSource.data=i.map(o=>({func:o,children:t(o.id)})),this.expandAllFuncNodes(this.funcTreeDataSource.data);}expandAllFuncNodes(t){for(let e of t)this.funcTreeControl.expand(e),e.children.length>0&&this.expandAllFuncNodes(e.children);}getFuncParentCandidates(t){return t<=1?[]:this.functionalities.filter(e=>e.level===t-1);}onFunctionalityClick(t){this.selectedFunctionality=t,this.showFunctionalityForm=!1,this.loadCapabilitiesForFunctionality(t);}loadCapabilitiesForFunctionality(t){return $(this,null,function*(){let e=t.implementsBusinessCapabilitiesIds??[];if(e.length===0){this.selectedFunctionalityCapabilities=[];return;}try{this.isLoadingCapabilities=!0;let i=yield Promise.all(e.map(o=>this.businessCapabilityService.getCapability(o)));this.selectedFunctionalityCapabilities=i.filter(o=>o!==null);}catch(i){console.error("Error loading business capabilities:",i),this.selectedFunctionalityCapabilities=[];}finally{this.isLoadingCapabilities=!1;}});}navigateToBusinessCapability(t){this.router.navigate(["/dashboard/business-capability-model",t.businessCapabilityModelId],{queryParams:{capabilityId:t.
540id}});}isFunctionalitySelected(t){return this.selectedFunctionality?.id===t.id;}clickAddFunctionality(){this.selectedFunctionality=null,this.selectedFunctionalityCapabilities=[],this.functionalityForm.reset({level:1}),this.showFunctionalityForm=!0;}clickEditFunctionality(t){this.selectedFunctionality=t,this.functionalityForm.patchValue({name:t.name,description:t.description??"",level:t.level??1,parentFunctionalityId:t.parentFunctionalityId??"",businessUrl:t.businessUrl??"",developperUrl:t.developperUrl??""}),this.showFunctionalityForm=!0;}saveFunctionality(){return $(this,null,function*(){if(!(this.functionalityForm.invalid||!this.componentId))try{let t=this.functionalityForm.value,e={name:t.name,description:t.description??"",level:t.level,parentFunctionalityId:t.parentFunctionalityId??"",businessUrl:t.businessUrl||void 0,developperUrl:t.developperUrl||void 0,implementedBySystemComponentId:this.componentId,implementsBusinessCapabilitiesIds:[]};this.selectedFunctionality?.id?(yield this.functionalityService.updateFunctionality(this.selectedFunctionality.id,e),this.snackBar.open("Functionality updated","Close",{duration:1500})):(yield this.functionalityService.createFunctionality(e),this.snackBar.open("Functionality created","Close",{duration:1500})),this.showFunctionalityForm=!1,this.selectedFunctionality=null;}catch(t){console.error("Error saving functionality:",t),this.snackBar.open("Failed to save functionality","Close",{duration:3e3});}});}deleteFunctionality(t){return $(this,null,function*(){if(t.id&&confirm(`Delete functionality "${t.name}"?`))try{yield this.functionalityService.deleteFunctionality(t.id),this.selectedFunctionality?.id===t.id&&(this.selectedFunctionality=null,this.showFunctionalityForm=!1),this.snackBar.open("Functionality deleted","Close",{duration:1500});}catch(e){this.snackBar.open("Failed to delete functionality","Close",{duration:3e3});}});}cancelFunctionalityForm(){this.showFunctionalityForm=!1;}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-component"]],decls:34,vars:24,consts:[[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-panel-toggles"],["mat-icon-button","","matTooltip","Show/hide component fields",3,"click"],["mat-icon-button","","matTooltip","Show/hide sub-components",3,"click"],["mat-icon-button","","matTooltip","Show/hide functionalities",3,"click"],["mat-icon-button","","matTooltip","Show/hide functionality detail",3,"click"],[1,"div-button-right"],[1,"breadcrumb-bar"],[1,"div-content"],[1,"div-insight-disabled",2,"padding","40px","text-align","center"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","color","#f44336"],["direction","horizontal",3,"gutterSize"],["mat-icon-button","","matTooltip","Back to list",3,"click"],["mat-icon-button","","color","warn","matTooltip","Delete component",3,"click"],["matTooltip","Parent component",1,"breadcrumb-link",3,"click"],[1,"breadcrumb-icon"],[1,"breadcrumb-text"],[1,"breadcrumb-separator"],[1,"breadcrumb-link","breadcrumb-active"],["mat-stroked-button","",3,"click"],[3,"size"],[1,"container-right-panel"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],["mat-icon-button","","matTooltip","Save changes",3,"click","disabled"],[1,"icon-loading"],[1,"container-tile-body-strong"],[3,"formGroup"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","name",3,"change"],["matInput","","formControlName","editor",3,"change"],["matInput","","formControlName","description","rows","4",3,"change"],["matInput","","formControlName","url","placeholder","https://...",3,"change"],[1,"div-form-element",2,"padding-top","4px"],[1,"div-form-element",2,"padding-top","16px"],["target","_blank",1,"external-link",3,"href"],[1,"ext-link-icon"],["mat-flat-button","","color","primary",2,"width","100%",3,"click","disabled"],["direction","vertical",3,"gutterSize"],["mat-icon-button","","color","primary","matTooltip","Add a new sub-component",3,"click"],[1,"container-tile-body-strong","sp-list-body"],[1,"sp-list-table"],[1,"div-insight-disabled"],[1,"sp-col-name"],[1,"sp-col-secondary"],[1,"sp-col-link"],[1,"sp-list-row"],[1,"sp-list-row",3,"click","dblclick"],["matTooltip","Open sub-component",1,"sp-link-icon","sp-drilldown-icon",3,"click"],["mat-icon-button","","color","primary","matTooltip","Add a new functionality",3,"click"],[1,"cap-tree",3,"dataSource","tree
540Control"],[4,"matTreeNodeDef"],[4,"matTreeNodeDef","matTreeNodeDefWhen"],[1,"cap-tree-row",3,"click"],[1,"cap-tree-toggle-spacer"],[1,"level-badge"],[1,"cap-child-icon"],[1,"cap-tree-content"],[1,"cap-name"],["matTooltip","Edit functionality",1,"sp-link-icon","sp-edit-icon",3,"click"],["mat-icon-button","",1,"cap-tree-toggle",3,"click"],[1,"cap-tree-toggle-icon"],[1,"cap-name","cap-name-strong"],["role","group",1,"cap-tree-children"],["matTreeNodeOutlet",""],[1,"functionality-form",3,"formGroup"],["matInput","","formControlName","name"],["matInput","","formControlName","description","rows","3"],["matInput","","type","number","formControlName","level","min","1"],["matInput","","formControlName","businessUrl","placeholder","https://..."],["matInput","","formControlName","developperUrl","placeholder","https://..."],[1,"form-actions"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-icon-button","","color","warn","matTooltip","Delete this functionality"],["formControlName","parentFunctionalityId"],["value",""],[3,"value"],["mat-icon-button","","color","warn","matTooltip","Delete this functionality",3,"click"],[1,"detail-section"],[1,"detail-row"],[1,"detail-key"],[1,"detail-value"],[1,"detail-row","detail-row-block"],[1,"detail-section-icon"],[1,"cap-links-list"],[1,"link-controls"],["mat-stroked-button","","color","primary",3,"click"],["mat-stroked-button","","color","warn",3,"click"],[1,"cap-link-chip",3,"matTooltip"],[1,"cap-link-chip",3,"click","matTooltip"],[1,"cap-link-name"],[1,"cap-link-icon"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-toolbar",2)(3,"div",3)(4,"div")(5,"mat-icon",4),u(6,"developer_board"),c()(),s(7,"div")(8,"div",5),u(9,"System Component"),c(),s(10,"div",6),S(11,RU,1,1),S(12,NU,1,0),S(13,AU,1,0),c()()(),s(14,"div",7)(15,"button",8),E("click",function(){return i.togglePanel("fields");}),s(16,"mat-icon"),u(17,"category"),c()(),s(18,"button",9),E("click",function(){return i.togglePanel("subComponents");}),s(19,"mat-icon"),u(20,"account_tree"),c()(),s(21,"button",10),E("click",function(){return i.togglePanel("functionalities");}),s(22,"mat-icon"),u(23,"list"),c()(),s(24,"button",11),E("click",function(){return i.togglePanel("functionalityDetail");}),s(25,"mat-icon"),u(26,"info"),c()()(),s(27,"div",12),S(28,DU,6,0),c()(),S(29,jU,13,1,"nav",13),c(),s(30,"div",14),S(31,LU,2,0,"div",15),S(32,zU,9,1,"div",16),S(33,xW,3,3,"as-split",17),c()()),e&2&&(m(11),M(!i.isCreationMode&&i.component?11:-1),m(),M(i.isCreationMode?12:-1),m(),M(!i.isCreationMode&&!i.component&&!i.isLoading?13:-1),m(2),Ue("toggle-active",i.panelVisibility.fields)("toggle-inactive",!i.panelVisibility.fields),m(3),Ue("toggle-active",i.panelVisibility.subComponents)("toggle-inactive",!i.panelVisibility.subComponents),m(3),Ue("toggle-active",i.panelVisibility.functionalities)("toggle-inactive",!i.panelVisibility.functionalities),m(3),Ue("toggle-active",i.panelVisibility.functionalityDetail)("toggle-inactive",!i.panelVisibility.functionalityDetail),m(4),M(i.isCreationMode?-1:28),m(),M(!i.isCreationMode&&i.component!=null&&i.component.isSubComponent?29:-1),m(2),M(i.isLoading?31:-1),m(),M(i.error&&!i.isLoading?32:-1),m(),M(!i.isLoading&&!i.error?33:-1));},dependencies:[ut,gn,Nn,Ft,Ea,Tt,Mn,Qr,tn,An,Wn,ln,yn,$e,Qe,Qt,We,Xe,Gt,Vt,Wt,Ki,ti,jt,Xt,bi,So,Ei,$t,_n,Lf,Df,Af,jf,Nf,kd,vr,cr,Cr],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;padding-bottom:0;background-color:transparent;min-height:0}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.title[_ngcontent-%COMP%]{padding-left:10px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.div-panel-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:4px;padding:0 16px}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important;filter:none;text-shadow:none}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-inactive[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important;filter:none;text-shadow:none}.breadcrumb-bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:6px 12px;margin-bottom:8px;background-color:#00000008;border-radius:8px;flex-shrink:0;min-height:32px}.breadcrumb-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;cursor:pointer;color:#0000008c;font-size:.85em;font-weight:500;text-decoration:none;padding:4px 8px;border-radius:6px;transition:background-color .15s ease,color .15s ease;white-space:nowrap}.breadcrumb-link[_ngcontent-%COMP%]:hover{background-color:#0000000f;color:#000c}.breadcrumb-link.breadcrumb-active[_ngcontent-%COMP%]{color:#465d91;font-weight:600;cursor:default}.breadcrumb-link.breadcrumb-active[_ngcontent-%COMP%]:hover{background-color:transparent}.breadcrumb-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:inherit!important;opacity:.7;filter:none!important;text-shadow:none!important}
540.breadcrumb-separator[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:#00000040!important;flex-shrink:0;filter:none!important;text-shadow:none!important}.breadcrumb-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:56px;max-height:56px;flex-shrink:0}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.sp-list-body[_ngcontent-%COMP%]{padding:0!important}.sp-list-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.9em}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;background-color:#fafafa}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:8px 10px;font-weight:600;color:#0009;font-size:.85em;text-transform:uppercase;letter-spacing:.3px;border-bottom:2px solid rgba(0,0,0,.08)}.sp-list-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.05)}.sp-list-row[_ngcontent-%COMP%]{cursor:pointer;transition:background-color .15s ease,border-left .15s ease;border-left:3px solid transparent}.sp-list-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 10px;vertical-align:middle}.sp-list-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%]{background-color:#465d9114;border-left:3px solid #465d91}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-weight:500}.sp-col-name[_ngcontent-%COMP%]{word-break:break-word}.sp-col-secondary[_ngcontent-%COMP%]{color:#0009;font-size:.9em;min-width:80px}.sp-col-level[_ngcontent-%COMP%]{width:40px;text-align:center;color:#0009;font-weight:500}.sp-col-link[_ngcontent-%COMP%]{width:60px;text-align:center;padding-right:6px!important;white-space:nowrap}.sp-link-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#465d91;opacity:.7}.sp-drilldown-icon[_ngcontent-%COMP%], .sp-edit-icon[_ngcontent-%COMP%]{cursor:pointer;border-radius:4px;transition:background-color .15s ease,opacity .15s ease;opacity:.5}.sp-drilldown-icon[_ngcontent-%COMP%]:hover, .sp-edit-icon[_ngcontent-%COMP%]:hover{opacity:1;background-color:#465d911f}.level-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;font-size:.75em;font-weight:700;color:#fff;flex-shrink:0}.level-badge.level-1[_ngcontent-%COMP%]{background-color:#465d91}.level-badge.level-2[_ngcontent-%COMP%]{background-color:#465d91b3}.level-badge.level-3[_ngcontent-%COMP%]{background-color:#465d9180}.level-badge.level-4[_ngcontent-%COMP%], .level-badge.level-5[_ngcontent-%COMP%], .level-badge.level-6[_ngcontent-%COMP%]{background-color:#465d9159} .cap-tree{background:transparent} .cap-tree mat-tree-node, .cap-tree mat-nested-tree-node{min-height:unset!important} .cap-tree .mat-tree-node{min-height:unset!important;padding-left:0!important}.cap-tree-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:6px;padding:6px 10px 6px 0;cursor:pointer;border-left:3px solid transparent;border-bottom:1px solid rgba(0,0,0,.04);transition:background-color .15s ease,border-left .15s ease}.cap-tree-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.cap-tree-row.cap-tree-row-selected[_ngcontent-%COMP%]{background-color:#465d9114;border-left:3px solid #465d91}.cap-tree-row.cap-tree-row-selected[_ngcontent-%COMP%] .cap-name[_ng
540content-%COMP%]{font-weight:600}.cap-tree-toggle[_ngcontent-%COMP%]{width:32px!important;height:32px!important;line-height:32px!important;flex-shrink:0}.cap-tree-toggle-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:#00000073!important}.cap-tree-toggle-spacer[_ngcontent-%COMP%]{display:inline-block;width:32px;flex-shrink:0}.cap-child-icon[_ngcontent-%COMP%]{font-size:14px!important;width:14px!important;height:14px!important;color:#0000004d!important;flex-shrink:0}.cap-tree-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:baseline;gap:8px;flex:1;min-width:0;overflow:hidden}.cap-name[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cap-name-strong[_ngcontent-%COMP%]{font-weight:600}.cap-tree-children[_ngcontent-%COMP%]{padding-left:20px;border-left:1px dashed rgba(0,0,0,.12);margin-left:22px}.cap-tree-hidden[_ngcontent-%COMP%]{display:none}.detail-section[_ngcontent-%COMP%]{padding:10px 0;border-bottom:1px solid rgba(0,0,0,.08)}.detail-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.detail-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding:4px 0;font-size:.9em}.detail-row-block[_ngcontent-%COMP%]{flex-direction:column;gap:6px;margin-top:8px}.detail-key[_ngcontent-%COMP%]{font-weight:500;color:#0009;min-width:80px;flex-shrink:0;display:flex;align-items:center;gap:4px}.detail-section-icon[_ngcontent-%COMP%]{font-size:16px!important;width:16px!important;height:16px!important;color:inherit!important;opacity:.7;filter:none!important;text-shadow:none!important}.detail-value[_ngcontent-%COMP%]{color:#000000de;word-break:break-word}.cap-links-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding-left:4px}.cap-link-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:5px 10px 5px 6px;background-color:#465d9112;border:1px solid rgba(70,93,145,.2);border-radius:6px;cursor:pointer;text-decoration:none;color:#000c;font-size:.88em;transition:background-color .15s ease,border-color .15s ease;max-width:100%}.cap-link-chip[_ngcontent-%COMP%]:hover{background-color:#465d9124;border-color:#465d9166;color:#000000e6}.cap-link-name[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.cap-link-icon[_ngcontent-%COMP%]{font-size:13px!important;width:13px!important;height:13px!important;color:#465d91!important;opacity:.6;flex-shrink:0;filter:none!important;text-shadow:none!important}.link-controls[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:12px}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-shrink:0}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit!important;filter:none!important;text-shadow:none!important}.external-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;color:#465d91;font-size:.9em;text-decoration:none;cursor:pointer}.external-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.ext-link-icon[_ngcontent-%COMP%]{font-size:14px!important;width:14px!important;height:14px!important;color:inherit!important;filter:none!important;text-shadow:none!important}.functionality-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}.div-form-element[_ngcontent-%COMP%]{margin:0;width:100%;overflow-x:hidden;padding-bottom:2px}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px;display:block} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter{background-color:transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}"]});};var YC=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="systemComponents";documentRoute="dashboard/component";displayedColumns=["name","editor","description"];displayedColumnsHeaders=["Name","Editor","Description"];whereMapQueryOp=new Map([["==",new Map([["isSubComponent",!1]])]]);ngOnInit(){}clickNewComponent(){this.router.navigate(["/dashboard/component"]);}static ɵfac=function(e){return new(e||n)(le(bd),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-component-list"]],decls:18,vars:7,consts:()=>{let t;t="System Components";let e;return e="New Component",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],["defaultSortField","name","defaultSortOrder","asc",3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute","whereMapQueryOp"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"developer_board"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewComponent();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10),ee(17,"app-object-list",11),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute)("whereMapQueryOp",i.whereMapQueryOp));},dependencies:[$e,Qe,ho,ln,yn,We,Xe],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var zc=class n extends Wa{firestore=re(ai);collectionName="roles";constructor(){super();}createRole(t){return $(this,null,function*(){let e=Ve(X({},t),{createdAt:xo(),updatedAt:xo()}),i=we(this.firestore,this.collectionName);return(yield Ht(i,e)).id;});}getRole(t){return $(this,null,function*(){let e=ge(this.firestore,this.collectionName,t),i=yield yt(e);return i.exists()?X({id:i.id},i.data()):null;});}getRoles(){return new Lo(t=>{let e=we(this.firestore,this.collectionName),i=mt(e,Jt("sortOrder","asc"));return Bn(i,a=>{let r=a.docs.map(l=>X({id:l.id},l.data()));t.next(r);},a=>{console.error("Error getting roles:",a),t.error(a);});});}getRolesOnce(){return $(this,null,function*(){let t=we(this.firestore,this.collectionName),e=mt(t,Jt("sortOrder","asc"));return(yield at(e)).docs.map(o=>X({id:o.id},o.data()));});}updateRole(t,e){return $(this,null,function*(){let i=ge(this.firestore,this.collectionName,t);yield hn(i,Ve(X({},e),{updatedAt:xo()}));});}deleteRole(t){return $(this,null,function*(){let e=ge(this.firestore,this.collectionName,t);yield no(e);});}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};function vW(n,t){n&1&&u(0," New Role ");}function bW(n,t){if(n&1&&u(0),n&2){let e=x();
540_e(" ",e.role.name," ");}}function yW(n,t){n&1&&u(0," Role ");}function PW(n,t){n&1&&(s(0,"div",14),ee(1,"mat-spinner",17),s(2,"span"),u(3,"Loading role..."),c()());}function wW(n,t){if(n&1&&(s(0,"div",15)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function SW(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("name"));}}function MW(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("description"));}}function OW(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("defaultRate"));}}function EW(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("sortOrder"));}}function TW(n,t){n&1&&ee(0,"mat-spinner",29);}function IW(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"save"),c(),s(3,"span"),q(4,4),c(),hi());}function kW(n,t){if(n&1){let e=oe();s(0,"button",31),E("click",function(){k(e);let o=x(2);return R(o.deleteRole());}),s(1,"mat-icon"),u(2,"delete"),c(),s(3,"span"),q(4,5),c()();}}function RW(n,t){if(n&1){let e=oe();s(0,"div",16)(1,"div",18)(2,"form",19),E("ngSubmit",function(){k(e);let o=x();return R(o.saveRole());}),s(3,"div",20)(4,"mat-form-field",21)(5,"mat-label"),q(6,0),c(),ee(7,"input",22),S(8,SW,2,1,"mat-error"),c()(),s(9,"div",20)(10,"mat-form-field",21)(11,"mat-label"),q(12,1),c(),ee(13,"textarea",23),S(14,MW,2,1,"mat-error"),c()(),s(15,"div",24)(16,"div",20)(17,"mat-form-field",21)(18,"mat-label"),q(19,2),c(),ee(20,"input",25),s(21,"mat-hint"),u(22,"Percentage of direct effort allocated to this role"),c(),S(23,OW,2,1,"mat-error"),c()(),s(24,"div",20)(25,"mat-form-field",21)(26,"mat-label"),q(27,3),c(),ee(28,"input",26),s(29,"mat-hint"),u(30,"Display order in tables (lower = first)"),c(),S(31,EW,2,1,"mat-error"),c()()(),s(32,"div",27)(33,"button",28),S(34,TW,1,0,"mat-spinner",29)(35,IW,5,0,"ng-container"),c(),S(36,kW,5,0,"button",30),c()()()();}if(n&2){let e=x();m(2),N("formGroup",e.roleForm),m(6),M(e.isFieldInvalid("name")?8:-1),m(6),M(e.isFieldInvalid("description")?14:-1),m(9),M(e.isFieldInvalid("defaultRate")?23:-1),m(8),M(e.isFieldInvalid("sortOrder")?31:-1),m(2),N("disabled",e.isSaving),m(),M(e.isSaving?34:35),m(2),M(e.isCreationMode?-1:36);}}var P0=class n{auth=re(Il);route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);roleService=re(zc);role=null;isLoading=!0;error=null;roleId=null;isCreationMode=!1;isSaving=!1;roleForm;constructor(){this.roleForm=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:["",[Ye.required]],defaultRate:[0,[Ye.required,Ye.min(0),Ye.max(100)]],sortOrder:[0,[Ye.required,Ye.min(0)]]});}ngOnInit(){this.route.params.subscribe(t=>{this.roleId=t.id,this.roleId?(this.isCreationMode=!1,this.loadRole()):(this.isCreationMode=!0,this.isLoading=!1);});}loadRole(){return $(this,null,function*(){try{if(this.isLoading=!0,this.error=null,!this.roleId){this.error="No role ID provided",this.isLoading=!1;return;}let t=yield this.roleService.getRole(this.roleId);if(!t){this.error="Role not found",this.isLoading=!1;return;}this.role=t,this.roleForm.patchValue({name:t.name,description:t.description,defaultRate:t.defaultRate||0,sortOrder:t.sortOrder||0}),this.isLoading=!1;}catch(t){console.error("Error loading role:",t),this.error=`Failed to load role: ${t}`,this.isLoading=!1;}});}saveRole(){return $(this,null,function*(){if(this.roleForm.invalid){this.roleForm.markAllAsTouched();return;}try{this.isSaving=!0;let t=this.auth.currentUser;if(!t){this.snackBar.open("You must be logged in to save a role","Close",{duration:3e3});return;}let e=this.roleForm.value,i={name:e.name,description:e.description,defaultRate:e.defaultRate,sortOrder:e.sortOrder,userId:t.uid,active:!0};if(this.isCreationMode){let o=yield this.roleService.createRole(i);this.snackBar.open("Role created successfully!","Close",{duration:3e3}),this.router.navigate(["/dashboard/role",o]);}else yield this.roleService.updateRole(this.roleId,i),this.snackBar.open("Role updated successfully!","Close",{duration:3e3}),this.loadRole();}catch(t){console.error("Error saving role:",t),this.snackBar.open("Failed to save role. Please try again.","Close",{duration:3e3});}finally{this.isSaving=!1;}});}deleteRole(){return $(this,null,function*(){if(!(!this.role||!this.roleId)&&confirm(`Are you sure you want to delete "${this.role.name}"?`))try{yield this.roleService.deleteRole(this.roleId),this.snackBar.open("Role deleted successfully!","Close",{duration:3e3}),this.router.navigate(["/dashboard/roles"]);}catch(t){console.error("Error deleting role:",t),this.snackBar.open("Failed to delete role. Please try again.","Close",{duration:3e3});}});}goBack(){this.router.navigate(["/dashboard/roles"]);}getFieldError(t){let e=this.roleForm.get(t);return e?.hasError("required")?`${t} is required`:e?.hasError("minlength")?`Minimum ${e.errors?.minlength?.requiredLength} characters`:e?.hasError("min")?`Value must be at least ${e.errors?.min?.min}`:e?.hasError("max")?`Value must be at most ${e.errors?.max?.max}`:"";}isFieldInvalid(t){let e=this.roleForm.get(t);
540return!!(e?.invalid&&(e?.dirty||e?.touched));}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-role"]],decls:18,vars:6,consts:()=>{let t;t="Role Name";let e;e="Description";let i;i="Default Effort Rate (%)";let o;o="Sort Order";let a;a="Save";let r;return r="Delete",[t,e,i,o,a,r,[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-content"],[1,"div-insight-disabled",2,"padding","40px","text-align","center"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","color","#f44336"],[1,"container-right-panel"],["diameter","40"],[1,"container-tile-body-strong"],[3,"ngSubmit","formGroup"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","name"],["matInput","","formControlName","description","rows","3"],[1,"form-row"],["matInput","","type","number","formControlName","defaultRate"],["matInput","","type","number","formControlName","sortOrder"],[1,"form-actions"],["mat-flat-button","","color","primary","type","submit",3,"disabled"],["diameter","20"],["mat-flat-button","","color","warn","type","button"],["mat-flat-button","","color","warn","type","button",3,"click"]];},template:function(e,i){e&1&&(s(0,"div",6)(1,"div",7)(2,"mat-toolbar",8)(3,"div",9)(4,"div")(5,"mat-icon",10),u(6,"manage_accounts"),c()(),s(7,"div")(8,"div",11),u(9,"Role"),c(),s(10,"div",12),S(11,vW,1,0),S(12,bW,1,1),S(13,yW,1,0),c()()()()(),s(14,"div",13),S(15,PW,4,0,"div",14),S(16,wW,5,1,"div",15),S(17,RW,37,8,"div",16),c()()),e&2&&(m(11),M(i.isCreationMode?11:-1),m(),M(!i.isCreationMode&&i.role?12:-1),m(),M(!i.isCreationMode&&!i.role&&!i.isLoading?13:-1),m(2),M(i.isLoading?15:-1),m(),M(i.error&&!i.isLoading?16:-1),m(),M(!i.isLoading&&!i.error?17:-1));},dependencies:[ut,gn,Nn,Ft,Ea,Tt,Mn,tn,An,Wn,ha,$e,Qe,We,Xe,Fi,zi,Ua,Gt,Vt,Wt,Ki,ti,jt,Xt,$t,ln,yn],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0;overflow:auto}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.spacer[_ngcontent-%COMP%]{flex:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:16px 20px}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px;display:flex;flex-direction:column;align-items:center;gap:12px}.div-form-element[_ngcontent-%COMP%]{margin:0;width:100%;overflow-x:hidden;padding-bottom:2px}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.form-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-top:16px;align-items:center}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var KC=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="roles";documentRoute="dashboard/role";displayedColumns=["creationDate","name","description"];displayedColumnsHeaders=["Date","Name","Description"];
540ngOnInit(){}clickNewRole(){this.router.navigate(["/dashboard/role"]);}static ɵfac=function(e){return new(e||n)(le(zc),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-role-list"]],decls:18,vars:6,consts:()=>{let t;t="Roles";let e;return e="New Role",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"badge"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewRole();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10),ee(17,"app-object-list",11),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,ho,ln,yn,We,Xe],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var Fd=class n extends Wa{firestore=re(ai);collectionName="teams";constructor(){super();}createTeam(t){return $(this,null,function*(){let e=Ve(X({},t),{managedComponentIds:t.managedComponentIds||[],roleIds:t.roleIds||[],createdAt:xo(),updatedAt:xo()}),i=we(this.firestore,this.collectionName);return(yield Ht(i,e)).id;});}getTeam(t){return $(this,null,function*(){let e=ge(this.firestore,this.collectionName,t),i=yield yt(e);return i.exists()?X({id:i.id},i.data()):null;});}getTeams(){return new Lo(t=>{let e=we(this.firestore,this.collectionName),i=mt(e,Jt("name","asc"));return Bn(i,a=>{let r=a.docs.map(l=>X({id:l.id},l.data()));t.next(r);},a=>{console.error("Error getting teams:",a),t.error(a);});});}getTeamsOnce(){return $(this,null,function*(){let t=we(this.firestore,this.collectionName),e=mt(t,Jt("name","asc"));return(yield at(e)).docs.map(o=>X({id:o.id},o.data()));});}updateTeam(t,e){return $(this,null,function*(){let i=ge(this.firestore,this.collectionName,t);yield hn(i,Ve(X({},e),{updatedAt:xo()}));});}deleteTeam(t){return $(this,null,function*(){let e=ge(this.firestore,this.collectionName,t);yield no(e);});}findBestTeam(t,e,i){let o=t.filter(a=>a.managedComponentIds?.includes(e)&&a.roleIds?.includes(i));return o.length>0?o[0]:null;}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var KR=(n,t)=>t.id;function NW(n,t){n&1&&u(0," New Team ");}function AW(n,t){if(n&1&&u(0),n&2){let e=x();_e(" ",e.team.name," ");}}function DW(n,t){n&1&&u(0," Team ");}function jW(n,t){n&1&&(s(0,"div",17),ee(1,"mat-spinner",20),s(2,"span"),u(3,"Loading team..."),c()());}function LW(n,t){if(n&1&&(s(0,"div",18)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function zW(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("name"));}}function FW(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("description"));}}function BW(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("annualCapacityDays"));}}function $W(n,t){if(n&1&&(s(0,"mat-option",30),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function VW(n,t){if(n&1&&(s(0,"mat-option",30),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function GW(n,t){n&1&&ee(0,"mat-spinner",34);}function qW(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"save"),c(),s(3,"span"),q(4,7),c(),hi());}function JW(n,t){if(n&1){let e=oe();s(0,"button",36),E("click",function(){k(e);let o=x(2);return R(o.deleteTeam());}),s(1,"mat-icon"),u(2,"delete"),c(),s(3,"span"),q(4,8),c()();}}function HW(n,t){if(n&1){let e=oe();s(0,"div",19)(1,"div",21)(2,"form",22),E("ngSubmit",function(){k(e);let o=x();return R(o.saveTeam());}),s(3,"div",23)(4,"mat-form-field",24)(5,"mat-label"),q(6,0),c(),ee(7,"input",25),S(8,zW,2,1,"mat-error"),c()(),s(9,"div",23)(10,"mat-form-field",24)(11,"mat-label"),q(12,1),c(),ee(13,"textarea",26),S(14,FW,2,1,"mat-error"),c()(),s(15,"div",23)(16,"mat-form-field",24)(17,"mat-label"),q(18,2),c(),ee(19,"input",27),s(20,"mat-hint"),u(21,"Total available man-days per year for this team"),c(),S(22,BW,2,1,"mat-error"),c()(),ee(23,"mat-divider",28),s(24,"h3"),q(25,3),c(),s(26,"div",23)(27,"mat-form-field",24)(28,"mat-label"),q(29,4),c(),s(30,"mat-select",29),be(31,$W,2,2,"mat-option",30,KR),c()()(),s(33,"h3"),q(34,5),c(),s(35,"div",23)(36,"mat-form-field",24)(37,"mat-label"),q(38,6),c(),s(39,"mat-select",31),be(40,VW,2,2,"mat-option",30,KR),c()()(),s(42,"div",32)(43,"button",33),S(44,GW,1,0,"mat-spinner",34)(45,qW,5,0,"ng-container"),c(),S(46,JW,5,0,"button",35),c()()()();}if(n&2){let e=x();m(2),N("formGroup",e.teamForm),m(6),M(e.isFieldInvalid("name")?8:-1),m(6),M(e.isFieldInvalid("description")?14:-1),m(8),M(e.isFieldInvalid("annualCapacityDays")?22:-1),m(9),ye(e.availableComponents),m(9),ye(e.availableRoles),m(3),N("disabled",e.isSaving),m(),M(e.isSaving?44:45),m(2),M(e.isCreationMode?-1:46);}}var w0=class n{auth=re(Il);route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);teamService=re(Fd);componentService=re(bd);roleService=re(zc);team=null;isLoading=!0;error=null;teamId=null;isCreationMode=!1;
540isSaving=!1;availableComponents=[];availableRoles=[];teamForm;subscriptions=[];constructor(){this.teamForm=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:["",[Ye.required]],annualCapacityDays:[220,[Ye.required,Ye.min(0)]],managedComponentIds:[[]],roleIds:[[]]});}ngOnInit(){this.subscriptions.push(this.componentService.getAllSystemComponents().subscribe(t=>{this.availableComponents=t;})),this.subscriptions.push(this.roleService.getRoles().subscribe(t=>{this.availableRoles=t;})),this.route.params.subscribe(t=>{this.teamId=t.id,this.teamId?(this.isCreationMode=!1,this.loadTeam()):(this.isCreationMode=!0,this.isLoading=!1);});}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe());}loadTeam(){return $(this,null,function*(){try{if(this.isLoading=!0,this.error=null,!this.teamId){this.error="No team ID provided",this.isLoading=!1;return;}let t=yield this.teamService.getTeam(this.teamId);if(!t){this.error="Team not found",this.isLoading=!1;return;}this.team=t,this.teamForm.patchValue({name:t.name,description:t.description,annualCapacityDays:t.annualCapacityDays||220,managedComponentIds:t.managedComponentIds||[],roleIds:t.roleIds||[]}),this.isLoading=!1;}catch(t){console.error("Error loading team:",t),this.error=`Failed to load team: ${t}`,this.isLoading=!1;}});}saveTeam(){return $(this,null,function*(){if(this.teamForm.invali
540d){this.teamForm.markAllAsTouched();return;}try{this.isSaving=!0;let t=this.auth.currentUser;if(!t){this.snackBar.open("You must be logged in to save a team","Close",{duration:3e3});return;}let e=this.teamForm.value,i={name:e.name,description:e.description,annualCapacityDays:e.annualCapacityDays,managedComponentIds:e.managedComponentIds||[],roleIds:e.roleIds||[],userId:t.uid,active:!0};if(this.isCreationMode){let o=yield this.teamService.createTeam(i);this.snackBar.open("Team created successfully!","Close",{duration:3e3}),this.router.navigate(["/dashboard/team",o]);}else yield this.teamService.updateTeam(this.teamId,i),this.snackBar.open("Team updated successfully!","Close",{duration:3e3}),this.loadTeam();}catch(t){console.error("Error saving team:",t),this.snackBar.open("Failed to save team. Please try again.","Close",{duration:3e3});}finally{this.isSaving=!1;}});}deleteTeam(){return $(this,null,function*(){if(!(!this.team||!this.teamId)&&confirm(`Are you sure you want to delete "${this.team.name}"?`))try{yield this.teamService.deleteTeam(this.teamId),this.snackBar.open("Team deleted successfully!","Close",{duration:3e3}),this.router.navigate(["/dashboard/teams"]);}catch(t){console.error("Error deleting team:",t),this.snackBar.open("Failed to delete team. Please try again.","Close",{duration:3e3});}});}goBack(){this.router.navigate(["/dashboard/teams"]);}getComponentName(t){return this.availableComponents.find(e=>e.id===t)?.name||t;}getRoleName(t){return this.availableRoles.find(e=>e.id===t)?.name||t;}getFieldError(t){let e=this.teamForm.get(t);return e?.hasError("required")?`${t} is required`:e?.hasError("minlength")?`Minimum ${e.errors?.minlength?.requiredLength} characters`:e?.hasError("min")?`Value must be at least ${e.errors?.min?.min}`:"";}isFieldInvalid(t){let e=this.teamForm.get(t);return!!(e?.invalid&&(e?.dirty||e?.touched));}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-team"]],decls:18,vars:6,consts:()=>{let t;t="Team Name";let e;e="Description";let i;i="Annual Capacity (days)";let o;o="Managed Components";let a;a="Components this team manages";let r;r="Team Roles";let l;l="Roles available in this team";let p;p="Save";let d;return d="Delete",[t,e,i,o,a,r,l,p,d,[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-content"],[1,"div-insight-disabled",2,"padding","40px","text-align","center"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","color","#f44336"],[1,"container-right-panel"],["diameter","40"],[1,"container-tile-body-strong"],[3,"ngSubmit","formGroup"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","name"],["matInput","","formControlName","description","rows","3"],["matInput","","type","number","formControlName","annualCapacityDays"],[1,"section-divider"],["formControlName","managedComponentIds","multiple",""],[3,"value"],["formControlName","roleIds","multiple",""],[1,"form-actions"],["mat-flat-button","","color","primary","type","submit",3,"disabled"],["diameter","20"],["mat-flat-button","","color","warn","type","button"],["mat-flat-button","","color","warn","type","button",3,"click"]];},template:function(e,i){e&1&&(s(0,"div",9)(1,"div",10)(2,"mat-toolbar",11)(3,"div",12)(4,"div")(5,"mat-icon",13),u(6,"groups"),c()(),s(7,"div")(8,"div",14),u(9,"Team"),c(),s(10,"div",15),S(11,NW,1,0),S(12,AW,1,1),S(13,DW,1,0),c()()()()(),s(14,"div",16),S(15,jW,4,0,"div",17),S(16,LW,5,1,"div",18),S(17,HW,47,7,"div",19),c()()),e&2&&(m(11),M(i.isCreationMode?11:-1),m(),M(!i.isCreationMode&&i.team?12:-1),m(),M(!i.isCreationMode&&!i.team&&!i.isLoading?13:-1),m(2),M(i.isLoading?15:-1),m(),M(i.error&&!i.isLoading?16:-1),m(),M(!i.isLoading&&!i.error?17:-1));},dependencies:[ut,gn,Nn,Ft,Ea,Tt,Mn,tn,An,Wn,ha,$e,Qe,We,Xe,Fi,zi,Ua,Ml,Gt,Vt,Wt,Ki,ti,jt,Xt,bi,So,Ei,yi,$t,ln,yn],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0;overflow:auto}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.spacer[_ngcontent-%COMP%]{flex:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:16px 20px}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px;display:flex;flex-direction:column;align-items:center;gap:12px}.div-form-element[_ngcontent-%COMP%]{margin:0;width:100%;overflow-x:hidden;padding-bottom:2px}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.section-divider[_ngcontent-%COMP%]{margin:20px 0 16px}h3[_ngcontent-%COMP%]{font-size:1rem;font-weight:500;margin:0 0 4px;color:#444}.form-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-top:16px;align-items:center}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var ZC=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="teams";documentRoute="dashboard/team";displayedColumns=["creationDate","name","description"];displayedColumnsHeaders=["Date","Name","Description"];
540ngOnInit(){}clickNewTeam(){this.router.navigate(["/dashboard/team"]);}static ɵfac=function(e){return new(e||n)(le(Fd),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-team-list"]],decls:18,vars:6,consts:()=>{let t;t="Teams";let e;return e="New Team",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"groups"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewTeam();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10),ee(17,"app-object-list",11),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,ho,ln,yn,We,Xe],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var QC=class n extends Wa{constructor(){super();}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};function WW(n,t){if(n&1&&(s(0,"mat-chip")(1,"mat-icon",11),u(2,"folder"),c(),u(3),c()),n&2){let e=t.$implicit;m(3),_e(" ",e.documentCount??0," ");}}var ev=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="contexts";documentRoute="dashboard/context";displayedColumns=["creationDate","name","description","documentCount"];displayedColumnsHeaders=["Date","Name","Description","Documents"];clickNewContext(){this.router.navigate(["/dashboard/context"]);}static ɵfac=function(e){return new(e||n)(le(QC),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-context-list"]],decls:18,vars:6,consts:[[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"],["appColumnTemplate","documentCount"],["matChipAvatar",""]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-toolbar",2)(3,"div",3)(4,"div")(5,"mat-icon",4),u(6,"add_circle"),c()(),s(7,"div")(8,"div",5),u(9,"Context Manager"),c()()(),s(10,"div",6)(11,"button",7),E("click",function(){return i.clickNewContext();}),s(12,"mat-icon"),u(13,"add"),c(),u(14," New Context "),c()()()(),s(15,"div",8)(16,"app-object-list",9),Zt(17,WW,4,1,"ng-template",10),c()()()),e&2&&(m(16),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,We,Xe,ln,yn,yi,Ta,Cd,ho,Od],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background:#fff;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-radius:10px 10px 0 0}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background:#fff;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};function XW(n,t){if(n&1&&(s(0,"mat-chip-set",11)(1,"mat-chip"),u(2),c()()),n&2){let e=x();m(2),G(e.formatDate(e.editingContext.creationDate));}}function YW(n,t){n&1&&(s(0,"div",13),ee(1,"mat-spinner"),s(2,"p"),u(3,"Loading context..."),c()());}function KW(n,t){n&1&&(s(0,"mat-error"),u(1,"Name is required"),
540c());}function ZW(n,t){n&1&&(s(0,"mat-error"),u(1,"Name must be at least 3 characters"),c());}function QW(n,t){n&1&&(s(0,"mat-error"),u(1,"Description is required"),c());}function eX(n,t){n&1&&(s(0,"mat-error"),u(1,"Description must be at least 10 characters"),c());}function tX(n,t){if(n&1&&(s(0,"span",24),u(1),c()),n&2){let e=x(2);m(),_e("",e.selectedFiles.length," file(s) selected");}}function nX(n,t){if(n&1){let e=oe();s(0,"mat-list-item")(1,"mat-icon",30),u(2,"insert_drive_file"),c(),s(3,"div",31),u(4),c(),s(5,"div",32),u(6),c(),s(7,"button",33),E("click",function(){let o=k(e).$index,a=x(3);return R(a.removeSelectedFile(o));}),s(8,"mat-icon"),u(9,"close"),c()()();}if(n&2){let e=t.$implicit,i=x(3);m(4),G(e.name),m(2),G(i.formatFileSize(e.size));}}function iX(n,t){if(n&1&&(s(0,"mat-list",25),be(1,nX,10,2,"mat-list-item",null,Pt),c()),n&2){let e=x(2);m(),ye(e.selectedFiles);}}function oX(n,t){if(n&1){let e=oe();s(0,"mat-list-item")(1,"mat-icon",30),u(2,"description"),c(),s(3,"div",31),u(4),c(),s(5,"div",32),u(6),c(),s(7,"button",34),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.downloadDocument(o));}),s(8,"mat-icon"),u(9,"download"),c()(),s(10,"button",35),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.deleteDocument(o));}),s(11,"mat-icon",36),u(12,"delete"),c()()();}if(n&2){let e=t.$implicit,i=x(3);m(4),G(e.name),m(2),Hn("",i.formatFileSize(e.size)," \u2014 ",i.formatDate(e.uploadDate));}}function aX(n,t){if(n&1&&(s(0,"div",26)(1,"h4"),u(2,"Existing Documents"),c(),s(3,"mat-list"),be(4,oX,13,3,"mat-list-item",null,Pt),c()()),n&2){let e=x(2);m(4),ye(e.editingContext.documents);}}function rX(n,t){n&1&&(ee(0,"mat-spinner",37),s(1,"span"),u(2,"Uploading..."),c());}function sX(n,t){if(n&1&&(s(0,"span"),u(1),c()),n&2){let e=x(2);m(),G(e.contextId?"Update":"Create");}}function lX(n,t){if(n&1){let e=oe();s(0,"div",14)(1,"div",15)(2,"form",16),E("ngSubmit",function(){k(e);let o=x();return R(o.saveContext());}),s(3,"mat-form-field",17)(4,"mat-label"),u(5,"Name"),c(),ee(6,"input",18),S(7,KW,2,0,"mat-error"),S(8,ZW,2,0,"mat-error"),c(),s(9,"mat-form-field",17)(10,"mat-label"),u(11,"Description"),c(),ee(12,"textarea",19),S(13,QW,2,0,"mat-error"),S(14,eX,2,0,"mat-error"),c(),s(15,"div",20)(16,"h3"),u(17,"Documents"),c(),s(18,"div",21)(19,"input",22,0),E("change",function(o){k(e);let a=x();return R(a.onFilesSelected(o));}),c(),s(21,"button",23),E("click",function(){k(e);let o=bn(20);return R(o.click());}),s(22,"mat-icon"),u(23,"attach_file"),c(),u(24," Select Files "),c(),S(25,tX,2,1,"span",24),c(),S(26,iX,3,0,"mat-list",25),S(27,aX,6,0,"div",26),c(),s(28,"div",27)(29,"button",28),S(30,rX,3,0)(31,sX,2,1,"span"),c(),s(32,"button",29),E("click",function(){k(e);let o=x();return R(o.cancel());}),u(33,"Cancel"),c()()()()();}if(n&2){let e,i,o,a,r=x();m(2),N("formGroup",r.contextForm),m(5),M((e=r.contextForm.get("name"))!=null&&e.hasError("required")?7:-1),m(),M((i=r.contextForm.get("name"))!=null&&i.hasError("minlength")?8:-1),m(5),M((o=r.contextForm.get("description"))!=null&&o.hasError("required")?13:-1),m(),M((a=r.contextForm.get("description"))!=null&&a.hasError("minlength")?14:-1),m(11),M(r.selectedFiles.length>0?25:-1),m(),M(r.selectedFiles.length>0?26:-1),m(),M(r.editingContext&&r.editingContext.documents&&r.editingContext.documents.length>0?27:-1),m(2),N("disabled",!r.contextForm.valid||r.uploadingFiles),m(),M(r.uploadingFiles?30:31);}}var S0=class n{fb=re(wo);router=re(Et);route=re(vi);snackBar=re(Bt);firestore=re(ai);storage=re(U1);contextForm;selectedFiles=[];uploadingFiles=!1;isLoading=!1;editingContext=null;contextId=null;constructor(){this.contextForm=this.fb.group({name:["",[Ye.required,Ye.minLength(3)]],description:["",[Ye.required,Ye.minLength(10)]]});}ngOnInit(){this.route.paramMap.subscribe(t=>{this.contextId=t.get("id"),this.contextId&&this.loadContext(this.contextId);});}loadContext(t){return $(this,null,function*(){this.isLoading=!0;try{let e=ge(this.firestore,"contexts",t),i=yield yt(e);if(i.exists()){let o=i.data();this.editingContext={id:i.id,name:o.name,description:o.description,creationDate:o.creationDate?.toDate()||new Date(),documents:yield this.loadContextDocuments(t)},this.contextForm.patchValue({name:this.editingContext.name,description:this.editingContext.description});}else this.snackBar.open("Context not found","Close",{duration:5e3}),this.router.navigate(["/dashboard/contexts"]);}catch(e){console.error("Error loading context:",e),this.snackBar.open("Error loading context","Close",{duration:5e3});}finally{this.isLoading=!1;}});}loadContextDocuments(t){return $(this,null,function*(){try{let e=we(this.firestore,"contexts",t,"documents");return(yield at(e)).docs.map(o=>{let a=o.data();return{id:o.id,name:a.name,path:a.path,size:a.size,uploadDate:a.uploadDate?.toDate?a.uploadDate.toDate():new Date(a.uploadDate)};});}catch(e){return console.error("Error loading context documents:",e),[];}});}saveContext(){return $(this,null,function*(){if(this.contextForm.valid){let t=this.contextForm.value;try{if(this.contextId&&this.editingContext){let e=ge(this.firestore,"contexts",this.contextId);yield hn(e,{name:t.name,description:t.description}),this.selectedFiles.length>0&&(yield this.uploadFiles(this.contextId)),this.snackBar.open("Context updated successfully","Close",{duration:3e3});}else{let e=we(this.firestore,"contexts"),i=yield Ht(e,{name:t.name,description:t.description,creationDate:Rn.now(),documentCount:0});this.selectedFiles.length>0&&(yield this.uploadFiles(i.id)),this.snackBar.open("Context created successfully","Close",{duration:3e3});}this.router.navigate(["/dashboard/contexts"]);}catch(e){console.error("Error saving context:",e),this.snackBar.open("Error saving context","Close",{duration:5e3});}}});}uploadFiles(t){return $(this,null,function*(){this.uploadingFiles=!0;try{let e=we(this.firestore,"contexts",t,"documents");for(let o of this.selectedFiles){let a=`contexts/${t}/${o.name}`,r=y1(this.storage,a);yield g3(r,o),yield Ht(e,{name:o.name,path:a,size:o.size,uploadDate:Rn.now()});}let i=ge(this.firestore,"contexts",t);yield hn(i,{documentCount:Gw(this.selectedFiles.length)}),this.snackBar.open("Files uploaded successfully","Close",{duration:3e3});}catch(e){console.error("Error uploading files:",e),this.snackBar.open("Error uploading files","Close",{duration:5e3});}finally{this.uploadingFiles=!1;}});}onFilesSelected(t){let e=t.target.files;e&&(this.selectedFiles=Array.from(e));}removeSelectedFile(t){this.selectedFiles.splice(t,1);}deleteDocument(t){return $(this,null,function*(){try{let e=y1(this.storage,t.path);if(yield C3(e),this.contextId&&t.id){let i=ge(this.firestore,"contexts",this.contextId,"documents",t.id);yield no(i);}if(this.contextId){let i=ge(this.firestore,"contexts",this.contextId);yield hn(i,{documentCount:Gw(-1)});}this.snackBar.open("Document deleted successfully","Close",{duration:2e3}),this.editingContext?.documents&&(this.editingContext.documents=this.editingContext.documents.filter(i=>i.id!==t.id));}catch(e){console.error("Error deleting document:",e),this.snackBar.open("Error deleting document","Close",{duration:5e3});}});}downloadDocument(t){return $(this,null,function*(){try{if(!t.downloadURL){let e=y1(this.storage,t.path);t.downloadURL=yield x3(e);}window.open(t.downloadURL,"_blank");}catch(e){console.error("Error fetching download URL:",e),this.snackBar.open("Error downloading document","Close",{duration:5e3});}});}cancel(){this.router.navigate(["/dashboard/contexts"]);}formatFileSize(t){if(t===0)return"0 Bytes";let e=1024,i=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(e));return Math.round(t/Math.pow(e,o)*100)/100+" "+i[o];}formatDate(t){return t.toLocaleDateString()+" "+t.toLocaleTimeString();}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-context"]],decls:20,vars:4,consts:[["fileInput",""],[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],["mat-icon-button","","matTooltip","Back to Contexts",3,"click"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"subtitle"],[1,"spacer"],[1,"div-button-right"],[1,"creation-date-chips"],[1,"div-content"],[1,"loading-container"],[1,"container-right-panel"],[1,"container-tile-body-strong"],[3,"ngSubmit","formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","Enter context name"],["matInput","","formControlName","description","rows","4","placeholder","Enter context description"],[1,"file-upload-section"],[1,"upload-area"],["type","file","multiple","","hidden","",3,"change"],["mat-stroked-button","","type","button",3,"click"],[1,"file-count"],[1,"selected-files-list"],[1,"existing-documents"],[1,"form-actions"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-button","","type","button",3,"click"],["matListItemIcon",""],["matListItemTitle",""],["matListItemLine",""],["mat-icon-button","","matListItemMeta","","type","button",3,"click"],["mat-icon-button","","matListItemMeta","","type","button","matTooltip","Download",3,"click"],["mat-icon-button","","matListItemMeta","","type","button","matTooltip","Delete",3,"click"],["color","warn"],["diameter","20"]],template:function(e,i){if(e&1&&(s(0,"div",1)(1,"div",2)(2,"mat-toolbar",3)(3,"div",4)(4,"button",5),E("click",function(){return i.cancel();}),s(5,"mat-icon"),u(6,"arrow_back"),c()(),s(7,"mat-icon",6),u(8,"add_circle"),c(),s(9,"div")(10,"div",7),u(11,"Context"),c(),s(12,"div",8),u(13),c()()(),ee(14,"span",9),s(15,"div",10),S(16,
540XW,3,1,"mat-chip-set",11),c()()(),s(17,"div",12),S(18,YW,4,0,"div",13),S(19,lX,34,10,"div",14),c()()),e&2){let o;m(13),G((i.editingContext==null?null:i.editingContext.name)||((o=i.contextForm.get("name"))==null?null:o.value)||"New Context"),m(3),M(i.editingContext!=null&&i.editingContext.creationDate?16:-1),m(2),M(i.isLoading?18:-1),m(),M(i.isLoading?-1:19);}},dependencies:[tn,Nn,Ft,Tt,Mn,An,Wn,$e,Qe,Qt,ha,Gt,Vt,Wt,ti,jt,Xt,We,Xe,js,Fi,zi,es,E1,T1,fd,O1,M1,F3,ln,yn,yi,Ta,Ls,$t,_n],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
540.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0;overflow:auto}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:16px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.spacer[_ngcontent-%COMP%]{flex:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;width:100%;overflow:hidden}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:56px;max-height:56px;flex-shrink:0;gap:10px}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-body-strong[_ngcontent-%COMP%]{padding:20px;overflow:auto}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px;gap:20px}.loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#0009;font-size:1rem}.full-width[_ngcontent-%COMP%]{width:100%;margin-bottom:16px}.file-upload-section[_ngcontent-%COMP%]{margin:24px 0;padding:16px;background-color:#f5f5f5;border-radius:8px}.file-upload-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:16px;font-size:1rem;font-weight:500;color:#444}.file-upload-section[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:16px 0 8px;font-size:.95rem;font-weight:500}.file-upload-section[_ngcontent-%COMP%] .upload-area[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;margin-bottom:16px}.file-upload-section[_ngcontent-%COMP%] .upload-area[_ngcontent-%COMP%] .file-count[_ngcontent-%COMP%]{color:#0009;font-size:.9rem}.file-upload-section[_ngcontent-%COMP%] .selected-files-list[_ngcontent-%COMP%], .file-upload-section[_ngcontent-%COMP%] .existing-documents[_ngcontent-%COMP%] mat-list[_ngcontent-%COMP%]{background-color:#fff;border-radius:4px;margin-top:12px}.file-upload-section[_ngcontent-%COMP%] .selected-files-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%], .file-upload-section[_ngcontent-%COMP%] .existing-documents[_ngcontent-%COMP%] mat-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%]{border-bottom:1px solid #e0e0e0}.file-upload-section[_ngcontent-%COMP%] .selected-files-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%]:last-child, .file-upload-section[_ngcontent-%COMP%] .existing-documents[_ngcontent-%COMP%] mat-list[_ngcontent-%COMP%] mat-list-item[_ngcontent-%COMP%]:last-child{border-bottom:none}.file-upload-section[_ngcontent-%COMP%] .existing-documents[_ngcontent-%COMP%]{margin-top:24px;padding-top:16px;border-top:1px solid #ddd}.form-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-top:24px;align-items:center;justify-content:flex-end}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:100px}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{display:inline-block;margin-right:8px}.creation-date-chips[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{font-size:.8rem;height:24px}.div-button-right[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var tv=class n{constructor(t){this.dialogRef=t;}dialogRef;ngOnInit(){}closeDialog(){this.dialogRef.close();}static ɵfac=function(e){return new(e||n)(le(Li));};static ɵcmp=Te({type:n,selectors:[["app-chat-modal"]],decls:9,vars:0,consts:[[1,"chat-modal-container"],[1,"chat-modal-header"],["mat-dialog-title",""],["mat-icon-button","",1,"close-button",3,"click"],["mat-dialog-content","",1,"chat-modal-content"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"h2",2),u(3,"Chat with Architect"),c(),s(4,"button",3),E("click",function(){return i.closeDialog();}),s(5,"mat-icon"),u(6,"close"),c()()(),s(7,"div",4),ee(8,"app-ask-architect"),c()());},dependencies:[$e,Qt,jt,zs,We,Xe],styles:[".chat-modal-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%;max-width:800px;max-height:600px}.chat-modal-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:0 16px;border-bottom:1px solid rgba(0,0,0,.12)}.chat-modal-content[_ngcontent-%COMP%]{flex:1;overflow:hidden;padding:0}.close-button[_ngcontent-%COMP%]{margin-left:auto} .chat-modal-dialog{max-width:800px;width:100%;height:600px} .mat-mdc-dialog-container{padding:0}"]});};var cX=(n,t)=>t.id;function pX(n,t){n&1&&(s(0,"mat-icon"),u(1,"check"),c());}function dX(n,t){if(n&1){let e=oe();s(0,"button",43),E("click",function(){let o=k(e).$implicit,a=x();return R(a.onLanguageChange(o));}),S(1,pX,2,0,"mat-icon"),s(2,"span"),u(3),c()();}if(n&2){let e=t.$implicit,i=x();Ue("selected",i.localeService.getSelectedLocale()===e),m(),M(i.localeService.getSelectedLocale()===e?1:-1),m(2),G(e.name);}}function mX(n,t){n&1&&(s(0,"button",19)(1,"mat-icon"),u(2,"info"),
540c(),s(3,"span"),u(4,"No organisations"),c()());}function uX(n,t){n&1&&(s(0,"mat-icon"),u(1,"check"),c());}function fX(n,t){if(n&1){let e=oe();s(0,"button",43),E("click",function(){let o=k(e).$implicit,a=x();return R(a.onOrgChange(o));}),S(1,uX,2,0,"mat-icon"),s(2,"span"),u(3),c()();}if(n&2){let e=t.$implicit,i=x();Ue("selected",(i.activeOrg==null?null:i.activeOrg.id)===e.id),m(),M((i.activeOrg==null?null:i.activeOrg.id)===e.id?1:-1),m(2),G(e.name);}}var nv=class n{constructor(t,e,i,o,a,r){this.router=t;this.authService=e;this.localeService=i;this.orgContextService=o;this.organisationsService=a;this.dialog=r;}router;authService;localeService;orgContextService;organisationsService;dialog;organisations=[];activeOrg=null;subs=new jo();ngOnInit(){return $(this,null,function*(){this.subs.add(this.orgContextService.activeOrg$.subscribe(t=>this.activeOrg=t));try{this.organisations=yield this.organisationsService.getOrganisations();}catch(t){this.organisations=[];}});}ngOnDestroy(){this.subs.unsubscribe();}onSelectLink(t){this.router.navigate(["dashboard/"+t]);}clickSignOut(){this.orgContextService.clearActiveOrg(),this.authService.logout("/");}openChatModal(){this.dialog.open(tv,{width:"800px",height:"600px",panelClass:"chat-modal-dialog",autoFocus:!1});}onLanguageChange(t){this.localeService.changeLocale(t.code);}onOrgChange(t){this.orgContextService.setActiveOrg(t);}goToOrgSettings(){this.activeOrg&&this.router.navigate(["dashboard/organisation-setup",this.activeOrg.id]);}static ɵfac=function(e){return new(e||n)(le(Et),le(Oo),le(To),le(kl),le(vI),le(Ti));};static ɵcmp=Te({type:n,selectors:[["app-dashboard"]],decls:95,vars:6,consts:()=>{let t;t="Language selector";let e;return e="IT PROJECT ENGINE",[["languageMenu","matMenu"],["orgMenu","matMenu"],["drawer",""],e,[1,"div-container"],["color","primary",1,"mat-toolbar"],["mat-icon-button","","aria-label","Menu","matTooltip","Menu","matTooltipPosition","below",1,"menu-button",3,"click"],[1,"toolbar-logo"],[1,"toolbar-logo-container",2,"cursor","pointer",3,"click"],[1,"div-icon-logo"],["src","assets/cortex_logo.svg",1,"card-content-logo"],[1,"card-solution-container"],[1,"card-solution"],[1,"text-sky"],[1,"card-solution-text"],[1,"toolbar-spacer"],["mat-icon-button","","aria-label",t,"matTooltip","Language","matTooltipPosition","below",1,"language-selector",3,"matMenuTriggerFor"],["mat-menu-item","",3,"selected"],["mat-icon-button","","aria-label","Organisation","matTooltipPosition","below",1,"org-selector",3,"matMenuTriggerFor","matTooltip"],["mat-menu-item","","disabled",""],["mat-icon-button","","aria-label","Organisation settings","matTooltip","Organisation settings","matTooltipPosition","below",1,"org-settings-button",3,"click","disabled"],["mat-icon-button","","aria-label","Sign out","matTooltip","Sign out","matTooltipPosition","below",1,"power-button",3,"click"],["hasBackdrop","false","autosize","",1,"drawer-container"],["mode","side","opened","",1,"drawer-sidenav"],[1,"sidenav-card"],[1,"nav-section"],["mat-icon-button","","matTooltip","Ask",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Portfolios",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Compliances",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Projects",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Contexts",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","References",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Components",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Ecosystems",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Business Capabilities",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Business Process Frameworks",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Evaluation",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Roles",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Teams",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Parameters",1,"nav-btn",3,"click"],["mat-icon-button","","matTooltip","Users",1,"nav-btn",3,"click"],[1,"div-content"],[1,"router-outlet"],["mat-menu-item","",3,"click"]];},template:function(e,i){if(e&1){let o=oe();s(0,"div",4)(1,"mat-toolbar",5)(2,"button",6),E("click",function(){k(o);let r=bn(40);
540return R(r.toggle());}),s(3,"mat-icon"),u(4,"menu"),c()(),s(5,"span",7)(6,"div",8),E("click",function(){return i.router.navigate(["/dashboard/"]);}),s(7,"div",9),ee(8,"img",10),c(),s(9,"div",11)(10,"div",12)(11,"span",13),u(12,"SKY"),c(),u(13,"CORTEX"),c(),s(14,"div",14),q(15,3),c()()()(),ee(16,"span",15),s(17,"button",16)(18,"mat-icon"),u(19,"language"),c()(),s(20,"mat-menu",null,0),be(22,dX,4,4,"button",17,Pt),c(),s(24,"button",18)(25,"mat-icon"),u(26,"corporate_fare"),c()(),s(27,"mat-menu",null,1),S(29,mX,5,0,"button",19),be(30,fX,4,4,"button",17,cX),c(),s(32,"button",20),E("click",function(){return i.goToOrgSettings();}),s(33,"mat-icon"),u(34,"settings"),c()(),s(35,"button",21),E("click",function(){return i.clickSignOut();}),s(36,"mat-icon"),u(37,"power_settings_new"),c()()(),s(38,"mat-drawer-container",22)(39,"mat-drawer",23,2)(41,"div",24)(42,"div",25)(43,"button",26),E("click",function(){return i.onSelectLink("askarchitect");}),s(44,"mat-icon"),u(45,"chat"),c()()(),s(46,"div",25)(47,"button",27),E("click",function(){return i.onSelectLink("portfolios");}),s(48,"mat-icon"),u(49,"folder"),c()(),s(50,"button",28),E("click",function(){return i.onSelectLink("compliances");}),s(51,"mat-icon"),u(52,"assignment_turned_in"),c()()(),s(53,"div",25)(54,"button",29),E("click",function(){return i.onSelectLink("projects");}),s(55,"mat-icon"),u(56,"category"),c()(),s(57,"button",30),E("click",function(){return i.onSelectLink("contexts");}),s(58,"mat-icon"),u(59,"add_circle"),c()(),s(60,"button",31),E("click",function(){return i.onSelectLink("references");}),s(61,"mat-icon"),u(62,"library_books"),c()(),s(63,"button",32),E("click",function(){return i.onSelectLink("components");}),s(64,"mat-icon"),u(65,"widgets"),c()(),s(66,"button",33),E("click",function(){return i.onSelectLink("ecosystems");}),s(67,"mat-icon"),u(68,"account_tree"),c()(),s(69,"button",34),E("click",function(){return i.onSelectLink("business-capability-models");}),s(70,"mat-icon"),u(71,"hub"),c()(),s(72,"button",35),E("click",function(){return i.onSelectLink("business-process-frameworks");}),s(73,"mat-icon"),u(74,"schema"),c()(),s(75,"button",36),E("click",function(){return i.onSelectLink("evaluation-scales");}),s(76,"mat-icon"),u(77,"straighten"),c()()(),s(78,"div",25)(79,"button",37),E("click",function(){return i.onSelectLink("roles");}),s(80,"mat-icon"),u(81,"badge"),c()(),s(82,"button",38),E("click",function(){return i.onSelectLink("teams");}),s(83,"mat-icon"),u(84,"groups"),c()()(),s(85,"div",25)(86,"button",39),E("click",function(){return i.onSelectLink("parameters");}),s(87,"mat-icon"),u(88,"tune"),c()(),s(89,"button",40),E("click",function(){return i.onSelectLink("users");}),s(90,"mat-icon"),u(91,"group"),c()()()()(),s(92,"mat-drawer-content")(93,"div",41),ee(94,"router-outlet",42),c()()()();}if(e&2){let o=bn(21),a=bn(28);m(17),N("matMenuTriggerFor",o),m(5),ye(i.localeService.getSupportedLocales()),m(2),N("matTooltip",lf(i.activeOrg?i.activeOrg.name:"Organisations"))("matMenuTriggerFor",a),m(5),M(i.organisations.length===0?29:-1),m(),ye(i.organisations),m(2),N("disabled",!i.activeOrg);}},dependencies:[$e,Qt,es,B1,sI,lI,rI,pd,m1,We,Xe,ln,yn,hf,N1,R1,A1,$t,_n],styles:['@charset "UTF-8";.mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
540.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}@font-face{font-family:Square721;src:url(https://fonts.cdnfonts.com/css/square-721)}@keyframes _ngcontent-%COMP%_logo-brain{0%,93%{opacity:1;transform:scale(1)}96%{opacity:0;transform:scale(.3)}96.5%{opacity:0;transform:scale(.3)}97%{opacity:1;transform:scale(1)}to{opacity:1;transform:scale(1)}}@keyframes _ngcontent-%COMP%_logo-text{0%,94%{opacity:1}97%{opacity:0}97.3%{opacity:0}
54097.7%{opacity:1}to{opacity:1}}.card-solution-container[_ngcontent-%COMP%]{position:relative;animation:_ngcontent-%COMP%_logo-text 300s ease-in-out infinite}.card-solution[_ngcontent-%COMP%]{color:#fff;position:relative;text-align:center;font-family:Square721,Eurostile,sans-serif;font-weight:700;font-size:32px;letter-spacing:1px}.card-solution-text[_ngcontent-%COMP%]{color:#fff;position:relative;text-align:center;letter-spacing:3px;font-size:17px;font-weight:400}.text-sky[_ngcontent-%COMP%]{color:#91f5ad}.div-sky-logo[_ngcontent-%COMP%]{transform:scale(.5);position:relative;display:flex;justify-content:center;align-items:center;max-height:200px;top:10px}.toolbar-icon[_ngcontent-%COMP%]{height:30px!important;width:30px!important;font-size:30px!important}.toolbar-spacer[_ngcontent-%COMP%]{width:100%}.toolbar-logo-container[_ngcontent-%COMP%]{width:400px;height:65px;max-height:65px;overflow:hidden;display:flex;align-items:center;justify-content:center}.toolbar-logo-text[_ngcontent-%COMP%]{padding-top:10px;color:#fff;font-size:10px;line-height:1}.card-sky-logo[_ngcontent-%COMP%]{filter:invert(95%) sepia(13%) saturate(759%) hue-rotate(183deg) brightness(102%) contrast(97%);height:300px;overflow:hidden}.div-icon-logo[_ngcontent-%COMP%]{height:50px;overflow:hidden;display:flex;align-items:center}.div-icon-logo[_ngcontent-%COMP%] .card-content-logo[_ngcontent-%COMP%]{height:75px;margin-top:0}.card-content-logo[_ngcontent-%COMP%]{filter:invert(80%) sepia(60%) saturate(279%) hue-rotate(76deg) brightness(101%) contrast(92%);height:150px;overflow:hidden;margin-top:-10px;animation:_ngcontent-%COMP%_logo-brain 300s ease-in-out infinite;transform-origin:center center}.mat-toolbar[_ngcontent-%COMP%]{height:65px;max-height:65px;background-color:#000028}.div-content[_ngcontent-%COMP%]{height:calc(100vh - 85px);max-height:calc(100vh - 85px)}.drawer-container[_ngcontent-%COMP%]{min-width:80px;background:transparent!important;--mat-sidenav-container-background-color: transparent;--mat-sidenav-content-background-color: transparent} .mat-drawer-content, .mat-drawer-inner-container{background:transparent!important}.drawer-sidenav[_ngcontent-%COMP%]{background:#000028!important;box-shadow:none!important;border-right:none!important;width:72px!important;overflow:visible!important}.sidenav-card[_ngcontent-%COMP%]{background:#000028;border-radius:16px;margin:12px 0 12px 12px;height:calc(100% - 24px);overflow:hidden;box-shadow:0 8px 32px #00000073,0 2px 8px #0000004d;display:flex;flex-direction:column;align-items:center;padding:8px 0}.nav-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;width:calc(100% - 12px);padding:4px 0;background:#ffffff26;border-radius:20px;margin:20px 6px}.nav-btn[_ngcontent-%COMP%]{width:48px!important;height:48px!important;border-radius:12px!important;margin:2px 0;flex-shrink:0;transition:background .18s ease;color:#fff!important;--mat-icon-button-ripple-color: rgba(255, 255, 255, .15);--mat-icon-button-hover-state-layer-color: rgba(255, 255, 255, .1);--mat-icon-button-pressed-state-layer-color: rgba(255, 255, 255, .2)}.nav-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:28px!important;width:28px!important;height:28px!important;line-height:28px!important;color:#fff!important}.mat-toolbar-dashboard[_ngcontent-%COMP%]{background-color:#fff}.dirigeable[_ngcontent-%COMP%]{transform:scale(.5) rotate(-10deg)}.div-container[_ngcontent-%COMP%]{box-sizing:border-box;padding-top:20px;background:linear-gradient(to right,#000028 0px 96px,#000028d9 180px,#00002866 320px,#00002800 480px),linear-gradient(to top,#d8e8f8,#a8c8e8,#6ea4d4,#3a6aaa 54%,#102060 70%,#000028 86% 100%);height:100vh}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}.chat-fab[_ngcontent-%COMP%]{position:fixed;bottom:20px;right:20px;z-index:1000}.menu-button[_ngcontent-%COMP%]{margin-left:2px;margin-right:0;width:48px!important;height:48px!important;border-radius:12px!important;color:#fff!important;--mat-icon-button-ripple-color: rgba(255, 255, 255, .15);--mat-icon-button-hover-state-layer-color: rgba(255, 255, 255, .1);--mat-icon-button-pressed-state-layer-color: rgba(255, 255, 255, .2)}.menu-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:28px!important;width:28px!important;height:28px!important;line-height:28px!important;color:#fff!important}.language-selector[_ngcontent-%COMP%]{margin-right:16px;color:#fff!important}.language-selector[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .power-button[_ngcontent-%COMP%], .power-button[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff!important}.org-selector[_ngcontent-%COMP%]{margin-right:4px;color:#fff!important}.org-selector[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff!important}.org-settings-button[_ngcontent-%COMP%]{margin-right:16px;color:#fff!important}.org-settings-button[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff!important}.org-settings-button[disabled][_ngcontent-%COMP%]{opacity:.4}.mat-mdc-menu-panel[_ngcontent-%COMP%] .mat-mdc-menu-item.selected[_ngcontent-%COMP%]{background-color:#465d91!important;color:#fff!important}.mat-mdc-menu-panel[_ngcontent-%COMP%] .mat-mdc-menu-item.selected[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff!important}.mat-mdc-menu-panel[_ngcontent-%COMP%] .mat-mdc-menu-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.mat-mdc-menu-panel[_ngcontent-%COMP%] .mat-mdc-menu-item[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#465d91}']});};function M0(n){return(n??"").replace(/<[^>]+>/g,"").replace(/ /g," ").replace(/\s{2,}/g," ").trim();}function hX(n,t){n&1&&(s(0,"div",2),ee(1,"mat-spinner",10),s(2,"p"),u(3,"Loading available projects..."),c()());}function _X(n,t){if(n&1&&(s(0,"div",3)(1,"mat-icon",11),u(2,"error"),c(),s(3,"p"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function gX(n,t){n&1&&(s(0,"div",4)(1,"mat-icon"),u(2,"work_off"),c(),s(3,"h3"),u(4,"No Available Projects"),c(),s(5,"p"),u(6,"All your projects are already in this portfolio, or you don't have any projects yet."),c()());}function xX(n,t){if(n&1){let e=oe();s(0,"mat-list-option",16),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.toggleProjectSelection(o.id));}),s(1,"div",17)(2,"div",18)(3,"mat-icon",19),u(4,"assignment"),c(),s(5,"h4",20),u(6),c()()()();}if(n&2){let e=t.$implicit,i=x(2);N("value",e.id)("selected",i.isProjectSelected(e.id)),m(6),G(e.name);}}function CX(n,t){if(n&1&&(s(0,"div",15)(1,"mat-icon"),u(2,"info"),
540c(),s(3,"span"),u(4),c()()),n&2){let e=x(2);m(4),Hn("",e.selectedProjectIds.size," project",e.selectedProjectIds.size!==1?"s":""," selected");}}function vX(n,t){if(n&1&&(s(0,"div",5)(1,"p",12),u(2),c(),s(3,"mat-selection-list",13),be(4,xX,7,3,"mat-list-option",14,Pt),c(),S(6,CX,5,2,"div",15),c()),n&2){let e=x();m(2),_e(' Select the projects you want to add to "',e.data.portfolio.name,'": '),m(2),ye(e.availableProjects),m(2),M(e.selectedProjectIds.size>0?6:-1);}}function bX(n,t){n&1&&ee(0,"mat-spinner",9);}function yX(n,t){n&1&&(s(0,"mat-icon"),u(1,"add"),c());}var iv=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;firestore=re(ai);snackBar=re(Bt);availableProjects=[];selectedProjectIds=new Set();isLoading=!0;isSaving=!1;error=null;ngOnInit(){this.loadAvailableProjects();}loadAvailableProjects(){return $(this,null,function*(){try{this.isLoading=!0,this.error=null;let t=we(this.firestore,"projects"),e=yield at(t);this.availableProjects=[],e.forEach(i=>{let o=X({id:i.id},i.data());this.data.currentProjectIds.includes(o.id)||this.availableProjects.push(o);}),this.isLoading=!1;}catch(t){console.error("Error loading projects:",t),this.error="Failed to load projects",this.isLoading=!1;}});}toggleProjectSelection(t){this.selectedProjectIds.has(t)?this.selectedProjectIds.delete(t):this.selectedProjectIds.add(t);}isProjectSelected(t){return this.selectedProjectIds.has(t);}addSelectedProjects(){return $(this,null,function*(){if(this.selectedProjectIds.size===0){this.snackBar.open("Please select at least one project","Close",{duration:3e3});return;}try{this.isSaving=!0;let t=[...this.data.currentProjectIds,...Array.from(this.selectedProjectIds)],e=ge(this.firestore,"portfolios",this.data.portfolio.id);yield hn(e,{projectIds:t,updatedAt:Rn.now()}),this.snackBar.open(`${this.selectedProjectIds.size} project${this.selectedProjectIds.size!==1?"s":""} added to portfolio`,"Close",{duration:3e3}),this.dialogRef.close(!0);}catch(t){console.error("Error adding projects to portfolio:",t),this.snackBar.open("Failed to add projects to portfolio","Close",{duration:3e3});}finally{this.isSaving=!1;}});}onCancel(){this.dialogRef.close(!1);}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-project-selection-modal"]],decls:17,vars:9,consts:[[1,"project-selection-modal"],["mat-dialog-title",""],[1,"loading-container"],[1,"error-container"],[1,"no-projects-container"],[1,"projects-container"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["diameter","20",1,"inline-spinner"],["diameter","40"],["color","warn"],[1,"instruction-text"],[1,"projects-list"],[1,"project-option",3,"value","selected"],[1,"selection-summary"],[1,"project-option",3,"click","value","selected"],[1,"project-info"],[1,"project-header"],["matListItemIcon",""],[1,"project-name"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),u(3,"add_box"),c(),u(4," Add Projects to Portfolio "),c(),s(5,"mat-dialog-content"),S(6,hX,4,0,"div",2),S(7,_X,5,1,"div",3),S(8,gX,7,0,"div",4),S(9,vX,7,2,"div",5),c(),s(10,"mat-dialog-actions",6)(11,"button",7),E("click",function(){return i.onCancel();}),u(12," Cancel "),c(),s(13,"button",8),E("click",function(){return i.addSelectedProjects();}),S(14,bX,1,0,"mat-spinner",9),S(15,yX,2,0,"mat-icon"),u(16),c()()()),e&2&&(m(6),M(i.isLoading?6:-1),m(),M(i.error&&!i.isLoading?7:-1),m(),M(!i.isLoading&&!i.error&&i.availableProjects.length===0?8:-1),m(),M(!i.isLoading&&!i.error&&i.availableProjects.length>0?9:-1),m(2),N("disabled",i.isSaving),m(2),N("disabled",i.isSaving||i.selectedProjectIds.size===0||i.isLoading||i.error),m(),M(i.isSaving?14:-1),m(),M(i.isSaving?-1:15),m(),_e(" ",i.isSaving?"Adding...":"Add Selected Projects"," "));},dependencies:[gn,Zi,Bo,Vo,$o,$e,Qe,We,Xe,ra,es,k1,I1,fd,Fi,zi],styles:[".project-selection-modal[_ngcontent-%COMP%]{min-width:500px;max-width:700px}.project-selection-modal[_ngcontent-%COMP%] h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:16px;color:#1976d2}.project-selection-modal[_ngcontent-%COMP%] h2[mat-dialog-title][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px}.project-selection-modal[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{max-height:60vh;overflow-y:auto;padding:0 24px}.project-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .no-projects-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center}.project-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .no-projects-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;opacity:.6}.project-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .no-projects-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:16px 0 8px;color:#424242}.project-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .project-selection-modal[_ngcontent-%COMP%] .no-projects-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#666;line-height:1.5}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .instruction-text[_ngcontent-%COMP%]{margin-bottom:16px;color:#666;font-size:14px;line-height:1.4}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%]{border:1px solid #e0e0e0;border-radius:8px;max-height:400px;overflow-y:auto}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option[_ngcontent-%COMP%]{border-bottom:1px solid #f0f
5400f0;padding:16px;transition:background-color .2s ease}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option.mat-mdc-list-option-selected[_ngcontent-%COMP%]{background-color:#e3f2fd}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option[_ngcontent-%COMP%] .project-info[_ngcontent-%COMP%]{width:100%}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option[_ngcontent-%COMP%] .project-info[_ngcontent-%COMP%] .project-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option[_ngcontent-%COMP%] .project-info[_ngcontent-%COMP%] .project-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#1976d2;font-size:20px;width:20px;height:20px}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%] .project-option[_ngcontent-%COMP%] .project-info[_ngcontent-%COMP%] .project-header[_ngcontent-%COMP%] .project-name[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:500;color:#212121}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .selection-summary[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:16px;padding:12px 16px;background-color:#e8f5e8;border-radius:8px;color:#2e7d32;font-size:14px;font-weight:500}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .selection-summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.project-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%]{padding:16px 24px;gap:8px}.project-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}.project-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .inline-spinner[_ngcontent-%COMP%]{margin-right:8px}.project-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}@media(max-width:768px){.project-selection-modal[_ngcontent-%COMP%]{min-width:90vw;max-width:90vw}.project-selection-modal[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{max-height:50vh}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .projects-list[_ngcontent-%COMP%]{max-height:300px}.project-selection-modal[_ngcontent-%COMP%] .projects-container[_ngcontent-%COMP%] .project-meta[_ngcontent-%COMP%]{flex-direction:column;gap:8px}}"]});};function PX(n,t){n&1&&(s(0,"div",2),ee(1,"mat-spinner",10),s(2,"p"),u(3,"Loading available compliance checklists..."),c()());}function wX(n,t){if(n&1&&(s(0,"div",3)(1,"mat-icon",11),u(2,"error"),c(),s(3,"p"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function SX(n,t){n&1&&(s(0,"div",4)(1,"mat-icon"),u(2,"checklist_rtl"),c(),s(3,"h3"),u(4,"No Available Compliance Checklists"),c(),s(5,"p"),u(6,"All compliance checklists are already in this portfolio, or no checklists have been created yet."),c()());}function MX(n,t){if(n&1){let e=oe();s(0,"mat-list-option",16),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.toggleComplianceSelection(o.id));}),s(1,"div",17)(2,"div",18)(3,"mat-icon",19),u(4,"checklist"),c(),s(5,"h4",20),u(6),c()()()();}if(n&2){let e=t.$implicit,i=x(2);N("value",e.id)("selected",i.isComplianceSelected(e.id)),m(6),G(e.name);}}function OX(n,t){if(n&1&&(s(0,"div",15)(1,"mat-icon"),u(2,"info"),
540c(),s(3,"span"),u(4),c()()),n&2){let e=x(2);m(4),Hn("",e.selectedComplianceIds.size," compliance checklist",e.selectedComplianceIds.size!==1?"s":""," selected");}}function EX(n,t){if(n&1&&(s(0,"div",5)(1,"p",12),u(2),c(),s(3,"mat-selection-list",13),be(4,MX,7,3,"mat-list-option",14,Pt),c(),S(6,OX,5,2,"div",15),c()),n&2){let e=x();m(2),_e(' Select the compliance checklists you want to add to "',e.data.portfolio.name,'": '),m(2),ye(e.availableCompliances),m(2),M(e.selectedComplianceIds.size>0?6:-1);}}function TX(n,t){n&1&&ee(0,"mat-spinner",9);}function IX(n,t){n&1&&(s(0,"mat-icon"),u(1,"add"),c());}var ov=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;firestore=re(ai);snackBar=re(Bt);availableCompliances=[];selectedComplianceIds=new Set();isLoading=!0;isSaving=!1;error=null;ngOnInit(){this.loadAvailableCompliances();}loadAvailableCompliances(){return $(this,null,function*(){try{this.isLoading=!0,this.error=null;let t=we(this.firestore,"compliances"),e=yield at(t);this.availableCompliances=[],e.forEach(i=>{let o=X({id:i.id},i.data());this.data.currentComplianceIds.includes(o.id)||this.availableCompliances.push(o);}),this.isLoading=!1;}catch(t){console.error("Error loading compliance checklists:",t),this.error="Failed to load compliance checklists",this.isLoading=!1;}});}toggleComplianceSelection(t){this.selectedComplianceIds.has(t)?this.selectedComplianceIds.delete(t):this.selectedComplianceIds.add(t);}isComplianceSelected(t){return this.selectedComplianceIds.has(t);}addSelectedCompliances(){return $(this,null,function*(){if(this.selectedComplianceIds.size===0){this.snackBar.open("Please select at least one compliance checklist","Close",{duration:3e3});return;}try{this.isSaving=!0;let t=[...(this.data.currentComplianceIds||[]),...Array.from(this.selectedComplianceIds)],e=ge(this.firestore,"portfolios",this.data.portfolio.id);yield hn(e,{complianceIds:t,updatedAt:Rn.now()}),this.snackBar.open(`${this.selectedComplianceIds.size} compliance checklist${this.selectedComplianceIds.size!==1?"s":""} added to portfolio`,"Close",{duration:3e3}),this.dialogRef.close(!0);}catch(t){console.error("Error adding compliance checklists to portfolio:",t),this.snackBar.open("Failed to add compliance checklists to portfolio","Close",{duration:3e3});}finally{this.isSaving=!1;}});}onCancel(){this.dialogRef.close(!1);}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-compliance-selection-modal"]],decls:17,vars:9,consts:[[1,"compliance-selection-modal"],["mat-dialog-title",""],[1,"loading-container"],[1,"error-container"],[1,"no-compliances-container"],[1,"compliances-container"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["diameter","20",1,"inline-spinner"],["diameter","40"],["color","warn"],[1,"instruction-text"],[1,"compliances-list"],[1,"compliance-option",3,"value","selected"],[1,"selection-summary"],[1,"compliance-option",3,"click","value","selected"],[1,"compliance-info"],[1,"compliance-header"],["matListItemIcon",""],[1,"compliance-name"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"h2",1)(2,"mat-icon"),u(3,"checklist"),c(),u(4," Add Compliance Checklists to Portfolio "),c(),s(5,"mat-dialog-content"),S(6,PX,4,0,"div",2),S(7,wX,5,1,"div",3),S(8,SX,7,0,"div",4),S(9,EX,7,2,"div",5),c(),s(10,"mat-dialog-actions",6)(11,"button",7),E("click",function(){return i.onCancel();}),u(12," Cancel "),c(),s(13,"button",8),E("click",function(){return i.addSelectedCompliances();}),S(14,TX,1,0,"mat-spinner",9),S(15,IX,2,0,"mat-icon"),u(16),c()()()),e&2&&(m(6),M(i.isLoading?6:-1),m(),M(i.error&&!i.isLoading?7:-1),m(),M(!i.isLoading&&!i.error&&i.availableCompliances.length===0?8:-1),m(),M(!i.isLoading&&!i.error&&i.availableCompliances.length>0?9:-1),m(2),N("disabled",i.isSaving),m(2),N("disabled",i.isSaving||i.selectedComplianceIds.size===0||i.isLoading||i.error),m(),M(i.isSaving?14:-1),m(),M(i.isSaving?-1:15),m(),_e(" ",i.isSaving?"Adding...":"Add Selected Checklists"," "));},dependencies:[gn,Zi,Bo,Vo,$o,$e,Qe,We,Xe,ra,es,k1,I1,fd,Fi,zi],styles:[".compliance-selection-modal[_ngcontent-%COMP%]{min-width:500px;max-width:700px}.compliance-selection-modal[_ngcontent-%COMP%] h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:16px;color:#1976d2}.compliance-selection-modal[_ngcontent-%COMP%] h2[mat-dialog-title][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px}
540.compliance-selection-modal[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{max-height:60vh;overflow-y:auto;padding:0 24px}.compliance-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .no-compliances-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center}.compliance-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .no-compliances-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;margin-bottom:16px;opacity:.6}.compliance-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .no-compliances-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:16px 0 8px;color:#424242}.compliance-selection-modal[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .compliance-selection-modal[_ngcontent-%COMP%] .no-compliances-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#666;line-height:1.5}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .instruction-text[_ngcontent-%COMP%]{margin-bottom:16px;color:#666;font-size:14px;line-height:1.4}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%]{border:1px solid #e0e0e0;border-radius:8px;max-height:400px;overflow-y:auto}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0;padding:16px;transition:background-color .2s ease}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option[_ngcontent-%COMP%]:last-child{border-bottom:none}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option[_ngcontent-%COMP%]:hover{background-color:#f8f9fa}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option.mat-mdc-list-option-selected[_ngcontent-%COMP%]{background-color:#e3f2fd}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option[_ngcontent-%COMP%] .compliance-info[_ngcontent-%COMP%]{width:100%}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option[_ngcontent-%COMP%] .compliance-info[_ngcontent-%COMP%] .compliance-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option[_ngcontent-%COMP%] .compliance-info[_ngcontent-%COMP%] .compliance-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#1976d2;font-size:20px;width:20px;height:20px}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%] .compliance-option[_ngcontent-%COMP%] .compliance-info[_ngcontent-%COMP%] .compliance-header[_ngcontent-%COMP%] .compliance-name[_ngcontent-%COMP%]{margin:0;font-size:16px;font-weight:500;color:#212121}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .selection-summary[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:16px;padding:12px 16px;background-color:#e8f5e8;border-radius:8px;color:#2e7d32;font-size:14px;font-weight:500}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .selection-summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.compliance-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%]{padding:16px 24px;gap:8px}
540.compliance-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}.compliance-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] .inline-spinner[_ngcontent-%COMP%]{margin-right:8px}.compliance-selection-modal[_ngcontent-%COMP%] mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}@media(max-width:768px){.compliance-selection-modal[_ngcontent-%COMP%]{min-width:90vw;max-width:90vw}.compliance-selection-modal[_ngcontent-%COMP%] mat-dialog-content[_ngcontent-%COMP%]{max-height:50vh}.compliance-selection-modal[_ngcontent-%COMP%] .compliances-container[_ngcontent-%COMP%] .compliances-list[_ngcontent-%COMP%]{max-height:300px}}"]});};var kX=(n,t)=>t.id;function RX(n,t){n&1&&(s(0,"mat-error"),u(1,"Portfolio name is required"),c());}function NX(n,t){n&1&&(s(0,"mat-error"),u(1,"Portfolio name must be at least 2 characters long"),c());}function AX(n,t){if(n&1&&(s(0,"mat-option",10),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),_e(" ",e.name||e.email," ");}}function DX(n,t){n&1&&(ee(0,"mat-spinner",14),s(1,"span"),u(2,"Saving\u2026"),c());}function jX(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"save"),c(),s(3,"span"),u(4,"Save Changes"),c(),hi());}var av=class n{constructor(t,e){this.dialogRef=t;this.data=e;this.form=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:[""],userId:[""]});}dialogRef;data;firestore=re(ai);snackBar=re(Bt);fb=re(wo);form;isSaving=!1;ngOnInit(){this.form.patchValue({name:this.data.portfolio.name??"",description:this.data.portfolio.description??"",userId:this.data.portfolio.userId??""});}onSave(){return $(this,null,function*(){if(!(this.form.invalid||!this.data.portfolio.id))try{this.isSaving=!0;let t=this.form.value;yield hn(ge(this.firestore,"portfolios",this.data.portfolio.id),{name:t.name,description:t.description??"",userId:t.userId??"",updatedAt:Rn.now()});let e=Ve(X({},this.data.portfolio),{name:t.name,description:t.description,userId:t.userId});this.snackBar.open("Portfolio updated","Close",{duration:2e3}),this.dialogRef.close(e);}catch(t){console.error("Error updating portfolio:",t),this.snackBar.open("Failed to update portfolio","Close",{duration:3e3});}finally{this.isSaving=!1;}});}onCancel(){this.dialogRef.close(null);}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-portfolio-edit-dialog"]],decls:36,vars:6,consts:[["mat-dialog-title",""],[1,"dialog-title-icon"],[3,"formGroup"],["mat-dialog-content",""],["appearance","outline",1,"full-width"],["matPrefix",""],["matInput","","formControlName","name","placeholder","Enter portfolio name"],["matInput","","formControlName","description","placeholder","Enter portfolio description","rows","3"],["formControlName","userId"],["value",""],[3,"value"],["mat-dialog-actions","","align","end"],["mat-button","","type","button",3,"click","disabled"],["mat-flat-button","","color","primary","type","button",3,"click","disabled"],["diameter","18",1,"btn-spinner"]],template:function(e,i){if(e&1&&(s(0,"h2",0)(1,"mat-icon",1),u(2,"folder"),c(),u(3,` Edit Portfolio 541`),c(),s(4,"form",2)(5,"div",3)(6,"mat-form-field",4)(7,"mat-label"),u(8,"Portfolio Name"),c(),s(9,"mat-icon",5),u(10,"folder"),c(),ee(11,"input",6),S(12,RX,2,0,"mat-error"),S(13,NX,2,0,"mat-error"),c(),s(14,"mat-form-field",4)(15,"mat-label"),u(16,"Description"),c(),s(17,"mat-icon",5),u(18,"description"),c(),ee(19,"textarea",7),c(),s(20,"mat-form-field",4)(21,"mat-label"),u(22,"Owner"),c(),s(23,"mat-icon",5),u(24,"person"),c(),s(25,"mat-select",8)(26,"mat-option",9),u(27,"\u2014 None \u2014"),c(),be(28,AX,2,2,"mat-option",10,kX),c()()(),s(30,"div",11)(31,"button",12),E("click",function(){return i.onCancel();}),u(32," Cancel "),c(),s(33,"button",13),E("click",function(){return i.onSave();}),S(34,DX,3,0)(35,jX,5,0,"ng-container"),c()()()),e&2){let o,a;m(4),N("formGroup",i.form),m(8),M((o=i.form.get("name"))!=null&&o.hasError("required")?12:-1),m(),M((a=i.form.get("name"))!=null&&a.hasError("minlength")?13:-1),m(15),ye(i.data.users),m(3),N("disabled",i.isSaving),m(2),N("disabled",i.form.invali
541d||i.isSaving),m(),M(i.isSaving?34:35);}},dependencies:[ut,gn,Nn,Ft,Tt,Mn,tn,An,Wn,Zi,Bo,Vo,$o,$e,Qe,Gt,Vt,Wt,ti,Pl,jt,Xt,bi,So,Ei,We,Xe,Fi,zi],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
541.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:1.1rem;font-weight:600;color:#000000d9;margin-bottom:4px}.dialog-title-icon[_ngcontent-%COMP%]{font-size:22px!important;width:22px!important;height:22px!important;color:#465d91}[mat-dialog-content][_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding-top:8px!important;min-width:440px}.full-width[_ngcontent-%COMP%]{width:100%}[mat-dialog-actions][_ngcontent-%COMP%]{padding:8px 24px 16px!important;gap:8px}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:6px}.btn-spinner[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle;margin-right:6px}"]});};function LX(n,t){n&1&&(s(0,"div",1)(1,"span",4),u(2,"No compliance checklists in portfolio"),c()());}function zX(n,t){if(n&1&&(s(0,"div",5)(1,"div",9)(2,"mat-icon",10),u(3,"verified"),c(),s(4,"span",11),u(5),c()()()),n&2){let e=x(3);m(5),_e("Global: ",e.complianceSummary.globalComplianceScore,"%");}}function FX(n,t){if(n&1&&(s(0,"span",18),u(1),c()),n&2){let e=x().$implicit,i=x(3);m(),_e(" ",i.getComplianceScore(e.id),"% ");}}function BX(n,t){n&1&&(s(0,"span",18),u(1," Start "),c());}function $X(n,t){if(n&1){let e=oe();s(0,"button",12),E("click",function(o){let a=k(e).$implicit,r=x(3);return R(r.hasAssessment(a.id)?r.openComplianceAnalysis({complianceId:a.id,complianceName:a.name,overallScore:r.getComplianceScore(a.id),itemsTotal:0,itemsEvaluated:0},o):r.startNewAssessment(a,o));}),s(1,"div",13)(2,"div",14)(3,"mat-icon",15),u(4),c(),s(5,"span",16),u(6),c()(),s(7,"div",17),S(8,FX,2,1,"span",18),S(9,BX,2,0,"span",18),c()()();}if(n&2){let e=t.$implicit,i=x(3);Ci("background-color",i.hasAssessment(e.id)?i.getGlobalScoreColor(i.getComplianceScore(e.id)):"#6c757d")("color","white"),Ue("assessed",i.hasAssessment(e.id))("not-assessed",!i.hasAssessment(e.id)),N("matTooltip",i.hasAssessment(e.id)?e.name+": "+i.getComplianceScore(e.id)+"%":e.name+": Click to start assessment"),m(4),_e(" ",i.hasAssessment(e.id)?i.getScoreIcon(i.getComplianceScore(e.id)):"assignment"," "),m(2),G(e.name),m(2),M(i.hasAssessment(e.id)?8:-1),m(),M(i.hasAssessment(e.id)?-1:9);}}function VX(n,t){if(n&1&&(s(0,"div",8)(1,"span",19)(2,"mat-icon"),u(3,"schedule"),c(),u(4),c()()),n&2){let e=x(3);m(4),_e(" Last updated: ",e.formatDate(e.getLastAssessmentDate())," ");}}function GX(n,t){if(n&1&&(s(0,"div",2),S(1,zX,6,1,"div",5),s(2,"div",6),be(3,$X,10,13,"button",7,Pt),c(),S(5,VX,5,1,"div",8),c()),n&2){let e=x(2);m(),M(e.showDetailedView&&e.hasComplianceData()?1:-1),m(2),ye(e.portfolioCompliances),m(2),M(e.showDetailedView&&e.hasComplianceData()&&e.getLastAssessmentDate()?5:-1);}}function qX(n,t){n&1&&(s(0,"div",3)(1,"span",20),u(2,"Loading compliance data..."),c()());}function JX(n,t){if(n&1&&(s(0,"div",0),S(1,LX,3,0,"div",1),S(2,GX,6,2,"div",2),S(3,qX,3,0,"div",3),c()),n&2){let e=x();m(),M(e.hasAnyCompliances()?-1:1),m(),M(e.hasAnyCompliances()?2:-1),m(),M(e.loading?3:-1);}}var rv=class n{portfolioId="";projectId="";projectName="";showDetailedView=!1;router=re(Et);portfolioComplianceService=re(qf);firestore=re(ai);complianceSummary=null;portfolioCompliances=[];loading=!0;subscription;ngOnInit(){this.portfolioId&&this.projectId&&this.loadData();}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe();}loadData(){return $(this,null,function*(){try{this.subscription=this.portfolioComplianceService.getProjectComplianceSummary(this.portfolioId,this.projectId).subscribe(t=>{this.complianceSummary=t;}),yield this.loadPortfolioCompliances(),this.loading=!1;}catch(t){console.error("Error loading compliance data:",t),this.loading=!1;}});}loadPortfolioCompliances(){return $(this,null,function*(){try{let t=ge(this.firestore,"portfolios",this.portfolioId),e=yield yt(t);if(e.exists()){let i=X({id:e.id},e.data());if(i.complianceIds&&i.complianceIds.length>0){this.portfolioCompliances=[];for(let o of i.complianceIds){let a=ge(this.firestore,"compliances",o),r=yield yt(a);if(r.exists()){let l=X({id:r.id},r.data());this.portfolioCompliances.push(l);}}}}}catch(t){console.error("Error loading portfolio compliances:",t);}});}getGlobalScoreColor(t){return t>=80?"#28a745":t>=60?"#20c997":t>=40?"#ffc107":t>=20?"#fd7e14":"#dc3545";}getScoreIcon(t){return t>=80?"check_circle":t>=60?"check_circle_outline":t>=40?"warning":t>=20?"error_outline":"error";}openComplianceAnalysis(t,e){e&&(e.stopPropagation(),e.preventDefault()),this.router.navigate(["/dashboard/portfolio",this.portfolioId,"compliance",t.complianceId,"project",this.projectId],{queryParams:{projectName:this.projectName}});}startNewAssessment(t,e){e&&(e.stopPropagation(),e.preventDefault()),this.router.navigate(["/dashboard/portfolio",this.portfolioId,"compliance",t.id,"project",this.projectId],{queryParams:{projectName:this.projectName}});}getComplianceScore(t){return this.complianceSummary?.complianceScores&&this.complianceSummary.complianceScores.find(i=>i.complianceId===t)?.overallScore||0;}hasAssessment(t){return this.complianceSummary?.complianceScores?this.complianceSummary.complianceScores.some(e=>e.complianceId===t):!1;}hasAnyCompliances(){return this.portfolioCompliances.length>0;}
541hasComplianceData(){return this.complianceSummary!==null&&this.complianceSummary.complianceScores.length>0;}getComplianceCount(){return this.complianceSummary?.complianceScores.length||0;}getLastAssessmentDate(){if(!this.complianceSummary?.complianceScores.length)return null;let t=this.complianceSummary.complianceScores.map(e=>e.lastAssessed?.toDate()).filter(e=>e!==void 0);return t.length>0?new Date(Math.max(...t.map(e=>e.getTime()))):null;}getHighestScore(){return this.complianceSummary?.complianceScores.length?Math.max(...this.complianceSummary.complianceScores.map(t=>t.overallScore)):0;}getLowestScore(){return this.complianceSummary?.complianceScores.length?Math.min(...this.complianceSummary.complianceScores.map(t=>t.overallScore)):0;}getCompletionRate(){if(!this.complianceSummary?.complianceScores.length)return 0;let t=this.complianceSummary.complianceScores.reduce((i,o)=>i+o.itemsTotal,0),e=this.complianceSummary.complianceScores.reduce((i,o)=>i+o.itemsEvaluated,0);return t>0?Math.round(e/t*100):0;}formatDate(t){return t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-project-compliance-card"]],inputs:{portfolioId:"portfolioId",projectId:"projectId",projectName:"projectName",showDetailedView:"showDetailedView"},decls:1,vars:1,consts:[[1,"compliance-buttons-section"],[1,"no-compliance-data"],[1,"compliance-buttons"],[1,"loading-state"],[1,"no-data-text"],[1,"global-score-display"],[1,"compliance-buttons-grid"],["mat-raised-button","",1,"compliance-button",3,"assessed","not-assessed","background-color","color","matTooltip"],[1,"summary-info"],[1,"global-score-header"],[1,"compliance-icon"],[1,"global-score-label"],["mat-raised-button","",1,"compliance-button",3,"click","matTooltip"],[1,"button-content"],[1,"button-header"],[1,"button-icon"],[1,"compliance-name"],[1,"button-score"],[1,"score-value"],[1,"last-updated"],[1,"loading-text"]],template:function(e,i){e&1&&S(0,JX,4,3,"div",0),e&2&&M(i.loading?-1:0);},dependencies:[$e,Qe,ha,We,Xe,D1,yi,$t,_n,hf],styles:['.compliance-buttons-section[_ngcontent-%COMP%]{margin-top:16px;padding:12px;border-radius:8px}.no-compliance-data[_ngcontent-%COMP%]{text-align:center;padding:16px;color:#6c757d}.no-compliance-data[_ngcontent-%COMP%] .no-data-text[_ngcontent-%COMP%]{font-size:14px;font-style:italic}.compliance-buttons[_ngcontent-%COMP%] .global-score-display[_ngcontent-%COMP%]{margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #e9ecef}.compliance-buttons[_ngcontent-%COMP%] .global-score-display[_ngcontent-%COMP%] .global-score-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.compliance-buttons[_ngcontent-%COMP%] .global-score-display[_ngcontent-%COMP%] .global-score-header[_ngcontent-%COMP%] .compliance-icon[_ngcontent-%COMP%]{font-size:18px;color:#6c757d}.compliance-buttons[_ngcontent-%COMP%] .global-score-display[_ngcontent-%COMP%] .global-score-header[_ngcontent-%COMP%] .global-score-label[_ngcontent-%COMP%]{font-weight:600;font-size:14px;color:#495057}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%]{min-width:180px;min-height:60px;height:auto;border-radius:8px;border:none;box-shadow:0 2px 4px #0000001a;transition:all .3s ease;cursor:pointer}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 4px 8px #00000026}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button.not-assessed[_ngcontent-%COMP%]{background-color:#6c757d!important}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button.not-assessed[_ngcontent-%COMP%]:hover{background-color:#5a6268!important}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button.not-assessed[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%] .score-value[_ngcontent-%COMP%]{font-size:12px;font-weight:600}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-header[_ngcontent-%COMP%] .button-icon[_ngcontent-%COMP%]{font-size:16px}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-header[_ngcontent-%COMP%] .compliance-name[_ng
541content-%COMP%]{font-size:12px;font-weight:600;text-align:center;line-height:1.2;max-width:140px;white-space:normal;word-break:break-word}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%] .score-value[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.compliance-buttons[_ngcontent-%COMP%] .compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%] .progress-text[_ngcontent-%COMP%]{font-size:10px;opacity:.9}.compliance-buttons[_ngcontent-%COMP%] .summary-info[_ngcontent-%COMP%]{margin-top:12px;padding-top:8px;border-top:1px solid #e9ecef}.compliance-buttons[_ngcontent-%COMP%] .summary-info[_ngcontent-%COMP%] .last-updated[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;color:#6c757d}.compliance-buttons[_ngcontent-%COMP%] .summary-info[_ngcontent-%COMP%] .last-updated[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px}.loading-state[_ngcontent-%COMP%]{text-align:center;padding:16px;color:#6c757d}.loading-state[_ngcontent-%COMP%] .loading-text[_ngcontent-%COMP%]{font-size:12px;font-style:italic}@media(max-width:768px){.compliance-buttons-grid[_ngcontent-%COMP%]{justify-content:center}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%]{min-width:120px!important;height:55px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-header[_ngcontent-%COMP%] .compliance-name[_ngcontent-%COMP%]{font-size:11px!important;max-width:80px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%] .score-value[_ngcontent-%COMP%]{font-size:12px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%] .progress-text[_ngcontent-%COMP%]{font-size:9px!important}}@media(max-width:480px){.compliance-buttons-section[_ngcontent-%COMP%]{padding:8px}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%]{min-width:100px!important;height:50px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%]{gap:2px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-header[_ngcontent-%COMP%]{gap:4px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-header[_ngcontent-%COMP%] .button-icon[_ngcontent-%COMP%]{font-size:14px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-header[_ngcontent-%COMP%] .compliance-name[_ngcontent-%COMP%]{font-size:10px!important;max-width:60px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%]{gap:1px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%] .score-value[_ngcontent-%COMP%]{font-size:11px!important}.compliance-buttons-grid[_ngcontent-%COMP%] .compliance-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%] .button-score[_ngcontent-%COMP%] .progress-text[_ngcontent-%COMP%]{font-size:8px!important}.global-score-display[_ngcontent-%COMP%] .global-score-header[_ngcontent-%COMP%] .global-score-label[_ngcontent-%COMP%]{font-size:12px!important}} .mat-mdc-raised-button.compliance-button .mat-mdc-button-persistent-ripple{border-radius:8px} .mat-mdc-tooltip{font-size:12px!important;max-width:250px!important;text-align:center}.compliance-button[_ngcontent-%COMP%]{position:relative;overflow:hidden}.compliance-button[_ngcontent-%COMP%]:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);transition:left .5s ease}.compliance-button[_ngcontent-%COMP%]:hover:before{left:100%}']});};var HX=(n,t)=>t.theme.id,UX=(n,t)=>t.label;
541function WX(n,t){if(n&1&&(s(0,"span",13),u(1),c(),s(2,"span",14),u(3,"\xB7"),c()),n&2){let e=x();m(),G(e.project.identifier);}}function XX(n,t){if(n&1&&(s(0,"span",14),u(1,"\xB7"),c(),s(2,"span",15)(3,"mat-icon",16),u(4,"calendar_today"),c(),u(5),c()),n&2){let e=x();m(5),_e(" ",e.project.targetPeriod," ");}}function YX(n,t){if(n&1&&(s(0,"span",14),u(1,"\xB7"),c(),s(2,"span",15)(3,"mat-icon",16),u(4,"person"),c(),u(5),c()),n&2){let e=x();m(5),_e(" ",e.project.responsible," ");}}function KX(n,t){if(n&1){let e=oe();s(0,"button",26),E("click",function(){k(e);let o=x(2);return R(o.startEditingNotes());}),s(1,"mat-icon"),u(2,"edit"),c()();}}function ZX(n,t){if(n&1){let e=oe();s(0,"div",27),E("click",function(){k(e);let o=x(2);return R(o.startEditingNotes());}),s(1,"p",21),u(2),c()();}if(n&2){let e=x(2);m(),Ue("fin-prose--placeholder",!e.project.portfolioNotes),m(),_e(" ",e.project.portfolioNotes||"Click to add portfolio notes\u2026"," ");}}function QX(n,t){if(n&1){let e=oe();s(0,"div",25)(1,"mat-form-field",28)(2,"mat-label"),u(3,"Portfolio Notes"),c(),s(4,"textarea",29),Mt("ngModelChange",function(o){k(e);let a=x(2);return St(a.editingNotesText,o)||(a.editingNotesText=o),R(o);}),E("keydown.escape",function(){k(e);let o=x(2);return R(o.cancelEditingNotes());}),c()(),s(5,"div",30)(6,"button",31),E("click",function(){k(e);let o=x(2);return R(o.saveNotes());}),s(7,"mat-icon"),u(8),c()(),s(9,"button",32),E("click",function(){k(e);let o=x(2);return R(o.cancelEditingNotes());}),s(10,"mat-icon"),u(11,"close"),c()()()();}if(n&2){let e=x(2);m(4),wt("ngModel",e.editingNotesText),m(2),N("disabled",e.isSavingNotes),m(2),G(e.isSavingNotes?"hourglass_empty":"check");}}function eY(n,t){if(n&1&&(s(0,"div",10)(1,"div",17)(2,"div",18)(3,"mat-icon",19),u(4,"description"),c(),s(5,"span"),u(6,"Description"),c()(),s(7,"div",20)(8,"p",21),u(9),c()()(),s(10,"div",17)(11,"div",22)(12,"mat-icon",19),u(13,"sticky_note_2"),c(),s(14,"span"),u(15,"Portfolio Notes"),c(),S(16,KX,3,0,"button",23),c(),S(17,ZX,3,3,"div",24),S(18,QX,12,3,"div",25),c()()),n&2){let e=x();m(9),G(e.plainDescription),m(7),M(e.isEditingNotes?-1:16),m(),M(e.isEditingNotes?-1:17),m(),M(e.isEditingNotes?18:-1);}}function tY(n,t){n&1&&(s(0,"div",33),ee(1,"mat-spinner",34),s(2,"span"),u(3,"Loading strategic data\u2026"),c()());}function nY(n,t){if(n&1){let e=oe();s(0,"div",35)(1,"mat-icon"),u(2,"info_outline"),c(),s(3,"span"),u(4,"No strategic data yet."),c(),s(5,"button",37),E("click",function(){k(e);let o=x(3);return R(o.navigateToProject());}),u(6,"Go to project \u2192"),c()();}}function iY(n,t){if(n&1&&(s(0,"span",51)(1,"mat-icon",52),u(2),c(),u(3),c()),n&2){let e=t.$implicit;Ue("theme-chip--linked",e.linked)("theme-chip--context",!e.linked),N("matTooltip",e.theme.description||e.theme.name),m(2),_e(" ",e.linked?"check_circle":"radio_button_unchecked"," "),m(),_e(" ",e.theme.name," ");}}function oY(n,t){if(n&1&&(s(0,"div",41)(1,"span",48),u(2,"Themes"),c(),s(3,"div",49),be(4,iY,4,7,"span",50,HX),c()()),n&2){let e=x(4);m(4),ye(e.themeChips);}}function aY(n,t){n&1&&(s(0,"span",54),u(1,"\u{1F916}"),c());}function rY(n,t){if(n&1&&(s(0,"span",53),u(1),S(2,aY,2,0,"span",54),c()),n&2){let e=t.$implicit;m(),_e(" ",e.label," "),m(),M(e.isAi?2:-1);}}function sY(n,t){if(n&1&&(s(0,"div",41)(1,"span",48),u(2,"Benefits"),c(),s(3,"div",49),be(4,rY,3,2,"span",53,UX),c()()),n&2){let e=x(4);m(4),ye(e.effectiveBenefitTypes);}}function lY(n,t){n&1&&(s(0,"span",54),u(1,"\u{1F916}"),c());}function cY(n,t){if(n&1&&(s(0,"span",48),u(1,"Magnitude"),c(),s(2,"span",55),u(3),S(4,lY,2,0,"span",54),c()),n&2){let e=x(5);m(2),ji("badge--magnitude-"+e.effectiveMagnitude.label.toLowerCase()),m(),_e(" ",e.effectiveMagnitude.label," "),m(),M(e.effectiveMagnitude.isAi?4:-1);}}function pY(n,t){n&1&&(s(0,"span",54),u(1,"\u{1F916}"),c());}function dY(n,t){if(n&1&&(s(0,"span",56),u(1,"Urgency"),c(),s(2,"span",55),u(3),S(4,pY,2,0,"span",54),c()),n&2){let e=x(5);m(2),ji("badge--urgency-"+e.effectiveUrgency.label.toLowerCase()),m(),_e(" ",e.effectiveUrgency.label," "),m(),M(e.effectiveUrgency.isAi?4:-1);}}function mY(n,t){if(n&1&&(s(0,"div",41),S(1,cY,5,4),S(2,dY,5,4),c()),n&2){let e=x(4);m(),M(e.effectiveMagnitude?1:-1),m(),M(e.effectiveUrgency?2:-1);}}function uY(n,t){if(n&1){let e=oe();s(0,"div",57),E("click",function(){k(e);let o=x(4);return R(o.navigateToProject());}),s(1,"span",58),u(2),c(),s(3,"mat-icon",59),u(4,"chevron_right"),c()();}if(n&2){let e=x(4);m(2),_e('"',e.primaryGoalText,'"');}}
541function fY(n,t){if(n&1&&(s(0,"span",60),u(1),c(),s(2,"span",61),u(3,"/ 10"),c(),s(4,"div",62),ee(5,"div",63),c()),n&2){let e=x(4);m(),G(e.wsjfBusinessValue),m(4),Ci("width",e.bvPercent(e.wsjfBusinessValue),"%");}}function hY(n,t){n&1&&(s(0,"span",46),u(1,"\u2014"),c());}function _Y(n,t){if(n&1&&(s(0,"mat-icon",67),u(1),c()),n&2){let e=t.$implicit;Ue("star--filled",e),m(),_e(" ",e?"star":"star_border"," ");}}function gY(n,t){if(n&1&&(s(0,"div",47)(1,"span",64),u(2,"Align."),c(),s(3,"div",65),be(4,_Y,2,3,"mat-icon",66,ac),c()()),n&2){let e=x(4);m(4),ye(e.starsArray(e.alignmentScore));}}function xY(n,t){if(n&1&&(s(0,"div",36)(1,"div",38)(2,"div",17)(3,"div",39)(4,"mat-icon",19),u(5,"flag"),c(),s(6,"span"),u(7,"Strategic KPIs"),c()(),s(8,"div",40),S(9,oY,6,0,"div",41),S(10,sY,6,0,"div",41),S(11,mY,3,2,"div",41),S(12,uY,5,1,"div",42),c()()(),s(13,"div",43)(14,"div",44)(15,"span",45),u(16,"BV"),c(),S(17,fY,6,3)(18,hY,2,0,"span",46),c(),S(19,gY,6,0,"div",47),c()()),n&2){let e=x(3);m(9),M(e.themeChips.length>0?9:-1),m(),M(e.effectiveBenefitTypes.length>0?10:-1),m(),M(e.effectiveMagnitude||e.effectiveUrgency?11:-1),m(),M(e.primaryGoalText?12:-1),m(5),M(e.wsjfBusinessValue!==null?17:18),m(2),M(e.alignmentScore!==null?19:-1);}}function CY(n,t){if(n&1&&(S(0,nY,7,0,"div",35),S(1,xY,20,6,"div",36)),n&2){let e=x(2);M(!e.themeChips.length&&e.wsjfBusinessValue===null&&!e.effectiveBenefitTypes.length&&!e.primaryGoalText?0:-1),m(),M(e.themeChips.length||e.wsjfBusinessValue!==null||e.effectiveBenefitTypes.length||e.primaryGoalText||e.alignmentScore!==null||e.effectiveMagnitude||e.effectiveUrgency?1:-1);}}function vY(n,t){if(n&1&&(s(0,"div",10),S(1,tY,4,0,"div",33),S(2,CY,2,2),c()),n&2){let e=x();m(),M(e.isLoadingStrategic?1:-1),m(),M(e.isLoadingStrategic?-1:2);}}function bY(n,t){if(n&1){let e=oe();s(0,"div",11)(1,"mat-icon"),u(2,"construction"),c(),s(3,"span"),u(4,"Coming soon"),c(),s(5,"button",37),E("click",function(){k(e);let o=x();return R(o.navigateToProject());}),u(6,"Go to project \u2192"),c()();}}function yY(n,t){if(n&1){let e=oe();s(0,"div",11)(1,"mat-icon"),u(2,"construction"),c(),s(3,"span"),u(4,"Coming soon"),c(),s(5,"button",37),E("click",function(){k(e);let o=x();return R(o.navigateToProject());}),u(6,"Go to project \u2192"),c()();}}function PY(n,t){if(n&1){let e=oe();s(0,"div",11)(1,"mat-icon"),u(2,"construction"),c(),s(3,"span"),u(4,"Coming soon"),c(),s(5,"button",37),E("click",function(){k(e);let o=x();return R(o.navigateToProject());}),u(6,"Go to project \u2192"),c()();}}function wY(n,t){if(n&1){let e=oe();s(0,"div",35)(1,"mat-icon"),u(2,"info_outline"),c(),s(3,"span"),u(4,"No ROI data yet. Enter data in the ROI tab of the project."),c(),s(5,"button",37),E("click",function(){k(e);let o=x(2);return R(o.navigateToProject());}),u(6,"Go to project \u2192"),c()();}}function SY(n,t){if(n&1&&(s(0,"div",71)(1,"span",72),u(2,"Recurring"),c(),s(3,"span",73),u(4),c()()),n&2){let e=x(3);m(4),_e("",e.formatCurrency(e.roiResults.totalRecurringCostsYear1),"\u2009/\u2009yr");}}function MY(n,t){if(n&1&&(s(0,"div",17)(1,"div",82)(2,"mat-icon",19),u(3,"trending_up"),c(),s(4,"span"),u(5,"Benefits"),c()(),s(6,"div",71)(7,"span",72),u(8,"Annual (Y1)"),c(),s(9,"span",83),u(10),c()()()),n&2){let e=x(3);m(10),_e(" ",e.formatCurrency(e.roiResults.totalBenefitsYear1),"\u2009/\u2009yr ");}}function OY(n,t){if(n&1&&(s(0,"div",80)(1,"span",84),u(2,"NPV"),c(),s(3,"span",85),u(4),c()()),n&2){let e=x(3);m(3),Ue("fin-kpi-value--positive",e.roiResults.npv>=0)("fin-kpi-value--negative",e.roiResults.npv<0),m(),_e(" ",e.formatCurrency(e.roiResults.npv)," ");}}function EY(n,t){if(n&1&&(s(0,"div",81)(1,"span",84),u(2,"Payback"),c(),s(3,"span",85),u(4),c()()),n&2){let e=x(3);m(4),G(e.formatPaybackYears(e.roiResults.paybackPeriod));}}function TY(n,t){if(n&1&&(s(0,"div",68)(1,"div",69)(2,"div",17)(3,"div",70)(4,"mat-icon",19),u(5,"payments"),c(),s(6,"span"),u(7,"Costs"),c()(),s(8,"div",71)(9,"span",72),u(10,"Initial"),c(),s(11,"span",73),u(12),c()(),S(13,SY,5,1,"div",71),c(),S(14,MY,11,1,"div",17),c(),s(15,"div",74)(16,"div",75)(17,"span",76),u(18,"ROI"),c(),s(19,"span",77),u(20),Zn(21,"number"),c(),s(22,"div",78),ee(23,"div",79),c()(),S(24,OY,5,5,"div",80),S(25,EY,5,1,"div",81),c()()),n&2){let e=x(2);m(12),G(e.formatCurrency(e.roiResults.totalInitialCosts)),m(),M(e.roiResults.totalRecurringCostsYear1>0?13:-1),m(),M(e.roiResults.totalBenefitsYear1>
5410?14:-1),m(6),_e("",kr(21,8,e.roiResults.simpleRoi,"1.0-0"),"%"),m(3),Ci("width",e.roiBarPercent,"%"),m(),M(e.roiResults.npv!=null?24:-1),m(),M(e.roiResults.paybackPeriod!=null?25:-1);}}function IY(n,t){if(n&1&&(s(0,"div",10),S(1,wY,7,0,"div",35),S(2,TY,26,11,"div",68),c()),n&2){let e=x();m(),M(e.hasFinancialData?-1:1),m(),M(e.hasFinancialData&&e.roiResults?2:-1);}}function kY(n,t){if(n&1){let e=oe();s(0,"div",11)(1,"mat-icon"),u(2,"construction"),c(),s(3,"span"),u(4,"Coming soon"),c(),s(5,"button",37),E("click",function(){k(e);let o=x();return R(o.navigateToProject());}),u(6,"Go to project \u2192"),c()();}}function RY(n,t){if(n&1&&ee(0,"app-project-compliance-card",86),n&2){let e=x(2);N("portfolioId",e.portfolioId)("projectId",e.project.id)("projectName",e.project.name)("showDetailedView",!1);}}function NY(n,t){n&1&&(s(0,"div",35)(1,"mat-icon"),u(2,"info_outline"),c(),s(3,"span"),u(4,"No compliance data available."),c()());}function AY(n,t){if(n&1&&(s(0,"div",12),S(1,RY,1,4,"app-project-compliance-card",86)(2,NY,5,0,"div",35),c()),n&2){let e=x();m(),M(e.portfolioId&&e.project.id?1:2);}}var DY={revenue_growth:"Revenue Growth",cost_reduction:"Cost Reduction",risk_reduction:"Risk Reduction",service_improvement:"Service Improvement",compliance:"Compliance",productivity:"Productivity",innovation:"Innovation"},ZR={low:"Low",medium:"Medium",high:"High",transformational:"Transformational"},QR={low:"Low",medium:"Medium",high:"High",critical:"Critical"},sv=class n{project;portfolioThemeIds=[];activePerspective="summary";portfolioId="";portfolioOrder=1;priority="medium";isFirst=!1;isLast=!1;moveUp=new At();moveDown=new At();editRequested=new At();removeRequested=new At();projectUpdated=new At();get priorityLabel(){return{low:"Low",medium:"Medium",high:"High"}[this.priority]??"Medium";}get plainDescription(){if(!this.project?.description)return"\u2014";let t=document.createElement("div");return t.innerHTML=this.project.description,t.textContent||t.innerText||"\u2014";}firestore=re(ai);themeService=re(bf);router=re(Et);isLoadingStrategic=!0;wsjfBusinessValue=null;strategicSummary=null;themeChips=[];isEditingSummary=!1;isEditingNotes=!1;editingSummaryText="";editingNotesText="";isSavingSummary=!1;isSavingNotes=!1;get effectiveBenefitTypes(){let t=this.project.expectedBenefitTypes?.length?{values:this.project.expectedBenefitTypes,isAi:!1}:{values:this.strategicSummary?.inferredBenefitTypes??[],isAi:!0};return t.values.map(e=>({label:DY[e]??e,isAi:t.isAi}));}get effectiveMagnitude(){return this.project.benefitMagnitude?{label:ZR[this.project.benefitMagnitude]??this.project.benefitMagnitude,isAi:!1}:this.strategicSummary?.inferredBenefitMagnitude?{label:ZR[this.strategicSummary.inferredBenefitMagnitude]??this.strategicSummary.inferredBenefitMagnitude,isAi:!0}:null;}get effectiveUrgency(){return this.project.urgencyLevel?{label:QR[this.project.urgencyLevel]??this.project.urgencyLevel,isAi:!1}:this.strategicSummary?.inferredUrgencyLevel?{label:QR[this.strategicSummary.inferredUrgencyLevel]??this.strategicSummary.inferredUrgencyLevel,isAi:!0}:null;}get alignmentScore(){return this.strategicSummary?.alignmentScore??null;}get primaryGoalText(){return this.strategicSummary?.primaryGoal??null;}get strategicCompleteness(){return this.strategicSummary||this.project.expectedBenefitTypes?.length?"green":this.wsjfBusinessValue!==null||this.themeChips.some(t=>t.linked)?"yellow":"grey";}starsArray(t){return Array.from({length:5},(e,i)=>i<Math.round(t));}bvPercent(t){return Math.round(t/10*100);}roiResults=null;get hasFinancialData(){return this.roiResults!=null&&(this.roiResults.totalInitialCosts>0||this.roiResults.totalBenefitsYear1>0||this.roiResults.simpleRoi!==0);}formatCurrency(t){return t==null?"\u2014":Math.abs(t)>=1e6?`$${(t/1e6).toFixed(1)}M`:Math.abs(t)>=1e3?`$${(t/1e3).toFixed(0)}K`:`$${t.toLocaleString()}`;}formatPaybackYears(t){if(t==null)return"\u2014";let e=Math.floor(t),i=Math.round((t-e)*12);return i===0?`${e} yr`:e===0?`${i} mo`:`${e}y ${i}m`;}get roiBarPercent(){return Math.min(100,Math.max(0,this.roiResults?.simpleRoi??0));}ngOnInit(){this.loadStrategicData();}
541ngOnDestroy(){}loadStrategicData(){return $(this,null,function*(){if(this.project.id)try{this.isLoadingStrategic=!0;let t=yield yt(ge(this.firestore,"projects",this.project.id,"wsjf","latest"));t.exists()&&(this.wsjfBusinessValue=t.data()?.businessValue??null);let e=yield yt(ge(this.firestore,"projects",this.project.id,"strategicSummary","latest"));e.exists()&&(this.strategicSummary=e.data());let i=yield yt(ge(this.firestore,"projects",this.project.id,"roi","latest"));if(i.exists()){let r=i.data();r?.results&&(this.roiResults=r.results);}let o=this.project.linkedStrategicThemeIds??[],a=Array.from(new Set([...this.portfolioThemeIds,...o]));if(a.length){let r=yield this.themeService.getThemesByIds(a);this.themeChips=r.map(l=>({theme:l,linked:o.includes(l.id)}));}}catch(t){console.error("Error loading strategic data:",t);}finally{this.isLoadingStrategic=!1;}});}startEditingSummary(){this.isEditingSummary=!0,this.editingSummaryText=this.project.summary||"";}cancelEditingSummary(){this.isEditingSummary=!1,this.editingSummaryText="";}saveSummary(){return $(this,null,function*(){if(this.project.id)try{this.isSavingSummary=!0,yield hn(ge(this.firestore,"projects",this.project.id),{summary:this.editingSummaryText,updatedAt:Rn.now()}),this.project=Ve(X({},this.project),{summary:this.editingSummaryText}),this.projectUpdated.emit({summary:this.editingSummaryText}),this.isEditingSummary=!1;}catch(t){console.error("Error saving summary:",t);}finally{this.isSavingSummary=!1;}});}startEditingNotes(){this.isEditingNotes=!0,this.editingNotesText=this.project.portfolioNotes||"";}cancelEditingNotes(){this.isEditingNotes=!1,this.editingNotesText="";}saveNotes(){return $(this,null,function*(){if(this.project.id)try{this.isSavingNotes=!0,yield hn(ge(this.firestore,"projects",this.project.id),{portfolioNotes:this.editingNotesText,updatedAt:Rn.now()}),this.project=Ve(X({},this.project),{portfolioNotes:this.editingNotesText}),this.projectUpdated.emit({portfolioNotes:this.editingNotesText}),this.isEditingNotes=!1;}catch(t){console.error("Error saving notes:",t);}finally{this.isSavingNotes=!1;}});}navigateToProject(){this.project.id&&this.router.navigate(["/dashboard/project",this.project.id]);}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-project-perspectives-card"]],inputs:{project:"project",portfolioThemeIds:"portfolioThemeIds",activePerspective:"activePerspective",portfolioId:"portfolioId",portfolioOrder:"portfolioOrder",priority:"priority",isFirst:"isFirst",isLast:"isLast"},outputs:{moveUp:"moveUp",moveDown:"moveDown",editRequested:"editRequested",removeRequested:"removeRequested",projectUpdated:"projectUpdated"},decls:32,vars:19,consts:[[1,"project-summary-card"],[1,"project-identity"],[1,"identity-order"],["matTooltip","Go to project",1,"identity-name",3,"click"],[1,"identity-spacer"],["matTooltip","Click to change priority",3,"click"],["matTooltip","Move up",1,"action-btn",3,"click","disabled"],["matTooltip","Move down",1,"action-btn",3,"click","disabled"],["matTooltip","Open project",1,"action-btn",3,"click"],["matTooltip","Remove from portfolio",1,"action-btn","action-btn--remove",3,"click"],[1,"perspective-body"],[1,"perspective-body","stub-body"],[1,"perspective-body","compliance-body"],[1,"identity-id"],[1,"identity-sep"],[1,"identity-meta"],[1,"meta-icon"],[1,"fin-section"],[1,"fin-section-title","fin-section-title--info"],[1,"fin-section-icon"],[1,"fin-text-row"],[1,"fin-prose"],[1,"fin-section-title","fin-section-title--notes"],["matTooltip","Edit notes",1,"fin-edit-btn"],[1,"fin-text-row","fin-text-row--clickable"],[1,"fin-edit-area"],["matTooltip","Edit notes",1,"fin-edit-btn",3,"click"],[1,"fin-text-row","fin-text-row--clickable",3,"click"],["appearance","outline",1,"full-width"],["matInput","","rows","3","placeholder","Enter portfolio-specific notes",3,"ngModelChange","keydown.escape","ngModel"],[1,"fin-edit-actions"],["mat-icon-button","","color","primary","matTooltip","Save",3,"click","disabled"],["mat-icon-button","","matTooltip","Cancel",3,"click"],[1,"loading-row"],["diameter","18"],[1,"no-data-state"],[1,"strategic-layout"],["mat-button","","color","primary",3,"click"],[1,"strategic-left"],[1,"fin-section-title","fin-section-title--strategic"],[1,"strat-body"],[1,"data-row"],[1,"data-row","goal-row"],[1,"strategic-right"],["matTooltip","Business Value (WSJF)",1,"bv-card"],[1,"bv-card-label"],[1,"bv-card-empty"],[1,"bv-alignment"],[1,"row-label"],[1,"chips-group"],[1,"theme-chip",3,"theme-chip--linked","theme-chip--context","matTooltip"],[1,"theme-chip",3,"matTooltip"],[1,"chip-icon"],[1,"benefit-chip"],["matTooltip","AI-inferred",1,"ai-badge"],[1,"kv-value","badge"],[1,"row-label",2,"margin-left","8px"],[1,"data-row","goal-row",3,"click"],[1,"goal-text"],[1,"goal-arrow"],[1,"bv-card-number"],[1,"bv-card-sub"],[1,"bv-bar-wide"],[1,"bv-bar-wide-fill"],[1,"bv-alignment-label"],[1,"stars-row"],[1,"star-icon",3,"star--filled"],[1,"star-icon"],[1,"fin-layout"],[1,"fin-left"],[1,"fin-section-title","fin-section-title--costs"],[1,"fin-row"],[1,"fin-row-label"],[1,"fin-row-value"],[1,"fin-right"],["matTooltip","Simple Return on Investment",1,"fin-roi-card"],[1,"fin-roi-label"],[1,"fin-roi-number"],[1,"fin-roi-bar"],[1,"fin-roi-bar-fill"],["matTooltip","Net Present Value",1,"fin-kpi-chip"],["matTooltip","Payback period",1,"fin-kpi-chip"],[1,"fin-section-title","fin-section-title--benefits"],[1,"fin-row-value","fin-row-value--positive"],[1,"fin-kpi-label"],[1,"fin-kpi-value"],[3,"portfolioId","projectId","projectName","showDetailedView"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"span",2),u(3),c(),S(4,WX,4,1),s(5,"span",3),E("click",function(){return i.navigateToProject();}),u(6),c(),S(7,XX,6,1),S(8,YX,6,1),ee(9,"span",4),s(10,"span",5),E("click",function(){return i.editRequested.emit();}),u(11),c(),s(12,"button",6),E("click",function(){return i.moveUp.emit();}),s(13,"mat-icon"),u(14,"keyboard_arrow_up"),c()(),s(15,"button",7),E("click",function(){return i.moveDown.emit();}),s(16,"mat-icon"),u(17,"keyboard_arrow_down"),c()(),s(18,"button",8),E("click",function(){return i.navigateToProject();}),s(19,"mat-icon"),u(20,"open_in_new"),c()(),s(21,"button",9),E("click",function(){return i.removeRequested.emit();}),s(22,"mat-icon"),u(23,"remove_circle_outline"),c()()(),S(24,eY,19,4,"div",10),S(25,vY,3,2,"div",10),S(26,bY,7,0,"div",11),S(27,yY,7,0,"div",11),S(28,PY,7,0,"div",11),S(29,IY,3,2,"div",10),S(30,kY,7,0,"div",11),S(31,AY,3,1,"div",12),c()),e&2&&(m(3),_e("",i.portfolioOrder,"."),m(),M(i.project.identifier?4:-1),m(2),_e(" ",i.project.name," "),m(),M(i.project.targetPeriod?7:-1),m(),M(i.project.responsible?8:-1),m(2),ji(gp("priority-badge priority-badge--",i.priority)),m(),_e(" ",i.priorityLabel," "),m(),N("disabled",i.isFirst),m(3),N("disabled",i.isLast),m(9),M(i.activePerspective==="summary"?24:-1),m(),M(i.activePerspective==="strategic"?25:-1),m(),M(i.activePerspective==="customer"?26:-1),m(),M(i.activePerspective==="process"?27:-1),m(),M(i.activePerspective==="delivery"?28:-1),m(),M(i.activePerspective==="financial"?29:-1),m(),M(i.activePerspective==="architecture"?30:-1),m(),M(i.activePerspective==="risk"?31:-1));},dependencies:[ut,gn,Ft,Tt,Po,We,Xe,yi,$t,_n,Fi,zi,$e,Qe,Qt,Gt,Vt,Wt,jt,Xt,rv,a1],styles:["[_nghost-%COMP%]{display:block}.project-summary-card[_ngcontent-%COMP%]{border-radius:8px;border:1px solid rgba(0,0,0,.08);overflow:hidden;background:var(--mat-card-background-color, #fff);font-size:12px}.project-identity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:6px 10px;background:#00000005;border-bottom:1px solid var(--mat-divider-color, rgba(0, 0, 0, .08));flex-wrap:wrap}.identity-id[_ngcontent-%COMP%]{font-size:11px;font-weight:700;color:var(--mat-primary-color, #1976d2);background:#1976d214;padding:1px 6px;border-radius:4px;flex-shrink:0;white-space:nowrap}.identity-sep[_ngcontent-%COMP%]{color:#00000040;font-size:12px;flex-shrink:0}
541.identity-name[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--mat-text-primary-color, rgba(0, 0, 0, .87));cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}.identity-name[_ngcontent-%COMP%]:hover{color:var(--mat-primary-color, #1976d2);text-decoration:underline}.identity-meta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;font-size:11px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .55));white-space:nowrap}.meta-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px;flex-shrink:0}.identity-spacer[_ngcontent-%COMP%]{flex:1}.action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:none;border-radius:6px;background:transparent;cursor:pointer;color:#0000008c;transition:background .15s,color .15s;flex-shrink:0}.action-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;line-height:18px;color:inherit!important}.action-btn[_ngcontent-%COMP%]:hover:not([disabled]){background:#00000012;color:#000c}.action-btn[disabled][_ngcontent-%COMP%]{opacity:.28;cursor:default}.action-btn.action-btn--remove[_ngcontent-%COMP%]{color:#c62828}.action-btn.action-btn--remove[_ngcontent-%COMP%]:hover:not([disabled]){background:#c628281a;color:#b71c1c}.identity-order[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:#0000008c;flex-shrink:0;min-width:18px}.priority-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:2px 9px;border-radius:12px;font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none;flex-shrink:0;border:1.5px solid transparent;transition:filter .15s}.priority-badge[_ngcontent-%COMP%]:hover{filter:brightness(.92)}.priority-badge.priority-badge--low[_ngcontent-%COMP%]{background:#e8f5e9;color:#2e7d32;border-color:#a5d6a7}.priority-badge.priority-badge--medium[_ngcontent-%COMP%]{background:#fff8e1;color:#f57f17;border-color:#ffe082}.priority-badge.priority-badge--high[_ngcontent-%COMP%]{background:#fce4ec;color:#c62828;border-color:#ef9a9a}.nav-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding:2px;border-radius:4px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .4));flex-shrink:0;transition:color .15s,background .15s}.nav-btn[_ngcontent-%COMP%]:hover{color:var(--mat-primary-color, #1976d2);background:#1976d214}.nav-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:15px;width:15px;height:15px}.perspective-body[_ngcontent-%COMP%]{padding:8px 12px 10px;display:flex;flex-direction:column;gap:6px}.stub-body[_ngcontent-%COMP%]{flex-direction:row;align-items:center;gap:6px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .4));font-size:12px;padding:10px 12px}.stub-body[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.compliance-body[_ngcontent-%COMP%]{padding:0}.compliance-body[_ngcontent-%COMP%] app-project-compliance-card[_ngcontent-%COMP%]{display:block}.editable-field[_ngcontent-%COMP%]{display:flex;flex-direction:column}.field-display[_ngcontent-%COMP%]{cursor:pointer;padding:4px 6px;border-radius:4px;transition:background .15s}.field-display[_ngcontent-%COMP%]:hover{background:#1976d20a}.field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .5));margin-bottom:2px}.field-label[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px}.field-text[_ngcontent-%COMP%]{margin:0;font-size:12px;color:#000000bf;line-height:1.45;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.field-edit[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px}.field-edit[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{flex:1}.edit-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding-top:4px}.field-divider[_ngcontent-%COMP%]{height:1px;background:var(--mat-divider-color, rgba(0, 0, 0, .07));margin:2px 0}.loading-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .5));font-size:12px;padding:4px 0}.data-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.row-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .5));min-width:52px;padding-top:2px;flex-shrink:0}.strategic-layout[_ngcontent-%COMP%]{display:flex;gap:0;align-items:stretch}.strategic-left[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;padding-right:12px;border-right:1px solid rgba(0,0,0,.07)}.strategic-right[_ngcontent-%COMP%]{flex-shrink:0;width:106px;display:flex;flex-direction:column;gap:6px;padding-left:12px}.fin-section-title--info[_ngcontent-%COMP%]{background:#1976d20d;color:#0d47a1;border-bottom:1px solid rgba(25,118,210,.1)}.fin-section-title--notes[_ngcontent-%COMP%]{background:#7955480d;color:#4e342e;border-bottom:1px solid rgba(121,85,72,.1);justify-content:flex-start;gap:5px}.fin-section-title--strategic[_ngcontent-%COMP%]{background:#455d9112;color:#283593;border-bottom:1px solid rgba(69,93,145,.14)}.fin-text-row[_ngcontent-%COMP%]{padding:6px 10px;background:#fff}.fin-text-row.fin-text-row--clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .15s}.fin-text-row.fin-text-row--clickable[_ngcontent-%COMP%]:hover{background:#1976d208}.fin-prose[_ngcontent-%COMP%]{margin:0;font-size:12px;color:#000000b8;line-height:1.5;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.fin-prose.fin-prose--placeholder[_ngcontent-%COMP%]{color:#00000059;font-style:italic}.fin-edit-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;width:22px;height:22px;border:none;border-radius:4px;background:transparent;cursor:pointer;color:inherit;opacity:.55;transition:opacity .15s,background .15s}.fin-edit-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;
541height:14px}.fin-edit-btn[_ngcontent-%COMP%]:hover{opacity:1;background:#00000012}.fin-edit-area[_ngcontent-%COMP%]{padding:6px 10px;background:#fff;display:flex;align-items:flex-start;gap:4px}.fin-edit-area[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{flex:1}.fin-edit-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding-top:4px}.strat-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:6px 10px;background:#fff}.bv-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 8px;background:#fff;border:1.5px solid rgba(0,0,0,.08);border-radius:12px;box-shadow:0 2px 12px #00000012;cursor:default}.bv-card-label[_ngcontent-%COMP%]{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#00000080;line-height:1}.bv-card-number[_ngcontent-%COMP%]{font-size:2.2rem;font-weight:700;color:#465d91;line-height:1;margin-top:2px}.bv-card-sub[_ngcontent-%COMP%]{font-size:.7rem;font-weight:600;color:#0006;margin-bottom:6px}.bv-card-empty[_ngcontent-%COMP%]{font-size:1.6rem;font-weight:700;color:#00000040;line-height:1;margin:4px 0 6px}.bv-bar-wide[_ngcontent-%COMP%]{width:100%;height:6px;background:#00000014;border-radius:3px;overflow:hidden}.bv-bar-wide[_ngcontent-%COMP%] .bv-bar-wide-fill[_ngcontent-%COMP%]{height:100%;background:#465d91;border-radius:3px;transition:width .3s ease}.bv-alignment[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:3px}.bv-alignment-label[_ngcontent-%COMP%]{font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#00000073}.metrics-row[_ngcontent-%COMP%]{flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap}.metric-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.metric-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .5))}.metric-value[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:var(--mat-primary-color, #1976d2)}.bv-bar[_ngcontent-%COMP%]{width:60px;height:6px;background:#0000001a;border-radius:3px;overflow:hidden}.bv-bar[_ngcontent-%COMP%] .bv-bar-fill[_ngcontent-%COMP%]{height:100%;background:var(--mat-primary-color, #1976d2);border-radius:3px;transition:width .3s}.stars-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1px}.stars-row[_ngcontent-%COMP%] .star-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:#bdbdbd}.stars-row[_ngcontent-%COMP%] .star-icon.star--filled[_ngcontent-%COMP%]{color:#ff9800}.stars-row[_ngcontent-%COMP%] .star-score[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .5));margin-left:2px}.chips-group[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px}.theme-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;padding:2px 8px 2px 4px;border-radius:12px;font-size:11px;font-weight:500;cursor:default}.theme-chip[_ngcontent-%COMP%] .chip-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px}.theme-chip.theme-chip--linked[_ngcontent-%COMP%]{background:#1976d21f;color:#1565c0}.theme-chip.theme-chip--linked[_ngcontent-%COMP%] .chip-icon[_ngcontent-%COMP%]{color:#1565c0}.theme-chip.theme-chip--context[_ngcontent-%COMP%]{background:#0000000d;color:#0006}.theme-chip.theme-chip--context[_ngcontent-%COMP%] .chip-icon[_ngcontent-%COMP%]{color:#0000004d}.benefit-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:12px;font-size:11px;background:#4caf501a;color:#2e7d32}.benefit-chip[_ngcontent-%COMP%] .ai-badge[_ngcontent-%COMP%]{font-size:10px}.magnitude-urgency-row[_ngcontent-%COMP%]{gap:12px;flex-direction:row;align-items:center}.kv-pair[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px}.kv-key[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .5))}.kv-value.badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600}.badge--magnitude-low[_ngcontent-%COMP%]{background:#2196f31a;color:#1565c0}
541.badge--magnitude-medium[_ngcontent-%COMP%]{background:#ff98001f;color:#e65100}.badge--magnitude-high[_ngcontent-%COMP%]{background:#f443361a;color:#c62828}.badge--magnitude-transformational[_ngcontent-%COMP%]{background:#9c27b01f;color:#6a1b9a}.badge--urgency-low[_ngcontent-%COMP%]{background:#2196f31a;color:#1565c0}.badge--urgency-medium[_ngcontent-%COMP%]{background:#ff98001f;color:#e65100}.badge--urgency-high[_ngcontent-%COMP%]{background:#f443361a;color:#c62828}.badge--urgency-critical[_ngcontent-%COMP%]{background:#b71c1c26;color:#b71c1c;font-weight:700}.goal-row[_ngcontent-%COMP%]{cursor:pointer;align-items:center;background:#00000005;border-radius:4px;padding:4px 6px;transition:background .15s}.goal-row[_ngcontent-%COMP%]:hover{background:#1976d20f}.goal-row[_ngcontent-%COMP%] .goal-text[_ngcontent-%COMP%]{flex:1;font-style:italic;font-size:12px;color:#000000b3;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.goal-row[_ngcontent-%COMP%] .goal-arrow[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:var(--mat-primary-color, #1976d2);flex-shrink:0}.ai-badge[_ngcontent-%COMP%]{font-size:10px;opacity:.85}.no-data-state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:var(--mat-text-secondary-color, rgba(0, 0, 0, .4));font-size:12px;padding:4px 0}.no-data-state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.fin-layout[_ngcontent-%COMP%]{display:flex;gap:0;align-items:stretch}.fin-left[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;padding-right:12px;border-right:1px solid rgba(0,0,0,.07)}.fin-right[_ngcontent-%COMP%]{flex-shrink:0;width:106px;display:flex;flex-direction:column;gap:6px;padding-left:12px}.fin-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.07)}.fin-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.6px;padding:5px 10px}.fin-section-title.fin-section-title--costs[_ngcontent-%COMP%]{background:#c628280f;color:#b71c1c;border-bottom:1px solid rgba(198,40,40,.12)}.fin-section-title.fin-section-title--benefits[_ngcontent-%COMP%]{background:#2e7d320f;color:#1b5e20;border-bottom:1px solid rgba(46,125,50,.12)}.fin-section-icon[_ngcontent-%COMP%]{font-size:13px!important;width:13px!important;height:13px!important;color:inherit;opacity:.8}.fin-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 10px;background:#fff}.fin-row[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid rgba(0,0,0,.04)}.fin-row-label[_ngcontent-%COMP%]{font-size:11px;font-weight:500;color:#00000073;flex-shrink:0;font-variant-numeric:tabular-nums}.fin-row-value[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:#000000c7;font-variant-numeric:tabular-nums;letter-spacing:-.2px}.fin-row-value.fin-row-value--positive[_ngcontent-%COMP%]{color:#2e7d32}.fin-roi-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:3px;padding:12px 8px 10px;background:linear-gradient(160deg,#f1f8f1,#fff 60%);border:1.5px solid rgba(46,125,50,.25);border-radius:12px;box-shadow:0 2px 14px #2e7d321a}.fin-roi-label[_ngcontent-%COMP%]{font-size:.62rem;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#2e7d32b3;line-height:1}.fin-roi-number[_ngcontent-%COMP%]{font-size:1.65rem;font-weight:800;color:#2e7d32;line-height:1;margin-top:1px;font-variant-numeric:tabular-nums;letter-spacing:-1px}.fin-roi-empty[_ngcontent-%COMP%]{font-size:1.6rem;font-weight:700;color:#0003;line-height:1;margin:4px 0}.fin-roi-bar[_ngcontent-%COMP%]{width:100%;height:5px;background:#2e7d321f;border-radius:3px;overflow:hidden;margin-top:5px}.fin-roi-bar[_ngcontent-%COMP%] .fin-roi-bar-fill[_ngcontent-%COMP%]{height:100%;background:linear-gradient(90deg,#43a047,#1b5e20);border-radius:3px;transition:width .4s ease}.fin-kpi-chip[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 8px;background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:10px;box-shadow:0 1px 4px #0000000d}.fin-kpi-label[_ngcontent-%COMP%]{font-size:.6rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#0006;line-height:1}.fin-kpi-value[_ngcontent-%COMP%]{font-size:.85rem;font-weight:800;color:#000000b8;line-height:1.2;text-align:center;font-variant-numeric:tabular-nums;letter-spacing:-.3px}.fin-kpi-value.fin-kpi-value--positive[_ngcontent-%COMP%]{color:#2e7d32}.fin-kpi-value.fin-kpi-value--negative[_ngcontent-%COMP%]{color:#c62828}"]});};var eN={classic:{project:"Project",projects:"Projects",newProject:"New Project",businessProcess:"Business Process",businessProcesses:"Business Processes",subProcess:"Sub-process",
541subProcesses:"Sub-processes",processTask:"Process Task",processTasks:"Process Tasks",solutionRequirement:"Solution Requirement",solutionRequirements:"Solution Requirements",portfolio:"Portfolio",portfolios:"Portfolios","phase.initiation":"Initiation","phase.opportunity":"Opportunity","phase.feasibility":"Feasibility","phase.design":"Design","phase.realization":"Realization","phase.closed":"Closed",delivery:"Delivery Sequence",deliveryPrefix:"D",priority:"Priority (MoSCoW)",positioning:"Positioning",estimation:"Estimation",journey:"Project Journey"},safe:{project:"Epic",projects:"Epics",newProject:"New Epic",businessProcess:"Value Stream",businessProcesses:"Value Streams",subProcess:"Feature",subProcesses:"Features",processTask:"Story",processTasks:"Stories",solutionRequirement:"Story / Enabler",solutionRequirements:"Stories & Enablers",portfolio:"SAFe Portfolio",portfolios:"SAFe Portfolios","phase.initiation":"Funnel","phase.opportunity":"Reviewing","phase.feasibility":"Analyzing","phase.design":"Portfolio Backlog","phase.realization":"Implementing","phase.closed":"Done",delivery:"Program Increment",deliveryPrefix:"PI-",priority:"Priority (MoSCoW)",positioning:"Rough Order of Magnitude",estimation:"PI Estimation",journey:"Epic Initiation"}},lv=class n{constructor(t){this.orgContext=t;}orgContext;getMode(){return this.orgContext.getActiveOrg()?.methodology??"classic";}isSafe(){return this.getMode()==="safe";}getLabel(t){let e=this.getMode();return eN[e]?.[t]??eN.classic[t]??t;}getPhaseLabel(t){let e=`phase.${t??"initiation"}`;return this.getLabel(e);}static ɵfac=function(e){return new(e||n)(rr(kl));};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var nM=()=>[],tN=(n,t)=>t.key,jY=(n,t)=>t.phase,nN=(n,t)=>t.id;function LY(n,t){if(n&1&&(s(0,"div",13),u(1,"Portfolio"),c(),s(2,"div",5),u(3),c()),n&2){let e=x();m(3),G((e.portfolio==null?null:e.portfolio.name)||"\u2026");}}function zY(n,t){n&1&&(s(0,"div",5),u(1,"Create New Portfolio"),c());}function FY(n,t){if(n&1&&(s(0,"mat-chip"),u(1),Zn(2,"date"),c()),n&2){let e=x(2);m(),_e("Created ",kr(2,1,e.portfolio.createdAt.toDate(),"mediumDate"));}}function BY(n,t){n&1&&(s(0,"mat-chip",19),u(1,"SAFe"),c());}function $Y(n,t){if(n&1){let e=oe();s(0,"div",14)(1,"button",15),E("click",function(){k(e);let o=x();return R(o.togglePanel("projects"));}),s(2,"mat-icon"),u(3,"work"),c()(),s(4,"button",16),E("click",function(){k(e);let o=x();return R(o.togglePanel("compliance"));}),s(5,"mat-icon"),u(6,"checklist_rtl"),c()(),s(7,"button",17),E("click",function(){k(e);let o=x();return R(o.togglePanel("themes"));}),s(8,"mat-icon"),u(9,"flag_circle"),c()()(),s(10,"div",18)(11,"mat-chip-set")(12,"mat-chip"),u(13),c(),s(14,"mat-chip"),u(15),c(),S(16,FY,3,4,"mat-chip"),S(17,BY,2,0,"mat-chip",19),c()(),s(18,"div",20)(19,"span",21),u(20),c(),s(21,"button",22),E("click",function(){k(e);let o=x();return R(o.openProjectSelectionModal());}),s(22,"mat-icon"),u(23,"add"),c()(),s(24,"mat-button-toggle-group",23),Mt("ngModelChange",function(o){k(e);let a=x();return St(a.viewMode,o)||(a.viewMode=o),R(o);}),s(25,"mat-button-toggle",24)(26,"mat-icon"),u(27,"view_list"),c()(),s(28,"mat-button-toggle",25)(29,"mat-icon"),u(30,"view_kanban"),c()()()();}if(n&2){let e=x();m(),Ue("toggle-active",e.panelVisibility.projects)("toggle-inactive",!e.panelVisibility.projects),m(3),Ue("toggle-active",e.panelVisibility.compliance)("toggle-inactive",!e.panelVisibility.compliance),m(3),Ue("toggle-active",e.panelVisibility.themes)("toggle-inactive",!e.panelVisibility.themes),m(6),Hn("",e.projects.length," ",e.projects.length!==1?e.term.getLabel("projects"):e.term.getLabel("project")),m(2),Hn("",e.compliances.length," compliance",e.compliances.length!==1?"s":""),m(),M(e.portfolio.createdAt?16:-1),m(),M(e.term.isSafe()?17:-1),m(3),G(e.projects.length),m(),N("matTooltip",gp("Add ",e.term.getLabel("project"))),m(3),wt("ngModel",e.viewMode);}}function VY(n,t){if(n&1){let e=oe();s(0,"button",26),E("click",function(){k(e);let o=x();return R(o.openEditDialog());}),s(1,"mat-icon"),u(2,"edit"),c()();}}function GY(n,t){if(n&1){let e=oe();s(0,"button",27),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(1,"mat-icon"),u(2,"arrow_back"),c()();}}function qY(n,t){n&1&&(s(0,"div",10),ee(1,"mat-spinner"),s(2,"p"),u(3,"Loading portfolio..."),c()());}function JY(n,t){if(n&1){let e=oe();s(0,"div",10)(1,"mat-icon",28),u(2,"error"),c(),s(3,"h2"),u(4,"Error"),c(),s(5,"p"),u(6),c(),s(7,"button",29),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(8,"mat-icon"),u(9,"arrow_back"),c(),u(10," Go Back "),c()();}if(n&2){let e=x();m(6),G(e.error);}}function HY(n,t){n&1&&(s(0,"mat-error"),u(1,"Portfolio name is required"),
541c());}function UY(n,t){n&1&&(s(0,"mat-error"),u(1,"Portfolio name must be at least 2 characters long"),c());}function WY(n,t){n&1&&ee(0,"mat-spinner",40);}function XY(n,t){n&1&&(s(0,"mat-icon"),u(1,"add"),c());}function YY(n,t){if(n&1){let e=oe();s(0,"div",11)(1,"mat-card",30)(2,"mat-card-header")(3,"mat-icon",31),u(4,"create_new_folder"),c(),s(5,"mat-card-title"),u(6,"Portfolio Details"),c(),s(7,"mat-card-subtitle"),u(8,"Enter the information for your new portfolio"),c()(),s(9,"mat-card-content")(10,"form",32),E("ngSubmit",function(){k(e);let o=x();return R(o.createPortfolio());}),s(11,"mat-form-field",33)(12,"mat-label"),u(13,"Portfolio Name"),c(),ee(14,"input",34),s(15,"mat-icon",35),u(16,"folder"),c(),S(17,HY,2,0,"mat-error"),S(18,UY,2,0,"mat-error"),c(),s(19,"mat-form-field",33)(20,"mat-label"),u(21,"Description (Optional)"),c(),ee(22,"textarea",36),s(23,"mat-icon",35),u(24,"description"),c()()()(),s(25,"mat-card-actions",37)(26,"button",38),E("click",function(){k(e);let o=x();return R(o.goBack());}),u(27,"Cancel"),c(),s(28,"button",39),E("click",function(){k(e);let o=x();return R(o.createPortfolio());}),S(29,WY,1,0,"mat-spinner",40),S(30,XY,2,0,"mat-icon"),u(31),c()()()();}if(n&2){let e,i,o=x();m(10),N("formGroup",o.portfolioForm),m(7),M((e=o.portfolioForm.get("name"))!=null&&e.hasError("required")?17:-1),m(),M((i=o.portfolioForm.get("name"))!=null&&i.hasError("minlength")?18:-1),m(8),N("disabled",o.isSaving),m(2),N("disabled",o.portfolioForm.invalid||o.isSaving),m(),M(o.isSaving?29:-1),m(),M(o.isSaving?-1:30),m(),_e(" ",o.isSaving?"Creating...":"Create Portfolio"," ");}}function KY(n,t){if(n&1){let e=oe();s(0,"button",48),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.activePerspective=o.key);}),s(1,"mat-icon",49),u(2),c(),s(3,"span",50),u(4),c()();}if(n&2){let e=t.$implicit,i=x(4);Ue("perspective-pill--active",i.activePerspective===e.key),N("matTooltip",e.label),m(2),G(e.icon),m(2),G(e.label);}}function ZY(n,t){n&1&&(s(0,"div",55)(1,"mat-icon"),u(2,"inbox"),c(),s(3,"span"),u(4,"Drop here"),c()());}function QY(n,t){n&1&&(s(0,"div"),ee(1,"div",60),c());}function eK(n,t){if(n&1){let e=oe();s(0,"div",56),Zt(1,QY,2,0,"div",57),s(2,"div",58)(3,"mat-icon"),u(4,"drag_indicator"),c()(),s(5,"app-project-perspectives-card",59),E("editRequested",function(){let o=k(e).$implicit,a=x(5);return R(a.openPrioritySelector(o));})("removeRequested",function(){let o=k(e).$implicit,a=x(5);return R(a.removeProjectFromPortfolio(o.id));}),c()();}if(n&2){let e=t.$implicit,i=t.$index,o=x(5);m(5),N("project",e)("activePerspective",o.activePerspective)("portfolioThemeIds",o.portfolio.strategicThemeIds||Oa(8,nM))("portfolioId",o.portfolio.id)("portfolioOrder",e.portfolioOrder||i+1)("priority",e.priority||"medium")("isFirst",!1)("isLast",!1);}}function tK(n,t){if(n&1){let e=oe();s(0,"div",47)(1,"div",51)(2,"span",52),u(3),c(),s(4,"span",53),u(5),c()(),s(6,"div",54),E("cdkDropListDropped",function(o){let a=k(e).$implicit,r=x(4);return R(r.onKanbanDrop(o,a.phase));}),S(7,ZY,5,0,"div",55),be(8,eK,6,9,"div",56,nN),c()();}if(n&2){let e=t.$implicit;m(),N("ngClass",e.colorClass),m(2),G(e.label),m(2),G(e.projects.length),m(),N("cdkDropListData",e.projects),m(),M(e.projects.length===0?7:-1),m(),ye(e.projects);}}function nK(n,t){if(n&1&&(s(0,"div",42)(1,"div",44),be(2,KY,5,5,"button",45,tN),c(),s(4,"div",46),be(5,tK,10,5,"div",47,jY),c()()),n&2){let e=x(3);m(2),ye(e.perspectives),m(3),ye(e.kanbanColumns);}}function iK(n,t){if(n&1){let e=oe();s(0,"button",48),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.activePerspective=o.key);}),s(1,"mat-icon",49),u(2),c(),s(3,"span",50),u(4),c()();}if(n&2){let e=t.$implicit,i=x(4);Ue("perspective-pill--active",i.activePerspective===e.key),N("matTooltip",e.label),m(2),G(e.icon),m(2),G(e.label);}}function oK(n,t){if(n&1&&(s(0,"div",66)(1,"mat-icon",68),u(2,"work_off"),c(),s(3,"p"),u(4),Zn(5,"lowercase"),Zn(6,"lowercase"),c()()),n&2){let e=x(4);m(4),Hn("No ",yo(5,2,e.term.getLabel("projects"))," yet. Click + to add your first ",yo(6,4,e.term.getLabel("project")),".");}}function aK(n,t){if(n&1){let e=oe();s(0,"div",69)(1,"app-project-perspectives-card",70),E("moveUp",function(){let o=k(e).$index,a=x(5);return R(a.moveProjectUp(o));})("moveDown",function(){let o=k(e).$index,a=x(5);return R(a.moveProjectDown(o));})("editRequested",function(){let o=k(e).$implicit,a=x(5);return R(a.openPrioritySelector(o));})("removeRequested",function(){let o=k(e).$implicit,a=x(5);return R(a.removeProjectFromPortfolio(o.id));}),c()();}if(n&2){let e=t.$implicit,i=t.$index,o=x(5);m(),N("project",e)("activePerspective",o.activePerspective)("portfolioThemeIds",o.portfolio.strategicThemeIds||Oa(8,nM))("portfolioId",o.portfolio.id)("portfolioOrder",e.portfolioOrder||i+1)("priority",e.priority||"medium")("isFirst",i===0)("isLast",i===o.projects.length-1);}}function rK(n,t){if(n&1&&(s(0,"div",67),be(1,aK,2,9,"div",69,Pt),c()),n&2){let e=x(4);m(),ye(e.projects);}}function sK(n,t){if(n&1&&(s(0,"div",43)(1,"div",61)(2,"mat-icon",62),u(3,"work"),c(),s(4,"span",63),u(5),c()(),s(6,"div",64),be(7,iK,5,5,"button",45,tN),c(),s(9,"div",65),S(10,oK,7,6,"div",66),S(11,rK,3,0,"div",67),c()()),n&2){let e=x(3);m(5),_e("",e.term.getLabel("projects")," in this portfolio"),m(2),ye(e.perspectives),m(3),M(e.projects.length===0?10:-1),m(),M(e.projects.length>0?11:-1);}}function lK(n,t){if(n&1&&(s(0,"as-split-area",41),S(1,nK,7,0,"div",42),S(2,sK,12,3,"div",43),c()),n&2){let e=x(2);
541N("size",70),m(),M(e.viewMode==="kanban"?1:-1),m(),M(e.viewMode==="list"?2:-1);}}function cK(n,t){n&1&&(s(0,"div",66)(1,"mat-icon",68),u(2,"checklist_rtl"),c(),s(3,"p"),u(4,"No compliance checklists yet. Click + to add one."),c()());}function pK(n,t){if(n&1&&(s(0,"span",81),u(1),c()),n&2){let e=x().$implicit;m(),G(e.description);}}function dK(n,t){if(n&1){let e=oe();s(0,"div",76),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.navigateToCompliance(o.id));}),s(1,"div",77)(2,"mat-icon",78),u(3,"checklist_rtl"),c(),s(4,"div",79)(5,"span",80),u(6),c(),S(7,pK,2,1,"span",81),c()(),s(8,"div",82),E("click",function(o){return o.stopPropagation();}),s(9,"button",83),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.navigateToCompliance(o.id));}),s(10,"mat-icon"),u(11,"open_in_new"),c()(),s(12,"button",84),E("click",function(o){let a=k(e).$implicit,r=x(5);return R(r.removeComplianceFromPortfolio(a.id,o));}),s(13,"mat-icon"),u(14,"remove"),c()()()();}if(n&2){let e=t.$implicit;m(6),G(e.name),m(),M(e.description?7:-1);}}function mK(n,t){if(n&1&&(s(0,"div",74),be(1,dK,15,2,"div",75,Pt),c()),n&2){let e=x(4);m(),ye(e.compliances);}}function uK(n,t){if(n&1){let e=oe();s(0,"as-split-area",41)(1,"div",43)(2,"div",61)(3,"mat-icon",62),u(4,"checklist_rtl"),c(),s(5,"span",63),u(6,"Compliance Lists"),c(),s(7,"span",21),u(8),c(),s(9,"div",6)(10,"button",72),E("click",function(){k(e);let o=x(3);return R(o.openComplianceSelectionModal());}),s(11,"mat-icon"),u(12,"add"),c()()()(),s(13,"div",73),S(14,cK,5,0,"div",66),S(15,mK,3,0,"div",74),c()()();}if(n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?55:100),m(8),G(e.compliances.length),m(6),M(e.compliances.length===0?14:-1),m(),M(e.compliances.length>0?15:-1);}}function fK(n,t){if(n&1){let e=oe();s(0,"div",66)(1,"mat-icon",68),u(2,"flag"),c(),s(3,"p"),u(4,"No strategic themes defined for this organisation yet."),c(),s(5,"button",88),E("click",function(){k(e);let o=x(4);return R(o.router.navigate(["/dashboard/strategic-themes"]));}),s(6,"mat-icon"),u(7,"add"),c(),u(8," Create themes "),c()();}}function hK(n,t){if(n&1&&(s(0,"span",95),u(1),c()),n&2){let e=x().$implicit;m(),G(e.timeframe);}}function _K(n,t){if(n&1){let e=oe();s(0,"button",92),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.toggleThemeLink(o.id));}),s(1,"mat-icon",93),u(2),c(),s(3,"span",94),u(4),c(),S(5,hK,2,1,"span",95),c();}if(n&2){let e=t.$implicit,i=x(5);Ue("theme-chip--linked",i.isThemeLinked(e.id)),N("disabled",i.isSavingThemes)("matTooltip",e.description||e.name),m(2),_e(" ",i.isThemeLinked(e.id)?"check_circle":"radio_button_unchecked"," "),m(2),G(e.name),m(),M(e.timeframe?5:-1);}}function gK(n,t){if(n&1&&(s(0,"div",89),u(1," Click a theme to link or unlink it from this portfolio. "),c(),s(2,"div",90),be(3,_K,6,7,"button",91,nN),c()),n&2){let e=x(4);m(3),ye(e.availableThemes);}}function xK(n,t){n&1&&(s(0,"div",87),ee(1,"mat-spinner",96),s(2,"span"),u(3,"Saving\u2026"),c()());}function CK(n,t){if(n&1){let e=oe();s(0,"as-split-area",41)(1,"div",43)(2,"div",61)(3,"mat-icon",62),u(4,"flag_circle"),c(),s(5,"span",63),u(6,"Strategic Themes"),c(),s(7,"span",21),u(8),c(),s(9,"button",85)(10,"mat-icon"),u(11,"info_outline"),c()(),s(12,"div",6)(13,"button",86),E("click",function(){k(e);let o=x(3);return R(o.router.navigate(["/dashboard/strategic-themes"]));}),s(14,"mat-icon"),u(15,"settings"),c()()()(),s(16,"div",73),S(17,fK,9,0,"div",66),S(18,gK,5,0),S(19,xK,4,0,"div",87),c()()();}if(n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?35:100),m(8),G((e.portfolio.strategicThemeIds||Oa(6,nM)).length),m(),N("matTooltip",e.safeTooltip),m(8),M(e.availableThemes.length===0?17:-1),m(),M(e.availableThemes.length>0?18:-1),m(),M(e.isSavingThemes?19:-1);}}function vK(n,t){if(n&1&&(s(0,"as-split-area",41)(1,"as-split",71),S(2,uK,16,4,"as-split-area",41),S(3,CK,20,7,"as-split-area",41),c()()),n&2){let e=x(2);N("size",30),m(),N("gutterSize",20),m(),M(e.panelVisibility.compliance?2:-1),m(),M(e.panelVisibility.themes?3:-1);}}function bK(n,t){if(n&1&&(s(0,"as-split",12),S(1,lK,3,3,"as-split-area",41),S(2,vK,4,4,"as-split-area",41),c()),n&2){let e=x();N("gutterSize",20),m(),M(e.panelVisibility.projects?1:-1),m(),M(e.panelVisibility.compliance||e.panelVisibility.themes?2:-1);}}var yK=[{phase:"initiation",colorClass:"phase-initiation"},{phase:"opportunity",colorClass:"phase-opportunity"},{phase:"feasibility",colorClass:"phase-feasibility"},{phase:"design",colorClass:"phase-design"}
541,{phase:"realization",colorClass:"phase-realization"},{phase:"closed",colorClass:"phase-closed"}],O0=class n{firestore=re(ai);auth=re(Il);route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);dialog=re(Ti);themeService=re(bf);orgContext=re(kl);term=re(lv);portfolio=null;projects=[];compliances=[];users=[];isLoading=!0;error=null;portfolioId=null;isCreationMode=!1;isSaving=!1;viewMode="kanban";availableThemes=[];isSavingThemes=!1;safeTooltip=wI;portfolioForm;detailForm;panelVisibility={projects:!0,compliance:!0,themes:!0};activePerspective="summary";perspectives=[{key:"summary",icon:"list_alt",label:"Summary & Notes"},{key:"strategic",icon:"gps_fixed",label:"Strategic Value"},{key:"customer",icon:"group",label:"Customer Impact"},{key:"process",icon:"autorenew",label:"Process & Org"},{key:"delivery",icon:"rocket_launch",label:"Delivery"},{key:"financial",icon:"monetization_on",label:"Financial Model"},{key:"architecture",icon:"architecture",label:"Architecture & IT"},{key:"risk",icon:"warning",label:"Risk & Compliance"}];subscriptions=[];constructor(){this.portfolioForm=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:[""]}),this.detailForm=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:[""],userId:[""]});}ngOnInit(){this.route.params.subscribe(t=>{this.portfolioId=t.id,this.portfolioId?(this.isCreationMode=!1,this.loadPortfolio(),this.loadUsers(),this.loadStrategicThemes()):(this.isCreationMode=!0,this.isLoading=!1);});}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe());}get kanbanColumns(){return yK.map(t=>({phase:t.phase,label:this.term.getPhaseLabel(t.phase),colorClass:t.colorClass,projects:this.projects.filter(e=>(e.phase??"initiation")===t.phase)}));}onKanbanDrop(t,e){return $(this,null,function*(){if(t.previousContainer===t.container){cI(t.container.data,t.previousIndex,t.currentIndex);return;}pI(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex);let i=t.container.data[t.currentIndex];if(i?.id){i.phase=e;try{yield hn(ge(this.firestore,"projects",i.id),{phase:e,updatedAt:Rn.now()});let o=this.term.getPhaseLabel(e);this.snackBar.open(`Moved to "${o}"`,"Close",{duration:2e3});}catch(o){console.error("Error updating project phase:",o),this.snackBar.open("Failed to update project phase","Close",{duration:3e3});}}});}togglePanel(t){this.panelVisibility[t]=!this.panelVisibility[t];}get visibleRightPanelKeys(){return["compliance","themes"].filter(t=>this.panelVisibility[t]);}stripHtml(t){return M0(t);}loadPortfolio(){return $(this,null,function*(){try{this.isLoading=!0,this.error=null;let t=ge(this.firestore,"portfolios",this.portfolioId),e=yield yt(t);if(!e.exists()){this.error="Portfolio not found",this.isLoading=!1;return;}this.portfolio=X({id:e.id},e.data()),this.detailForm.patchValue({name:this.portfolio.name??"",description:this.portfolio.description??"",userId:this.portfolio.userId??""}),this.portfolio.projectIds&&this.portfolio.projectIds.length>0?yield this.loadProjects():this.projects=[],this.portfolio.complianceIds&&this.portfolio.complianceIds.length>0?yield this.loadCompliances():this.compliances=[],this.isLoading=!1;}catch(t){console.error("Error loading portfolio:",t),this.error="Failed to load portfolio",this.isLoading=!1;}});}loadProjects(){return $(this,null,function*(){try{this.projects=[];for(let t of this.portfolio.projectIds){let e=ge(this.firestore,"projects",t),i=yield yt(e);if(i.exists()){let o=X({id:i.id},i.data());this.projects.push(o);}}}catch(t){console.error("Error loading projects:",t);}});}loadCompliances(){return $(this,null,function*(){try{this.compliances=[];for(let t of this.portfolio.complianceIds){let e=ge(this.firestore,"compliances",t),i=yield yt(e);if(i.exists()){let o=X({id:i.id},i.data());this.compliances.push(o);}}}catch(t){console.error("Error loading compliance checklists:",t);}});}loadUsers(){return $(this,null,function*(){try{let t=we(this.firestore,"users"),e=yield at(t);this.users=e.docs.map(i=>X({id:i.id},i.data()));}catch(t){console.error("Error loading users:",t);}});}loadStrategicThemes(){let t=this.orgContext.getActiveOrg()?.id,e=this.themeService.getThemes(t).subscribe({next:i=>{this.availableThemes=i;},error:i=>console.error("Error loading strategic themes:",i)});this.subscriptions.push(e);}isThemeLinked(t){return(this.portfolio?.strategicThemeIds??[]).includes(t);}toggleThemeLink(t){return $(this,null,function*(){if(this.portfolio?.id)try{this.isSavingThemes=!0;let e=this.portfolio.strategicThemeIds??[],i=e.includes(t)?e.filter(o=>o!==t):[...e,t];yield hn(ge(this.firestore,"portfolios",this.portfolio.id),{strategicThemeIds:i,updatedAt:Rn.now()}),this.portfolio=Ve(X({},this.portfolio),{strategicThemeIds:i});}catch(e){console.error("Error updating strategic theme link:",e),this.snackBar.open("Failed to update theme link","Close",{duration:3e3});}finally{this.isSavingThemes=!1;}});}updatePortfolio(){return $(this,null,function*(){if(!(this.detailForm.invali
541d||!this.portfolio))try{this.isSaving=!0;let t=this.detailForm.value,e=ge(this.firestore,"portfolios",this.portfolio.id);yield hn(e,{name:t.name,description:t.description??"",userId:t.userId??"",updatedAt:Rn.now()}),this.portfolio=Ve(X({},this.portfolio),{name:t.name,description:t.description,userId:t.userId}),this.snackBar.open("Portfolio updated","Close",{duration:2e3});}catch(t){console.error("Error updating portfolio:",t),this.snackBar.open("Failed to update portfolio","Close",{duration:3e3});}finally{this.isSaving=!1;}});}openEditDialog(){if(!this.portfolio)return;this.dialog.open(av,{width:"520px",maxWidth:"90vw",data:{portfolio:this.portfolio,users:this.users}}).afterClosed().subscribe(e=>{e&&(this.portfolio=e,this.detailForm.patchValue({name:e.name??"",description:e.description??"",userId:e.userId??""}));});}getUserDisplayName(t){let e=this.users.find(i=>i.id===t);return e?e.name||e.email:t;}navigateToProject(t){this.router.navigate(["/dashboard/project",t]);}createPortfolio(){return $(this,null,function*(){if(this.portfolioForm.invalid){this.portfolioForm.markAllAsTouched();return;}try{this.isSaving=!0;let t=this.auth.currentUser;if(!t){this.snackBar.open("You must be logged in to create a portfolio","Close",{duration:3e3});return;}let e=Rn.now(),i={name:this.portfolioForm.value.name,description:this.portfolioForm.value.description||"",projectIds:[],createdAt:e,updatedAt:e,userId:t.uid},o=we(this.firestore,"portfolios"),a=yield Ht(o,i);this.snackBar.open("Portfolio created successfully!","Close",{duration:3e3}),this.router.navigate(["/dashboard/portfolio",a.id]);}catch(t){console.error("Error creating portfolio:",t),this.snackBar.open("Failed to create portfolio. Please try again.","Close",{duration:3e3});}finally{this.isSaving=!1;}});}openProjectSelectionModal(){if(!this.portfolio)return;this.dialog.open(iv,{width:"700px",maxWidth:"90vw",data:{portfolio:this.portfolio,currentProjectIds:this.portfolio.projectIds||[]}}).afterClosed().subscribe(e=>{e===!0&&this.loadPortfolio();});}removeProjectFromPortfolio(t,e){return $(this,null,function*(){if(e?.stopPropagation(),!(!this.portfolio||!t))try{let i=this.portfolio.projectIds.filter(a=>a!==t),o=ge(this.firestore,"portfolios",this.portfolio.id);yield hn(o,{projectIds:i,updatedAt:Rn.now()}),this.snackBar.open("Project removed from portfolio","Close",{duration:3e3}),this.loadPortfolio();}catch(i){console.error("Error removing project from portfolio:",i),this.snackBar.open("Failed to remove project from portfolio","Close",{duration:3e3});}});}openComplianceSelectionModal(){if(!this.portfolio)return;this.dialog.open(ov,{width:"700px",maxWidth:"90vw",data:{portfolio:this.portfolio,currentComplianceIds:this.portfolio.complianceIds||[]}}).afterClosed().subscribe(e=>{e===!0&&this.loadPortfolio();});}removeComplianceFromPortfolio(t,e){return $(this,null,function*(){if(e.stopPropagation(),!(!this.portfolio||!t))try{let i=(this.portfolio.complianceIds||[]).filter(a=>a!==t),o=ge(this.firestore,"portfolios",this.portfolio.id);yield hn(o,{complianceIds:i,updatedAt:Rn.now()}),this.snackBar.open("Compliance checklist removed from portfolio","Close",{duration:3e3}),this.loadPortfolio();}catch(i){console.error("Error removing compliance checklist from portfolio:",i),this.snackBar.open("Failed to remove compliance checklist from portfolio","Close",{duration:3e3});}});}navigateToCompliance(t){this.router.navigate(["/dashboard/compliance",t]);}goBack(){this.router.navigate(["/dashboard/portfolios"]);}moveProjectUp(t,e){if(e?.stopPropagation(),t>0){let i=this.projects[t];this.projects[t]=this.projects[t-1],this.projects[t-1]=i,this.updateProjectOrder();}}moveProjectDown(t,e){if(e?.stopPropagation(),t<this.projects.length-1){let i=this.projects[t];this.projects[t]=this.projects[t+1],this.projects[t+1]=i,this.updateProjectOrder();}}editProject(t,e){e.stopPropagation(),this.router.navigate(["/dashboard/project",t.id]);}openPrioritySelector(t,e){e?.stopPropagation();let i=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],o=t.priority||"medium",r=(i.findIndex(l=>l.value===o)+1)%i.length;t.priority=i[r].value,this.updateProjectPriority(t);}getPriorityLabel(t){return{low:"Low",medium:"Medium",high:"High"}[t]||"Medium";}
541updateProjectOrder(){this.projects.forEach((t,e)=>{t.portfolioOrder=e+1;}),this.snackBar.open("Project order updated","Close",{duration:2e3});}updateProjectPriority(t){return $(this,null,function*(){try{if(!t.id)return;let e=ge(this.firestore,"projects",t.id);yield hn(e,{priority:t.priority,updatedAt:Rn.now()}),this.snackBar.open(`Project priority updated to ${this.getPriorityLabel(t.priority)}`,"Close",{duration:2e3});}catch(e){console.error("Error updating project priority:",e),this.snackBar.open("Failed to update project priority","Close",{duration:3e3});}});}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-portfolio"]],decls:18,vars:9,consts:[[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-icon-button","","matTooltip","Edit portfolio details"],["mat-icon-button","","matTooltip","Back to portfolios"],[1,"div-content"],[1,"state-container"],[1,"creation-container"],["direction","horizontal",3,"gutterSize"],[1,"subtitle"],[1,"div-panel-toggles"],["mat-icon-button","","matTooltip","Show/hide projects",3,"click"],["mat-icon-button","","matTooltip","Show/hide compliance lists",3,"click"],["mat-icon-button","","matTooltip","Show/hide strategic themes",3,"click"],[1,"toolbar-chips"],[1,"safe-badge"],[1,"view-toggle"],[1,"title-badge"],["mat-icon-button","","color","primary",3,"click","matTooltip"],["aria-label","View mode",3,"ngModelChange","ngModel"],["value","list","matTooltip","List view"],["value","kanban","matTooltip","Kanban view"],["mat-icon-button","","matTooltip","Edit portfolio details",3,"click"],["mat-icon-button","","matTooltip","Back to portfolios",3,"click"],["color","warn",2,"font-size","48px","width","48px","height","48px"],["mat-raised-button","","color","primary",3,"click"],[1,"creation-form-card"],["mat-card-avatar",""],[3,"ngSubmit","formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","Enter portfolio name","required",""],["matSuffix",""],["matInput","","formControlName","description","placeholder","Enter portfolio description","rows","3"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["diameter","20",1,"inline-spinner"],[3,"size"],[1,"kanban-wrapper"],[1,"container-right-panel"],[1,"perspective-switcher","kanban-perspective-switcher"],[1,"perspective-pill",3,"perspective-pill--active","matTooltip"],["cdkDropListGroup","",1,"kanban-board"],[1,"kanban-column"],[1,"perspective-pill",3,"click","matTooltip"],[1,"pill-icon"],[1,"pill-label"],[1,"kanban-col-header",3,"ngClass"],[1,"kanban-col-title"],[1,"kanban-col-badge"],["cdkDropList","",1,"kanban-col-body",3,"cdkDropListDropped","cdkDropListData"],[1,"kanban-empty-col"],["cdkDrag","","cdkDragBoundary",".kanban-board",1,"kanban-card"],[4,"cdkDragPlaceholder"],["cdkDragHandle","",1,"kanban-drag-handle"],[3,"editRequested","removeRequested","project","activePerspective","portfolioThemeIds","portfolioId","portfolioOrder","priority","isFirst","isLast"],[1,"kanban-card-placeholder"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],[1,"perspective-switcher"],[1,"container-tile-body-strong"],[1,"empty-state"],[1,"portfolio-list"],[1,"empty-icon"],[1,"portfolio-item"],[3,"moveUp","moveDown","editRequested","removeRequested","project","activePerspective","portfolioThemeIds","portfolioId","portfolioOrder","priority","isFirst","isLast"],["direction","vertical",3,"gutterSize"],["mat-icon-button","","matTooltip","Add compliance list",3,"click"],[1,"container-tile-body-strong","sp-list-body"],[1,"compliance-simple-list"],[1,"compliance-row"],[1,"compliance-row",3,"click"],[1,"compliance-row-main"],[1,"compliance-row-icon"],[1,"compliance-row-text"],[1,"compliance-row-name"],[1,"compliance-row-desc"],[1,"compliance-row-actions",3,"click"],["mat-icon-button","","matTooltip","View Checklist",3,"click"],["mat-icon-button","","color","warn","matTooltip","Remove from Portfolio",3,"click"],["mat-icon-button","","matTooltipShowDelay","200",1,"info-btn",3,"matTooltip"],["mat-icon-button","","matTooltip","Manage strategic themes",3,"click"],[1,"saving-themes-indicator"],["mat-stroked-button","",2,"margin-top","8px",3,"click"],[1,"themes-instru
541ctions"],[1,"themes-chip-list"],[1,"theme-chip",3,"theme-chip--linked","disabled","matTooltip"],[1,"theme-chip",3,"click","disabled","matTooltip"],[1,"theme-chip-icon"],[1,"theme-chip-name"],[1,"theme-chip-timeframe"],["diameter","16"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-toolbar",2)(3,"div",3)(4,"mat-icon",4),u(5,"folder"),c(),s(6,"div"),S(7,LY,4,1),S(8,zY,2,0,"div",5),c()(),S(9,$Y,31,22),s(10,"div",6),S(11,VY,3,0,"button",7),S(12,GY,3,0,"button",8),c()()(),s(13,"div",9),S(14,qY,4,0,"div",10),S(15,JY,11,1,"div",10),S(16,YY,32,8,"div",11),S(17,bK,3,3,"as-split",12),c()()),e&2&&(m(7),M(i.isCreationMode?-1:7),m(),M(i.isCreationMode?8:-1),m(),M(!i.isCreationMode&&!i.isLoading&&i.portfolio?9:-1),m(2),M(!i.isCreationMode&&!i.isLoading&&i.portfolio?11:-1),m(),M(i.isCreationMode?-1:12),m(2),M(i.isLoading?14:-1),m(),M(i.error&&!i.isLoading?15:-1),m(),M(i.isCreationMode&&!i.isLoading?16:-1),m(),M(i.portfolio&&!i.isLoading?17:-1));},dependencies:[ut,Kr,gn,Nn,Ft,Tt,Mn,w1,Po,tn,An,Wn,ha,hd,F1,tI,gd,xd,z1,_d,$e,Qe,Qt,We,Xe,yi,Ta,Ls,Fi,zi,Ua,Gt,Vt,Wt,ti,ur,jt,Xt,bi,ln,yn,$t,_n,xf,_f,gf,vr,cr,Cr,sv,q1,V1,G1,$1,J1,wT,bl],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
541.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:16px;font-size:40px;width:40px;height:40px;
541display:flex;align-items:center;color:#465d91}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-chips[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 16px;flex:1}.toolbar-chips[_ngcontent-%COMP%] mat-chip-set[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:4px}.div-panel-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:4px;padding:0 16px}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-inactive[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.state-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;text-align:center;height:100%}.state-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-bottom:16px}.state-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#0009;margin:8px 0 24px}.state-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:8px 0}.creation-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:center;padding:24px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%]{width:100%;max-width:600px;background-color:#fff;box-shadow:0 2px 8px #0000001a;border-left:4px solid #465d91}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{margin:0 0 16px;background-color:#00000005;padding:10px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-icon[mat-card-avatar][_ngcontent-%COMP%]{background:#465d91;color:#fff;font-size:24px;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{color:#000028;font-weight:500;font-size:1.25rem;margin:0}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%]{color:#0009;margin-top:4px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding-top:16px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%]{padding:16px 24px 24px;gap:12px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:8px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] .inline-spinner[_ngcontent-%COMP%]{margin-right:8px}.creation-container[_ngcontent-%COMP%] .creation-form-card[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:56px;max-height:56px;flex-shrink:0;gap:8px}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:6px}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.title-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;border-radius:11px;padding:0 6px;font-size:.75em;font-weight:700;background-color:#ffffff40;color:#fff;flex-shrink:0}.sp-list-body[_ngcontent-%COMP%]{padding:0!important}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 16px;text-align:center}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{font-size:3rem;width:3rem;height:3rem;color:#6c757d;margin-bottom:12px}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#6c757d;margin:0;font-size:.9em}.portfolio-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.portfolio-item[_ngcontent-%COMP%]{padding:12px 10px;border-bottom:1px solid rgba(0,0,0,.08);transition:background-color .15s ease}.portfolio-item[_ngcontent-%COMP%]:first-child{border-top:1px solid rgba(0,0,0,.08)}.portfolio-item[_ngcontent-%COMP%]:hover{background-color:#00000005}.portfolio-item[_ngcontent-%COMP%] .item-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.portfolio-item[_ngcontent-%COMP%] .item-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.portfolio-item[_ngcontent-%COMP%] .item-header[_ngcontent-%COMP%] .item-title[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600;color:#2c3e50;line-height:1.3;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.portfolio-item[_ngcontent-%COMP%] .item-header[_ngcontent-%COMP%] .navigate-project-btn[_ngcontent-%COMP%]{flex-shrink:0;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center}.portfolio-item[_ngcontent-%COMP%] .item-header[_ngcontent-%COMP%] .navigate-project-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;line-height:16px;color:#00000073}.portfolio-item[_ngcontent-%COMP%] .item-header[_ngcontent-%COMP%] .navigate-project-btn[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#465d91}.portfolio-item[_ngcontent-%COMP%] .item-header[_ngcontent-%COMP%] .item-badges[_ngcontent-%COMP%]{display:flex;gap:6px;flex:1 1 auto;flex-wrap:wrap;justify-content:flex-end}.item-badges[_ngcontent-%COMP%]{display:flex;gap:6px;flex-shrink:0;flex-wrap:wrap}.priority-badge[_ngcontent-%COMP%]{padding:2px 10px;border-radius:20px;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.4px;
541cursor:pointer}.priority-badge.priority-high[_ngcontent-%COMP%]{background-color:#fee;color:#dc3545;border:1px solid #f5c6cb}.priority-badge.priority-medium[_ngcontent-%COMP%]{background-color:#fff8e1;color:#856404;border:1px solid #ffeaa7}.priority-badge.priority-low[_ngcontent-%COMP%]{background-color:#f0f9f0;color:#155724;border:1px solid #c3e6cb}.category-badge[_ngcontent-%COMP%]{padding:2px 10px;border-radius:20px;font-size:.72rem;font-weight:500;background-color:#e9ecef;color:#495057;border:1px solid #ced4da}.source-badge[_ngcontent-%COMP%]{padding:2px 10px;border-radius:20px;font-size:.72rem;font-weight:500;background-color:#e3f2fd;color:#465d91;border:1px solid #bbdefb}.editable-fields-row[_ngcontent-%COMP%]{display:flex;gap:12px}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%]{flex:1}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display[_ngcontent-%COMP%]{cursor:pointer;padding:6px 8px;border-radius:4px;transition:background-color .15s ease}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display.static[_ngcontent-%COMP%]{cursor:default}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display.static[_ngcontent-%COMP%]:hover{background-color:transparent}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:.85rem;font-weight:500;color:#465d91;margin-bottom:2px}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display[_ngcontent-%COMP%] .field-label[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display[_ngcontent-%COMP%] .field-text[_ngcontent-%COMP%]{margin:0;color:#6c757d;line-height:1.4;font-size:.8rem}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-display[_ngcontent-%COMP%] .field-text-truncated[_ngcontent-%COMP%]{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-edit[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-edit[_ngcontent-%COMP%] .edit-actions[_ngcontent-%COMP%]{display:flex;gap:4px;justify-content:flex-end;margin-top:4px}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-edit[_ngcontent-%COMP%] .edit-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#0000008a}.editable-fields-row[_ngcontent-%COMP%] .editable-field[_ngcontent-%COMP%] .field-edit[_ngcontent-%COMP%] .edit-actions[_ngcontent-%COMP%] button[color=primary][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91}.perspective-switcher[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;padding:12px 16px;background:#00000005;border-bottom:1px solid rgba(0,0,0,.08);flex-shrink:0}.perspective-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid rgba(0,0,0,.14);border-radius:20px;background:#fff;cursor:pointer;font-size:.875rem;font-weight:500;color:#0009;transition:background .15s,color .15s,border-color .15s;white-space:nowrap}.perspective-pill[_ngcontent-%COMP%]:hover:not(.perspective-pill--active){background:#0000000d;border-color:#00000040}.perspective-pill.perspective-pill--active[_ngcontent-%COMP%]{background:#465d91;border-color:#465d91;color:#fff}.perspective-pill.perspective-pill--active[_ngcontent-%COMP%] .pill-icon[_ngcontent-%COMP%]{color:#fff!important}.perspective-pill[_ngcontent-%COMP%] .pill-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;line-height:18px!important;color:#0000008c!important;flex-shrink:0;vertical-align:middle}.perspective-pill[_ngcontent-%COMP%] .pill-label[_ngcontent-%COMP%]{font-size:.85rem;letter-spacing:.2px}.item-card-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;padding-top:0}.item-card-row[_ngcontent-%COMP%] .project-summary-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0}.item-card-row[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;flex-shrink:0}.item-card-row[_ngcontent-%COMP%] .item-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{opacity:.4}.compliance-simple-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.compliance-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;cursor:pointer;border-left:3px solid transparent;border-bottom:1px solid rgba(0,0,0,.05);transition:background-color .15s ease,border-left .15s ease}.compliance-row[_ngcontent-%COMP%]:hover{background-color:#0000000a;border-left-color:#465d91}.compliance-row[_ngcontent-%COMP%] .compliance-row-main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.compliance-row[_ngcontent-%COMP%] .compliance-row-main[_ngcontent-%COMP%] .compliance-row-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#465d91;flex-shrink:0}.compliance-row[_ngcontent-%COMP%] .compliance-row-main[_ngcontent-%COMP%] .compliance-row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.compliance-row[_ngcontent-%COMP%] .compliance-row-main[_ngcontent-%COMP%] .compliance-row-text[_ngcontent-%COMP%] .compliance-row-name[_ng
541content-%COMP%]{font-weight:500;font-size:.9rem;color:#2c3e50;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compliance-row[_ngcontent-%COMP%] .compliance-row-main[_ngcontent-%COMP%] .compliance-row-text[_ngcontent-%COMP%] .compliance-row-desc[_ngcontent-%COMP%]{font-size:.78rem;color:#6c757d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compliance-row[_ngcontent-%COMP%] .compliance-row-actions[_ngcontent-%COMP%]{display:flex;gap:2px;flex-shrink:0}.div-form-element[_ngcontent-%COMP%]{margin:0;width:100%;overflow-x:hidden;padding-bottom:4px}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.form-save-row[_ngcontent-%COMP%]{padding-top:8px} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter{background-color:transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}.container-tile-title-strong[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .kanban-panel-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff!important;opacity:1}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}.themes-instructions[_ngcontent-%COMP%]{font-size:.78rem;color:#888;padding:8px 12px 4px;font-style:italic}.themes-chip-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;padding:4px 8px 8px}.theme-chip[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 10px;border:none;background:transparent;cursor:pointer;border-radius:8px;text-align:left;transition:background-color .12s ease;width:100%}.theme-chip[_ngcontent-%COMP%]:hover:not(:disabled){background-color:#0000000a}.theme-chip[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.theme-chip--linked[_ngcontent-%COMP%]{background-color:rgba(var(--primary-rgb, 63, 81, 181),.08)}.theme-chip--linked[_ngcontent-%COMP%] .theme-chip-icon[_ngcontent-%COMP%]{color:#3949ab}.theme-chip--linked[_ngcontent-%COMP%] .theme-chip-name[_ngcontent-%COMP%]{font-weight:600;color:#1a237e}.theme-chip-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#9e9e9e;flex-shrink:0}.theme-chip-name[_ngcontent-%COMP%]{flex:1;font-size:.85rem;color:#333;line-height:1.3}.theme-chip-timeframe[_ngcontent-%COMP%]{font-size:.72rem;color:#888;white-space:nowrap;background:#0000000f;padding:1px 5px;border-radius:4px}.saving-themes-indicator[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:4px 12px;font-size:.8rem;color:#888}.info-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#9e9e9e}@media(max-width:768px){.component-layout[_ngcontent-%COMP%]{overflow:auto}.div-toolbar[_ngcontent-%COMP%]{height:auto;padding:12px 16px}.objecttitle[_ngcontent-%COMP%]{font-size:large}.editable-fields-row[_ngcontent-%COMP%]{flex-direction:column}}.view-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 12px;gap:4px;flex-shrink:0}.view-toggle[_ngcontent-%COMP%] button[color=primary][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important}.view-toggle[_ngcontent-%COMP%] .mat-button-toggle-group{border-radius:8px;border:1px solid rgba(0,0,0,.15);overflow:hidden}.view-toggle[_ngcontent-%COMP%] .mat-button-toggle{background:transparent}.view-toggle[_ngcontent-%COMP%] .mat-button-toggle mat-icon{color:#0000008a}.view-toggle[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked{background:#465d91}.view-toggle[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked mat-icon{color:#fff}.view-toggle[_ngcontent-%COMP%] .mat-button-toggle-button{height:36px;padding:0 10px}.div-toolbar[_ngcontent-%COMP%] > .div-button-right[_ngcontent-%COMP%]{margin-left:auto}.safe-badge[_ngcontent-%COMP%]{background-color:#ff6f00!important;color:#fff!important;font-weight:700;font-size:.7rem;letter-spacing:.5px}.kanban-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background:#fff;border-radius:10px;overflow:hidden}.kanban-panel-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:56px;max-height:56px;flex-shrink:0;gap:8px}.kanban-panel-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:6px}.kanban-panel-header[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.kanban-board[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:12px;padding:12px;overflow-x:auto;overflow-y:auto;flex:1 1 auto;align-items:stretch}.kanban-board[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}.kanban-board[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#0000000d;border-radius:4px}.kanban-board[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#00000040;border-radius:4px}.kanban-board[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#00000073}.kanban-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:0 0 650px;width:650px;border-radius:8px;background:#f5f6fa;overflow:hidden;box-shadow:0 1px 4px #00000014}.kanban-col-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;font-weight:600;font-size:.78rem;letter-spacing:.3px;text-transform:uppercase;color:#fff;flex-shrink:0}.kanban-col-title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kanban-col-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:10px;padding:0 5px;font-size:.72rem;font-weight:700;background-color:#ffffff40;color:#fff;margin-left:6px;flex-shrink:0}.phase-initiation[_ngcontent-%COMP%], .phase-opportunity[_ngcontent-%COMP%], .phase-feasibility[_ngcontent-%COMP%], .phase-design[_ngcontent-%COMP%], .phase-real
541ization[_ngcontent-%COMP%], .phase-closed[_ngcontent-%COMP%]{background-color:#000060}.kanban-col-body[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:8px;min-height:80px}.kanban-col-body.cdk-drop-list-dragging[_ngcontent-%COMP%] .kanban-card[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.kanban-empty-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:24px 8px;color:#bbb;font-size:.78rem;border:2px dashed #ddd;border-radius:6px;flex:1}.kanban-empty-col[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px;color:#ccc}.kanban-card[_ngcontent-%COMP%]{background:#fff;border-radius:6px;box-shadow:0 1px 4px #0000001a;border:1.5px solid rgba(0,0,0,.2);cursor:grab;transition:box-shadow .15s ease,transform .15s ease}.kanban-card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-1px)}.kanban-card.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .3s cubic-bezier(0,0,.2,1)}.kanban-card.cdk-drag-preview[_ngcontent-%COMP%]{box-shadow:0 8px 24px #0003;border-radius:6px;cursor:grabbing;opacity:.9}.kanban-card-placeholder[_ngcontent-%COMP%]{background:#e8f0fe;border:2px dashed #465d91;border-radius:6px;min-height:72px;transition:all .25s ease}.kanban-card-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;margin-bottom:6px}.kanban-card-name[_ngcontent-%COMP%]{flex:1;font-weight:600;font-size:.85rem;color:#2c3e50;line-height:1.3;word-break:break-word}.kanban-open-btn[_ngcontent-%COMP%]{flex-shrink:0;width:28px!important;height:28px!important;line-height:28px!important}.kanban-open-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px!important;width:16px!important;height:16px!important;color:#0006}.kanban-open-btn[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#465d91}.kanban-card-meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}.kanban-card-desc[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:#6c757d;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.kanban-drag-handle[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:18px;cursor:grab;background:#00000008;border-bottom:1px solid rgba(0,0,0,.06);border-radius:6px 6px 0 0;color:#00000040;transition:background .12s}.kanban-drag-handle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#00000040;transform:rotate(90deg)}.kanban-drag-handle[_ngcontent-%COMP%]:hover{background:#00000012;color:#00000073}.kanban-drag-handle[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#00000073}.kanban-drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.kanban-perspective-switcher[_ngcontent-%COMP%]{background:#0000000a!important;border-bottom:1px solid rgba(0,0,0,.1);flex-shrink:0}.kanban-card[_ngcontent-%COMP%] app-project-perspectives-card{display:block}"]});};var iM=(n,t)=>t.id;function PK(n,t){n&1&&(s(0,"div",23),ee(1,"mat-spinner",35),s(2,"span"),q(3,8),c()());}function wK(n,t){if(n&1&&(s(0,"span",38),u(1),c()),n&2){let e=x().$implicit;m(),_e(" \u2014 ",e.email);}}function SK(n,t){if(n&1&&(s(0,"mat-option",37),u(1),S(2,wK,2,1,"span",38),c()),n&2){let e=t.$implicit;N("value",e.id),m(),_e(" ",e.name," "),m(),M(e.email?2:-1);}}function MK(n,t){if(n&1&&(s(0,"mat-form-field",20)(1,"mat-label"),q(2,9),c(),s(3,"mat-select",36),be(4,SK,3,3,"mat-option",37,iM),c(),s(6,"mat-error"),q(7,10),c()()),n&2){let e=x();m(4),ye(e.orgUsers);}}function OK(n,t){n&1&&(s(0,"div",23),ee(1,"mat-spinner",35),s(2,"span"),q(3,11),c()());}function EK(n,t){if(n&1&&(s(0,"mat-option",37),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function TK(n,t){if(n&1&&(s(0,"mat-form-field",20)(1,"mat-label"),q(2,12),c(),s(3,"mat-select",39),be(4,EK,2,2,"mat-option",37,iM),c(),s(6,"mat-error"),q(7,13),c()()),n&2){let e=x(2);m(4),ye(e.valueStreams);}}function IK(n,t){if(n&1&&(s(0,"div",19),S(1,OK,4,0,"div",23)(2,TK,8,0,"mat-form-field",20),c()),n&2){let e=x();m(),M(e.loadingVs?1:2);}}function kK(n,t){n&1&&(s(0,"div",23),ee(1,"mat-spinner",35),s(2,"
541span"),q(3,14),c()());}function RK(n,t){n&1&&(s(0,"p",29),q(1,15),c());}function NK(n,t){if(n&1&&(s(0,"span",44),u(1),c()),n&2){let e=x().$implicit;m(),G(e.identifier);}}function AK(n,t){if(n&1){let e=oe();s(0,"div",41),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.toggleProject(o));}),s(1,"mat-checkbox",42),E("change",function(){let o=k(e).$implicit,a=x(2);return R(a.toggleProject(o));})("click",function(o){return o.stopPropagation();}),c(),s(2,"span",43),u(3),c(),S(4,NK,2,1,"span",44),c();}if(n&2){let e=t.$implicit;m(),N("checked",e.selected),m(2),G(e.name),m(),M(e.identifier?4:-1);}}function DK(n,t){if(n&1&&(s(0,"div",30),be(1,AK,5,3,"div",40,iM),c()),n&2){let e=x();m(),ye(e.orphanProjects);}}function jK(n,t){n&1&&ee(0,"mat-spinner",34);}function LK(n,t){n&1&&(s(0,"mat-icon"),u(1,"add"),c());}var cv=class n{dialogRef=re(Li);data=re(fo);firestore=re(ai);orgCtx=re(kl);authSvc=re(Oo);valueStreams=[];orphanProjects=[];orgUsers=[];loadingVs=!1;loadingProjects=!1;loadingUsers=!1;saving=!1;form=new Ri({name:new st("",Ye.required),description:new st(""),valueStreamId:new st(null),ownerId:new st(null,Ye.required)});get isSafe(){return this.orgCtx.getActiveOrg()?.methodology==="safe";}get orgId(){return this.data.orgId;}get selectedProjectIds(){return this.orphanProjects.filter(t=>t.selected).map(t=>t.id);}ngOnInit(){return $(this,null,function*(){yield Promise.all([this.loadOrphanProjects(),this.loadOrgUsers(),this.isSafe?this.loadValueStreams():Promise.resolve()]),this.isSafe&&(this.form.controls.valueStreamId.setValidators(Ye.required),this.form.controls.valueStreamId.updateValueAndValidity());});}loadOrgUsers(){return $(this,null,function*(){if(this.orgId){this.loadingUsers=!0;try{let t=yield at(we(this.firestore,`organisations/${this.orgId}/organisationUsers`));this.orgUsers=t.docs.map(a=>({id:a.id,name:a.data().name??a.id,email:a.data().email})).sort((a,r)=>a.name.localeCompare(r.name));let i=this.authSvc.getUserLoggedIn()?.uid??null,o=this.orgUsers.some(a=>a.id===i);this.form.controls.ownerId.setValue(o?i:this.orgUsers[0]?.id??null);}finally{this.loadingUsers=!1;}}});}loadValueStreams(){return $(this,null,function*(){if(this.orgId){this.loadingVs=!0;try{let t=yield at(we(this.firestore,`organisations/${this.orgId}/valueStreams`));this.valueStreams=t.docs.sort((e,i)=>e.id.localeCompare(i.id)).map(e=>X({id:e.id},e.data()));}finally{this.loadingVs=!1;}}});}loadOrphanProjects(){return $(this,null,function*(){this.loadingProjects=!0;try{let t=yield at(we(this.firestore,"projects"));this.orphanProjects=t.docs.filter(e=>!e.data().portfolioId).map(e=>({id:e.id,name:e.data().name??e.id,identifier:e.data().identifier,selected:!1})).sort((e,i)=>e.name.localeCompare(i.name));}finally{this.loadingProjects=!1;}});}toggleProject(t){t.selected=!t.selected;}create(){return $(this,null,function*(){if(!(this.form.invalid||this.saving)){this.saving=!0;try{let{name:t,description:e,valueStreamId:i,ownerId:o}=this.form.value,a=this.orgUsers.find(p=>p.id===o),r=yield Ht(we(this.firestore,"portfolios"),Ve(X({name:t,description:e??"",organisationId:this.orgId,projectIds:this.selectedProjectIds,ownerId:o??null,ownerName:a?.name??null},this.isSafe&&i?{valueStreamId:i}:{}),{createdAt:Rn.now(),updatedAt:Rn.now()})),l=this.selectedProjectIds.map(p=>Dt(ge(this.firestore,"projects",p),{portfolioId:r.id,portfolioName:t},{merge:!0}));yield Promise.all(l),this.dialogRef.close({portfolioId:r.id,portfolioName:t});}catch(t){console.error("portfolio creation error",t);}finally{this.saving=!1;}}});}cancel(){this.dialogRef.close(null);}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-portfolio-create-dialog"]],decls:42,vars:7,consts:()=>{let t;t="New Portfolio";let e;e="Portfolio Name";let i;i="Name is required";let o;o="Description";let a;a="Assign orphaned projects";let r;r=" These projects are not yet linked to any portfolio. Select the ones to add to this new portfolio. ";let l;l=" Cancel ";let p;p="Create Portfolio";let d;d="Loading users\u2026";let f;f="Owner";let h;h="Owner is required";let g;g="Loading value streams\u2026";let b;b="Value Stream";let w;w="Value stream is required for SAFe";let T;T="Loading projects\u2026";let O;return O="No unassigned projects found.",[t,e,i,o,a,r,l,p,d,f,h,g,b,w,T,O,["mat-dialog-title",""],[1,"dialog-title-icon"],["id","portfolio-dialog-form",3,"ngSubmit","formGroup"],[1,"field-row"],["appearance","fill",1,"full-width"],["matInput","","formControlName","name","autocomplete","off"],["matInput","","formControlName","description","rows","3"],[1,"inline-spinner"],[1,"section-divider"],[1,"section-header"],[1,"section-icon"],[1,"section-title"],[1,"section-hint"],[1,"empty-hint"],[1,"project-list"],["align","end"],["mat-button","","type","button",3,"click","disabled"],["mat-flat-button","","color","primary","type","submit","form","portfolio-dialog-form",3,"disabled"],["diameter","18"],["diameter","20"],["formControlName","ownerId"],[3,"value"],[1,"user-email"],["formControlName","valueStreamId"],[1,"project-row"],[1,"project-row",3,"click"],[3,"change","click","checked"],[1,"project-name"],[1,"project-identifier"]];},template:function(e,i){e&1&&(s(0,"h2",16)(1,"mat-icon",17),u(2,"folder_special"),c(),s(3,"span"),q(4,0),c()(),s(5,"mat-dialog-content")(6,"form",18),E("ngSubmit",function(){return i.create();}),s(7,"div",19)(8,"mat-form-field",20)(9,"mat-label"),q(10,1),c(),ee(11,"input",21),s(12,"mat-error"),q(13,2),c()()(),s(14,"div",19)(15,"mat-form-field",20)(16,"mat-label"),q(17,3),c(),ee(18,"textarea",22),c()(),s(19,"div",19),S(20,PK,4,0,"div",23)(21,MK,8,0,"mat-form-field",20),c(),S(22,IK,3,1,"div",19),c(),ee(23,"mat-divider",24),s(24,"div",25)(25,"mat-icon",26),u(26,"category"),c(),s(27,"span",27),q(28,4),c()(),s(29,"p",28),q(30,5),c(),S(31,kK,4,0,"div",23)(32,RK,2,0,"p",29)(33,DK,3,0,"div",30),c(),s(34,"mat-dialog-actions",31)(35,"button",32),E("click",function(){return i.cancel();}),q(36,6),c(),s(37,"button",33),S(38,jK,1,0,"mat-spinner",34)(39,LK,2,0,"mat-icon"),s(40,"span"),q(41,7),c()()()),e&2&&(m(6),N("formGroup",i.form),m(14),M(i.loadingUsers?20:21),m(2),M(i.isSafe?22:-1),m(9),M(i.loadingProjects?31:i.orphanProjects.length===0?32:33),m(4),N("disabled",i.saving),m(2),N("disabled",i.form.invali
541d||i.saving),m(),M(i.saving?38:39));},dependencies:[ut,tn,Nn,Ft,Tt,Mn,An,Wn,Zi,Bo,Vo,$o,Gt,Vt,Wt,ti,jt,Xt,bi,So,Ei,$e,Qe,We,Xe,Fi,zi,ra,xr,Ua,Ml],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
541.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}h2[mat-dialog-title][_ngcontent-%COMP%] .dialog-title-icon[_ngcontent-%COMP%]{color:#465d91}mat-dialog-content[_ngcontent-%COMP%]{min-width:480px;max-width:600px;padding-top:8px!important}.full-width[_ngcontent-%COMP%]{width:100%}.field-row[_ngcontent-%COMP%]{margin-bottom:4px}.user-email[_ngcontent-%COMP%]{font-size:.8rem;color:#00000080}.inline-spinner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;color:#0000008c;font-size:.87rem;margin:8px 0 12px}.section-divider[_ngcontent-%COMP%]{margin:12px 0 16px}.section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:4px}.section-header[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{font-size:1.1rem!important;width:1.1rem!important;height:1.1rem!important;color:#465d91}.section-header[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:#000000bf}.section-hint[_ngcontent-%COMP%]{font-size:.8rem;color:#00000080;margin:0 0 12px}.empty-hint[_ngcontent-%COMP%]{font-size:.85rem;color:#00000073;font-style:italic;margin:0}.project-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:240px;overflow-y:auto;border:1px solid rgba(0,0,0,.1);border-radius:8px;padding:4px}.project-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:6px;cursor:pointer;transition:background .1s}.project-row[_ngcontent-%COMP%]:hover{background:#0000000a}.project-row[_ngcontent-%COMP%] .project-name[_ngcontent-%COMP%]{flex:1;font-size:.88rem;color:#000c}.project-row[_ngcontent-%COMP%] .project-identifier[_ngcontent-%COMP%]{font-size:.75rem;color:#0006;font-family:monospace;background:#0000000d;padding:1px 5px;border-radius:4px}"]});};var pv=class n extends Wa{constructor(){super();}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var dv=class n{constructor(t,e,i,o){this.dataSource=t;this.dialog=e;this.orgCtx=i;this.snackBar=o;}dataSource;dialog;orgCtx;snackBar;showNewButton=!1;collectionPath="portfolios";documentRoute="dashboard/portfolio";displayedColumns=["creationDate","name","description"];displayedColumnsHeaders=["Date","Name","Description"];ngOnInit(){}clickNewPortfolio(){let t=this.orgCtx.getActiveOrg();this.dialog.open(cv,{width:"600px",maxWidth:"95vw",maxHeight:"90vh",disableClose:!1,data:{orgId:t?.id??""}}).afterClosed().subscribe(i=>{i?.portfolioId&&(this.snackBar.open(`Portfolio "${i.portfolioName}" created`,"",{duration:3e3}),this.dataSource.load(this.collectionPath,this.dataSource.getLimitNb(),this.dataSource.getSortField(),this.dataSource.getSortOrder()));});}static ɵfac=function(e){return new(e||n)(le(pv),le(Ti),le(kl),le(Bt));};static ɵcmp=Te({type:n,selectors:[["app-portfolio-list"]],decls:18,vars:6,consts:[[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-toolbar",2)(3,"div",3)(4,"div")(5,"mat-icon",4),u(6,"folder"),c()(),s(7,"div")(8,"div",5),u(9,"Portfolios"),c()()(),s(10,"div",6)(11,"button",7),E("click",function(){return i.clickNewPortfolio();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),u(15,"New Portfolio"),c()()()()(),s(16,"div",8),ee(17,"app-object-list",9),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,We,Xe,ln,yn,js,ho],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
541.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var FK=["panel"],BK=["*"];function $K(n,t){if(n&1&&(zo(0,"div",1,0),As(2),Fo()),n&2){let e=t.id,i=x();ji(i._classList),Ue("mat-mdc-autocomplete-visible",i.showPanel)("mat-mdc-autocomplete-hidden",!i.showPanel)("mat-autocomplete-panel-animations-enabled",!i._animationsDisabled)("mat-primary",i._color==="primary")("mat-accent",i._color==="accent")("mat-warn",i._color==="warn"),Cl("id",i.id),Yo("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e));}}var oM=class{source;option;constructor(t,e){this.source=t,this.option=e;}},iN=new qi("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1,hasBackdrop:!1})}),Bd=(()=>{class n{_changeDetectorRef=re(Pa);_elementRef=re(qa);_defaults=re(iN);_animationsDisabled=ld();_activeOptionChanges=jo.EMPTY;
541_keyManager;showPanel=!1;get isOpen(){return this._isOpen&&this.showPanel;}_isOpen=!1;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck();}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=!1;optionSelected=new At();opened=new At();closed=new At();optionActivated=new At();set classList(e){this._classList=e,this._elementRef.nativeElement.className="";}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator;}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}id=re(q_).getId("mat-autocomplete-");inertGroups;constructor(){let e=re(df);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1;}ngAfterContentInit(){this._keyManager=new AT(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null});}),this._setVisibility();}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe();}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e);}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0;}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck();}_emitSelectEvent(e){let i=new oM(this,e);this.optionSelected.emit(i);}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let i=e?e+" ":"";return this.ariaLabelledby?i+this.ariaLabelledby:e;}_skipPredicate(){return!1;}static ɵfac=function(i){return new(i||n)();};static ɵcmp=Te({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(i,o,a){if(i&1&&rc(a,Ei,5)(a,BT,5),i&2){let r;qn(r=Jn())&&(o.options=r),qn(r=Jn())&&(o.optionGroups=r);}},viewQuery:function(i,o){if(i&1&&go(hp,7)(FK,5),i&2){let a;qn(a=Jn())&&(o.template=a.first),qn(a=Jn())&&(o.panel=a.first);}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",Yi],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",Yi],requireSelection:[2,"requireSelection","requireSelection",Yi],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",Yi],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Yi]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[aa([{provide:FT,useExisting:n}])],ngContentSelectors:BK,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(i,o){i&1&&(vl(),lT(0,$K,3,17,"ng-template"));},styles:[`div.mat-mdc-autocomplete-panel { 542 width: 100%; 543 max-height: 256px; 544 visibility: hidden; 545 transform-origin: center top; 546 overflow: auto; 547 padding: 8px 0; 548 box-sizing: border-box; 549 position: relative; 550 border-radius: var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small)); 551 box-shadow: var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)); 552 background-color: var(--mat-autocomplete-background-color, var(--mat-sys-surface-container)); 553} 554@media (forced-colors: active) { 555 div.mat-mdc-autocomplete-panel { 556 outline: solid 1px; 557 } 558} 559.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel { 560 border-top-left-radius: 0; 561 border-top-right-radius: 0; 562} 563.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel { 564 border-bottom-left-radius: 0; 565 border-bottom-right-radius: 0; 566 transform-origin: center bottom; 567} 568div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible { 569 visibility: visible; 570} 571 572div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden, 573.cdk-overlay-pane:has(> .mat-mdc-autocomplete-hidden) { 574 visibility: hidden; 575 pointer-events: none; 576} 577 578@keyframes _mat-autocomplete-enter { 579 from { 580 opacity: 0; 581 transform: scaleY(0.8); 582 } 583 to { 584 opacity: 1; 585 transform: none; 586 } 587} 588.mat-autocomplete-panel-animations-enabled { 589 animation: _mat-autocomplete-enter 120ms cubic-bezier(0, 0, 0.2, 1); 590} 591 592mat-autocomplete { 593 display: none; 594} 595`],encapsulation:2,changeDetection:0});}return n;})();var VK={provide:dd,useExisting:fp(()=>Op),multi:!0};var GK=new qi("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let n=re(Hr);return()=>h1(n);}}),Op=(()=>{class n{_environmentInjector=re(nT);_element=re(qa);_injector=re(Hr);
595_viewContainerRef=re(oc);_zone=re(ya);_changeDetectorRef=re(Pa);_dir=re(sc,{optional:!0});_formField=re(M3,{optional:!0,host:!0});_viewportRuler=re(o3);_scrollStrategy=re(GK);_renderer=re(ic);_animationsDisabled=ld();_defaults=re(iN,{optional:!0});_overlayRef=null;_portal;_componentDestroyed=!1;_initialized=new oa();_keydownSubscription;_outsideClickSubscription;_cleanupWindowBlur;_previousValue=null;_valueOnAttach=null;_valueOnLastKeydown=null;_positionStrategy;_manuallyFloatingLabel=!1;_closingActionsSubscription;_viewportSubscription=jo.EMPTY;_breakpointObserver=re(s1);_handsetLandscapeSubscription=jo.EMPTY;_canOpenOnNextFocus=!0;_valueBeforeAutoSelection;_pendingAutoselectedOption=null;_closeKeyEventStream=new oa();_overlayPanelClass=IT(this._defaults?.overlayPanelClass||[]);_windowBlurHandler=()=>{this._canOpenOnNextFocus=this.panelOpen||!this._hasFocus();};_onChange=()=>{};_onTouched=()=>{};autocomplete;position="auto";connectedTo;autocompleteAttribute="off";autocompleteDisabled=!1;constructor(){}_aboveClass="mat-mdc-autocomplete-panel-above";ngAfterViewInit(){this._initialized.next(),this._initialized.complete(),this._cleanupWindowBlur=this._renderer.listen("window","blur",this._windowBlurHandler);}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition());}ngOnDestroy(){this._cleanupWindowBlur?.(),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal();}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel;}_overlayAttached=!1;openPanel(){this._openPanelInternal();}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit();}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&c1(this._trackedModal,"aria-owns",this.autocomplete.id));}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition();}get panelClosingActions(){return Va(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(ms(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(ms(()=>this._overlayAttached)):Gi()).pipe(Xo(e=>e instanceof $T?e:null));}optionSelections=Ux(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(qr(e),mr(()=>Va(...e.map(i=>i.onSelectionChange)))):this._initialized.pipe(mr(()=>this.optionSelections));});get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null;}_getOutsideClickStream(){return new Lo(e=>{let i=a=>{let r=G_(a),l=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,p=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;this._overlayAttached&&r!==this._element.nativeElement&&!this._hasFocus()&&(!l||!l.contains(r))&&(!p||!p.contains(r))&&this._overlayRef&&!this._overlayRef.overlayElement.contains(r)&&e.next(a);},o=[this._renderer.listen("document","click",i),this._renderer.listen("document","auxclick",i),this._renderer.listen("document","touchend",i)];return()=>{o.forEach(a=>a());};});}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e));}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}setDisabledState(e){this._element.nativeElement.disabled=e;}_handleKeydown(e){let i=e,o=i.keyCode,a=Rr(i);if(o===27&&!a&&i.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&o===13&&this.panelOpen&&!a)this.activeOption._selectViaInteraction(),this._resetActiveItem(),i.preventDefault();else if(this.autocomplete){let r=this.autocomplete._keyManager.activeItem,l=o===38||o===40;o===9||l&&!a&&this.panelOpen?this.autocomplete._keyManager.onKeydown(i):l&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(l||this.autocomplete._keyManager.activeItem!==r)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pe
595ndingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)));}}_handleInput(e){let i=e.target,o=i.value;if(i.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let a=this.autocomplete.options?.find(r=>r.selected);if(a){let r=this._getDisplayValue(a.value);o!==r&&a.deselect(!1);}}if(this._canOpen()&&this._hasFocus()){let a=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(a);}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0;}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal();}_hasFocus(){return kT()===this._element.nativeElement;}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0);}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1);}_subscribeToClosingActions(){let e=new Lo(o=>{e1(()=>{o.next();},{injector:this._environmentInjector});}),i=this.autocomplete.options?.changes.pipe(Jr(()=>this._positionStrategy.reapplyLastPosition()),Xx(0))??Gi();return Va(e,i).pipe(mr(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions;})),Ga(1)).subscribe(o=>this._setValueAndClose(o));}_emitOpened(){this.autocomplete.opened.emit();}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null);}_getDisplayValue(e){let i=this.autocomplete;return i&&i.displayWith?i.displayWith(e):e;}_assignOptionValue(e){let i=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(i??"");}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e;}_setValueAndClose(e){let i=this.autocomplete,o=e?e.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),i._emitSelectEvent(o),this._element.nativeElement.focus()):i.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),this._onChange(null)),this.closePanel();}_clearPreviousSelectedOption(e,i){this.autocomplete?.options?.forEach(o=>{o!==e&&o.selected&&o.deselect(i);});}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let i=this.autocomplete.id;Fw(this._trackedModal,"aria-owns",i);}}_attachOverlay(e){if(!this.autocomplete)return;let i=this._overlayRef;i?(this._positionStrategy.setOrigin(this._getConnectedElement()),i.updateSize({width:this._getPanelWidth()})):(this._portal=new f1(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),i=X_(this._injector,this._getOverlayConfig()),this._overlayRef=i,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&i&&i.updateSize({width:this._getPanelWidth()});}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(xp.HandsetLandscape).subscribe(a=>{a.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0);})),i&&!i.hasAttached()&&(i.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened();}_handlePanelKeydown=e=>{(e.keyCode===27&&!Rr(e)||e.keyCode===38&&Rr(e,"altKey"))&&(this._pe
595ndingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault());};_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe());}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=void 0;}_getOverlayConfig(){return new U_({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,hasBackdrop:this._defaults?.hasBackdrop,backdropClass:this._defaults?.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this._overlayPanelClass,disableAnimations:this._animationsDisabled});}_getOverlayPosition(){let e=W_(this._injector,this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1).withPopoverLocation("inline");return this._setStrategyPositions(e),this._positionStrategy=e,e;}_setStrategyPositions(e){let i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],r;this.position==="above"?r=a:this.position==="below"?r=i:r=[...i,...a],e.withPositions(r);}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element;}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth();}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width;}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let i=-1;for(let o=0;o<e.options.length;o++)if(!e.options.get(o).disabled){i=o;break;}e._keyManager.setActiveItem(i);}else e._keyManager.setActiveItem(-1);}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this.autocompleteDisabled;}_scrollToOption(e){let i=this.autocomplete,o=VT(e,i.options,i.optionGroups);if(e===0&&o===1)i._setScrollTop(0);else if(i.panel){let a=i.options.toArray()[e];if(a){let r=a._getHostElement(),l=GT(r.offsetTop,r.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(l);}}}_trackedModal=null;_applyModalPanelOwnership(){let e=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let i=this.autocomplete.id;this._trackedModal&&c1(this._trackedModal,"aria-owns",i),Fw(e,"aria-owns",i),this._trackedModal=e;}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;c1(this._trackedModal,"aria-owns",e),this._trackedModal=null;}}static ɵfac=function(i){return new(i||n)();};static ɵdir=bo({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(i,o){i&1&&E("focusin",function(){return o._handleFocus();})("blur",function(){return o._onTouched();})("input",function(r){return o._handleInput(r);})("keydown",function(r){return o._handleKeydown(r);})("click",function(){return o._handleClick();}),i&2&&Yo("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox");},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",Yi]}
595,exportAs:["matAutocompleteTrigger"],features:[aa([VK]),ki]});}return n;})(),$d=(()=>{class n{static ɵfac=function(i){return new(i||n)();};static ɵmod=sr({type:n});static ɵinj=ar({imports:[_1,Vw,a3,Vw,cd]});}return n;})();var uv=[{label:"Not Rated",value:"N"},{label:"Existing",value:"E"},{label:"XS - Very Small",value:"XS"},{label:"S - Simple",value:"S"},{label:"M - Medium",value:"M"},{label:"L - Large",value:"L"},{label:"XL - Very Large",value:"XL"}],fv=[{label:"Not Prioritized",value:"N"},{label:"Must",value:"M"},{label:"Should",value:"S"},{label:"Could",value:"C"},{label:"Won't",value:"W"}],hv=[{label:"IT / Technical",value:"IT",description:"Systems, infrastructure, architecture, integrations and technical components."},{label:"Operations / Processes",value:"OPS",description:"Process changes, procedures documentation and operational improvements."},{label:"Organizational",value:"ORG",description:"Governance, structures, people, roles and responsibilities."},{label:"Legal / Regulatory",value:"LEG",description:"Compliance with laws, regulations and industry standards."},{label:"Security",value:"SEC",description:"IT security, access control, data protection and physical security."},{label:"Data / Reporting",value:"DATA",description:"Data quality, migration, BI and reporting needs."},{label:"Performance",value:"PERF",description:"SLAs, response times and scalability requirements."}];var eu=[{label:"Not Sequenced",value:"N"},{label:"Existing",value:"E"},{label:"Out of scope",value:"O"},{label:"Delivery 1",value:"D1"},{label:"Delivery 2",value:"D2"},{label:"Delivery 3",value:"D3"},{label:"Delivery 4",value:"D4"},{label:"Delivery 5",value:"D5"},{label:"Delivery 6",value:"D6"},{label:"Delivery 7",value:"D7"},{label:"Delivery 8",value:"D8"},{label:"Delivery 9",value:"D9"},{label:"Delivery 10",value:"D10"}];var Hf=class n{_highlighted$=new Ic({srId:null,taskId:null,pinnedTaskId:null});highlighted$=this._highlighted$.asObservable();highlight(t,e){this._highlighted$.next({srId:t,taskId:e,pinnedTaskId:null});}clear(){this._highlighted$.next({srId:null,taskId:null,pinnedTaskId:null});}clearAndPin(t){this._highlighted$.next({srId:null,taskId:null,pinnedTaskId:t});}get current(){return this._highlighted$.value;}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var qK=n=>({"cell-highlight":n});function JK(n,t){if(n&1&&(s(0,"mat-chip",19)(1,"span",20),u(2),c()()),n&2){let e=x().$implicit,i=x(4);N("disabled",!0),m(2),Hn("",i.processTaskReferenceMap.get(e),".",i.order);}}function HK(n,t){if(n&1&&S(0,JK,3,3,"mat-chip",19),n&2){let e=t.$implicit,i=x(4);M(i.processTaskMap.get(e)&&e==i.processTask.id?0:-1);}}function UK(n,t){if(n&1&&(s(0,"mat-chip-listbox"),be(1,HK,1,1,null,null,Pt),c()),n&2){let e=x(3);m(),ye(e.object.processTaskReferences);}}function WK(n,t){if(n&1){let e=oe();s(0,"mat-chip",21),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.clickSelectProcessTask(o));}),s(1,"span",20),u(2),c()();}if(n&2){let e=t.$implicit,i=x(4);N("matTooltip","View process task : "+i.processTaskMap.get(e).name),m(2),G(i.processTaskReferenceMap.get(e));}}function XK(n,t){if(n&1&&(s(0,"mat-chip-listbox"),be(1,WK,3,2,"mat-chip",8,Pt),c()),n&2){let e=x(3);m(),ye(e.sortedOtherProcessTaskReferences);}}function YK(n,t){if(n&1&&(s(0,"mat-chip",8)(1,"mat-icon",22),u(2,"category"),c(),u(3),c()),n&2){let e=x(3);N("matTooltip",e.getRequirementTypeDescription()),m(3),_e(" ",e.getRequirementTypeLabel()," ");}}function KK(n,t){if(n&1&&(s(0,"mat-chip",9)(1,"mat-icon",22),u(2,"speed"),c(),u(3),c()),n&2){let e=x(3);m(3),_e(" ",e.getComplexityLabel()," ");}}function ZK(n,t){if(n&1&&(s(0,"mat-chip",10)(1,"mat-icon",22),u(2,"priority_high"),c(),u(3),c()),n&2){let e=x(3);m(3),_e(" ",e.getPriorityLabel()," ");}}function QK(n,t){if(n&1&&(s(0,"mat-chip",11)(1,"mat-icon",22),u(2,"local_shipping"),c(),u(3),c()),n&2){let e=x(3);m(3),_e(" ",e.getDeliveryLabel()," ");}}function eZ(n,t){if(n&1&&(s(0,"mat-chip",23),u(1),c()),n&2){let e=x().$implicit;N("matTooltip",e.value.description),m(),G(e.value.name);}}function tZ(n,t){if(n&1&&S(0,eZ,2,2,"mat-chip",23),n&2){let e=t.$implicit,i=x(4);M(i.object.deployableComponents&&i.object.deployableComponents.indexOf(e.value.id)>=0?0:-1);}}function nZ(n,t){if(n&1&&(s(0,"mat-chip-listbox"),be(1,tZ,1,1,null,null,Pt),Zn(3,"keyvalue"),c()),n&2){let e=x(3);m(),ye(yo(3,0,e.deployableComponentMap));}}function iZ(n,t){if(n&1){let e=oe();s(0,"button",24),E("click",function(){k(e);let o=x(3);return R(o.clickCopy());}),s(1,"mat-icon"),u(2,"content_copy"),c()();}}function oZ(n,t){if(n&1){let e=oe();s(0,"button",25),E("click",function(){k(e);let o=x(3);return R(o.clickRemove());}),s(1,"mat-icon"),u(2,"delete_forever"),c()();}}function aZ(n,t){if(n&1){let e=oe();s(0,"button",26),E("click",function(){k(e);let o=x(3);return R(o.clickRemove());}),s(1,"mat-icon"),u(2,"delete"),c()();}}function rZ(n,t){if(n&1){let e=oe();s(0,"div",0)(1,"div",2)(2,"mat-icon"),u(3,"drag_indicator"),c()(),s(4,"div",3),S(5,UK,3,0,"mat-chip-listbox"),c(),s(6,"div",4),S(7,XK,3,0,"mat-chip-listbox"),c(),s(8,"div",5)(9,"span",6),u(10),c()(),s(11,"div",7),S(12,YK,4,2,"mat-chip",8),c(),s(13,"div",7),S(14,KK,4,1,"mat-chip",9),c(),s(15,"div",7),S(16,ZK,4,1,"mat-chip",10),c(),s(17,"div",7),S(18,QK,4,1,"mat-chip",11),c(),ee(19,"div",12),s(20,"div",13),S(21,nZ,4,2,"mat-chip-listbox"),c(),s(22,"div",14)(23,"div")(24,"button",15),E("click",function(){k(e);let o=x(2);return R(o.toggleEditMode());}),s(25,"mat-icon"),u(26,"edit"),c()(),S(27,iZ,3,0,"button",16),S(28,oZ,3,0,"button",17),S(29,aZ,3,0,"button",18),c()()();}if(n&2){let e=x(2);N("ngClass",Ds(13,qK,e.isHighlighted)),m(5),M(e.processTaskReferenceMap&&e.processTask&&e.processTaskMap?5:-1),m(2),M(e.processTaskReferenceMap&&e.processTask&&e.processTaskMap?7:-1),m(2),N("matTooltip",e.object.description),m(),G(e.object.name),m(2),M(e.object.requirementType?12:-1),m(2),M(e.object.complexity&&e.object.complexity!=="N"?14:-1),m(2),M(e.object.priority&&e.object.priority!=="N"?16:-1),m(2),M(e.object.delivery&&e.object.delivery!=="N"?18:-1),m(3),M(e.deployableComponentMap?21:-1),m(6),M(e.processTaskReferenceMap?27:-1),m(),M(e.object.processTaskReferences&&e.object.processTaskReferences.length<=1?28:-1),m(),M(e.object.processTaskReferences&&e.object.processTaskReferences.length>1?29:-1);}}function sZ(n,t){if(n&1&&(s(0,"mat-option",37),u(1),c()),n&2){let e=t.$implicit;N("value",e.value)("matTooltip",e.description),m(),G(e.label);}}function lZ(n,t){if(n&1&&(s(0,"mat-option",36),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),G(e.label);}}function cZ(n,t){if(n&1&&(s(0,"mat-option",36),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),G(e.label);}}function pZ(n,t){if(n&1&&(s(0,"mat-option",36),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),G(e.label);}}function dZ(n,t){if(n&1){let e=oe();s(0,"mat-chip-option",42),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.onChipSelected(o.value));}),u(1),c();}if(n&2){let e=t.$implicit,i=x(4);N("matTooltip",e.value.description)("selected",i.object.deployableComponents&&i.object.deployableComponents.indexOf(e.value.id)>=0),m(),G(e.value.name);}}function mZ(n,t){if(n&1&&(fi(0,1),s(1,"mat-chip-listbox",40),be(2,dZ,2,3,"mat-chip-option",41,Pt),Zn(4,"keyvalue"),c(),hi()),n&2){let e=x(3);m(),N("multiple",!0),m(),ye(yo(4,1,e.deployableComponentMap));}}function uZ(n,t){if(n&1){let e=oe();s(0,"button",24),E("click",function(){k(e);let o=x(3);return R(o.clickCopy());}),s(1,"mat-icon"),u(2,"content_copy"),c()();}}function fZ(n,t){if(n&1){let e=oe();s(0,"button",25),E("click",function(){k(e);let o=x(3);return R(o.clickRemove());}),s(1,"mat-icon"),u(2,"delete_forever"),c()();}}function hZ(n,t){if(n&1){let e=oe();s(0,"button",26),E("click",function(){k(e);let o=x(3);return R(o.clickRemove());}),s(1,"mat-icon"),u(2,"delete"),c()();}}function _Z(n,t){if(n&1){let e=oe();s(0,"div",1),ee(1,"div",27),s(2,"div",28)(3,"div",29)(4,"mat-form-field",30)(5,"mat-label"),u(6,"Solution requirement"),c(),s(7,"input",31),Mt("ngModelChange",function(o){k(e);let a=x(2);return St(a.object.name,o)||(a.object.name=o),R(o);}),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}
595),c(),s(8,"mat-error",32),u(9,"Field is required"),c()()()(),s(10,"div",33)(11,"mat-form-field",34)(12,"mat-label"),u(13,"Type"),c(),s(14,"mat-select",35),Mt("ngModelChange",function(o){k(e);let a=x(2);return St(a.object.requirementType,o)||(a.object.requirementType=o),R(o);}),E("selectionChange",function(){k(e);let o=x(2);return R(o.clickSave());}),s(15,"mat-option",36),u(16,"\u2014 None \u2014"),c(),be(17,sZ,2,3,"mat-option",37,Pt),c()()(),s(19,"div",33)(20,"mat-form-field",34)(21,"mat-label"),u(22,"Complexity"),c(),s(23,"mat-select",35),Mt("ngModelChange",function(o){k(e);let a=x(2);return St(a.object.complexity,o)||(a.object.complexity=o),R(o);}),E("selectionChange",function(){k(e);let o=x(2);return R(o.clickSave());}),be(24,lZ,2,2,"mat-option",36,Pt),c()()(),s(26,"div",33)(27,"mat-form-field",34)(28,"mat-label"),u(29,"Priority"),c(),s(30,"mat-select",35),Mt("ngModelChange",function(o){k(e);let a=x(2);return St(a.object.priority,o)||(a.object.priority=o),R(o);}),E("selectionChange",function(){k(e);let o=x(2);return R(o.clickSave());}),be(31,cZ,2,2,"mat-option",36,Pt),c()()(),s(33,"div",33)(34,"mat-form-field",34)(35,"mat-label"),u(36,"Delivery Sequence"),c(),s(37,"mat-select",35),Mt("ngModelChange",function(o){k(e);let a=x(2);return St(a.object.delivery,o)||(a.object.delivery=o),R(o);}),E("selectionChange",function(){k(e);let o=x(2);return R(o.clickSave());}),be(38,pZ,2,2,"mat-option",36,Pt),c()()(),s(40,"div",38),S(41,mZ,5,3,"ng-container",1),c(),s(42,"div",14)(43,"div")(44,"button",39),E("click",function(){k(e);let o=x(2);return R(o.toggleEditMode());}),s(45,"mat-icon"),u(46,"check"),c()(),S(47,uZ,3,0,"button",16),S(48,fZ,3,0,"button",17),S(49,hZ,3,0,"button",18),c()()();}if(n&2){let e=x(2);m(7),wt("ngModel",e.object.name),m(7),wt("ngModel",e.object.requirementType),m(),N("value",void 0),m(2),ye(e.requirementTypes),m(6),wt("ngModel",e.object.complexity),m(),ye(e.complexityScale),m(6),wt("ngModel",e.object.priority),m(),ye(e.priorityScale),m(6),wt("ngModel",e.object.delivery),m(),ye(e.deliverySequence),m(3),M(e.deployableComponentMap?41:-1),m(6),M(e.processTaskReferenceMap?47:-1),m(),M(e.object.processTaskReferences&&e.object.processTaskReferences.length<=1?48:-1),m(),M(e.object.processTaskReferences&&e.object.processTaskReferences.length>1?49:-1);}}function gZ(n,t){if(n&1&&S(0,rZ,30,15,"div",0)(1,_Z,50,10,"div",1),n&2){let e=x();M(e.editMode?1:0);}}var Vd=class n{constructor(t,e,i,o,a,r,l,p,d){this.firebase=t;this.router=e;this.route=i;this.authService=o;this.httpClient=a;this.messagingService=r;this.loggingService=l;this.dialog=p;this.requirementHighlightService=d;this.objectLabel="Business Process",this.collectionLabel="Business Processes",this.parentRouterLink="/dashboard/businessprocesses",this.currentRouterLink="/dashboard/businessprocess",this.form=new Ri({name:new st("",Ye.required),complexity:new st(""),priority:new st(""),delivery:new st("")});}firebase;router;route;authService;httpClient;messagingService;loggingService;dialog;requirementHighlightService;subscriptions=new jo();formControlRef;objectRef;form;objectLabel;collectionLabel;parentRouterLink;currentRouterLink;projectId;businessProcessId;subProcessId;collectionPath;processTask;object;order;processTaskMap;processTaskReferenceMap;deployableComponentMap;onSelectProcessTask=new At();onSelectSolutionRequirement=new At();onSelectForCopy=new At();startInEditMode=!1;aiComplexitySpinner=!1;editMode=!1;complexityScale=uv;priorityScale=fv;deliverySequence=eu;requirementTypes=hv;isHighlighted=!1;ngOnInit(){return $(this,null,function*(){try{if(!this.object)return;this.objectRef=ge(this.firebase.firestore,this.collectionPath,this.object.id),this.subscriptions.add(this.requirementHighlightService.highlighted$.subscribe(t=>{this.isHighlighted=!!this.object&&t.srId===this.object.id;})),this.startInEditMode&&(this.editMode=!0),this.form.patchValue({name:this.object.name,complexity:this.object.complexity,priority:this.object.priority,delivery:this.object.delivery});}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading data","",{duration:3e3});}});}ngOnDestroy(){this.subscriptions.unsubscribe();}onChipSelected(t){if(!this.object)throw new Error("Object not found");this.object.deployableComponents||(this.object.deployableComponents=[]);let e=this.object.deployableComponents.indexOf(t.id);e>=0?this.object.deployableComponents.splice(e,1):this.object.deployableComponents.push(t.id),this.clickSave();}clickSave(){return $(this,null,function*(){this.objectRef?(yield Dt(this.objectRef,this.object,{merge:!0}),this.messagingService.open("Data saved","",{duration:3e3})):this.collectionPath&&(this.objectRef=yield Ht(we(this.firebase.firestore,this.collectionPath),this.object),this.messagingService.open("Data saved","",{duration:3e3}));});}i18nDeleteTitle="Remove/Delete";i18nAskRemoval="This requirement is used by another task. Continuing will only remove its association with the task, continue ?";i18nAskDeletion="Requirement will be deleted, continue ?";i18nAcceptLabel="Yes";i18nRejectLabel="No";clickRemove(){let t=this.i18nAskDeletion;this.object&&this.object.processTaskReferences&&this.object.processTaskReferences.length>1&&(t=this.i18nAskRemoval),this.dialog.open(Vf,{data:{title:this.i18nDeleteTitle,message:t,acceptLabel:this.i18nAcceptLabel,rejectLabel:this.i18nRejectLabel}}
595).afterClosed().subscribe(i=>$(this,null,function*(){if(i.result&&this.object&&(this.object.processTaskReferences&&this.object.processTaskReferences.length==1&&no(ge(this.firebase.firestore,this.collectionPath+this.object.id)),this.processTask)){if(this.object.processTaskReferences){let a=this.object.processTaskReferences.indexOf(this.processTask.id);a!=null&&this.object.processTaskReferences.splice(a,1),this.clickSave();}let o=this.processTask.solutionRequirements?.indexOf(this.object.id);o!=null&&this.processTask.solutionRequirements?.splice(o,1),(!this.processTask.projectId||!this.processTask.businessProcessId||!this.processTask.subProcessId||!this.processTask.id)&&console.log("Warning : Required IDs not found"),yield Dt(ge(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"+this.businessProcessId+"/subprocesses/"+this.subProcessId+"/processtasks/"+this.processTask.id),this.processTask,{merge:!0});}}));}clickCopy(){this.onSelectForCopy.emit(this.object.id);}clickSelectProcessTask(t){if(this.isHighlighted){this.requirementHighlightService.clearAndPin(this.processTask?.id||null);return;}this.requirementHighlightService.highlight(this.object.id,t),this.onSelectProcessTask.emit(t),this.onSelectSolutionRequirement.emit(this.object.id);}clickSelectSolutionRequirement(){if(this.isHighlighted){this.requirementHighlightService.clearAndPin(this.processTask?.id||null);return;}this.requirementHighlightService.highlight(this.object.id,null),this.onSelectProcessTask.emit(void 0),this.onSelectSolutionRequirement.emit(this.object.id);}clickEvaluateComplexity(){}toggleEditMode(){this.editMode=!this.editMode;}getComplexityLabel(){if(!this.object?.complexity)return"";let t=this.complexityScale.find(e=>e.value===this.object.complexity);return t?t.label:"";}getPriorityLabel(){if(!this.object?.priority)return"";let t=this.priorityScale.find(e=>e.value===this.object.priority);return t?t.label:"";}getDeliveryLabel(){if(!this.object?.delivery)return"";let t=this.deliverySequence.find(e=>e.value===this.object.delivery);return t?t.label:"";}getRequirementTypeLabel(){if(!this.object?.requirementType)return"";let t=this.requirementTypes.find(e=>e.value===this.object.requirementType);return t?t.label:"";}getRequirementTypeDescription(){if(!this.object?.requirementType)return"Type";let t=this.requirementTypes.find(e=>e.value===this.object.requirementType);return t?t.description:"Type";}get sortedOtherProcessTaskReferences(){return!this.object?.processTaskReferences||!this.processTaskReferenceMap||!this.processTaskMap?[]:this.object.processTaskReferences.filter(t=>this.processTaskMap.get(t)&&t!==this.processTask?.id).sort((t,e)=>{let i=this.processTaskReferenceMap.get(t)||"",o=this.processTaskReferenceMap.get(e)||"";return this.compareVersionStrings(i,o);});}compareVersionStrings(t,e){let i=t.split(".").map(Number),o=e.split(".").map(Number);for(let a=0;a<Math.max(i.length,o.length);a++){let r=i[a]||0,l=o[a]||0;if(r!==l)return r-l;}return 0;}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Oo),le(Zr),le(Bt),le(Mo),le(Ti),le(Hf));};static ɵcmp=Te({type:n,selectors:[["app-solution-requirement"]],inputs:{projectId:"projectId",businessProcessId:"businessProcessId",subProcessId:"subProcessId",collectionPath:"collectionPath",processTask:"processTask",object:"object",order:"order",processTaskMap:"processTaskMap",processTaskReferenceMap:"processTaskReferenceMap",deployableComponentMap:"deployableComponentMap",startInEditMode:"startInEditMode"},outputs:{onSelectProcessTask:"onSelectProcessTask",onSelectSolutionRequirement:"onSelectSolutionRequirement",onSelectForCopy:"onSelectForCopy"},decls:1,vars:1,consts:[[1,"tile-row","view-mode",3,"ngClass"],[1,"tile-row"],["cdkDragHandle","","matTooltip","Drag to move",1,"drag-handle"],[1,"view-mode-refs-order"],[1,"view-mode-refs-other"],[1,"tile","view-mode-name"],[1,"requirement-name",3,"matTooltip"],[1,"view-mode-chip-slot"],[3,"matTooltip"],["matTooltip","Complexity"],["matTooltip","Priority"],["matTooltip","Delivery Sequence"],[1,"view-mode-fill"],[1,"tile","tile-auto","view-mode-components"],[1,"tile","tile-auto"],["color","primary","mat-icon-button","","matTooltip","Edit requirement",3,"click"],["color","primary","mat-icon-button","","matTooltip","Copy requirement"],["color","primary","mat-icon-button","","matTooltip","Delete requirement"],["color","primary","mat-icon-button","","matTooltip","Remove requirement from task"],[1,"chip-order",3,"disabled"],[1,"primary-text-color"],[3,"click","matTooltip"],["matChipAvatar","","fontSet","material-symbols-outlined"],[1,"chip-component",3,"matTooltip"],["color","primary","mat-icon-button","","matTooltip","Copy requirement",3,"click"],["color","primary","mat-icon-button","","matTooltip","Delete requirement",3,"click"],["color","primary","mat-icon-button","","matTooltip","Remove requirement from task",3,"click"],[1,"tile-spacer"],[1,"tile-ex
595pand"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","",3,"ngModelChange","change","ngModel"],[1,"mat-subfield-text"],[1,"tile-fixed"],[1,"form-field"],[3,"ngModelChange","selectionChange","ngModel"],[3,"value"],["matTooltipPosition","right",3,"value","matTooltip"],[1,"tile-fixed-wide"],["color","primary","mat-icon-button","","matTooltip","Done editing",3,"click"],[3,"multiple"],[3,"matTooltip","selected"],[3,"click","matTooltip","selected"]],template:function(e,i){e&1&&S(0,gZ,2,1),e&2&&M(i.object?0:-1);},dependencies:[$e,Qt,jt,Xt,Vt,Wt,ti,ut,Kr,yi,Ta,Cd,oI,iI,gn,Ft,Tt,Po,Gt,bi,So,Ei,We,Xe,tn,$t,_n,$1,o1],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
595.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.tile-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding-top:20px;padding-bottom:20px;justify-content:space-between}.tile-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:5px;padding-top:20px;padding-bottom:20px;justify-content:space-between}.tile[_ngcontent-%COMP%]{text-align:left;width:100%}.tile-auto[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.tile-expand[_ngcontent-%COMP%]{flex:3 1 0%;text-align:left}.tile-fixed[_ngcontent-%COMP%]{flex:0 0 150px;text-align:left}.tile-fixed-wide[_ngcontent-%COMP%]{flex:0 0 350px;text-align:left;margin-left:30px}.tile-icon[_ngcontent-%COMP%]{margin-left:20px;text-align:left;width:100%}.tile-icon-border[_ngcontent-%COMP%]{padding-left:10px;margin-left:20px;text-align:left;width:100%}.tile-spacer[_ngcontent-%COMP%]{margin-left:20px}.drag-handle[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:grab;color:#00000040;padding:0 2px;flex-shrink:0;transition:color .15s ease}.drag-handle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;filter:none!important;text-shadow:none!important}.drag-handle[_ngcontent-%COMP%]:hover{color:#0009}.drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.mat-subfield-text[_ngcontent-%COMP%]{font-size:small}.primary-text-color[_ngcontent-%COMP%]{color:#465d91;font-weight:700}.cell-highlight[_ngcontent-%COMP%]{border-radius:20px;background-color:#0000000f}.chip-order[_ngcontent-%COMP%]{margin-right:10px!important}.view-mode-refs-order[_ngcontent-%COMP%]{width:80px;flex-shrink:0}.view-mode-refs-other[_ngcontent-%COMP%]{width:200px;flex-shrink:0}.view-mode-refs-other[_ngcontent-%COMP%] mat-chip-listbox[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.view-mode[_ngcontent-%COMP%]{align-items:center;padding-top:10px;padding-bottom:10px}.view-mode-name[_ngcontent-%COMP%]{flex:2;min-width:0}.view-mode-name[_ngcontent-%COMP%] .requirement-name[_ngcontent-%COMP%]{font-size:14px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.view-mode-chip-slot[_ngcontent-%COMP%]{width:120px;flex-shrink:0;display:flex;align-items:center;justify-content:center}.view-mode-fill[_ngcontent-%COMP%]{flex:1}.view-mode-components[_ngcontent-%COMP%]{width:250px;flex-shrink:0}.view-mode-components[_ngcontent-%COMP%] mat-chip-listbox[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.view-mode-components[_ngcontent-%COMP%] .chip-component{--mdc-chip-elevated-container-color: #142f60 !important;--mdc-chip-label-text-color: #fff !important;--mat-chip-label-text-color: #fff !important;background-color:#142f60!important;color:#fff!important}.view-mode-components[_ngcontent-%COMP%] .chip-component .mdc-evolution-chip__text-label, .view-mode-components[_ngcontent-%COMP%] .chip-component .mat-mdc-chip-action-label-text{color:#fff!important}.icon-loading[_ngcontent-%COMP%]{transition:transform .5s}.icon-loading.animate[_ngcontent-%COMP%]{transform:rotate(360deg)}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};
595var Uf=class n{resolveCode(t,e){if(!t)return;console.log(t);let i=t.trim(),o=e.find(p=>p.value===i);if(o)return o.value;let a=i.toLowerCase(),r=e.find(p=>p.label.toLowerCase()===a);if(r)return r.value;let l=e.find(p=>p.label.toLowerCase().includes(a)||a.includes(p.label.toLowerCase()));if(l)return l.value;}resolveComplexity(t){return this.resolveCode(t,uv);}resolveDelivery(t){return this.resolveCode(t,eu);}resolvePriority(t){return this.resolveCode(t,fv);}resolveRequirementType(t){return this.resolveCode(t,hv);}resolveDeployableComponent(t,e){if(!t||!e)return;let i=t.trim();if(e.has(i))return i;let o=i.toLowerCase();for(let[a,r]of e.entries())if(r.name?.toLowerCase()===o)return a;}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var xZ=n=>({"icon-loading":n}),CZ=n=>({"cell-highlight":n});function vZ(n,t){if(n&1&&(s(0,"div"),u(1),c()),n&2){let e=x().$implicit,i=x(4);m(),G(i.getSolutionRequirementWeight(e.value.solutionRequirements));}}function bZ(n,t){if(n&1&&(s(0,"mat-option",21),u(1),c()),n&2){let e=t.$implicit;N("value",e),m(),_e(" ",e.name," ");}}function yZ(n,t){if(n&1){let e=oe();s(0,"div",26)(1,"app-solution-requirement",27),E("onSelectForCopy",function(o){k(e);let a=x(5);return R(a.onSelectForCopy(o));})("onSelectSolutionRequirement",function(o){k(e);let a=x(5);return R(a.onSelectSolutionRequirement(o));})("onSelectProcessTask",function(o){k(e);let a=x(5);return R(a.onSelectProcessTask(o));}),c()();}if(n&2){let e=t.$implicit,i=t.$index,o=x().$implicit,a=x().$implicit,r=x().$implicit,l=x(2);N("ngClass",Ds(11,CZ,l.filterSolutionRequirementId==e)),m(),N("projectId",l.projectId)("businessProcessId",r.key.id)("subProcessId",a.key.id)("collectionPath","/projects/"+l.projectId+"/solutionrequirements/")("deployableComponentMap",l.deployableComponentMap)("processTask",o.value)("processTaskMap",l.processTaskMap)("processTaskReferenceMap",l.processTaskReferenceMap)("object",l.getSolutionRequirement(e))("order",i+1);}}function PZ(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",9)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",15),u(4,"attribution"),c(),s(5,"span",11),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x().$implicit,l=x(2);return R(l.clickNavigate(l.projectId,r.key.id,a.key.id,o.value.id));}),u(6),c()(),s(7,"mat-panel-description"),S(8,vZ,2,1,"div"),c()(),s(9,"div",16)(10,"div",16)(11,"form")(12,"button",17),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x().$implicit,l=x(2);return R(l.clickPasteRequirement(r.key,a.key,o.value));}),s(13,"mat-icon"),u(14,"content_paste"),c()(),s(15,"button",18),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x().$implicit,l=x(2);return R(l.clickGenerate(r.key,a.key,o.value));}
595),s(16,"mat-icon",19),u(17,"sync"),c()(),s(18,"mat-autocomplete",20,0),be(20,bZ,2,2,"mat-option",21,Pt),Zn(22,"async"),c(),s(23,"mat-form-field",22)(24,"mat-label"),u(25,"Type or select solution requirement"),c(),ee(26,"input",23),s(27,"button",24),E("click",function(){k(e);let o=x(4);return R(o.clickClearRequirement());}),s(28,"mat-icon"),u(29,"backspace"),c()()(),s(30,"button",25),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x().$implicit,l=x(2);return R(l.clickCreateRequirement(r.key,a.key,o.value));}),s(31,"mat-icon"),u(32,"library_add_check"),c()()()()(),s(33,"div")(34,"div"),be(35,yZ,2,13,"div",26,Pt),c()()();}if(n&2){let e=t.$implicit,i=bn(19),o=x().$implicit,a=x().$implicit,r=x(2);N("expanded",r.checkProcessTask(e.value)),m(6),nd("",a.key.number,".",o.key.number,".",e.value.number,". ",e.value.name),m(2),M(e.value.solutionRequirements?8:-1),m(4),N("disabled",r.copySolutionRequirementId==null),m(4),N("ngClass",Ds(14,xZ,r.generateSpinner)),m(2),N("displayWith",r.displayFn),m(2),ye(yo(22,12,r.filteredOptions)),m(6),N("formControl",r.autocompleteControl)("matAutocomplete",i),m(4),N("disabled",!r.autocompleteControl.value),m(5),ye(e.value.solutionRequirements);}}function wZ(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",9)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",14),u(4,"account_tree"),c(),s(5,"span",11),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x(2);return R(r.clickNavigate(r.projectId,a.key.id,o.key.id));}),u(6),c()(),ee(7,"mat-panel-description"),c(),s(8,"div",12),u(9),be(10,PZ,37,16,"mat-expansion-panel",9,Pt),Zn(12,"keyvalue"),c()();}if(n&2){let e=t.$implicit,i=x().$implicit,o=x(2);N("expanded",o.checkSubProcessTask(e.value)),m(6),_p("",i.key.number,".",e.key.number," ",e.key.name),m(3),_e(" ",e.key.description," "),m(),ye(yo(12,5,e.value));}}function SZ(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",9)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"mat-icon",10),u(4,"account_tree"),c(),s(5,"span",11),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.clickNavigate(a.projectId,o.key.id));}),u(6),c()(),ee(7,"mat-panel-description"),c(),s(8,"div",12)(9,"div",13),u(10),c(),be(11,wZ,13,7,"mat-expansion-panel",9,Pt),Zn(13,"keyvalue"),c()();}if(n&2){let e=t.$implicit,i=x(2);N("expanded",i.checkBusinessProcessTask(e.key)),m(6),Hn("",e.key.number,". ",e.key.name),m(4),G(e.key.description),m(),ye(yo(13,4,e.value));}}function MZ(n,t){if(n&1&&(s(0,"mat-accordion",8),be(1,SZ,14,6,"mat-expansion-panel",9,Pt),Zn(3,"keyvalue"),c()),n&2){let e=x();m(),ye(yo(3,0,e.rootBusinessProcessMap));}}var _v=class n{constructor(t,e,i,o,a,r,l,p,d,f){this.firebase=t;this.router=e;this.route=i;this.authService=o;this.httpClient=a;this.messagingService=r;this.loggingService=l;this.localeService=p;this.dialog=d;this.srUtils=f;}firebase;router;route;authService;httpClient;messagingService;loggingService;localeService;dialog;srUtils;subscriptions=new jo();collectionPath="";baseRoute;filterProcessTaskId;filterSolutionRequirementId;copySolutionRequirementId;evaluationScale;projectId;rootBusinessProcessMap;businessProcessMap=new Map();subProcessMap=new Map();processTaskMap=new Map();processTaskReferenceMap=new Map();deployableComponentMap;solutionRequirementMap=new Map();getSolutionRequirement(t){if(this.solutionRequirementMap)return this.solutionRequirementMap.get(t);}getSolutionRequirementWeight(t){if(!this.evaluationScale)throw new Error("No evaluation scale");let e=0;for(let i of t){let o=this.solutionRequirementMap.get(i);if(o){let a=1;o.processTaskReferences&&o.processTaskReferences.length>1&&(a=o.processTaskReferences.length),o?.complexity=="E"?e+=Math.round(this.evaluationScale.E/a):o?.complexity=="L"?e+=Math.round(this.evaluationScale.L/a):o?.complexity=="M"?e+=Math.round(this.evaluationScale.M/a):o?.complexity=="N"?e+=Math.round(this.evaluationScale.N/a):o?.complexity=="S"?e+=Math.round(this.evaluationScale.S/a):o?.complexity=="XL"?e+=Math.round(this.evaluationScale.XL/a):o?.complexity=="XS"&&(e+=Math.round(this.evaluationScale.XS/a));}}return e;}initDeployableComponentList(){return $(this,null,function*(){this.deployableComponentMap=new Map();let t=mt(we(this.firebase.firestore,"systemComponents"),Jt("name")),e=yield at(t);for(let i of e.docs){let o=X({id:i.id},i.data());this.deployableComponentMap.set(o.id,o);}});}checkBusinessProcessTask(t){if(!this.filterProcessTaskId&&!this.filterS
595olutionRequirementId)return!0;let e=this.rootBusinessProcessMap.get(t);for(let[i,o]of e.entries()){let a=o;if(this.filterProcessTaskId){for(let[r,l]of a.entries())if(l.id==this.filterProcessTaskId)return!0;}else if(this.filterSolutionRequirementId){for(let[r,l]of a.entries())if(l.solutionRequirements){for(let p of l.solutionRequirements)if(p==this.filterSolutionRequirementId)return!0;}}}return!1;}checkSubProcessTask(t){if(!this.filterProcessTaskId&&!this.filterSolutionRequirementId)return!0;if(this.filterProcessTaskId){for(let[e,i]of t.entries())if(i.id==this.filterProcessTaskId)return!0;}else if(this.filterSolutionRequirementId){for(let[e,i]of t.entries())if(i.solutionRequirements){for(let o of i.solutionRequirements)if(o==this.filterSolutionRequirementId)return!0;}}return!1;}checkProcessTask(t){if(!this.filterProcessTaskId&&!this.filterSolutionRequirementId)return!0;if(this.filterProcessTaskId){if(t.id==this.filterProcessTaskId)return!0;}else if(this.filterSolutionRequirementId&&t.solutionRequirements){for(let e of t.solutionRequirements)if(e==this.filterSolutionRequirementId)return!0;}return!1;}ngOnInit(){return $(this,null,function*(){try{let t=this.route.snapshot.paramMap.get("id");if(t!=null&&(this.projectId=t),!this.projectId)return;this.initDeployableComponentList();let e=ge(this.firebase.firestore,"/evaluationscales","J45CyRy49XqOGaTEVFkE"),i=yield yt(e);if(!i.exists())throw new Error("Document does not exist");this.evaluationScale=X({id:i.id},i.data());let o=mt(we(this.firebase.firestore,"/projects/"+this.projectId+"/solutionrequirements/"));this.subscriptions.add(Bn(o,l=>{for(let p of l.docs){let d=X({id:p.id},p.data()),f=this.solutionRequirementMap.get(d.id);f&&(d.processTaskReferences=f.processTaskReferences),this.solutionRequirementMap.set(d.id,d);}})),this.rootBusinessProcessMap=new Map();let a=mt(we(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"),Jt("number","asc")),r=yield at(a);for(let l of r.docs){let p=X({id:l.id},l.data()),d=new Map(),f=mt(we(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"+p.id+"/subprocesses/"),Jt("number","asc")),h=yield at(f);for(let g of h.docs){let b=X({id:g.id},g.data()),w=new Map(),T=mt(we(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"+p.id+"/subprocesses/"+b.id+"/processtasks/"),Jt("number","asc"));this.subscriptions.add(Bn(T,O=>{let V=O.docs;for(let j of V){let L=X({id:j.id},j.data());if(this.processTaskReferenceMap.set(L.id,p.number+"."+b.number+"."+L.number),L.solutionRequirements)for(let A of L.solutionRequirements){let J=this.getSolutionRequirement(A);J&&(J.processTaskReferences==null&&(J.processTaskReferences=[]),J.processTaskReferences.indexOf(L.id)<0&&J.processTaskReferences.push(L.id));}this.processTaskMap.set(L.id,L),w.set(L.id,L);}})),d.set(b,w),this.subProcessMap.set(b.id,b);}this.rootBusinessProcessMap.set(p,d),this.businessProcessMap.set(p.id,p),this.filteredOptions=this.autocompleteControl.valueChanges.pipe(qr(""),Xo(g=>{let b=typeof g=="string"?g:g?.name;return b?this._filter(b):this.getSolutionRequirementsArray().slice();}));}}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading data","",{duration:3e3});}});}ngOnDestroy(){this.subscriptions.unsubscribe();}autocompleteControl=new st("");filteredOptions;_filter(t){let e=t.toLowerCase();return this.getSolutionRequirementsArray().filter(i=>i.name.toLowerCase().includes(e));}getSolutionRequirementsArray(){let t=[];for(let e of this.solutionRequirementMap)t.push(e[1]);return t;}displayFn(t){return t&&t.name?t.name:"";}generateSpinner=!1;generateList(t,e,i){return $(this,null,function*(){try{let o=this.deployableComponentMap?Array.from(this.deployableComponentMap.values()):[],a={businessProcess:t,subProcess:e,processTask:i,deployableComponents:o},r=this.firebase.functions,l=ei(r,"functionCallFunction"),p={functionName:"generate_requirements",locale:this.localeService.getSelectedLocaleShort(),object:a};this.generateSpinner=!0;let d=yield l(p);return this.generateSpinner=!1,d.data;}catch(o){console.log(o),this.generateSpinner=!1;}});}clickGenerate(t,e,i){return $(this,null,function*(){let o=yield this.generateList(t,e,i);try{o?this.dialog.open(gs,{height:"50%",width:"700px",data:{rawData:o}}).afterClosed().subscribe(r=>{if(r){for(let l of r)l.selected&&l.selected==!0&&this.createRequirement
595(t,e,i,l.title,l.description,l.delivery,l.comment,l.priority,l.requirementType,l.deployableComponents);this.messagingService.open("Requirements added.","",{duration:3e3});}}):this.messagingService.open("No results.","",{duration:3e3});}catch(a){this.messagingService.open("An error has occured, please try again later or contact the administrator.","",{duration:3e3});}});}createRequirement(t,e,i,o,a,r,l,p,d,f){return $(this,null,function*(){let h,g=r?this.srUtils.resolveComplexity(r)??r:void 0,b=l?this.srUtils.resolvePriority(l)??l:void 0,w=p?this.srUtils.resolveRequirementType(p)??p:void 0,T=d?d.map(j=>this.srUtils.resolveDeployableComponent(j,this.deployableComponentMap)).filter(j=>!!j):void 0,O=X(X(X(X({name:o??"",description:a??"",acceptanceCriteria:f??""},g&&{complexity:g}),b&&{priority:b}),w&&{requirementType:w}),T?.length&&{deployableComponents:T});if(console.log(O),h=(yield Ht(we(this.firebase.firestore,"/projects/"+this.projectId+"/solutionrequirements/"),O)).id,i.solutionRequirements||(i.solutionRequirements=[]),i.solutionRequirements.indexOf(h)>0){this.messagingService.open("Requirement is already used in this task.","",{duration:3e3});return;}i.solutionRequirements.push(h),yield Dt(ge(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"+t.id+"/subprocesses/"+e.id+"/processtasks/"+i.id),i,{merge:!0});});}onSelectProcessTask(t){this.filterProcessTaskId=t;}onSelectSolutionRequirement(t){this.filterSolutionRequirementId=t;}clickClearFilters(){this.filterProcessTaskId=void 0,this.filterSolutionRequirementId=void 0;}onSelectForCopy(t){this.copySolutionRequirementId=t;}clickPasteRequirement(t,e,i){return $(this,null,function*(){if(this.copySolutionRequirementId){if(i.solutionRequirements||(i.solutionRequirements=[]),i.solutionRequirements.indexOf(this.copySolutionRequirementId)>0){this.messagingService.open("Requirement is already used in this task.","",{duration:3e3});return;}i.solutionRequirements.push(this.copySolutionRequirementId),yield Dt(ge(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"+t.id+"/subprocesses/"+e.id+"/processtasks/"+i.id),i,{merge:!0}),this.copySolutionRequirementId=void 0,this.messagingService.open("Requirement pasted.","",{duration:3e3});}});}clickCreateRequirement(t,e,i){return $(this,null,function*(){let o;if(typeof this.autocompleteControl.value==="string"?o=(yield Ht(we(this.firebase.firestore,"/projects/"+this.projectId+"/solutionrequirements/"),{name:this.autocompleteControl.value,description:""})).id:o=this.autocompleteControl.value.id,i.solutionRequirements||(i.solutionRequirements=[]),i.solutionRequirements.indexOf(o)>0){this.messagingService.open("Requirement is already used in this task.","",{duration:3e3});return;}i.solutionRequirements.push(o),yield Dt(ge(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"+t.id+"/subprocesses/"+e.id+"/processtasks/"+i.id),i,{merge:!0}),this.messagingService.open("Requirement added.","",{duration:3e3});});}clickNavigate(t,e,i,o){o?this.router.navigate(["/dashboard/project/"+t+"/businessprocess/"+e+"/subprocess/"+i+"/processtask/"+o]):i?this.router.navigate(["/dashboard/project/"+t+"/businessprocess/"+e+"/subprocess/"+i]):e?this.router.navigate(["/dashboard/project/"+t+"/businessprocess/"+e]):t&&this.router.navigate(["/dashboard/project/"+t]);}clickClearRequirement(){return $(this,null,function*(){this.autocompleteControl.setValue("");});}clickDesignBpmn(){this.router.navigate(["dashboard/project/"+this.projectId]);}clickDesignProcess(){this.router.navigate(["dashboard/project/"+this.projectId]);}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Oo),le(Zr),le(Bt),le(Mo),le(To),le(Ti),le(Uf));};static ɵcmp=Te({type:n,selectors:[["app-gap-analysis"]],inputs:{collectionPath:"collectionPath",baseRoute:"baseRoute"},decls:22,vars:2,consts:[["auto","matAutocomplete"],[1,"div-content"],[1,"div-toolbar"],[1,"title"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],["mat-flat-button","",3,"disabled"],[1,"container"],["multi","",1,"accordion"],[1,"mat-elevation-z0",3,"expanded"],["iconPositionEnd","","matTooltip","Business Process"],[1,"span-clickable",3,"click"],[1,"tile-container"],[1,"div-process-description"],["fontSet","material-symbols-outlined","iconPositionEnd","","matTooltip","Sub-Process"],["fontSet","material-symbols-outlined","iconPositionEnd","","matTooltip","Process Task/Stakeholder Requirement"],[1,"tile-row-end"],["color","primary","mat-icon-button","","matTooltip","Paste requirement",3,"click","disabled"],["color","primary","mat-icon-button","","matTooltip","Generate requirements (AI)",3,"click"],["fontSet","material-symbols-outlined",3,"ngClass"],[3,"displayWith"],[3,"value"],["appearance","fill",1,"field-autocomplete"],["matInput","",3,"formControl","matAutocomplete"],["matSuffix","","color","primary","mat-icon-button","","matTooltip","Clear",3,"click"],["matSuffix","","color","primary","mat-icon-button","","matTooltip","Add requirement",3,"click","disabled"],[3,"ngClass"],[3,"onSelectForCopy","onSelectSolutionRequirement","onSelectProcessTask","projectId","businessProcessId","subProcessId","collectionPath","deployableComponentMap","processTask","processTaskMap","processTaskReferenceMap","object","order"]],template:function(e,i){e&1&&(s(0,"div",1)(1,"div")(2,"mat-toolbar",2)(3,"mat-icon"),u(4,"tune"),c(),s(5,"span",3),u(6,"Gap Analysis"),c(),s(7,"div",4)(8,"button",5),E("click",function(){return i.clickDesignProcess();}),u(9," Design process mode "),s(10,"mat-icon"),u(11,"category"),c()(),s(12,"button",5),E("click",function(){return i.clickDesignBpmn();}),u(13," Design BPMS "),s(14,"mat-icon"),u(15,"schema"),c()(),s(16,"button",6),u(17," Gap analysis mode "),s(18,"mat-icon"),u(19,"tune"),c()()()()(),s(20,"div",7),S(21,MZ,4,2,"mat-accordion",8),c()()),e&2&&(m(16),N("disabled",!0),m(5),M(i.rootBusinessProcessMap?21:-1));},dependencies:[$e,Qe,Qt,jt,Xt,Vt,Wt,ur,gr,Sl,fr,hr,_r,wl,ut,Kr,We,Xe,Gt,$d,Bd,Ei,Op,ln,yn,tn,Nn,Ft,Tt,Mn,md,Vd,rd,o1],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
595.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.div-toolbar[_ngcontent-%COMP%]{height:65px}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;width:100%}.title[_ngcontent-%COMP%]{padding-left:10px}.accordion[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap;white-space:nowrap}.tile-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;padding-top:20px;padding-bottom:20px;justify-content:space-between}.tile-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:5px;padding-top:20px;padding-bottom:20px;justify-content:space-between}.tile-row-end[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:5px;padding-top:20px;padding-bottom:20px;justify-content:flex-end}
595.tile[_ngcontent-%COMP%]{text-align:left;width:100%}.tile-icon[_ngcontent-%COMP%]{margin-left:20px;text-align:left;width:100%}.tile-icon-border[_ngcontent-%COMP%]{padding-left:10px;margin-left:20px;text-align:left;width:100%}.tile-spacer[_ngcontent-%COMP%]{margin-left:20px}.div-process-description[_ngcontent-%COMP%]{padding-left:20px;max-width:80%}.cell-highlight[_ngcontent-%COMP%]{border-radius:20px;background-color:#0000000f}.field-autocomplete[_ngcontent-%COMP%]{min-width:500px}.span-clickable[_ngcontent-%COMP%]{color:#465d91}.span-clickable[_ngcontent-%COMP%]:hover{color:#000}.icon-loading[_ngcontent-%COMP%]{transition:transform .5s}.icon-loading.animate[_ngcontent-%COMP%]{transform:rotate(360deg)}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};var gv=class n extends Wa{constructor(){super();}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};function EZ(n,t){if(n&1&&ee(0,"app-object-list",1),n&2){let e=x();N("showNewButton",e.showNewButton)("displayedColumns",e.displayedColumns)("displayedColumnsHeaders",e.displayedColumnsHeaders)("dataSource",e.dataSource)("collectionPath",e.collectionPath)("documentRoute",e.documentRoute)("defaultSortField","number")("defaultSortOrder","asc")("forceRefresh",!0);}}var tu=class n{constructor(t){this.dataSource=t;}dataSource;showNewButton=!0;init=!1;collectionPath="";baseRoute;documentRoute;displayedColumns=["number","name"];displayedColumnsHeaders=["Nb.","Name"];ngOnInit(){this.documentRoute=this.baseRoute,this.init=!0;}static ɵfac=function(e){return new(e||n)(le(gv));};static ɵcmp=Te({type:n,selectors:[["app-process-task-list"]],inputs:{collectionPath:"collectionPath",baseRoute:"baseRoute"},decls:2,vars:1,consts:[[1,"div-content"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute","defaultSortField","defaultSortOrder","forceRefresh"]],template:function(e,i){e&1&&(s(0,"div",0),S(1,EZ,1,9,"app-object-list",1),c()),e&2&&(m(),M(i.init?1:-1));},dependencies:[$e,ho],styles:[".div-toolbar[_ngcontent-%COMP%]{height:65px;border-radius:10px;margin-bottom:10px}.title[_ngcontent-%COMP%]{padding-left:10px}.div-content[_ngcontent-%COMP%]{height:calc(100% - 100px);margin-left:30px;margin-right:30px}.div-insight-title[_ngcontent-%COMP%]{font-weight:700;padding-bottom:10px}.div-insight[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:30vw}.container[_ngcontent-%COMP%]{height:70%;display:flex;flex-direction:row;flex-wrap:nowrap;white-space:nowrap}.container-left[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#fff;margin-right:10px;border-radius:10px;height:100%;width:70vw;overflow-y:scroll}.container-right[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#fff;border-radius:10px;height:100%;width:30vw;overflow-y:scroll}.container-bottom[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#fff;margin-top:10px;border-radius:10px;height:30%}.flex-container[_ngcontent-%COMP%]{padding:20px}.input-field[_ngcontent-%COMP%]{margin-right:30px}.form-field[_ngcontent-%COMP%]{width:100%;padding-top:20px;padding-bottom:20px}.icon-highlight[_ngcontent-%COMP%]{color:var(--mat-badge-background-color)}.icon-loading[_ngcontent-%COMP%]{transition:transform .5s}.icon-loading.animate[_ngcontent-%COMP%]{transform:rotate(360deg)}.div-form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:no-wrap;align-content:space-around;gap:30px;width:100%}.div-debug-prompt[_ngcontent-%COMP%]{width:100%}.div-form-element[_ngcontent-%COMP%]{margin:auto;width:100%}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.mat-subfield-text[_ngcontent-%COMP%]{font-size:small}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};function TZ(n,t){n&1&&(s(0,"mat-icon"),u(1,"unfold_more"),c());}
595function IZ(n,t){n&1&&(s(0,"mat-icon"),u(1,"unfold_less"),c());}function kZ(n,t){if(n&1){let e=oe();s(0,"div",23)(1,"mat-icon",34),u(2,"terminal"),c(),s(3,"span",8),q(4,3),c(),s(5,"div",9)(6,"button",35),E("click",function(){k(e);let o=x();return R(o.togglePanel("bp"));}),S(7,TZ,2,0,"mat-icon"),S(8,IZ,2,0,"mat-icon"),c()()();}if(n&2){let e=x();N("ngClass",e.isFolded("bp")?"container-tile-folded":"container-tile-title"),m(7),M(e.isFolded("bp")?7:-1),m(),M(e.isFolded("bp")?-1:8);}}function RZ(n,t){if(n&1&&ee(0,"app-solution-requirement",36),n&2){let e=t.$implicit,i=t.$index,o=x(2);N("projectId",o.pid)("businessProcessId",o.bpid)("subProcessId",o.spid)("collectionPath","/projects/"+o.pid+"/solutionrequirements/")("deployableComponentMap",o.deployableComponentMap)("processTask",o.object)("object",o.solutionRequirementMap.get(e))("order",i+1);}}function NZ(n,t){if(n&1&&(s(0,"div",24),be(1,RZ,1,8,"app-solution-requirement",36,Pt),c()),n&2){let e=x();m(),ye(e.object.solutionRequirements);}}function AZ(n,t){n&1&&(s(0,"span",8),q(1,4),c());}function DZ(n,t){n&1&&(s(0,"span",31),q(1,5),c());}function jZ(n,t){n&1&&(s(0,"span",31),q(1,6),c());}function LZ(n,t){if(n&1&&(s(0,"div")(1,"div",37),u(2,"Generation Prompt"),c(),ee(3,"div",30)(4,"p"),s(5,"div",37),u(6,"Data"),c(),s(7,"pre"),u(8),Zn(9,"json"),c()()),n&2){let e=x(2);m(3),N("innerHTML",e.debugData.generation.prompt,xl),m(5),G(yo(9,2,e.debugData.generation.data));}}function zZ(n,t){if(n&1&&(s(0,"div")(1,"div",37),u(2,"Compliance Prompt"),c(),ee(3,"div",30)(4,"p"),s(5,"div",37),u(6,"Data"),c(),s(7,"pre"),u(8),Zn(9,"json"),c()()),n&2){let e=x(2);m(3),N("innerHTML",e.debugData.compliance.prompt,xl),m(5),G(yo(9,2,e.debugData.compliance.data));}}function FZ(n,t){if(n&1&&(s(0,"div")(1,"div",37),u(2,"Insight Prompt"),c(),ee(3,"div",30)(4,"p"),s(5,"div",37),u(6,"Data"),c(),s(7,"pre"),u(8),Zn(9,"json"),c()()),n&2){let e=x(2);m(3),N("innerHTML",e.debugData.reference.prompt,xl),m(5),G(yo(9,2,e.debugData.reference.data));}}function BZ(n,t){if(n&1&&(s(0,"div",33),S(1,LZ,10,4,"div"),S(2,zZ,10,4,"div"),S(3,FZ,10,4,"div"),c()),n&2){let e=x();m(),M(e.debugData.generation?1:-1),m(),M(e.debugData.compliance?2:-1),m(),M(e.debugData.reference?3:-1);}}var nu=class n{constructor(t,e,i,o,a,r,l){this.firebase=t;this.router=e;this.route=i;this.authService=o;this.httpClient=a;this.messagingService=r;this.loggingService=l;this.form=new Ri({number:new st("",Ye.required),name:new st("",Ye.required),description:new st("")});}firebase;router;route;authService;httpClient;messagingService;loggingService;subscriptions=new jo();formControlRef;object;objectRef;form;objectLabel="Process Task";collectionLabel="Process Tasks";collectionPath;parentRouterLink;currentRouterLink;id;bpid;spid;pid;insightTitle="";insight="";debugData;deployableComponentMap;solutionRequirementMap=new Map();ngOnInit(){return $(this,null,function*(){try{let t=this.route.snapshot.paramMap.get("bpid");if(t!=null&&(this.bpid=t),!this.bpid)return;let e=this.route.snapshot.paramMap.get("spid");if(e!=null&&(this.spid=e),!this.spid)return;let i=this.route.snapshot.paramMap.get("pid");if(i!=null&&(this.pid=i),!this.pid)return;this.collectionPath="/projects/"+this.pid+"/businessprocesses/"+this.bpid+"/subprocesses/"+this.spid+"/processtasks/",this.parentRouterLink="/dashboard/project/"+this.pid+"/businessprocess/"+this.bpid+"/subprocess/"+this.spid;let o=this.route.snapshot.paramMap.get("id");if(o!=null&&(this.id=o),!this.id)return;this.currentRouterLink="/dashboard/project/"+this.pid+"/businessprocess/"+this.bpid+"/subprocess/"+this.spid+"/processtask/"+this.id,this.objectRef=ge(this.firebase.firestore,this.collectionPath,this.id),this.subscriptions.add(Bn(this.objectRef,p=>$(this,null,function*(){this.object=X({id:p.id},p.data()),this.form.patchValue({number:this.object.number,name:this.object.name,description:this.object.description});})));let a=mt(we(this.firebase.firestore,"/projects/"+this.pid+"/solutionrequirements/"));this.subscriptions.add(Bn(a,p=>{for(let d of p.docs){let f=X({id:d.id},d.data()),h=this.solutionRequirementMap.get(f.id);h&&(f.processTaskReferences=h.processTaskReferences),this.solutionRequirementMap.set(f.id,f);}})),this.deployableComponentMap=new Map();let r=mt(we(this.firebase.firestore,"systemComponents"),Jt("name")),l=yield at(r);for(let p of l.docs){let d=X({id:p.id},p.data());this.deployableComponentMap.set(d.id,d);}}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading data","",{duration:3e3});}});}ngOnDestroy(){this.subscriptions.unsubscribe();}clickSave(){let t=ts.extractDataFromFormGroup(this.form);this.saveObject(t);}saveObject(t){return $(this,null,function*(){this.objectRef?yield Dt(this.objectRef,t,{merge:!0}):(console.log(this.collectionPath),t.creationDate=new Date(),this.objectRef=yield Ht(we(this.firebase.firestore,this.collectionPath),t)),this.messagingService.open("Data saved","",{duration:3e3});});}setInsightTitle(t){this.insightTitle=t;}setInsight(t){this.insight=t;}setDebugData(t){this.debugData=t;}clickGapAnalysis(){this.router.navigate(["dashboard/gapanalysis/"+this.pid]);}clickBack(){this.router.navigate([this.parentRouterLink]);}foldablePanel=new Map();isFolded(t,e){e==null&&(e=!1);let i=this.foldablePanel.get(t);return i??(this.foldablePanel.set(t,e),!1);}foldPanel(t){}unfoldPanel(t){}togglePanel(t){let e=this.isFolded(t);e=!e,this.foldablePanel.set(t,e);}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Oo),le(Zr),le(Bt),le(Mo));};static ɵcmp=Te({type:n,selectors:[["app-process-task"]],inputs:{collectionPath:"collectionPath"},decls:56,vars:21,consts:()=>{let t;t="Resources";let e;e="Requirements";let i;i="Additional information";let o;o="Select an information field to get and advanced description and generate helpul insight from relevant sources.";let a;return a="No resources available.",[["processtask_name",""],["processtask_description",""],t,e,i,o,a,[1,"div-toolbar"],[1,"title"],[1,"div-button-right"],["mat-flat-button","",3,"disabled"],["mat-flat-button","","color","primary",3,"click"],[1,"div-content"],[1,"container"],[1,"container-left"],[1,"container-tile"],[3,"formGroup"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","number",3,"change"],[1,"mat-subfield-text"],["objectType","processTask","field","processtask_name","controlName","name",3,"onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],["objectType","processTask","field","processtask_description","controlName","description",3,"onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],[3,"ngClass"],[1,"container-tile-body"],[1,"container-right"],[1,"container-right-top"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"container-tile-body-strong"],[1,"div-insight",3,"innerHTML"],[1,"div-insight-disabled"],[1,"container-right-bottom"],[1,"flex-container"],[1,"container-tile-icon"],["mat-icon-button","","color","primary",3,"click"],[3,"projectId","businessProcessId","subProcessId","collectionPath","deployableComponentMap","processTask","object","order"],[1,"div-insight-title"]];},template:function(e,i){if(e&1&&(s(0,"div")(1,"mat-toolbar",7)(2,"mat-icon"),u(3,"attribution"),c(),s(4,"span",8),u(5),c(),s(6,"div",9)(7,"button",10),u(8," Design process mode "),s(9,"mat-icon"),u(10,"category"),c()(),s(11,"button",11),E("click",function(){return i.clickGapAnalysis();}),u(12," Gap analysis mode "),s(13,"mat-icon"),u(14,"tune"),c()()()()(),s(15,"div",12)(16,"div",13)(17,"div",14)(18,"div",15)(19,"form",16)(20,"div",17)(21,"mat-form-field",18)(22,"mat-label"),u(23,"Process Task Number"),c(),s(24,"input",19),E("change",function(){return i.clickSave();}
595),c(),s(25,"mat-error",20),u(26,"Field is required"),c()()(),s(27,"div",17)(28,"app-intelligent-field",21,0),E("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()(),s(30,"div",17)(31,"app-intelligent-field",22,1),E("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()()()(),S(33,kZ,9,3,"div",23),S(34,NZ,3,0,"div",24),c(),s(35,"div",25)(36,"div",26)(37,"div",27)(38,"mat-icon",28),u(39,"info"),c(),s(40,"span",8),u(41),c(),S(42,AZ,2,0,"span",8),c(),s(43,"div",29)(44,"div",30),u(45),c(),S(46,DZ,2,0,"span",31),c()(),s(47,"div",32)(48,"div",27)(49,"mat-icon",28),u(50,"folder_special"),c(),s(51,"span",8),q(52,2),c()(),s(53,"div",29),S(54,jZ,2,0,"span",31),S(55,BZ,4,3,"div",33),c()()()()()),e&2){let o=bn(32);m(5),_p("",i.objectLabel," : ",i.form.value.number,". ",i.form.value.name),m(2),N("disabled",!0),m(12),N("formGroup",i.form),m(9),N("nextIntelligenField",o)("object",i.object)("form",i.form)("notesPath","projects/"+i.pid),m(3),N("object",i.object)("form",i.form)("notesPath","projects/"+i.pid),m(2),M(i.object?33:-1),m(),M(i.object&&i.isFolded("bp")==!1?34:-1),m(7),G(i.insightTitle),m(),M(i.insightTitle==""?42:-1),m(2),N("innerHTML",i.insight,xl),m(),G(i.insight),m(),M(i.insight==""?46:-1),m(8),M(i.debugData?-1:54),m(),M(i.debugData?55:-1);}},dependencies:[$e,Qe,Qt,jt,Xt,Vt,Wt,ti,br,ut,Kr,Vd,We,Xe,tn,Nn,Ft,Tt,Mn,An,Wn,Gt,ln,yn,ST],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
595.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.div-toolbar[_ngcontent-%COMP%]{height:65px;margin-bottom:10px}.title[_ngcontent-%COMP%]{padding-left:10px}.div-content[_ngcontent-%COMP%]{height:calc(100% - 100px);margin-left:10px;margin-right:10px}.div-insight-title[_ngcontent-%COMP%]{font-weight:700;padding-bottom:10px}.div-insight[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:30vw}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:30vw;color:gray}.container[_ngcontent-%COMP%]{height:calc(100% - 100px);display:flex;flex-direction:row;flex-wrap:nowrap;white-space:nowrap;background-color:transparent}.container-tile-icon[_ngcontent-%COMP%]{color:#465d91}.container-tile[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;padding:20px;margin-bottom:10px}.container-tile-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#faf9fd;color:#465d91;border-bottom:2px solid #465d91;border-radius:10px 10px 0 0;padding:20px;margin-top:10px;max-height:20px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:20px;max-height:20px}.container-tile-folded[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#faf9fd;color:#465d91;border-radius:10px;padding:20px;margin-top:10px;max-height:20px}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;width:100%}.container-tile-body[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:20px}.container-tile-body-strong[_ngcontent-%COMP%]{border-radius:0 0 10px 10px;padding:20px}.container-left[_ngcontent-%COMP%]{margin-right:10px;height:100%;width:70vw;overflow-y:auto;overflow-x:auto;border-radius:10px}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}.container-right[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:nowrap;white-space:nowrap}.container-right-top[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#faf9fd;border-radius:10px;height:50%;width:30vw;overflow-y:auto}.container-right-bottom[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#faf9fd;margin-top:10px;border-radius:10px;height:50%;width:30vw;overflow-y:auto}.container-bottom[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#fff;margin-top:10px;border-radius:10px;height:100px}.div-container-button[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;height:100%;gap:20px}.input-field[_ngcontent-%COMP%]{margin-right:30px}.form-field[_ngcontent-%COMP%]{width:100%;padding-top:20px;padding-bottom:20px}.icon-highlight[_ngcontent-%COMP%]{color:var(--mat-badge-background-color)}.icon-loading[_ngcontent-%COMP%]{transition:transform .5s}.icon-loading.animate[_ngcontent-%COMP%]{transform:rotate(360deg)}.div-form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:no-wrap;align-content:space-around;
595gap:30px;width:100%}.div-debug-prompt[_ngcontent-%COMP%]{width:100%}.div-form-element[_ngcontent-%COMP%]{margin:auto;width:100%}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.mat-subfield-text[_ngcontent-%COMP%]{font-size:small}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};var $Z=["stepper"];function VZ(n,t){n&1&&(s(0,"span"),q(1,20),c());}function GZ(n,t){n&1&&ee(0,"mat-spinner",62);}function qZ(n,t){n&1&&(fi(0),s(1,"span"),q(2,21),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function JZ(n,t){n&1&&(s(0,"span"),q(1,22),c());}function HZ(n,t){n&1&&ee(0,"mat-spinner",62);}function UZ(n,t){n&1&&(fi(0),s(1,"span"),q(2,23),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function WZ(n,t){n&1&&(s(0,"span"),q(1,24),c());}function XZ(n,t){if(n&1&&ee(0,"lib-attachment-list",69),n&2){let e=x();N("referenceCollection","projects")("referenceId",e.projectId);}}function YZ(n,t){n&1&&ee(0,"mat-spinner",62);}function KZ(n,t){n&1&&(fi(0),s(1,"span"),q(2,25),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function ZZ(n,t){n&1&&(s(0,"span"),q(1,26),c());}function QZ(n,t){n&1&&(s(0,"div",76)(1,"mat-icon",77),u(2,"check_circle"),c(),s(3,"span"),q(4,34),c()());}function eQ(n,t){if(n&1){let e=oe();s(0,"div",52)(1,"div",73)(2,"mat-icon"),u(3,"hub"),c()(),s(4,"div")(5,"div",54),q(6,27),c(),s(7,"div",55),q(8,28),c()()(),s(9,"div",74)(10,"div",75)(11,"div",76)(12,"mat-icon",77),u(13,"check_circle"),c(),s(14,"span"),q(15,29),c()(),S(16,QZ,5,0,"div",76),s(17,"div",76)(18,"mat-icon",78),u(19,"radio_button_unchecked"),c(),s(20,"span"),q(21,30),c()(),s(22,"div",76)(23,"mat-icon",78),u(24,"radio_button_unchecked"),c(),s(25,"span"),q(26,31),c()()()(),s(27,"div",59)(28,"button",66),q(29,32),c(),s(30,"button",79),E("click",function(){k(e);let o=x();return R(o.onCreateWorkspace());}),s(31,"mat-icon"),u(32,"rocket_launch"),c(),s(33,"span"),q(34,33),c()()();}if(n&2){let e=x();m(16),M(e.noteId?16:-1),m(12),N("disabled",e.saving);}}function tQ(n,t){n&1&&(s(0,"div",70),ee(1,"mat-spinner",80),s(2,"div",81),q(3,35),c(),s(4,"div",82),q(5,36),c()());}function nQ(n,t){if(n&1){let e=oe();s(0,"div",71)(1,"mat-icon",83),u(2,"error_outline"),c(),s(3,"div",84),q(4,37),c(),s(5,"div",85),q(6,38),c(),s(7,"div",86)(8,"button",87),E("click",function(){k(e);let o=x();return R(o.onOpenProject());}),q(9,39),c(),s(10,"button",79),E("click",function(){k(e);let o=x();return R(o.onCreateWorkspace());}),s(11,"mat-icon"),u(12,"refresh"),c(),s(13,"span"),q(14,40),c()()()();}}function iQ(n,t){if(n&1){let e=oe();s(0,"div",72)(1,"mat-icon",88),u(2,"check_circle"),c(),s(3,"div",89),q(4,41),c(),s(5,"div",90),q(6,42),c(),s(7,"div",91)(8,"button",79),E("click",function(){k(e);let o=x();return R(o.onOpenProject());}),s(9,"span"),q(10,43),c(),s(11,"mat-icon"),u(12,"arrow_forward"),c()()()();}}var Wf=class n{constructor(t,e,i,o,a,r){this.dialogRef=t;this.data=e;this.firebase=i;this.messagingService=o;this.loggingService=a;this.localeService=r;}dialogRef;data;firebase;messagingService;loggingService;localeService;stepper;saving=!1;projectId=null;collectionPath="projects";workspaceCreating=!1;workspaceCreated=!1;workspaceError=!1;noteId=null;step1Form=new Ri({name:new st("",Ye.required)});noteForm=new Ri({title:new st("Initial Project Context"),content:new st("")});ngOnInit(){if(this.data?.projectId&&(this.projectId=this.data.projectId),this.data?.initialData){let t=this.data.initialData;this.step1Form.patchValue({name:t.name??""});}}onNextStep1(){return $(this,null,function*(){if(!(this.step1Form.invalid||this.saving)){this.saving=!0;try{if(this.projectId)yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),Ve(X({},this.step1Form.value),{wizardStep:1}),{merge:!0});else{let t=yield Ht(we(this.firebase.firestore,this.collectionPath),Ve(X({},this.step1Form.value),{creationDate:Rn.now(),selectedContextIds:[],wizardCompleted:!1,wizardStep:1}));this.projectId=t.id;}this.stepper.next();}catch(t){this.loggingService.error(t),this.messagingService.open("Error saving project data","",{duration:3e3});}finally{this.saving=!1;}}});}onNextStep2(){return $(this,null,function*(){if(!(!this.projectId||this.saving)){this.saving=!0;try{let t=(this.noteForm.value.title??"").trim()||"Initial Project Context",e=(this.noteForm.value.content??"").trim(),i=yield Ht(we(this.firebase.firestore,`${this.collectionPath}/${this.projectId}/notes`),{title:t,content:e,date:Rn.now(),useForGenAI:!0});if(this.noteId=i.id,yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{wizardStep:2},{merge:!0}),e){let o=`${this.collectionPath}/${this.projectId}/notes/${this.noteId}`,a=this.localeService.getSelectedLocaleShort();ei(this.firebase.functions,"functionReviewNoteStream").stream({noteDocPath:o,content:e,title:t,locale:a}).catch(()=>{});}this.stepper.next();}catch(t){this.loggingService.error(t);}finally{this.saving=!1;}}});}onNextStep3(){return $(this,null,function*(){if(!(!this.projectId||this.saving)){this.saving=!0;try{yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{wizardStep:3},{merge:!0}),this.stepper.next();}catch(t){this.loggingService.error(t);}finally{this.saving=!1;}}});}
595onCreateWorkspace(){return $(this,null,function*(){if(!(!this.projectId||this.workspaceCreating)){this.workspaceCreating=!0,this.workspaceError=!1;try{yield ei(this.firebase.functions,"functionCreateProjectWorkspace")({projectId:this.projectId}),yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{wizardCompleted:!0,wizardStep:4},{merge:!0}),this._triggerDescriptionGeneration(),this.workspaceCreated=!0;}catch(t){this.loggingService.error(t),this.workspaceError=!0;}finally{this.workspaceCreating=!1;}}});}onOpenProject(){if(!this.projectId)return;let t={projectId:this.projectId,completed:!0};this.dialogRef.close(t);}_triggerDescriptionGeneration(){return $(this,null,function*(){try{if(!this.projectId)return;let a=ei(this.firebase.functions,"functionGeneratePromptStream"),r={objectType:"project",fieldId:"project_description",version:"2.0",locale:this.localeService.getSelectedLocaleShort(),objectDocPath:`${this.collectionPath}/${this.projectId}`,object:{name:this.step1Form.value.name}},{stream:l}=yield a.stream(r),p="";try{for(var t=Co(l),e,i,o;e=!(i=yield t.next()).done;e=!1){let d=i.value;let f=d[0];f?.description&&(p=f.description);}}catch(i){o=[i];}finally{try{e&&(i=t.return)&&(yield i.call(t));}finally{if(o)throw o[0];}}p&&this.projectId&&(yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{description:p},{merge:!0}));}catch(a){}});}onSkip(){return $(this,null,function*(){if(this.saving)return;if(!this.projectId){if(!(this.step1Form.value.name??"").trim()){this.dialogRef.close(null);return;}this.saving=!0;try{let i=yield Ht(we(this.firebase.firestore,this.collectionPath),Ve(X({},this.step1Form.value),{creationDate:Rn.now(),selectedContextIds:[],wizardCompleted:!1,wizardStep:0}));this.projectId=i.id;}catch(i){this.loggingService.error(i);}finally{this.saving=!1;}}let t=this.projectId?{projectId:this.projectId,completed:!1}:null;this.dialogRef.close(t);});}static ɵfac=function(e){return new(e||n)(le(Li),le(fo),le(On),le(Bt),le(Mo),le(To));};static ɵcmp=Te({type:n,selectors:[["app-project-wizard"]],viewQuery:function(e,i){if(e&1&&go($Z,5),e&2){let o;qn(o=Jn())&&(i.stepper=o.first);}},decls:96,vars:21,consts:()=>{let t;t="New Project";let e;e="Project Identity";let i;i=" Give your project a clear, descriptive name. ";let o;o="Project name";let a;a="Required \u2014 choose a clear, descriptive name";let r;r="Project name is required";let l;l="Skip wizard";let p;p="Project Context";let d;d=" Share any information about your project \u2014 a transcript, a brief, meeting notes, or any content you have. This will be saved as a note and analyzed by AI. ";let f;f="Note title";let h;h="Optional \u2014 defaults to \"Initial Project Context\"";let g;g="Project information";let b;b=" Paste or type anything \u2014 a meeting transcript, a description, an email thread, a brief. The more context, the better. ";let w;w="Back";let T;T="Skip wizard";let O;O="Upload Documents";let V;V=" Upload any relevant documents \u2014 reports, plans, briefs, or reference files. These will be available in your project workspace. ";let j;j="Back";let L;L="Skip wizard";let A;A="Identity";let J;J="Next";let Q;Q="Context";let te;te="Next";let U;U="Documents";let ce;ce="Next";let W;W="Workspace";let Y;Y="Create Your Workspace";let se;se=" Your project is ready. Click below to initialize your AI workspace \u2014 a dedicated vector database will be created and a first project description will be generated in the background. ";let de;de="Project identity saved";let Ae;Ae="Initialize AI workspace";let rt;rt="Generate first project description (background)";let et;et="Back";let pt;pt="Create Workspace";let ft;ft="Context note saved & submitted for review";let je;je=" Setting up your workspace\u2026 ";let ke;ke=" Initializing your AI vector database. This may take a few seconds. ";let Ke;Ke=" Workspace initialization failed ";let ve;ve=" An error occurred while setting up the workspace. You can retry or open the project now. ";let Se;Se="Open Project Anyway";let Be;Be="Retry";let Ze;
595Ze=" Workspace created successfully! ";let kt;kt=" Your AI workspace is ready. A first project description is being generated in the background and will appear when you open the project. ";let Z;return Z="Open Project",[["stepper",""],t,e,i,o,a,r,l,p,d,f,h,g,b,w,T,O,V,j,L,A,J,Q,te,U,ce,W,Y,se,de,Ae,rt,et,pt,ft,je,ke,Ke,ve,Se,Be,Ze,kt,Z,["mat-dialog-title","",1,"wizard-title"],[1,"wizard-header-icon"],[1,"wizard-spacer"],[1,"wizard-step-indicator"],[1,"wizard-content"],["animationDuration","300ms",1,"wizard-stepper",3,"linear"],[3,"stepControl"],["matStepLabel",""],[1,"step-header"],[1,"step-icon-wrap","step-icon-1"],[1,"step-title"],[1,"step-subtitle"],[1,"step-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","cdkFocusInitial","","autocomplete","off"],[1,"step-actions"],["mat-button","",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click","disabled"],["diameter","18",1,"btn-spinner"],[1,"step-icon-wrap","step-icon-2"],["matInput","","formControlName","title","autocomplete","off"],["matInput","","formControlName","content","rows","10","cdkTextareaAutosize","","cdkAutosizeMinRows","8","cdkAutosizeMaxRows","20"],["mat-button","","matStepperPrevious","",3,"disabled"],[1,"step-icon-wrap","step-icon-3"],[1,"step-form"],[3,"referenceCollection","referenceId"],[1,"workspace-creating-state"],[1,"workspace-error-state"],[1,"workspace-success-state"],[1,"step-icon-wrap","step-icon-4"],[1,"step-form","workspace-ready-content"],[1,"workspace-checklist"],[1,"workspace-checklist-item"],[1,"checklist-icon","checklist-done"],[1,"checklist-icon","checklist-pending"],["mat-flat-button","","color","primary",3,"click"],["diameter","56"],[1,"workspace-creating-title"],[1,"workspace-creating-subtitle"],[1,"workspace-error-icon"],[1,"workspace-error-title"],[1,"workspace-error-subtitle"],[1,"step-actions","workspace-error-actions"],["mat-button","",3,"click"],[1,"workspace-success-icon"],[1,"workspace-success-title"],[1,"workspace-success-subtitle"],[1,"step-actions","workspace-success-actions"]];},template:function(e,i){if(e&1&&(s(0,"h2",44)(1,"mat-icon",45),u(2,"category"),c(),s(3,"span"),q(4,1),c(),ee(5,"span",46),s(6,"span",47),u(7),c()(),s(8,"mat-dialog-content",48)(9,"mat-stepper",49,0)(11,"mat-step",50),Zt(12,VZ,2,0,"ng-template",51),s(13,"div",52)(14,"div",53)(15,"mat-icon"),u(16,"badge"),c()(),s(17,"div")(18,"div",54),q(19,2),c(),s(20,"div",55),q(21,3),c()()(),s(22,"form",56)(23,"mat-form-field",57)(24,"mat-label"),q(25,4),c(),ee(26,"input",58),s(27,"mat-hint"),q(28,5),c(),s(29,"mat-error"),q(30,6),c()()(),s(31,"div",59)(32,"button",60),E("click",function(){return i.onSkip();}),q(33,7),c(),s(34,"button",61),E("click",function(){return i.onNextStep1();}),S(35,GZ,1,0,"mat-spinner",62)(36,qZ,5,0,"ng-container"),c()()(),s(37,"mat-step"),Zt(38,JZ,2,0,"ng-template",51),s(39,"div",52)(40,"div",63)(41,"mat-icon"),u(42,"notes"),c()(),s(43,"div")(44,"div",54),q(45,8),c(),s(46,"div",55),q(47,9),c()()(),s(48,"form",56)(49,"mat-form-field",57)(50,"mat-label"),q(51,10),c(),ee(52,"input",64),s(53,"mat-hint"),q(54,11),c()(),s(55,"mat-form-field",57)(56,"mat-label"),q(57,12),c(),ee(58,"textarea",65),s(59,"mat-hint"),q(60,13),c()()(),s(61,"div",59)(62,"button",66),q(63,14),c(),s(64,"button",60),E("click",function(){return i.onSkip();}),q(65,15),c(),s(66,"button",61),E("click",function(){return i.onNextStep2();}),S(67,HZ,1,0,"mat-spinner",62)(68,UZ,5,0,"ng-container"),c()()(),s(69,"mat-step"),Zt(70,WZ,2,0,"ng-template",51),s(71,"div",52)(72,"div",67)(73,"mat-icon"),u(74,"upload_file"),c()(),s(75,"div")(76,"div",54),q(77,16),c(),s(78,"div",55),q(79,17),c()()(),s(80,"div",68),S(81,XZ,1,2,"lib-attachment-list",69),c(),s(82,"div",59)(83,"button",66),q(84,18),c(),s(85,"button",60),E("click",function(){return i.onSkip();}),q(86,19),c(),s(87,"button",61),E("click",function(){return i.onNextStep3();}),S(88,YZ,1,0,"mat-spinner",62)(89,KZ,5,0,"ng-container"),c()()(),s(90,"mat-step"),Zt(91,ZZ,2,0,"ng-template",51),S(92,eQ,35,2),S(93,tQ,6,0,"div",70),S(94,nQ,15,0,"div",71),S(95,iQ,13,0,"div",72),c()()()),e&2){let o=bn(10);m(7),_e(" ",((o==null?null:o.selectedIndex)??0)+1," / 4 "),m(2),N("linear",!0),m(2),N("stepControl",i.step1Form),m(11),N("formGroup",i.step1Form),m(10),N("disabled",i.saving),m(2),N("disabled",i.step1Form.invali
595d||i.saving),m(),M(i.saving?35:36),m(13),N("formGroup",i.noteForm),m(14),N("disabled",i.saving),m(2),N("disabled",i.saving),m(2),N("disabled",i.saving),m(),M(i.saving?67:68),m(14),M(i.projectId?81:-1),m(2),N("disabled",i.saving),m(2),N("disabled",i.saving),m(2),N("disabled",i.saving),m(),M(i.saving?88:89),m(4),M(!i.workspaceCreating&&!i.workspaceCreated&&!i.workspaceError?92:-1),m(),M(i.workspaceCreating?93:-1),m(),M(i.workspaceError&&!i.workspaceCreating?94:-1),m(),M(i.workspaceCreated?95:-1);}},dependencies:[ut,tn,Nn,Ft,Tt,Mn,An,Wn,Zi,Bo,$o,z3,D3,A3,j3,L3,$e,Qe,Gt,Vt,Wt,Ki,ti,jt,Xt,ud,We,Xe,Fi,zi,$t,vf],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
595.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.wizard-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:1.2rem;font-weight:600;padding:16px 24px 8px}.wizard-header-icon[_ngcontent-%COMP%]{color:#465d91;font-size:28px;width:28px;height:28px}.wizard-spacer[_ngcontent-%COMP%]{flex:1}.wizard-step-indicator[_ngcontent-%COMP%]{font-size:.8rem;font-weight:400;color:#00000073;letter-spacing:.5px}.wizard-content[_ngcontent-%COMP%]{padding:0!important;max-height:72vh;overflow-y:auto}.wizard-stepper[_ngcontent-%COMP%]{background:transparent}.wizard-stepper[_ngcontent-%COMP%] .mat-stepper-horizontal-line{margin:0 -6px}.wizard-stepper[_ngcontent-%COMP%] .mat-step-header{padding:12px 16px}.wizard-stepper[_ngcontent-%COMP%] .mat-step-header:hover{background-color:#465d910f;border-radius:6px}.wizard-stepper[_ngcontent-%COMP%] .mat-step-header .mat-step-icon-selected, .wizard-stepper[_ngcontent-%COMP%] .mat-step-header .mat-step-icon-state-done, .wizard-stepper[_ngcontent-%COMP%] .mat-step-header .mat-step-icon-state-edit{background-color:#465d91}.wizard-stepper[_ngcontent-%COMP%] .mat-horizontal-content-container{padding:0 24px 8px}.step-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:20px 0 16px}.step-icon-wrap[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.step-icon-wrap[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;font-size:22px;width:22px;height:22px}.step-icon-1[_ngcontent-%COMP%]{background-color:#465d91d9}.step-icon-2[_ngcontent-%COMP%]{background-color:#465d91bf}.step-icon-3[_ngcontent-%COMP%]{background-color:#465d91a6}.step-icon-4[_ngcontent-%COMP%]{background-color:#465d918c}.step-icon-5[_ngcontent-%COMP%]{background-color:#465d91b3}.step-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:#000000de}.step-subtitle[_ngcontent-%COMP%]{font-size:.85rem;color:#0000008c;margin-top:2px}.step-subtitle[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{font-style:normal;color:#465d91;font-weight:500}.step-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.full-width[_ngcontent-%COMP%]{width:100%}.two-col[_ngcontent-%COMP%]{display:flex;gap:12px;width:100%}.two-col[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{flex:1}@media(max-width:520px){.two-col[_ngcontent-%COMP%]{flex-direction:column}}.step-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:16px 0 8px;border-top:1px solid rgba(0,0,0,.08);margin-top:12px}.step-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:first-child{margin-right:auto}.btn-spinner[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}.btn-spinner[_ngcontent-%COMP%] circle{stroke:#fff}[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0003;border-radius:3px}.workspace-error-state[_ngcontent-%COMP%], .workspace-success-state[_ngcontent-%COMP%], .workspace-creating-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 16px 24px;gap:12px}.workspace-creating-state[_ngcontent-%COMP%] .workspace-creating-title[_ngcontent-%COMP%]{font-size:1.1rem;font-weight:600;color:#000c;margin-top:8px}.workspace-creating-state[_ngcontent-%COMP%] .workspace-creating-subtitle[_ngcontent-%COMP%]{font-size:.85rem;color:#00000080;max-width:380px}.workspace-success-state[_ngcontent-%COMP%] .workspace-success-icon[_ngcontent-%COMP%]{font-size:56px;width:56px;height:56px;color:#4caf50}.workspace-success-state[_ngcontent-%COMP%] .workspace-success-title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;color:#000000de}.workspace-success-state[_ngcontent-%COMP%] .workspace-success-subtitle[_ngcontent-%COMP%]{font-size:.85rem;color:#00000080;max-width:400px;line-height:1.5}.workspace-success-state[_ngcontent-%COMP%] .workspace-success-actions[_ngcontent-%COMP%]{margin-top:8px;border-top:none;padding-top:0}.workspace-error-state[_ngcontent-%COMP%] .workspace-error-icon[_ngcontent-%COMP%]{font-size:52px;width:52px;height:52px;color:#f44336}.workspace-error-state[_ngcontent-%COMP%] .workspace-error-title[_ngcontent-%COMP%]{font-size:1.1rem;font-weight:600;color:#000000de}.workspace-error-state[_ngcontent-%COMP%] .workspace-error-subtitle[_ngcontent-%COMP%]{font-size:.85rem;color:#00000080;max-width:400px;line-height:1.5}.workspace-error-state[_ngcontent-%COMP%] .workspace-error-actions[_ngcontent-%COMP%]{margin-top:8px;border-top:none;padding-top:0;width:100%}.workspace-ready-content[_ngcontent-%COMP%]{padding:8px 0 4px}
595.workspace-checklist[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;background:#00000008;border-radius:8px;padding:16px 20px;border:1px solid rgba(0,0,0,.07)}.workspace-checklist-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:.9rem;color:#000000bf}.checklist-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;flex-shrink:0}.checklist-done[_ngcontent-%COMP%]{color:#4caf50}.checklist-pending[_ngcontent-%COMP%]{color:#0000004d}"]});};var xv=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-delete-confirm-dialog"]],decls:17,vars:3,consts:()=>{let t;t="Delete project?";let e;e=" You are about to permanently delete "+"\uFFFD#8\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#8\uFFFD"+" and all its associated data (business processes, requirements, notes, attachments). ";let i;i=" This action cannot be undone. ";let o;o=" Cancel ";let a;return a=""+"\uFFFD#16\uFFFD"+"delete"+"\uFFFD/#16\uFFFD"+" Delete ",[t,e,i,o,a,[1,"delete-dialog-header"],[1,"delete-dialog-icon"],["mat-dialog-title",""],[1,"delete-dialog-warning"],["align","end"],["mat-button","",3,"mat-dialog-close"],["mat-flat-button","","color","warn","cdkFocusInitial","",3,"mat-dialog-close"]];},template:function(e,i){e&1&&(s(0,"div",5)(1,"mat-icon",6),u(2,"warning"),c(),s(3,"h2",7),q(4,0),c()(),s(5,"mat-dialog-content")(6,"p"),Wr(7,1),ee(8,"strong"),Xr(),c(),s(9,"p",8),q(10,2),c()(),s(11,"mat-dialog-actions",9)(12,"button",10),q(13,3),c(),s(14,"button",11),Wr(15,4),ee(16,"mat-icon"),Xr(),c()()),e&2&&(m(8),us(i.data.projectName),fs(7),m(4),N("mat-dialog-close",!1),m(2),N("mat-dialog-close",!0));},dependencies:[Zi,S1,Bo,Vo,$o,$e,Qe,We,Xe],styles:[".delete-dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:24px 24px 0}.delete-dialog-icon[_ngcontent-%COMP%]{font-size:32px;width:32px;height:32px;color:#d32f2f}h2[mat-dialog-title][_ngcontent-%COMP%]{margin:0;font-size:20px}mat-dialog-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:8px 0}.delete-dialog-warning[_ngcontent-%COMP%]{color:#d32f2f;font-weight:500}"]});};var Cv=class n extends Wa{constructor(){super();}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};function aQ(n,t){if(n&1&&(s(0,"mat-chip")(1,"mat-icon",15),u(2),c(),u(3),c()),n&2){let e=t.$implicit,i=x();ji(i.getPhaseClass(e.phase)),m(2),G(i.getPhaseIcon(e.phase)),m(),_e(" ",i.getPhaseLabel(e.phase)," ");}}function rQ(n,t){n&1&&(s(0,"mat-chip",16)(1,"mat-icon",18),u(2,"folder_special"),c(),u(3),c()),n&2&&(m(3),_e(" ",t," "));}function sQ(n,t){n&1&&(s(0,"span",17),u(1,"\u2014"),c());}function lQ(n,t){if(n&1&&S(0,rQ,4,1,"mat-chip",16)(1,sQ,2,0,"span",17),n&2){let e,i=t.$implicit,o=x();M((e=o.getPortfolioName(i.portfolioId))?0:1,e);}}function cQ(n,t){if(n&1){let e=oe();s(0,"button",19),E("click",function(o){let a=k(e).$implicit,r=x();return R(r.deleteProject(a,o));}),s(1,"mat-icon"),u(2,"delete"),c()();}if(n&2){let e=t.$implicit,i=x();N("disabled",i.deletingProjectId===e.id);}}var E0=class n{constructor(t,e,i,o,a){this.dataSource=t;this.dialog=e;this.router=i;this.firebase=o;this.snackBar=a;}dataSource;dialog;router;firebase;snackBar;showNewButton=!1;collectionPath="projects";documentRoute="dashboard/project";displayedColumns=["identifier","creationDate","name","targetPeriod","phase","portfolio","actions"];displayedColumnsHeaders=["ID","Date","Name","Period","Phase","Portfolio","Actions"];portfolioMap=new Map();deletingProjectId=null;db=e3();ngOnInit(){return $(this,null,function*(){yield this.loadPortfolioMap();});}loadPortfolioMap(){return $(this,null,function*(){try{(yield at(we(this.db,"portfolios"))).docs.forEach(e=>{let i=e.data().name;i&&this.portfolioMap.set(e.id,i);});}catch(t){}});}getPortfolioName(t){return t?this.portfolioMap.get(t)??null:null;}clickNewProject(){this.dialog.open(Wf,{maxWidth:"1200px",width:"90vw",maxHeight:"90vh",height:"1000px",disableClose:!1,data:{}}).afterClosed().subscribe(e=>{e?.projectId&&this.router.navigate(["/dashboard/project",e.projectId]);});}deleteProject(t,e){e.stopPropagation(),this.dialog.open(xv,{width:"420px",data:{projectName:t.name}}).afterClosed().subscribe(o=>$(this,null,function*(){if(o){this.deletingProjectId=t.id;try{yield ei(this.firebase.functions,"deleteProject")({projectId:t.id}),this.snackBar.open("Project deleted successfully.","",{duration:3e3}),this.dataSource.load(this.collectionPath,this.dataSource.getLimitNb(),this.dataSource.getSortField(),this.dataSource.getSortOrder());}catch(a){console.error("deleteProject error:",a),this.snackBar.open("Error deleting project. Please try again.","",{duration:4e3});}finally{this.deletingProjectId=null;}}}));}getPhaseLabel(t){switch(t??"initiation"){case"initiation":return"Initiation";case"opportunity":return"Opportunity";case"feasibility":return"Feasibility";case"design":return"Design";case"realization":return"Realization";case"closed":return"Closed";default:return"Initiation";}}getPhaseIcon(t){switch(t??"initiation"){case"initiation":return"flag";case"opportunity":return"star_outline";case"feasibility":return"search";case"design":return"architecture";case"realization":return"rocket_launch";case"closed":return"check_circle";default:return"flag";}}getPhaseClass(t){return`phase-chip phase-${t??"initiation"}`;}static ɵfac=function(e){return new(e||n)(le(Cv),le(Ti),le(Et),le(On),le(Bt));};static ɵcmp=Te({type:n,selectors:[["app-project-list"]],decls:21,vars:6,consts:()=>{let t;t="Projects";let e;e="New Project";let i;i="Delete project";let o;return o="Delete project",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"],["appColumnTemplate","phase"],["appColumnTemplate","portfolio"],["appColumnTemplate","actions"],[1,"phase-icon"],[1,"portfolio-chip"],[1,"n
595o-portfolio"],[1,"portfolio-chip-icon"],["mat-icon-button","","aria-label",i,"matTooltip",o,1,"btn-delete",3,"click","disabled"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"category"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewProject();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10)(17,"app-object-list",11),Zt(18,aQ,4,4,"ng-template",12)(19,lQ,2,1,"ng-template",13)(20,cQ,3,1,"ng-template",14),c()()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[ut,$e,Qe,Qt,ho,ln,yn,We,Xe,yi,Ta,$t,_n,Od],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
595.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background:#fff;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-radius:10px 10px 0 0}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background:#fff;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}[_nghost-%COMP%] .btn-delete{--mat-icon-button-icon-color: #1565c0;--mdc-icon-button-icon-color: #1565c0}[_nghost-%COMP%] .btn-delete mat-icon{color:#1565c0!important}[_nghost-%COMP%] .btn-delete:disabled{--mat-icon-button-icon-color: rgba(0, 0, 0, .26);--mdc-icon-button-icon-color: rgba(0, 0, 0, .26)}[_nghost-%COMP%] .btn-delete:disabled mat-icon{color:#00000042!important}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}.phase-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;margin-right:4px;vertical-align:middle}[_nghost-%COMP%] .phase-chip{font-size:12px}[_nghost-%COMP%] .phase-chip.phase-initiation{--mdc-chip-elevated-container-color: #e8f5e9;--mdc-chip-label-text-color: #2e7d32;--mat-chip-elevated-container-color: #e8f5e9;--mat-chip-label-text-color: #2e7d32}[_nghost-%COMP%] .phase-chip.phase-opportunity{--mdc-chip-elevated-container-color: #e3f2fd;--mdc-chip-label-text-color: #1565c0;--mat-chip-elevated-container-color: #e3f2fd;--mat-chip-label-text-color: #1565c0}[_nghost-%COMP%] .phase-chip.phase-feasibility{--mdc-chip-elevated-container-color: #fff8e1;--mdc-chip-label-text-color: #f57f17;--mat-chip-elevated-container-color: #fff8e1;--mat-chip-label-text-color: #f57f17}[_nghost-%COMP%] .phase-chip.phase-design{--mdc-chip-elevated-container-color: #f3e5f5;--mdc-chip-label-text-color: #6a1b9a;--mat-chip-elevated-container-color: #f3e5f5;--mat-chip-label-text-color: #6a1b9a}[_nghost-%COMP%] .phase-chip.phase-realization{--mdc-chip-elevated-container-color: #fff3e0;--mdc-chip-label-text-color: #e65100;--mat-chip-elevated-container-color: #fff3e0;--mat-chip-label-text-color: #e65100}[_nghost-%COMP%] .phase-chip.phase-closed{--mdc-chip-elevated-container-color: #f5f5f5;--mdc-chip-label-text-color: #424242;--mat-chip-elevated-container-color: #f5f5f5;--mat-chip-label-text-color: #424242}[_nghost-%COMP%] .portfolio-chip{font-size:12px;--mdc-chip-elevated-container-color: #e8eaf6;--mdc-chip-label-text-color: #283593;--mat-chip-elevated-container-color: #e8eaf6;--mat-chip-label-text-color: #283593}.portfolio-chip-icon[_ngcontent-%COMP%]{font-size:14px!important;width:14px!important;height:14px!important;margin-right:4px;vertical-align:middle}.no-portfolio[_ngcontent-%COMP%]{color:#0000004d;font-size:.85rem}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};yl.register(..._3);var Gd=yl;function pQ(n,t){n&1&&(zo(0,"div",4),u(1,"Loading data..."),Fo());}function dQ(n,t){n&1&&(zo(0,"div",5),u(1,"No requirements data available."),Fo());}function mQ(n,t){n&1&&(zo(0,"div",4),u(1,"Loading data..."),Fo());}function uQ(n,t){n&1&&(zo(0,"div",5),u(1,"No requirements data available."),Fo());}function fQ(n,t){n&1&&(zo(0,"div",4),u(1,"Loading data..."),Fo());}function hQ(n,t){n&1&&(zo(0,"div",5),u(1,"No requirements data available."),Fo());}var vv=class n{constructor(t){this.firebase=t;}firebase;projectId;isLoading=!1;noData=!1;requirementsByComponentChart;complexityByDeliveryChart;effortByDeliveryChart;ngOnChanges(t){t.projectId&&this.projectId&&this.loadDataAndCreateCharts();}ngOnDestroy(){this.requirementsByComponentChart?.destroy(),this.complexityByDeliveryChart?.destroy(),this.effortByDeliveryChart?.destroy();}loadDataAndCreateCharts(){return $(this,null,function*(){if(this.projectId){this.isLoading=!0,this.noData=!1;try{let t=new Map(),e=mt(we(this.firebase.firestore,"systemComponents")),i=yield at(e);for(let T of i.docs){let O=X({id:T.id},T.data());t.set(O.id,O.name||"Unnamed Component");}console.log("COMPONENTS : "+t);let o=[],a=mt(we(this.firebase.firestore,"/projects/"+this.projectId+"/solutionrequirements/")),r=yield at(a);for(let T of r.docs)o.push(X({id:T.id},T.data()));if(o.length===0){this.noData=!0,this.isLoading=!1;return;}let l=new Map();for(let T of o)if(T.deployableComponents&&T.deployableComponents.length>0)for(let O of T.deployableComponents){let V=t.get(O)||"Unknown Component";l.set(V,(l.get(V)||0)+1);}else l.set("Unassigned",(l.get("Unassigned")||0)+1);let p=Array.from(l.keys()),d=Array.from(l.values()),f=["rgba(15, 23, 42, 0.85)","rgba(30, 58, 138, 0.85)","rgba(37, 99, 235, 0.85)","rgba(13, 148, 136, 0.85)","rgba(20, 184, 166, 0.85)","rgba(94, 234, 212, 0.85)","rgba(16, 185, 129, 0.85)","rgba(34, 197, 94, 0.85)","rgba(17, 94, 89, 0.85)","rgba(51, 65, 85, 0.85)","rgba(6, 182, 212, 0.85)","rgba(21, 128, 61, 0.85)"],h=f.map(T=>T.replace("0.85)","1)")),g,b=mt(we(this.firebase.firestore,"evaluationscales"),Ro("target","==","
595solution-requirement"),Ro("isDefault","==",!0)),w=yield at(b);if(!w.empty)g=X({id:w.docs[0].id},w.docs[0].data());else{let T=mt(we(this.firebase.firestore,"evaluationscales"),Ro("target","==","solution-requirement")),O=yield at(T);O.empty||(g=X({id:O.docs[0].id},O.docs[0].data()));}this.isLoading=!1,setTimeout(()=>{this.createRequirementsByComponentChart(p,d,f,h),this.createComplexityByDeliveryChart(o,f,h),g&&this.createEffortByDeliveryChart(o,g,f,h);},0);}catch(t){console.error("Error loading evaluation data:",t),this.isLoading=!1,this.noData=!0;}}});}createRequirementsByComponentChart(t,e,i,o){this.requirementsByComponentChart?.destroy();let a=document.getElementById("RequirementsByComponentChart");a&&(this.requirementsByComponentChart=new Gd(a,{type:"pie",data:{labels:t,datasets:[{data:e,backgroundColor:i.slice(0,t.length),borderColor:o.slice(0,t.length),borderWidth:2}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"right",labels:{padding:16,usePointStyle:!0,pointStyleWidth:12,font:{size:12}}},tooltip:{callbacks:{label:r=>{let l=r.label||"",p=r.parsed||0,d=r.dataset.data.reduce((h,g)=>h+g,0),f=d>0?Math.round(p/d*100):0;return` ${l}: ${p} (${f}%)`;}}}}}}));}createComplexityByDeliveryChart(t,e,i){this.complexityByDeliveryChart?.destroy();let o=document.getElementById("ComplexityByDeliveryChart");if(!o)return;let a=["E","XS","S","M","L","XL"],r=["Existing","XS","S","M","L","XL"],l={D1:"Delivery 1",D2:"Delivery 2",D3:"Delivery 3",D4:"Delivery 4",D5:"Delivery 5",D6:"Delivery 6",D7:"Delivery 7",D8:"Delivery 8",D9:"Delivery 9",D10:"Delivery 10"},p=new Map();for(let h of t){let g=h.delivery,b=h.complexity;if(!g||!b||!l[g]||!a.includes(b))continue;p.has(g)||p.set(g,new Map());let w=p.get(g);w.set(b,(w.get(b)||0)+1);}let f=Array.from(p.keys()).sort((h,g)=>{let b=parseInt(h.replace("D",""),10),w=parseInt(g.replace("D",""),10);return b-w;}).map((h,g)=>{let b=p.get(h),w=a.map(O=>b.get(O)||0),T=g%e.length;return{label:l[h]||h,data:w,borderColor:i[T],backgroundColor:e[T],fill:!1,tension:.3,pointRadius:5,pointHoverRadius:7,borderWidth:2};});this.complexityByDeliveryChart=new Gd(o,{type:"line",data:{labels:r,datasets:f},options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{title:{display:!0,text:"Complexity",font:{size:12}}},y:{title:{display:!0,text:"Number of Requirements",font:{size:12}},beginAtZero:!0,ticks:{stepSize:1}}},plugins:{legend:{position:"top",labels:{padding:16,usePointStyle:!0,pointStyleWidth:12,font:{size:12}}}}}});}createEffortByDeliveryChart(t,e,i,o){this.effortByDeliveryChart?.destroy();let a=document.getElementById("EffortByDeliveryChart");if(!a)return;let r={E:e.E||0,XS:e.XS||0,S:e.S||0,M:e.M||0,L:e.L||0,XL:e.XL||0,N:e.N||0},l={D1:"Delivery 1",D2:"Delivery 2",D3:"Delivery 3",D4:"Delivery 4",D5:"Delivery 5",D6:"Delivery 6",D7:"Delivery 7",D8:"Delivery 8",D9:"Delivery 9",D10:"Delivery 10"},p=new Map();for(let w of t){let T=w.delivery,O=w.complexity;if(!T||!O||!l[T])continue;let V=r[O]||0;p.set(T,(p.get(T)||0)+V);}let d=Array.from(p.keys()).sort((w,T)=>{let O=parseInt(w.replace("D",""),10),V=parseInt(T.replace("D",""),10);return O-V;}),f=d.map(w=>l[w]||w),h=d.map(w=>p.get(w)||0),g=d.map((w,T)=>i[T%i.length]),b=d.map((w,T)=>o[T%o.length]);this.effortByDeliveryChart=new Gd(a,{type:"bar",data:{labels:f,datasets:[{label:"Total Effort",data:h,backgroundColor:g,borderColor:b,borderWidth:2}]},options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{title:{display:!0,text:"Delivery",font:{size:12}}},y:{title:{display:!0,text:"Total Effort (points)",font:{size:12}},beginAtZero:!0}},plugins:{legend:{display:!1},tooltip:{callbacks:{label:w=>` Effort: ${w.parsed.y} points`}}}}});}static ɵfac=function(e){return new(e||n)(le(On));};static ɵcmp=Te({type:n,selectors:[["app-project-evaluation"]],inputs:{projectId:"projectId"},features:[ki],decls:22,vars:6,consts:[[1,"dashboard-container"],[1,"tile"],[1,"tile-title"],[1,"tile-content"],[1,"tile-loading"],[1,"tile-no-data"],["id","RequirementsByComponentChart"],["id","ComplexityByDeliveryChart"],["id","EffortByDeliveryChart"]],template:function(e,i){e&1&&(zo(0,"div",0)(1,"div",1)(2,"div",2),u(3,"Requirements by Component"),Fo(),zo(4,"div",3),S(5,pQ,2,0,"div",4),S(6,dQ,2,0,"div",5),Ur(7,"canvas",6),Fo()(),zo(8,"div",1)(9,"div",2),u(10,"Complexity Distribution by Delivery"),Fo(),zo(11,"div",3),S(12,mQ,2,0,"div",4),S(13,uQ,2,0,"div",5),Ur(14,"canvas",7),Fo()(),zo(15,"div",1)(16,"div",2),u(17,"Total Effort by Delivery"),Fo(),zo(18,"div",3),S(19,fQ,2,0,"div",4),S(20,hQ,2,0,"div",5),Ur(21,"canvas",8),Fo()()()),e&2&&(m(5),M(i.isLoading?5:-1),m(),M(!i.isLoading&&i.noData?6:-1),m(6),M(i.isLoading?12:-1),m(),M(!i.isLoading&&i.noData?13:-1),m(6),M(i.isLoading?19:-1),m(),M(!i.isLoading&&i.noData?20:-1));},styles:[".dashboard-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:12px;align-content:start}.tile-loading[_ngcontent-%COMP%], .tile-no-data[_ngcontent-%COMP%]{font-size:13px;color:var(--mat-sys-on-surface-variant, #666);padding:12px 0;font-style:italic}
595.tile[_ngcontent-%COMP%]{background:var(--mat-sys-surface-container-low, #fafafa);border-radius:8px;padding:16px;display:flex;flex-direction:column}.tile.tile-full[_ngcontent-%COMP%]{grid-column:1/-1}.tile-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--mat-sys-on-surface-variant, #555);text-transform:uppercase;letter-spacing:.04em;margin-bottom:8px}.tile-content[_ngcontent-%COMP%]{height:240px;position:relative}.tile-content-roi[_ngcontent-%COMP%]{height:auto}"]});};var _Q=["complexityChart"],gQ=["effortByBpChart"],xQ=["capabilityChart"];function CQ(n,t){n&1&&(zo(0,"div",4),u(1,"Loading positioning data\u2026"),Fo());}function vQ(n,t){n&1&&(zo(0,"div",5),u(1," No positioning analysis data yet. Run the Positioning analysis first to populate this panel. "),Fo());}function bQ(n,t){n&1&&(zo(0,"div",6)(1,"div",7),u(2,"Impacts by Complexity"),Fo(),zo(3,"div",8),Ur(4,"canvas",null,0),Fo()(),zo(6,"div",6)(7,"div",7),u(8,"Effort by Business Process"),Fo(),zo(9,"div",8),Ur(10,"canvas",null,1),Fo()(),zo(12,"div",6)(13,"div",7),u(14,"Top Impacted Capabilities"),Fo(),zo(15,"div",8),Ur(16,"canvas",null,2),Fo()());}var Xf=["rgba(30, 58, 138, 0.85)","rgba(37, 99, 235, 0.85)","rgba(13, 148, 136, 0.85)","rgba(20, 184, 166, 0.85)","rgba(16, 185, 129, 0.85)","rgba(34, 197, 94, 0.85)","rgba( 6, 182, 212, 0.85)","rgba(51, 65, 85, 0.85)"],bv=class n{constructor(t){this.firebase=t;}firebase;projectId;businessProcesses;hasData=new At();complexityCanvas;effortByBpCanvas;capabilityCanvas;isLoading=!0;noData=!1;complexityChart=null;effortByBpChart=null;capabilityChart=null;viewInitialized=!1;pendingChartData=null;ngAfterViewInit(){this.viewInitialized=!0,this.pendingChartData&&(this.renderCharts(this.pendingChartData),this.pendingChartData=null);}ngOnChanges(t){(t.projectId||t.businessProcesses)&&this.loadAndRender();}ngOnDestroy(){this.complexityChart?.destroy(),this.effortByBpChart?.destroy(),this.capabilityChart?.destroy();}loadAndRender(){return $(this,null,function*(){if(this.projectId){this.isLoading=!0,this.noData=!1;try{let t=yield yt(ge(this.firebase.firestore,"projects",this.projectId,"positioningAnalysis","latest")),e=t.exists()?t.data()?.positioningParams:void 0,i={XS:1,S:3,M:5,L:8,XL:13};if(e?.selectedScaleId){let f=yield yt(ge(this.firebase.firestore,"evaluationscales",e.selectedScaleId));if(f.exists()){let h=f.data();i={XS:h.XS??1,S:h.S??3,M:h.M??5,L:h.L??8,XL:h.XL??13};}}let o=yield at(we(this.firebase.firestore,"projects",this.projectId,"businessprocesses")),a=[];for(let f of o.docs){let h=f.data(),g=h.name??f.id,b=h.positioningChanges;if(b?.length)for(let w of b)a.push({bpName:g,change:w});}if(a.length===0){this.noData=!0,this.isLoading=!1,this.hasData.emit(!1);return;}let r={XS:0,S:0,M:0,L:0,XL:0},l={},p={};for(let{bpName:f,change:h}of a)for(let g of h.capabilityImpacts??[]){let b=i[g.complexity]??0;r[g.complexity]=(r[g.complexity]??0)+1,l[f]=(l[f]??0)+b;let w=g.capabilityId;p[w]||(p[w]={name:g.capabilityName||w,effort:0}),p[w].effort+=b;}this.isLoading=!1,this.hasData.emit(!0);let d={complexityCounts:r,effortByBp:l,impactsByCapability:p};setTimeout(()=>{this.viewInitialized?this.renderCharts(d):this.pendingChartData=d;},0);}catch(t){console.error("project-evaluation-positioning load error",t),this.isLoading=!1,this.noData=!0,this.hasData.emit(!1);}}});}renderCharts(t){this.renderComplexityChart(t.complexityCounts),this.renderEffortByBpChart(t.effortByBp),this.renderCapabilityChart(t.impactsByCapability);}renderComplexityChart(t){this.complexityChart?.destroy();let e=this.complexityCanvas?.nativeElement;if(!e)return;let i=["XS","S","M","L","XL"];this.complexityChart=new Gd(e,{type:"bar",data:{labels:i,datasets:[{label:"Impacts",data:i.map(o=>t[o]??0),backgroundColor:Xf,borderColor:Xf.map(o=>o.replace("0.85","1")),borderWidth:2}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{beginAtZero:!0,title:{display:!0,text:"Impacts"},ticks:{stepSize:1}},x:{title:{display:!0,text:"Complexity"}}}}});}renderEffortByBpChart(t){this.effortByBpChart?.destroy();let e=this.effortByBpCanvas?.nativeElement;if(!e)return;let i=Object.entries(t).sort((o,a)=>a[1]-o[1]).slice(0,10);this.effortByBpChart=new Gd(e,{type:"bar",data:{labels:i.map(([o])=>o),datasets:[{label:"Effort (days)",data:i.map(([,o])=>o),backgroundColor:Xf.slice(0,i.length),borderColor:Xf.slice(0,i.length).map(o=>o.replace("0.85","1")),borderWidth:2}]},options:{indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{dis
595play:!1}},scales:{x:{beginAtZero:!0,title:{display:!0,text:"Effort Days"}}}}});}renderCapabilityChart(t){this.capabilityChart?.destroy();let e=this.capabilityCanvas?.nativeElement;if(!e)return;let i=Object.values(t).sort((o,a)=>a.effort-o.effort).slice(0,10);this.capabilityChart=new Gd(e,{type:"bar",data:{labels:i.map(o=>o.name),datasets:[{label:"Effort Days",data:i.map(o=>o.effort),backgroundColor:Xf.slice(0,i.length),borderColor:Xf.slice(0,i.length).map(o=>o.replace("0.85","1")),borderWidth:2}]},options:{indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{x:{beginAtZero:!0,title:{display:!0,text:"Effort Days"}}}}});}static ɵfac=function(e){return new(e||n)(le(On));};static ɵcmp=Te({type:n,selectors:[["app-project-evaluation-positioning"]],viewQuery:function(e,i){if(e&1&&go(_Q,5)(gQ,5)(xQ,5),e&2){let o;qn(o=Jn())&&(i.complexityCanvas=o.first),qn(o=Jn())&&(i.effortByBpCanvas=o.first),qn(o=Jn())&&(i.capabilityCanvas=o.first);}},inputs:{projectId:"projectId",businessProcesses:"businessProcesses"},outputs:{hasData:"hasData"},features:[ki],decls:4,vars:3,consts:[["complexityChart",""],["effortByBpChart",""],["capabilityChart",""],[1,"dashboard-container"],[1,"tile-loading"],[1,"tile-no-data"],[1,"tile"],[1,"tile-title"],[1,"tile-content"]],template:function(e,i){e&1&&(zo(0,"div",3),S(1,CQ,2,0,"div",4),S(2,vQ,2,0,"div",5),S(3,bQ,18,0),Fo()),e&2&&(m(),M(i.isLoading?1:-1),m(),M(!i.isLoading&&i.noData?2:-1),m(),M(!i.isLoading&&!i.noData?3:-1));},dependencies:[ut],styles:[".dashboard-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:12px;align-content:start}.tile-loading[_ngcontent-%COMP%], .tile-no-data[_ngcontent-%COMP%]{font-size:13px;color:var(--mat-sys-on-surface-variant, #666);padding:12px 0;font-style:italic}.tile[_ngcontent-%COMP%]{background:var(--mat-sys-surface-container-low, #fafafa);border-radius:8px;padding:16px}.tile.tile-full[_ngcontent-%COMP%]{grid-column:1/-1}.tile-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--mat-sys-on-surface-variant, #555);margin-bottom:8px;text-transform:uppercase;letter-spacing:.04em}.tile-content[_ngcontent-%COMP%]{height:240px;position:relative}.tile-content-roi[_ngcontent-%COMP%]{height:auto}"]});};function yQ(n,t){if(n&1&&ee(0,"input",2),n&2){let e=x(2);N("formControlName",e.formControlRef)("value",e.objectName);}}function PQ(n,t){if(n&1&&ee(0,"input",3),n&2){let e=x(2);N("formControlName",e.formControlRef);}}function wQ(n,t){if(n&1){let e=oe();s(0,"button",6),E("click",function(){k(e);let o=x(2);return R(o.clickViewDetail());}),s(1,"mat-icon"),u(2,"open_in_new"),c()();}}function SQ(n,t){if(n&1){let e=oe();s(0,"button",6),E("click",function(){k(e);let o=x(2);return R(o.clickRemove());}),s(1,"mat-icon"),u(2,"cancel"),c()();}}function MQ(n,t){if(n&1){let e=oe();s(0,"div",0)(1,"mat-form-field",1)(2,"mat-label"),u(3),c(),S(4,yQ,1,2,"input",2),S(5,PQ,1,1,"input",3),S(6,wQ,3,0,"button",4),S(7,SQ,3,0,"button",4),s(8,"button",5),E("click",function(){k(e);let o=x();return R(o.clickOpenDialog());}),s(9,"mat-icon"),u(10,"search"),c()(),s(11,"mat-error"),u(12,"Selecting one object is required"),c(),s(13,"mat-hint"),u(14),c()()();}if(n&2){let e=x();N("formGroup",e.form),m(3),G(e.label),m(),M(e.objectId?4:-1),m(),M(e.objectId?-1:5),m(),M(e.objectId?6:-1),m(),M(e.objectId?7:-1),m(7),G(e.hint);}}var yv=class n{constructor(t,e,i,o){this.router=t;this.dialog=e;this.fb=i;this.changeDetectorRef=o;}router;dialog;fb;changeDetectorRef;dialogData;label;hint;formControlRef;objectName;objectId;formGroup;onSelectOne=new At();onViewDetail=new At();dialogRef;form=new Ri({});ngOnInit(){this.formGroup&&(this.form=this.formGroup);}clickOpenDialog(){this.dialogRef=this.dialog.open(ho,{data:{dialogData:this.dialogData}}),this.dialogRef.afterClosed().subscribe(t=>{this.onSelectOne.emit(t),t&&t[0]?(this.objectId=t[0].id,this.objectName=t[0].name):(this.objectId=void 0,this.objectName=void 0);});}ngOnDestroy(){this.dialogRef&&this.dialogRef.close();}clickViewDetail(){this.onViewDetail.emit(this.objectId),this.dialogData&&this.router.navigateByUrl(this.dialogData.documentRoute+"/"+this.objectId);}clickRemove(){let t=[];this.onSelectOne.emit(t),this.objectId=void 0,this.objectName=void 0;}static ɵfac=function(e){return new(e||n)(le(Et),le(Ti),le(wo),le(Pa));};static ɵcmp=Te({type:n,selectors:[["app-select-one-object"]],inputs:{dialogData:"dialogData",label:"label",hint:"hint",formControlRef:"formControlRef",objectName:"objectName",objectId:"objectId",formGroup:"formGroup"},outputs:{onSelectOne:"onSelectOne",onViewDetail:"onViewDetail"},decls:1,vars:1,consts:[[3,"formGroup"],["appearance","fill"],["matInput","","readonly","true","placeholder","Select",3,"formControlName","value"],["matInput","","readonly","true","placeholder","Select",3,"formControlName"],["matPrefix","","mat-icon-button","",1,"button-view"],["matSuffix","","mat-icon-button","",1,"button-select",3,"click"],["matPrefix","","mat-icon-button","",1,"button-view",3,"click"]],template:function(e,i){e&1&&S(0,MQ,15,7,"div",0),e&2&&M(i.form?0:-1);},dependencies:[tn,Ft,Tt,Mn,An,Wn,Gt,Vt,Wt,Ki,ti,Pl,ur,jt,Xt,$e,Qt,We,Xe],styles:[".mat-form-field.mat-form-field[_ngcontent-%COMP%]{width:100%}.button-select[_ngcontent-%COMP%]{margin-left:20px;color:#1976d2}.button-select[_ngcontent-%COMP%]:hover{color:#ff4081}.button-view[_ngcontent-%COMP%]{margin-right:20px;color:#1976d2}.button-view[_ngcontent-%COMP%]:hover{color:#ff4081}.mat-icon[_ngcontent-%COMP%]{height:40px!important;width:40px!important;font-size:40px!important}"]});};
595var Yf=class{SPLIT_H_KEY;SPLIT_V_KEY;SPLIT_VL_KEY;PANEL_VIS_KEY;_horizontalDefaults;_verticalRightDefaults;_verticalLeftDefaults;_panelVisibilityDefaults;splitSizes;splitSizesRight;splitSizesLeft;panelVisibility;constructor(t){this.SPLIT_H_KEY=t.prefix+"-split-horizontal",this.SPLIT_V_KEY=t.prefix+"-split-vertical",this.SPLIT_VL_KEY=t.prefix+"-split-vertical-left",this.PANEL_VIS_KEY=t.prefix+"-panel-visibility",this._horizontalDefaults=X({},t.horizontalDefaults),this._verticalRightDefaults=X({},t.verticalRightDefaults),this._verticalLeftDefaults=X({},t.verticalLeftDefaults),this._panelVisibilityDefaults=X({},t.panelVisibilityDefaults),this.splitSizes=X({},t.horizontalDefaults),this.splitSizesRight=X({},t.verticalRightDefaults),this.splitSizesLeft=X({},t.verticalLeftDefaults),this.panelVisibility=X({},t.panelVisibilityDefaults),this.restoreAll();}onHorizontalDragEnd(t){let e=t.sizes;e&&e.length===2&&(this.splitSizes={left:e[0],right:e[1]},localStorage.setItem(this.SPLIT_H_KEY,JSON.stringify(this.splitSizes)));}onVerticalLeftDragEnd(t,e){let i=t.sizes;i&&i.length===e.length&&(e.forEach((o,a)=>{this.splitSizesLeft[o]=i[a];}),localStorage.setItem(this.SPLIT_VL_KEY,JSON.stringify(this.splitSizesLeft)));}onVerticalRightDragEnd(t,e){let i=t.sizes,o=e.filter(a=>this.panelVisibility[a]);i&&i.length===o.length&&(o.forEach((a,r)=>{this.splitSizesRight[a]=i[r];}),localStorage.setItem(this.SPLIT_V_KEY,JSON.stringify(this.splitSizesRight)));}togglePanel(t){return this.panelVisibility[t]=!this.panelVisibility[t],this.savePanelVisibility(),this.panelVisibility[t];}setMode(t){Object.assign(this.panelVisibility,t),this.savePanelVisibility();}anyVisible(...t){return t.some(e=>this.panelVisibility[e]);}restoreAll(){this.restoreSplitSizes(),this.restorePanelVisibility();}restoreSplitSizes(){try{let t=localStorage.getItem(this.SPLIT_H_KEY);if(t){let o=JSON.parse(t);typeof o.left=="number"&&typeof o.right=="number"&&(this.splitSizes=o);}let e=localStorage.getItem(this.SPLIT_V_KEY);if(e){let o=JSON.parse(e);this.hasAllKeys(o,this._verticalRightDefaults)&&Object.assign(this.splitSizesRight,o);}let i=localStorage.getItem(this.SPLIT_VL_KEY);if(i){let o=JSON.parse(i);this.hasAllKeys(o,this._verticalLeftDefaults)&&Object.assign(this.splitSizesLeft,o);}}catch(t){}}restorePanelVisibility(){try{let t=localStorage.getItem(this.PANEL_VIS_KEY);if(t){let e=JSON.parse(t);Object.keys(this._panelVisibilityDefaults).every(o=>typeof e[o]=="boolean")&&Object.assign(this.panelVisibility,e);for(let o of Object.keys(this._panelVisibilityDefaults))typeof this.panelVisibility[o]!="boolean"&&(this.panelVisibility[o]=this._panelVisibilityDefaults[o]);}}catch(t){}}savePanelVisibility(){localStorage.setItem(this.PANEL_VIS_KEY,JSON.stringify(this.panelVisibility));}hasAllKeys(t,e){return Object.keys(e).every(i=>i in t);}};function OQ(n,t){if(n&1&&(s(0,"mat-option",6),u(1),c()),n&2){let e=t.$implicit;N("value",e),m(),G(e.name);}}var Pv=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;autocompleteControl=new st("");filteredOptions;ngOnInit(){this.filteredOptions=this.autocompleteControl.valueChanges.pipe(qr(""),Xo(t=>{let e=typeof t=="string"?t:t?.name;return e?this._filter(e):this.data.solutionRequirements.slice();}));}_filter(t){let e=t.toLowerCase();return this.data.solutionRequirements.filter(i=>i.name.toLowerCase().includes(e));}displayFn(t){return t?.name||"";}clickClear(){this.autocompleteControl.setValue("");}clickCancel(){this.dialogRef.close(void 0);}clickAdd(){this.dialogRef.close(this.autocompleteControl.value);}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-add-requirement-dialog"]],decls:20,vars:6,consts:[["autoReq","matAutocomplete"],["mat-dialog-title",""],["appearance","fill",1,"field-autocomplete"],["matInput","","cdkFocusInitial","",3,"formControl","matAutocomplete"],["matSuffix","","mat-icon-button","","matTooltip","Clear",3,"click"],[3,"displayWith"],[3,"value"],["align","end"],["mat-button","",3,"click"],["mat-flat-button","","color","primary",3,"click","disabled"]],template:function(e,i){if(e&1&&(s(0,"h2",1),u(1,"Add Requirement"),c(),s(2,"mat-dialog-content")(3,"mat-form-field",2)(4,"mat-label"),u(5,"Type or select requirement"),c(),ee(6,"input",3),s(7,"button",4),E("click",function(){return i.clickClear();}),s(8,"mat-icon"),u(9,"backspace"),c()()(),s(10,"mat-autocomplete",5,0),be(12,OQ,2,2,"mat-option",6,Pt),Zn(14,"async"),c()(),s(15,"mat-dialog-actions",7)(16,"button",8),E("click",function(){return i.clickCancel();}),u(17,"Cancel"),c(),s(18,"button",9),E("click",function(){return i.clickAdd();}),u(19," Add "),c()()),e&2){let o=bn(11);m(6),N("formControl",i.autocompleteControl)("matAutocomplete",o),m(4),N("displayWith",i.displayFn),m(2),ye(yo(14,4,i.filteredOptions)),m(6),N("disabled",!i.autocompleteControl.value);}},dependencies:[ut,tn,Ft,Tt,md,Zi,Bo,Vo,$o,Gt,Vt,Wt,ur,jt,Xt,$d,Bd,Ei,Op,$e,Qe,Qt,We,Xe,rd],styles:[".field-autocomplete[_ngcontent-%COMP%]{width:100%;min-width:350px}"]});};var aM=(n,t)=>({task:n,sp:t}),T0=(n,t)=>t.id;function EQ(n,t){n&1&&(s(0,"div",2),u(1,"Loading gap analysis data..."),c());}function TQ(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function IQ(n,t){n&1&&(s(0,"mat-icon",8),u(1,"autorenew"),c());}function kQ(n,t){if(n&1&&(s(0,"div",11),u(1," Weight: "),s(2,"span",14),u(3),c()()),n&2){let e=x(2);m(3),G(e.getSolutionRequirementWeight(e.activeTask.solutionRequirements));}}function RQ(n,t){n&1&&ee(0,"div",18);}function NQ(n,t){if(n&1){let e=oe();s(0,"div",15),Zt(1,RQ,1,0,"div",16),s(2,"app-solution-requirement",17),E("onSelectForCopy",function(o){k(e);let a=x(3);return R(a.onSelectForCopy(o));})("onSelectSolutionRequirement",function(o){k(e);let a=x(3);
595return R(a.onSelectSolutionRequirement(o));})("onSelectProcessTask",function(o){k(e);let a=x(3);return R(a.onSelectProcessTask(o));}),c()();}if(n&2){let e=t.$implicit,i=t.$index,o=x(3);m(2),N("projectId",o.projectId)("businessProcessId",o.businessProcessId)("subProcessId",o.selectedTaskSubProcess.id)("collectionPath","/projects/"+o.projectId+"/solutionrequirements/")("deployableComponentMap",o.deployableComponentMap)("processTask",o.activeTask)("processTaskMap",o.processTaskMap)("processTaskReferenceMap",o.processTaskReferenceMap)("object",o.getSolutionRequirement(e))("order",i+1)("startInEditMode",o.editModeRequirementId===e);}}function AQ(n,t){if(n&1&&be(0,NQ,3,11,"div",15,Pt),n&2){let e=x(2);ye(e.activeTask.solutionRequirements);}}function DQ(n,t){n&1&&(s(0,"div",13)(1,"mat-icon",19),u(2,"drag_indicator"),c(),s(3,"span"),u(4,"Drop requirements here"),c()());}function jQ(n,t){if(n&1){let e=oe();s(0,"div",3)(1,"div",4)(2,"mat-icon",5),u(3,"assignment"),c(),s(4,"span"),u(5),c(),s(6,"div",6)(7,"button",7),E("click",function(){k(e);let o=x();return R(o.clickGenerate(o.selectedTaskSubProcess,o.activeTask));}),S(8,TQ,2,0,"mat-icon"),S(9,IQ,2,0,"mat-icon",8),c(),s(10,"button",9),E("click",function(){k(e);let o=x();return R(o.clickOpenAddRequirementDialog(o.selectedTaskSubProcess,o.activeTask));}),s(11,"mat-icon"),u(12,"add"),c()(),s(13,"button",10),E("click",function(){k(e);let o=x();return R(o.clickPasteRequirement(o.selectedTaskSubProcess,o.activeTask));}),s(14,"mat-icon"),u(15,"content_paste"),c()()()(),S(16,kQ,4,1,"div",11),s(17,"div",12),E("cdkDropListDropped",function(o){k(e);let a=x();return R(a.onRequirementDrop(o));}),S(18,AQ,2,0)(19,DQ,5,0,"div",13),c()();}if(n&2){let e=x();m(5),nd("",e.businessProcess==null?null:e.businessProcess.number,".",e.selectedTaskSubProcess.number,".",e.activeTask.number," ",e.activeTask.name),m(2),N("disabled",e.generateSpinner),m(),M(e.generateSpinner?-1:8),m(),M(e.generateSpinner?9:-1),m(4),N("disabled",!e.copySolutionRequirementId),m(3),M(e.activeTask.solutionRequirements&&e.evaluationScale?16:-1),m(),Ue("drop-list-empty",!e.activeTask.solutionRequirements||e.activeTask.solutionRequirements.length===0),N("cdkDropListData",n1(13,aM,e.activeTask,e.selectedTaskSubProcess)),m(),M(e.activeTask.solutionRequirements&&e.activeTask.solutionRequirements.length>0?18:19);}}function LQ(n,t){if(n&1){let e=oe();s(0,"div",20)(1,"mat-icon"),u(2,"filter_list"),c(),s(3,"span"),u(4,"Showing highlighted requirement"),c(),s(5,"button",21),E("click",function(){k(e);let o=x(2);return R(o.clickClearFilters());}),s(6,"mat-icon"),u(7,"close"),c()()();}}function zQ(n,t){n&1&&(s(0,"div",2),u(1,"No business processes found."),c());}function FQ(n,t){n&1&&(s(0,"div",2),u(1,"No sub-processes for this business process."),c());}function BQ(n,t){n&1&&(s(0,"div",2),u(1,"No tasks for this sub-process."),c());}function $Q(n,t){if(n&1&&(s(0,"span",14),u(1),c()),n&2){let e=x().$implicit,i=x(5);m(),G(i.getSolutionRequirementWeight(e.solutionRequirements));}}function VQ(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function GQ(n,t){n&1&&(s(0,"mat-icon",8),u(1,"autorenew"),c());}function qQ(n,t){n&1&&ee(0,"div",18);}function JQ(n,t){if(n&1){let e=oe();s(0,"div",15),Zt(1,qQ,1,0,"div",16),s(2,"app-solution-requirement",17),E("onSelectForCopy",function(o){k(e);let a=x(7);return R(a.onSelectForCopy(o));})("onSelectSolutionRequirement",function(o){k(e);let a=x(7);return R(a.onSelectSolutionRequirement(o));})("onSelectProcessTask",function(o){k(e);let a=x(7);return R(a.onSelectProcessTask(o));}),c()();}if(n&2){let e=t.$implicit,i=t.$index,o=x(2).$implicit,a=x().$implicit,r=x().$implicit,l=x(3);m(2),N("projectId",l.projectId)("businessProcessId",r.id)("subProcessId",a.id)("collectionPath","/projects/"+l.projectId+"/solutionrequirements/")("deployableComponentMap",l.deployableComponentMap)("processTask",o)("processTaskMap",l.processTaskMap)("processTaskReferenceMap",l.processTaskReferenceMap)("object",l.getSolutionRequirement(e))("order",i+1)("startInEditMode",l.editModeRequirementId===e);}}function HQ(n,t){if(n&1&&be(0,JQ,3,11,"div",15,Pt),n&2){let e=x().$implicit;ye(e.solutionRequirements);}}function UQ(n,t){n&1&&(s(0,"div",42)(1,"mat-icon",19),u(2,"drag_indicator"),c(),s(3,"span"),u(4,"Drop requirements here"),c()());}function WQ(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",39),E("opened",function(){let o=k(e).$implicit,a=x(5);return R(a.onTaskPanelOpened(o.id));})("closed",function(){let o=k(e).$implicit,a=x(5);return R(a.onTaskPanelClosed(o.id));}),s(1,"mat-expansion-panel-header")(2,"mat-panel-title",40)(3,"mat-icon"),u(4,"assignment"),c(),s(5,"span",27),u(6),c()(),s(7,"mat-panel-description",41),S(8,$Q,2,1,"span",14),s(9,"div",29),E("click",function(o){return o.stopPropagation();}),s(10,"button",7),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x(4);return R(r.clickGenerate(a,o));}),S(11,VQ,2,0,"mat-icon"),S(12,GQ,2,0,"mat-icon",8),c(),s(13,"button",9),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x(4);return R(r.clickOpenAddRequirementDialog(a,o));}),s(14,"mat-icon"),u(15,"add"),c()(),s(16,"button",10),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x(4);
595return R(r.clickPasteRequirement(a,o));}),s(17,"mat-icon"),u(18,"content_paste"),c()()()()(),s(19,"div",12),E("cdkDropListDropped",function(o){k(e);let a=x(5);return R(a.onRequirementDrop(o));}),S(20,HQ,2,0)(21,UQ,5,0,"div",42),c()();}if(n&2){let e=t.$implicit,i=x().$implicit,o=x().$implicit,a=x(3);N("expanded",a.shouldExpandTask(e)),m(6),nd("",o.number,".",i.number,".",e.number," ",e.name),m(2),M(e.solutionRequirements&&a.evaluationScale?8:-1),m(2),N("disabled",a.generateSpinner),m(),M(a.generateSpinner?-1:11),m(),M(a.generateSpinner?12:-1),m(4),N("disabled",!a.copySolutionRequirementId),m(3),Ue("drop-list-empty",!e.solutionRequirements||e.solutionRequirements.length===0),N("cdkDropListData",n1(14,aM,e,i)),m(),M(e.solutionRequirements&&e.solutionRequirements.length>0?20:21);}}function XQ(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",33),E("opened",function(){let o=k(e).$implicit,a=x(4);return R(a.onSpPanelOpened(o.id));})("closed",function(){let o=k(e).$implicit,a=x(4);return R(a.onSpPanelClosed(o.id));}),s(1,"mat-expansion-panel-header")(2,"mat-panel-title",34)(3,"mat-icon"),u(4,"account_tree"),c(),s(5,"span",27),u(6),c()(),s(7,"mat-panel-description",35)(8,"div",29),E("click",function(o){return o.stopPropagation();}),s(9,"button",36),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.expandAllTasksInSp(o.id));}),s(10,"mat-icon"),u(11,"unfold_more"),c()(),s(12,"button",37),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.collapseAllTasksInSp(o.id));}),s(13,"mat-icon"),u(14,"unfold_less"),c()()()()(),S(15,BQ,2,0,"div",2),be(16,WQ,22,17,"mat-expansion-panel",38,T0),c();}if(n&2){let e=t.$implicit,i=x().$implicit,o=x(3);N("expanded",o.shouldExpandSubProcess(e.id)),m(6),_p("",i.number,".",e.number," ",e.name),m(9),M(o.getTasksForSubProcess(e.id).length===0?15:-1),m(),ye(o.getTasksForSubProcess(e.id));}}function YQ(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",25),E("opened",function(){let o=k(e).$implicit,a=x(3);return R(a.onBpPanelOpened(o.id));})("closed",function(){let o=k(e).$implicit,a=x(3);return R(a.onBpPanelClosed(o.id));}),s(1,"mat-expansion-panel-header")(2,"mat-panel-title",26)(3,"mat-icon"),u(4,"schema"),c(),s(5,"span",27),u(6),c()(),s(7,"mat-panel-description",28)(8,"div",29),E("click",function(o){return o.stopPropagation();}),s(9,"button",30),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.expandAllInBp(o.id));}),s(10,"mat-icon"),u(11,"unfold_more"),c()(),s(12,"button",31),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.collapseAllInBp(o.id));}),s(13,"mat-icon"),u(14,"unfold_less"),c()()()()(),S(15,FQ,2,0,"div",2),s(16,"mat-accordion",23),be(17,XQ,18,5,"mat-expansion-panel",32,T0),c()();}if(n&2){let e=t.$implicit,i=x(3);N("expanded",i.shouldExpandBp(e.id)),m(6),Hn("",e.number,". ",e.name),m(9),M(i.getSubProcessesForBp(e.id).length===0?15:-1),m(2),ye(i.getSubProcessesForBp(e.id));}}function KQ(n,t){if(n&1&&(S(0,zQ,2,0,"div",2),s(1,"div",22)(2,"mat-accordion",23),be(3,YQ,19,4,"mat-expansion-panel",24,T0),c()()),n&2){let e=x(2);M(e.allBusinessProcesses.length===0?0:-1),m(3),ye(e.allBusinessProcesses);}}function ZQ(n,t){n&1&&(s(0,"div",2),u(1,"No sub-processes found."),c());}function QQ(n,t){n&1&&(s(0,"div",2),u(1,"No tasks for this sub-process."),c());}function eee(n,t){if(n&1&&(s(0,"span",14),u(1),c()),n&2){let e=x().$implicit,i=x(4);m(),G(i.getSolutionRequirementWeight(e.solutionRequirements));}}function tee(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function nee(n,t){n&1&&(s(0,"mat-icon",8),u(1,"autorenew"),c());}function iee(n,t){n&1&&ee(0,"div",18);}function oee(n,t){if(n&1){let e=oe();s(0,"div",15),Zt(1,iee,1,0,"div",16),s(2,"app-solution-requirement",17),E("onSelectForCopy",function(o){k(e);let a=x(6);return R(a.onSelectForCopy(o));})("onSelectSolutionRequirement",function(o){k(e);let a=x(6);return R(a.onSelectSolutionRequirement(o));})("onSelectProcessTask",function(o){k(e);let a=x(6);return R(a.onSelectProcessTask(o));}),c()();}if(n&2){let e=t.$implicit,i=t.$index,o=x(2).$implicit,a=x().$implicit,r=x(3);m(2),N("projectId",r.projectId)("businessProcessId",r.businessProcessId)("subProcessId",a.id)("collectionPath","/projects/"+r.projectId+"/solutionrequirements/")("deployableComponentMap",r.deployableComponentMap)("processTask",o)("processTaskMap",r.processTaskMap)("processTaskReferenceMap",r.processTaskReferenceMap)("object",r.getSolutionRequirement
595(e))("order",i+1)("startInEditMode",r.editModeRequirementId===e);}}function aee(n,t){if(n&1&&be(0,oee,3,11,"div",15,Pt),n&2){let e=x().$implicit;ye(e.solutionRequirements);}}function ree(n,t){n&1&&(s(0,"div",42)(1,"mat-icon",19),u(2,"drag_indicator"),c(),s(3,"span"),u(4,"Drop requirements here"),c()());}function see(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",39),E("opened",function(){let o=k(e).$implicit,a=x(4);return R(a.onTaskPanelOpened(o.id));})("closed",function(){let o=k(e).$implicit,a=x(4);return R(a.onTaskPanelClosed(o.id));}),s(1,"mat-expansion-panel-header")(2,"mat-panel-title",40)(3,"mat-icon"),u(4,"assignment"),c(),s(5,"span",27),u(6),c()(),s(7,"mat-panel-description",41),S(8,eee,2,1,"span",14),s(9,"div",29),E("click",function(o){return o.stopPropagation();}),s(10,"button",7),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x(3);return R(r.clickGenerate(a,o));}),S(11,tee,2,0,"mat-icon"),S(12,nee,2,0,"mat-icon",8),c(),s(13,"button",9),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x(3);return R(r.clickOpenAddRequirementDialog(a,o));}),s(14,"mat-icon"),u(15,"add"),c()(),s(16,"button",10),E("click",function(){let o=k(e).$implicit,a=x().$implicit,r=x(3);return R(r.clickPasteRequirement(a,o));}),s(17,"mat-icon"),u(18,"content_paste"),c()()()()(),s(19,"div",12),E("cdkDropListDropped",function(o){k(e);let a=x(4);return R(a.onRequirementDrop(o));}),S(20,aee,2,0)(21,ree,5,0,"div",42),c()();}if(n&2){let e=t.$implicit,i=x().$implicit,o=x(3);N("expanded",o.shouldExpandTask(e)),m(6),nd("",o.businessProcess==null?null:o.businessProcess.number,".",i.number,".",e.number," ",e.name),m(2),M(e.solutionRequirements&&o.evaluationScale?8:-1),m(2),N("disabled",o.generateSpinner),m(),M(o.generateSpinner?-1:11),m(),M(o.generateSpinner?12:-1),m(4),N("disabled",!o.copySolutionRequirementId),m(3),Ue("drop-list-empty",!e.solutionRequirements||e.solutionRequirements.length===0),N("cdkDropListData",n1(14,aM,e,i)),m(),M(e.solutionRequirements&&e.solutionRequirements.length>0?20:21);}}function lee(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",33),E("opened",function(){let o=k(e).$implicit,a=x(3);return R(a.onSpPanelOpened(o.id));})("closed",function(){let o=k(e).$implicit,a=x(3);return R(a.onSpPanelClosed(o.id));}),s(1,"mat-expansion-panel-header")(2,"mat-panel-title",34)(3,"mat-icon"),u(4,"account_tree"),c(),s(5,"span",27),u(6),c()(),s(7,"mat-panel-description",35)(8,"div",29),E("click",function(o){return o.stopPropagation();}),s(9,"button",36),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.expandAllTasksInSp(o.id));}),s(10,"mat-icon"),u(11,"unfold_more"),c()(),s(12,"button",37),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.collapseAllTasksInSp(o.id));}),s(13,"mat-icon"),u(14,"unfold_less"),c()()()()(),S(15,QQ,2,0,"div",2),be(16,see,22,17,"mat-expansion-panel",38,T0),c();}if(n&2){let e=t.$implicit,i=x(3);N("expanded",i.shouldExpandSubProcess(e.id)),m(6),_p("",i.businessProcess==null?null:i.businessProcess.number,".",e.number," ",e.name),m(9),M(i.getTasksForSubProcess(e.id).length===0?15:-1),m(),ye(i.getTasksForSubProcess(e.id));}}function cee(n,t){if(n&1&&(S(0,ZQ,2,0,"div",2),s(1,"div",22)(2,"mat-accordion",23),be(3,lee,18,5,"mat-expansion-panel",32,T0),c()()),n&2){let e=x(2);M(e.displaySubProcesses.length===0?0:-1),m(3),ye(e.displaySubProcesses);}}function pee(n,t){if(n&1&&(S(0,LQ,8,0,"div",20),S(1,KQ,5,1),S(2,cee,5,1)),n&2){let e=x();M(e.filterSolutionRequirementId?0:-1),m(),M(e.isProjectScope?1:-1),m(),M(e.isProjectScope?-1:2);}}var Kf=class n{constructor(t,e,i,o,a,r,l,p){this.firebase=t;this.messagingService=e;this.loggingService=i;this.localeService=o;this.systemComponentService=a;this.dialog=r;this.requirementHighlightService=l;this.srUtils=p;}firebase;messagingService;loggingService;localeService;systemComponentService;dialog;requirementHighlightService;srUtils;projectId;businessProcessId;businessProcess;drillDownSubProcess=null;selectedSubProcess=null;selectedProcessTask=null;get isProjectScope(){return!this.businessProcessId;}allBusinessProcesses=[];subProcessesByBpId=new Map();getSubProcessesForBp(t){return this.subProcessesByBpId.get(t)||[];}allSubProcesses=[];tasksBySubProcessId=new Map();processTaskMap=new Map();processTaskReferenceMap=new Map();solutionRequirementMap=new Map();deployableComponentMap;evaluationScale;project;isLoading=!1;dataLoadedForBpId;dataLoadedForProjectScope=!1;expandedTaskIds=new Set();collapsedTaskIds=new Set();expandedSpIds=new Set();collapsedSpIds=new Set();expandedBpIds=new Set();collapsedBpIds=new Set();subProcessToBpId=new Map();subProcessToBp=new Map();copySolutionRequirementId;generateSpinner=!1;editModeRequirementId;filterSolutionRequirementId;filterProcessTaskId;pinnedTaskId;subscriptions=new jo();ngOnInit(){this.subscriptions.add(this.requirementHighlightService.highlighted$.subscribe(t=>
595{this.filterSolutionRequirementId=t.srId||void 0,this.filterProcessTaskId=t.taskId||void 0,this.pinnedTaskId=t.pinnedTaskId||void 0;})),this.loadData();}ngOnChanges(t){(t.projectId||t.businessProcessId)&&(this.isProjectScope?this.dataLoadedForProjectScope||this.loadData():this.businessProcessId!==this.dataLoadedForBpId&&this.loadData());}ngOnDestroy(){this.subscriptions.unsubscribe();}loadData(){return $(this,null,function*(){if(this.projectId)return this.isProjectScope?this.loadProjectData():this.loadSingleBpData();});}getBpIdForSp(t){return this.businessProcessId||this.subProcessToBpId.get(t)||"";}getBpForSp(t){return this.businessProcess||this.subProcessToBp.get(t);}loadProjectData(){return $(this,null,function*(){if(this.projectId&&!this.dataLoadedForProjectScope){this.dataLoadedForProjectScope=!0,this.dataLoadedForBpId=void 0,this.isLoading=!0,this.subscriptions.unsubscribe(),this.subscriptions=new jo(),this.clearAllData();try{yield this.loadSharedResources();let t=mt(we(this.firebase.firestore,"/projects/"+this.projectId+"/businessprocesses/"),Jt("number","asc")),e=yield at(t);for(let i of e.docs){let o=X({id:i.id},i.data());this.allBusinessProcesses.push(o),this.subProcessesByBpId.set(o.id,[]);let a="/projects/"+this.projectId+"/businessprocesses/"+o.id,r=mt(we(this.firebase.firestore,a+"/subprocesses/"),Jt("number","asc")),l=yield at(r);for(let p of l.docs){let d=X({id:p.id},p.data());this.allSubProcesses.push(d);let f=this.subProcessesByBpId.get(o.id)||[];f.push(d),this.subProcessesByBpId.set(o.id,f),this.tasksBySubProcessId.set(d.id,[]),this.subProcessToBpId.set(d.id,o.id),this.subProcessToBp.set(d.id,o),this.subscribeToTasks(o,d,a);}}}catch(t){this.dataLoadedForProjectScope=!1,this.loggingService.error(t),this.messagingService.open("Error loading gap analysis data","",{duration:3e3});}finally{this.isLoading=!1;}}});}loadSingleBpData(){return $(this,null,function*(){if(!(!this.projectId||!this.businessProcessId)&&this.dataLoadedForBpId!==this.businessProcessId){this.dataLoadedForBpId=this.businessProcessId,this.dataLoadedForProjectScope=!1,this.isLoading=!0,this.subscriptions.unsubscribe(),this.subscriptions=new jo(),this.clearAllData();try{yield this.loadSharedResources();let t="/projects/"+this.projectId+"/businessprocesses/"+this.businessProcessId,e=mt(we(this.firebase.firestore,t+"/subprocesses/"),Jt("number","asc")),i=yield at(e);for(let o of i.docs){let a=X({id:o.id},o.data());this.allSubProcesses.push(a),this.tasksBySubProcessId.set(a.id,[]),this.subscribeToTasks(this.businessProcess,a,t);}}catch(t){this.dataLoadedForBpId=void 0,this.loggingService.error(t),this.messagingService.open("Error loading gap analysis data","",{duration:3e3});}finally{this.isLoading=!1;}}});}clearAllData(){this.allBusinessProcesses=[],this.subProcessesByBpId.clear(),this.subProcessToBpId.clear(),this.subProcessToBp.clear(),this.allSubProcesses=[],this.tasksBySubProcessId.clear(),this.processTaskMap.clear(),this.processTaskReferenceMap.clear(),this.solutionRequirementMap.clear(),this.expandedTaskIds.clear(),this.collapsedTaskIds.clear(),this.expandedSpIds.clear(),this.collapsedSpIds.clear(),this.expandedBpIds.clear(),this.collapsedBpIds.clear();}loadSharedResources(){return $(this,null,function*(){let t=ge(this.firebase.firestore,"/projects",this.projectId),e=yield yt(t);e.exists()&&(this.project=X({id:e.id},e.data()));let i=ge(this.firebase.firestore,"/evaluationscales","J45CyRy49XqOGaTEVFkE"),o=yield yt(i);o.exists()&&(this.evaluationScale=X({id:o.id},o.data())),this.deployableComponentMap=new Map();let a=mt(we(this.firebase.firestore,"systemComponents"),Jt("name")),r=yield at(a);for(let p of r.docs){let d=X({id:p.id},p.data());this.deployableComponentMap.set(d.id,d);}let l=mt(we(this.firebase.firestore,"/projects/"+this.projectId+"/solutionrequirements/"));this.subscriptions.add(Bn(l,p=>{for(let d of p.docs){let f=X({id:d.id},d.data()),h=this.solutionRequirementMap.get(f.id);h&&(f.processTaskReferences=h.processTaskReferences),this.solutionRequirementMap.set(f.id,f);}}));});}subscribeToTasks(t,e,i){let o=mt(we(this.firebase.firestore,i+"/subprocesses/"+e.id+"/processtasks/"),Jt("number","asc"));this.subscriptions.add(Bn(o,a=>{let r=[];for(let l of a.docs){let p=X({id:l.id},l.data());if(this.processTaskReferenceMap.set(p.id,(t?.number||"")+"."+e.number+"."+p.number),this.processTaskMap.set(p.id,p),p.solutionRequirements)for(let d of p.solutionRequirements){let f=this.solutionRequirementMap.get(d);f&&(f.processTaskReferences||(f.processTaskReferences=[]),f.processTaskReferences.indexOf(p.id)<0&&f.processTaskReferences.push(p.id));}r.push(p);}this.tasksBySubProcessId.set(e.id,r);}));}getSolutionRequirementsArray(){return Array.from(this.solutionRequirementMap.values());}get isFiltered(){return!!this.drillDownSubProcess||!!this.selectedSubProcess;}get displaySubProcesses(){let t=this.drillDownSubProcess||this.selectedSubProcess;return t?this.allSubProcesses.filter(e=>e.id===t.id):this.allSubProcesses;}getTasksForSubProcess(t){return this.tasksBySubProcessId.get(t)||[];}get activeTask(){return this.selectedProcessTask&&this.processTaskMap.get(this.selectedProcessTask.id)||null;}get selectedTaskSubProcess(){if(!this.selectedProcessTask)return this.drillDownSubProcess;for(let t of this.allSubProcesses)if((this.tasksBySubProcessId.get(t.id)||[]).some(i=>i.id===this.selectedProcessTask?.id))return t;return this.drillDownSubProcess;}get scopeLabel(){return this.activeTask&&this.selectedTaskSubProcess?this.selectedTaskSubProcess.number+"."+this.activeTask.number+" "+this.activeTask.name:this.drillDownSubProcess?this.drillDownSubProcess.number+". "+this.drillDownSubProcess.name:this.businessProcess?.name||"All sub-processes";}
595getSolutionRequirement(t){return this.solutionRequirementMap.get(t);}getSolutionRequirementWeight(t){if(!this.evaluationScale)return 0;let e=0;for(let i of t){let o=this.solutionRequirementMap.get(i);if(!o)continue;let a=1;o.processTaskReferences&&o.processTaskReferences.length>1&&(a=o.processTaskReferences.length);let r=this.evaluationScale;o.complexity==="E"?e+=Math.round(r.E/a):o.complexity==="L"?e+=Math.round(r.L/a):o.complexity==="M"?e+=Math.round(r.M/a):o.complexity==="N"?e+=Math.round(r.N/a):o.complexity==="S"?e+=Math.round(r.S/a):o.complexity==="XL"?e+=Math.round(r.XL/a):o.complexity==="XS"&&(e+=Math.round(r.XS/a));}return e;}clickOpenAddRequirementDialog(t,e){this.dialog.open(Pv,{width:"500px",data:{solutionRequirements:this.getSolutionRequirementsArray()}}).afterClosed().subscribe(o=>$(this,null,function*(){if(!o)return;let a;if(typeof o=="string"?a=(yield Ht(we(this.firebase.firestore,"/projects/"+this.projectId+"/solutionrequirements/"),{name:o,description:""})).id:a=o.id,!a)return;if(e.solutionRequirements||(e.solutionRequirements=[]),e.solutionRequirements.indexOf(a)>=0){this.messagingService.open("Requirement is already used in this task.","",{duration:3e3});return;}this.editModeRequirementId=a,e.solutionRequirements.push(a);let r=this.getBpIdForSp(t.id),l="/projects/"+this.projectId+"/businessprocesses/"+r+"/subprocesses/"+t.id+"/processtasks/"+e.id;yield Dt(ge(this.firebase.firestore,l),e,{merge:!0}),this.messagingService.open("Requirement added.","",{duration:3e3});}));}clickPasteRequirement(t,e){return $(this,null,function*(){if(!this.copySolutionRequirementId)return;if(e.solutionRequirements||(e.solutionRequirements=[]),e.solutionRequirements.indexOf(this.copySolutionRequirementId)>=0){this.messagingService.open("Requirement is already used in this task.","",{duration:3e3});return;}e.solutionRequirements.push(this.copySolutionRequirementId);let i=this.getBpIdForSp(t.id),o="/projects/"+this.projectId+"/businessprocesses/"+i+"/subprocesses/"+t.id+"/processtasks/"+e.id;yield Dt(ge(this.firebase.firestore,o),e,{merge:!0}),this.copySolutionRequirementId=void 0,this.messagingService.open("Requirement pasted.","",{duration:3e3});});}clickGenerate(t,e){return $(this,null,function*(){let i=yield this.generateList(t,e);try{i?this.dialog.open(gs,{height:"50%",width:"700px",data:{rawData:i}}).afterClosed().subscribe(a=>{if(a){for(let r of a)r.selected&&(console.log("REQ : ",r),this.createRequirement(t,e,r.title,r.description,r.complexity,r.priority,r.type,r.deployable_components,r.acceptance_criteria));this.messagingService.open("Requirements added.","",{duration:3e3});}}):this.messagingService.open("No results.","",{duration:3e3});}catch(o){this.messagingService.open("An error has occurred, please try again later.","",{duration:3e3});}});}generateList(t,e){return $(this,null,function*(){let i=this.firebase.functions,o=ei(i,"functionCallFunctionStream"),a,r=this.deployableComponentMap?Array.from(this.deployableComponentMap.values()):[],l={functionName:"generate_requirements",version:"1.0",objectType:"processTask",locale:this.localeService.getSelectedLocaleShort(),object:{project:this.project,businessProcess:this.getBpForSp(t.id)||this.businessProcess,subProcess:t,processTask:e,deployableComponents:r},acceptsStreaming:!0,objectDocPath:`projects/${this.projectId}`};this.generateSpinner=!0;try{let{stream:g,data:b}=yield o.stream(l);try{for(var p=Co(g),d,f,h;d=!(f=yield p.next()).done;d=!1){let w=f.value;w&&(a=w);}}catch(f){h=[f];}finally{try{d&&(f=p.return)&&(yield f.call(p));}finally{if(h)throw h[0];}}}catch(g){console.error("Error streaming requirements generation:",g),this.generateSpinner=!1;return;}finally{this.generateSpinner=!1;}return a;});}createRequirement(t,e,i,o,a,r,l,p,d){return $(this,null,function*(){console.log("[createRequirement GOOD] raw AI data:",{title:i,description:o,complexity:a,priority:r,requirementType:l,deployableComponents:p});let f,h=a?this.srUtils.resolveComplexity(a)??a:void 0,g=r?this.srUtils.resolvePriority(r)??r:void 0,b=l?this.srUtils.resolveRequirementType(l)??l:void 0,w=p?(Array.isArray(p)?p:[p]).map(L=>this.srUtils.resolveDeployableComponent(L,this.deployableComponentMap)).filter(L=>!!L):void 0,T=X(X(X(X({creationDate:Rn.now(),active:!0,name:i??"",description:o??"",acceptanceCriteria:d??""},h&&{complexity:h}),g&&{priority:g}),b&&{requirementType:b}),w?.length&&{deployableComponents:w}),O=yield Ht(we(this.firebase.firestore,"/projects/"+this.projectId+"/solutionrequirements/"),T);if(e.solutionRequirements||(e.solutionRequirements=[]),e.solutionRequirements.indexOf(O.id)>=0)return;e.solutionRequirements.push(O.id);let V=this.getBpIdForSp(t.id),j="/projects/"+this.projectId+"/businessprocesses/"+V+"/subprocesses/"+t.id+"/processtasks/"+e.id;
595yield Dt(ge(this.firebase.firestore,j),e,{merge:!0});});}onRequirementDrop(t){return $(this,null,function*(){let e=t.previousContainer.data,i=t.container.data,o=e.task,a=i.task;if(!o.solutionRequirements)return;let r=this.getBpIdForSp(e.sp.id),l=this.getBpIdForSp(i.sp.id);if(t.previousContainer===t.container){let g=o.solutionRequirements,b=g.splice(t.previousIndex,1)[0];g.splice(t.currentIndex,0,b);let w="/projects/"+this.projectId+"/businessprocesses/"+r+"/subprocesses/"+e.sp.id+"/processtasks/"+o.id;yield Dt(ge(this.firebase.firestore,w),o,{merge:!0});return;}let p=o.solutionRequirements[t.previousIndex];if(!p)return;if(a.solutionRequirements||(a.solutionRequirements=[]),a.solutionRequirements.indexOf(p)>=0){this.messagingService.open("Requirement already exists in the target task.","",{duration:3e3});return;}o.solutionRequirements.splice(t.previousIndex,1),a.solutionRequirements.splice(t.currentIndex,0,p);let d=this.solutionRequirementMap.get(p);if(d&&d.processTaskReferences){let g=d.processTaskReferences.indexOf(o.id);g>=0&&d.processTaskReferences.splice(g,1),d.processTaskReferences.indexOf(a.id)<0&&d.processTaskReferences.push(a.id);let b="/projects/"+this.projectId+"/solutionrequirements/"+p;yield Dt(ge(this.firebase.firestore,b),d,{merge:!0});}let f="/projects/"+this.projectId+"/businessprocesses/"+r+"/subprocesses/"+e.sp.id+"/processtasks/"+o.id,h="/projects/"+this.projectId+"/businessprocesses/"+l+"/subprocesses/"+i.sp.id+"/processtasks/"+a.id;yield Promise.all([Dt(ge(this.firebase.firestore,f),o,{merge:!0}),Dt(ge(this.firebase.firestore,h),a,{merge:!0})]),this.messagingService.open("Requirement moved.","",{duration:3e3});});}onSelectForCopy(t){this.copySolutionRequirementId=t;}onSelectSolutionRequirement(t){this.filterSolutionRequirementId=t;}onSelectProcessTask(t){this.filterProcessTaskId=t;}clickClearFilters(){this.requirementHighlightService.clear();}taskHasHighlightedRequirement(t){return this.filterSolutionRequirementId?!!t.solutionRequirements&&t.solutionRequirements.indexOf(this.filterSolutionRequirementId)>=0:!1;}subProcessHasHighlightedRequirement(t){return this.filterSolutionRequirementId?this.getTasksForSubProcess(t).some(i=>this.taskHasHighlightedRequirement(i)):!1;}shouldExpandSubProcess(t){return this.expandedSpIds.has(t)?!0:this.collapsedSpIds.has(t)?!1:!!(this.isFiltered||this.subProcessHasHighlightedRequirement(t)||this.pinnedTaskId&&this.getTasksForSubProcess(t).some(i=>i.id===this.pinnedTaskId));}shouldExpandTask(t){return this.expandedTaskIds.has(t.id)?!0:this.collapsedTaskIds.has(t.id)?!1:!!(this.isFiltered||this.taskHasHighlightedRequirement(t)||this.pinnedTaskId&&t.id===this.pinnedTaskId);}onTaskPanelOpened(t){this.expandedTaskIds.add(t),this.collapsedTaskIds.delete(t);}onTaskPanelClosed(t){this.collapsedTaskIds.add(t),this.expandedTaskIds.delete(t);}onBpPanelOpened(t){this.expandedBpIds.add(t),this.collapsedBpIds.delete(t);}onBpPanelClosed(t){this.collapsedBpIds.add(t),this.expandedBpIds.delete(t);}shouldExpandBp(t){return this.expandedBpIds.has(t)?!0:(this.collapsedBpIds.has(t),!1);}onSpPanelOpened(t){this.expandedSpIds.add(t),this.collapsedSpIds.delete(t);}onSpPanelClosed(t){this.collapsedSpIds.add(t),this.expandedSpIds.delete(t);}expandAllTasksInSp(t){this.expandedSpIds.add(t),this.collapsedSpIds.delete(t);let e=this.getTasksForSubProcess(t);for(let i of e)this.expandedTaskIds.add(i.id),this.collapsedTaskIds.delete(i.id);}collapseAllTasksInSp(t){let e=this.getTasksForSubProcess(t);for(let i of e)this.collapsedTaskIds.add(i.id),this.expandedTaskIds.delete(i.id);}expandAll(){let t=this.isProjectScope?this.allSubProcesses:this.displaySubProcesses;for(let e of t)this.expandedSpIds.add(e.id),this.collapsedSpIds.delete(e.id),this.expandAllTasksInSp(e.id);}collapseAll(){let t=this.isProjectScope?this.allSubProcesses:this.displaySubProcesses;for(let e of t)this.collapsedSpIds.add(e.id),this.expandedSpIds.delete(e.id),this.collapseAllTasksInSp(e.id);}expandAllInBp(t){this.expandedBpIds.add(t),this.collapsedBpIds.delete(t);let e=this.getSubProcessesForBp(t);for(let i of e)this.expandedSpIds.add(i.id),this.collapsedSpIds.delete(i.id),this.expandAllTasksInSp(i.id);}collapseAllInBp(t){let e=this.getSubProcessesForBp(t);for(let i of e)this.collapsedSpIds.add(i.id),this.expandedSpIds.delete(i.id),this.collapseAllTasksInSp(i.id);}static ɵfac=function(e){return new(e||n)(le(On),le(Bt),le(Mo),le(To),le(bd),le(Ti),le(Hf),le(Uf));};static ɵcmp=Te({type:n,selectors:[["app-gap-analysis-panel"]],inputs:{projectId:"projectId",businessProcessId:"businessProcessId",businessProcess:"businessProcess",drillDownSubProcess:"drillDownSubProcess",selectedSubProcess:"selectedSubProcess",selectedProcessTask:"selectedProcessTask"}
595,features:[ki],decls:5,vars:3,consts:[[1,"container-right-panel"],[1,"container-tile-body-strong","gap-body"],[1,"empty-state"],[1,"task-level-view"],[1,"task-header"],[1,"task-header-icon"],[1,"header-actions"],["mat-icon-button","","color","primary","matTooltip","Generate requirements (AI)",3,"click","disabled"],[1,"icon-loading"],["mat-icon-button","","color","primary","matTooltip","Add requirement",3,"click"],["mat-icon-button","","color","primary","matTooltip","Paste requirement",3,"click","disabled"],[1,"weight-total"],["cdkDropList","",1,"drop-list",3,"cdkDropListDropped","cdkDropListData"],[1,"empty-state","drop-zone-placeholder"],[1,"weight-badge"],["cdkDrag","",1,"drag-item"],["class","cdk-drag-placeholder-custom",4,"cdkDragPlaceholder"],[3,"onSelectForCopy","onSelectSolutionRequirement","onSelectProcessTask","projectId","businessProcessId","subProcessId","collectionPath","deployableComponentMap","processTask","processTaskMap","processTaskReferenceMap","object","order","startInEditMode"],[1,"cdk-drag-placeholder-custom"],[1,"drop-zone-icon"],[1,"filter-bar"],["mat-icon-button","","color","primary","matTooltip","Clear filter",3,"click"],["cdkDropListGroup",""],["multi","",1,"gap-accordion"],[1,"mat-elevation-z0","bp-panel",3,"expanded"],[1,"mat-elevation-z0","bp-panel",3,"opened","closed","expanded"],[1,"bp-panel-title"],[1,"panel-title-text"],[1,"bp-panel-description"],[1,"header-actions",3,"click"],["mat-icon-button","","matTooltip","Expand all",3,"click"],["mat-icon-button","","matTooltip","Collapse all",3,"click"],[1,"mat-elevation-z0","sp-panel",3,"expanded"],[1,"mat-elevation-z0","sp-panel",3,"opened","closed","expanded"],[1,"sp-panel-title"],[1,"sp-panel-description"],["mat-icon-button","","matTooltip","Expand all tasks",3,"click"],["mat-icon-button","","matTooltip","Collapse all tasks",3,"click"],[1,"mat-elevation-z0","task-panel",3,"expanded"],[1,"mat-elevation-z0","task-panel",3,"opened","closed","expanded"],[1,"task-panel-title"],[1,"task-panel-description"],[1,"empty-state-inline","drop-zone-placeholder"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1),S(2,EQ,2,0,"div",2),S(3,jQ,20,16,"div",3),S(4,pee,3,3),c()()),e&2&&(m(2),M(i.isLoading?2:-1),m(),M(!i.isLoading&&i.activeTask&&i.selectedTaskSubProcess?3:-1),m(),M(!i.isLoading&&!i.selectedProcessTask?4:-1));},dependencies:[ut,dI,q1,G1,V1,J1,gr,Sl,fr,hr,_r,wl,We,Xe,$e,Qt,$t,_n,Vd],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
595.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.scope-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 16px;background-color:#0000000a;border-bottom:1px solid rgba(0,0,0,.08);font-size:.85em;color:#0009;flex-shrink:0}.scope-icon[_ngcontent-%COMP%]{font-size:16px!important;width:16px!important;height:16px!important;color:#0006;filter:none!important;text-shadow:none!important}.scope-label[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gap-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:8px}.gap-accordion[_ngcontent-%COMP%]{width:100%}.bp-panel[_ngcontent-%COMP%]{margin-bottom:6px;border:1px solid rgba(0,0,0,.1);border-radius:10px!important;background-color:#00000003}.bp-panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-weight:500}.bp-panel-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#465d91;opacity:.85;filter:none!important;text-shadow:none!important}.sp-panel[_ngcontent-%COMP%]{margin-bottom:4px;border:1px solid rgba(0,0,0,.06);border-radius:8px!important}.task-panel[_ngcontent-%COMP%]{margin-bottom:2px;margin-left:8px;background-color:#fff!important;border:none!important;border-radius:6px!important}.sp-panel-title[_ngcontent-%COMP%], .task-panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.sp-panel-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .task-panel-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#465d91;opacity:.7;filter:none!important;text-shadow:none!important}.panel-title-text[_ngcontent-%COMP%]{font-size:.9em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.task-panel-description[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;justify-content:flex-end;flex-shrink:0}
595.sp-panel-description[_ngcontent-%COMP%], .bp-panel-description[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0}.sp-description[_ngcontent-%COMP%]{font-size:.85em;color:#0009;padding:4px 8px 12px;line-height:1.4}.task-level-view[_ngcontent-%COMP%]{padding:8px}.task-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 0;font-weight:500;font-size:.95em;color:#000c;border-bottom:1px solid rgba(0,0,0,.08);margin-bottom:8px}.task-header[_ngcontent-%COMP%] .task-header-icon[_ngcontent-%COMP%]{color:#465d91;font-size:20px;width:20px;height:20px;filter:none!important;text-shadow:none!important}.header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0;margin-left:auto;flex-shrink:0}.header-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transform:scale(.85)}.header-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{filter:none!important;text-shadow:none!important}.weight-badge[_ngcontent-%COMP%]{background-color:#465d91;color:#fff;border-radius:12px;padding:2px 10px;font-size:.8em;font-weight:500}.weight-total[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 0 8px;font-size:.85em;color:#0009;border-bottom:1px solid rgba(0,0,0,.06);margin-bottom:8px}.filter-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:4px 12px;margin-bottom:8px;background-color:#0000000a;border-radius:20px;font-size:13px;color:#0009}.filter-bar[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.filter-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.empty-state[_ngcontent-%COMP%]{color:#0006;font-size:.9em;padding:24px 16px;text-align:center}.empty-state-inline[_ngcontent-%COMP%]{color:#00000059;font-size:.85em;padding:8px 16px;text-align:center;font-style:italic}.drop-zone-placeholder[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:12px 16px;width:100%;pointer-events:none}.drop-zone-placeholder[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.85em;color:#0000004d}.drop-zone-icon[_ngcontent-%COMP%]{font-size:20px!important;width:20px!important;height:20px!important;color:#0003;filter:none!important;text-shadow:none!important}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.drop-list[_ngcontent-%COMP%]{min-height:24px;border-radius:6px;transition:background-color .2s ease,border-color .2s ease}.drop-list-empty[_ngcontent-%COMP%]{min-height:60px;border:2px dashed rgba(0,0,0,.12);display:flex;align-items:center;justify-content:center}.drop-list-empty.cdk-drop-list-dragging[_ngcontent-%COMP%]{border-color:#465d91;background-color:#465d910a}.drop-list.cdk-drop-list-dragging[_ngcontent-%COMP%]{background-color:#00000008}.drag-item[_ngcontent-%COMP%]{transition:transform .15s ease}.drag-item.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-placeholder-custom[_ngcontent-%COMP%]{border:2px dashed rgba(0,0,0,.15);border-radius:6px;min-height:48px;background-color:#0000000a;transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:8px;box-shadow:0 4px 16px #0000002e;background-color:#fff;opacity:.92;padding:0 8px}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};function dee(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function mee(n,t){n&1&&(s(0,"mat-icon",13),u(1,"autorenew"),c());}function uee(n,t){n&1&&(s(0,"span",14),q(1,1),c());}function fee(n,t){if(n&1&&(s(0,"div",15)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"span"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function hee(n,t){if(n&1&&(s(0,"div",40)(1,"div",41)(2,"span",42),q(3,7),c(),s(4,"span",43),u(5),c()(),s(6,"div",44)(7,"span",42),q(8,8),c(),s(9,"span",43),u(10),c()()()),n&2){let e=x().$implicit;m(5),G(e.search),m(5),G(e.replace);}}
595function _ee(n,t){if(n&1&&(s(0,"div",36)(1,"div",37)(2,"span",38),u(3),c(),s(4,"span",39),u(5),c()(),S(6,hee,11,2,"div",40),c()),n&2){let e=t.$implicit,i=x(5);m(3),G(i.getFieldLabel(e.field_name)),m(2),G(e.description),m(),M(e.search&&e.replace?6:-1);}}function gee(n,t){if(n&1&&(s(0,"div",33)(1,"div",34),q(2,6),c(),be(3,_ee,7,3,"div",36,ac),c()),n&2){let e=x().$implicit;m(3),ye(e.actions);}}function xee(n,t){if(n&1&&(s(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"div",28)(4,"mat-icon",29),u(5),c(),s(6,"span",30),u(7),c(),s(8,"span",31),u(9),c()()()(),s(10,"div",32)(11,"div",33)(12,"div",34),q(13,4),c(),s(14,"div",35),u(15),c()(),s(16,"div",33)(17,"div",34),q(18,5),c(),s(19,"div",35),u(20),c()(),S(21,gee,5,0,"div",33),c()()),n&2){let e=t.$implicit,i=x(3);m(5),G(i.getTypeIcon(e.inconsistency_type)),m(),N("ngClass",i.getTypeChipClass(e.inconsistency_type)),m(),_e(" ",i.getTypeLabel(e.inconsistency_type)," "),m(2),G(i.getFieldLabel(e.field_name)),m(6),G(e.description),m(5),G(e.recommendation),m(),M(e.actions&&e.actions.length>0?21:-1);}}function Cee(n,t){if(n&1&&(s(0,"div",24)(1,"div",26)(2,"mat-icon"),u(3,"checklist"),c(),s(4,"span"),q(5,3),c()(),s(6,"mat-accordion",27),be(7,xee,22,7,"mat-expansion-panel",null,ac),c()()),n&2){let e=x(2);m(5),us(e.analysisResult.inconsistencies.length),fs(5),m(2),ye(e.analysisResult.inconsistencies);}}function vee(n,t){n&1&&(s(0,"div",25)(1,"mat-icon"),u(2,"check_circle"),c(),s(3,"span"),q(4,9),c()());}function bee(n,t){if(n&1&&(s(0,"div",16)(1,"div",17)(2,"div",18)(3,"span",19),u(4),c(),s(5,"span",20),u(6,"/5"),c()(),s(7,"div",21)(8,"div",22),q(9,2),c(),s(10,"div",23),u(11),c()()(),S(12,Cee,9,1,"div",24),S(13,vee,5,0,"div",25),c()),n&2){let e=x();m(2),N("ngClass",e.getScoreColor(e.analysisResult.overall_consistency_score)),m(2),G(e.analysisResult.overall_consistency_score),m(7),G(e.anal
595ysisResult.summary),m(),M(e.analysisResult.inconsistencies&&e.analysisResult.inconsistencies.length>0?12:-1),m(),M(!e.analysisResult.inconsistencies||e.analysisResult.inconsistencies.length===0?13:-1);}}var wv=class n{constructor(t,e,i){this.firebase=t;this.localeService=e;this.messagingService=i;}firebase;localeService;messagingService;projectId;object;isLoading=!1;analysisResult=null;error=null;reviewUnsubscribe=null;ngOnChanges(t){t.projectId&&(this.analysisResult=null,this.error=null,this.subscribeToLatestReview());}ngOnDestroy(){this.unsubscribeFromReview();}subscribeToLatestReview(){if(this.unsubscribeFromReview(),!this.projectId)return;let t=ge(this.firebase.firestore,"projects",this.projectId,"consistencyReviews","latest");this.reviewUnsubscribe=Bn(t,e=>{if(!e.exists())return;let i=e.data();i?.completed&&i?.result&&(this.analysisResult=i.result);},e=>{console.error("Error listening to consistency review:",e);});}unsubscribeFromReview(){this.reviewUnsubscribe&&(this.reviewUnsubscribe(),this.reviewUnsubscribe=null);}launchAnalysis(){return $(this,null,function*(){if(!this.projectId||!this.object){this.messagingService.open("Project data is not available yet.","",{duration:3e3});return;}this.isLoading=!0,this.error=null,this.analysisResult=null;try{let a=ei(this.firebase.functions,"functionReviewProjectConsistencyStream"),r={projectId:this.projectId,object:this.object,locale:this.localeService.getSelectedLocaleShort()},{stream:l,data:p}=yield a.stream(r);try{for(var t=Co(l),e,i,o;e=!(i=yield t.next()).done;e=!1){let f=i.value;f&&(this.analysisResult=f);}}catch(i){o=[i];}finally{try{e&&(i=t.return)&&(yield i.call(t));}finally{if(o)throw o[0];}}let d=yield p;d&&(this.analysisResult=d.data??this.analysisResult),this.messagingService.open("Analysis completed.","",{duration:3e3});}catch(a){console.error("Error running consistency analysis:",a),this.error=a?.message||"An unexpected error occurred.",this.messagingService.open("Error running analysis.","",{duration:3e3});}finally{this.isLoading=!1;}});}getScoreColor(t){return t>=4?"score-good":t>=3?"score-ok":"score-bad";}getTypeLabel(t){return{contradiction:"Contradiction",gap:"Gap",misalignment:"Misalignment",missing_reference:"Missing Reference",factual_error:"Factual Error"}[t]||t;}getTypeIcon(t){return{contradiction:"sync_problem",gap:"report_gmailerrorred",misalignment:"swap_horiz",missing_reference:"link_off",factual_error:"error"}[t]||"warning";}getTypeChipClass(t){return{contradiction:"chip-contradiction",gap:"chip-gap",misalignment:"chip-misalignment",missing_reference:"chip-missing-ref",factual_error:"chip-factual-error"}[t]||"chip-default";}getFieldLabel(t){return{description:"Description",context:"Context",current_situation:"Current Situation",future_situation:"Future Situation",benefits:"Benefits",business_needs:"Business Needs",changes:"Changes",dependencies:"Dependencies",guiding_principles:"Guiding Principles",market_trends:"Market Trends",orientations_motivations:"Orientations & Motivations",risk_assessment:"Risk Assessment",strategic_alignment:"Strategic Alignment",scope:"Scope",goals:"Goals"}[t]||t;}static ɵfac=function(e){return new(e||n)(le(On),le(To),le(Bt));};static ɵcmp=Te({type:n,selectors:[["app-project-analysis"]],inputs:{projectId:"projectId",object:"object"},features:[ki],decls:10,vars:6,consts:()=>{let t;t="Run AI consistency analysis across all project fields";let e;e="Launch Consistency Analysis";let i;i=" Save the project first to enable analysis. ";let o;o="Summary";let a;a=" Inconsistencies ("+"\uFFFD0\uFFFD"+") ";let r;r="Description";let l;l="Recommendation";let p;p="Suggested Actions";let d;d="Find:";let f;f="Replace:";let h;return h="No inconsistencies found. The project fields are consistent.",[e,i,o,a,r,l,p,d,f,h,[1,"analysis-container"],[1,"analysis-launch"],["mat-flat-button","","color","primary","matTooltip",t,3,"click","disabled"],[1,"icon-loading"],[1,"analysis-hint"],[1,"analysis-error"],[1,"analysis-results"],[1,"analysis-header"],[1,"score-badge",3,"ngClass"],[1,"score-value"],[1,"score-label"],[1,"analysis-summary"],[1,"summary-title"],[1,"summary-text"],[1,"inconsistencies-section"],[1,"n
595o-inconsistencies"],[1,"section-title"],["multi",""],[1,"panel-title-row"],[1,"type-icon"],[1,"type-chip",3,"ngClass"],[1,"field-chip"],[1,"inconsistency-body"],[1,"inconsistency-detail"],[1,"detail-label"],[1,"detail-text"],[1,"action-card"],[1,"action-header"],[1,"field-chip","small"],[1,"action-desc"],[1,"action-diff"],[1,"diff-search"],[1,"diff-label"],[1,"diff-text"],[1,"diff-replace"]];},template:function(e,i){e&1&&(s(0,"div",10)(1,"div",11)(2,"button",12),E("click",function(){return i.launchAnalysis();}),S(3,dee,2,0,"mat-icon"),S(4,mee,2,0,"mat-icon",13),s(5,"span"),q(6,0),c()(),S(7,uee,2,0,"span",14),c(),S(8,fee,5,1,"div",15),S(9,bee,14,5,"div",16),c()),e&2&&(m(2),N("disabled",i.isLoading||!i.object),m(),M(i.isLoading?-1:3),m(),M(i.isLoading?4:-1),m(3),M(i.object?-1:7),m(),M(i.error?8:-1),m(),M(i.analysisResult?9:-1));},dependencies:[ut,Kr,$e,Qe,We,Xe,yi,$t,_n,gr,Sl,fr,hr,_r],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
595.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.analysis-container[_ngcontent-%COMP%]{padding:16px}.analysis-launch[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:12px;margin-bottom:20px}.analysis-launch[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.analysis-hint[_ngcontent-%COMP%]{color:#00000073;font-size:.85em;font-style:italic}.analysis-error[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;padding:12px 16px;background-color:#fdecea;color:#b71c1c;border-radius:8px;margin-bottom:16px;font-size:.9em}.analysis-error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#b71c1c;flex-shrink:0}.analysis-results[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .3s ease-in}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.analysis-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;gap:16px;margin-bottom:24px;padding:16px;background-color:#fafafa;border-radius:10px;border:1px solid rgba(0,0,0,.06)}.score-badge[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:baseline;justify-content:center;min-width:72px;padding:12px 16px;border-radius:12px;flex-shrink:0}.score-value[_ngcontent-%COMP%]{font-size:2.2em;font-weight:700;line-height:1}.score-label[_ngcontent-%COMP%]{font-size:1em;font-weight:500;opacity:.7;margin-left:2px}.score-good[_ngcontent-%COMP%]{background-color:#e8f5e9;color:#2e7d32}.score-ok[_ngcontent-%COMP%]{background-color:#fff3e0;color:#e65100}.score-bad[_ngcontent-%COMP%]{background-color:#fdecea;color:#b71c1c}.analysis-summary[_ngcontent-%COMP%]{flex:1}.summary-title[_ngcontent-%COMP%]{font-size:.8em;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#00000080;margin-bottom:6px}.summary-text[_ngcontent-%COMP%]{font-size:.95em;line-height:1.5;color:#000c}.inconsistencies-section[_ngcontent-%COMP%]{margin-top:8px}.section-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:1em;font-weight:600;color:#000000b3;margin-bottom:12px}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91;font-size:20px;width:20px;height:20px} .analysis-container .mat-expansion-panel{margin-bottom:10px;border-radius:10px!important;border:1px solid rgba(0,0,0,.07)!important;box-shadow:none!important} .analysis-container .mat-expansion-panel:before{display:none} .analysis-container .mat-expansion-panel-header{padding:0 16px;min-height:54px} .analysis-container .mat-expansion-panel-body{padding:0 16px 16px}.panel-title-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap}.type-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#00000080}.type-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:12px;font-size:.75em;font-weight:600;text-transform:uppercase;letter-spacing:.3px}.chip-contradiction[_ngcontent-%COMP%]{background-color:#fdecea;color:#b71c1c}.chip-gap[_ngcontent-%COMP%]{background-color:#fff3e0;color:#e65100}.chip-misalignment[_ngcontent-%COMP%]{background-color:#e3f2fd;color:#1565c0}.chip-missing-ref[_ngcontent-%COMP%]{background-color:#f3e5f5;color:#6a1b9a}.chip-factual-error[_ngcontent-%COMP%]{background-color:#fce4ec;color:#c62828}.chip-default[_ngcontent-%COMP%]{background-color:#f5f5f5;color:#0009}.field-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:12px;font-size:.75em;font-weight:500;background-color:#e8eaf6;color:#283593}.field-chip.small[_ngcontent-%COMP%]{font-size:.7em;padding:1px 8px}.inconsistency-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}.inconsistency-detail[_ngcontent-%COMP%] .detail-label[_ngcontent-%COMP%]{font-size:.8em;font-weight:600;text-transform:uppercase;letter-spacing:.3px;color:#00000080;margin-bottom:4px}.inconsistency-detail[_ngcontent-%COMP%] .detail-text[_ngcontent-%COMP%]{font-size:.9em;line-height:1.5;color:#000c}.action-card[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid rgba(0,0,0,.06);border-radius:8px;padding:12px;margin-top:8px}.action-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-bottom:8px}.action-desc[_ngcontent-%COMP%]{font-size:.85em;color:#000000b3}.action-diff[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;font-size:.85em;font-family:Courier New,monospace}.diff-search[_ngcontent-%COMP%]{background-color:#fdecea;border-left:3px solid #b71c1c;padding:6px 10px;border-radius:4px}.diff-replace[_ngcontent-%COMP%]{background-color:#e8f5e9;border-left:3px solid #2e7d32;padding:6px 10px;border-radius:4px}.diff-label[_ngcontent-%COMP%]{font-weight:600;font-family:Rubik,sans-serif;font-size:.85em;margin-right:6px;color:#0009}.diff-text[_ngcontent-%COMP%]{word-break:break-word;white-space:pre-wrap}.no-inconsistencies[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:10px;padding:16px;background-color:#e8f5e9;color:#2e7d32;border-radius:10px;font-size:.95em}.no-inconsistencies[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#2e7d32;flex-shrink:0}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};var rM=(n,t)=>t.id,sN=(n,t)=>t.roleId,rN=(n,t)=>t.delivery,yee=(n,t)=>t.role,Pee=(n,t)=>t.teamId;function wee(n,t){n&1&&(s(0,"div",52),u(1,"Loading estimation data..."),c());}function See(n,t){n&1&&(s(0,"div",53)(1,"mat-icon"),u(2,"info"),
595c(),s(3,"span"),q(4,2),c()());}function Mee(n,t){if(n&1&&(s(0,"div",54)(1,"div",92)(2,"div",93),q(3,44),c(),s(4,"div",94),u(5),c(),s(6,"div",95),u(7,"man-days"),c()(),s(8,"div",92)(9,"div",93),q(10,45),c(),s(11,"div",94),u(12),c(),s(13,"div",95),u(14),c()(),s(15,"div",92)(16,"div",93),q(17,46),c(),s(18,"div",96),u(19),c(),s(20,"div",95),u(21,"man-days"),c()(),s(22,"div",92)(23,"div",93),q(24,47),c(),s(25,"div",96),u(26),c(),s(27,"div",95),u(28),c()()()),n&2){let e=x(2);m(5),G(e.formatNumber(e.totalDirectEffort)),m(7),G(e.formatNumber(e.totalIndirectEffort)),m(2),_e("man-days \xB7 ",e.formatPercent(e.getOverheadRatio())," overhead"),m(5),G(e.formatNumber(e.totalEffort)),m(7),G(e.formatCurrency(e.totalCost)),m(2),_e("@ ",e.formatCurrency(e.params.dailyRate)," / day");}}function Oee(n,t){if(n&1&&(s(0,"mat-option",60),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function Eee(n,t){if(n&1&&(s(0,"div",61)(1,"span",97),u(2,"Scale Values:"),c(),s(3,"div",98)(4,"span",99),u(5),c(),s(6,"span",99),u(7),c(),s(8,"span",99),u(9),c(),s(10,"span",99),u(11),c(),s(12,"span",99),u(13),c(),s(14,"span",99),u(15),c()()()),n&2){let e=x(2);m(5),_e("E: ",e.selectedScale.E),m(2),_e("XS: ",e.selectedScale.XS),m(2),_e("S: ",e.selectedScale.S),m(2),_e("M: ",e.selectedScale.M),m(2),_e("L: ",e.selectedScale.L),m(2),_e("XL: ",e.selectedScale.XL);}}function Tee(n,t){if(n&1){let e=oe();s(0,"mat-form-field",58)(1,"mat-label"),u(2),c(),s(3,"input",100),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.rate,o)||(a.rate=o),R(o);}),c()();}if(n&2){let e=t.$implicit;m(2),_e("",e.roleName," (%)"),m(),wt("ngModel",e.rate);}}function Iee(n,t){if(n&1&&(s(0,"div",65)(1,"mat-icon"),u(2,"warning"),c(),s(3,"span"),u(4),c()()),n&2){let e=x(2);m(4),_e("Role rates should sum to 100%. Current: ",e.getRoleRateSum(),"%");}}function kee(n,t){if(n&1&&(s(0,"tr")(1,"td",71),u(2),c(),s(3,"td",72),u(4),c(),s(5,"td",73),u(6),c(),s(7,"td",74),u(8),c()()),n&2){let e=t.$implicit,i=x(2);m(2),G(e.delivery),m(2),G(e.requirementCount),m(2),G(i.formatNumber(e.effortPoints)),m(2),G(i.formatCurrency(e.effortPoints*i.params.dailyRate));}}function Ree(n,t){if(n&1&&(s(0,"option",60),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function Nee(n,t){if(n&1&&(s(0,"span",108),u(1),c()),n&2){let e=x().$implicit,i=x(2);m(),G(i.formatNumber(e.computedEffort));}}function Aee(n,t){if(n&1){let e=oe();s(0,"input",111),Mt("ngModelChange",function(o){k(e);let a=x().$implicit;return St(a.overrideEffort,o)||(a.overrideEffort=o),R(o);}),c();}if(n&2){let e=x().$implicit;wt("ngModel",e.overrideEffort);}}function Dee(n,t){if(n&1){let e=oe();s(0,"tr")(1,"td",71)(2,"input",101),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.label,o)||(a.label=o),R(o);}),c(),s(3,"span",102),u(4),c()(),s(5,"td",77)(6,"select",103),E("ngModelChange",function(o){let a=k(e).$implicit,r=x(2);return R(r.onMacroRoleChange(a,o));}),s(7,"option",104),u(8,"\u2014"),c(),be(9,Ree,2,2,"option",60,rM),c()(),s(11,"td",78)(12,"input",105),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.rate,o)||(a.rate=o),R(o);}),c()(),s(13,"td",79)(14,"span",106),u(15),c()(),s(16,"td",80)(17,"mat-checkbox",107),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.autoCalc,o)||(a.autoCalc=o),R(o);}),c()(),s(18,"td",73),S(19,Nee,2,1,"span",108)(20,Aee,1,1,"input",109),c(),s(21,"td",74)(22,"span",108),u(23),c()(),s(24,"td",81)(25,"button",110),E("click",function(){let o=k(e).$index,a=x(2);return R(a.removeMacroCost(o));}),s(26,"mat-icon"),u(27,"close"),c()()()();}if(n&2){let e=t.$implicit,i=x(2);m(2),wt("ngModel",e.label),m(2),G(e.description),m(2),N("ngModel",e.roleId),m(3),ye(i.projectRoles),m(3),wt("ngModel",e.rate),m(2),Ue("applied-direct",e.appliedOn==="direct")("applied-total",e.appliedOn==="total"),m(),_e(" ",e.appliedOn==="direct"?"Direct":"Total"," "),m(2),wt("ngModel",e.autoCalc),m(2),M(e.autoCalc?19:20),m(4),G(i.formatCurrency(i.getEffectiveMacroCost(e)));}}function jee(n,t){if(n&1&&(s(0,"tr")(1,"td",71)(2,"mat-icon",112),u(3,"person"),c(),u(4),c(),s(5,"td",73),u(6),c(),s(7,"td",73),u(8),c(),s(9,"td",73)(10,"strong"),u(11),c()(),s(12,"td",74)(13,"strong"),u(14),c()()()),n&2){let e=t.$implicit,i=x(2);m(4),G(e.role),m(2),G(i.formatNumber(e.directEffort)),m(2),G(i.formatNumber(e.indirectEffort)),m(3),G(i.formatNumber(e.totalEffort)),m(3),G(i.formatCurrency(e.totalCost));}}function Lee(n,t){if(n&1){let e=oe();s(0,"button",116),E("click",function(){k(e);let o=x().$implicit,a=x(2);return R(a.toggleRow(o));}),s(1,"mat-icon",117),u(2),c()();}if(n&2){let e=x().$implicit;m(2),G(e.expanded?"expand_more":"chevron_right");}}function zee(n,t){if(n&1&&(s(0,"mat-icon",118),u(1,"delivery_dining"),c(),s(2,"
595strong"),u(3),c()),n&2){let e=x().$implicit;m(3),G(e.delivery);}}function Fee(n,t){if(n&1&&(s(0,"mat-icon",119),u(1),c(),s(2,"span"),u(3),c()),n&2){let e=x().$implicit;Ue("component-icon",e.componentId!=="__unassigned__")("undefined-component-icon",e.componentId==="__unassigned__"),m(),_e(" ",e.componentId==="__unassigned__"?"help_outline":"widgets"," "),m(),Ue("undefined-component",e.componentId==="__unassigned__"),m(),G(e.componentName);}}function Bee(n,t){if(n&1&&(s(0,"mat-icon",112),u(1,"person"),c(),s(2,"span",120),u(3),c()),n&2){let e=x().$implicit;m(3),G(e.roleName);}}function $ee(n,t){if(n&1&&u(0),n&2){let e=x().$implicit;_e(" ",e.requirementCount," ");}}function Vee(n,t){if(n&1&&(s(0,"option",60),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function Gee(n,t){if(n&1&&(s(0,"mat-icon",122),u(1,"auto_fix_high"),c()),n&2){let e=x(2).$implicit,i=x(2);N("matTooltip",gp("Auto-suggestion: ",i.getTeamName(e.autoAssignedTeamId)));}}function qee(n,t){if(n&1){let e=oe();s(0,"select",121),Mt("ngModelChange",function(o){k(e);let a=x().$implicit;return St(a.assignedTeamId,o)||(a.assignedTeamId=o),R(o);}),s(1,"option",104),u(2,"\u2014"),c(),be(3,Vee,2,2,"option",60,rM),c(),S(5,Gee,2,2,"mat-icon",122);}if(n&2){let e=x().$implicit,i=x(2);Ue("auto-assigned",e.assignedTeamId===e.autoAssignedTeamId&&e.autoAssignedTeamId!==""),wt("ngModel",e.assignedTeamId),m(3),ye(i.teams),m(2),M(e.autoAssignedTeamId&&e.assignedTeamId!==e.autoAssignedTeamId?5:-1);}}function Jee(n,t){if(n&1){let e=oe();s(0,"tr")(1,"td",87)(2,"span",113),S(3,Lee,3,1,"button",114),S(4,zee,4,1),S(5,Fee,4,8),S(6,Bee,4,1),c()(),s(7,"td",72),S(8,$ee,1,1),c(),s(9,"td",73),u(10),c(),s(11,"td",73),u(12),c(),s(13,"td",73)(14,"strong"),u(15),c()(),s(16,"td",74),u(17),c(),s(18,"td",88),S(19,qee,6,4),c(),s(20,"td",89)(21,"input",115),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.comment,o)||(a.comment=o),R(o);}),c()()();}if(n&2){let e=t.$implicit,i=x(2);Ue("level-1",e.level===1)("level-2",e.level===2)("level-3",e.level===3),m(2),Ci("padding-left",(e.level-1)*20,"px"),m(),M(e.children&&e.children.length>0?3:-1),m(),M(e.level===1?4:-1),m(),M(e.level===2?5:-1),m(),M(e.level===3?6:-1),m(2),M(e.level!==3?8:-1),m(2),G(i.formatNumber(e.directEffort)),m(2),G(i.formatNumber(e.indirectEffort)),m(3),G(i.formatNumber(e.totalEffort)),m(2),G(i.formatCurrency(e.cost)),m(2),M(e.level==3?19:-1),m(2),wt("ngModel",e.comment);}}function Hee(n,t){if(n&1){let e=oe();s(0,"button",116),E("click",function(){k(e);let o=x().$implicit,a=x(2);return R(a.toggleDeliveryRow(o));}),s(1,"mat-icon",117),u(2),c()();}if(n&2){let e=x().$implicit;m(2),G(e.expanded?"expand_more":"chevron_right");}}function Uee(n,t){if(n&1){let e=oe();s(0,"button",116),E("click",function(){k(e);let o=x().$implicit,a=x(4);return R(a.toggleTeamRow(o));}),s(1,"mat-icon",117),u(2),c()();}if(n&2){let e=x().$implicit;m(2),G(e.expanded?"expand_more":"chevron_right");}}function Wee(n,t){if(n&1&&(s(0,"tr",128)(1,"td",87)(2,"span",129)(3,"mat-icon",112),u(4,"person"),c(),s(5,"span",120),u(6),c()()(),s(7,"td",73),u(8),c(),s(9,"td",73),u(10),c(),s(11,"td",73)(12,"strong"),u(13),c()(),s(14,"td",74),u(15),c()()),n&2){let e=t.$implicit,i=x(6);m(6),G(e.roleName),m(2),G(i.formatNumber(e.directEffort)),m(2),G(i.formatNumber(e.indirectEffort)),m(3),G(i.formatNumber(e.totalEffort)),m(2),G(i.formatCurrency(e.cost));}}function Xee(n,t){if(n&1&&be(0,Wee,16,5,"tr",128,sN),n&2){let e=x().$implicit;ye(e.roles);}}function Yee(n,t){if(n&1&&(s(0,"tr",125)(1,"td",87)(2,"span",126),S(3,Uee,3,1,"button",114),s(4,"mat-icon",127),u(5,"groups"),c(),s(6,"strong"),u(7),c()()(),s(8,"td",73),u(9),c(),s(10,"td",73),u(11),c(),s(12,"td",73)(13,"strong"),u(14),c()(),s(15,"td",74)(16,"strong"),u(17),c()()(),S(18,Xee,2,0)),n&2){let e=t.$implicit,i=x(4);m(3),M(e.roles.length>0?3:-1),m(4),G(e.teamName),m(2),G(i.formatNumber(e.directEffort)),m(2),G(i.formatNumber(e.indirectEffort)),m(3),G(i.formatNumber(e.totalEffort)),m(3),G(i.formatCurrency(e.cost)),m(),M(e.expanded?18:-1);}}function Kee(n,t){if(n&1&&be(0,Yee,19,7,null,null,Pee),n&2){let e=x().$implicit;ye(e.teams);}}
595function Zee(n,t){if(n&1&&(s(0,"tr",123)(1,"td",87)(2,"span",124),S(3,Hee,3,1,"button",114),s(4,"mat-icon",118),u(5,"delivery_dining"),c(),s(6,"strong"),u(7),c()()(),s(8,"td",73),u(9),c(),s(10,"td",73),u(11),c(),s(12,"td",73)(13,"strong"),u(14),c()(),s(15,"td",74)(16,"strong"),u(17),c()()(),S(18,Kee,2,0)),n&2){let e=t.$implicit,i=x(2);m(3),M(e.teams.length>0?3:-1),m(4),G(e.delivery),m(2),G(i.formatNumber(e.directEffort)),m(2),G(i.formatNumber(e.indirectEffort)),m(3),G(i.formatNumber(e.totalEffort)),m(3),G(i.formatCurrency(e.cost)),m(),M(e.expanded?18:-1);}}function Qee(n,t){if(n&1){let e=oe();S(0,Mee,29,6,"div",54),s(1,"mat-expansion-panel",55)(2,"mat-expansion-panel-header")(3,"mat-panel-title")(4,"mat-icon",56),u(5,"tune"),c(),s(6,"span"),q(7,3),c()()(),s(8,"div",57)(9,"mat-form-field",58)(10,"mat-label"),q(11,4),c(),s(12,"mat-select",59),E("selectionChange",function(o){k(e);let a=x();return R(a.onScaleChange(o.value));}),be(13,Oee,2,2,"mat-option",60,rM),c(),s(15,"mat-hint"),u(16,"Maps requirement complexity to effort points"),c()(),S(17,Eee,16,6,"div",61),s(18,"mat-form-field",58)(19,"mat-label"),q(20,5),c(),s(21,"input",62),Mt("ngModelChange",function(o){k(e);let a=x();return St(a.params.dailyRate,o)||(a.params.dailyRate=o),R(o);}),c(),s(22,"mat-hint"),u(23,"Cost per man-day"),c()()(),s(24,"h4",63),u(25,"Direct Effort Split by Role"),c(),s(26,"div",64),be(27,Tee,4,2,"mat-form-field",58,sN),c(),S(29,Iee,5,1,"div",65),c(),s(30,"div",66)(31,"mat-icon",67),u(32,"assignment"),c(),s(33,"span",68),q(34,6),c(),s(35,"span",69),u(36),c()(),s(37,"mat-expansion-panel",55)(38,"mat-expansion-panel-header")(39,"mat-panel-title")(40,"mat-icon",56),u(41,"delivery_dining"),c(),s(42,"span"),q(43,7),c()(),s(44,"mat-panel-description"),u(45),c()(),s(46,"table",70)(47,"thead")(48,"tr")(49,"th",71),q(50,8),c(),s(51,"th",72),q(52,9),c(),s(53,"th",73),q(54,10),c(),s(55,"th",74),q(56,11),c()()(),s(57,"tbody"),be(58,kee,9,4,"tr",null,rN),c(),s(60,"tfoot")(61,"tr",75)(62,"td"),q(63,12),c(),s(64,"td",72)(65,"strong"),u(66),c()(),s(67,"td",73)(68,"strong"),u(69),c()(),s(70,"td",74)(71,"strong"),u(72),c()()()()()(),s(73,"div",66)(74,"mat-icon",76),u(75,"account_tree"),c(),s(76,"span",68),q(77,13),c(),s(78,"span",69),u(79),c()(),s(80,"mat-expansion-panel",55)(81,"mat-expansion-panel-header")(82,"mat-panel-title")(83,"mat-icon",56),u(84,"percent"),c(),s(85,"span"),q(86,14),c()(),s(87,"mat-panel-description"),u(88),c()(),s(89,"table",70)(90,"thead")(91,"tr")(92,"th",71),q(93,15),c(),s(94,"th",77),q(95,16),c(),s(96,"th",78),q(97,17),c(),s(98,"th",79),q(99,18),c(),s(100,"th",80),q(101,19),c(),s(102,"th",73),q(103,20),c(),s(104,"th",74),q(105,21),c(),ee(106,"th",81),c()(),s(107,"tbody"),be(108,Dee,28,12,"tr",null,sf().trackByIndex,!0),c(),s(110,"tfoot")(111,"tr",75)(112,"td",82),q(113,22),c(),s(114,"td",73)(115,"strong"),u(116),c()(),s(117,"td",74)(118,"strong"),u(119),c()(),ee(120,"td"),c()()(),s(121,"button",83),E("click",function(){k(e);let o=x();return R(o.addMacroCost());}),s(122,"mat-icon"),u(123,"add"),c(),s(124,"span"),q(125,23),c()()(),s(126,"div",66)(127,"mat-icon",84),u(128,"groups"),c(),s(129,"span",68),q(130,24),c()(),s(131,"mat-expansion-panel",55)(132,"mat-expansion-panel-header")(133,"mat-panel-title")(134,"mat-icon",56),u(135,"person"),c(),s(136,"span"),q(137,25),c()(),s(138,"mat-panel-description"),u(139),c()(),s(140,"table",70)(141,"thead")(142,"tr")(143,"th",71),q(144,26),c(),s(145,"th",73),q(146,27),c(),s(147,"th",73),q(148,28),c(),s(149,"th",73),q(150,29),c(),s(151,"th",74),q(152,30),c()()(),s(153,"tbody"),be(154,jee,15,5,"tr",null,yee),c(),s(156,"tfoot")(157,"tr",75)(158,"td"),q(159,31),c(),s(160,"td",73)(161,"strong"),u(162),c()(),s(163,"td",73)(164,"strong"),u(165),c()(),s(166,"td",73)(167,"strong"),u(168),c()(),s(169,"td",74)(170,"strong"),u(171),c()()()()()(),s(172,"div",66)(173,"mat-icon",85),u(174,"widgets"),c(),s(175,"span",68),q(176,32),c()(),s(177,"mat-expansion-panel",55)(178,"mat-expansion-panel-header")(179,"mat-panel-title")(180,"mat-icon",56),u(181,"account_tree"),c(),s(182,"span"),q(183,33),c()(),s(184,"mat-panel-description"),u(185),c()(),s(186,"table",86)(187,"thead")(188,"tr")(189,"th",87),q(190,34),c(),s(191,"th",72),u(192,"Req."),c(),s(193,"th",73),u(194,"Direct"),c(),s(195,"th",73),u(196,"Indirect"),c(),s(197,"th",73),u(198,"Total"),c(),s(199,"th",74),u(200,"Cost ($)"),c(),s(201,"th",88),u(202,"Team"),c(),s(203,"th",89),u(204,"Comment"),c()()(),s(205,"tbody"),be(206,Jee,22,19,"tr",90,sf().trackByKey,!0),c(),s(208,"tfoot")(209,"tr",75)(210,"td"),q(211,35),c(),s(212,"td",72)(213,"strong"),u(214),c()(),s(215,"td",73)(216,"strong"),u(217),c()(),s(218,"td",73)(219,"strong"),u(220),c()(),s(221,"td",73)(222,"strong"),u(223),c()(),s(224,"td",74)(225,"strong"),u(226),c()(),ee(227,"td")(228,"td"),c()()()(),s(229,"div",66)(230,"mat-icon",91),u(231,"groups"),c(),s(232,"span",68),q
595(233,36),c()(),s(234,"mat-expansion-panel",55)(235,"mat-expansion-panel-header")(236,"mat-panel-title")(237,"mat-icon",56),u(238,"supervised_user_circle"),c(),s(239,"span"),q(240,37),c()(),s(241,"mat-panel-description"),u(242),c()(),s(243,"table",86)(244,"thead")(245,"tr")(246,"th",87),q(247,38),c(),s(248,"th",73),q(249,39),c(),s(250,"th",73),q(251,40),c(),s(252,"th",73),q(253,41),c(),s(254,"th",74),q(255,42),c()()(),s(256,"tbody"),be(257,Zee,19,7,null,null,rN),c(),s(259,"tfoot")(260,"tr",75)(261,"td"),q(262,43),c(),s(263,"td",73)(264,"strong"),u(265),c()(),s(266,"td",73)(267,"strong"),u(268),c()(),s(269,"td",73)(270,"strong"),u(271),c()(),s(272,"td",74)(273,"strong"),u(274),c()()()()()();}if(n&2){let e=x();M(e.totalEffort>0?0:-1),m(),N("expanded",!1),m(11),N("value",e.params.selectedScaleId),m(),ye(e.availableScales),m(4),M(e.selectedScale?17:-1),m(4),wt("ngModel",e.params.dailyRate),m(6),ye(e.params.roleRates),m(2),M(e.getRoleRateSum()!==100?29:-1),m(7),_e("",e.formatNumber(e.totalDirectEffort)," pts"),m(),N("expanded",!0),m(8),Hn(" ",e.requirements.length," requirements \xB7 ",e.formatNumber(e.totalDirectEffort)," pts "),m(13),ye(e.directEffortByDelivery),m(8),G(e.requirements.length),m(3),G(e.formatNumber(e.totalDirectEffort)),m(3),G(e.formatCurrency(e.totalDirectEffort*e.params.dailyRate)),m(7),Hn("",e.formatNumber(e.totalIndirectEffort)," pts \xB7 ",e.formatPercent(e.getOverheadRatio())),m(),N("expanded",!0),m(8),Hn(" ",e.formatNumber(e.totalIndirectEffort)," pts \xB7 ",e.formatCurrency(e.totalIndirectEffort*e.params.dailyRate)," "),m(20),ye(e.macroCosts),m(8),G(e.formatNumber(e.totalIndirectEffort)),m(3),G(e.formatCurrency(e.totalIndirectEffort*e.params.dailyRate)),m(12),N("expanded",!0),m(8),_e(" ",e.roleBreakdown.length," roles "),m(15),ye(e.roleBreakdown),m(8),G(e.formatNumber(e.totalDirectEffort)),m(3),G(e.formatNumber(e.totalIndirectEffort)),m(3),G(e.formatNumber(e.totalEffort)),m(3),G(e.formatCurrency(e.totalCost)),m(6),N("expanded",!0),m(8),_e(" ",e.segmentRows.length," deliveries "),m(21),ye(e.visibleSegmentRows),m(8),G(e.requirements.length),m(3),G(e.formatNumber(e.totalDirectEffort)),m(3),G(e.formatNumber(e.totalIndirectEffort)),m(3),G(e.formatNumber(e.totalEffort)),m(3),G(e.formatCurrency(e.totalCost)),m(8),N("expanded",!0),m(8),_e(" ",e.deliveryTeamBreakdown.length," deliveries "),m(15),ye(e.deliveryTeamBreakdown),m(8),G(e.formatNumber(e.totalDirectEffort)),m(3),G(e.formatNumber(e.totalIndirectEffort)),m(3),G(e.formatNumber(e.totalEffort)),m(3),G(e.formatCurrency(e.totalCost));}}var Sv=class n{constructor(t,e,i,o){this.firebase=t;this.snackBar=e;this.roleService=i;this.teamService=o;this.macroCosts=this.getDefaultMacroCosts();}firebase;snackBar;roleService;teamService;projectId;costCalculated=new At();isLoading=!1;isLoadingScales=!1;noRequirements=!1;loaded=!1;availableScales=[];selectedScale;projectRoles=[];teams=[];params={dailyRate:800,selectedScaleId:"",roleRates:[]};requirements=[];componentMap=new Map();directEffortByDelivery=[];roleBreakdown=[];segmentRows=[];visibleSegmentRows=[];deliveryTeamBreakdown=[];totalDirectEffort=0;macroCosts=[];totalIndirectEffort=0;totalEffort=0;totalCost=0;ngOnChanges(t){t.projectId&&this.projectId&&(this.loaded=!1,this.loadAll());}ngOnDestroy(){}loadAll(){return $(this,null,function*(){this.isLoading=!0;try{yield Promise.all([this.loadScales(),this.loadRequirements(),this.loadSystemComponents(),this.loadRoles(),this.loadTeams()]),yield this.loadLatestEstimation();}catch(t){console.error("Error loading estimation data:",t);}finally{this.isLoading=!1;}});}loadScales(){return $(this,null,function*(){this.isLoadingScales=!0;try{let t=mt(we(this.firebase.firestore,"evaluationscales")),e=yield at(t);this.availableScales=e.docs.map(o=>X({id:o.id},o.data())).filter(o=>!o.target||o.target==="solution-requirement");let i=this.params.selectedScaleId;this.selectedScale=(i?this.availableScales.find(o=>o.id===i):void 0)||this.availableScales.find(o=>o.isDefault)||this.availableScales[0],this.selectedScale&&(this.params.selectedScaleId=this.selectedScale.id);}finally{this.isLoadingScales=!1;}});}loadRequirements(){return $(this,null,function*(){if(!this.projectId)return;let t=mt(we(this.firebase.firestore,`projects/${this.projectId}/solutionrequirements`)),e=yield at(t);this.requirements=e.docs.map(i=>X({id:i.id},i.data())),this.noRequirements=this.requirements.length===0;});}loadSystemComponents(){return $(this,null,function*(){let t=mt(we(this.firebase.firestore,"systemComponents")),e=yield at(t);this.componentMap.clear();for(let i of e.docs){let o=X({id:i.id},i.data());this.componentMap.set(o.id,o.name||"Unnamed Component");}});}loadRoles(){return $(this,null,function*(){this.projectRoles=yield this.roleService.getRolesOnce();});}loadTeams(){return $(this,null,function*(){this.teams=yield this.teamService.getTeamsOnce();});}loadLatestEstimation(){return $(this,null,function*(){if(!this.projectId)return;let t=mt(we(this.firebase.firestore,`projects/${this.projectId}/estimations`),Jt("createdAt","desc"),H_(1)),e=yield at(t);if(!e.empty){let i=e.docs[0].data();i.params&&(this.params=X(X({},this.params),i.params)),i.macroCosts&&i.macroCosts.length>0&&(this.macroCosts=i.macroCosts),i.segmentRows&&(this._savedSegmentRows=i.segmentRows),this.loaded=!0,this.availableScales.length>0&&(this.selectedScale=this.availableScales.find(o=>o.id===this.params.selectedScaleId)||this.availableScales[0]);}this.initializeRoleRates(),this.initializeMacroCostRoleIds(),this.recalculate();});}initializeMacroCostRoleIds(){for(let t of this.macroCosts)if(!t.roleId&&t.role){let e=this.projectRoles.find(i=>i.name.toLowerCase()===t.role.toLowerCase());e&&(t.roleId=e.id);}}initializeRoleRates(){if(!this.params.roleRates||this.params.roleRates.length===0)this.params.roleRates=this.projectRoles.map(t=>({roleId:t.id,roleName:t.name,rate:t.defaultRate||0}));else{let t=new Set(this.params.roleRates.map(e=>e.roleId));for(let e of this.projectRoles)t.has(e.id)||this.params.roleRates.push({roleId:e.id,roleName:e.name,rate:e.defaultRate||0});for(let e of this.params.roleRates){let i=this.projectRoles.find(o=>o.id===e.roleId);i&&(e.roleName=i.name);}}}_savedSegmentRows=[];onScaleChange(t){this.params.selectedScaleId=t,this.selectedScale=this.availableScales.find(e=>e.id===t),this.recalculate();}getDefaultMacroCosts(){return[{label:"Architecture & Technical Design",rate:12,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"Solution architecture, technical specifications, design reviews, POCs",ruleKey:"architecture",appliedOn:"direct",role:"Solution Architect",roleId:""},{label:"Project Management",rate:12,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"Planning, coordination, reporting, risk mgmt, stakeholder mgmt",ruleKey:"projectManagement",appliedOn:"direct",role:"Project Manager",roleId:""},{label:"QA Strategy & Oversight",rate:5,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"QA coordination, test strategy, test plan",ruleKey:"qaStrategy",appliedOn:"direct",role:"QA / Tester",roleId:""},{label:"DevOps / CI-CD / Environments",rate:7,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"Build pipelines, deployment automation, environment setup & maintenance",ruleKey:"devops",appliedOn:"direct",role:"DevOps Engineer",roleId:""},{label:"Documentation",rate:3,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"Technical docs, user guides, runbooks, API documentation",ruleKey:"documentation",appliedOn:"direct",role:"Developer",roleId:""},{label:"Integration & Deployment",rate:7,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"System integration, data migration, go-live support, cutover planning",ruleKey:"integration",appliedOn:"direct",role:"Developer",roleId:""},{label:"Training",rate:7.5,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"End-user and admin training programs",ruleKey:"training",appliedOn:"direct",role:"Trainer",roleId:""},{label:"Change Management",rate:10,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"Organizational change, communication plans, adoption support",ruleKey:"changeManagement",appliedOn:"direct",role:"Change Manager",roleId:""},{label:"Contingency",rate:15,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"Reserve for unknowns \u2014 applied on total (direct + indirect)",ruleKey:"contingency",appliedOn:"total",role:"",roleId:""}];}addMacroCost(){this.macroCosts.push({label:"New Overhead Item",rate:0,autoCalc:!0,computedEffort:0,overrideEffort:0,description:"",ruleKey:"",appliedOn:"direct",role:"",roleId:""});}onMacroRoleChange(t,e){t.roleId=e;let i=this.projectRoles.find(o=>o.id===e);t.role=i?.name||"";}removeMacroCost(t){this.macroCosts.splice(t,1),this.recalculate();}recalculate(){if(!this.selectedScale)return;let t={E:this.selectedScale.E||0,XS:this.selectedScale.XS||0,S:this.selectedScale.S||0,M:this.selectedScale.M||0,L:this.selectedScale.L||0,XL:this.selectedScale.XL||0,N:this.selectedScale.N||0},e=Object.fromEntries(eu.map(l=>[l.value,l.label])),i=new Map();for(let l of this.requirements){let p=l.delivery||"Unassigned",d=t[l.complexity||""]||0;i.has(p)||i.set(p,{effort:0,count:0});let f=i.get(p);f.effort+=d,f.count+=1;}let o=Array.from(i.keys()).sort((l,p)=>{let d=parseInt(l.replace("D",""),10),f=parseInt(p.replace("D",""),10);return isNaN(d)&&isNaN(f)?l.localeCompare(p):isNaN(d)?1:isNaN(f)?-1:d-f;});
595this.directEffortByDelivery=o.map(l=>({delivery:e[l]||l,effortPoints:i.get(l).effort,requirementCount:i.get(l).count})),this.totalDirectEffort=this.directEffortByDelivery.reduce((l,p)=>l+p.effortPoints,0);let a=0;for(let l of this.macroCosts)l.appliedOn==="direct"&&(l.computedEffort=this.totalDirectEffort*(l.rate/100),a+=l.autoCalc?l.computedEffort:l.overrideEffort||0);let r=this.totalDirectEffort+a;for(let l of this.macroCosts)l.appliedOn==="total"&&(l.computedEffort=r*(l.rate/100));this.totalIndirectEffort=this.macroCosts.reduce((l,p)=>l+this.getEffectiveMacroEffort(p),0),this.totalEffort=this.totalDirectEffort+this.totalIndirectEffort,this.totalCost=this.totalEffort*(this.params.dailyRate||0),this.calculateRoleBreakdown(),this.calculateSegmentRows(t),this.calculateTeamBreakdown(),this.costCalculated.emit({totalProjectCost:this.totalCost,dailyRate:this.params.dailyRate});}calculateRoleBreakdown(){let t=new Map(),e=(i,o,a)=>{t.has(i)||t.set(i,{direct:0,indirect:0});let r=t.get(i);r.direct+=o,r.indirect+=a;};for(let i of this.params.roleRates){let o=this.totalDirectEffort*(i.rate/100);e(i.roleName,o,0);}for(let i of this.macroCosts){let o=this.getEffectiveMacroEffort(i);e(i.role||i.label,0,o);}this.roleBreakdown=Array.from(t.entries()).map(([i,o])=>({role:i,directEffort:o.direct,indirectEffort:o.indirect,totalEffort:o.direct+o.indirect,totalCost:(o.direct+o.indirect)*(this.params.dailyRate||0)})).sort((i,o)=>o.totalEffort-i.totalEffort);}calculateSegmentRows(t){let e=Object.fromEntries(eu.map(r=>[r.value,r.label])),i=new Map();for(let r of this.requirements){let l=r.delivery||"Unassigned",p=t[r.complexity||""]||0,d=r.deployableComponents&&r.deployableComponents.length>0?r.deployableComponents:["__unassigned__"];i.has(l)||i.set(l,new Map());let f=i.get(l),h=p/d.length;for(let g of d){f.has(g)||f.set(g,{effort:0,count:0});let b=f.get(g);b.effort+=h,b.count+=1;}}let o=Array.from(i.keys()).sort((r,l)=>{let p=parseInt(r.replace("D",""),10),d=parseInt(l.replace("D",""),10);return isNaN(p)&&isNaN(d)?r.localeCompare(l):isNaN(p)?1:isNaN(d)?-1:p-d;}),a=[];for(let r of o){let l=i.get(r),p=Array.from(l.values()).reduce((w,T)=>w+T.effort,0),d=this.totalDirectEffort>0?p/this.totalDirectEffort*this.totalIndirectEffort:0,f=p+d,h=Array.from(l.values()).reduce((w,T)=>w+T.count,0),g={level:1,key:`d_${r}`,delivery:e[r]||r,requirementCount:h,directEffort:p,indirectEffort:d,totalEffort:f,cost:f*(this.params.dailyRate||0),assignedTeamId:"",autoAssignedTeamId:"",comment:"",expanded:!0,children:[]},b=Array.from(l.entries()).sort((w,T)=>T[1].effort-w[1].effort);for(let[w,T]of b){let O=w==="__unassigned__"?"Undefined component":this.componentMap.get(w)||"Unknown",V=this.totalDirectEffort>0?T.effort/this.totalDirectEffort*this.totalIndirectEffort:0,j=T.effort+V,L={level:2,key:`d_${r}_c_${w}`,delivery:e[r]||r,componentId:w,componentName:O,requirementCount:T.count,directEffort:T.effort,indirectEffort:V,totalEffort:j,cost:j*(this.params.dailyRate||0),assignedTeamId:"",autoAssignedTeamId:"",comment:"",expanded:!0,children:[]};for(let A of this.params.roleRates){let J=T.effort*(A.rate/100),Q=V*(A.rate/100),te=J+Q,U=this.teamService.findBestTeam(this.teams,w,A.roleId),ce={level:3,key:`d_${r}_c_${w}_r_${A.roleId}`,delivery:e[r]||r,componentId:w,componentName:O,roleId:A.roleId,roleName:A.roleName,directEffort:J,indirectEffort:Q,totalEffort:te,cost:te*(this.params.dailyRate||0),assignedTeamId:"",autoAssignedTeamId:U?.id||"",comment:"",expanded:!1};L.children.push(ce);}g.children.push(L);}a.push(g);}this.restoreSegmentOverrides(a),this.segmentRows=a,this.rebuildVisibleRows();}restoreSegmentOverrides(t){let e=new Map(),i=a=>{e.set(a.key,a),a.children?.forEach(i);};this._savedSegmentRows.forEach(i);let o=a=>{let r=e.get(a.key);r&&(a.assignedTeamId=r.assignedTeamId||"",a.comment=r.comment||""),!a.assignedTeamId&&a.autoAssignedTeamId&&(a.assignedTeamId=a.autoAssignedTeamId),a.children?.forEach(o);};t.forEach(o);}rebuildVisibleRows(){let t=[],e=i=>{for(let o of i)t.push(o),o.expanded&&o.children&&e(o.children);};e(this.segmentRows),this.visibleSegmentRows=t;}toggleRow(t){t.expanded=!t.expanded,this.rebuildVisibleRows();}calculateTeamBreakdown(){let t=new Map(),e=r=>{for(let l of r){if(l.level===3){let p=l.delivery||"Unassigned",d=l.assignedTeamId||"__unassigned__",f=l.roleId||"__unknown__";t.has(p)||t.set(p,new Map());let h=t.get(p);h.has(d)||h.set(d,new Map());let g=h.get(d);g.has(f)||g.set(f,{roleName:l.roleName||"",direct:0,indirect:0,total:0,cost:0});let b=g.get(f);b.direct+=l.directEffort,b.indirect+=l.indirectEffort,b.total+=l.totalEffort,b.cost+=l.cost;}l.children&&e(l.children);}};e(this.segmentRows);let i=new Map(),o=new Map();for(let r of this.deliveryTeamBreakdown){i.set(r.delivery,r.expanded);
595for(let l of r.teams)o.set(`${r.delivery}__${l.teamId}`,l.expanded);}let a=[];for(let[r,l]of t){let p=[];for(let[d,f]of l){let h=d==="__unassigned__"?"Unassigned":this.getTeamName(d)||d,g=Array.from(f.entries()).map(([b,w])=>({roleId:b,roleName:w.roleName,directEffort:w.direct,indirectEffort:w.indirect,totalEffort:w.total,cost:w.cost})).sort((b,w)=>w.totalEffort-b.totalEffort);p.push({teamId:d,teamName:h,directEffort:g.reduce((b,w)=>b+w.directEffort,0),indirectEffort:g.reduce((b,w)=>b+w.indirectEffort,0),totalEffort:g.reduce((b,w)=>b+w.totalEffort,0),cost:g.reduce((b,w)=>b+w.cost,0),roles:g,expanded:o.get(`${r}__${d}`)??!0});}p.sort((d,f)=>f.totalEffort-d.totalEffort),a.push({delivery:r,directEffort:p.reduce((d,f)=>d+f.directEffort,0),indirectEffort:p.reduce((d,f)=>d+f.indirectEffort,0),totalEffort:p.reduce((d,f)=>d+f.totalEffort,0),cost:p.reduce((d,f)=>d+f.cost,0),teams:p,expanded:i.get(r)??!0});}this.deliveryTeamBreakdown=a;}toggleDeliveryRow(t){t.expanded=!t.expanded;}toggleTeamRow(t){t.expanded=!t.expanded;}getTeamName(t){return t?this.teams.find(e=>e.id===t)?.name||t:"";}getEffectiveMacroEffort(t){return t.autoCalc?t.computedEffort:t.overrideEffort||0;}getEffectiveMacroCost(t){return this.getEffectiveMacroEffort(t)*(this.params.dailyRate||0);}getRoleRateSum(){return this.params.roleRates.reduce((t,e)=>t+(e.rate||0),0);}save(){return $(this,null,function*(){if(!this.projectId)return;let t=o=>o.map(a=>Ve(X({},a),{children:a.children?t(a.children):[]})),e={params:Ve(X({},this.params),{roleRates:this.params.roleRates.map(o=>X({},o))}),macroCosts:this.macroCosts.map(o=>X({},o)),directEffortByDelivery:this.directEffortByDelivery.map(o=>X({},o)),roleBreakdown:this.roleBreakdown.map(o=>X({},o)),segmentRows:t(this.segmentRows),totalDirectEffort:this.totalDirectEffort,totalIndirectEffort:this.totalIndirectEffort,totalEffort:this.totalEffort,totalCost:this.totalCost,createdAt:Rn.now()},i=we(this.firebase.firestore,`projects/${this.projectId}/estimations`);yield Ht(i,ts.stripUndefined(e)),yield this.pruneHistory(),this.snackBar.open("Estimation saved.","",{duration:2e3});});}pruneHistory(){return $(this,null,function*(){if(!this.projectId)return;let t=mt(we(this.firebase.firestore,`projects/${this.projectId}/estimations`),Jt("createdAt","desc")),e=yield at(t);if(e.docs.length>10){let i=e.docs.slice(10);for(let o of i)yield no(ge(this.firebase.firestore,`projects/${this.projectId}/estimations`,o.id));}});}formatCurrency(t){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(t);}formatNumber(t){return new Intl.NumberFormat("en-US",{maximumFractionDigits:1}).format(t);}formatPercent(t){return t.toFixed(1)+"%";}getOverheadRatio(){return this.totalDirectEffort>0?this.totalIndirectEffort/this.totalDirectEffort*100:0;}trackByIndex(t){return t;}trackByKey(t,e){return e.key;}static ɵfac=function(e){return new(e||n)(le(On),le(Bt),le(zc),le(Fd));};static ɵcmp=Te({type:n,selectors:[["app-project-costs"]],inputs:{projectId:"projectId"},outputs:{costCalculated:"costCalculated"},features:[ki],decls:15,vars:4,consts:()=>{let t;t="Recalculate estimation from requirements and overhead rates";let e;e="Save estimation snapshot";let i;i="Calculate";let o;o="Save";let a;a="No solution requirements found for this project. Add requirements via Business Process tasks first.";let r;r="Parameters & Scale";let l;l="Evaluation Scale (Micro)";let p;p="Daily Rate ($)";let d;d="Direct Effort (from Requirements)";let f;f="Effort by Delivery";let h;h="Delivery";let g;g="Req.";let b;b="Effort (pts)";let w;w="Cost ($)";let T;T="Total Direct Effort";let O;O="Indirect Costs (Overhead Rates)";let V;V="Overhead Rate Schedule (Macro)";let j;j="Item";let L;L="Role";let A;A="Rate (%)";let J;J="Applied On";let Q;Q="Auto";let te;te="Effort (pts)";let U;U="Cost ($)";let ce;ce="Total Indirect Effort";let W;W="Add Overhead Line";let Y;Y="Effort by Role";let se;se="Role Effort Breakdown";let de;de="Role";let Ae;Ae="Direct (pts)";let rt;rt="Indirect (pts)";let et;et="Total (pts)";let pt;pt="Cost ($)";let ft;ft="Total";let je;je="Effort Segmentation";let ke;ke="Delivery \u2192 Component \u2192 Role Breakdown";let Ke;Ke="Segment";let ve;ve="Grand Total";let Se;Se="Effort by Team";let Be;Be="Delivery \u2192 Team \u2192 Role Breakdown";let Ze;Ze="Delivery / Team / Role";let kt;kt="Direct";let Z;Z="Indirect";let D;D="Total";let F;F="Cost ($)";let fe;fe="Grand Total";let he;he="Direct Effort";let xe;xe="Indirect Effort";let nt;nt="Total Effort";let Je;Je="Total Project Cost";let Ge;return Ge="Remove",[i,o,a,r,l,p,d,f,h,g,b,w,T,O,V,j,L,A,J,Q,te,U,ce,W,Y,se,de,Ae,rt,et,pt,ft,je,ke,Ke,ve,Se,Be,Ze,kt,Z,D,F,fe,he,xe,nt,Je,[1,"estimation-container"],[1,"estimation-action-bar"],["mat-flat-button","","color","primary","matTooltip",t,3,"click"],["mat-stroked-button","","matTooltip",e,3,"click","disabled"],[1,"estimation-loading"],[1,"estimation-no-data"],[1,"kpi-grid"],[1,"estimation-section",3,"expanded"],[1,"section-icon"],[1,"params-grid"],["appearance","fill"],[3,"selectionChange","value"],[3,"value"],[1,"scale-preview"],["matInput","","type","number","min","0",3,"ngModelChange","ngModel"],[1,"params-subtitle"],[1,"role-rates-grid"],[1,"rate-warning"],[1,"estimation-section-header"],[1,"section-icon","direct-icon"],[1,"section-title"],[1,"section-total"],[1,"estimation-table"],[1,"col-label"],[1,"col-count"],[1,"col-effort"],[1,"col-cost"],[1,"subtotal-row"],[1,"section-icon","indirect-icon"],[1,"col-role"],[1,"col-rate"],[1,"col-applied"],[1,"col-auto"],[1,"col-actions"],["colspan","5"],["mat-stroked-button","",1,"add-btn",3,"click"],[1,"section-icon","role-icon"],[1,"section-icon","component-icon"],[1,"estimation-table","segment-table"],[1,"col-tree"],[1,"col-team"],[1,"col-comment"],[3,"level-1","level-2","level-3"],[1,"section-icon","team-icon"],[1,"kpi-card"],[1,"kpi-label"],[1,"kpi-value"],[1,"kpi-unit"],[1,"kpi-value","kpi-highlight"],[1,"scale-preview-title"],[1,"scale-values"],[1,"scale-chip"],["matInput","","type","number","min","0","max","100","step","1",3,"ngModelChange","ngModel"],["placeholder","Cost item",1,"inline-input","label-input",3,"ngModelChange","ngModel"],[1,"description-hint"],[1,"inline-select","role-select",3,"ngModelChange","ngModel"],["value",""],["type","number","min","0","max","100","step","0.5","placeholder","0",1,"inline-input","rate-input",3,"ngModelChange","ngModel"],[1,"applied-badge"],["matTooltip","Auto-calculate from rate",3,"ngModelChange","ngModel"],[1,"effective-amount"],["type","number","min","0","placeholder","0",1,"inline-input","effort-input",3,"ngModel"],["mat-icon-button","","matTooltip",Ge,1,"remove-btn",3,"click"],["type","number","min","0","placeholder","0",1,"inline-input","effort-input",3,"ngModelChange","ngModel"],[1,"segment-icon","role-icon"],[1,"tree-indent"],["mat-icon-button","",1,"tree-toggle"],["placeholder","Comment...",1,"inline-input","comment-input",3,"ngModelChange","ngModel"],["mat-icon-button","",1,"tree-toggle",3,"click"],[1,"tree-icon"],[1,"segment-icon","delivery-icon"],[1,"segment-icon"],[1,"role-label"],[1,"inline-select","team-select",3,"ngModelChange","ngModel"],[1,"auto-hint",3,"matTooltip"],[1,"level-1"],[1,"tree-indent",2,"padding-left","0"],[1,"level-2"],[1,"tree-indent",2,"padding-left","20px"],[1,"segment-icon","team-icon"],[1,"level-3"],[1,"tree-indent",2,"padding-left","40px"]];},template:function(e,i){e&1&&(s(0,"div",48)(1,"div",49)(2,"button",50),E("click",function(){return i.recalculate();}),s(3,"mat-icon"),u(4,"calculate"),c(),s(5,"span"),q(6,0),c()(),s(7,"button",51),E("click",function(){return i.save();}),s(8,"mat-icon"),u(9,"save"),c(),s(10,"span"),q(11,1),c()()(),S(12,wee,2,0,"div",52),S(13,See,5,0,"div",53),S(14,Qee,275,39),c()),e&2&&(m(7),N("disabled",!i.projectId),m(5),M(i.isLoading?12:-1),m(),M(!i.isLoading&&i.noRequirements?13:-1),m(),M(i.isLoading?-1:14));},dependencies:[ut,gn,P3,w3,Ft,Ea,y3,Tt,Qr,P1,Po,$e,Qe,Qt,We,Xe,Gt,Vt,Wt,Ki,jt,Xt,gr,fr,hr,_r,wl,$t,_n,bi,So,Ei,ra,xr,Ua],styles:[".estimation-container[_ngcontent-%COMP%]{padding:16px;max-width:100%;overflow-y:auto}
595.estimation-action-bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:12px;margin-bottom:20px;align-items:center}.estimation-loading[_ngcontent-%COMP%]{padding:24px;text-align:center;color:#666;font-style:italic}.estimation-no-data[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 16px;background:#e3f2fd;border:1px solid rgba(25,118,210,.2);border-radius:8px;color:#1565c0;font-size:13px;margin-bottom:16px}.estimation-no-data[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;flex-shrink:0}.estimation-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:20px 0 8px;padding:4px 0}.section-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;margin-right:4px}.direct-icon[_ngcontent-%COMP%]{color:#1565c0}.indirect-icon[_ngcontent-%COMP%]{color:#e65100}.role-icon[_ngcontent-%COMP%]{color:#6a1b9a}.component-icon[_ngcontent-%COMP%]{color:#00695c}.results-icon[_ngcontent-%COMP%]{color:#1e88e5}.section-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#333}.section-total[_ngcontent-%COMP%]{margin-left:auto;font-size:14px;font-weight:600;color:#555;background:#f5f5f5;padding:2px 10px;border-radius:12px}.estimation-section[_ngcontent-%COMP%]{margin-bottom:10px} .estimation-container .mat-expansion-panel{margin-bottom:10px;border-radius:10px!important;border:1px solid rgba(0,0,0,.07)!important;box-shadow:none!important} .estimation-container .mat-expansion-panel:before{display:none} .estimation-container .mat-expansion-panel-header{padding:0 16px;min-height:54px} .estimation-container .mat-expansion-panel-body{padding:0 16px 16px}.params-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;padding:8px 0}.params-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.scale-preview[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:8px 0;align-self:center}.scale-preview-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#666}.scale-values[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px}.scale-chip[_ngcontent-%COMP%]{display:inline-block;background:#e8eaf6;color:#283593;padding:2px 10px;border-radius:12px;font-size:12px;font-weight:600}.rate-warning[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:8px 12px;margin-top:8px;background:#fff3e0;border:1px solid #ffcc80;border-radius:6px;color:#e65100;font-size:13px}.rate-warning[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e65100;font-size:18px;width:18px;height:18px}.estimation-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:12px}.estimation-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:8px 6px;font-weight:600;color:#666;border-bottom:2px solid #e0e0e0;font-size:11px;text-transform:uppercase;letter-spacing:.5px}.estimation-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:6px;border-bottom:1px solid #f0f0f0;vertical-align:top}.estimation-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#fafafa}.col-label[_ngcontent-%COMP%]{min-width:180px;max-width:280px}.col-count[_ngcontent-%COMP%]{width:60px;text-align:center}.col-effort[_ngcontent-%COMP%]{width:110px;text-align:right}.col-cost[_ngcontent-%COMP%]{width:120px;text-align:right}.col-rate[_ngcontent-%COMP%]{width:80px}.col-role[_ngcontent-%COMP%]{width:140px}.col-applied[_ngcontent-%COMP%]{width:80px;text-align:center}.col-auto[_ngcontent-%COMP%]{width:50px;text-align:center}.col-actions[_ngcontent-%COMP%]{width:40px;text-align:center}.inline-input[_ngcontent-%COMP%]{border:1px solid transparent;background:transparent;padding:4px 6px;border-radius:4px;font-size:13px;transition:border-color .2s}.inline-input[_ngcontent-%COMP%]:hover{border-color:#ccc}.inline-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#1976d2;background:#fff}.inline-input[_ngcontent-%COMP%]:disabled{color:#999;background:#f5f5f5}.label-input[_ngcontent-%COMP%]{width:100%;font-weight:500}.role-input[_ngcontent-%COMP%]{width:120px}.rate-input[_ngcontent-%COMP%]{width:60px;text-align:right}.effort-input[_ngcontent-%COMP%]{width:90px;text-align:right}.description-hint[_ngcontent-%COMP%]{display:block;font-size:11px;color:#999;margin-top:2px;padding-left:6px}
595.effective-amount[_ngcontent-%COMP%]{font-weight:500;color:#333}.applied-badge[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:500;white-space:nowrap}.applied-direct[_ngcontent-%COMP%]{background:#e3f2fd;color:#1565c0}.applied-total[_ngcontent-%COMP%]{background:#fff3e0;color:#e65100}.subtotal-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-top:10px;border-top:2px solid #e0e0e0;border-bottom:none;font-weight:600;font-size:14px}.add-btn[_ngcontent-%COMP%]{margin-top:8px;font-size:12px}.add-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.remove-btn[_ngcontent-%COMP%]{opacity:.4;transition:opacity .2s}.remove-btn[_ngcontent-%COMP%]:hover{opacity:1;color:#e53935}.remove-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.kpi-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px;animation:_ngcontent-%COMP%_fadeIn .3s ease-in}@media(max-width:700px){.kpi-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.kpi-card[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:10px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}.kpi-label[_ngcontent-%COMP%]{font-size:.72em;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#00000073}.kpi-value[_ngcontent-%COMP%]{font-size:1.6em;font-weight:700;line-height:1.1;color:#000000d1}.kpi-highlight[_ngcontent-%COMP%]{color:#1976d2}.kpi-unit[_ngcontent-%COMP%]{font-size:.72em;color:#00000073}.params-subtitle[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#555;margin:12px 0 4px}.role-rates-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;padding:4px 0 8px}.role-rates-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.segment-table[_ngcontent-%COMP%] .col-tree[_ngcontent-%COMP%]{min-width:260px;max-width:400px}.segment-table[_ngcontent-%COMP%] .col-team[_ngcontent-%COMP%]{width:170px;white-space:nowrap}.segment-table[_ngcontent-%COMP%] .col-comment[_ngcontent-%COMP%]{min-width:160px;max-width:260px}.tree-indent[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:2px}.tree-toggle[_ngcontent-%COMP%]{width:24px!important;height:24px!important;line-height:24px!important;padding:0!important}.tree-toggle[_ngcontent-%COMP%] .tree-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#888}.segment-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;margin-right:4px;vertical-align:middle}.delivery-icon[_ngcontent-%COMP%]{color:#1565c0}.role-label[_ngcontent-%COMP%]{font-style:italic;color:#666}.level-1[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#e8eaf6;font-weight:600;border-bottom:1px solid #c5cae9}.level-2[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#f5f5f5;font-weight:500}.level-3[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{background-color:#fff;color:#555;font-size:12px}.inline-select[_ngcontent-%COMP%]{border:1px solid #e0e0e0;background:#fff;padding:3px 6px;border-radius:4px;font-size:12px;max-width:150px;cursor:pointer;transition:border-color .2s}.inline-select[_ngcontent-%COMP%]:hover{border-color:#999}.inline-select[_ngcontent-%COMP%]:focus{outline:none;border-color:#1976d2}.team-select.auto-assigned[_ngcontent-%COMP%]{border-color:#81c784;background:#f1f8e9}.auto-hint[_ngcontent-%COMP%]{font-size:14px!important;width:14px!important;height:14px!important;color:#ff9800;vertical-align:middle;margin-left:4px;cursor:help}.comment-input[_ngcontent-%COMP%]{width:100%;min-width:120px;font-size:12px;color:#555}.undefined-component-icon[_ngcontent-%COMP%]{color:#9e9e9e}.undefined-component[_ngcontent-%COMP%]{font-style:italic;color:#9e9e9e}"]});};var ete=["roiChart"],sM=(n,t)=>t.value,tte=(n,t)=>t.year,nte=(n,t)=>t.id;function ite(n,t){if(n&1){let e=oe();s(0,"div",67)(1,"span",115),q(2,40),c(),s(3,"mat-button-toggle-group",116),Mt("ngModelChange",function(o){k(e);let a=x();return St(a.effortSource,o)||(a.effortSource=o),R(o);}),E("change",function(){k(e);let o=x();return R(o.onEffortSourceChange());}),s(4,"mat-button-toggle",117),Wr(5,41),ee(6,"mat-icon"),Xr(),c(),s(7,"mat-button-toggle",118),Wr(8,42),ee(9,"mat-icon"),Xr(),c()()();}if(n&2){let e=x();m(3),wt("ngModel",e.effortSource);}}function ote(n,t){n&1&&(s(0,"div",70)(1,"mat-icon"),u(2,"info"),
595c(),s(3,"span"),q(4,43),c()());}function ate(n,t){n&1&&(s(0,"div",70)(1,"mat-icon"),u(2,"info"),c(),s(3,"span"),q(4,44),c()());}function rte(n,t){if(n&1&&(s(0,"tr")(1,"td"),u(2),c(),s(3,"td",128),u(4),c(),s(5,"td",129),u(6),c(),s(7,"td"),u(8),c(),s(9,"td")(10,"strong"),u(11),c()()()),n&2){let e=t.$implicit,i=x(2);Ue("break-even-row",e.cumulativeCashFlow>=0&&e.year>0),m(2),G(e.year),m(2),G(i.formatCurrency(e.costs)),m(2),G(i.formatCurrency(e.benefits)),m(),Ue("amount-positive",e.netCashFlow>=0)("amount-negative",e.netCashFlow<0),m(),_e(" ",i.formatCurrency(e.netCashFlow)," "),m(),Ue("amount-positive",e.cumulativeCashFlow>=0)("amount-negative",e.cumulativeCashFlow<0),m(2),G(i.formatCurrency(e.cumulativeCashFlow));}}function ste(n,t){if(n&1&&(s(0,"div",119)(1,"div",120)(2,"div",121),q(3,45),c(),s(4,"div",122),u(5),c(),s(6,"div",123),u(7,"= (Benefits \u2212 Costs) / Costs"),c()(),s(8,"div",120)(9,"div",121),q(10,46),c(),s(11,"div",122),u(12),c(),s(13,"div",123),u(14),c()(),s(15,"div",120)(16,"div",121),q(17,47),c(),s(18,"div",122),u(19),c(),s(20,"div",123),u(21,"When cumulative benefits exceed costs"),c()(),s(22,"div",120)(23,"div",121),q(24,48),c(),s(25,"div",122),u(26),c(),s(27,"div",123),u(28,"Rate that makes NPV = 0"),c()()(),s(29,"div",124),ee(30,"canvas",null,0),c(),s(32,"mat-expansion-panel",125)(33,"mat-expansion-panel-header")(34,"mat-panel-title")(35,"mat-icon",72),u(36,"table_chart"),c(),s(37,"span"),q(38,49),c()()(),s(39,"table",126)(40,"thead")(41,"tr")(42,"th"),q(43,50),c(),s(44,"th"),q(45,51),c(),s(46,"th"),q(47,52),c(),s(48,"th"),q(49,53),c(),s(50,"th"),q(51,54),c()()(),s(52,"tbody"),be(53,rte,12,15,"tr",127,tte),c()()()),n&2){let e=x();m(4),Ue("kpi-positive",e.results.simpleRoi>0)("kpi-negative",e.results.simpleRoi<=0),m(),_e(" ",e.formatPercent(e.results.simpleRoi)," "),m(6),Ue("kpi-positive",e.results.npv>0)("kpi-negative",e.results.npv<=0),m(),_e(" ",e.formatCurrency(e.results.npv)," "),m(2),Hn("Nominal discount: ",e.data.formulaParams.discountRate,"% \xB7 Inflation: ",e.data.formulaParams.inflationRate,"%"),m(4),Ue("kpi-positive",e.results.paybackPeriod!==null&&e.results.paybackPeriod<=e.data.formulaParams.analysisHorizon)("kpi-negative",e.results.paybackPeriod===null),m(),_e(" ",e.formatYears(e.results.paybackPeriod)," "),m(6),Ue("kpi-positive",e.results.irr!==null&&e.results.irr>0)("kpi-negative",e.results.irr===null||e.results.irr<=0),m(),_e(" ",e.formatPercent(e.results.irr)," "),m(6),N("expanded",!1),m(21),ye(e.results.yearlyData);}}function lte(n,t){if(n&1){let e=oe();s(0,"mat-checkbox",137),Mt("ngModelChange",function(o){k(e);let a=x().$implicit;return St(a.autoCalc,o)||(a.autoCalc=o),R(o);}),E("change",function(){k(e);let o=x(2);return R(o.debounceSaveData());}),c();}if(n&2){let e=x().$implicit;wt("ngModel",e.autoCalc);}}function cte(n,t){if(n&1&&(s(0,"span",135),u(1),c()),n&2){let e=x().$implicit,i=x();N("matTooltip",i.getRuleDescription(e.ruleKey)),m(),Hn(" ",i.getRuleDescription(e.ruleKey),": ",i.getRuleValue(e.ruleKey),"% ");}}function pte(n,t){if(n&1){let e=oe();s(0,"tr")(1,"td",87)(2,"input",130),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.label,o)||(a.label=o),R(o);}),E("input",function(){k(e);let o=x();return R(o.debounceSaveData());}),c(),s(3,"span",131),u(4),c()(),s(5,"td",88)(6,"input",132),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.amount,o)||(a.amount=o),R(o);}),E("input",function(){k(e);let o=x();return R(o.debounceSaveData());}),c()(),s(7,"td",89),S(8,lte,1,1,"mat-checkbox",133),c(),s(9,"td",90)(10,"span",134),u(11),c()(),s(12,"td",91),S(13,cte,2,3,"span",135),c(),s(14,"td",92)(15,"button",136),E("click",function(){let o=k(e).$index,a=x();return R(a.removeInitialCost(o));}),s(16,"mat-icon"),u(17,"close"),c()()()();}if(n&2){let e=t.$implicit,i=x();m(2),wt("ngModel",e.label),m(2),G(e.description),m(2),wt("ngModel",e.amount),N("disabled",e.autoCalc&&e.ruleKey!==""),m(2),M(e.ruleKey?8:-1),m(3),G(i.formatCurrency(i.getEffectiveCostAmount(e))),m(2),M(e.autoCalc&&e.ruleKey?13:-1);}}function dte(n,t){if(n&1){let e=oe();s(0,"mat-checkbox",137),Mt("ngModelChange",function(o){k(e);let a=x().$implicit;return St(a.autoCalc,o)||(a.autoCalc=o),R(o);}),E("change",function(){k(e);let o=x(2);return R(o.debounceSaveData());}),c();}if(n&2){let e=x().$implicit;wt("ngModel",e.autoCalc);}}function mte(n,t){if(n&1&&(s(0,"span",135),u(1),c()),n&2){let e=x().$implicit,i=x();N("matTooltip",i.getRuleDescription(e.ruleKey)),m(),Hn(" ",i.getRuleDescription(e.ruleKey),": ",i.getRuleValue(e.ruleKey),"% ");}}function ute(n,t){if(n&1){let e=oe();s(0,"tr")(1,"td",87)(2,"input",130),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.label,o)||(a.label=o),R(o);}),E("input",function(){k(e);let o=x();return R(o.debounceSaveData());}),c(),s(3,"span",131),u(4),c()(),s(5,"td",88)(6,"input",132),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.amount,o)||(a.amount=o),R(o);}),E("input",function(){k(e);let o=x();return R(o.debounceSaveData());}),c()(),s(7,"td",89),S(8,dte,1,1,"mat-checkbox",133),c(),s(9,"td",90)(10,"span",134),u(11),c()(),s(12,"td",91),S(13,mte,2,3,"span",135),c(),s(14,"td",92)(15,"button",138),E("click",function(){let o=k(e).$index,a=x();return R(a.removeRecurringCost(o));}),s(16,"mat-icon"),u(17,"close"),c()()()();}if(n&2){let e=t.$implicit,i=x();m(2),wt("ngModel",e.label),m(2),G(e.description),m(2),wt("ngModel",e.amount),N("disabled",e.autoCalc&&e.ruleKey!==""),m(2),M(e.ruleKey?8:-1),m(3),G(i.formatCurrency(i.getEffectiveRecurringCostAmount(e))),m(2),M(e.autoCalc&&e.ruleKey?13:-1);}}function fte(n,t){if(n&1&&(s(0,"span",98),u(1),c()),n&2){let e=x();m(),_e("",e.strategicBenefitTypes.length," type(s)");}}function hte(n,t){if(n&1&&(s(0,"span",99),u(1),Zn(2,"titlecase"),c()),n&2){let e=x();m(),G(yo(2,1,e.strategicBenefitMagnitude));}}function _te(n,t){if(n&1&&(s(0,"span",100),u(1),Zn(2,"titlecase"),c()),n&2){let e=x();m(),G(yo(2,1,e.strategicUrgencyLevel));}}function gte(n,t){n&1&&(s(0,"mat-icon",140),u(1,"check"),c());}function xte(n,t){if(n&1){let e=oe();s(0,"button",139),E("click",function(){let o=k(e).$implicit,a=x();return R(a.toggleBenefitType(o.value));}),S(1,gte,2,0,"mat-icon",140),u(2),c();}if(n&2){let e=t.$implicit,i=x();Ue("benefit-chip-btn--selected",i.isBenefitTypeSelected(e.value)),m(),M(i.isBenefitTypeSelected(e.value)?1:-1),m(),_e(" ",e.label," ");}}function Cte(n,t){if(n&1&&(s(0,"mat-button-toggle",107),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),G(e.label);}}function vte(n,t){if(n&1&&(s(0,"mat-button-toggle",107),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),G(e.label);}}function bte(n,t){n&1&&(s(0,"mat-icon",140),u(1,"check"),c());}function yte(n,t){if(n&1){let e=oe();s(0,"button",144),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.toggleThemeLink(o.id));}),S(1,bte,2,0,"mat-icon",140),u(2),c();}if(n&2){let e=t.$implicit,i=x(2);Ue("theme-chip-btn--linked",i.isThemeLinked(e.id)),m(),M(i.isThemeLinked(e.id)?1:-1),m(),_e(" ",e.name," ");}}function Pte(n,t){if(n&1&&(s(0,"div",101)(1,"div",141),q(2,55),c(),s(3,"div",142),be(4,yte,3,4,"button",143,nte),c()()),n&2){let e=x();m(4),ye(e.availableThemes);}}function wte(n,t){n&1&&(s(0,"div",101)(1,"div",145),q(2,56),c(),s(3,"span",146)(4,"span"),q(5,57),c(),s(6,"a",147),q(7,58),c()()());}function Ste(n,t){if(n&1&&(s(0,"p",152),u(1),c()),n&2){let e=x(2);m(),G(e.strategicSummary.primaryGoal);}}function Mte(n,t){if(n&1&&(s(0,"span",155),u(1),Zn(2,"titlecase"),c()),n&2){let e=t.$implicit;m(),G(yo(2,1,e));}}function Ote(n,t){if(n&1){let e=oe();s(0,"div",110)(1,"div",148)(2,"mat-icon",149),u(3,"smart_toy"),c(),s(4,"span",150),q(5,59),c(),s(6,"span",151),q(7,60),c()(),S(8,Ste,2,1,"p",152),s(9,"div",153)(10,"span",154),q(11,61),c(),be(12,Mte,3,3,"span",155,Pt),c(),s(14,"div",153)(15,"span",154),q(16,62),c(),s(17,"span",156),u(18),Zn(19,"titlecase"),c(),s(20,"span",157),q(21,63),c(),s(22,"span",156),u(23),Zn(24,"titlecase"),c()(),s(25,"div",158)(26,"button",159),E("click",function(){k(e);let o=x();return R(o.acceptAiSuggestions());}),s(27,"mat-icon"),u(28,"check"),c(),s(29,"span"),q(30,64),c()(),s(31,"button",160),E("click",function(){k(e);let o=x();return R(o.dismissAiSuggestions());}),s(32,"span"),q(33,65),c()()()();}if(n&2){let e=x();m(8),M(e.strategicSummary.primaryGoal?8:-1),m(4),ye(e.strategicSummary.inferredBenefitTypes),m(6),G(yo(19,3,e.strategicSummary.inferredBenefitMagnitude)),m(5),G(yo(24,5,e.strategicSummary.inferredUrgencyLevel));}}function Ete(n,t){if(n&1){let e=oe();s(0,"tr")(1,"td",87)(2,"input",161),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.label,o)||(a.label=o),R(o);}),E("input",function(){k(e);let o=x();return R(o.debounceSaveData());}),c(),s(3,"span",131),u(4),c()(),s(5,"td",88)(6,"input",162),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.amount,o)||(a.amount=o),R(o);}),E("input",function(){k(e);let o=x();return R(o.debounceSaveData());}),c()(),s(7,"td",163)(8,"input",164),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.yoyGrowth,o)||(a.yoyGrowth=o),R(o);}),E("input",function(){k(e);let o=x();return R(o.debounceSaveData());}),c()(),s(9,"td",92)(10,"button",165),E("click",function(){let o=k(e).$index,a=x();return R(a.removeBenefit(o));}),s(11,"mat-icon"),u(12,"close"),c()()()();}if(n&2){let e=t.$implicit;m(2),wt("ngModel",e.label),m(2),G(e.description),m(2),wt("ngModel",e.amount),m(2),wt("ngModel",e.yoyGrowth);}}yl.register(d3,m3,u3,ff,uf,f3,v1,b1,h3);var Zf=class n{constructor(t,e,i,o){this.firebase=t;this.snackBar=e;this.strategicThemeService=i;this.orgContextService=o;this.data=this.getDefaultData();}firebase;snackBar;strategicThemeService;orgContextService;projectId;set lockEffortSource(t){this._lockEffortSource=t,t&&(this.effortSource="positioning",this.onEffortSourceChange());}get lockEffortSource(){return this._lockEffortSource;}_lockEffortSource=!1;set statusIndex(t){this._statusIndex=t,this._lockEffortSource||(this.effortSource=t<=1?"positioning":"estimation",this.onEffortSourceChange());}_statusIndex=0;set estimationCost(t){this._estimationCost=t,this.effortSource==="estimation"&&t!==void 0&&t>0&&this.applyEstimationCost(t);}set positioningCost(t){this._positioningCost=t,this.effortSource==="positioning"&&t!==void 0&&t>0&&this.applyPositioningCost(t);}set project(t){this._project=t,t&&(this.strategicBenefitTypes=[...(t.expectedBenefitTypes??[])],this.strategicBenefitMagnitude=t.benefitMagnitude??"",this.strategicUrgencyLevel=t.urgencyLevel??"",this.strategicLinkedThemeIds=[...(t.linkedStrategicThemeIds??[])]);}_project=null;effortSource="estimation";_estimationCost;_positioningCost;get hasNoEstimationData(){return!this._estimationCost||this._estimationCost===0;}get hasNoPositioningData(){return!this._positioningCost||this._positioningCost===0;}chartCanvas;data;results=null;chart=null;firestoreUnsubscribe=null;loaded=!1;resultsSaveTimer=null;dataSaveTimer=null;strategicBenefitTypes=[];strategicBenefitMagnitude="";strategicUrgencyLevel="";strategicLinkedThemeIds=[];strategicSummary=null;aiSuggestionsDismissed=!1;availableThemes=[];summaryUnsubscribe=null;themesSubscription=null;strategicSaveTimer=null;BENEFIT_TYPES=bI;BENEFIT_MAGNITUDE_OPTIONS=yI;URGENCY_LEVEL_OPTIONS=PI;initialCostTemplates=[{label:"Development / Implementation",ruleKey:"",description:"Total from Estimation tab (auto-populated)"}
595,{label:"Hardware / Infrastructure",ruleKey:"",description:"Servers, cloud setup, networking"},{label:"Software Licenses (one-time)",ruleKey:"",description:"Perpetual licenses, setup fees"},{label:"Consulting / External Services",ruleKey:"",description:"Integrators, advisors"},{label:"Contingency Reserve",ruleKey:"contingencyRate",description:"10\u201325% of total initial costs"}];recurringCostTemplates=[{label:"Software Licenses / SaaS",ruleKey:"",description:"Annual subscription fees"},{label:"Maintenance & Support",ruleKey:"maintenanceRate",description:"15\u201320% of initial dev cost"},{label:"Infrastructure / Hosting",ruleKey:"",description:"Cloud hosting, bandwidth"},{label:"Internal Support (FTE)",ruleKey:"",description:"IT support staff"},{label:"Ongoing Training",ruleKey:"ongoingTrainingRate",description:"2\u20135% of initial training cost"}];ngAfterViewInit(){}ngOnChanges(t){t.projectId&&(this.loaded=!1,this.subscribeToFirestore(),this.subscribeToStrategicSummary(),this.loadAvailableThemes());}ngOnDestroy(){this.unsubscribe(),this.unsubscribeStrategicSummary(),this.destroyChart(),this.resultsSaveTimer&&(clearTimeout(this.resultsSaveTimer),this.resultsSaveTimer=null),this.dataSaveTimer&&(clearTimeout(this.dataSaveTimer),this.dataSaveTimer=null),this.strategicSaveTimer&&clearTimeout(this.strategicSaveTimer),this.themesSubscription&&this.themesSubscription.unsubscribe(),this._flushSaveResults(),this._flushSaveData();}subscribeToFirestore(){if(this.unsubscribe(),!this.projectId)return;let t=ge(this.firebase.firestore,"projects",this.projectId,"roi","latest");this.firestoreUnsubscribe=Bn(t,e=>{if(e.exists()&&!this.loaded){let i=e.data();i?.data&&(this.data=i.data,this.loaded=!0,this.recalculate());}});}unsubscribe(){this.firestoreUnsubscribe&&(this.firestoreUnsubscribe(),this.firestoreUnsubscribe=null);}debounceSaveData(){this.projectId&&(this.dataSaveTimer&&clearTimeout(this.dataSaveTimer),this.dataSaveTimer=setTimeout(()=>this._flushSaveData(),1e3));}subscribeToStrategicSummary(){if(this.unsubscribeStrategicSummary(),!this.projectId)return;let t=ge(this.firebase.firestore,"projects",this.projectId,"strategicSummary","latest");this.summaryUnsubscribe=Bn(t,e=>{e.exists()?(this.strategicSummary=e.data(),this.aiSuggestionsDismissed=!1):this.strategicSummary=null;});}unsubscribeStrategicSummary(){this.summaryUnsubscribe&&(this.summaryUnsubscribe(),this.summaryUnsubscribe=null);}loadAvailableThemes(){this.themesSubscription&&this.themesSubscription.unsubscribe();let t=this.orgContextService.getActiveOrg()?.id;this.themesSubscription=this.strategicThemeService.getThemes(t).subscribe({next:e=>this.availableThemes=e,error:()=>this.availableThemes=[]});}isBenefitTypeSelected(t){return this.strategicBenefitTypes.includes(t);}toggleBenefitType(t){let e=this.strategicBenefitTypes.indexOf(t);e>=0?this.strategicBenefitTypes.splice(e,1):this.strategicBenefitTypes.push(t),this.debounceStrategicSave();}isThemeLinked(t){return this.strategicLinkedThemeIds.includes(t);}toggleThemeLink(t){let e=this.strategicLinkedThemeIds.indexOf(t);e>=0?this.strategicLinkedThemeIds.splice(e,1):this.strategicLinkedThemeIds.push(t),this.debounceStrategicSave();}debounceStrategicSave(){this.strategicSaveTimer&&clearTimeout(this.strategicSaveTimer),this.strategicSaveTimer=setTimeout(()=>this.saveStrategicKpis(),800);}saveStrategicKpis(){return $(this,null,function*(){if(this.projectId)try{let t=ge(this.firebase.firestore,"projects",this.projectId);yield hn(t,{expectedBenefitTypes:this.strategicBenefitTypes,benef
595itMagnitude:this.strategicBenefitMagnitude||null,urgencyLevel:this.strategicUrgencyLevel||null,linkedStrategicThemeIds:this.strategicLinkedThemeIds});}catch(t){console.error("Error saving strategic KPIs",t);}});}acceptAiSuggestions(){if(this.strategicSummary){if(this.strategicBenefitTypes=[...this.strategicSummary.inferredBenefitTypes],this.strategicBenefitMagnitude=this.strategicSummary.inferredBenefitMagnitude,this.strategicUrgencyLevel=this.strategicSummary.inferredUrgencyLevel,this.saveStrategicKpis(),this.projectId){let t=ge(this.firebase.firestore,"projects",this.projectId,"strategicSummary","latest");Dt(t,{isUserConfirmed:!0},{merge:!0}).catch(()=>{});}this.aiSuggestionsDismissed=!0;}}dismissAiSuggestions(){this.aiSuggestionsDismissed=!0;}analyseWithAi(){this.snackBar.open("AI analysis coming soon.","",{duration:3e3});}getDefaultData(){return{formulaParams:{analysisHorizon:5,discountRate:5,inflationRate:2.5,maintenanceRate:15,contingencyRate:15,ongoingTrainingRate:3,dailyRate:800},initialCosts:[{label:"Development / Implementation",amount:0,autoCalc:!1,ruleKey:"",description:"Total from Estimation tab (auto-populated)"},{label:"Hardware / Infrastructure",amount:0,autoCalc:!1,ruleKey:"",description:"Servers, cloud setup, networking"},{label:"Software Licenses (one-time)",amount:0,autoCalc:!1,ruleKey:"",description:"Perpetual licenses, setup fees"},{label:"Contingency Reserve",amount:0,autoCalc:!0,ruleKey:"contingencyRate",description:"% of total initial costs (excl. contingency)"}],recurringCosts:[{label:"Software Licenses / SaaS",amount:0,autoCalc:!1,ruleKey:"",description:"Annual subscription fees"},{label:"Maintenance & Support",amount:0,autoCalc:!0,ruleKey:"maintenanceRate",description:"% of initial dev cost"},{label:"Infrastructure / Hosting",amount:0,autoCalc:!1,ruleKey:"",description:"Cloud hosting, bandwidth"},{label:"Internal Support (FTE)",amount:0,autoCalc:!1,ruleKey:"",description:"IT support staff"}],benefits:[{label:"Labour Savings",amount:0,yoyGrowth:0,description:"FTE reduction or time freed"},{label:"Process Efficiency",amount:0,yoyGrowth:0,description:"Throughput improvement, error reduction"},{label:"Revenue Increase",amount:0,yoyGrowth:0,description:"Direct revenue uplift"},{label:"Cost Avoidance",amount:0,yoyGrowth:0,description:"Avoided penalties, reduced risk"}]};}addInitialCost(){this.data.initialCosts.push({label:"New Cost Item",amount:0,autoCalc:!1,ruleKey:"",description:""}),this.debounceSaveData();}removeInitialCost(t){this.data.initialCosts.splice(t,1),this.recalculate(),this.debounceSaveData();}addRecurringCost(){this.data.recurringCosts.push({label:"New Recurring Cost",amount:0,autoCalc:!1,ruleKey:"",description:""}),this.debounceSaveData();}removeRecurringCost(t){this.data.recurringCosts.splice(t,1),this.recalculate(),this.debounceSaveData();}addBenefit(){this.data.benefits.push({label:"New Benefit",amount:0,yoyGrowth:0,description:""}),this.debounceSaveData();}removeBenefit(t){this.data.benefits.splice(t,1),this.recalculate(),this.debounceSaveData();}getImplementationCost(){return this.data.initialCosts.filter(t=>!t.autoCalc||t.ruleKey==="").reduce((t,e)=>t+(e.amount||0),0);}getInitialCostsExclContingency(){return this.data.initialCosts.filter(t=>t.ruleKey!=="contingencyRate").reduce((t,e)=>t+this.getEffectiveCostAmount(e),0);}getEffectiveCostAmount(t){if(!t.autoCalc||!t.ruleKey)return t.amount||0;let e=this.data.formulaParams,i=this.getImplementationCost();switch(t.ruleKey){case"contingencyRate":return this.getInitialCostsExclContingency()*(e.contingencyRate/100);case"maintenanceRate":return i*(e.maintenanceRate/100);case"ongoingTrainingRate":return i*(e.ongoingTrainingRate/100);default:return t.amount||0;}}getEffectiveRecurringCostAmount(t){return this.getEffectiveCostAmount(t);}getRuleDescription(t){return{trainingRate:"Training Rate",changeManagementRate:"Change Management Rate",contingencyRate:"Contingency Rate",maintenanceRate:"Maintenance Rate",ongoingTrainingRate:"Ongoing Training Rate"}[t]||"";}getRuleValue(t){return this.data.formulaParams[t]||0;}onEffortSourceChange(){this.effortSource==="estimation"&&this._estimationCost!==void 0&&this._estimationCost>0?this.applyEstimationCost(this._estimationCost):this.effortSource==="positioning"&&this._positioningCost!==void 0&&this._positioningCost>0&&this.applyPositioningCost(this._positioningCost);}applyEstimationCost(t){let e=this.data.initialCosts.find(i=>i.label==="Development / Implementation");e&&(e.amount=t),this.recalculate();}applyPositioningCost(t){let e=this.data.initialCosts.find(i=>i.label==="Development / Implementation");e&&(e.amount=t),this.recalculate();}recalculate(){let t=this.data.formulaParams,e=t.analysisHorizon,i=this.data.initialCosts.reduce((w,T)=>w+this.getEffectiveCostAmount(T),0),o=this.data.recurringCosts.reduce((w,T)=>w+this.getEffectiveCostAmount(T),0),a=this.data.benefits.reduce((w,T)=>w+(T.amount||0),0),r=[];r.push({year:0,costs:i,benefits:0,netCashFlow:-i,cumulativeCashFlow:-i,discountedNetCashFlow:-i});let l=(t.inflationRate||0)/100;for(let w=1;w<=e;w++){let T=o*Math.pow(1+l,w-1),O=this.data.benefits.reduce((A,J)=>{let Q=(J.yoyGrowth||0)/100;return A+(J.amount||0)*Math.pow(1+Q,w-1)*Math.pow(1+l,w-1);},0),V=O-T,j=r[w-1].cumulativeCashFlow+V,L=V/Math.pow(1+t.discountRate/100,w);r.push({year:w,costs:T,benefits:O,netCashFlow:V,cumulativeCashFlow:j,discountedNetCashFlow:L});}let p=i+r.slice(1).reduce((w,T)=>w+T.costs,0),d=r.slice(1).reduce((w,T)=>w+T.benefits,0),f=p>0?(d-p)/p*100:0,h=r.reduce((w,T)=>w+T.discountedNetCashFlow,0),g=null;for(let w=1;w<r.length;w++)if(r[w].cumulativeCashFlow>=0&&r[w-1].cumulativeCashFlow<0){let T=r[w-1].cumulativeCashFlow,O=r[w].cumulativeCashFlow;g=w-1+Math.abs(T)/(Math.abs(T)+O);break;}let b=this.calculateIRR(r);this.results={totalInitialCosts:i,totalRecurringCostsYear1:o,totalBenefitsYear1:a,simpleRoi:f,npv:h,paybackPeriod:g,irr:b,yearlyData:r},setTimeout(()=>this.updateChart(),0),this.debounceSaveResults();}debounceSaveResults(){!this.projectId||!this.results||(this.resultsSaveTimer&&clearTimeout(this.resultsSaveTimer),this.resultsSaveTimer=setTimeout(()=>this._flushSaveResults(),1500));}_flushSaveResults(){if(!this.projectId||!this.results)return;let t=ge(this.firebase.firestore,"projects",this.projectId,"roi","latest");Dt(t,{results:this.results},{merge:!0}
595).catch(()=>{});}_flushSaveData(){if(!this.projectId)return;let t=ge(this.firebase.firestore,"projects",this.projectId,"roi","latest");Dt(t,{data:this.data,updatedAt:new Date()},{merge:!0}).catch(()=>{});}calculateIRR(t){let e=t.map(o=>o.year===0?-o.costs:o.netCashFlow),i=.1;for(let o=0;o<1e3;o++){let a=0,r=0;for(let p=0;p<e.length;p++){let d=Math.pow(1+i,p);a+=e[p]/d,p>0&&(r-=p*e[p]/Math.pow(1+i,p+1));}if(Math.abs(r)<1e-12)return null;let l=i-a/r;if(Math.abs(l-i)<1e-7)return l*100;if(i=l,i<-1||i>10)return null;}return null;}destroyChart(){this.chart&&(this.chart.destroy(),this.chart=null);}updateChart(){if(!this.results||!this.chartCanvas?.nativeElement)return;this.destroyChart();let t=this.results.yearlyData.map(o=>`Year ${o.year}`),e=this.results.yearlyData.map((o,a)=>{let r=this.results.totalInitialCosts;for(let l=1;l<=a;l++)r+=this.results.yearlyData[l].costs;return r;}),i=this.results.yearlyData.map((o,a)=>{let r=0;for(let l=0;l<=a;l++)r+=this.results.yearlyData[l].benefits;return r;});this.chart=new yl(this.chartCanvas.nativeElement,{type:"line",data:{labels:t,datasets:[{label:"Cumulative
595Costs",data:e,borderColor:"#E53935",backgroundColor:"rgba(229, 57, 53, 0.08)",fill:!1,tension:.3,pointRadius:4},{label:"Cumulative Benefits",data:i,borderColor:"#43A047",backgroundColor:"rgba(67, 160, 71, 0.08)",fill:!1,tension:.3,pointRadius:4},{label:"Cumulative Net Cash Flow",data:this.results.yearlyData.map(o=>o.cumulativeCashFlow),borderColor:"#1E88E5",backgroundColor:"rgba(30, 136, 229, 0.08)",fill:!0,tension:.3,pointRadius:4,borderDash:[5,3]}]},options:{responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom"}},scales:{y:{title:{display:!0,text:"Amount ($)"},ticks:{callback:o=>{let a=Number(o);return Math.abs(a)>=1e6?(a/1e6).toFixed(1)+"M":Math.abs(a)>=1e3?(a/1e3).toFixed(0)+"K":a.toString();}}},x:{title:{display:!0,text:"Year"}}}}});}formatCurrency(t){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(t);}formatPercent(t){return t===null?"N/A":t.toFixed(1)+"%";}formatYears(t){return t===null?"N/A":t.toFixed(1)+" yr";}getInitialCostSubtotal(){return this.data.initialCosts.reduce((t,e)=>t+this.getEffectiveCostAmount(e),0);}getRecurringCostSubtotal(){return this.data.recurringCosts.reduce((t,e)=>t+this.getEffectiveCostAmount(e),0);}getBenefitSubtotal(){return this.data.benefits.reduce((t,e)=>t+(e.amount||0),0);}trackByIndex(t){return t;}static ɵfac=function(e){return new(e||n)(le(On),le(Bt),le(bf),le(kl));};static ɵcmp=Te({type:n,selectors:[["app-project-roi"]],viewQuery:function(e,i){if(e&1&&go(ete,5),e&2){let o;qn(o=Jn())&&(i.chartCanvas=o.first);}},inputs:{projectId:"projectId",lockEffortSource:"lockEffortSource",statusIndex:"statusIndex",estimationCost:"estimationCost",positioningCost:"positioningCost",project:"project"},features:[ki],decls:235,vars:29,consts:()=>{let t;t="Recalculate ROI metrics and chart";let e;e="Select all benefit categories that apply to this project";let i;i="How large is the expected business impact if the project succeeds?";let o;o="Business urgency \u2014 distinct from WSJF time criticality (cost of delay)";let a;a="AI will read your project goals, strategic alignment and benefits text to suggest benefit types, magnitude and urgency";let r;r="Calculate ROI";let l;l="Formula Parameters & Rules";let p;p="Analysis Horizon (years)";let d;d="Discount Rate \u2014 Nominal (%)";let f;f="Inflation Rate (%)";let h;h="Daily Rate ($)";let g;g="Maintenance Rate (%)";let b;b="Contingency Rate (%)";let w;w="Ongoing Training Rate (%)";let T;T="Costs";let O;O="Initial Project Costs (Year 0)";let V;V="Item";let j;j="Amount ($)";let L;L="Auto";let A;A="Effective";let J;J="Rule";let Q;Q="Subtotal";let te;te="Add Cost Line";let U;U="Recurring Annual Costs";let ce;ce="Item";let W;W="Amount ($)";let Y;Y="Auto";let se;se="Effective";let de;de="Rule";let Ae;Ae="Subtotal";let rt;rt="Add Recurring Cost Line";let et;et="Strategic Value Assessment";let pt;pt="Qualitative Benefit Profile";let ft;ft="Benefit Types";let je;je="Benefit Magnitude";let ke;ke="Business Urgency";let Ke;Ke="Analyse with AI";let ve;ve="Benefits";let Se;Se="Recurring Annual Benefits";let Be;Be="Item";let Ze;Ze="Amount ($/yr)";let kt;kt="YoY Real Growth (%)";let Z;Z="Subtotal (Year 1)";let D;D="Add Benefit Line";let F;F="Effort source for Development cost:";let fe;fe=""+"\uFFFD#6\uFFFD"+"my_location"+"\uFFFD/#6\uFFFD"+" Positioning ";let he;he=""+"\uFFFD#9\uFFFD"+"calculate"+"\uFFFD/#9\uFFFD"+" Estimation ";let xe;xe="No solution requirements found for this project. Add requirements via Business Process tasks first.";let nt;nt="No positioning analysis data found for this project. Run the Positioning Analysis first.";let Je;Je="Simple ROI";let Ge;Ge="Net Present Value (NPV)";let Ne;Ne="Payback Period";let Pe;Pe="Internal Rate of Return (IRR)";let Oe;Oe="Year-by-Year Breakdown";let ct;ct="Year";let ht;ht="Costs";let qt;qt="Benefits";let zt;zt="Net Cash Flow";let rn;rn="Cumulative";let ni;ni="Remove";let Vn;Vn="Remove";let pi;pi="Select the strategic themes this project contributes to";let di;di="Strategic Themes";let Kn;Kn="Strategic Themes";let Ai;Ai="No strategic themes defined yet.";let $i;$i="Create themes for your organisation \u2192";let mi;mi="AI Suggestions";let sn;sn="Unconfirmed";let Pn;Pn="Benefit types \uD83E\uDD16";let _i;_i="Magnitude \uD83E\uDD16";let so;so="Urgency \uD83E\uDD16";let to;to="Accept AI suggestions";let ko;ko="Dismiss";let lo;return lo="Remove",[["roiChart",""],r,l,p,d,f,h,g,b,w,T,O,V,j,L,A,J,Q,te,U,ce,W,Y,se,de,Ae,rt,et,pt,ft,je,ke,Ke,ve,Se,Be,Ze,kt,Z,D,F,fe,he,xe,nt,Je,Ge,Ne,Pe,Oe,ct,ht,qt,zt,rn,di,Kn,Ai,$i,mi,sn,Pn,_i,so,to,ko,[1,"roi-container"],[1,"effort-source-bar"],[1,"roi-action-bar"],["mat-flat-button","","color","primary","matTooltip",t,3,"click"],[1,"roi-no-data"],[1,"roi-section",3,"expanded"],[1,"section-icon"],[1,"params-grid"],["appearance","fill"],["matInput","","type","number","min","1","max","10",3,"ngModelChange","input","ngModel"],["appearance","fill","matTooltip","Nominal discount rate used to compute Net Present Value (NPV). This rate should INCLUDE inflation. For example, if the real return is 3% and inflation is 2.5%, set this to ~5.5%. All cash flows in the model are expressed in nominal (future) dollars, so the discount rate must also be nominal to be consistent."],["matInput","","type","number","min","0","max","30","step","0.5",3,"ngModelChange","input","ngModel"],["appearance","fill","matTooltip","Annual inflation rate applied to all recurring cash flows (costs and benefits). Recurring costs increase each year by this rate. Benefit amounts also grow by inflation on top of their real YoY growth. This uses the 'nominal approach': all projected amounts are in future dollars, and the discount rate should also be nominal."],["matInput","","type","number","min","0","max","15","step","0.1",3,"ngModelChange","input","ngModel"],["matInput","","type","number","min","0",3,"ngModelChange","input","ngModel"],["matInput","","type","number","min","0","max","40","step","0.5",3,"ngModelChange","input","ngModel"],["matInput","","type","number","min","0","max","15","step","0.5",3,"ngModelChange","input","ngModel"],[1,"roi-section-header"],[1,"section-icon","costs-icon"],[1,"section-title"],[1,"roi-table"],[1,"col-label"],[1,"col-amount"],[1,"col-auto"],[1,"col-effective"],[1,"col-rule"],[1,"col-actions"],[1,"subtotal-row"],["mat-stroked-button","",1,"add-btn",3,"click"],[1,"section-icon","strategic-icon"],[1,"roi-section","strategic-assessment-panel",3,"expanded"],[1,"strategic-summary-chips"],[1,"summary-chip"],[1,"summary-chip","summary-chip--magnitude"],[1,"summary-chip","summary-chip--urgency"],[1,"strategic-row"],["matTooltip",e,1,"strategic-label"],[1,"benefit-chips"],["mat-stroked-button","",1,"benefit-chip-btn",3,"benefit-chip-btn--selected"],["matTooltip",i,1,"strategic-label"],["name","benefitMagnitude",1,"strategic-toggle-group",3,"ngModelChange","change","ngModel"],[3,"value"],["matTooltip",o,1,"strategic-label"],["name","urgencyLevel",1,"strategic-toggle-group",3,"ngModelChange","change","ngModel"],[1,"ai-suggestions-block"],[1,"strategic-ai-bar"],["mat-stroked-button","","matTooltip",a,3,"click"],[1,"section-icon","benefits-icon"],["matTooltip","Real year-over-year growth rate ABOVE inflation. For example, if you expect the benefit to grow 7% per year and inflation is 2.5%, enter 4.5% here. Inflation is added automatically in the calculation.",1,"col-growth"],[1,"effort-source-label"],["name","effortSource",3,"ngModelChange","change","ngModel"],["value","positioning"],["value","estimation"],[1,"kpi-grid"],[1,"kpi-card"],[1,"kpi-label"],[1,"kpi-value"],[1,"kpi-formula"],[1,"chart-container"],[3,"expanded"],[1,"roi-table","yearly-table"],[3,"break-even-row"],[1,"amount-negative"],[1,"amount-positive"],["placeholder","Cost item name",1,"inline-input","label-input",3,"ngModelChange","input","ngModel"],[1,"description-hint"],["type","number","min","0","placeholder","0",1,"inline-input","amount-input",3,"ngModelChange","input","ngModel","disabled"],["matTooltip","Auto-calculate from formula parameter",3,"ngModel"],[1,"effective-amount"],[1,"rule-badge",3,"matTooltip"],["mat-icon-button","","matTooltip",ni,1,"remove-btn",3,"click"],["matTooltip","Auto-calculate from formula parameter",3,"ngModelChange","change","ngModel"],["mat-icon-button","","matTooltip",Vn,1,"remove-btn",3,"click"],["mat-stroked-button","",1,"benefit-chip-btn",3,"click"],[1,"chip-check-icon"],["matTooltip",pi,1,"strategic-label"],[1,"theme-chips"],["mat-stroked-button","",1,"theme-chip-btn",3,"theme-chip-btn--linked"],["mat-stroked-button","",1,"theme-chip-btn",3,"click"],[1,"strategic-label"],[1,"strategic-no-themes"],["routerLink","/strategic-themes"],[1,"ai-suggestions-header"],[1,"ai-icon"],[1,"ai-suggestions-title"],[1,"ai-unconfirmed-badge"],[1,"ai-primary-goal"],[1,"ai-inferred-row"],[1,"ai-inferred-label"],[1,"ai-inferred-chip"],[1,"ai-inferred-chip","ai-inferred-chip--highlight"],[1,"ai-inferred-label","ai-inferred-label--spaced"],[1,"ai-suggestions-actions"],["mat-flat-button","","color","primary",3,"click"],["mat-stroked-button","",3,"click"],["placeholder","Benefit name",1,"inline-input","label-input",3,"ngModelChange","input","ngModel"],["type","number","min","0","placeholder","0",1,"inline-input","amount-input",3,"ngModelChange","input","ngModel"],[1,"col-growth"],["type","number","min","0","max","100","step","0.5","placeholder","0",1,"inline-input","growth-input",3,"ngModelChange","input","ngModel"],["mat-icon-button","","matTooltip",lo,1,"remove-btn",3,"click"]];},template:function(e,i){e&1&&(s(0,"div",66),S(1,ite,10,1,"div",67),s(2,"div",68)(3,"button",69),E("click",function(){return i.recalculate();}),s(4,"mat-icon"),u(5,"calculate"),c(),s(6,"span"),q(7,1),c()()(),S(8,ote,5,0,"div",70),S(9,ate,5,0,"div",70),S(10,ste,55,23),s(11,"mat-expansion-panel",71)(12,"mat-expansion-panel-header")(13,"mat-panel-title")(14,"mat-icon",72),u(15,"tune"),c(),s(16,"span"),q(17,2),c()()(),s(18,"div",73)(19,"mat-form-field",74)(20,"mat-label"),q(21,3),c(),s(22,"input",75),Mt("ngModelChange",function(a){return St(i.data.formulaParams.analysisHorizon,a)||(i.data.formulaParams.analysisHorizon=a),a;}),E("input",function(){return i.debounceSaveData();}),c(),s(23,"mat-hint"),u(24,"1\u201310 years"),c()(),s(25,"mat-form-field",76)(26,"mat-label"),q(27,4),c(),s(28,"input",77),Mt("ngModelChange",function(a){return St(i.data.formulaParams.discountRate,a)||(i.data.formulaParams.discountRate=a),a;}),E("input",function(){return i.debounceSaveData();}),c(),s(29,"mat-hint"),u(30,"Nominal rate for NPV (includes inflation). Typical: 5\u201310%"),c()(),s(31,"mat-form-field",78)(32,"mat-label"),q(33,5),c(),s(34,"input",79),Mt("ngModelChange",function(a){return St(i.data.formulaParams.inflationRate,a)||(i.data.formulaParams.inflationRate=a),a;}),E("input",function(){return i.debounceSaveData();}),c(),s(35,"mat-hint"),u(36,"Applied yearly to all recurring costs & benef
595its. Typical: 2\u20133%"),c()(),s(37,"mat-form-field",74)(38,"mat-label"),q(39,6),c(),s(40,"input",80),Mt("ngModelChange",function(a){return St(i.data.formulaParams.dailyRate,a)||(i.data.formulaParams.dailyRate=a),a;}),E("input",function(){return i.debounceSaveData();}),c(),s(41,"mat-hint"),u(42,"Cost per man-day"),c()(),s(43,"mat-form-field",74)(44,"mat-label"),q(45,7),c(),s(46,"input",77),Mt("ngModelChange",function(a){return St(i.data.formulaParams.maintenanceRate,a)||(i.data.formulaParams.maintenanceRate=a),a;}),E("input",function(){return i.debounceSaveData();}),c(),s(47,"mat-hint"),u(48,"Best practice: 15\u201320% of dev cost"),c()(),s(49,"mat-form-field",74)(50,"mat-label"),q(51,8),c(),s(52,"input",81),Mt("ngModelChange",function(a){return St(i.data.formulaParams.contingencyRate,a)||(i.data.formulaParams.contingencyRate=a),a;}),E("input",function(){return i.debounceSaveData();}),c(),s(53,"mat-hint"),u(54,"Best practice: 10\u201325% of total initial"),c()(),s(55,"mat-form-field",74)(56,"mat-label"),q(57,9),c(),s(58,"input",82),Mt("ngModelChange",function(a){return St(i.data.formulaParams.ongoingTrainingRate,a)||(i.data.formulaParams.ongoingTrainingRate=a),a;}),E("input",function(){return i.debounceSaveData();}),c(),s(59,"mat-hint"),u(60,"Best practice: 2\u20135% of initial training"),c()()()(),s(61,"div",83)(62,"mat-icon",84),u(63,"money_off"),c(),s(64,"span",85),q(65,10),c()(),s(66,"mat-expansion-panel",71)(67,"mat-expansion-panel-header")(68,"mat-panel-title")(69,"mat-icon",72),u(70,"account_balance"),c(),s(71,"span"),q(72,11),c()(),s(73,"mat-panel-description"),u(74),c()(),s(75,"table",86)(76,"thead")(77,"tr")(78,"th",87),q(79,12),c(),s(80,"th",88),q(81,13),c(),s(82,"th",89),q(83,14),c(),s(84,"th",90),q(85,15),c(),s(86,"th",91),q(87,16),c(),ee(88,"th",92),c()(),s(89,"tbody"),be(90,pte,18,7,"tr",null,i.trackByIndex,!0),c(),s(92,"tfoot")(93,"tr",93)(94,"td"),q(95,17),c(),ee(96,"td")(97,"td"),s(98,"td",90)(99,"strong"),u(100),c()(),ee(101,"td")(102,"td"),c()()(),s(103,"button",94),E("click",function(){return i.addInitialCost();}),s(104,"mat-icon"),u(105,"add"),c(),s(106,"span"),q(107,18),c()()(),s(108,"mat-expansion-panel",71)(109,"mat-expansion-panel-header")(110,"mat-panel-title")(111,"mat-icon",72),u(112,"autorenew"),c(),s(113,"span"),q(114,19),c()(),s(115,"mat-panel-description"),u(116),c()(),s(117,"table",86)(118,"thead")(119,"tr")(120,"th",87),q(121,20),c(),s(122,"th",88),q(123,21),c(),s(124,"th",89),q(125,22),c(),s(126,"th",90),q(127,23),c(),s(128,"th",91),q(129,24),c(),ee(130,"th",92),c()(),s(131,"tbody"),be(132,ute,18,7,"tr",null,i.trackByIndex,!0),c(),s(134,"tfoot")(135,"tr",93)(136,"td"),q(137,25),c(),ee(138,"td")(139,"td"),s(140,"td",90)(141,"strong"),u(142),c()(),ee(143,"td")(144,"td"),c()()(),s(145,"button",94),E("click",function(){return i.addRecurringCost();}),s(146,"mat-icon"),u(147,"add"),c(),s(148,"span"),q(149,26),c()()(),s(150,"div",83)(151,"mat-icon",95),u(152,"track_changes"),c(),s(153,"span",85),q(154,27),c()(),s(155,"mat-expansion-panel",96)(156,"mat-expansion-panel-header")(157,"mat-panel-title")(158,"mat-icon",72),u(159,"emoji_objects"),c(),s(160,"span"),q(161,28),c()(),s(162,"mat-panel-description")(163,"span",97),S(164,fte,2,1,"span",98),S(165,hte,3,3,"span",99),S(166,_te,3,3,"span",100),c()()(),s(167,"div",101)(168,"div",102),q(169,29),c(),s(170,"div",103),be(171,xte,3,4,"button",104,sM),c()(),s(173,"div",101)(174,"div",105),q(175,30),c(),s(176,"mat-button-toggle-group",106),Mt("ngModelChange",function(a){return St(i.strategicBenefitMagnitude,a)||(i.strategicBenefitMagnitude=a),a;}),E("change",function(){return i.debounceStrategicSave();}),be(177,Cte,2,2,"mat-button-toggle",107,sM),c()(),s(179,"div",101)(180,"div",108),q(181,31),c(),s(182,"mat-button-toggle-group",109),Mt("ngModelChange",function(a){return St(i.strategicUrgencyLevel,a)||(i.strategicUrgencyLevel=a),a;}),E("change",function(){return i.debounceStrategicSave();}),be(183,vte,2,2,"mat-button-toggle",107,sM),c()(),S(185,Pte,6,0,"div",101)(186,wte,8,0,"div",101),S(187,Ote,34,7,"div",110),s(188,"div",111)(189,"button",112),E("click",function(){return i.analyseWithAi();}),s(190,"mat-icon"),u(191,"auto_awesome"),c(),s(192,"span"),q(193,32),c()()()(),s(194,"div",83)(195,"mat-icon",113),u(196,"trending_up"),c(),s(197,"span",85),q(198,33),c()(),s(199,"mat-expansion-panel",71)(200,"mat-expansion-panel-header")(201,"mat-panel-title")(202,"mat-icon",72),u(203,"attach_money"),c(),s(204,"span"),q(205,34),c()(),s(206,"mat-panel-description"),u(207),c()(),s(208,"table",86)(209,"thead")(210,"tr")(211,"th",87),q(212,35),c(),s(213,"th",88),q(214,36),c(),s(215,"th",114),q(216,37),c(),ee(217,"th",92),c()(),s(218,"tbody"),be(219,Ete,13,4,"tr",null,i.trackByIndex,!0),c(),s(221,"tfoot")(222,"tr",93)(223,"td"),q(224,38),c(),s(225,"td",88)(226,"strong"),u(227),c()(),ee(228,"td")(229,"td"),c()()(),s(230,"button",94),E("click",function(){return i.addBenefit();}),s(231,"mat-icon"),u(232,"add"),c(),s(233,"span"),q(234,39),c()()()()),e&2&&(m(),M(i.lockEffortSource?-1:1),m(7),M(i.effortSource==="estimation"&&i.hasNoEstimationData?8:-1),m(),M(i.effortSource==="positioning"&&i.hasNoPositioningData?9:-1),m(),M(i.results?10:-1),m(),N("expanded",!1),m(11),wt("ngModel",i.data.formulaParams.analysisHorizon),m(6),wt("ngModel",i.data.formulaParams.discountRate),m(6),wt("ngModel",i.data.formulaParams.inflationRate),m(6),wt("ngModel",i.data.formulaParams.dailyRate),m(6),wt("ngModel",i.data.formulaParams.maintenanceRate),m(6),wt("ngModel",i.data.formulaParams.contingencyRate),m(6),wt("ngModel",i.data.formulaParams.ongoingTrainingRate),m(8),N("expanded",!0),m(8),_e(" ",i.formatCurrency(i.getInitialCostSubtotal())," "),m(16),ye(i.data.initialCosts),m(10),G(i.formatCurrency(i.getInitialCostSubtotal())),m(8),N("expanded",!0),m(8),_e(" ",i.formatCurrency(i.getRecurringCostSubtotal())," / yr "),m(16),ye(i.data.recurringCosts),m(10),G(i.formatCurrency(i.getRecurringCostSubtotal())),m(13),N("expanded",!0),m(9),M(i.strategicBenefitTypes.length>0?164:-1),m(),M(i.strategicBenefitMagnitude?165:-1),m(),M(i.strategicUrgencyLevel?166:-1),m(5),ye(i.BENEFIT_TYPES),m(5),wt("ngModel",i.strategicBenefitMagnitude),m(),ye(i.BENEFIT_MAGNITUDE_OPTIONS),m(5),wt("ngModel",i.strategicUrgencyLevel),m(),ye(i.URGENCY_LEVEL_OPTIONS),m(2),M(i.availableThemes.length>0?185:186),m(2),M(i.strategicSummary&&!i.aiSuggestionsDismissed&&!i.strategicSummary.isUserConfirmed?187:-1),m(12),N("expanded",!0),m(8),_e(" ",i.formatCurrency(i.getBenefitSubtotal())," / yr (Year 1) "),m(12),ye(i.data.benefits),m(8),G(i.formatCurrency(i.getBenefitSubtotal())));},dependencies:[ut,gn,Ft,Ea,Tt,Qr,P1,Po,pd,u1,$e,Qe,Qt,We,Xe,Gt,Vt,Wt,Ki,jt,Xt,gr,fr,hr,_r,wl,$t,_n,bi,$f,ra,xr,Ua,xf,_f,gf,yi,i1],styles:[".roi-container[_ngcontent-%COMP%]{padding:16px;max-width:100%;overflow-y:auto}.effort-source-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:10px 14px;background-color:#f0f4ff;border:1px solid rgba(25,118,210,.15);border-radius:8px}.effort-source-label[_ngcontent-%COMP%]{font-size:.82em;font-weight:600;color:#0000008c;white-space:nowrap}.roi-no-data[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 16px;margin-bottom:12px;background:#e3f2fd;border:1px solid rgba(25,118,210,.2);border-radius:8px;color:#1565c0;font-size:13px}.roi-no-data[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;flex-shrink:0}
595.roi-action-bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:12px;margin-bottom:20px;align-items:center}.roi-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin:20px 0 8px;padding:4px 0}.section-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;margin-right:4px}.costs-icon[_ngcontent-%COMP%]{color:#e53935}.benefits-icon[_ngcontent-%COMP%]{color:#43a047}.results-icon[_ngcontent-%COMP%]{color:#1e88e5}.section-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#333}.roi-section[_ngcontent-%COMP%]{margin-bottom:10px} .roi-container .mat-expansion-panel{margin-bottom:10px;border-radius:10px!important;border:1px solid rgba(0,0,0,.07)!important;box-shadow:none!important} .roi-container .mat-expansion-panel:before{display:none} .roi-container .mat-expansion-panel-header{padding:0 16px;min-height:54px} .roi-container .mat-expansion-panel-body{padding:0 16px 16px}.params-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;padding:8px 0}.params-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.roi-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:12px}.roi-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:8px 6px;font-weight:600;color:#666;border-bottom:2px solid #e0e0e0;font-size:11px;text-transform:uppercase;letter-spacing:.5px}.roi-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:6px;border-bottom:1px solid #f0f0f0;vertical-align:top}.roi-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#fafafa}
595.col-label[_ngcontent-%COMP%]{min-width:200px;max-width:300px}.col-amount[_ngcontent-%COMP%]{width:130px}.col-auto[_ngcontent-%COMP%]{width:50px;text-align:center}.col-effective[_ngcontent-%COMP%]{width:120px;text-align:right}.col-rule[_ngcontent-%COMP%]{width:180px}.col-growth[_ngcontent-%COMP%]{width:100px}.col-actions[_ngcontent-%COMP%]{width:40px;text-align:center}.inline-input[_ngcontent-%COMP%]{border:1px solid transparent;background:transparent;padding:4px 6px;border-radius:4px;font-size:13px;transition:border-color .2s}.inline-input[_ngcontent-%COMP%]:hover{border-color:#ccc}.inline-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#1976d2;background:#fff}.inline-input[_ngcontent-%COMP%]:disabled{color:#999;background:#f5f5f5}.label-input[_ngcontent-%COMP%]{width:100%;font-weight:500}.amount-input[_ngcontent-%COMP%]{width:110px;text-align:right}.growth-input[_ngcontent-%COMP%]{width:80px;text-align:right}.description-hint[_ngcontent-%COMP%]{display:block;font-size:11px;color:#999;margin-top:2px;padding-left:6px}.effective-amount[_ngcontent-%COMP%]{font-weight:500;color:#333}.rule-badge[_ngcontent-%COMP%]{display:inline-block;background:#e3f2fd;color:#1565c0;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:500;white-space:nowrap}.subtotal-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-top:10px;border-top:2px solid #e0e0e0;border-bottom:none;font-weight:600;font-size:14px}.add-btn[_ngcontent-%COMP%]{margin-top:8px;font-size:12px}.add-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.remove-btn[_ngcontent-%COMP%]{opacity:.4;transition:opacity .2s}.remove-btn[_ngcontent-%COMP%]:hover{opacity:1;color:#e53935}.remove-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.kpi-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px;animation:_ngcontent-%COMP%_fadeIn .3s ease-in}@media(max-width:700px){.kpi-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.kpi-card[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:10px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}.kpi-label[_ngcontent-%COMP%]{font-size:.72em;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#00000073}.kpi-value[_ngcontent-%COMP%]{font-size:1.6em;font-weight:700;line-height:1.1;color:#000000d1}.kpi-positive[_ngcontent-%COMP%]{color:#2e7d32}.kpi-negative[_ngcontent-%COMP%]{color:#c62828}.kpi-formula[_ngcontent-%COMP%]{font-size:.72em;color:#00000073;font-style:italic}.chart-container[_ngcontent-%COMP%]{width:100%;height:320px;margin:16px 0;padding:8px;background:#fafafa;border:1px solid #e0e0e0;border-radius:8px}.yearly-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .yearly-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:right;padding:8px 12px}.yearly-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, .yearly-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{text-align:center;font-weight:600}.amount-positive[_ngcontent-%COMP%]{color:#2e7d32}.amount-negative[_ngcontent-%COMP%]{color:#c62828}.break-even-row[_ngcontent-%COMP%]{background-color:#e8f5e9!important}.roi-results-section[_ngcontent-%COMP%]{margin-top:16px}.strategic-icon[_ngcontent-%COMP%]{color:#7b1fa2}.strategic-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:16px;padding:10px 0;border-bottom:1px solid #f0f0f0}.strategic-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.strategic-label[_ngcontent-%COMP%]{min-width:160px;font-size:12px;font-weight:600;color:#0009;text-transform:uppercase;letter-spacing:.4px;padding-top:6px;cursor:help}.benefit-chips[_ngcontent-%COMP%], .theme-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px}.benefit-chip-btn[_ngcontent-%COMP%], .theme-chip-btn[_ngcontent-%COMP%]{font-size:12px;height:30px;line-height:30px;padding:0 12px;border-radius:16px!important;transition:background-color .15s,color .15s}.benefit-chip-btn[_ngcontent-%COMP%] .chip-check-icon[_ngcontent-%COMP%], .theme-chip-btn[_ngcontent-%COMP%] .chip-check-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;
595height:14px;margin-right:4px;vertical-align:middle}.benefit-chip-btn--selected[_ngcontent-%COMP%]{background-color:#7b1fa2!important;color:#fff!important;border-color:#7b1fa2!important}.theme-chip-btn--linked[_ngcontent-%COMP%]{background-color:#1565c0!important;color:#fff!important;border-color:#1565c0!important}.strategic-toggle-group[_ngcontent-%COMP%]{font-size:12px}.strategic-toggle-group[_ngcontent-%COMP%] .mat-button-toggle{font-size:12px;height:32px;line-height:32px}.strategic-summary-chips[_ngcontent-%COMP%]{display:flex;gap:6px;align-items:center}.summary-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;border-radius:12px;font-size:11px;font-weight:500;background:#f3e5f5;color:#6a1b9a}.summary-chip--magnitude[_ngcontent-%COMP%]{background:#e8f5e9;color:#2e7d32}.summary-chip--urgency[_ngcontent-%COMP%]{background:#fff3e0;color:#e65100}.strategic-no-themes[_ngcontent-%COMP%]{font-size:13px;color:#00000080;font-style:italic}.strategic-no-themes[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#1976d2;text-decoration:none;margin-left:6px}.strategic-no-themes[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-suggestions-block[_ngcontent-%COMP%]{margin:12px 0;padding:14px 16px;background:#f3e5f5;border:1px solid #ce93d8;border-radius:10px;animation:_ngcontent-%COMP%_fadeIn .3s ease}.ai-suggestions-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:8px}.ai-suggestions-header[_ngcontent-%COMP%] .ai-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#7b1fa2}.ai-suggestions-title[_ngcontent-%COMP%]{font-weight:700;font-size:13px;color:#4a148c}.ai-unconfirmed-badge[_ngcontent-%COMP%]{font-size:10px;font-weight:600;padding:2px 8px;background:#ce93d8;color:#4a148c;border-radius:10px;text-transform:uppercase;letter-spacing:.4px}.ai-primary-goal[_ngcontent-%COMP%]{font-size:13px;color:#4a148c;font-style:italic;margin:4px 0 10px;padding-left:4px;border-left:3px solid #ce93d8}.ai-inferred-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:6px}.ai-inferred-label[_ngcontent-%COMP%]{font-size:11px;font-weight:600;color:#0000008c;text-transform:uppercase;letter-spacing:.3px}.ai-inferred-label--spaced[_ngcontent-%COMP%]{margin-left:8px}.ai-inferred-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 10px;background:#fff;border:1px solid #ce93d8;border-radius:12px;font-size:11px;font-weight:500;color:#6a1b9a}.ai-inferred-chip--highlight[_ngcontent-%COMP%]{background:#e1bee7;border-color:#9c27b0;font-weight:700}.ai-suggestions-actions[_ngcontent-%COMP%]{display:flex;gap:8px;margin-top:12px}.strategic-ai-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-top:12px;margin-top:4px;border-top:1px dashed #e0e0e0}"]});};function Tte(n,t){if(n&1&&ee(0,"span",17),n&2){let e=t.$index,i=x(2);Ue("bubble-dot-active",e===i.currentIdx);}}function Ite(n,t){n&1&&(fi(0),s(1,"span"),q(2,1),c(),s(3,"mat-icon"),u(4,"check"),c(),hi());}function kte(n,t){n&1&&(fi(0),s(1,"span"),q(2,2),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function Rte(n,t){if(n&1){let e=oe();s(0,"div",3),E("click",function(o){return o.stopPropagation();}),c(),s(1,"div",4),E("click",function(){k(e);let o=x();return R(o.skipTour());}),c(),s(2,"div",5)(3,"div",6)(4,"div",7)(5,"mat-icon"),u(6),c()(),s(7,"span",8),u(8),c(),s(9,"button",9),E("click",function(){k(e);let o=x();return R(o.skipTour());}),s(10,"mat-icon"),u(11,"close"),c()()(),s(12,"p",10),u(13),c(),s(14,"div",11)(15,"div",12),be(16,Tte,1,2,"span",13,ac),c(),s(18,"div",14)(19,"button",15),E("click",function(){k(e);let o=x();return R(o.skipTour());}),q(20,0),c(),s(21,"button",16),E("click",function(){k(e);let o=x();return R(o.advance());}),S(22,Ite,5,0,"ng-container")(23,kte,5,0,"ng-container"),c()()()();}if(n&2){let e=x();Ci("top",e.layout.ringTop,"px")("left",e.layout.ringLeft,"px")("width",e.layout.ringWidth,"px")("height",e.layout.ringHeight,"px"),m(2),Ci("top",e.layout.bubbleTop,"px")("left",e.layout.bubbleLeft,"px"),Yo("aria-label",e.currentHint.title),m(4),G(e.currentHint.icon),m(2),G(e.currentHint.title),m(5),G(e.currentHint.message),m(3),ye(e.hints),m(6),M(e.isLast?22:23);}}var Qf=8,eh=16,lM=340,I0=16,k0=class n{constructor(t,e){this.cdr=t;this.ngZone=e;}cdr;ngZone;projectId;active=!1;visible=!1;currentIdx=0;layout=null;_layoutTimer=null;hints=[{tourTarget:"tour-progress-bar",icon:"timeline",title:"Project Phase",message:"Track your project lifecycle from Initiation to Closed. Click any phase to advance the project \u2014 changes are saved automatically.",position:"bottom"},{tourTarget:"tour-panel-toggles",icon:"view_quilt",title:"Flexible Panel Layout",message:"Show or hide any panel using these toggles. Panels are also resizable \u2014 drag the dividers to tailor the workspace to your workflow.",position:"bottom"},{tourTarget:"tour-intelligent-field",icon:"auto_awesome",title:"AI-Powered Fields",message:"Every field has AI generation \u2014 let the architect fill in the details from your project context. Click the \u2728 button inside any field.",position:"right"},{tourTarget:"tour-project-tabs",icon:"tab",title:"Project Tabs",message:"Switch between Project, Details, Documents, Review, Estimation, and ROI tabs. Each tab deepens a different dimension of your project.",position:"top"},{tourTarget:"tour-evaluation",icon:"bar_chart",title:"Project Evaluation",message:"This panel scores your project quality in real time across compliance dimensions. Fill in the fields above to improve your score.",position:"right"},{tourTarget:"tour-generate-bp",icon:"auto_awesome",title:"Generate Business Processes",message:"Click this \u2728 button to have the AI suggest a complete list of business processes derived from your project description. Select which ones to add.",position:"left"},{tourTarget:"tour-bp-list",icon:"list",title:"Business Processes",message:"Model your processes visually in the BPMN designer. Click a row to preview it, or double-click (and use Open Designer) to edit its diagram.",position:"left"},{tourTarget:"tour-bp-detail",icon:"info",title:"Business Process Detail",message:'Click any business process in the list to see its details here. Hit "Open Designer" to launch the full BPMN diagram editor.',position:"left"},{tourTarget:"tour-context-notes",icon:"library_books",title:"Contexts & Notes",message:"Attach reference documents and freeform notes here. They are automatically injected into every AI generation, giving the architect more precise context.",position:"left"},{tourTarget:"tour-gap-analysis",icon:"tune",title:"Gap Analysis Mode",message:"Switch to Gap Analysis mode to map current-state vs. future-state gaps across all your business processes.",position:"bottom"},{tourTarget:"tour-ask-architect",icon:"chat",title:"Ask the Architect",message:"Your AI architect is always available \u2014 ask questions, get recommendations, validate decisions. It knows your project context.",position:"left"}];get currentHint(){return this.hints[this.currentIdx];}get isLast(){return this.currentIdx===this.hints.length-1;}ngOnChanges(t){if(t.active&&this.active&&this.projectId){let e=`skycortex_tour_${this.projectId}`;localStorage.getItem(e)||this._startTour();}}ngOnDestroy(){this._clearTimer();}advance(){this.isLast?this.finishTour():(this.currentIdx++,this._positionHint(this.currentHint));}skipTour(){this.finishTour();}restartTour(){this._clearTimer(),this.projectId&&localStorage.removeItem(`skycortex_tour_${this.projectId}`),this._startTour();}finishTour(){this.projectId&&localStorage.setItem(`skycortex_tour_${this.projectId}`,"seen"),this.visible=!1,this.layout=null,this.cdr.markForCheck();}_startTour(){this.currentIdx=0,this._layoutTimer=setTimeout(()=>{this.ngZone.run(()=>{this._positionHint(this.hints[0]);});},500);}_positionHint(t){let e=document.querySelector(`[data-tour-target="${t.tourTarget}"]`);if(!e||!this._isVisible(e)){this.currentIdx<this.hints.length-1?(this.currentIdx++,this._positionHint(this.hints[this.currentIdx])):this.finishTour();return;}e.scrollIntoView({behavior:"smooth",block:"nearest"}),this._layoutTimer=setTimeout(()=>{this.ngZone.run(()=>{let i=e.getBoundingClientRect(),o=i.top-Qf,a=i.left-Qf,r=i.width+Qf*2,l=i.height+Qf*2,p,d;switch(t.position){case"top":p=o-eh-200,d=this._clampLeft(i.left);break;case"left":p=i.top,d=a-eh-lM,d<I0&&(p=i.bottom+Qf+eh,d=this._clampLeft(i.left));break;case"right":p=i.top,d=a+r+eh,d+lM>window.innerWidth-I0&&(p=i.bottom+Qf+eh,d=this._clampLeft(i.left));break;default:p=o+l+eh,d=this._clampLeft(i.left);break;}p=Math.max(I0,p),this.layout={ringTop:o,ringLeft:a,ringWidth:r,ringHeight:l,bubbleTop:p,bubbleLeft:d},this.visible=!0,this.cdr.markForCheck();});},150);}_clampLeft(t){return Math.max(I0,Math.min(t,window.innerWidth-lM-I0));}_isVisible(t){let e=t.getBoundingClientRect();return e.width>0&&e.height>
5950&&e.top<window.innerHeight&&e.bottom>0;}_clearTimer(){this._layoutTimer!==null&&(clearTimeout(this._layoutTimer),this._layoutTimer=null);}static ɵfac=function(e){return new(e||n)(le(Pa),le(ya));};static ɵcmp=Te({type:n,selectors:[["app-project-onboarding"]],inputs:{projectId:"projectId",active:"active"},features:[ki],decls:1,vars:1,consts:()=>{let t;t="Close tour";let e;e=" Skip ";let i;i="Got it!";let o;return o="Next",[e,i,o,[1,"onboarding-ring",3,"click"],[1,"onboarding-backdrop",3,"click"],["role","dialog","aria-modal","false",1,"onboarding-bubble"],[1,"bubble-header"],[1,"bubble-icon-wrap"],[1,"bubble-title"],["mat-icon-button","","matTooltip",t,"aria-label","Close tour",1,"bubble-close-btn",3,"click"],[1,"bubble-message"],[1,"bubble-footer"],[1,"bubble-dots"],[1,"bubble-dot",3,"bubble-dot-active"],[1,"bubble-nav"],["mat-button","",1,"skip-btn",3,"click"],["mat-flat-button","","color","primary",3,"click"],[1,"bubble-dot"]];},template:function(e,i){e&1&&S(0,Rte,24,17),e&2&&M(i.visible&&i.layout?0:-1);},dependencies:[ut,$e,Qe,Qt,ha,We,Xe,$t,_n],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
595.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.onboarding-ring[_ngcontent-%COMP%]{position:fixed;z-index:9001;border-radius:8px;border:2px solid #465d91;pointer-events:none;box-shadow:0 0 0 9999px #00000085;transition:top .35s cubic-bezier(.4,0,.2,1),left .35s cubic-bezier(.4,0,.2,1),width .35s cubic-bezier(.4,0,.2,1),height .35s cubic-bezier(.4,0,.2,1)}.onboarding-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:9000;background:transparent;cursor:pointer}.onboarding-bubble[_ngcontent-%COMP%]{position:fixed;z-index:9002;width:340px;background:#fff;border-radius:12px;box-shadow:0 8px 24px #0000002e,0 2px 6px #0000001a;padding:16px;transition:top .35s cubic-bezier(.4,0,.2,1),left .35s cubic-bezier(.4,0,.2,1);animation:_ngcontent-%COMP%_bubble-appear .28s cubic-bezier(.4,0,.2,1) both}@keyframes _ngcontent-%COMP%_bubble-appear{0%{opacity:0;transform:scale(.88) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}.bubble-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:10px}.bubble-icon-wrap[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%;background-color:#465d911f;display:flex;align-items:center;justify-content:center;flex-shrink:0}.bubble-icon-wrap[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91;font-size:20px;width:20px;height:20px}.bubble-title[_ngcontent-%COMP%]{font-size:.95rem;font-weight:600;color:#000000de;flex:1}.bubble-close-btn[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px;flex-shrink:0}.bubble-close-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#0006!important}.bubble-close-btn[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#000000b3!important}.bubble-message[_ngcontent-%COMP%]{font-size:.85rem;color:#000000a6;line-height:1.5;margin:0 0 14px}.bubble-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.bubble-dots[_ngcontent-%COMP%]{display:flex;gap:5px;align-items:center}
595.bubble-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background-color:#0000002e;transition:background-color .25s ease,transform .25s ease}.bubble-dot.bubble-dot-active[_ngcontent-%COMP%]{background-color:#465d91;transform:scale(1.25)}.bubble-nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.skip-btn[_ngcontent-%COMP%]{color:#00000073!important;font-size:.8rem}.skip-btn[_ngcontent-%COMP%]:hover{color:#000000a6!important}"]});};var iu=(n,t)=>t.id,Nte=(n,t)=>t.systemId,Ate=(n,t)=>t.changeId,Dte=(n,t)=>t.capabilityId;function jte(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function Lte(n,t){n&1&&(s(0,"mat-icon",46),u(1,"autorenew"),c());}function zte(n,t){n&1&&(s(0,"span",47),q(1,8),c());}function Fte(n,t){n&1&&(s(0,"span",47),q(1,9),c());}function Bte(n,t){if(n&1&&(s(0,"div",48)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"span"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function $te(n,t){if(n&1&&(s(0,"div",49)(1,"div",64)(2,"div",65),q(3,10),c(),s(4,"div",66),u(5),c(),s(6,"div",67),q(7,11),c()(),s(8,"div",64)(9,"div",65),q(10,12),c(),s(11,"div",66),u(12),c(),s(13,"div",67)(14,"span"),q(15,13),c()()(),s(16,"div",64)(17,"div",65),q(18,14),c(),s(19,"div",68),u(20),c(),s(21,"div",67),q(22,15),c()(),s(23,"div",64)(24,"div",65),q(25,16),c(),s(26,"div",68),u(27),c(),s(28,"div",67),u(29),c()()()),n&2){let e=x();m(5),G(e.totalChanges),m(7),G(e.totalActiveImpacts),m(8),G(e.formatNumber(e.totalEffortDays)),m(7),G(e.formatCurrency(e.totalCost)),m(2),_e("@ ",e.formatCurrency(e.positioningParams.dailyRate)," / day");}}function Vte(n,t){if(n&1&&(s(0,"mat-panel-description",52),u(1),c()),n&2){let e=x();m(),Hn(" ",e.selectedScale.name," \xB7 ",e.formatCurrency(e.positioningParams.dailyRate),"/day ");}}function Gte(n,t){if(n&1&&(s(0,"mat-option",56),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function qte(n,t){if(n&1&&(s(0,"div",57)(1,"span",69),q(2,17),c(),s(3,"div",70)(4,"span",71),u(5),c(),s(6,"span",72),u(7),c(),s(8,"span",73),u(9),c(),s(10,"span",74),u(11),c(),s(12,"span",75),u(13),c()()()),n&2){let e=x();m(5),_e("XS: ",e.selectedScale.XS),m(2),_e("S: ",e.selectedScale.S),m(2),_e("M: ",e.selectedScale.M),m(2),_e("L: ",e.selectedScale.L),m(2),_e("XL: ",e.selectedScale.XL);}}function Jte(n,t){n&1&&(s(0,"span",58),q(1,18),c());}function Hte(n,t){if(n&1&&(s(0,"span",79),u(1),c()),n&2){let e=x(2);m(),_e("",e.totalCapabilityImpacts," impact(s)");}}function Ute(n,t){if(n&1&&(s(0,"div",60)(1,"div",76)(2,"mat-icon",77),u(3,"insights"),c(),s(4,"span",78),q(5,19),c(),S(6,Hte,2,1,"span",79),c(),s(7,"p",80),u(8),c()()),n&2){let e=x();m(6),M(e.totalCapabilityImpacts>0?6:-1),m(2),G(e.summary);}}function Wte(n,t){n&1&&(s(0,"div",61)(1,"mat-icon"),u(2,"manage_search"),c(),s(3,"span"),q(4,20),c()());}function Xte(n,t){if(n&1&&(s(0,"mat-icon",104),u(1,"help_outline"),c(),s(2,"span",105),u(3),c()),n&2){let e=x().$implicit;m(3),G(e.systemName);}}function Yte(n,t){if(n&1){let e=oe();s(0,"mat-icon",106),u(1),c(),s(2,"button",107),E("click",function(o){k(e);let a=x().$implicit,r=x(2);return R(r.navigateToComponent(a.systemId,o));}),u(3),c();}if(n&2){let e=x().$implicit;m(),G(e.isSubComponent?"widgets":"dns"),m(),N("matTooltip",e.systemName),m(),_e(" ",e.systemName," ");}}function Kte(n,t){if(n&1&&(s(0,"span",102),u(1),c()),n&2){let e=x().$implicit;m(),G(e.parentName);}}function Zte(n,t){n&1&&(s(0,"span",103),u(1,"\u2014"),c());}function Qte(n,t){if(n&1&&(s(0,"tr",99)(1,"td",100),S(2,Xte,4,1)(3,Yte,4,3),c(),s(4,"td",101),S(5,Kte,2,1,"span",102)(6,Zte,2,0,"span",103),c(),s(7,"td",95)(8,"span",96),u(9),c()(),s(10,"td",97),u(11),c(),s(12,"td",98),u(13),c()()),n&2){let e=t.$implicit,i=x(2);Ue("effort-row-sub",e.isSubComponent)("effort-row-unattributed",e.systemId==="__unattributed__"),m(2),M(e.systemId==="__unattributed__"?2:3),m(3),M(e.parentName?5:6),m(4),G(e.impactCount),m(2),_e(" ",i.formatNumber(e.effortDays)," "),m(2),_e(" ",i.formatCurrency(e.cost)," ");}}function ene(n,t){if(n&1&&(s(0,"div",62)(1,"div",81)(2,"mat-icon",82),u(3,"table_chart"),c(),s(4,"span",83),q(5,21),c(),s(6,"span",84),u(7),c()(),s(8,"div",85)(9,"table",86)(10,"thead")(11,"tr")(12,"th",87),q(13,22),c(),s(14,"th",88),q(15,23),c(),s(16,"th",89),q(17,24),c(),s(18,"th",90),q(19,25),c(),s(20,"th",91),q(21,26),c()()(),s(22,"tbody"),be(23,Qte,14,9,"tr",92,Nte),c(),s(25,"tfoot")(26,"tr",93)(27,"td",94),q(28,27),c(),s(29,"td",95)(30,"span",96
595),u(31),c()(),s(32,"td",97),u(33),c(),s(34,"td",98),u(35),c()()()()()()),n&2){let e=x();m(7),_e("",e.systemEffortTable.length," system(s)"),m(16),ye(e.systemEffortTable),m(8),G(e.systemEffortTotals.impactCount),m(2),_e(" ",e.formatNumber(e.systemEffortTotals.effortDays)," "),m(2),_e(" ",e.formatCurrency(e.systemEffortTotals.cost)," ");}}function tne(n,t){if(n&1&&(s(0,"span",113)(1,"mat-icon",119),u(2,"schedule"),c(),u(3),c()),n&2){let e=x(2).$implicit,i=x(2);m(3),_e(" ",i.formatNumber(i.getBpEffortDays(e.id))," days ");}}function nne(n,t){n&1&&(s(0,"div",115)(1,"mat-icon"),u(2,"pending_actions"),c(),s(3,"span"),q(4,29),c()());}function ine(n,t){if(n&1){let e=oe();s(0,"div",120)(1,"div",123)(2,"span",124),u(3),c(),s(4,"p",125),u(5),c()(),s(6,"button",126),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(2);return R(r.startEditChange(a.id,o.changeId,o.changeDescription));}),s(7,"mat-icon"),u(8,"edit"),c()(),s(9,"button",127),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(2);return R(r.addImpact(a.id,o.changeId));}),s(10,"mat-icon"),u(11,"add_circle_outline"),c()(),s(12,"button",128),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(2);return R(r.deleteChange(a.id,o.changeId));}),s(13,"mat-icon"),u(14,"delete_outline"),c()()();}if(n&2){let e=x().$implicit;m(3),G(e.changeId),m(2),G(e.changeDescription);}}function one(n,t){if(n&1){let e=oe();s(0,"div",121)(1,"mat-form-field",129)(2,"mat-label"),q(3,30),c(),s(4,"input",130),Mt("ngModelChange",function(o){k(e);let a=x().$implicit,r=x(2).$implicit,l=x(2);return St(l.changeBuffer[l.changeKey(r.id,a.changeId)].changeId,o)||(l.changeBuffer[l.changeKey(r.id,a.changeId)].changeId=o),R(o);}),c()(),s(5,"mat-form-field",129)(6,"mat-label"),q(7,31),c(),s(8,"textarea",131),Mt("ngModelChange",function(o){k(e);let a=x().$implicit,r=x(2).$implicit,l=x(2);return St(l.changeBuffer[l.changeKey(r.id,a.changeId)].changeDescription,o)||(l.changeBuffer[l.changeKey(r.id,a.changeId)].changeDescription=o),R(o);}),u(9," "),c()(),s(10,"div",132)(11,"button",133),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(2);return R(r.saveChange(a.id,o.changeId));}),q(12,32),c(),s(13,"button",134),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(2);return R(r.cancelEditChange(a.id,o.changeId));}),q(14,33),c()()();}if(n&2){let e=x().$implicit,i=x(2).$implicit,o=x(2);m(4),wt("ngModel",o.changeBuffer[o.changeKey(i.id,e.changeId)].changeId),m(4),wt("ngModel",o.changeBuffer[o.changeKey(i.id,e.changeId)].changeDescription);}}function ane(n,t){if(n&1&&(s(0,"span",137),u(1),c()),n&2){let e=x().$implicit,i=x(6);N("ngClass",i.getComplexityClass(e.complexity))("matTooltip",i.getComplexityLabel(e.complexity)),m(),_e(" ",e.complexity," ");}}function rne(n,t){if(n&1){let e=oe();s(0,"button",146),E("click",function(o){k(e);let a=x().$implicit,r=x(6);return R(r.navigateToCapability(a.capabilityId,o));}),s(1,"mat-icon",147),u(2,"open_in_new"),c()();}}function sne(n,t){if(n&1){let e=oe();s(0,"span",150)(1,"button",151),E("click",function(){let o=k(e).$implicit,a=x(3).$implicit,r=x(2).$implicit,l=x(2).$implicit,p=x(2);return R(p.toggleComponentSelection(l.id,r.changeId,a.capabilityId,o.id));}),s(2,"mat-icon",152),u(3),c(),s(4,"span",153),u(5),c()(),s(6,"button",154),E("click",function(o){let a=k(e).$implicit,r=x(9);return R(r.navigateToComponent(a.id,o));}),s(7,"mat-icon",155),u(8,"open_in_new"),c()()();}if(n&2){let e=t.$implicit,i=x(3).$implicit,o=x(2).$implicit,a=x(2).$implicit,r=x(2);m(),Ue("comp-chip-selected",r.isComponentSelected(a.id,o.changeId,i.capabilityId,e.id)),N("matTooltip",e.description||e.name),m(2),_e(" ",r.isComponentSelected(a.id,o.changeId,i.capabilityId,e.id)?"check_circle":"widgets"," "),m(2),G(e.name);}}function lne(n,t){if(n&1&&(s(0,"div",149),be(1,sne,9,5,"span",150,iu),c()),n&2){let e=x(2).$implicit,i=x(6);m(),ye(i.getComponentsForCapability(e.capabilityId));}}function cne(n,t){if(n&1){let e=oe();s(0,"span",156)(1,"button",157),E("click",function(){let o=k(e).$implicit,a=x(3).$implicit,r=x(2).$implicit,l=x(2).$implicit,p=x(2);return R(p.toggleComponentSelection(l.id,r.changeId,a.capabilityId,o.id));}),s(2,"mat-icon",152),u(3),c(),s(4,"span",153),u(5),c()(),s(6,"button",158),E("click",function(o){let a=k(e).$implicit,r=x(9);return R(r.navigateToComponent(a.id,o));}),s(7,"mat-icon",155),u(8,"open_in_new"),c()()();}if(n&2){let e=t.$implicit;m(),N("matTooltip",e.description||e.name),m(2),G(e.isSubComponent?"widgets":"dns"),m(2),G(e.name);}}function pne(n,t){if(n&1&&(s(0,"div",149),be(1,cne,9,3,"span",156,iu),c()),n&2){let e=x(2).$implicit,i=x(2).$implicit,o=x(2).$implicit,a=x(2);m(),ye(a.getManuallySelectedSystems(o.id,i.changeId,e.capabilityId));}}function dne(n,t){if(n&1&&(s(0,"span",148),u(1),c(),S(2,lne,3,0,"div",149),S(3,pne,3,0,"div",149)),n&2){let e=x().$implicit,i=x(2).$implicit,o=x(2).$implicit,a=x(2);m(),G(e.rationale),m(),M(a.getComponentsForCapability(e.capabilityId).length>0?2:-1),m(),M(a.getManuallySelectedSystems(o.id,i.changeId,e.capabilityId).length>0?3:-1);}}function mne(n,t){if(n&1&&(s(0,"mat-option",176)(1,"div",177)(2,"span",178)(3,"span"),u(4),c(),u(5),c(),s(6,"span",179),u(7),c()()()),n&2){let e=t.$implicit,i=x(8);ji("cap-option cap-level-"+e.level),N("value",e)("disabled",e.level!==3)("matTooltip",e.description),m(),Ci("padding-left",i.getCapabilityIndent(e)),m(2),ji("cap-level-badge cap-level-badge-"+e.level),m(),_e("L",e.level),m(),_e(" ",e.name," "),m(2),G(i.getCapabilityBreadcrumb(e));}}function une(n,t){if(n&1&&(s(0,"mat-option",56),u(1),c()),n&2){let e=t.$implicit;N("value",e),m(),G(e);}}function fne(n,t){if(n&1&&(s(0,"span",185),u(1),c()),n&2){let e=x().$implicit,i=x(8);m(),G(i.getParentSystemName(e));}}function hne(n,t){if(n&1&&(s(0,"span",185),u(1),c()),n&2){let e=x().$implicit;m(),G(e.editor);}}function _ne(n,t){if(n&1&&(s(0,"mat-option",180)(1,"div",181)(2,"mat-icon",182),u(3),c(),s(4,"div",183)(5,"span",184),u(6),c(),S(7,fne,2,1,"span",185)(8,hne,2,1,"span",185),c()()()),n&2){let e=t.$implicit,i=x(8);Ue("sys-option-subcomponent",e.isSubComponent),N("value",e)("matTooltip",e.description),m(3),G(e.isSubComponent?"widgets":"dns"),m(3),G(e.n
595ame),m(),M(e.isSubComponent&&i.getParentSystemName(e)?7:e.editor?8:-1);}}function gne(n,t){n&1&&(s(0,"mat-option",173)(1,"span",186),q(2,42),c()());}function xne(n,t){if(n&1){let e=oe();s(0,"span",156)(1,"button",187)(2,"mat-icon",152),u(3),c(),s(4,"span",153),u(5),c()(),s(6,"button",188),E("click",function(){let o=k(e).$implicit,a=x(3).$implicit,r=x(2).$implicit,l=x(2).$implicit,p=x(2);return R(p.toggleComponentSelection(l.id,r.changeId,a.capabilityId,o.id));}),s(7,"mat-icon",155),u(8,"close"),c()()();}if(n&2){let e=t.$implicit;m(),N("matTooltip",e.description||e.name),m(2),G(e.isSubComponent?"widgets":"dns"),m(2),G(e.name);}}function Cne(n,t){if(n&1&&(s(0,"div",174),be(1,xne,9,3,"span",156,iu),c()),n&2){let e=x(2).$implicit,i=x(2).$implicit,o=x(2).$implicit,a=x(2);m(),ye(a.getManuallySelectedSystems(o.id,i.changeId,e.capabilityId));}}function vne(n,t){if(n&1){let e=oe();s(0,"div",142)(1,"mat-form-field",159)(2,"mat-label"),q(3,35),c(),s(4,"input",160),Mt("ngModelChange",function(o){k(e),x();let a=id(0),r=x(6);return St(r.capabilitySearchText[a],o)||(r.capabilitySearchText[a]=o),R(o);}),c(),s(5,"mat-autocomplete",161,0),E("optionSelected",function(o){k(e),x();let a=id(0),r=x(6);return R(r.selectCapability(a,o.option.value));}),be(7,mne,8,12,"mat-option",162,iu),c()(),s(9,"mat-form-field",163)(10,"mat-label"),q(11,36),c(),s(12,"mat-select",164),Mt("ngModelChange",function(o){k(e),x();let a=id(0),r=x(6);return St(r.impactBuffer[a].complexity,o)||(r.impactBuffer[a].complexity=o),R(o);}),be(13,une,2,2,"mat-option",56,Pt),c()(),s(15,"mat-form-field",165)(16,"mat-label"),q(17,37),c(),s(18,"textarea",166),Mt("ngModelChange",function(o){k(e),x();let a=id(0),r=x(6);return St(r.impactBuffer[a].rationale,o)||(r.impactBuffer[a].rationale=o),R(o);}),u(19," "),c()(),s(20,"div",167)(21,"mat-form-field",168)(22,"mat-label"),q(23,38),c(),s(24,"mat-icon",169),u(25,"dns"),c(),s(26,"input",170),Mt("ngModelChange",function(o){k(e),x();let a=id(0),r=x(6);return St(r.systemSearchText[a],o)||(r.systemSearchText[a]=o),R(o);}),c(),s(27,"mat-autocomplete",171,1),E("optionSelected",function(o){k(e);let a=x().$implicit,r=id(0),l=x(2).$implicit,p=x(2).$implicit,d=x(2);return R(d.selectSystemForImpact(r,p.id,l.changeId,a.capabilityId,o.option.value));}),be(29,_ne,9,7,"mat-option",172,iu),S(31,gne,3,0,"mat-option",173),c(),s(32,"mat-hint"),q(33,39),c()(),S(34,Cne,3,0,"div",174),c(),s(35,"div",175)(36,"button",133),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(2).$implicit,l=x(2);return R(l.saveImpact(r.id,a.changeId,o.capabilityId));}),q(37,40),c(),s(38,"button",134),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(2).$implicit,l=x(2);return R(l.cancelEditImpact(r.id,a.changeId,o.capabilityId));}),q(39,41),c()()();}if(n&2){let e=bn(6),i=bn(28),o=x().$implicit,a=id(0),r=x(2).$implicit,l=x(2).$implicit,p=x(2);m(4),wt("ngModel",p.capabilitySearchText[a]),N("matAutocomplete",e),m(3),ye(p.filteredCapabilities(a)),m(5),wt("ngModel",p.impactBuffer[a].complexity),m(),ye(p.complexityOptions),m(5),wt("ngModel",p.impactBuffer[a].rationale),m(8),wt("ngModel",p.systemSearchText[a]),N("matAutocomplete",i),m(),N("displayWith",p.displaySystemFn),m(2),ye(p.filteredSystems(a,l.id,r.changeId,o.capabilityId)),m(2),M(p.filteredSystems(a,l.id,r.changeId,o.capabilityId).length===0&&p.systemSearchText[a]?31:-1),m(3),M(p.getManuallySelectedSystems(l.id,r.changeId,o.capabilityId).length>0?34:-1);}}function bne(n,t){if(n&1){let e=oe();s(0,"button",189),E("click",function(){k(e);let o=x().$implicit,a=x(2).$implicit,r=x(4);return R(r.startEditImpact(a.changeId,o.capabilityId,o.complexity,o.rationale,o.capabilityName));}),s(1,"mat-icon"),u(2,"edit"),c()();}}function yne(n,t){if(n&1){let e=oe();mT(0),s(1,"div",136),S(2,ane,2,3,"span",137),s(3,"div",138)(4,"div",139)(5,"span",140),u(6),c(),S(7,rne,3,0,"button",141),c(),S(8,dne,4,3),S(9,vne,40,9,"div",142),c(),s(10,"div",143),S(11,bne,3,0,"button",144),s(12,"button",145),E("click",function(){let o=k(e).$implicit,a=x(2).$implicit,r=x(2).$implicit,l=x(2);return R(l.deleteImpact(r.id,a.changeId,o.capabilityId));}),s(13,"mat-icon"),u(14,"delete_outline"),c()()()();}if(n&2){let e=t.$implicit,i=x(2).$implicit,o=x(4),a=uT(o.annKey(i.changeId,e.capabilityId));m(2),M(o.editingImpact[a]?-1:2),m(4),G(e.capabilityName),m(),M(e.capabilityId?7:-1),m(),M(o.editingImpact[a]?-1:8),m(),M(o.editingImpact[a]?9:-1),m(2),M(o.editingImpact[a]?-1:11);}}function Pne(n,t){if(n&1&&(s(0,"div",122)(1,"div",135),q(2,34),c(),be(3,yne,15,7,"div",136,Dte),c()),n&2){let e=x().$implicit;m(3),ye(e.capabilityImpacts);}}function wne(n,t){if(n&1&&(s(0,"div",116),S(1,ine,15,2,"div",120),S(2,one,15,2,"div",121),S(3,Pne,5,0,"div",122),c()),n&2){let e=t.$implicit,i=x(2).$implicit,o=x(2);m(),M(o.editingChange[o.changeKey(i.id,e.changeId)]?-1:1),m(),M(o.editingChange[o.changeKey(i.id,e.changeId)]?2:-1),m(),M(e.capabilityImpacts&&e.capabilityImpacts.length>0?3:-1);}}function Sne(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",108)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"div",109)(4,"span",110),u(5),c(),s(6,"span",111),u(7),c(),s(8,"span",112),u(9),c(),S(10,tne,4,1,"span",113),c()()(),s(11,"div",114),S(12,nne,5,0,"div",115),be(13,wne,4,3,"div",116,Ate),s(15,"div",117)(16,"button",118),E("click",function(){k(e);let o=x().$implicit,a=x(2);return R(a.addChange(o.id));}),s(17,"mat-icon"),u(18,"add"),c(),s(19,"span"),q(20,28),c()()()()();}if(n&2){let e=x().$implicit,i=x(2);N("expanded",!0),m(5),G(e.number),m(2),G(e.name),m(2),_e(" ",i.getChanges(e.id).length," change(s) "),m(),M(i.selectedScale&&i.getBpEffortDays(e.id)>0?10:-1),m(2),M(i.hasChanges(e.id)?-1:12),m(),ye(i.getChanges(e.id));}}function Mne(n,t){if(n&1&&S(0,Sne,21,6,"mat-expansion-panel",108),n&2){let e=t.$implicit;M(e.id?0:-1);}}function One(n,t){if(n&1&&(s(0,"mat-accordion",63),be(1,Mne,1,1,null,null,iu),c()),n&2){let e=x();m(),ye(e.businessProcesses);}}var th=class n{constructor(t,e,i,o){this.firebase=t;this.localeService=e;this.snackBar=i;this.router=o;}firebase;localeService;snackBar;router;projectId;object;businessProcesses;totalCostChange=new At();isLoading=!1;error=null;summary=null;bpChanges={};annotations={};editingChange={};changeBuffer={};pendingNewChangeKeys=new Set();editingImpact={};pendingNewImpactKeys=new Set();impactBuffer={};complexityOptions=["XS","S","M","L","XL"];displaySystemFn=()=>"";allCapabilities=[];allCapabilitiesLoaded=!1;capabilitySearchText={};allSystems=[];allSystemsLoaded=!1;systemSearchText={};availableScales=[];selectedScale;positioningParams={selectedScaleId:"",dailyRate:800};totalChanges=0;totalActiveImpacts=0;totalEffortDays=0;totalCost=0;capabilityComponentMap=new Map();systemComponentMap=new Map();capabilityRecord={};bpUnsubscribes=[];summaryUnsubscribe=null;ngOnChanges(t){(t.projectId||t.businessProcesses)&&(this.cleanup(),this.bpChanges={},this.annotations={},this.summary=null,this.error=null,this.loadScales(),this.loadSavedParams(),this.subscribeToSummary(),this.subscribeToBpChanges());}ngOnDestroy(){this.cleanup();}
595cleanup(){this.bpUnsubscribes.forEach(t=>t()),this.bpUnsubscribes=[],this.summaryUnsubscribe&&(this.summaryUnsubscribe(),this.summaryUnsubscribe=null);}subscribeToSummary(){if(!this.projectId)return;let t=ge(this.firebase.firestore,"projects",this.projectId,"positioningAnalysis","latest");this.summaryUnsubscribe=Bn(t,e=>{if(!e.exists())return;let i=e.data();i?.completed&&i?.summary&&(this.summary=i.summary);});}subscribeToBpChanges(){if(!(!this.projectId||!this.businessProcesses?.length))for(let t of this.businessProcesses){if(!t.id)continue;let e=t.id,i=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",e),o=Bn(i,a=>{if(!a.exists())return;let r=a.data();r?.positioningChanges&&Array.isArray(r.positioningChanges)&&(this.bpChanges=Ve(X({},this.bpChanges),{[e]:r.positioningChanges}),this.recalculateStats(),this.loadCapabilitiesForImpacts());});this.bpUnsubscribes.push(o),this.loadAnnotations(e);}}loadAnnotations(t){return $(this,null,function*(){if(this.projectId)try{let e=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",t,"positioning","annotations"),i=yield yt(e);i.exists()&&(this.annotations=Ve(X({},this.annotations),{[t]:i.data()}));}catch(e){}});}launchAnalysis(){return $(this,null,function*(){if(!this.projectId||!this.object){this.snackBar.open("Project data not available yet.","",{duration:3e3});return;}if(!this.businessProcesses?.length){this.snackBar.open("No business processes found. Generate them first.","",{duration:3e3});return;}this.isLoading=!0,this.error=null,this.summary=null;try{let a=ei(this.firebase.functions,"functionAnalyzeProjectPositioningStream"),r={projectId:this.projectId,project:this.object,businessProcesses:this.businessProcesses,locale:this.localeService.getSelectedLocaleShort()},{stream:l,data:p}=yield a.stream(r);try{for(var t=Co(l),e,i,o;e=!(i=yield t.next()).done;e=!1){let d=i.value;let f=d;f?.summary&&(this.summary=f.summary);}}catch(i){o=[i];}finally{try{e&&(i=t.return)&&(yield i.call(t));}finally{if(o)throw o[0];}}yield p,this.snackBar.open("Positioning analysis complete.","",{duration:3e3});}catch(a){console.error("Positioning analysis error:",a),this.error=a?.message||"An unexpected error occurred.",this.snackBar.open("Error running positioning analysis.","",{duration:3e3});}finally{this.isLoading=!1;}});}hasChanges(t){return(this.bpChanges[t]?.length??0)>0;}getChanges(t){return this.bpChanges[t]??[];}get hasAnyChanges(){return Object.values(this.bpChanges).some(t=>t.length>0);}annKey(t,e){return`${t}_${e}`;}deleteImpact(t,e,i){return $(this,null,function*(){if(!this.projectId)return;let o=(this.bpChanges[t]??[]).map(a=>a.changeId!==e?a:Ve(X({},a),{capabilityImpacts:(a.capabilityImpacts??[]).filter(r=>r.capabilityId!==i)}));this.bpChanges=Ve(X({},this.bpChanges),{[t]:o});try{let a=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",t);yield Dt(a,{positioningChanges:o},{merge:!0}),this.snackBar.open("Impact deleted.","",{duration:2e3}),this.recalculateStats();}catch(a){this.snackBar.open("Failed to delete impact.","",{duration:3e3});}});}changeKey(t,e){return`${t}_${e}`;}startEditChange(t,e,i){let o=this.changeKey(t,e);this.changeBuffer[o]={changeId:e,changeDescription:i},this.editingChange[o]=!0;}cancelEditChange(t,e){let i=this.changeKey(t,e);this.editingChange[i]=!1,this.pendingNewChangeKeys.has(i)&&(this.pendingNewChangeKeys.delete(i),this.bpChanges=Ve(X({},this.bpChanges),{[t]:(this.bpChanges[t]??[]).filter(o=>o.changeId!==e)}));}saveChange(t,e){return $(this,null,function*(){if(!this.projectId)return;let i=this.changeKey(t,e),o=this.changeBuffer[i];if(!o)return;let a=this.bpChanges[t]?[...this.bpChanges[t]]:[],r=a.findIndex(l=>l.changeId===e);r!==-1&&(a[r]=Ve(X({},a[r]),{changeId:o.changeId,changeDescription:o.changeDescription}),this.bpChanges=Ve(X({},this.bpChanges),{[t]:a}));try{let l=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",t);yield Dt(l,{positioningChanges:a},{merge:!0}),this.snackBar.open("Change updated.","",{duration:2e3});}catch(l){this.snackBar.open("Failed to save change.","",{duration:3e3});}this.pendingNewChangeKeys.delete(i),this.editingChange[i]=!1;});}deleteChange(t,e){return $(this,null,function*(){if(!this.projectId)return;let i=(this.bpChanges[t]??[]).filter(o=>o.changeId!==e);this.bpChanges=Ve(X({},this.bpChanges),{[t]:i});try{let o=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",t);yield Dt(o,{positioningChanges:i},{merge:!0}),this.snackBar.open("Change deleted.","",{duration:2e3}),this.recalculateStats();}catch(o){this.snackBar.open("Failed to delete change.","",{duration:3e3});}});}addChange(t){let e=`new_${Date.now()}`,i=this.changeKey(t,e),o={changeId:e,changeDescription:"",capabilityImpacts:[]};this.bpChanges=Ve(X({},this.bpChanges),{[t]:[...(this.bpChanges[t]??[]),o]}),this.changeBuffer[i]={changeId:"",changeDescription:""},this.editingChange[i]=!0,this.pendingNewChangeKeys.add(i);}startEditImpact(t,e,i,o,a){let r=this.annKey(t,e);this.impactBuffer[r]={complexity:i,rationale:o,capabilityId:e,capabilityName:a},this.capabilitySearchText[r]=a,this.systemSearchText[r]="",this.editingImpact[r]=!0,this.loadAllCapabilitiesOnce(),this.loadAllSystemsOnce();}cancelEditImpact(t,e,i){let o=this.annKey(e,i);if(this.editingImpact[o]=!1,this.pendingNewImpactKeys.has(o)){this.pendingNewImpactKeys.delete(o);let a=(this.bpChanges[t]??[]).map(r=>r.changeId!==e?r:Ve(X({},r),{capabilityImpacts:(r.capabilityImpacts??[]).filter(l=>l.capabilityId!==i)}));this.bpChanges=Ve(X({},this.bpChanges),{[t]:a});}}addImpact(t,e){let i=`new_${Date.now()}`,o=this.annKey(e,i),a={capabilityId:i,capabilityName:"",complexity:"M",rationale:""}
595,r=(this.bpChanges[t]??[]).map(l=>l.changeId!==e?l:Ve(X({},l),{capabilityImpacts:[...(l.capabilityImpacts??[]),a]}));this.bpChanges=Ve(X({},this.bpChanges),{[t]:r}),this.impactBuffer[o]={complexity:"M",rationale:"",capabilityId:"",capabilityName:""},this.capabilitySearchText[o]="",this.editingImpact[o]=!0,this.pendingNewImpactKeys.add(o),this.loadAllCapabilitiesOnce();}saveImpact(t,e,i){return $(this,null,function*(){if(!this.projectId)return;let o=this.annKey(e,i),a=this.impactBuffer[o];if(!a)return;let r=this.bpChanges[t]?[...this.bpChanges[t]]:[],l=r.findIndex(p=>p.changeId===e);if(l!==-1){let p=[...(r[l].capabilityImpacts??[])],d=p.findIndex(f=>f.capabilityId===i);d!==-1&&(p[d]=Ve(X({},p[d]),{complexity:a.complexity,rationale:a.rationale,capabilityId:a.capabilityId||i,capabilityName:a.capabilityName||p[d].capabilityName}),r[l]=Ve(X({},r[l]),{capabilityImpacts:p}),this.bpChanges=Ve(X({},this.bpChanges),{[t]:r}));}try{let p=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",t);yield Dt(p,{positioningChanges:r},{merge:!0}),this.snackBar.open("Impact updated.","",{duration:2e3}),this.recalculateStats();}catch(p){this.snackBar.open("Failed to save impact.","",{duration:3e3});}this.pendingNewImpactKeys.delete(o),this.editingImpact[o]=!1;});}loadAllCapabilitiesOnce(){return $(this,null,function*(){if(!this.allCapabilitiesLoaded)try{let e=(yield at(we(this.firebase.firestore,"businessCapabilityModels"))).docs.map(a=>a.id),i=yield Promise.all(e.map(a=>at(mt(we(this.firebase.firestore,"businessCapabilities"),Ro("businessCapabilityModelId","==",a))))),o=[];for(let a of i)for(let r of a.docs){let l=X({id:r.id},r.data());o.push(l),this.capabilityRecord[l.id]||(this.capabilityRecord=Ve(X({},this.capabilityRecord),{[l.id]:l}));}this.allCapabilities=this.sortCapabilitiesTreeOrder(o),this.allCapabilitiesLoaded=!0;}catch(t){}});}sortCapabilitiesTreeOrder(t){let e=new Set(t.map(r=>r.id)),i=new Map();for(let r of t){let l=r.parentBusinessCapabilityId&&e.has(r.parentBusinessCapabilityId)?r.parentBusinessCapabilityId:"";i.has(l)||i.set(l,[]),i.get(l).push(r);}for(let r of i.values())r.sort((l,p)=>(l.businessCapabilityModelName??"").localeCompare(p.businessCapabilityModelName??"")||l.name.localeCompare(p.name));let o=[],a=r=>{for(let l of i.get(r)??[])o.push(l),a(l.id);};return a(""),o;}filteredCapabilities(t){let e=(this.capabilitySearchText[t]??"").toLowerCase().trim();if(!e)return this.allCapabilities;let i=this.allCapabilities.filter(a=>a.level===3&&(a.name.toLowerCase().includes(e)||(a.description??"").toLowerCase().includes(e))),o=new Set();for(let a of i){o.add(a.id);let r=a;for(;r?.parentBusinessCapabilityId;){let l=this.capabilityRecord[r.parentBusinessCapabilityId];if(l)o.add(l.id),r=l;else break;}}return this.allCapabilities.filter(a=>o.has(a.id));}getCapabilityBreadcrumb(t){let e=[t.businessCapabilityModelName??""],i=t,o=new Set();for(;i?.parentBusinessCapabilityId&&!o.has(i.id);){o.add(i.id);let a=this.capabilityRecord[i.parentBusinessCapabilityId];a&&e.splice(1,0,a.name),i=a;}return e.join(" \u203A ");}getCapabilityIndent(t){return`${((t.level??1)-1)*16}px`;}selectCapability(t,e){this.impactBuffer[t]&&(this.impactBuffer[t].capabilityId=e.id,this.impactBuffer[t].capabilityName=e.name,this.capabilitySearchText[t]=e.name);}getComplexityClass(t){return{XS:"complexity-xs",S:"complexity-s",M:"complexity-m",L:"complexity-l",XL:"complexity-xl"}[t]??"complexity-xs";}getComplexityLabel(t){return{XS:"XS \u2014 Trivial",S:"S \u2014 Simple",M:"M \u2014 Medium",L:"L \u2014 Large",XL:"XL \u2014 Very Large"}[t]??t;}get totalCapabilityImpacts(){let t=0;for(let e of Object.values(this.bpChanges))for(let i of e)t+=i.capabilityImpacts?.length??0;return t;}loadScales(){return $(this,null,function*(){try{let t=yield at(mt(we(this.firebase.firestore,"evaluationscales")));this.availableScales=t.docs.map(i=>X({id:i.id},i.data())).filter(i=>i.target==="project");let e=this.positioningParams.selectedScaleId;this.selectedScale=(e?this.availableScales.find(i=>i.id===e):void 0)||this.availableScales.find(i=>i.isDefault)||this.availableScales[0],this.selectedScale&&(this.positioningParams.selectedScaleId=this.selectedScale.id),this.recalculateStats();}catch(t){}});}loadSavedParams(){return $(this,null,function*(){if(this.projectId)try{let t=ge(this.firebase.firestore,"projects",this.projectId,"positioningAnalysis","latest"),e=yield yt(t);if(e.exists()){let i=e.data();i?.positioningParams&&(this.positioningParams=X(X({},this.positioningParams),i.positioningParams),this.positioningParams.selectedScaleId&&this.availableScales.length>0&&(this.selectedScale=this.availableScales.find(o=>o.id===this.positioningParams.selectedScaleId)||this.selectedScale),this.recalculateStats());}}
595catch(t){}});}recalculateStats(){if(!this.selectedScale){this.totalChanges=0,this.totalActiveImpacts=0,this.totalEffortDays=0,this.totalCost=0;return;}let t={XS:this.selectedScale.XS||0,S:this.selectedScale.S||0,M:this.selectedScale.M||0,L:this.selectedScale.L||0,XL:this.selectedScale.XL||0},e=0,i=0,o=0;for(let a of Object.values(this.bpChanges))for(let r of a){e++;for(let l of r.capabilityImpacts??[])i++,o+=t[l.complexity]??0;}this.totalChanges=e,this.totalActiveImpacts=i,this.totalEffortDays=o,this.totalCost=o*(this.positioningParams.dailyRate||0),this.totalCostChange.emit(this.totalCost);}onScaleChange(t){this.positioningParams.selectedScaleId=t,this.selectedScale=this.availableScales.find(e=>e.id===t),this.recalculateStats(),this.persistParams();}onDailyRateChange(){this.recalculateStats(),this.persistParams();}persistParams(){return $(this,null,function*(){if(this.projectId)try{let t=ge(this.firebase.firestore,"projects",this.projectId,"positioningAnalysis","latest");yield Dt(t,{positioningParams:X({},this.positioningParams)},{merge:!0});}catch(t){}});}formatNumber(t){return new Intl.NumberFormat("en-US",{maximumFractionDigits:1}).format(t);}formatCurrency(t){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(t);}loadComponentsForCapabilities(t){return $(this,null,function*(){if(t.length!==0)try{let i=new Map(),o=new Set();for(let a=0;a<t.length;a+=10){let r=t.slice(a,a+10),l=yield at(mt(we(this.firebase.firestore,"functionalities"),Ro("implementsBusinessCapabilitiesIds","array-contains-any",r)));for(let p of l.docs){let d=X({id:p.id},p.data());if(d.implementedBySystemComponentId){o.add(d.implementedBySystemComponentId);for(let f of d.implementsBusinessCapabilitiesIds??[])i.has(f)||i.set(f,new Set()),i.get(f).add(d.implementedBySystemComponentId);}}}yield Promise.all(Array.from(o).map(a=>$(this,null,function*(){if(this.systemComponentMap.has(a))return;let r=yield yt(ge(this.firebase.firestore,"systemComponents",a));r.exists()&&this.systemComponentMap.set(r.id,X({id:r.id},r.data()));})));for(let[a,r]of i){let l=Array.from(r).map(p=>this.systemComponentMap.get(p)).filter(p=>!!p).sort((p,d)=>p.name.localeCompare(d.name));l.length>0&&this.capabilityComponentMap.set(a,l);}}catch(e){}});}getComponentsForCapability(t){return this.capabilityComponentMap.get(t)??[];}navigateToComponent(t,e){e.stopPropagation(),this.router.navigate(["dashboard","component",t]);}getSelectedComponentIds(t,e,i){return this.annotations[t]?.[this.annKey(e,i)]?.selectedComponentIds??[];}isComponentSelected(t,e,i,o){return this.getSelectedComponentIds(t,e,i).includes(o);}loadCapabilitiesForImpacts(){return $(this,null,function*(){let t=new Set();for(let i of Object.values(this.bpChanges))for(let o of i)for(let a of o.capabilityImpacts??[])a.capabilityId&&!this.capabilityRecord[a.capabilityId]&&t.add(a.capabilityId);if(t.size===0)return;let e=[];try{yield Promise.all(Array.from(t).map(i=>$(this,null,function*(){let o=yield yt(ge(this.firebase.firestore,"businessCapabilities",i));if(o.exists()){let a=X({id:o.id},o.data());this.capabilityRecord=Ve(X({},this.capabilityRecord),{[o.id]:a}),e.push(o.id);}})));}catch(i){}e.length>0&&(yield this.loadComponentsForCapabilities(e));});}navigateToCapability(t,e){e.stopPropagation();let i=this.capabilityRecord[t];console.log(this.capabilityRecord),console.log(t),i?.businessCapabilityModelId&&this.router.navigate(["dashboard","business-capability-model",i.businessCapabilityModelId],{queryParams:{capabilityId:i.id}});}loadAllSystemsOnce(){return $(this,null,function*(){if(!this.allSystemsLoaded)try{let t=yield at(we(this.firebase.firestore,"systemComponents")),e=[],i=[];for(let r of t.docs){let l=X({id:r.id},r.data());this.systemComponentMap.has(l.id)||this.systemComponentMap.set(l.id,l),l.isSubComponent?i.push(l):e.push(l);}e.sort((r,l)=>r.name.localeCompare(l.name)),i.sort((r,l)=>r.name.localeCompare(l.name));let o=[];for(let r of e){o.push(r);for(let l of i.filter(p=>p.parentSystemComponentId===r.id))o.push(l);}let a=new Set(e.map(r=>r.id));for(let r of i.filter(l=>!a.has(l.parentSystemComponentId)))o.push(r);this.allSystems=o,this.allSystemsLoaded=!0;}catch(t){}});}getParentSystemName(t){return!t.isSubComponent||!t.parentSystemComponentId?null:this.systemComponentMap.get(t.parentSystemComponentId)?.name??null;}filteredSystems(t,e,i,o){let a=(this.systemSearchText[t]??"").toLowerCase().trim(),r
595=new Set(this.getSelectedComponentIds(e,i,o)),l=new Set(this.getComponentsForCapability(o).map(p=>p.id));return this.allSystems.filter(p=>!r.has(p.id)&&!l.has(p.id)&&(!a||p.name.toLowerCase().includes(a)||(p.description??"").toLowerCase().includes(a)||(p.editor??"").toLowerCase().includes(a)));}selectSystemForImpact(t,e,i,o,a){return $(this,null,function*(){this.systemComponentMap.has(a.id)||this.systemComponentMap.set(a.id,a),this.isComponentSelected(e,i,o,a.id)||(yield this.toggleComponentSelection(e,i,o,a.id)),this.systemSearchText[t]="";});}getManuallySelectedSystems(t,e,i){let o=new Set(this.getComponentsForCapability(i).map(r=>r.id));return this.getSelectedComponentIds(t,e,i).filter(r=>!o.has(r)).map(r=>this.systemComponentMap.get(r)).filter(r=>!!r);}getBpEffortDays(t){if(!this.selectedScale)return 0;let e={XS:this.selectedScale.XS||0,S:this.selectedScale.S||0,M:this.selectedScale.M||0,L:this.selectedScale.L||0,XL:this.selectedScale.XL||0},i=0;for(let o of this.bpChanges[t]??[])for(let a of o.capabilityImpacts??[])i+=e[a.complexity]??0;return i;}get systemEffortTable(){if(!this.selectedScale)return[];let t={XS:this.selectedScale.XS||0,S:this.selectedScale.S||0,M:this.selectedScale.M||0,L:this.selectedScale.L||0,XL:this.selectedScale.XL||0},e=this.positioningParams.dailyRate||0,i=new Map(),o=0,a=0;for(let[g,b]of Object.entries(this.bpChanges))for(let w of b)for(let T of w.capabilityImpacts??[]){let O=t[T.complexity]??0,V=this.annKey(w.changeId,T.capabilityId),j=this.annotations[g]?.[V]?.selectedComponentIds??[];if(j.length===0)o++,a+=O;else for(let L of j){let A=i.get(L)??{impactCount:0,effortDays:0};i.set(L,{impactCount:A.impactCount+1,effortDays:A.effortDays+O});}}let r=[];for(let[g,{impactCount:b,effortDays:w}]of i){let T=this.systemComponentMap.get(g),O=T?.name??g,V=T?.isSubComponent??!1,j=V&&T?.parentSystemComponentId?this.systemComponentMap.get(T.parentSystemComponentId)?.name??null:null;r.push({systemId:g,systemName:O,isSubComponent:V,parentName:j,impactCount:b,effortDays:w,cost:w*e});}let l=r.filter(g=>!g.isSubComponent).sort((g,b)=>b.effortDays-g.effortDays||g.systemName.localeCompare(b.systemName)),p=r.filter(g=>g.isSubComponent),d=[];for(let g of l){d.push(g);let b=p.filter(w=>w.parentName===g.systemName||this.systemComponentMap.get(w.systemId)?.parentSystemComponentId===g.systemId).sort((w,T)=>T.effortDays-w.effortDays||w.systemName.localeCompare(T.systemName));d.push(...b);}let f=new Set(d.filter(g=>g.isSubComponent).map(g=>g.systemId)),h=p.filter(g=>!f.has(g.systemId)).sort((g,b)=>(g.parentName??"").localeCompare(b.parentName??"")||b.effortDays-g.effortDays);return d.push(...h),o>0&&d.push({systemId:"__unattributed__",systemName:"Non-specified",isSubComponent:!1,parentName:null,impactCount:o,effortDays:a,cost:a*e}),d;}get systemEffortTotals(){let t=this.systemEffortTable;return{impactCount:t.reduce((e,i)=>e+i.impactCount,0),effortDays:t.reduce((e,i)=>e+i.effortDays,0),cost:t.reduce((e,i)=>e+i.cost,0)};}toggleComponentSelection(t,e,i,o){return $(this,null,function*(){let a=this.annKey(e,i),l=[...(this.annotations[t]?.[a]??{selectedComponentIds:[]}).selectedComponentIds],p=l.indexOf(o);p===-1?l.push(o):l.splice(p,1);let d={selectedComponentIds:l};if(this.annotations[t]||(this.annotations[t]={}),this.annotations=Ve(X({},this.annotations),{[t]:Ve(X({},this.annotations[t]),{[a]:d})}),!this.projectId)return;let f=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",t,"positioning","annotations");yield Dt(f,{[a]:d},{merge:!0});});}static ɵfac=function(e){return new(e||n)(le(On),le(To),le(Bt),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-project-positioning"]],inputs:{projectId:"projectId",object:"object",businessProcesses:"businessProcesses"},outputs:{totalCostChange:"totalCostChange"},features:[ki],decls:40,vars:17,consts:()=>{let t;t="Run AI positioning analysis across all business processes";let e;e="Launch Positioning Analysis";let i;i="Project T-Shirt Scale & Rate";let o;o="Project T-Shirt Scale";let a;a="Maps capability complexity to man-days";let r;r="Daily Rate ($)";let l;l="Cost per man-day";let p;p=" Save the project first to enable analysis. ";let d;d=" Generate business processes first. ";let f;f="Changes";let h;h="across all processes";let g;g="Active Impacts";let b;b="capability impacts";let w;w="Total Effort";let T;T="man-days";let O;O="Estimated Cost";let V;V="Scale values (days):";let j;j=" No \"Project\" evaluation scale found. Create one in the administration panel with target = \"project\". ";let L;L="Executive Summary";let A;A=" No positioning analysis yet. Click \"Launch Positioning Analysis\" to generate it. ";let J;J="Effort by System";let Q;Q="System";let te;te="Parent";let U;U="# Impacts";let ce;ce="Effort (days)";let W;W="Est. Cost";let Y;Y="Total (across all systems)";let se;se="Add Change";let de;de="No changes documented yet.";let Ae;Ae="Edit change";let rt;rt="Add impact";let et;et="Delete change";let pt;pt="Change ID";let ft;ft="Description";let je;je="Save";let ke;ke="Cancel";let Ke;Ke=" Impacted Capabilities and Systems ";let ve;ve="View capability";let Se;Se="Edit impact";let Be;Be="Delete impact";let Ze;Ze="Open component";let kt;kt="Open system";let Z;Z="Search capabilities\u2026";let D;D="Search systems\u2026";let F;F="Capability";let fe;fe="Complexity";let he;he="Rationale";let xe;xe="Add System";let nt;nt="Select a system to pin it to this impact";let Je;Je="Save";let Ge;
595Ge="Cancel";let Ne;Ne="No systems found";let Pe;return Pe="Remove system",[["capAuto","matAutocomplete"],["sysAuto","matAutocomplete"],e,i,o,a,r,l,p,d,f,h,g,b,w,T,O,V,j,L,A,J,Q,te,U,ce,W,Y,se,de,pt,ft,je,ke,Ke,F,fe,he,xe,nt,Je,Ge,Ne,[1,"positioning-container"],[1,"positioning-launch"],["mat-flat-button","","color","primary","matTooltip",t,3,"click","disabled"],[1,"icon-loading"],[1,"positioning-hint"],[1,"positioning-error"],[1,"kpi-grid"],[1,"params-panel",3,"expanded"],[1,"params-panel-icon"],[1,"params-summary"],[1,"params-grid"],["appearance","fill"],[3,"selectionChange","value"],[3,"value"],[1,"scale-preview"],[1,"params-no-scale"],["matInput","","type","number","min","0",3,"ngModelChange","change","ngModel"],[1,"positioning-summary"],[1,"positioning-empty"],[1,"effort-table-card"],["multi","",1,"bp-accordion"],[1,"kpi-card"],[1,"kpi-label"],[1,"kpi-value"],[1,"kpi-unit"],[1,"kpi-value","kpi-highlight"],[1,"scale-preview-title"],[1,"scale-chips"],[1,"scale-chip","complexity-xs"],[1,"scale-chip","complexity-s"],[1,"scale-chip","complexity-m"],[1,"scale-chip","complexity-l"],[1,"scale-chip","complexity-xl"],[1,"summary-header"],[1,"summary-icon"],[1,"summary-title"],[1,"summary-stats"],[1,"summary-text"],[1,"effort-table-header"],[1,"effort-table-icon"],[1,"effort-table-title"],[1,"effort-table-subtitle"],[1,"effort-table-scroll"],[1,"effort-table"],[1,"effort-th","effort-th-system"],[1,"effort-th","effort-th-parent"],[1,"effort-th","effort-th-impacts"],[1,"effort-th","effort-th-effort"],[1,"effort-th","effort-th-cost"],[1,"effort-row",3,"effort-row-sub","effort-row-unattributed"],[1,"effort-total-row"],["colspan","2",1,"effort-td","effort-td-total-label"],[1,"effort-td","effort-td-center"],[1,"effort-impacts-badge"],[1,"effort-td","effort-td-center","effort-td-highlight"],[1,"effort-td","effort-td-right","effort-td-cost"],[1,"effort-row"],[1,"effort-td","effort-td-system"],[1,"effort-td","effort-td-parent"],[1,"effort-parent-name"],[1,"effort-td-empty"],[1,"effort-sys-icon","effort-sys-icon-unattributed"],[1,"effort-sys-name","effort-sys-name-unattributed"],[1,"effort-sys-icon"],["type","button",1,"effort-sys-name",3,"click","matTooltip"],[3,"expanded"],[1,"bp-panel-title"],[1,"bp-number"],[1,"bp-name"],[1,"bp-change-count"],[1,"bp-effort-badge"],[1,"changes-list"],[1,"bp-no-changes"],[1,"change-card"],[1,"add-change-row"],["mat-button","","type","button",1,"add-change-btn",3,"click"],[1,"bp-effort-icon"],[1,"change-header"],[1,"change-header-edit"],[1,"capability-impacts"],[1,"change-header-read"],[1,"change-id"],[1,"change-description"],["mat-icon-button","","matTooltip",Ae,"type","button",1,"change-edit-btn",3,"click"],["mat-icon-button","","matTooltip",rt,"type","button",1,"change-edit-btn",3,"click"],["mat-icon-button","","matTooltip",et,"type","button",1,"change-edit-btn",3,"click"],["appearance","outline",1,"change-edit-field"],["matInput","",3,"ngModelChange","ngModel"],["matInput","","rows","3","cdkTextareaAutosize","",3,"ngModelChange","ngModel"],[1,"change-edit-actions"],["mat-flat-button","","color","primary",3,"click"],["mat-button","",3,"click"],[1,"impacts-label"],[1,"impact-row"],[1,"complexity-chip",3,"ngClass","matTooltip"],[1,"impact-info"],[1,"capability-name-row"],[1,"capability-name"],["matTooltip",ve,"type","button",1,"cap-nav-btn"],[1,"impact-edit"],[1,"impact-actions"],["mat-icon-button","","matTooltip",Se],["mat-icon-button","","matTooltip",Be,3,"click"],["matTooltip",ve,"type","button",1,"cap-nav-btn",3,"click"],[1,"cap-nav-icon"],[1,"impact-rationale"],[1,"component-chips"],[1,"comp-chip-wrapper"],["type","button",1,"comp-chip",3,"click","matTooltip"],[1,"comp-chip-icon"],[1,"comp-chip-label"],["matTooltip",Ze,"type","button",1,"comp-chip-nav",3,"click"],[1,"comp-chip-nav-icon"],[1,"comp-chip-wrapper","comp-chip-wrapper-manual"],["type","button",1,"comp-chip","comp-chip-manual","comp-chip-selected",3,"click","matTooltip"],["matTooltip",kt,"type","button",1,"comp-chip-nav","comp-chip-nav-manual",3,"click"],["appearance","outline",1,"impact-edit-capability"],["matInput","","placeholder",Z,3,"ngModelChange","ngModel","matAutocomplete"],[3,"optionSelected"],["matTooltipPosition","right",3,"value","disabled","matTooltip","class"],["appearance","outline",1,"impact-edit-complexity"],[3,"ngModelChange","ngModel"],["appearance","outline",1,"impact-edit-rationale"],["matInput","","rows","2",3,"ngModelChange","ngModel"],[1,"system-picker"],["appearance","outline",1,"impact-edit-system"],["matPrefix","",1,"system-picker-prefix-icon"],["matInput","","placeholder",D,3,"ngModelChange","ngModel","matAutocomplete"],[3,"optionSelected","displayWith"],["matTooltipPosition","right",3,"value","matTooltip","sys-option-subcomponent"],["disabled",""],[1,"system-picker-chips"],[1,"impact-edit-actions"],["matTooltipPosition","right",3,"value","disabled","matTooltip"],[1,"cap-option-content"],[1,"cap-option-name"],[1,"cap-option-breadcrumb"],["matTooltipPosition","right",3,"value","matTooltip"],[1,"sys-option-content"],[1,"sys-option-icon"],[1,"sys-option-text"],[1,"sys-option-name"],[1,"sys-option-editor"],[1,"sys-option-empty"],["type","button",1,"comp-chip","comp-chip-manual","comp-chip-selected",3,"matTooltip"],["matTooltip",Pe,"type","button",1,"comp-chip-nav","comp-chip-nav-manual","comp-chip-remove",3,"click"],["mat-icon-button","","matTooltip",Se,3,"click"]];},template:function(e,i){e&1&&(s(0,"div",43)(1,"div",44)(2,"button",45),E("click",function(){return i.launchAnalysis();}),S(3,jte,2,0,"mat-icon"),S(4,Lte,2,0,"mat-icon",46),s(5,"span"),q(6,2),c()(),S(7,zte,2,0,"span",47),S(8,Fte,2,0,"span",47),c(),S(9,Bte,5,1,"div",48),S(10,$te,30,5,"div",49),s(11,"mat-expansion-panel",50)(12,"mat-expansion-panel-header")(13,"mat-panel-title")(14,"mat-icon",51),u(15,"tune"),c(),s(16,"span"),q(17,3),c()(),S(18,Vte,2,2,"mat-panel-description",52),c(),s(19,"div",53)(20,"mat-form-field",54)(21,"mat-label"),q(22,4),c(),s(23,"mat-select",55),E("selectionChange",function(a){return i.onScaleChange(a.value);}),be(24,Gte,2,2,"mat-option",56,iu),c(),s(26,"mat-hint"),q(27,5),c()(),S(28,qte,14,5,"div",57),S(29,Jte,2,0,"span",58),s(30,"mat-form-field",54)(31,"mat-label"),q(32,6),c(),s(33,"input",59),Mt("ngModelChange",function(a){return St(i.positioningParams.dailyRate,a)||(i.positioningParams.dailyRate=a),a;}),E("change",function(){return i.onDailyRateChange();}),c(),s(34,"mat-hint"),q(35,7),c()()()(),S(36,Ute,9,2,"div",60),S(37,Wte,5,0,"div",61),S(38,ene,36,4,"div",62),S(39,One,3,0,"mat-accordion",63),c()),e&2&&(m(2),N("disabled",i.isLoading||!i.object||!(i.businessProcesses!=null&&i.businessProcesses.length)),m(),M(i.isLoading?-1:3),m(),M(i.isLoading?4:-1),m(3),M(i.object?-1:7),m(),M(!(i.businessProcesses!=null&&i.businessProcesses.length)&&i.object?8:-1),m(),M(i.error?9:-1),m(),M(i.hasAnyChanges&&i.selectedScale?10:-1),m(),N("expanded",!1),m(7),M(i.selectedScale?18:-1),m(5),N("value",i.positioningParams.selectedScaleId),m(),ye(i.availableScales),m(4),M(i.selectedScale?28:-1),m(),M(i.availableScales.length===0?29:-1),m(4),wt("ngModel",i.positioningParams.dailyRate),m(3),M(i.summary?36:-1),m(),M(!i.hasAnyChanges&&!i.isLoading?37:-1),m(),M(i.selectedScale&&i.systemEffortTable.length>0?38:-1),m(),M(i.businessProcesses!=null&&i.businessProcesses.length?39:-1));},dependencies:[ut,Kr,gn,Ft,Ea,Tt,Qr,Po,$e,Qe,Qt,We,Xe,$t,_n,gr,Sl,fr,hr,_r,wl,jt,Xt,Vt,Wt,Ki,Pl,ud,Gt,bi,So,Ei,$d,Bd,Op],styles:[".positioning-container[_ngcontent-%COMP%]{padding:16px}.params-panel[_ngcontent-%COMP%]{margin-bottom:16px}.params-panel-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:8px;color:#00000080}.params-summary[_ngcontent-%COMP%]{font-size:.8em;color:#00000073}.params-grid[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:16px;align-items:flex-start;padding:4px 0 8px}.params-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:180px}.scale-preview[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;justify-content:center;padding-top:6px}.scale-preview-title[_ngcontent-%COMP%]{font-size:.75em;color:#00000073;font-weight:600;text-transform:uppercase;letter-spacing:.4px}.scale-chips[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:6px;flex-wrap:wrap}.scale-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:3px 10px;border-radius:6px;font-size:.75em;font-weight:700;cursor:default}.params-no-scale[_ngcontent-%COMP%]{font-size:.82em;color:#bf360c;font-style:italic;align-self:center}.kpi-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px;animation:_ngcontent-%COMP%_fadeIn .3s ease-in}@media(max-width:700px){.kpi-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}.kpi-card[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:10px;padding:14px 16px;display:flex;flex-direction:column;gap:4px}.kpi-label[_ngcontent-%COMP%]{font-size:.72em;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#00000073}.kpi-value[_ngcontent-%COMP%]{font-size:1.6em;font-weight:700;line-height:1.1;color:#000000d1}.kpi-highlight[_ngcontent-%COMP%]{color:#1976d2}.kpi-unit[_ngcontent-%COMP%]{font-size:.72em;color:#00000073}.positioning-launch[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:12px;margin-bottom:20px}.positioning-launch[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.positioning-hint[_ngcontent-%COMP%]{color:#00000073;font-size:.85em;font-style:italic}.positioning-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 16px;background-color:#fdecea;color:#b71c1c;border-radius:8px;margin-bottom:16px;font-size:.9em}.positioning-error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#b71c1c;flex-shrink:0}.positioning-summary[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:10px;padding:16px;margin-bottom:20px;animation:_ngcontent-%COMP%_fadeIn .3s ease-in}.summary-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:8px}.summary-icon[_ngcontent-%COMP%]{color:#1976d2;font-size:20px;width:20px;height:20px}.summary-title[_ngcontent-%COMP%]{font-size:.8em;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#00000080}.summary-stats[_ngcontent-%COMP%]{margin-left:auto;font-size:.78em;color:#00000073;font-style:italic}.summary-text[_ngcontent-%COMP%]{font-size:.95em;line-height:1.6;color:#000c;margin:0}.positioning-empty[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:20px 16px;color:#0006;font-size:.9em;font-style:italic}.positioning-empty[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040;font-size:24px;width:24px;height:24px}.bp-accordion[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .3s ease-in}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}} .positioning-container .mat-expansion-panel{margin-bottom:10px;border-radius:10px!important;border:1px solid rgba(0,0,0,.07)!important;box-shadow:none!important} .positioning-container .mat-expansion-panel:before{display:none} .positioning-container .mat-expansion-panel-header{padding:0 16px;min-height:54px} .positioning-container .mat-expansion-panel-body{padding:0 16px 16px}.bp-panel-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;width:100%}.bp-number[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:50%;background-color:#1976d2;color:#fff;font-size:.8em;font-weight:700;flex-shrink:0}
595.bp-name[_ngcontent-%COMP%]{font-weight:600;font-size:.95em;color:#000000d9}.bp-change-count[_ngcontent-%COMP%]{margin-left:auto;font-size:.75em;color:#0006;font-style:italic}.changes-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.change-card[_ngcontent-%COMP%]{background-color:#f9f9fc;border:1px solid rgba(0,0,0,.06);border-radius:8px;padding:12px 14px}.change-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:6px;margin-bottom:10px}.change-header-read[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:10px;min-width:0}.change-edit-btn[_ngcontent-%COMP%]{flex-shrink:0;opacity:.35;transition:opacity .15s}.change-edit-btn[_ngcontent-%COMP%]:hover{opacity:1}.change-edit-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.change-header-edit[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-bottom:12px;padding:12px;background-color:#f0f4ff;border:1px solid rgba(25,118,210,.2);border-radius:8px}.change-edit-field[_ngcontent-%COMP%]{width:100%}.change-edit-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center;margin-top:2px}.change-id[_ngcontent-%COMP%]{display:inline-block;padding:2px 9px;border-radius:10px;font-size:.72em;font-weight:700;letter-spacing:.3px;background-color:#e8eaf6;color:#283593;flex-shrink:0;margin-top:2px}.change-description[_ngcontent-%COMP%]{margin:0;font-size:.9em;line-height:1.5;color:#000000d1}.capability-impacts[_ngcontent-%COMP%]{margin-top:8px}.impacts-label[_ngcontent-%COMP%]{font-size:.72em;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#0006;margin-bottom:6px}.impact-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:8px 0;border-top:1px solid rgba(0,0,0,.05)}.complexity-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:26px;border-radius:6px;font-size:.75em;font-weight:700;letter-spacing:.2px;flex-shrink:0;cursor:default}.complexity-xs[_ngcontent-%COMP%]{background-color:#e8f5e9;color:#2e7d32}.complexity-s[_ngcontent-%COMP%]{background-color:#e3f2fd;color:#1565c0}.complexity-m[_ngcontent-%COMP%]{background-color:#fff8e1;color:#e65100}.complexity-l[_ngcontent-%COMP%]{background-color:#fff3e0;color:#bf360c}.complexity-xl[_ngcontent-%COMP%]{background-color:#fce4ec;color:#880e4f}.impact-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}.capability-name-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.capability-name[_ngcontent-%COMP%]{font-size:.9em;font-weight:600;color:#000000d9}.cap-nav-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:0;width:18px;height:18px;border:none;background:transparent;cursor:pointer;color:#0000004d;border-radius:3px;transition:color .15s,background-color .15s;flex-shrink:0}.cap-nav-btn[_ngcontent-%COMP%]:hover{color:#1976d2;background-color:#1976d214}.cap-nav-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px}.impact-rationale[_ngcontent-%COMP%]{font-size:.82em;color:#0000008c;line-height:1.4}.impact-edit[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-top:6px;padding:10px 12px;background-color:#f0f4ff;border:1px solid rgba(25,118,210,.2);border-radius:8px}.impact-edit-capability[_ngcontent-%COMP%]{width:100%}.impact-edit-complexity[_ngcontent-%COMP%]{width:140px}.impact-edit-rationale[_ngcontent-%COMP%]{width:100%}.impact-edit-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;align-items:center;margin-top:2px} .cap-option.mat-mdc-option{height:auto!important;min-height:40px;padding-top:5px!important;padding-bottom:5px!important;line-height:1.3!important} .cap-level-1.mat-mdc-option{background-color:#f0f1f7!important;cursor:default!important;pointer-events:none} .cap-level-1.mat-mdc-option .cap-option-name{font-weight:700;color:#000000b3;font-size:.85em} .cap-level-1.mat-mdc-option .cap-option-breadcrumb{display:none} .cap-level-2.mat-mdc-option{background-color:#f7f8fb!important;cursor:default!important;pointer-events:none} .cap-level-2.mat-mdc-option .cap-option-name{font-weight:600;color:#000000a6;font-size:.85em} .cap-level-3.mat-mdc-option{background-color:transparent} .cap-level-3.mat-mdc-option:hover{background-color:#1976d20f} .cap-option-content{display:flex;flex-direction:column;gap:1px} .cap-option-name{display:flex;align-items:center;gap:5px;font-size:.88em;font-weight:500;color:#000000d9;line-height:1.3} .cap-option-breadcrumb{font-size:.73em;color:#0006;line-height:1.2;margin-top:1px} .cap-level-badge{display:inline-flex;align-items:center;justify-content:center;padding:1px 5px;border-radius:4px;font-size:.72em;font-weight:700;flex-shrink:0;letter-spacing:.2px} .cap-level-badge-1{background-color:#e8eaf6;color:#3949ab} .cap-level-badge-2{background-color:#e3f2fd;color:#1565c0} .cap-level-badge-3{background-color:#e8f5e9;color:#2e7d32}.component-chips[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;margin-top:7px}.comp-chip-wrapper[_ngcontent-%COMP%]{display:inline-flex;align-items:stretch;border-radius:14px;border:1.5px solid rgba(0,0,0,.15);overflow:hidden;transition:border-color .15s}.comp-chip-wrapper[_ngcontent-%COMP%]:hover{border-color:#0097a7}
595.comp-chip-wrapper[_ngcontent-%COMP%] .comp-chip[_ngcontent-%COMP%]{border:none!important;border-radius:0}.comp-chip-nav[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:0 6px;background:transparent;border:none;border-left:1px solid rgba(0,0,0,.1);cursor:pointer;color:#00000059;transition:background-color .15s,color .15s}.comp-chip-nav[_ngcontent-%COMP%]:hover{background-color:#0097a714;color:#006064}.comp-chip-nav-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px}.comp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;padding:3px 10px 3px 6px;border-radius:14px;border:1.5px solid rgba(0,0,0,.15);background-color:transparent;color:#0009;font-size:.78em;font-weight:500;cursor:pointer;transition:background-color .15s,border-color .15s,color .15s;line-height:1}.comp-chip[_ngcontent-%COMP%]:hover{border-color:#0097a7;color:#006064;background-color:#0097a70d}.comp-chip-selected[_ngcontent-%COMP%]{background-color:#e0f7fa;border-color:#0097a7;color:#006064;font-weight:600}.comp-chip-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;flex-shrink:0}.comp-chip-label[_ngcontent-%COMP%]{white-space:nowrap}.comp-chip-wrapper-manual[_ngcontent-%COMP%]{border-color:#3949ab59}.comp-chip-wrapper-manual[_ngcontent-%COMP%]:hover{border-color:#3949ab}.comp-chip-manual[_ngcontent-%COMP%]{color:#3949ab}.comp-chip-manual.comp-chip-selected[_ngcontent-%COMP%]{background-color:#e8eaf6;border-color:#3949ab;color:#283593;font-weight:600}.comp-chip-nav-manual[_ngcontent-%COMP%]{border-left-color:#3949ab26}.comp-chip-nav-manual[_ngcontent-%COMP%]:hover{background-color:#3949ab14;color:#283593}.comp-chip-remove[_ngcontent-%COMP%]{color:#3949ab80}.comp-chip-remove[_ngcontent-%COMP%]:hover{background-color:#b0002014;color:#b00020}.system-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-top:4px}.impact-edit-system[_ngcontent-%COMP%]{width:100%}.system-picker-prefix-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#3949ab;margin-right:6px}.system-picker-chips[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;padding-bottom:2px} .sys-option-content{display:flex;align-items:center;gap:8px} .sys-option-icon{font-size:16px;width:16px;height:16px;color:#3949ab;flex-shrink:0} .sys-option-text{display:flex;flex-direction:column;gap:1px} .sys-option-name{font-size:.88em;font-weight:500;color:#000000d9;line-height:1.3} .sys-option-editor{font-size:.73em;color:#0006;line-height:1.2} .sys-option-empty{font-size:.85em;color:#0006;font-style:italic} .sys-option-subcomponent.mat-mdc-option{padding-left:28px!important} .sys-option-subcomponent.mat-mdc-option .sys-option-icon{color:#3949ab8c} .sys-option-subcomponent.mat-mdc-option .sys-option-name{color:#000000b3} .sys-option-subcomponent.mat-mdc-option .sys-option-editor{font-style:italic}.bp-effort-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;padding:2px 8px 2px 6px;border-radius:10px;background-color:#1976d21a;color:#1565c0;font-size:.72em;font-weight:600;white-space:nowrap}.bp-effort-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px}.effort-table-card[_ngcontent-%COMP%]{background-color:#fafafa;border:1px solid rgba(0,0,0,.07);border-radius:10px;margin-bottom:20px;overflow:hidden;animation:_ngcontent-%COMP%_fadeIn .3s ease-in}.effort-table-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:12px 16px;border-bottom:1px solid rgba(0,0,0,.06)}.effort-table-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#1976d2}.effort-table-title[_ngcontent-%COMP%]{font-size:.8em;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#00000080}.effort-table-subtitle[_ngcontent-%COMP%]{margin-left:auto;font-size:.75em;color:#0006;font-style:italic}.effort-table-scroll[_ngcontent-%COMP%]{overflow-x:auto}.effort-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.85em}.effort-table[_ngcontent-%COMP%] .effort-th-system[_ngcontent-%COMP%]{width:28%;min-width:160px}.effort-table[_ngcontent-%COMP%] .effort-th-parent[_ngcontent-%COMP%]{width:20%;min-width:120px}.effort-table[_ngcontent-%COMP%] .effort-th-impacts[_ngcontent-%COMP%]{width:10%;min-width:80px}.effort-table[_ngcontent-%COMP%] .effort-th-effort[_ngcontent-%COMP%]{width:14%;min-width:100px}.effort-table[_ngcontent-%COMP%] .effort-th-cost[_ngcontent-%COMP%]{width:18%;min-width:110px}.effort-th[_ngcontent-%COMP%]{padding:8px 12px;text-align:left;font-size:.72em;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#00000073;background-color:#f5f6fa;border-bottom:1px solid rgba(0,0,0,.07);white-space:nowrap}.effort-row[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.04);transition:background-color .12s}.effort-row[_ngcontent-%COMP%]:hover{background-color:#1976d208}.effort-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.effort-row-sub[_ngcontent-%COMP%] .effort-td-system[_ngcontent-%COMP%]{padding-left:28px}.effort-row-sub[_ngcontent-%COMP%] .effort-sys-icon[_ngcontent-%COMP%]{color:#3949ab8c!important}
595.effort-row-sub[_ngcontent-%COMP%] .effort-sys-name[_ngcontent-%COMP%]{color:#000000a6!important}.effort-td[_ngcontent-%COMP%]{padding:8px 12px;vertical-align:middle;color:#000000c7;line-height:1.3}.effort-td-system[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.effort-sys-icon[_ngcontent-%COMP%]{font-size:15px;width:15px;height:15px;color:#3949ab;flex-shrink:0}.effort-sys-name[_ngcontent-%COMP%]{background:transparent;border:none;cursor:pointer;padding:0;font-size:inherit;font-family:inherit;color:#1565c0;font-weight:500;text-align:left;line-height:1.3;text-decoration:underline;text-decoration-color:transparent;transition:text-decoration-color .15s,color .15s;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.effort-sys-name[_ngcontent-%COMP%]:hover{color:#0d47a1;text-decoration-color:#0d47a1}.effort-td-parent[_ngcontent-%COMP%]{color:#0000008c;font-size:.85em}.effort-parent-name[_ngcontent-%COMP%]{font-style:italic}.effort-td-empty[_ngcontent-%COMP%]{color:#00000040}.effort-td-center[_ngcontent-%COMP%]{text-align:center}.effort-td-right[_ngcontent-%COMP%]{text-align:right}.effort-td-highlight[_ngcontent-%COMP%]{font-weight:600;color:#1976d2}.effort-td-cost[_ngcontent-%COMP%]{font-weight:600}.effort-impacts-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:22px;padding:0 7px;border-radius:10px;background-color:#e8eaf6;color:#3949ab;font-size:.8em;font-weight:700}.effort-row-unattributed[_ngcontent-%COMP%]{background-color:#fafafa}.effort-row-unattributed[_ngcontent-%COMP%] .effort-sys-icon-unattributed[_ngcontent-%COMP%]{color:#0000004d}.effort-row-unattributed[_ngcontent-%COMP%] .effort-sys-name-unattributed[_ngcontent-%COMP%]{color:#00000073;font-style:italic;font-size:inherit;cursor:default}.effort-row-unattributed[_ngcontent-%COMP%] .effort-td-highlight[_ngcontent-%COMP%]{color:#0000008c;font-weight:500}.effort-row-unattributed[_ngcontent-%COMP%] .effort-td-cost[_ngcontent-%COMP%]{color:#00000073;font-weight:500}.effort-row-unattributed[_ngcontent-%COMP%] .effort-impacts-badge[_ngcontent-%COMP%]{background-color:#f0f0f0;color:#0006}.effort-total-row[_ngcontent-%COMP%]{background-color:#f0f4ff;border-top:2px solid rgba(25,118,210,.2)}.effort-total-row[_ngcontent-%COMP%] .effort-td[_ngcontent-%COMP%]{font-weight:700}.effort-td-total-label[_ngcontent-%COMP%]{color:#0000008c;font-size:.8em;font-style:italic;font-weight:600!important}.impact-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px;flex-shrink:0}.impact-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:.35;transition:opacity .15s}.impact-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.impact-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:1}.bp-no-changes[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 4px;color:#00000059;font-size:.83em;font-style:italic}.bp-no-changes[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#0003}.add-change-row[_ngcontent-%COMP%]{display:flex;padding-top:6px;border-top:1px dashed rgba(0,0,0,.1);margin-top:4px}.add-change-btn[_ngcontent-%COMP%]{opacity:.5;font-size:.82em;transition:opacity .15s}.add-change-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:4px}.add-change-btn[_ngcontent-%COMP%]:hover{opacity:1}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-spin 1.5s infinite linear}@keyframes _ngcontent-%COMP%_icon-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]});};var Ene=(n,t)=>t.bpId,Tne=(n,t)=>t.changeId;function Ine(n,t){if(n&1){let e=oe();s(0,"button",30),E("click",function(){k(e);let o=x();return R(o.syncFromChanges());}),s(1,"mat-icon"),u(2,"sync"),c(),s(3,"span"),u(4,"Sync from changes"),c(),s(5,"span",31),u(6),c()();}if(n&2){let e=x();m(6),_e("(",e.fmt(e.rollup.wsjfScore),")");}}function kne(n,t){n&1&&(s(0,"div",28)(1,"mat-icon"),u(2,"info_outline"),c(),s(3,"span"),u(4,"No changes found. Run the Positioning analysis first to generate changes."),c()());}function Rne(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function Nne(n,t){n&1&&(s(0,"mat-icon",36),u(1,"autorenew"),c());}function Ane(n,t){if(n&1){let e=oe();s(0,"div",38)(1,"div",39)(2,"span",40),u(3),c(),s(4,"div",41),u(5),c()(),s(6,"div",42)(7,"div",43)(8,"div",12)(9,"span",13),u(10,"Business Value"),c()(),s(11,"mat-slider",44)(12,"input",16),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.wsjf.businessValue,o)||(a.wsjf.businessValue=o),R(o);}),E("ngModelChange",function(){let o=k(e).$implicit,a=x(2);return R(a.onChangeSliderChange(o));}),c()(),s(13,"span",17),u(14),c()(),s(15,"div",43)(16,"div",12)(17,"span",13),u(18,"Time Criticality"),c()(),s(19,"mat-slider",44)(20,"input",16),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.wsjf.timeCriticality,o)||(a.wsjf.timeCriticality=o),R(o);}),E("ngModelChange",function(){let o=k(e).$implicit,a=x(2);return R(a.onChangeSliderChange(o));}),c()(),s(21,"span",17),u(22),c()(),s(23,"div",43)(24,"div",12)(25,"span",13),u(26,"Risk Reduction / OE"),c()(),s(27,"mat-slider",44)(28,"input",16),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.wsjf.rrOe,o)||(a.wsjf.rrOe=o),R(o);}),E("ngModelChange",function(){let o=k(e).$implicit,a=x(2);return R(a.onChangeSliderChange(o));}),c()(),s(29,"span",17),u(30),c()()(),s(31,"div",45)(32,"label",19),u(33,"Rationale"),c(),s(34,"textarea",46),Mt("ngModelChange",function(o){let a=k(e).$implicit;return St(a.wsjf.rationale,o)||(a.wsjf.rationale=o),R(o);}),E("ngModelChange",function(){let o=k(e).$implicit,a=x(2);return R(a.onChangeSliderChange(o));}),u(35," "),c()(),s(36,"div",47)(37,"div",48)(38,"mat-icon",49),u(39,"straighten"),c(),s(40,"span",50),u(41,"Job Size"),c(),s(42,"span",51),u(43),c(),s(44,"span",52),u(45),c()()()();}if(n&2){let e=t.$implicit,i=x(2);m(3),G(e.changeDescription),m(),ji(i.scoreClass(e.wsjf.wsjfScore)),m(),_e(" ",i.fmt(e.wsjf.wsjfScore)," "),m(7),wt("ngModel",e.wsjf.businessValue),m(2),G(e.wsjf.businessValue),m(6),wt("ngModel",e.wsjf.timeCriticality),m(2),G(e.wsjf.timeCriticality),m(6),wt("ngModel",e.wsjf.rrOe),m(2),G(e.wsjf.rrOe),m(4),wt("ngModel",e.wsjf.rationale),m(9),G(e.jobSize),m(2),_e("(",i.jobSizeLabel(e.effortDays),")");}}function Dne(n,t){if(n&1){let e=oe();s(0,"mat-expansion-panel",29)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span",32),u(4),c(),s(5,"span",33),u(6),c()(),s(7,"mat-panel-description")(8,"span",34),u(9),c(),s(10,"button",35),E("click",function(o){let a=k(e).$implicit;return x().evaluateWsjfForBp(a.bpId),R(o.stopPropagation());}),S(11,Rne,2,0,"mat-icon")(12,Nne,2,0,"mat-icon",36),s(13,"span"),u(14,"Evaluate WSJF"),c()()()(),s(15,"div",37),be(16,Ane,46,13,"div",38,Tne),c()();}if(n&2){let e=t.$implicit,i=x();N("expanded",!0),m(4),G(e.bpNumber),m(2),G(e.bpName),m(3),Hn("",e.rows.length," change",e.rows.length!==1?"s":""),m(),N("disabled",i.evaluatingBpId!==null),m(),M(i.evaluatingBpId!==e.bpId?11:12),m(5),ye(e.rows);}}var nh={businessValue:5,timeCriticality:5,rrOe:5,jobSize:5,wsjfScore:3},Mv=class n{constructor(t,e,i){this.firebase=t;this.snackBar=e;this.localeService=i;}firebase;snackBar;localeService;projectId;businessProcesses;epicWsjf=X({},nh);rollup=null;bpChanges={};changeRows=[];selectedScale;bpUnsubscribes=[];wsjfUnsubscribe=null;epicSaveTimer=null;changeSaveTimers={};evaluatingBpId=null;ngOnChanges(t){(t.projectId||t.businessProcesses)&&(this.teardown(),this.bpChanges={},this.changeRows=[],this.rollup=null,this.epicWsjf=X({},nh),this.loadScaleAndParams(),this.subscribeToEpicWsjf(),this.subscribeToBpChanges());}ngOnDestroy(){this.teardown();}
595teardown(){this.bpUnsubscribes.forEach(t=>t()),this.bpUnsubscribes=[],this.wsjfUnsubscribe&&(this.wsjfUnsubscribe(),this.wsjfUnsubscribe=null),this.epicSaveTimer&&clearTimeout(this.epicSaveTimer),Object.values(this.changeSaveTimers).forEach(t=>clearTimeout(t)),this.changeSaveTimers={};}loadScaleAndParams(){return $(this,null,function*(){if(this.projectId)try{let e=(yield at(mt(we(this.firebase.firestore,"evaluationscales")))).docs.map(r=>X({id:r.id},r.data())).filter(r=>r.target==="project"),i=ge(this.firebase.firestore,"projects",this.projectId,"positioningAnalysis","latest"),o=yield yt(i),a=o.exists()?o.data()?.positioningParams?.selectedScaleId??"":"";this.selectedScale=(a?e.find(r=>r.id===a):void 0)||e.find(r=>r.isDefault)||e[0],this.rebuildChangeRows();}catch(t){}});}subscribeToEpicWsjf(){if(!this.projectId)return;let t=ge(this.firebase.firestore,"projects",this.projectId,"wsjf","latest");this.wsjfUnsubscribe=Bn(t,e=>{if(!e.exists())return;let i=e.data();this.epicWsjf={businessValue:i.businessValue??nh.businessValue,timeCriticality:i.timeCriticality??nh.timeCriticality,rrOe:i.rrOe??nh.rrOe,jobSize:i.jobSize??nh.jobSize,wsjfScore:i.wsjfScore??this.computeScore(i.businessValue??5,i.timeCriticality??5,i.rrOe??5,i.jobSize??5),rationale:i.rationale};});}subscribeToBpChanges(){if(!(!this.projectId||!this.businessProcesses?.length))for(let t of this.businessProcesses){if(!t.id)continue;let e=t.id,i=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",e),o=Bn(i,a=>{if(!a.exists())return;let r=a.data();r?.positioningChanges&&Array.isArray(r.positioningChanges)&&(this.bpChanges=Ve(X({},this.bpChanges),{[e]:r.positioningChanges}),this.rebuildChangeRows(),this.computeRollup());});this.bpUnsubscribes.push(o);}}rebuildChangeRows(){if(!this.businessProcesses)return;let t=[];for(let e of this.businessProcesses){if(!e.id)continue;let i=this.bpChanges[e.id]??[];for(let o of i){let a=this.computeEffortDays(o),r=this.effortDaysToJobSize(a),l=o.wsjf,p={businessValue:l?.businessValue??5,timeCriticality:l?.timeCriticality??5,rrOe:l?.rrOe??5,jobSize:r,wsjfScore:this.computeScore(l?.businessValue??5,l?.timeCriticality??5,l?.rrOe??5,r),rationale:l?.rationale};t.push({bpId:e.id,bpName:e.name,bpNumber:e.number,changeId:o.changeId,changeDescription:o.changeDescription,effortDays:a,jobSize:r,wsjf:p});}}this.changeRows=t,this.computeRollup();}computeEffortDays(t){if(!this.selectedScale)return 0;let e={XS:this.selectedScale.XS||0,S:this.selectedScale.S||0,M:this.selectedScale.M||0,L:this.selectedScale.L||0,XL:this.selectedScale.XL||0};return(t.capabilityImpacts??[]).reduce((i,o)=>i+(e[o.complexity]??0),0);}effortDaysToJobSize(t){return t===0||t<=3?1:t<=7?2:t<=15?3:t<=25?5:t<=45?7:10;}computeScore(t,e,i,o){return!o||o<=0?0:Math.round((t+e+i)/o*10)/10;}computeRollup(){let t=this.changeRows.filter(f=>(f.wsjf.jobSize??0)>0);if(t.length===0){this.rollup=null;return;}let e=t.reduce((f,h)=>f+(h.wsjf.jobSize??1),0),i=t.reduce((f,h)=>f+h.wsjf.businessValue*(h.wsjf.jobSize??1),0)/e,o=Math.max(...t.map(f=>f.wsjf.timeCriticality)),a=Math.max(...t.map(f=>f.wsjf.rrOe)),r=t.reduce((f,h)=>f+h.effortDays,0),l=this.effortDaysToJobSize(r),p=Math.max(1,Math.min(10,Math.round(i))),d=this.computeScore(p,o,a,l);this.rollup={businessValue:p,timeCriticality:o,rrOe:a,jobSize:l,wsjfScore:d};}syncFromChanges(){this.rollup&&(this.epicWsjf=X({},this.rollup),this.debounceEpicSave());}onEpicSliderChange(){this.epicWsjf.wsjfScore=this.computeScore(this.epicWsjf.businessValue,this.epicWsjf.timeCriticality,this.epicWsjf.rrOe,this.epicWsjf.jobSize??5),this.debounceEpicSave();}debounceEpicSave(){this.projectId&&(this.epicSaveTimer&&clearTimeout(this.epicSaveTimer),this.epicSaveTimer=setTimeout(()=>$(this,null,function*(){try{let t=ge(this.firebase.firestore,"projects",this.projectId,"wsjf","latest");yield Dt(t,X({},this.epicWsjf),{merge:!0});}catch(t){this.snackBar.open("Failed to save WSJF.","",{duration:3e3});}}),1200));}onChangeSliderChange(t){t.wsjf.wsjfScore=this.computeScore(t.wsjf.businessValue,t.wsjf.timeCriticality,t.wsjf.rrOe,t.wsjf.jobSize??1),this.computeRollup(),this.debounceChangeSave(t.bpId);}debounceChangeSave(t){this.projectId&&(this.changeSaveTimers[t]&&
595clearTimeout(this.changeSaveTimers[t]),this.changeSaveTimers[t]=setTimeout(()=>$(this,null,function*(){let e=this.bpChanges[t]??[],i=this.changeRows.filter(a=>a.bpId===t),o=e.map(a=>{let r=i.find(l=>l.changeId===a.changeId);return r?Ve(X({},a),{wsjf:{businessValue:r.wsjf.businessValue,timeCriticality:r.wsjf.timeCriticality,rrOe:r.wsjf.rrOe,jobSize:r.wsjf.jobSize,wsjfScore:r.wsjf.wsjfScore,rationale:r.wsjf.rationale}}):a;});try{let a=ge(this.firebase.firestore,"projects",this.projectId,"businessprocesses",t);yield Dt(a,{positioningChanges:o},{merge:!0});}catch(a){this.snackBar.open("Failed to save change WSJF.","",{duration:3e3});}}),1200));}evaluateWsjfForBp(t){return $(this,null,function*(){if(!this.projectId||this.evaluatingBpId)return;let e=this.changeRows.filter(i=>i.bpId===t);if(!e.length){this.snackBar.open("No changes to evaluate for this business process.","",{duration:3e3});return;}this.evaluatingBpId=t;try{let i=ei(this.firebase.functions,"functionEvaluateWsjfForBpStream"),o={projectId:this.projectId,bpId:t,changes:e.map(a=>({changeId:a.changeId,changeDescription:a.changeDescription,effortDays:a.effortDays,capabilityImpacts:(this.bpChanges[t]??[]).find(r=>r.changeId===a.changeId)?.capabilityImpacts??[]})),locale:this.localeService.getSelectedLocaleShort()};yield i(o);}catch(i){console.error("WSJF evaluation failed:",i),this.snackBar.open("AI evaluation failed. Please try again.","",{duration:4e3});}finally{this.evaluatingBpId=null;}});}get bpGroups(){let t=new Map();for(let e of this.changeRows)t.has(e.bpId)||t.set(e.bpId,{bpId:e.bpId,bpName:e.bpName,bpNumber:e.bpNumber,rows:[]}),t.get(e.bpId).rows.push(e);for(let e of t.values())e.rows.sort((i,o)=>(o.wsjf.wsjfScore??0)-(i.wsjf.wsjfScore??0));return Array.from(t.values());}get hasAnyChanges(){return this.changeRows.length>0;}fmt(t){return t!=null?t.toFixed(1):"\u2014";}scoreClass(t){return t==null?"score-none":t>=7?"score-high":t>=4?"score-medium":"score-low";}epicScoreClass(t){return this.scoreClass(t);}jobSizeLabel(t){return t===0?"no effort data":`${t}d effort`;}static ɵfac=function(e){return new(e||n)(le(On),le(Bt),le(To));};static ɵcmp=Te({type:n,selectors:[["app-project-wsjf"]],inputs:{projectId:"projectId",businessProcesses:"businessProcesses"},features:[ki],decls:79,vars:18,consts:[[1,"wsjf-wrapper"],[1,"wsjf-epic-panel"],[1,"panel-header"],[1,"panel-header-left"],[1,"panel-icon"],[1,"panel-title"],[1,"panel-subtitle"],[1,"panel-header-right"],["mat-stroked-button","","color","primary","matTooltip","Apply the average from all changes below"],[1,"epic-body"],[1,"epic-sliders"],[1,"slider-row"],[1,"slider-label"],[1,"slider-name"],[1,"slider-hint"],["min","1","max","10","step","1","discrete","",1,"wsjf-slider"],["matSliderThumb","",3,"ngModelChange","ngModel"],[1,"slider-value"],[1,"wsjf-rationale","wsjf-rationale--epic"],[1,"wsjf-rationale-label"],["rows","3","placeholder","Describe why this Epic scores the way it does\u2026",1,"wsjf-rationale-textarea",3,"ngModelChange","ngModel"],[1,"epic-kpi"],[1,"kpi-card"],[1,"kpi-value"],[1,"kpi-label"],[1,"kpi-formula"],[1,"wsjf-changes-section"],[1,"changes-header"],[1,"empty-state"],[1,"bp-panel",3,"expanded"],["mat-stroked-button","","color","primary","matTooltip","Apply the average from all changes below",3,"click"],[1,"rollup-hint"],[1,"bp-number"],[1,"bp-name"],[1,"bp-change-count"],["mat-flat-button","","color","primary","matTooltip","AI-evaluate WSJF scores for this business process",1,"btn-evaluate",3,"click","disabled"],[1,"icon-loading"],[1,"change-list"],[1,"change-card"],[1,"change-header"],[1,"change-description"],[1,"change-score-badge"],[1,"change-sliders"],[1,"slider-row","slider-row--compact"],["min","1","max","10","step","1","discrete","",1,"wsjf-slider","wsjf-slider--change"],[1,"wsjf-rationale"],["rows","2","placeholder","AI rationale will appear here after evaluation\u2026",1,"wsjf-rationale-textarea",3,"ngModelChange","ngModel"],[1,"change-footer"],[1,"job-size-badge"],[1,"job-size-icon"],[1,"job-size-label"],[1,"job-size-value"],[1,"job-size-hint"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"mat-icon",4),u(5,"speed"),c(),s(6,"span",5),u(7,"Epic WSJF Score"),c(),s(8,"span",6),u(9,"Weighted Shortest Job First \u2014 (BV + TC + RR/OE) \xF7 Job Size"),c()(),s(10,"div",7),S(11,Ine,7,1,"button",8),c()(),s(12,"div",9)(13,"div",10)(14,"div",11)(15,"div",12)(16,"span",13),u(17,"Business Value"),c(),s(18,"span",14),u(19,"Strategic delivery"),c()(),s(20,"mat-slider",15)(21,"input",16),Mt("ngModelChange",function(a){return St(i.epicWsjf.businessValue,a)||(i.epicWsjf.businessValue=a),a;}),E("ngModelChange",function(){return i.onEpicSliderChange();}),c()(),s(22,"span",17),u(23),c()(),s(24,"div",11)(25,"div",12)(26,"span",13),u(27,"Time Criticality"),c(),s(28,"span",14),u(29,"Cost of delay"),c()(),s(30,"mat-slider",15)(31,"input",16),Mt("ngModelChange",function(a){return St(i.epicWsjf.timeCriticality,a)||(i.epicWsjf.timeCriticality=a),a;}),E("ngModelChange",function(){return i.onEpicSliderChange();}),c()(),s(32,"span",17),u(33),c()(),s(34,"div",11)(35,"div",12)(36,"span",13),u(37,"Risk Reduction / OE"),c(),s(38,"span",14),u(39,"Risk mitigation & opportunity"),c()(),s(40,"mat-slider",15)(41,"input",16),Mt("ngModelChange",function(a){return St(i.epicWsjf.rrOe,a)||(i.epicWsjf.rrOe=a),a;}),E("ngModelChange",function(){return i.onEpicSliderChange();}),c()(),s(42,"span",17),u(43),c()(),s(44,"div",11)(45,"div",12)(46,"span",13),u(47,"Job Size"),c(),s(48,"span",14),u(49,"Relative effort (higher = b
595igger)"),c()(),s(50,"mat-slider",15)(51,"input",16),Mt("ngModelChange",function(a){return St(i.epicWsjf.jobSize,a)||(i.epicWsjf.jobSize=a),a;}),E("ngModelChange",function(){return i.onEpicSliderChange();}),c()(),s(52,"span",17),u(53),c()()(),s(54,"div",18)(55,"label",19),u(56,"Rationale"),c(),s(57,"textarea",20),Mt("ngModelChange",function(a){return St(i.epicWsjf.rationale,a)||(i.epicWsjf.rationale=a),a;}),E("ngModelChange",function(){return i.onEpicSliderChange();}),u(58," "),c()(),s(59,"div",21)(60,"div",22)(61,"div",23),u(62),c(),s(63,"div",24),u(64,"WSJF Score"),c(),s(65,"div",25),u(66),c()()()()(),ee(67,"mat-divider"),s(68,"div",26)(69,"div",27)(70,"mat-icon",4),u(71,"list_alt"),c(),s(72,"span",5),u(73,"Changes"),c(),s(74,"span",6),u(75,"Rate each change individually \u2014 scores feed the rollup above"),c()(),S(76,kne,5,0,"div",28),be(77,Dne,18,7,"mat-expansion-panel",29,Ene),c()()),e&2&&(m(11),M(i.rollup?11:-1),m(10),wt("ngModel",i.epicWsjf.businessValue),m(2),G(i.epicWsjf.businessValue),m(8),wt("ngModel",i.epicWsjf.timeCriticality),m(2),G(i.epicWsjf.timeCriticality),m(8),wt("ngModel",i.epicWsjf.rrOe),m(2),G(i.epicWsjf.rrOe),m(8),wt("ngModel",i.epicWsjf.jobSize),m(2),G(i.epicWsjf.jobSize),m(4),wt("ngModel",i.epicWsjf.rationale),m(3),ji(i.epicScoreClass(i.epicWsjf.wsjfScore)),m(2),G(i.fmt(i.epicWsjf.wsjfScore)),m(4),nd(" (",i.epicWsjf.businessValue," + ",i.epicWsjf.timeCriticality," + ",i.epicWsjf.rrOe,") \xF7 ",i.epicWsjf.jobSize??5," "),m(10),M(i.hasAnyChanges?-1:76),m(),ye(i.bpGroups));},dependencies:[ut,gn,Ft,Tt,Po,$e,Qe,We,Xe,$t,_n,$f,NC,h0,gr,fr,hr,_r,wl,yi,Ua,Ml],styles:[".wsjf-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;padding:16px;overflow-y:auto}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:16px}.panel-header-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.panel-header-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.panel-icon[_ngcontent-%COMP%]{color:var(--mat-sys-primary, #6750a4);font-size:22px;width:22px;height:22px}.panel-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--mat-sys-on-surface, #1c1b1f)}.panel-subtitle[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant, #49454f)}.rollup-hint[_ngcontent-%COMP%]{margin-left:4px;font-size:12px;font-weight:600;opacity:.8}.wsjf-epic-panel[_ngcontent-%COMP%]{padding-bottom:16px}.epic-body[_ngcontent-%COMP%]{display:flex;gap:24px;align-items:flex-start;flex-wrap:wrap}.epic-sliders[_ngcontent-%COMP%]{flex:1;min-width:280px;display:flex;flex-direction:column;gap:4px}.slider-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:4px 0}.slider-row--compact[_ngcontent-%COMP%]{padding:2px 0}.slider-label[_ngcontent-%COMP%]{width:160px;flex-shrink:0;display:flex;flex-direction:column;gap:1px}.slider-label[_ngcontent-%COMP%] .slider-name[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:var(--mat-sys-on-surface, #1c1b1f);white-space:nowrap}.slider-label[_ngcontent-%COMP%] .slider-hint[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-on-surface-variant, #49454f)}.wsjf-slider[_ngcontent-%COMP%]{flex:1}.slider-value[_ngcontent-%COMP%]{width:28px;text-align:right;font-size:14px;font-weight:700;color:var(--mat-sys-primary, #6750a4);flex-shrink:0}.epic-kpi[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center}.kpi-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;width:140px;padding:20px 16px;border-radius:16px;background:var(--mat-sys-surface-variant, #e7e0ec);gap:4px}.kpi-card[_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{font-size:36px;font-weight:800;line-height:1}.kpi-card[_ngcontent-%COMP%] .kpi-label[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;opacity:.7}.kpi-card[_ngcontent-%COMP%] .kpi-formula[_ngcontent-%COMP%]{font-size:11px;opacity:.6;text-align:center;margin-top:4px}.kpi-card.score-high[_ngcontent-%COMP%]{background:#d4edda;
595color:#1a6632}.kpi-card.score-high[_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{color:#1a6632}.kpi-card.score-medium[_ngcontent-%COMP%]{background:#fff3cd;color:#856404}.kpi-card.score-medium[_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{color:#856404}.kpi-card.score-low[_ngcontent-%COMP%]{background:#f8d7da;color:#842029}.kpi-card.score-low[_ngcontent-%COMP%] .kpi-value[_ngcontent-%COMP%]{color:#842029}.kpi-card.score-none[_ngcontent-%COMP%]{background:var(--mat-sys-surface-variant, #e7e0ec);color:var(--mat-sys-on-surface-variant, #49454f)}.wsjf-changes-section[_ngcontent-%COMP%]{padding-top:16px;display:flex;flex-direction:column;gap:8px}.changes-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:8px}.empty-state[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:16px;font-size:13px;color:var(--mat-sys-on-surface-variant, #49454f);background:var(--mat-sys-surface-variant, #e7e0ec);border-radius:8px}.empty-state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;opacity:.6}.bp-panel[_ngcontent-%COMP%]{border-radius:8px!important;margin-bottom:8px;box-shadow:none!important;border:1px solid var(--mat-sys-outline-variant, #cac4d0)}.bp-panel[_ngcontent-%COMP%] .bp-number[_ngcontent-%COMP%]{font-weight:700;color:var(--mat-sys-primary, #6750a4);margin-right:8px;font-size:13px}.bp-panel[_ngcontent-%COMP%] .bp-name[_ngcontent-%COMP%]{font-weight:500;font-size:14px}.bp-change-count[_ngcontent-%COMP%]{font-size:13px;color:var(--mat-sys-on-surface-variant, #49454f);margin-right:4px}.btn-evaluate[_ngcontent-%COMP%]{flex-shrink:0;height:32px;font-size:13px}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.icon-loading[_ngcontent-%COMP%]{display:inline-block;animation:_ngcontent-%COMP%_spin 1s linear infinite}.wsjf-rationale[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.wsjf-rationale--epic[_ngcontent-%COMP%]{flex:1;min-width:280px;margin-top:8px}.wsjf-rationale-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--mat-sys-on-surface-variant, #49454f);text-transform:uppercase;letter-spacing:.05em}.wsjf-rationale-textarea[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;resize:vertical;border:1px solid var(--mat-sys-outline, #79747e);border-radius:6px;padding:8px 10px;font-size:13px;font-family:inherit;color:var(--mat-sys-on-surface, #1c1b1f);background:var(--mat-sys-surface, #fffbfe);line-height:1.5;transition:border-color .15s ease}.wsjf-rationale-textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--mat-sys-primary, #6750a4);border-width:2px}.wsjf-rationale-textarea[_ngcontent-%COMP%]::placeholder{color:var(--mat-sys-on-surface-variant, #49454f);opacity:.55;font-style:italic}.change-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;padding:8px 0}.change-card[_ngcontent-%COMP%]{border:1px solid var(--mat-sys-outline-variant, #cac4d0);border-radius:8px;padding:12px 16px;background:var(--mat-sys-surface, #fffbfe);display:flex;flex-direction:column;gap:8px;transition:box-shadow .15s ease}.change-card[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px #00000014}.change-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.change-header[_ngcontent-%COMP%] .change-description[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:var(--mat-sys-on-surface, #1c1b1f);flex:1;line-height:1.4}.change-score-badge[_ngcontent-%COMP%]{flex-shrink:0;min-width:40px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;padding:0 10px}.change-score-badge.score-high[_ngcontent-%COMP%]{background:#d4edda;color:#1a6632}.change-score-badge.score-medium[_ngcontent-%COMP%]{background:#fff3cd;color:#856404}.change-score-badge.score-low[_ngcontent-%COMP%]{background:#f8d7da;color:#842029}.change-score-badge.score-none[_ngcontent-%COMP%]{background:var(--mat-sys-surface-variant, #e7e0ec);color:var(--mat-sys-on-surface-variant, #49454f)}.change-sliders[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:4px 0}.change-sliders[_ngcontent-%COMP%] .slider-label[_ngcontent-%COMP%]{width:140px}.change-footer[_ngcontent-%COMP%]{display:flex;align-items:center}.job-size-badge[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:4px 10px;background:var(--mat-sys-secondary-container, #e8def8);border-radius:20px;font-size:12px}.job-size-badge[_ngcontent-%COMP%] .job-size-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;
595height:14px;color:var(--mat-sys-on-secondary-container, #1d192b)}.job-size-badge[_ngcontent-%COMP%] .job-size-label[_ngcontent-%COMP%]{font-weight:500;color:var(--mat-sys-on-secondary-container, #1d192b)}.job-size-badge[_ngcontent-%COMP%] .job-size-value[_ngcontent-%COMP%]{font-weight:800;color:var(--mat-sys-on-secondary-container, #1d192b)}.job-size-badge[_ngcontent-%COMP%] .job-size-hint[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-on-secondary-container, #1d192b);opacity:.65}"]});};var jne=(n,t)=>t.id;function Lne(n,t){if(n&1&&(s(0,"mat-chip",67),Wr(1,16),ee(2,"mat-icon",74),Xr(),c()),n&2){let e=x();m(2),us(e.object==null?null:e.object.portfolioOrder),fs(1);}}function zne(n,t){if(n&1&&(s(0,"mat-chip",68),Wr(1,17),ee(2,"mat-icon",74),Xr(),c()),n&2){let e=x();N("color",e.getPriorityColor((e.object==null?null:e.object.priority)||"")),m(2),us(e.object==null?null:e.object.priority),fs(1);}}function Fne(n,t){if(n&1){let e=oe();s(0,"app-project-evaluation-positioning",79),E("hasData",function(o){k(e);let a=x(2);return R(a.onPositioningEvaluationData(o));}),c();}if(n&2){let e=x(2);N("projectId",e.id)("businessProcesses",e.businessProcesses);}}function Bne(n,t){if(n&1&&ee(0,"app-project-evaluation",78),n&2){let e=x(2);N("projectId",e.id);}}function $ne(n,t){if(n&1&&(s(0,"as-split-area",71)(1,"div",75)(2,"div",76),S(3,Fne,1,2,"app-project-evaluation-positioning",77)(4,Bne,1,1,"app-project-evaluation",78),c()()()),n&2){let e=x();N("size",e.visibleLeftPanelKeys.length>1?e.layout.splitSizesLeft.projectEvaluation:100),m(3),M(e.selectedStatus.statusIndex<=1?3:4);}}function Vne(n,t){if(n&1&&(s(0,"as-split-area",71),ee(1,"app-gap-analysis-panel",78),c()),n&2){let e=x();N("size",e.visibleLeftPanelKeys.length>1?e.layout.splitSizesLeft.gapAnalysis:100),m(),N("projectId",e.id);}}function Gne(n,t){n&1&&(s(0,"mat-icon",115),u(1,"article"),c(),s(2,"span"),q(3,25),c());}function qne(n,t){n&1&&(s(0,"mat-icon",115),u(1,"rate_review"),c(),s(2,"span"),q(3,26),c());}function Jne(n,t){n&1&&(s(0,"mat-icon",115),u(1,"my_location"),c(),s(2,"span"),q(3,27),c());}function Hne(n,t){n&1&&(s(0,"mat-icon",115),u(1,"speed"),c(),s(2,"span"),u(3,"WSJF"),c());}function Une(n,t){n&1&&(s(0,"mat-icon",115),u(1,"calculate"),c(),s(2,"span"),q(3,28),c());}function Wne(n,t){if(n&1){let e=oe();s(0,"mat-tab"),Zt(1,Une,4,0,"ng-template",81),s(2,"div",82)(3,"app-project-costs",116),E("costCalculated",function(o){k(e);let a=x(2);return R(a.estimationTotalCost=o.totalProjectCost);}),c()()();}if(n&2){let e=x(2);m(3),N("projectId",e.id);}}function Xne(n,t){n&1&&(s(0,"mat-icon",115),u(1,"trending_up"),c(),s(2,"span"),q(3,29),c());}function Yne(n,t){n&1&&(s(0,"mat-icon",115),u(1,"info"),c(),s(2,"span"),q(3,30),c());}function Kne(n,t){n&1&&(s(0,"mat-icon",115),u(1,"attach_file"),c(),s(2,"span"),q(3,31),c());}function Zne(n,t){if(n&1){let e=oe();s(0,"as-split-area",73)(1,"div",80)(2,"div",76)(3,"mat-tab-group")(4,"mat-tab"),Zt(5,Gne,4,0,"ng-template",81),s(6,"div",82)(7,"form",83)(8,"div",84)(9,"app-intelligent-field",85,0),E("click",function(){k(e);let o=x();return R(o.clickField("project_description",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(11,"div",86)(12,"app-intelligent-field",87,1),E("click",function(){k(e);let o=x();return R(o.clickField("project_business_goals",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(14,"div",86)(15,"app-intelligent-field",88,2),E("click",function(){k(e);let o=x();return R(o.clickField("project_context",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(17,"div",86)(18,"app-intelligent-field",89,3),E("click",function(){k(e);let o=x();return R(o.clickField("project_guiding_principles",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(20,"div",86)(21,"app-intelligent-field",90,4),E("click",function(){k(e);let o=x();return R(o.clickField("project_orientations_motivations",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(23,"div",86)(24,"app-intelligent-field",91,5),E("click",function(){k(e);let o=x();return R(o.clickField("project_strategic_alignment",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(26,"div",86)(27,"app-intelligent-field",92,6),E("click",function(){k(e);let o=x();return R(o.clickField("project_scope",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(29,"div",86)(30,"app-intelligent-field",93,7),E("click",function(){k(e);let o=x();return R(o.clickField("project_current_situation",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(32,"div",86)(33,"app-intelligent-field",94,8),E("click",function(){k(e);let o=x();return R(o.clickField("project_market_trends",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(35,"div",86)(36,"app-intelligent-field",95,9),E("click",function(){k(e);let o=x();return R(o.clickField("project_business_needs",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(38,"div",86)(39,"app-intelligent-field",96,10),E("click",function(){k(e);let o=x();return R(o.clickField("project_future_situation",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(41,"div",86)(42,"app-intelligent-field",97,11),E("click",function(){k(e);let o=x();return R(o.clickField("project_changes",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(44,"div",86)(45,"app-intelligent-field",98,12),E("click",function(){k(e);let o=x();return R(o.clickField("project_risk_assessment",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(47,"div",86)(48,"app-intelligent-field",99,13),E("click",function(){k(e);let o=x();
595return R(o.clickField("project_benefits",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()(),s(50,"div",86)(51,"app-intelligent-field",100,14),E("click",function(){k(e);let o=x();return R(o.clickField("project_dependencies",o.version));})("onDebugData",function(o){k(e);let a=x();return R(a.setDebugData(o));})("onInsightTitle",function(o){k(e);let a=x();return R(a.setInsightTitle(o));})("onInsight",function(o){k(e);let a=x();return R(a.setInsight(o));})("onSave",function(){k(e);let o=x();return R(o.clickSave());}),c()()()()(),s(53,"mat-tab"),Zt(54,qne,4,0,"ng-template",81),s(55,"div",82),ee(56,"app-project-analysis",101),c()(),s(57,"mat-tab"),Zt(58,Jne,4,0,"ng-template",81),s(59,"div",82)(60,"app-project-positioning",102),E("totalCostChange",function(o){k(e);let a=x();return R(a.positioningTotalCost=o);}),c()()(),s(61,"mat-tab"),Zt(62,Hne,4,0,"ng-template",81),s(63,"div",82),ee(64,"app-project-wsjf",77),c()(),S(65,Wne,4,1,"mat-tab"),s(66,"mat-tab"),Zt(67,Xne,4,0,"ng-template",81),s(68,"div",82),ee(69,"app-project-roi",103),c()(),s(70,"mat-tab"),Zt(71,Yne,4,0,"ng-template",81),s(72,"div",82)(73,"form",83)(74,"div",104)(75,"div",105)(76,"mat-form-field",106)(77,"mat-label"),q(78,18),c(),s(79,"mat-icon",107),u(80,"tag"),c(),s(81,"input",108),E("change",function(){k(e);let o=x();return R(o.clickSave());}),c(),s(82,"mat-hint"),q(83,19),c()()(),s(84,"div",105)(85,"mat-form-field",106)(86,"mat-label"),q(87,20),c(),s(88,"mat-icon",107),u(89,"calendar_today"),c(),s(90,"input",109),E("change",function(){k(e);let o=x();return R(o.clickSave());}),c(),s(91,"mat-hint"),q(92,21),c()()()(),s(93,"div",86)(94,"mat-form-field",106)(95,"mat-label"),q(96,22),c(),s(97,"input",110),E("change",function(){k(e);let o=x();return R(o.clickSave());}),c(),s(98,"mat-hint"),q(99,23),c(),s(100,"mat-error",111),q(101,24),c()()(),s(102,"div",112)(103,"app-select-one-object",113),E("onSelectOne",function(){k(e);let o=x();return R(o.clickSave());}),c()()()()(),s(104,"mat-tab"),Zt(105,Kne,4,0,"ng-template",81),s(106,"div",82),ee(107,"lib-attachment-list",114),c()()()()()();}if(n&2){let e=bn(13),i=bn(16),o=bn(19),a=bn(22),r=bn(25),l=bn(28),p=bn(31),d=bn(34),f=bn(37),h=bn(40),g=bn(43),b=bn(46),w=bn(49),T=bn(52),O=x();N("size",O.visibleLeftPanelKeys.length>1?O.layout.splitSizesLeft.projectFields:100),m(7),N("formGroup",O.form),m(2),N("nextIntelligenField",e)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",i)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",o)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",a)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",r)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",l)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",p)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",d)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",f)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",h)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",g)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",b)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",w)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("nextIntelligenField",T)("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(3),N("object",O.object)("version",O.version)("agentContext",O.agentInterviewContext)("objectRef",O.objectRef)("form",O.form)("notesPath","projects/"+O.id),m(5),N("projectId",O.id)("object",O.object),m(4),N("projectId",O.id)("object",O.object)("businessProcesses",O.businessProcesses),m(4),N("projectId",O.id)("businessProcesses",O.businessProcesses),m(),M(O.selectedStatus.statusIndex>=2?65:-1),m(4),N("projectId",O.id)("statusIndex",O.selectedStatus.statusIndex)("estimationCost",O.estimationTotalCost)("positioningCost",O.positioningTotalCost)("project",O.object??null),m(4),N("formGroup",O.form),m(30),N("objectName",O.form.value.responsibleName)("objectId",O.form.value.responsible)("formGroup",O.form),m(4),N("referenceCollection","projects")("referenceId",O.id);}}function Qne(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function eie(n,t){n&1&&(s(0,"mat-icon",123),u(1,"autorenew"),c());}function tie(n,t){if(n&1){let e=oe();s(0,"tr",131),E("click",function(){let o=k(e).$implicit,a=x(4);return R(a.onBusinessProcessClick(o));})("dblclick",function(){let o=k(e).$implicit,a=x(4);return R(a.navigateToDesigner(o));}),s(1,"td",127),u(2),c(),s(3,"td",128),u(4),c(),s(5,"td",129)(6,"mat-icon",132),E("click",function(o){let a=k(e).$implicit;return x(4).navigateToDesigner(a),R(o.stopPropagation());}),u(7," open_in_new "),c()()();}if(n&2){let e=t.$implicit,i=x(4);Ue("sp-list-row-selected",i.isBpSelected(e)),m(2),G(e.number),m(2),G(e.name);}}function nie(n,t){if(n&1&&(s(0,"table",125)(1,"thead")(2,"tr")(3,"th",127),u(4,"Nb."),c(),s(5,"th",128),q(6,33),c(),ee(7,"th",129),c()(),s(8,"tbody"),be(9,tie,8,4,"tr",130,jne),c()()),n&2){let e=x(3);m(9),ye(e.businessProcesses);}}function iie(n,t){n&1&&(s(0,"span",126),q(1,34),c());}function oie(n,t){if(n&1){let e=oe();s(0,"as-split-area",71)(1,"div",117)(2,"div",118)(3,"mat-icon",119),u(4,"list"),c(),s(5,"span",120),q(6,32),c(),s(7,"div",53)(8,"button",121),E("click",function(){k(e);let o=x(2);return R(o.clickAddBusinessProcess());}),s(9,"mat-icon"),u(10,"add"),c()(),s(11,"button",122),E("click",function(){k(e);let o=x(2);return R(o.clickGenerateBusinessProcesses());}),S(12,Qne,2,0,"mat-icon"),S(13,eie,2,0,"mat-icon",123),c()()(),s(14,"div",124),S(15,nie,11,0,"table",125),S(16,iie,2,0,"span",126),c()()();}if(n&2){let e=x(2);N("size",e.layout.splitSizesRight.bpList),m(11),N("disabled",e.generateBpSpinner),m(),M(e.generateBpSpinner?-1:12),m(),M(e.generateBpSpinner?13:-1),m(2),M(e.businessProcesses&&e.businessProcesses.length>0?15:-1),m(),M(!e.businessProcesses||e.businessProcesses.length===0?16:-1);}}function aie(n,t){if(n&1&&(s(0,"div",135)(1,"span",136),q(2,38),c(),s(3,"span",137),u(4),c()()),n&2){let e=x(4);m(4),G(e.selectedBusinessProcess.description);}}function rie(n,t){if(n&1){let e=oe();s(0,"div",134)(1,"div",135)(2,"span",136),q(3,36),c(),s(4,"span",137),u(5),c()(),S(6,aie,5,1,"div",135),c(),s(7,"div",138)(8,"button",139),E("click",function(){k(e);let o=x(3);return R(o.navigateToDesigner(o.selectedBusinessProcess));}),s(9,"mat-icon"),u(10,"open_in_new"),c(),s(11,"span"),q(12,37),c()()();}if(n&2){let e=x(3);m(5),G(e.selectedBusinessProcess.name),m(),M(e.selectedBusinessProcess.description?6:-1);}}function sie(n,t){n&1&&(s(0,"span",126),q(1,39),c());}function lie(n,t){if(n&1&&(s(0,"as-split-area",71)(1,"div",133)(2,"div",118)(3,"mat-icon",119),u(4,"info"),
595c(),s(5,"span",120),q(6,35),c()(),s(7,"div",76),S(8,rie,13,2),S(9,sie,2,0,"span",126),c()()()),n&2){let e=x(2);N("size",e.layout.splitSizesRight.bpDetail),m(8),M(e.selectedBusinessProcess?8:-1),m(),M(e.selectedBusinessProcess?-1:9);}}function cie(n,t){if(n&1&&(s(0,"as-split-area",71),ee(1,"app-context-notes-panel",140),c()),n&2){let e=x(2);N("size",e.layout.splitSizesRight.contextNotes),m(),N("objectRef",e.objectRef)("notesPath",e.getNotesPath())("showContexts",!0)("showNotes",!0);}}function pie(n,t){if(n&1&&(s(0,"as-split-area",71)(1,"div",141)(2,"div",118)(3,"mat-icon",119),u(4,"chat"),c(),s(5,"span",120),q(6,40),c()(),s(7,"div",142),ee(8,"app-ask-architect",143),c()()()),n&2){let e=x(2);N("size",e.layout.splitSizesRight.chat),m(8),N("objectTypeId","project")("object",e.object)("standalone",!1);}}function die(n,t){if(n&1){let e=oe();s(0,"as-split-area",71)(1,"as-split",72),E("dragEnd",function(o){k(e);let a=x();return R(a.layout.onVerticalRightDragEnd(o,a.rightPanelOrder));}),S(2,oie,17,6,"as-split-area",71),S(3,lie,10,3,"as-split-area",71),S(4,cie,2,5,"as-split-area",71),S(5,pie,9,4,"as-split-area",71),c()();}if(n&2){let e=x();N("size",e.layout.splitSizes.right),m(),N("gutterSize",20),m(),M(e.layout.panelVisibility.bpList?2:-1),m(),M(e.layout.panelVisibility.bpDetail?3:-1),m(),M(e.layout.panelVisibility.contextNotes?4:-1),m(),M(e.layout.panelVisibility.chat?5:-1);}}var R0=class n{constructor(t,e,i,o,a,r,l,p,d){this.firebase=t;this.router=e;this.route=i;this.authService=o;this.httpClient=a;this.messagingService=r;this.loggingService=l;this.dialog=p;this.localeService=d;this.objectLabel="Project",this.collectionPath="/projects/",this.collectionLabel="Project",this.parentRouterLink="/dashboard/projects",this.currentRouterLink="/dashboard/project",this.form=new Ri({name:new st("",Ye.required),description:new st(""),goals:new st(""),context:new st(""),guidingPrinciples:new st(""),orientationsMotivations:new st(""),strategicAlignment:new st(""),scope:new st(""),currentSituation:new st(""),marketTrends:new st(""),businessNeeds:new st(""),futureSituation:new st(""),changes:new st(""),riskAssessment:new st(""),benefits:new st(""),dependencies:new st(""),capabilities:new st(""),estimation:new st(""),contributors:new st(""),risks:new st(""),impact:new st(""),category:new st(""),theme:new st(""),links:new st(""),responsible:new st(""),identifier:new st(""),targetPeriod:new st("")});}firebase;router;route;authService;httpClient;messagingService;loggingService;dialog;localeService;estimationTotalCost;positioningTotalCost;subscriptions=new jo();formControlRef;object;version="2.0";objectRef;form;objectLabel;get objectLabelDisplay(){return this.objectLabel;}get objectNameDisplay(){let t=this.form.value.name??"";if(t.length<=75)return t;let e=t.indexOf(" ",75);return e===-1?t:t.substring(0,e)+"...";}collectionPath;collectionLabel;parentRouterLink;currentRouterLink;id;businessProcesses;insightTitle="";insight="";debugData;layout=new Yf({prefix:"project",horizontalDefaults:{left:65,right:35},verticalRightDefaults:{bpList:30,bpDetail:20,contextNotes:30,chat:20},verticalLeftDefaults:{projectEvaluation:20,gapAnalysis:50,projectFields:30},panelVisibilityDefaults:{projectEvaluation:!0,projectFields:!0,gapAnalysis:!1,bpList:!0,bpDetail:!0,contextNotes:!0,chat:!0}});rightPanelOrder=["bpList","bpDetail","contextNotes","chat"];leftPanelOrder=["projectEvaluation","gapAnalysis","projectFields"];get visibleLeftPanelKeys(){return this.leftPanelOrder.filter(t=>this.layout.panelVisibility[t]!==!1);}selectedBusinessProcess=null;generateBpSpinner=!1;agentInterviewContext={};progressBarStatus=[{value:"initiation",label:"Initiation",statusIndex:0,isDisable:!1},{value:"opportunity",label:"Opportunity",statusIndex:1,isDisable:!1},{value:"feasibility",label:"Feasibility",statusIndex:2,isDisable:!1},{value:"design",label:"Design",statusIndex:3,isDisable:!1},{value:"realization",label:"Realization",statusIndex:4,isDisable:!1},{value:"closed",label:"Closed",statusIndex:5,isDisable:!1}];selectedStatus=this.progressBarStatus[0];onboardingTour;showOnboarding=!1;wizardAutoOpened=!1;firstSnapshotProcessed=!1;setInsightTitle(t){this.insightTitle=t;}setInsight(t){this.insight=t;}setDebugData(t){this.debugData=t;}
595ngOnInit(){return $(this,null,function*(){try{let t=this.route.snapshot.paramMap.get("id");if(t!=null)this.id=t;else{this.router.navigate([this.parentRouterLink],{replaceUrl:!0});return;}this.objectRef=ge(this.firebase.firestore,this.collectionPath,this.id),this.businessProcesses=yield this.getBusinessProcessList();try{let e=yield yt(ge(this.firebase.firestore,this.collectionPath,this.id,"agentInterview","fields"));if(e.exists()){let i=e.data(),o={};for(let[a,r]of Object.entries(i))a!=="agentConversation"&&typeof r=="string"&&r.trim()&&(o[a]=r);this.agentInterviewContext=o;}}catch(e){}this.subscriptions.add(Bn(this.objectRef,e=>$(this,null,function*(){if(this.object=X({id:e.id},e.data()),this.form.patchValue({name:this.object.name,description:this.object.description,goals:this.object.goals,context:this.object.context,guidingPrinciples:this.object.guidingPrinciples,orientationsMotivations:this.object.orientationsMotivations,strategicAlignment:this.object.strategicAlignment,scope:this.object.scope,currentSituation:this.object.currentSituation,marketTrends:this.object.marketTrends,businessNeeds:this.object.businessNeeds,futureSituation:this.object.futureSituation,changes:this.object.changes,riskAssessment:this.object.riskAssessment,benefits:this.object.benefits,dependencies:this.object.dependencies,capabilities:this.object.capabilities,estimation:this.object.estimation,contributors:this.object.contributors,risks:this.object.risks,impact:this.object.impact,category:this.object.category,theme:this.object.theme,links:this.object.links,responsible:this.object.responsible,identifier:this.object.identifier,targetPeriod:this.object.targetPeriod}),this.object.phase){let i=this.progressBarStatus.find(o=>o.value===this.object.phase);i&&(this.selectedStatus=i);}if(!this.firstSnapshotProcessed){if(this.firstSnapshotProcessed=!0,this.object.wizardCompleted===!1&&!this.wizardAutoOpened)this.wizardAutoOpened=!0,setTimeout(()=>this._openWizardForResume(),300);else if(this.object.wizardCompleted===!0){let i=`skycortex_tour_${this.id}`;localStorage.getItem(i)||setTimeout(()=>{this.showOnboarding=!0;},600);}}})));}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading data","",{duration:3e3});}});}ngOnDestroy(){this.subscriptions.unsubscribe();}clickSave(){let t=ts.extractDataFromFormGroup(this.form);this.saveObject(t);}saveObject(t){return $(this,null,function*(){this.objectRef?yield Dt(this.objectRef,t,{merge:!0}):(t.creationDate=new Date(),this.objectRef=yield Ht(we(this.firebase.firestore,this.collectionPath),t)),this.messagingService.open("Data saved","",{duration:3e3});});}references=[];clickField(t,e){return $(this,null,function*(){console.log(t),this.references=[];let i=mt(we(this.firebase.firestore,"fields/"+t+"_"+e+"/references"),Jt("name","asc")),o=yield at(i);for(let a of o.docs){let r=X({id:a.id},a.data());this.references.push({detail:r.detail,name:r.name,web:r.web,truncated:r.detail.substring(0,400)+"..."});}});}clickOpenLink(t){}getBusinessProcessRoute(){return this.currentRouterLink+"/"+this.id+"/businessprocess";}getBusinessProcessPath(){return this.getBusinessProcessBasePath()+this.getBusinessProcessCollection();}getBusinessProcessCollection(){return"/businessprocesses";}getBusinessProcessBasePath(){return this.collectionPath+this.id;}getBusinessProcessList(){return $(this,null,function*(){let t=[],e=mt(we(this.firebase.firestore,this.getBusinessProcessPath()),Jt("number","asc")),i=yield at(e);for(let o of i.docs)t.push(X({id:o.id},o.data()));return t;});}clickGapAnalysis(){this.router.navigate(["dashboard/gapanalysis/"+this.id]);}createNewProjectEmpty(){return $(this,null,function*(){try{let t={name:"",description:"",goals:"",scope:"",capabilities:"",estimation:"",contributors:"",benefits:"",risks:"",impact:"",category:"",theme:"",links:"",responsible:"",creationDate:Rn.now(),selectedContextIds:[],wizardCompleted:!1,wizardStep:0},e=yield Ht(we(this.firebase.firestore,this.collectionPath),t);return this.messagingService.open("New project created","",{duration:2e3}),e.id;}catch(t){throw this.loggingService.error(t),this.messagingService.open("Error creating project","",{duration:3e3}),t;}});}_openWizardForResumeLegacy(){if(!this.id||!this.object)return;this.dialog.open(Wf,{maxWidth:"1200px",width:"90vw",maxHeight:"90vh",height:"1000px",disableClose:!1,data:{projectId:this.id,initialData:this.object,startAtStep:this.object.wizardStep??0}}).afterClosed().subscribe(e=>{if(e?.completed){let i=`skycortex_tour_${this.id}`;localStorage.getItem(i)||setTimeout(()=>{this.showOnboarding=!0;},600);}});}_openWizardForResume(){this.id&&this.router.navigate([`/dashboard/project/${this.id}/journey`]);}clickSwitchToTakeoffMode(){this.id&&(document.documentElement.classList.add("nav-to-journey"),this.router.navigate([`/dashboard/project/${this.id}/journey`]));}toggleProjectPanelVisibility(t){this.layout.togglePanel(t);}onPositioningEvaluationData(t){!t&&this.layout.panelVisibility.projectEvaluation&&(this.layout.panelVisibility.projectEvaluation=!1);}clickModeProjectDetails(){this.layout.setMode({projectEvaluation:!0,projectFields:!0,gapAnalysis:!1,bpList:!0,bpDetail:!1,contextNotes:!0,chat:!0});}clickModeGapAnalysis(){this.layout.setMode({projectEvaluation:!1,projectFields:!1,gapAnalysis:!0,bpList:!0,bpDetail:!1,contextNotes:!1,chat:!1});}getNotesPath(){return`${this.collectionPath}${this.id}/notes`;}isBpSelected(t){return this.selectedBusinessProcess?.id===t.id;}onBusinessProcessClick(t){this.selectedBusinessProcess=this.isBpSelected(t)?null:t;}navigateToDesigner(t){this.router.navigate([this.getBusinessProcessRoute()+"/"+t.id]);}getPriorityColor(t){switch(t?.toLowerCase()){case"high":case"urgent":return"warn";case"medium":return"accent";case"low":return"primary";default:return"primary";}}clickAddBusinessProcess(){return $(this,null,function*(){if(!this.id)return;let t=yield this.getNextBusinessProcessNumber();yield this.addBusinessProcess(t,"New Business Process",""),this.businessProcesses=yield this.getBusinessProcessList(),this.messagingService.open("Business process created.","",{duration:3e3});});}clickGenerateBusinessProcesses(){return $(this,null,function*(){if(!this.object)return;let t=yield this.generateBusinessProcessList(this.object);try{t?this.dialog.open(gs,{height:"50%",width:"1000px",data:{rawData:t}}).afterClosed().subscribe(i=>$(this,null,function*(){if(i){let o=yield this.getNextBusinessProcessNumber();for(let a of i)a.selected===!0&&(yield this.addBusinessProcess(o,a.title,a.description),o++);this.businessProcesses=yield this.getBusinessProcessList(),this.messagingService.open("Business processes added.","",{duration:3e3});}})):this.messagingService.open("No results.","",{duration:3e3});}catch(e){this.messagingService.open("An error has occurred, please try again later or contact the administrator.","",{duration:3e3});}});}generateBusinessProcessList(t){return $(this,null,function*(){let e=ei(this.firebase.functions,"functionCallFunctionStream"),i,o={functionName:"generate_businessprocesses",version:"2.0",objectType:"project",locale:this.localeService.getSelectedLocaleShort(),object:{project:t}};this.generateBpSpinner=!0;try{let{stream:d}=yield e.stream(o);try{for(var a=Co(d),r,l,p;r=!(l=yield a.next()).done;r=!1){let f=l.value;f&&(i=f);}}catch(l){p=[l];}finally{try{r&&(l=a.return)&&(yield l.call(a));}finally{if(p)throw p[0];}}}catch(d){console.error("Error streaming business process generation:",d);return;}finally{this.generateBpSpinner=!1;}return i;});}getNextBusinessProcessNumber(){return $(this,null,function*(){let t=0,e=mt(we(this.firebase.firestore,this.getBusinessProcessPath()),Jt("number","desc")),i=yield at(e);for(let o of i.docs){let a=X({id:o.id},o.data()),r=parseInt(a.number);r>t&&(t=r);break;}return t+1;});}
595addBusinessProcess(t,e,i){return $(this,null,function*(){yield Ht(we(this.firebase.firestore,this.getBusinessProcessPath()),{number:t+"",name:e,description:i||"",projectId:this.id,creationDate:Rn.fromDate(new Date())});});}onProgressBarStatusChanges(t){return $(this,null,function*(){this.selectedStatus=t,this.objectRef&&(yield Dt(this.objectRef,{phase:t.value},{merge:!0}));});}clickRestartTour(){this.clickModeProjectDetails(),setTimeout(()=>{this.onboardingTour?.restartTour();},100);}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Oo),le(Zr),le(Bt),le(Mo),le(Ti),le(To));};static ɵcmp=Te({type:n,selectors:[["app-project"]],viewQuery:function(e,i){if(e&1&&go(k0,5),e&2){let o;qn(o=Jn())&&(i.onboardingTour=o.first);}},decls:68,vars:43,consts:()=>{let t;t="Restart guided tour";let e;e="Switch to takeoff mode";let i;i="Switch to takeoff mode";let o;o=""+"\uFFFD#2\uFFFD"+"format_list_numbered"+"\uFFFD/#2\uFFFD"+" Order: "+"\uFFFD0\uFFFD"+" ";let a;a=""+"\uFFFD#2\uFFFD"+"priority_high"+"\uFFFD/#2\uFFFD"+" Priority: "+"\uFFFD0\uFFFD"+" ";let r;r="Responsible";let l;l="Person accountable for this project";let p;p="Identifier";let d;d="Organisation reference number";let f;f="Target Period";let h;h="Year or Quarter + Year";let g;g="Project name";let b;b="Official name of the project as it appears in reports";let w;w="Field is required";let T;T="Project";let O;O="Review";let V;V="Positioning";let j;j="Estimation";let L;L="ROI";let A;A="Details";let J;J="Documents";let Q;Q="Add a new business process";let te;te="Generate business processes";let U;U="Business Processes";let ce;ce="Name";let W;W="Open designer";let Y;Y=" No business processes found. ";let se;se="Business Process Detail";let de;de="Open in designer";let Ae;Ae="Name:";let rt;rt="Open Designer";let et;et="Description:";let pt;pt=" Select a business process from the list above to see details. ";let ft;return ft="Chat with the architect",[["project_description",""],["project_business_goals",""],["project_context",""],["project_guiding_principles",""],["project_orientations_motivations",""],["project_strategic_alignment",""],["project_scope",""],["project_current_situation",""],["project_market_trends",""],["project_business_needs",""],["project_future_situation",""],["project_changes",""],["project_risk_assessment",""],["project_benefits",""],["project_dependencies",""],i,o,a,p,d,f,h,g,b,w,T,O,V,j,L,A,J,U,ce,Y,se,Ae,rt,et,pt,ft,[1,"project-wrapper"],[3,"projectId","active"],[1,"project-header"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-toolbar-secondary"],["mat-icon-button","","matTooltip",t,1,"btn-tour",3,"click"],["mat-button","","matTooltip",e,1,"btn-takeoff-mode",3,"click"],[1,"div-button-right"],[1,"div-panel-toggles-control"],["mat-flat-button","","color","primary",3,"click"],["mat-flat-button","","color","primary","data-tour-target","tour-gap-analysis",3,"click"],["data-tour-target","tour-panel-toggles",1,"div-panel-toggles"],["mat-icon-button","","matTooltip","Show/hide project evaluation panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide business processes panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide business process detail panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide contexts & notes panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide project fields panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide gap analysis panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide chat panel",3,"click"],["data-tour-target","tour-progress-bar",3,"statusChange","progressBarStatus","selectedStatus"],[1,"div-form-element",2,"padding","8px 16px"],["color","primary"],[3,"color"],[1,"div-content"],["direction","horizontal",3,"dragEnd","gutterSize"],[3,"size"],["direction","vertical",3,"dragEnd","gutterSize"],["data-tour-target","tour-project-tabs",3,"size"],["matChipAvatar",""],["data-tour-target","tour-evaluation",1,"container-right-panel"],[1,"container-tile-body-strong"],[3,"projectId","businessProcesses"],[3,"projectId"],[3,"hasData","projectId","businessProcesses"],[1,"container-right-panel"],["mat-tab-label",""],[1,"tab-content"],[3,"formGroup"],["data-tour-target","tour-intelligent-field",1,"div-form-element"],["objectType","project","field","project_description","controlName","description",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],[1,"div-form-element"],["objectType","project","field","project_business_goals","controlName","goals",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_context","controlName","context",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_guiding_principles","controlName","guidingPrinciples",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_orientations_motivations","controlName","orientationsMotivations",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_strategic_alignment","controlName","strategicAlignment",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_scope","controlName","scope",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_current_situation","controlName","currentSituation",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_market_trends","controlName","marketTrends",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_business_needs","controlName","businessNeeds",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_future_situation","controlName","futureSituation",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_changes","controlName","changes",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_risk_assessment","controlName","riskAssessment",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_benef
595its","controlName","benefits",3,"click","onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","version","agentContext","objectRef","form","notesPath"],["objectType","project","field","project_dependencies","controlName","dependencies",3,"click","onDebugData","onInsightTitle","onInsight","onSave","object","version","agentContext","objectRef","form","notesPath"],[3,"projectId","object"],[3,"totalCostChange","projectId","object","businessProcesses"],[3,"projectId","statusIndex","estimationCost","positioningCost","project"],[1,"div-form-row"],[1,"div-form-element","div-form-element--half"],["appearance","fill",1,"mat-form-field-form"],["matPrefix",""],["matInput","","formControlName","identifier","placeholder","e.g. PRJ-001",3,"change"],["matInput","","formControlName","targetPeriod","placeholder","e.g. 2025 or Q2 2025",3,"change"],["matInput","","formControlName","name",3,"change"],[1,"mat-subfield-text"],[1,"div-form-element","div-form-element--responsible"],["formControlRef","responsible","label",r,"hint",l,3,"onSelectOne","objectName","objectId","formGroup"],[3,"referenceCollection","referenceId"],[1,"tab-icon"],[3,"costCalculated","projectId"],["data-tour-target","tour-bp-list",1,"container-right-panel"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],["mat-icon-button","","color","primary","matTooltip",Q,3,"click"],["mat-icon-button","","color","primary","data-tour-target","tour-generate-bp","matTooltip",te,3,"click","disabled"],[1,"icon-loading"],[1,"container-tile-body-strong","sp-list-body"],[1,"sp-list-table"],[1,"div-insight-disabled"],[1,"sp-col-number"],[1,"sp-col-name"],[1,"sp-col-link"],[1,"sp-list-row",3,"sp-list-row-selected"],[1,"sp-list-row",3,"click","dblclick"],["matTooltip",W,1,"sp-link-icon","sp-drilldown-icon",3,"click"],["data-tour-target","tour-bp-detail",1,"container-right-panel"],[1,"detail-section"],[1,"detail-row"],[1,"detail-key"],[1,"detail-value"],[1,"link-controls",2,"margin-top","8px"],["mat-stroked-button","","color","primary","matTooltip",de,3,"click"],["data-tour-target","tour-context-notes",3,"objectRef","notesPath","showContexts","showNotes"],["data-tour-target","tour-ask-architect",1,"container-right-panel","container-right-chat"],[1,"container-tile-body-strong","chat-body"],[3,"objectTypeId","object","standalone"]];},template:function(e,i){e&1&&(s(0,"div",41),ee(1,"app-project-onboarding",42),s(2,"div",43)(3,"div",44)(4,"mat-toolbar",45)(5,"div",46)(6,"div")(7,"mat-icon",47),u(8,"category"),c()(),s(9,"div")(10,"div",48),u(11),c(),s(12,"div",49),u(13),c()()(),s(14,"div",50)(15,"button",51),E("click",function(){return i.clickRestartTour();}),s(16,"mat-icon"),u(17,"help_outline"),c()(),s(18,"button",52),E("click",function(){return i.clickSwitchToTakeoffMode();}),s(19,"span"),q(20,15),c(),s(21,"mat-icon"),u(22,"air"),c()()(),s(23,"div",53)(24,"div",54)(25,"button",55),E("click",function(){return i.clickModeProjectDetails();}),u(26," Project Details "),s(27,"mat-icon"),u(28,"category"),c()(),s(29,"button",56),E("click",function(){return i.clickModeGapAnalysis();}),u(30," Gap Analysis "),s(31,"mat-icon"),u(32,"tune"),c()()(),s(33,"div",57)(34,"button",58),E("click",function(){return i.toggleProjectPanelVisibility("projectEvaluation");}),s(35,"mat-icon"),u(36,"bar_chart"),c()(),s(37,"button",59),E("click",function(){return i.toggleProjectPanelVisibility("bpList");}),s(38,"mat-icon"),u(39,"list"),c()(),s(40,"button",60),E("click",function(){return i.toggleProjectPanelVisibility("bpDetail");}),s(41,"mat-icon"),u(42,"info"),c()(),s(43,"button",61),E("click",function(){return i.toggleProjectPanelVisibility("contextNotes");}),s(44,"mat-icon"),u(45,"library_books"),c()(),s(46,"button",62),E("click",function(){return i.toggleProjectPanelVisibility("projectFields");}),s(47,"mat-icon"),u(48,"category"),c()(),s(49,"button",63),E("click",function(){return i.toggleProjectPanelVisibility("gapAnalysis");}),s(50,"mat-icon"),u(51,"tune"),c()(),s(52,"button",64),E("click",function(){return i.toggleProjectPanelVisibility("chat");}),s(53,"mat-icon"),u(54,"chat"),c()()()()(),s(55,"lib-progress-bar",65),E("statusChange",function(a){return i.onProgressBarStatusChanges(a);}),c()(),s(56,"div",66)(57,"mat-chip-set"),S(58,Lne,3,1,"mat-chip",67),S(59,zne,3,2,"mat-chip",68),c()(),s(60,"div",69)(61,"as-split",70),E("dragEnd",function(a){return i.layout.onHorizontalDragEnd(a);}),s(62,"as-split-area",71)(63,"as-split",72),E("dragEnd",function(a){return i.layout.onVerticalLeftDragEnd(a,i.visibleLeftPanelKeys);}),S(64,$ne,5,2,"as-split-area",71),S(65,Vne,2,2,"as-split-area",71),S(66,Zne,108,125,"as-split-area",73),c()(),S(67,die,6,6,"as-split-area",71),c()()()()),e&2&&(m(),N("projectId",i.id)("active",i.showOnboarding),m(10),G(i.objectLabelDisplay),m(2),G(i.objectNameDisplay),m(21),Ue("toggle-active",i.layout.panelVisibility.projectEvaluation)("toggle-inactive",!i.layout.panelVisibility.projectEvaluation),m(3),Ue("toggle-active",i.layout.panelVisibility.bpList)("toggle-inactive",!i.layout.panelVisibility.bpList),m(3),Ue("toggle-active",i.layout.panelVisibility.bpDetail)("toggle-inactive",!i.layout.panelVisibility.bpDetail),m(3),Ue("toggle-active",i.layout.panelVisibility.contextNotes)("toggle-inactive",!i.layout.panelVisibility.contextNotes),m(3),Ue("toggle-active",i.layout.panelVisibility.projectFields)("toggle-inactive",!i.layout.panelVisibility.projectFields),m(3),Ue("toggle-active",i.layout.panelVisibility.gapAnalysis)("toggle-inactive",!i.layout.panelVisibility.gapAnalysis),m(3),Ue("toggle-active",i.layout.panelVisibility.chat)("toggle-inactive",!i.layout.panelVisibility.chat),m(3),N("progressBarStatus",i.progressBarStatus)("selectedStatus",i.selectedStatus),m(3),M(i.object!=null&&i.object.portfolioOrder?58:-1),m(),M(i.object!=null&&i.object.priority?59:-1),m(2),N("gutterSize",20),m(),N("size",i.layout.splitSizes.left),m(),N("gutterSize",20),m(),M(i.layout.panelVisibility.projectEvaluation?64:-1),m(),M(i.layout.panelVisibility.gapAnalysis?65:-1),m(),M(i.layout.panelVisibility.projectFields?66:-1),m(),M(i.layout.panelVisibility.bpList||i.layout.panelVisibility.bpDetail||i.layout.panelVisibility.contextNotes||i.layout.panelVisibility.chat?67:-1));},dependencies:[$e,Qe,Qt,jt,Xt,Vt,Wt,Ki,ti,Pl,We,Xe,ln,yn,vv,ut,tn,Nn,Ft,Tt,Mn,An,Wn,Gt,br,$t,_n,yi,Ta,Cd,Ls,bi,Tl,vd,Ol,El,yv,zs,vr,cr,Cr,jd,Kf,wv,Sv,Zf,uI,vf,k0,th,bv,Mv],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
595.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.project-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:transparent;height:100%}.project-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin-left:10px;margin-right:10px;margin-bottom:20px;padding-bottom:0;background-color:transparent;min-height:0}.container-left-scroll[_ngcontent-%COMP%]{height:100%;overflow-y:auto;overflow-x:hidden;padding-right:4px}.div-toolbar[_ngcontent-%COMP%]{height:80px;margin-bottom:0;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large;view-transition-name:project-title;contain:layout}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.title[_ngcontent-%COMP%]{padding-left:10px}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;align-items:center;align-self:flex-start;flex-shrink:0;gap:8px}.div-panel-toggles-control[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding-top:12px}.div-toolbar-secondary[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;align-items:flex-end;align-self:flex-start;flex:1;gap:8px;padding-top:12px}.div-panel-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-basis:100%;gap:4px;padding:0}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important;filter:none;text-shadow:none}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-inactive[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important;filter:none;text-shadow:none}.container-tile[_ngcontent-%COMP%], .container-tile-graph[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;padding:20px;margin-bottom:10px}.container-tile-icon[_ngcontent-%COMP%]{color:#465d91}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:8px 16px}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}
595.container-right-chat[_ngcontent-%COMP%] .chat-body[_ngcontent-%COMP%]{flex:1;overflow:auto;display:flex;flex-direction:column}.sp-list-body[_ngcontent-%COMP%]{padding:0!important}.sp-list-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.9em}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;background-color:#fafafa}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:8px 10px;font-weight:600;color:#0009;font-size:.85em;text-transform:uppercase;letter-spacing:.3px;border-bottom:2px solid rgba(0,0,0,.08)}.sp-list-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.05)}.sp-list-row[_ngcontent-%COMP%]{cursor:pointer;transition:background-color .15s ease,border-left .15s ease;border-left:3px solid transparent}.sp-list-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 10px;vertical-align:middle}.sp-list-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%]{border-left:3px solid #465d91}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-weight:500}.sp-col-number[_ngcontent-%COMP%]{width:40px;text-align:center;color:#0009;font-weight:500}.sp-col-name[_ngcontent-%COMP%]{word-break:break-word}.sp-col-link[_ngcontent-%COMP%]{width:50px;text-align:center;padding-right:6px!important;white-space:nowrap}.sp-link-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#465d91;opacity:.7}.sp-drilldown-icon[_ngcontent-%COMP%]{cursor:pointer;border-radius:4px;transition:background-color .15s ease,opacity .15s ease;opacity:.5}.sp-drilldown-icon[_ngcontent-%COMP%]:hover{opacity:1;background-color:#465d911f}.detail-section[_ngcontent-%COMP%]{padding:10px 0;border-bottom:1px solid rgba(0,0,0,.08)}.detail-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.detail-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding:4px 0;font-size:.9em}.detail-key[_ngcontent-%COMP%]{font-weight:500;color:#0009;min-width:80px;flex-shrink:0}.detail-value[_ngcontent-%COMP%]{color:#000000de;word-break:break-word}.link-controls[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:10px}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-shrink:0}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit!important;filter:none!important;text-shadow:none!important}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px} lib-progress-bar{--primary-color: #465d91;--accent-color: #142f60} lib-progress-bar .status-chevrons{padding:6px 16px 10px;border-bottom:none!important} lib-progress-bar .status-chevrons div{height:32px;font-size:.8em} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter{background-color:transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}.div-form-element[_ngcontent-%COMP%]{margin:auto auto 20px;width:100%;overflow-x:hidden}.div-form-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:12px;width:100%;margin-bottom:20px}.div-form-row[_ngcontent-%COMP%] .div-form-element--half[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;margin:0}.div-form-element--responsible[_ngcontent-%COMP%] app-select-one-object[_ngcontent-%COMP%]{display:block;width:100%}.div-form-element--responsible[_ngcontent-%COMP%] app-select-one-object mat-form-field, .div-form-element--responsible[_ngcontent-%COMP%] app-select-one-object .mat-mdc-form-field{width:100%}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.mat-subfield-text[_ngcontent-%COMP%]{font-size:small}.tab-content[_ngcontent-%COMP%]{padding-top:20px}.tab-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:6px;vertical-align:middle;color:inherit!important;filter:none!important;text-shadow:none!important}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button.btn-tour[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#0000008c!important;filter:none!important;text-shadow:none!important}button.btn-takeoff-mode[_ngcontent-%COMP%]{color:#0006!important}button.btn-takeoff-mode[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#0006!important;filter:none!important;text-shadow:none!important}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};var ih=class n{constructor(t,e,i){this.authService=t;this.fb=e;this.dialogRef=i;this.form=this.fb.group({emailFormControl:[null,[Ye.required,Ye.email]],passwordFormControl:[null,[Ye.required]]});}authService;fb;dialogRef;form=new Ri({});hide=!0;closeDialog(){this.dialogRef.close();}ngOnInit(){}submit(t){return $(this,null,function*(){let e=this.form.get("emailFormControl")?.value,i=this.form.get("passwordFormControl")?.value;console.log(e),console.log(i),this.login(e,i);});}login(t,e){return $(this,null,function*(){try{yield this.authService.signIn(t,e,"dashboard"),this.closeDialog();}catch(a){console.log(a);var i=a.code,o=a.message;alert("Wrong username, password or attestation failed.");}});}static ɵfac=function(e){return new(e||n)(le(Oo),le(wo),le(Li));};static ɵcmp=Te({type:n,selectors:[["app-sign-in"]],decls:52,vars:4,consts:[[1,"div-logo"],[1,"div-logo-dirigeable"],["height","40","version","1.1","id","Layer_
5951","xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","x","0px","y","0px","viewBox","0 0 792 146.3",0,"xml","space","preserve",2,"enable-background","new 0 0 792 146.3"],["type","text/css"],["d","M82.7,11.3C74,3.8,61.6,0,45.9,0H4C2.9,0,1.8,0.4,1.1,1.1C0.4,2,0,2.9,0,4v103.5c0,1.1,0.4,2,1.1,2.9c0.9,0.9,1.8,1.1,2.9,1.1h42.8c31.9,0,48.5-14.6,49.6-43.7c0-2.9,0.2-7.1,0.2-12.2s0-9.3-0.2-12.2C95.9,29.7,91.3,18.8,82.7,11.3zM65.8,67.8c-0.2,7.1-2,12.2-5.1,15.3c-3.1,3.1-8.2,4.9-14.8,4.9h-16V24.2H45c6.6,0,11.7,1.6,15.3,4.9s5.3,8.2,5.5,15.1C66,47,66,51,66,55.8C66.3,60.7,66,64.7,65.8,67.8z",1,"st0"],["d","M136.7,41.4h-19.9c-1.1,0-2,0.4-2.9,1.1s-1.1,1.8-1.1,2.9v61.9c0,1.1,0.4,2,1.1,2.9c0.9,0.9,1.8,1.1,2.9,1.1h19.9c1.1,0,2.2-0.4,2.9-1.1c0.9-0.7,1.1-1.8,1.1-2.9V45.4c0-1.1-0.4-2.2-1.1-2.9C138.9,41.8,138.1,41.4,136.7,41.4z",1,"st0"],["d","M217.8,41.4h-7.1c-4.9,0-9.3,0.9-13.3,2.7c-4,1.8-7.5,4.2-10.4,7.5v-6c0-1.1-0.4-2.2-1.1-2.9c-0.9-0.9-1.8-1.1-2.9-1.1h-19.5c-1.1,0-2.2,0.4-2.9,1.1c-0.7,0.9-1.1,1.8-1.1,2.9v61.9c0,1.1,0.4,2,1.1,2.9c0.9,0.9,1.8,1.1,2.9,1.1h21.1c1.1,0,2.2-0.4,2.9-1.1c0.9-0.7,1.1-1.8,1.1-2.9V80.4c0-4.2,1.1-7.5,3.3-10c2.2-2.4,5.5-3.5,9.7-3.5h16.2c1.1,0,2.2-0.4,2.9-1.1c0.7-0.9,1.1-1.8,1.1-2.9V45.6c0-1.1-0.4-2.2-1.1-2.9C219.8,41.8,218.9,41.4,217.8,41.4z",1,"st0"],["d","M256.6,41.4h-19.9c-1.1,0-2,0.4-2.9,1.1c-0.9,0.7-1.1,1.8-1.1,2.9v61.9c0,1.1,0.4,2,1.1,2.9c0.9,0.9,1.8,1.1,2.9,1.1h19.9c1.1,0,2.2-0.4,2.9-1.1c0.9-0.7,1.1-1.8,1.1-2.9V45.4c0-1.1-0.4-2.2-1.1-2.9C258.8,41.8,257.7,41.4,256.6,41.4z",1,"st0"],["d","M358.3,28.8h-19.5c-1.1,0-2.2,0.4-2.9,1.1c-0.7,0.9-1.1,1.8-1.1,2.9v5.8c-2.7-3.5-6.2-6.2-10.4-8.4c-4.2-2-8.9-3.1-14.4-3.1c-11.1,0-19.7,3.8-25.5,11.1c-5.8,7.3-8.6,17.5-8.6,30.6l0.2,4.2c0.4,12.2,3.5,21.3,9.3,27.5c5.8,6.2,14,9.3,24.6,9.3c9.7,0,17.5-2.9,23-8.9v10.6c0,5.3-1.1,9.1-3.3,11.3s-5.5,3.3-10.2,3.3c-3.5,0-6.2-0.7-8-2c-1.8-1.3-3.1-3.1-4.2-5.5c-0.4-1.1-1.1-2-1.8-2.4c-0.7-0.4-1.6-0.7-2.7-0.7h-21.3c-1.1,0-2,0.4-2.9,1.1c-0.9,0.7-1.3,1.6-1.3,2.7c0,2.9,1.3,6.4,4.2,10.9c2.7,4.2,7.3,8.2,13.7,11.3c6.4,3.3,14.6,4.9,24.8,4.9c13.3,0,23.7-3.1,31-9.5c7.3-6.4,11.1-15.7,11.1-27.9V32.4c0-1.1-0.4-2.2-1.1-2.9C360.5,29.3,359.4,28.8,358.3,28.8z M333.3,73.8c-0.2,4.2-1.6,7.8-3.8,10.6c-2.2,2.7-5.5,4.2-10.2,4.2c-5.3,0-8.9-1.8-10.9-5.1c-2-3.5-3.1-8.2-3.1-14.2l0.2-3.5c0.2-5.1,1.3-8.9,3.5-11.7s5.5-4.2,10.2-4.2s8,1.3,10.2,4c2.2,2.7,3.5,6.2,3.8,10.6c0,0.7,0.2,2.2,0.2,4.9C333.5,71.4,333.3,72.9,333.3,73.8z",1,"st0"],["d","M438.3,32.8c-6.4-3.8-14-5.5-23.3-5.5c-12.6,0-22.6,3.5-30.1,10.6c-7.5,7.1-11.3,17.1-11.7,29.7v4.9c0.2,13.3,4,23.5,11.5,30.4c7.5,6.9,17.7,10.4,30.6,10.4c8.2,0,15.3-1.3,21.3-4c6-2.7,10.6-5.8,13.7-9.5c3.1-3.8,4.7-6.9,4.7-9.7c0-0.9-0.4-1.6-1.1-2.2c-0.7-0.7-1.6-0.9-2.4-0.9h-20.8c-1.3,0-2.2,0.2-2.9,0.4c-0.7,0.2-1.3,0.9-2.2,2c-1.3,1.6-2.9,2.9-4.4,4c-1.6,1.1-3.5,1.6-6.2,1.6c-4,0-6.9-1.6-9.1-4.4s-3.3-6.9-3.3-11.5V78h50.5c1.1,0,2.2-0.4,2.9-1.1c0.9-0.9,1.1-1.8,1.1-2.9v-4c0-8.2-1.6-15.5-4.7-21.9C449.4,41.4,444.7,36.3,438.3,32.8z M427.9,61.8h-25.3v-0.2c0-5.1,1.1-9.1,3.3-12c2.2-2.9,5.3-4.2,9.3-4.2s7.1,1.3,9.3,4.2c2.2,2.9,3.3,6.9,3.3,12L427.9,61.8L427.9,61.8z",1,"st0"],["d","M507.7,27.3c-8.2,0-15.3,1.3-20.8,3.8c-5.5,2.7-9.7,5.5-12.6,9.1c-2.7,3.5-4.2,6.9-4.2,9.7c0,0.9,0.2,1.8,0.9,2.4c0.7,0.7,1.6,1.1,2.7,1.1h18.6c0.7,0,1.1-0.4,1.6-1.1c1.1-0.4,2.2-1.3,3.8-2.7c1.8-1.6,3.3-2.7,4.9-3.3c1.3-0.7,3.3-1.1,5.3-1.1c3.8,0,6.6,0.9,8.2,2.7c1.6,1.8,2.4,4.7,2.4,8.6v2l-19.7,3.1c-10.6,1.8-18.8,4.9-24.8,9.3c-6,4.4-9.1,10.4-9.1,17.7c0,4.7,1.3,8.9,4,12.6c2.7,3.8,6.2,6.9,10.9,9.1c4.7,2.2,9.7,3.3,15.3,3.3c5.8,0,10.6-1.1,14.8-3.1c4.2-2,7.3-4.7,9.7-8v5.5c0,1.1,0.4,2,1.1,2.9c0.7,0.9,1.8,1.1,2.9,1.1h19.7c1.1,0,2.2-0.4,2.9-1.1c0.7-0.9,1.1-1.8,1.1-2.9V59.8c0-10-3.1-17.7-9.5-23.5C530.7,30.1,520.7,27.3,507.7,27.3z M518.1,76.7c0,5.8-1.6,10.4-4.4,13.3c-2.9,3.1-6.6,4.7-11.3,4.7c-3.1,0-5.8-0.7-7.8-2.2c-2-1.6-3.1-3.5-3.1-6c0-4.7,4.4-8,13.3-9.5l13.3-2.2V76.7z",1,"st0"],["d","M640.2,37.2c-6-6.6-14-10-24.2-10c-9.5,0-17.3,3.1-23,9.3V2.7c0-1.1-0.4-2.2-1.1-2.9s-1.8-1.1-2.9-1.1h-20.6c-1.1,0-2.2,0.4-2.9,1.1c-0.9,0.7-1.1,1.8-1.1,2.9v105.3c0,1.1,0.4,2.2,1.1,2.9c0.9,0.7,1.8,1.1,2.9,1.1h19.1c1.1,0,2.2-0.4,2.9-1.1c0.7-0.9,1.1-1.8,1.1-2.9V103c5.8,7.1,14,10.6,24.8,10.6c10.4,0,18.4-3.3,24.4-9.7c6-6.4,9.1-15.7,9.5-27.7c0-1.3,0.2-3.3,0.2-5.5c0-2.4,0-4.4-0.2-5.8C649.3,53,645.9,43.9,640.2,37.2z M620.5,75.3c-0.2,5.1-1.6,8.9-3.5,11.7s-5.5,4.2-10.2,4.2s-8-1.6-10.2-4.4c-2.2-2.9-3.5-6.6-3.8-11.1c0-1.6-0.2-3.5-0.2-6c0-2.7,0-4.4,0.2-6c0.2-4.2,1.6-7.5,3.8-10.2c2.2-2.7,5.8-4,10.2-4c4.9,0,8.2,1.3,10.2,4.2c2,2.9,3.3,6.6,3.5,11.7c0,1.1,0.2,2.7,0.2,4.9S620.5,74.2,620.5,75.3z",1,"st0"],["d","M689.2-1.5h-19.9c-1.1,0-2.2,0.4-2.9,1.1c-0.9,0.7-1.1,1.8-1.1,2.9v105.3c0,1.1,0.4,2.2,1.1,2.9c0.9,0.7,1.8,1.1,2.9,1.1h19.9c1.1,0,2.2-0.4,2.9-1.1c0.7-0.9,1.1-1.8,1.1-2.9V2.4c0-1.1-0.4-2.2-1.1-2.9S690.5-1.5,689.2-1.5z",1,"st0"],["d","M787.5,47.9c-3.1-6.4-8-11.5-14.2-15.1c-6.4-3.8-14-5.5-23.3-5.5c-12.6,0-22.6,3.5-30.1,10.6S708.7,55,708.2,67.6v4.9c0.2,13.3,4,23.5,11.5,30.4c7.5,6.9,17.7,10.4,30.6,10.4c8.2,0,15.3-1.3,21.3-4c6-2.7,10.6-5.8,13.7-9.5c3.1-3.8,4.7-6.9,4.7-9.7c0-0.9-0.4-1.6-1.1-2.2c-0.7-0.7-1.6-0.9-2.4-0.9h-20.8c-1.3,0-2.2,0.2-2.9,0.4c-0.7,0.2-1.3,0.9-2.2,2c-1.3,1.6-2.9,2.9-4.4,4c-1.6,1.1-3.5,1.6-6.2,1.6c-4,0-6.9-1.6-9.1-4.4s-3.3-6.9-3.3-11.5V78H788c1.1,0,2.2-0.4,2.9-1.1c0.9-0.9,1.1-1.8,1.1-2.9v-4C792.2,61.6,790.6,54.3,787.5,47.9z M762.9,61.8h-25.3v-0.2c0-5.1,1.1-9.1,3.3-12c2.2-2.9,5.3-4.2,9.3-4.2c4,0,7.1,1.3,9.3,4.2c2.2,2.9,3.3,6.9,3.3,12L762.9,61.8L762.9,61.8z",1,"st0"],["d","M260.6,23.9V4c0-1.1-0.4-2-1.1-2.9S257.7,0,256.6,0H116.8c-1.1,0-2,0.4-2.9,1.1C113,2,112.8,2.9,112.8,4v19.9c0,1.1,0.4,2.2,1.1,2.9c0.7,0.9,1.8,1.1,2.9,1.1h139.8c1.1,0,2.2-0.4,2.9-1.1S260.6,25,260.6,23.9z",1,"st0"],[1,"div-logo-text"],[3,"formGroup"],[1,"div-form-container"],["type","email","matInput","","formControlName","emailFormControl","placeholder","Ex. [email protected]"],["matSuffix",""],["matInput","","placeholder","Password","formControlName","passwordFormControl","required","",3,"type"],["matSuffix","",3,"click"],["mat-dialog-actions","",1,"div-action-container"],["mat-button","",3,"click"],["mat-raised-button","","color","primary","type","submit",3,"click","disabled"],[1,"div-action-links"],[1,"div-forgot"],["routerLink","/forgot-password"]],template:function(e,i){e&1&&(s(0,"div")(1,"div",0)(2,"div",1),iT(),s(3,"svg",2)(4,"style",3),u(5,".st0{fill:#000;}"),c(),s(6,"g"),ee(7,"path",4)(8,"path",5)(9,"path",6)(10,"path",7)(11,"path",8)(12,"path",9)(13,"path",10)(14,"path",11)(15,"path",12)(16,"path",13),c(),ee(17,"path",14),c()(),oT(),s(18,"div",15)(19,"p"),u(20,"Plateforme"),ee(21,"br"),c()()(),s(22,"div")(23,"form",16)(24,"div",17)(25,"mat-form-field")(26,"mat-label"),u(27,"Email"),c(),ee(28,"input",18),s(29,"mat-icon",19),u(30,"alternate_email"),c(),s(31,"mat-hint"),u(32,"Please enter your email as username"),c(),s(33,"mat-error"),u(34,"Please enter a valid email address"),c()(),s(35,"mat-form-field"),ee(36,"input",20),s(37,"mat-icon",21),E("click",function(){return i.hide=!i.hide;}),u(38),c(),s(39,"mat-hint"),u(40,"Enter your password"),c(),s(41,"mat-error"),u(42,"Please enter a password"),c()(),s(43,"div",22)(44,"button",23),E("click",function(){return i.closeDialog();}),u(45,"Cancel"),c(),s(46,"button",24),E("click",function(){return i.submit(i.form);}),u(47,"Submit"),c()(),s(48,"div",25)(49,"div",26)(50,"span",27),u(51,"Forgot Password?"),c()()()()()()()),e&2&&(m(23),N("formGroup",i.form),m(13),N("type",i.hide?"password":"text"),m(2),G(i.hide?"visibility_off":"visibility"),m(8),N("disabled",!i.form.valid));},dependencies:[$e,Qe,We,Xe,jt,Xt,Vt,Wt,Ki,ti,ur,tn,Nn,Ft,Tt,Mn,w1,An,Wn,Gt,gn],styles:[".toolbar-signin[_ngcontent-%COMP%]{background-color:#fff}.div-logo[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:100%}.div-logo-dirigeable[_ngcontent-%COMP%]{padding-top:10px;transform:scale(.7);margin-left:-30px}.div-logo-text[_ngcontent-%COMP%]{padding-top:10px;margin-left:-10px;color:#000;font-size:10px;line-height:1}.div-form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-around}.div-action-links[_ngcontent-%COMP%]{padding-top:50px;display:flex;flex-direction:row;justify-content:flex-end}.div-action-container[_ngcontent-%COMP%]{padding-top:20px;
595display:flex;flex-direction:row;justify-content:center}.div-forgot[_ngcontent-%COMP%], .div-register[_ngcontent-%COMP%]{padding-left:25px}"]});};function mie(n,t){if(n&1){let e=oe();s(0,"div",50)(1,"mat-checkbox",51),E("change",function(o){let a=k(e).$implicit,r=x(2);return R(r.toggleContext(a.id,o.checked));}),u(2),c()();}if(n&2){let e=t.$implicit,i=x(2);m(),N("checked",i.isContextSelected(e.id))("matTooltip",e.description),m(),_e(" ",e.name," ");}}function uie(n,t){if(n&1&&(s(0,"div"),be(1,mie,3,3,"div",50,Pt),c()),n&2){let e=x();m(),ye(e.availableContexts);}}function fie(n,t){n&1&&(s(0,"span",44),u(1," No contexts available. "),c());}function hie(n,t){if(n&1){let e=oe();s(0,"mat-chip",53),Zn(1,"date"),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.openNoteDialog(o));}),u(2),c();}if(n&2){let e=t.$implicit;Ue("not-for-genai",!e.useForGenAI),N("matTooltip",e.title+" - "+kr(1,5,e.date,"medium"))("color",e.useForGenAI?"primary":"warn"),m(2),_e(" ",e.title," ");}}function _ie(n,t){if(n&1&&(s(0,"mat-chip-set"),be(1,hie,3,8,"mat-chip",52,Pt),c()),n&2){let e=x();m(),ye(e.subProcessNotes);}}function gie(n,t){n&1&&(s(0,"span",44),u(1," No notes available. Click the + button to add your first note. "),c());}var ou=class n{constructor(t,e,i,o,a,r,l,p,d){this.firebase=t;this.router=e;this.route=i;this.authService=o;this.httpClient=a;this.messagingService=r;this.loggingService=l;this.localeService=p;this.dialog=d;this.objectLabel="Sub-Process",this.collectionLabel="Sub-Processes",this.parentRouterLink="/dashboard/businessprocesss",this.form=new Ri({number:new st("",Ye.required),name:new st("",Ye.required),description:new st(""),keyActivities:new st(""),volume:new st("")});}firebase;router;route;authService;httpClient;messagingService;loggingService;localeService;dialog;subscriptions=new jo();formControlRef;object;objectRef;form;objectLabel;collectionPath;collectionLabel;parentRouterLink;currentRouterLink;id;bpid;pid;insightTitle="";insight="";aiData;debugData={};businessProcess;subProcessNotes=[];availableContexts=[];selectedContextIds=[];selectedTabIndex=0;get isSubProcessCreated(){return!!this.object?.id;}ngOnInit(){return $(this,null,function*(){try{let t=this.route.snapshot.paramMap.get("bpid");if(t!=null&&(this.bpid=t),!this.bpid)return;let e=this.route.snapshot.paramMap.get("pid");if(e!=null&&(this.pid=e),!this.pid)return;this.collectionPath="/projects/"+this.pid+"/businessprocesses/"+this.bpid+"/subprocesses/",this.currentRouterLink="/dashboard/project/"+this.pid+"/businessprocess/"+this.bpid+"/subprocess",this.parentRouterLink="/dashboard/project/"+this.pid+"/businessprocess/"+this.bpid;let i=this.route.snapshot.paramMap.get("id");if(i!=null&&(this.id=i),!this.id){this.selectedTabIndex=1;return;}this.objectRef=ge(this.firebase.firestore,this.collectionPath,this.id);let o=yield yt(this.objectRef);if(!o.exists())throw new Error("Document does not exist");this.object=X({id:o.id},o.data());let a=ge(this.firebase.firestore,"/projects/"+this.pid+"/businessprocesses/"+this.bpid),r=yield yt(a);if(!r.exists())throw new Error("Document does not exist");this.businessProcess=X({id:r.id},r.data());let l=[],p="",d="",f=mt(we(this.firebase.firestore,this.collectionPath)),h=yield at(f);for(let b of h.docs){let w=X({id:b.id},b.data());w.number>this.object.number&&(l.push(w),p.length==0?p=w.number+". "+w.name:p=", "+p+w.number+". "+w.name),w.number<this.object.number&&(l.push(w),d.length==0?d=w.number+". "+w.name:d=", "+d+w.number+". "+w.name);}yield this.loadSubProcessNotes(),yield this.loadAvailableContexts(),yield this.loadSelectedContexts();let g=this.businessProcess;this.subscriptions.add(Bn(this.objectRef,b=>$(this,null,function*(){this.object=X({id:b.id},b.data()),this.aiData=Ve(X({},this.object),{subProcessAfterNames:p,subProcessBeforeNames:d,subProcesses:l,bp:g}),this.form.patchValue({number:this.object.number,name:this.object.name,description:this.object.description,keyActivities:this.object.keyActivities,volume:this.object.volume});})));}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading data","",{duration:3e3});}});}ngOnDestroy(){this.subscriptions.unsubscribe();}getProcessTaskPath(){return this.getProcessTaskBasePath()+this.getProcessTaskCollection();}getProcessTaskCollection(){return"/processtasks";}getProcessTaskBasePath(){return this.collectionPath+this.id;}getProcessTaskRoute(){return this.currentRouterLink+"/"+this.id+"/processtask";}getNotesPath(){return`/projects/${this.pid}/notes`;}clickSave(){let t=ts.extractDataFromFormGroup(this.form);this.saveObject(t);}saveObject(t){return $(this,null,function*(){if(this.objectRef)yield Dt(this.objectRef,t,{merge:!0}),this.messagingService.open("Data saved","",{duration:3e3});else{t.creationDate=new Date(),t.projectId=this.pid,t.businessProcessId=this.bpid;let e=yield Ht(we(this.firebase.firestore,this.collectionPath),t);this.messagingService.open("Sub-process created","",{duration:3e3}),this.router.navigate([this.currentRouterLink+"/"+e.id]);}});}setInsightTitle(t){this.insightTitle=t;}setInsight(t){this.insight=t;}setDebugData(t){this.debugData=t;}clickGapAnalysis(){this.router.navigate(["dashboard/gapanalysis/"+this.pid]);}clickBack(){this.router.navigate([this.parentRouterLink]);}generateSpinner=!1;clickGenerate(){return $(this,null,function*(){if(!this.object||!this.businessProcess)return;let t=yield this.generateProcessTaskList(this.businessProcess);try{t?this.dialog.open(gs,{height:"50%",width:"700px",data:{rawData:t}}).afterClosed().subscribe(i=>$(this,null,function*(){if(i){let o=yield this.getNextNumber();for(let a of i)a.selected&&a.selected==!0&&this.object&&this.businessProcess&&(this.addProcessTask(this.businessProcess,this.object,o,a.title,a.description,a.additional),o++);this.messagingService.open("Process task added.","",{duration:3e3});}})):this.messagingService.open("No results.","",{duration:3e3});}catch(e){this.messagingService.open("An error has occured, please try again later or contact the administrator.","",{duration:3e3});}});}generateProcessTaskList(t){return $(this,null,function*(){let e;try{let i={businessProcess:t,subProcess:this.object},o=this.firebase.functions,a=ei(o,"functionCallFunction"),r={functionName:"generate_processtasks",locale:this.localeService.getSelectedLocaleShort(),object:i};this.generateSpinner=!0,e=yield a(r),this.generateSpinner=!1;}catch(i){console.log(i),this.generateSpinner=!1;return;}return e.data;});}getNextNumber(){return $(this,null,function*(){let t=1,e="/projects/"+this.pid+"/businessprocesses/"+this.bpid+"/subprocesses/"+this.object.id+"/processtasks",i=we(this.firebase.firestore,e),o=mt(we(this.firebase.firestore,e),Jt("number","desc")),a=yield at(o);for(var r in a.docs){let l=a.docs[r],p=X({id:l.id},l.data()),d=parseInt(p.number);d>t&&(t=d);break;}return t+1;});}
595addProcessTask(t,e,i,o,a,r){return $(this,null,function*(){let l="/projects/"+this.pid+"/businessprocesses/"+this.bpid+"/subprocesses/"+e.id+"/processtasks",p=we(this.firebase.firestore,l),d=ts.stripUndefined({number:i+"",name:o,description:a,actor:r,projectId:this.pid,businessProcessId:t.id,subProcessId:e.id,creationDate:Rn.fromDate(new Date())});yield Ht(p,d);});}openNoteDialog(t){let e=this.getNotesPath(),i={note:t||null,noteDocPath:e};this.dialog.open(Dd,{width:"1200px",maxWidth:"90vw",height:"80%",data:i}).afterClosed().subscribe(a=>{a&&(a.delete?this.deleteSubProcessNote(a.id):this.saveSubProcessNote(a));});}deleteSubProcessNote(t){return $(this,null,function*(){try{if(!this.id||!t||!this.collectionPath)return;let e=this.getNotesPath();yield no(ge(this.firebase.firestore,e,t)),this.messagingService.open("Note deleted successfully","",{duration:3e3}),yield this.loadSubProcessNotes();}catch(e){this.loggingService.error(e),this.messagingService.open("Error deleting note","",{duration:3e3});}});}saveSubProcessNote(t){return $(this,null,function*(){try{if(!this.id||!this.collectionPath)return;let e=this.getNotesPath();t.id?(yield hn(ge(this.firebase.firestore,e,t.id),{title:t.title,content:t.content,useForGenAI:t.useForGenAI!==void 0?t.useForGenAI:!0,date:t.date}),this.messagingService.open("Note updated successfully","",{duration:3e3})):(yield Ht(we(this.firebase.firestore,e),{title:t.title,content:t.content,useForGenAI:t.useForGenAI!==void 0?t.useForGenAI:!0,date:new Date()}),this.messagingService.open("Note added successfully","",{duration:3e3})),yield this.loadSubProcessNotes();}catch(e){this.loggingService.error(e),this.messagingService.open("Error saving note","",{duration:3e3});}});}loadSubProcessNotes(){return $(this,null,function*(){try{if(!this.id||!this.collectionPath)return;let t=this.getNotesPath(),e=mt(we(this.firebase.firestore,t),Jt("date","desc")),i=yield at(e);this.subProcessNotes=[],i.forEach(o=>{let a=o.data();this.subProcessNotes.push({id:o.id,title:a.title,content:a.content,useForGenAI:a.useForGenAI!==void 0?a.useForGenAI:!0,date:a.date.toDate()});});}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading notes","",{duration:3e3});}});}loadAvailableContexts(){return $(this,null,function*(){try{let e=mt(we(this.firebase.firestore,"/contexts"),Jt("name","asc")),i=yield at(e);this.availableContexts=[],i.forEach(o=>{let a=o.data();this.availableContexts.push({id:o.id,name:a.name,description:a.description||""});});}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading contexts","",{duration:3e3});}});}loadSelectedContexts(){return $(this,null,function*(){try{if(!this.id||!this.objectRef)return;let t=yield yt(this.objectRef);if(t.exists()){let e=t.data();this.selectedContextIds=e.selectedContextIds||[];}}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading selected contexts","",{duration:3e3});}});}isContextSelected(t){return this.selectedContextIds.includes(t);}toggleContext(t,e){return $(this,null,function*(){try{if(!this.objectRef)return;e?this.selectedContextIds.includes(t)||this.selectedContextIds.push(t):this.selectedContextIds=this.selectedContextIds.filter(i=>i!==t),yield hn(this.objectRef,{selectedContextIds:this.selectedContextIds}),this.messagingService.open("Context selection updated","",{duration:2e3});}catch(i){this.loggingService.error(i),this.messagingService.open("Error updating context selection","",{duration:3e3});}});}foldablePanel=new Map();isFolded(t,e){e==null&&(e=!1);let i=this.foldablePanel.get(t);return i??(this.foldablePanel.set(t,e),!1);}foldPanel(t){}unfoldPanel(t){}togglePanel(t){let e=this.isFolded(t);e=!e,this.foldablePanel.set(t,e);}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Oo),le(Zr),le(Bt),le(Mo),le(To),le(Ti));};static ɵcmp=Te({type:n,selectors:[["app-sub-process"]],inputs:{collectionPath:"collectionPath"},decls:106,vars:25,consts:()=>{let t;return t="Process Tasks",[["subprocess_description",""],["subprocess_keyactivities",""],t,[1,"project-wrapper"],[1,"project-header"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],["fontSet","material-symbols-outlined",1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","",3,"disabled"],["mat-flat-button","","color","primary",3,"click"],[1,"div-content"],[1,"container"],[1,"container-left"],[1,"container-tile"],[3,"selectedIndexChange","selectedIndex"],["label","Sub-Process",3,"disabled"],[1,"tab-content"],[3,"formGroup"],[1,"div-form-element"],["objectType","subProcess","field","subprocess_description","controlName","description",3,"onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],["objectType","subProcess","field","subprocess_keyactivities","controlName","keyActivities",3,"onDebugData","onInsightTitle","onInsight","onSave","nextIntelligenField","object","form","notesPath"],["label","Detail"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","number"],[1,"mat-subfield-text"],["matInput","","formControlName","name"],["matInput","","formControlName","volume"],[1,"div-container-button"],["mat-raised-button","","color","primary",3,"click","disabled"],["label","Process Tasks",3,"disabled"],[1,"tab-header"],["fontSet","material-symbols-outlined",1,"container-tile-icon"],[1,"title"],["mat-icon-button","","color","primary",3,"click"],["fontSet","material-symbols-outlined"],[3,"collectionPath","baseRoute"],[1,"container-right"],[1,"container-right-top"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"container-tile-body-strong"],[1,"div-insight-disabled"],["mat-icon-button","","color","primary","matTooltip","Add new note",3,"click"],[1,"container-right-bottom"],[1,"flex-container-before"],[1,"flex-container"],[3,"objectTypeId","object"],[1,"context-item"],[3,"change","checked","matTooltip"],[3,"matTooltip","color","not-for-genai"],[3,"click","matTooltip","color"]];},template:function(e,i){if(e&1&&(s(0,"div",3)(1,"div",4)(2,"mat-toolbar",5)(3,"div",6)(4,"div")(5,"mat-icon",7),u(6,"segment"),c()(),s(7,"div")(8,"div",8),u(9),c(),s(10,"div",9),u(11),c()()(),s(12,"div",10)(13,"button",11),u(14," Design process mode "),s(15,"mat-icon"),u(16,"category"),c()(),s(17,"button",12),E("click",function(){return i.clickGapAnalysis();}),u(18," Gap analysis mode "),s(19,"mat-icon"),u(20,"tune"),c()()()(),s(21,"div",13)(22,"div",14)(23,"div",15)(24,"div",16)(25,"mat-tab-group",17),E("selectedIndexChange",function(a){return i.selectedTabIndex=a;}),s(26,"mat-tab",18)(27,"div",19)(28,"form",20)(29,"div",21)(30,"app-intelligent-field",22,0),E("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()(),s(32,"div",21)(33,"app-intelligent-field",23,1),E("onDebugData",function(a){return i.setDebugData(a);})("onInsightTitle",function(a){return i.setInsightTitle(a);})("onInsight",function(a){return i.setInsight(a);})("onSave",function(){return i.clickSave();}),c()()()()(),s(35,"mat-tab",24)(36,"div",19)(37,"form",20)(38,"div",21)(39,"mat-form-field",25)(40,"mat-label"),u(41,"Sub-Process Number"),c(),ee(42,"input",26),s(43,"mat-error",27),u(44,"Field is required"),
595c()()(),s(45,"div",21)(46,"mat-form-field",25)(47,"mat-label"),u(48,"Name"),c(),ee(49,"input",28),s(50,"mat-error",27),u(51,"Field is required"),c()()(),s(52,"div",21)(53,"mat-form-field",25)(54,"mat-label"),u(55,"Transaction volume (est.)"),c(),ee(56,"input",29),c()(),s(57,"div",30)(58,"button",31),E("click",function(){return i.clickSave();}),u(59,"Save"),c()()()()(),s(60,"mat-tab",32)(61,"div",19)(62,"div",33)(63,"mat-icon",34),u(64,"attribution"),c(),s(65,"span",35),q(66,2),c()(),s(67,"div",16)(68,"div",10)(69,"button",36),E("click",function(){return i.clickGenerate();}),u(70," Generate "),s(71,"mat-icon",37),u(72,"robot_2"),c()()(),ee(73,"app-process-task-list",38),c()()()()()(),s(74,"div",39)(75,"div",40)(76,"div",41)(77,"mat-icon",42),u(78,"library_books"),c(),s(79,"span",35),u(80,"Organisation contexts"),c()(),s(81,"div",43),S(82,uie,3,0,"div"),S(83,fie,2,0,"span",44),c()(),s(84,"div",40)(85,"div",41)(86,"mat-icon",42),u(87,"note"),c(),s(88,"span",35),u(89,"Sub-Process notes"),c(),s(90,"div",10)(91,"button",45),E("click",function(){return i.openNoteDialog();}),s(92,"mat-icon"),u(93,"add"),c()()()(),s(94,"div",43),S(95,_ie,3,0,"mat-chip-set"),S(96,gie,2,0,"span",44),c()(),s(97,"div",46)(98,"div",41)(99,"mat-icon",42),u(100,"chat"),c(),s(101,"span",35),u(102,"Chat with the architect"),c()(),s(103,"div",47)(104,"div",48),ee(105,"app-ask-architect",49),c()()()()()()()()),e&2){let o=bn(34);m(9),G(i.objectLabel),m(2),Hn("",i.form.value.number,". ",i.form.value.name),m(2),N("disabled",!0),m(12),N("selectedIndex",i.selectedTabIndex),m(),N("disabled",!i.isSubProcessCreated),m(2),N("formGroup",i.form),m(2),N("nextIntelligenField",o)("object",i.aiData)("form",i.form)("notesPath","projects/"+i.pid),m(3),N("object",i.aiData)("form",i.form)("notesPath","projects/"+i.pid),m(4),N("formGroup",i.form),m(21),N("disabled",!i.form.valid),m(2),N("disabled",!i.isSubProcessCreated),m(13),N("collectionPath",i.getProcessTaskPath())("baseRoute",i.getProcessTaskRoute()),m(9),M(i.availableContexts&&i.availableContexts.length>0?82:-1),m(),M(!i.availableContexts||i.availableContexts.length===0?83:-1),m(12),M(i.subProcessNotes&&i.subProcessNotes.length>0?95:-1),m(),M(!i.subProcessNotes||i.subProcessNotes.length===0?96:-1),m(9),N("objectTypeId","subProcess")("object",i.object);}},dependencies:[$e,Qe,Qt,jt,Xt,Vt,Wt,ti,ut,tn,Nn,Ft,Tt,Mn,An,Wn,gn,We,Xe,ln,yn,br,tu,Tl,Ol,El,yi,Ta,Ls,ra,xr,$t,_n,zs,bl],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
595.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.div-toolbar[_ngcontent-%COMP%]{height:100px;margin-bottom:10px;background-color:transparent}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.toolbar-icon[_ngcontent-%COMP%]{padding-right:30px;font-size:50px;width:50px;height:100%}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.title[_ngcontent-%COMP%]{padding-left:10px}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin-left:10px;margin-right:10px;margin-bottom:0;padding-bottom:0}.div-insight-title[_ngcontent-%COMP%]{font-weight:700;padding-bottom:10px}.div-insight[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:30vw}.no-bullet[_ngcontent-%COMP%]{list-style-type:none}.div-reference-title-link[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;display:flex;flex-direction:row;align-items:baseline;gap:16px}.reference-link[_ngcontent-%COMP%]{color:#1976d2;text-decoration:none;font-weight:700}.reference-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.div-reference-detail[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;text-wrap-mode:wrap;white-space:wrap;max-width:100%}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:30vw;color:gray}.container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:row;flex-wrap:nowrap;white-space:nowrap;background-color:transparent}.container-tile-icon[_ngcontent-%COMP%]{color:#465d91}.container-tile[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;padding:20px;margin-bottom:10px}.container-tile-title[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#faf9fd;color:#465d91;border-bottom:2px solid #465d91;border-radius:10px 10px 0 0;margin-top:10px;max-height:20px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:20px;max-height:20px}.container-tile-folded[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#faf9fd;color:#465d91;border-radius:10px;padding:20px;margin-top:10px;max-height:20px}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;width:100%}.container-tile-body[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px}.container-tile-body-strong[_ngcontent-%COMP%]{border-radius:0 0 10px 10px;padding:20px 20px 0;
595height:calc(100% - 40px);overflow:auto}.container-inner[_ngcontent-%COMP%]{border-radius:30px}.container-left[_ngcontent-%COMP%]{margin-right:10px;height:100%;width:70vw;overflow-y:auto;overflow-x:hidden;border-radius:10px}.tab-content[_ngcontent-%COMP%]{padding-top:20px}.tab-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;color:#465d91;padding:20px;margin-bottom:10px;background-color:#faf9fd;border-radius:10px}.tab-header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-left:10px;flex:1}.tab-header[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}.flex-container-before[_ngcontent-%COMP%]{height:100%}.flex-container[_ngcontent-%COMP%]{width:100%;height:calc(60vh - 260px)}.container-right[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;flex-wrap:nowrap;white-space:nowrap;position:sticky;top:10px;align-self:flex-start;height:calc(100vh - 200px);width:30vw;overflow-y:hidden}.container-right-top[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;margin-bottom:10px;min-height:20vh;max-height:20vh;width:100%}.container-right-bottom[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px;height:100%;width:100%}.container-bottom[_ngcontent-%COMP%]{border:0px solid rgba(0,0,0,.2);background-color:#fff;margin-top:10px;border-radius:10px;height:100px}.div-container-button[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;height:100%;gap:20px}.input-field[_ngcontent-%COMP%]{margin-right:30px}.form-field[_ngcontent-%COMP%]{width:100%;padding-top:20px;padding-bottom:20px}.icon-highlight[_ngcontent-%COMP%]{color:var(--mat-badge-background-color)}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}.icon-loading[_ngcontent-%COMP%]{transition:transform .5s}.icon-loading.animate[_ngcontent-%COMP%]{transform:rotate(360deg)}.div-form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:no-wrap;align-content:space-around;gap:30px;width:100%}.div-debug-prompt[_ngcontent-%COMP%]{width:100%}.div-form-element[_ngcontent-%COMP%]{margin:auto;width:100%;overflow-x:hidden}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.mat-subfield-text[_ngcontent-%COMP%]{font-size:small}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};var N0=class n{constructor(t){this.dialog=t;}dialog;ngOnInit(){}login(){let t=this.dialog.open(ih,{height:"400px",width:"600px"});}static ɵfac=function(e){return new(e||n)(le(Ti));};static ɵcmp=Te({type:n,selectors:[["app-welcome"]],decls:47,vars:0,consts:()=>{let t;t=""+"\uFFFD#7\uFFFD"+"Decide faster"+"\uFFFD/#7\uFFFD"+""+"[\uFFFD#8\uFFFD\uFFFD/#8\uFFFD|\uFFFD#9\uFFFD\uFFFD/#9\uFFFD]"+"Spend less"+"[\uFFFD#8\uFFFD\uFFFD/#8\uFFFD|\uFFFD#9\uFFFD\uFFFD/#9\uFFFD]"+"Succeed better ",t=t1(t);let e;e=""+"\uFFFD#12\uFFFD"+"An AI architect"+"\uFFFD/#12\uFFFD"+""+"\uFFFD#13\uFFFD\uFFFD/#13\uFFFD"+" That understands your needs ";let i;i=""+"\uFFFD#16\uFFFD"+"Projects simplified"+"\uFFFD/#16\uFFFD"+""+"[\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD]"+"Risks managed"+"[\uFFFD#17\uFFFD\uFFFD/#17\uFFFD|\uFFFD#18\uFFFD\uFFFD/#18\uFFFD]"+"ROI maximized ",i=t1(i);let o;o=" Empower. ";let a;a="REQUIREMENT ENGINE";let r;r="Login";let l;l="Save up to 40% in analysis time";let p;p="Supercharge your "+"[\uFFFD#42\uFFFD\uFFFD/#42\uFFFD|\uFFFD#43\uFFFD\uFFFD/#43\uFFFD|\uFFFD#44\uFFFD\uFFFD/#44\uFFFD]"+"requirements definition, "+"[\uFFFD#42\uFFFD\uFFFD/#42\uFFFD|\uFFFD#43\uFFFD\uFFFD/#43\uFFFD|\uFFFD#44\uFFFD\uFFFD/#44\uFFFD]"+"cost evaluation and "+"[\uFFFD#42\uFFFD\uFFFD/#42\uFFFD|\uFFFD#43\uFFFD\uFFFD/#43\uFFFD|\uFFFD#44\uFFFD\uFFFD/#44\uFFFD]"+"solution requirements",p=t1(p);let d;return d="Better project control and solution compliance",[t,e,i,o,a,r,l,p,d,[1,"main-container"],[1,"section-row"],[1,"content-block"],[1,"header"],[1,"description-section"],[1,"description-text-right"],[1,"emphasis-text"],[1,"description-text-left"],[1,"main-title"],[1,"header-logo"],[1,"branding-section"],["src","assets/cortex_full.png",1,"brand-logo-image"],[1,"solution-branding-container"],[1,"solution-title"],[1,"brand-accent-color"],[1,"solution-subtitle"],[1,"action-button-container"],["mat-button","",1,"login-button","button-light-solid",3,"click"],[1,"icon-toolbar"],[1,"bottom-content-section",2,"display","none"]];},template:function(e,i){e&1&&(s(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div",14),Wr(6,0),ee(7,"span",15)(8,"br")(9,"br"),Xr(),c(),s(10,"div",16),Wr(11,1),ee(12,"span",15)(13,"br"),Xr(),c(),s(14,"div",14),Wr(15,2),ee(16,"span",15)(17,"br")(18,"br"),Xr(),c()(),s(19,"div",17),q(20,3),c(),s(21,"div",18)(22,"div",19),ee(23,"img",20),s(24,"div",21)(25,"div",22)(26,"span",23),u(27,"SKY"),c(),u(28,"CORTEX"),c(),s(29,"div",24),q(30,4),c(),s(31,"div",25)(32,"button",26),E("click",function(){return i.login();}),s(33,"mat-label"),q(34,5),c(),s(35,"mat-icon",27),u(36,"login"),c()()()()()()()()(),s(37,"div",28)(38,"div"),q(39,6),c(),s(40,"div"),Wr(41,7),ee(42,"br")(43,"br")(44,"br"),Xr(),c(),s(45,"div"),q(46,8),c()()());},dependencies:[$e,Qe,es,B1,pd,We,Xe,ln,Wt],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
595.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}@font-face{font-family:Square721;src:url(https://fonts.cdnfonts.com/css/square-721)}.main-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:left;background-color:#ecf1fb}.section-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;gap:16px;background-color:#000028}.content-block[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;max-width:1400px;width:100%;margin-left:10px;margin-right:10px;padding-bottom:50px;padding-top:50px}.header[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:50px;width:100%}.description-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:400px}.description-text-right[_ngcontent-%COMP%]{font-family:Square721,Eurostile,sans-serif;width:100%;font-size:1.5em;color:#a1bbea;text-align:right;margin-top:50px;margin-bottom:50px}.emphasis-text[_ngcontent-%COMP%]{font-weight:700;font-size:1.2em;color:#fff}.description-text-left[_ngcontent-%COMP%]{font-family:Square721,Eurostile,sans-serif;width:100%;font-size:1.5em;color:#a1bbea;text-align:left}.main-title[_ngcontent-%COMP%]{font-weight:700;font-size:4em;color:#fff}.branding-section[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;align-items:center;overflow-y:hidden;width:100%;max-width:600px;max-height:800px;top:30px;border-radius:30px;margin-bottom:50px}.brand-logo-image[_ngcontent-%COMP%]{height:100%;overflow:hidden;margin-top:-10px}.solution-branding-container[_ngcontent-%COMP%]{position:relative;padding-left:50px}.solution-title[_ngcontent-%COMP%]{color:#fff;position:relative;text-align:center;font-family:Square721,Eurostile,sans-serif;font-weight:700;font-size:55px;letter-spacing:1px}.brand-accent-color[_ngcontent-%COMP%]{color:#91f5ad}.solution-subtitle[_ngcontent-%COMP%]{top:20px;color:#fff;position:relative;text-align:center;font-size:25px}.action-button-container[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:center;flex-direction:row;background-color:transparent;padding-top:40px}.login-button[_ngcontent-%COMP%]{width:100%;max-width:250px}.button-light-solid[_ngcontent-%COMP%]{background-color:#294173;border:3px solid #294173;color:#a1bbea;border-radius:25px;padding:25px;transition:all .3s ease}.button-light-solid[_ngcontent-%COMP%]:hover{background-color:#ecf1fb;border:3px solid #294173;color:#294173}.icon-toolbar[_ngcontent-%COMP%]{height:30px!important;width:30px!important;font-size:30px!important}.bottom-content-section[_ngcontent-%COMP%]{height:calc(100vh - 65px);max-height:calc(100vh - 65px);background-color:#00000014}"]});};var A0=class n{constructor(t,e){this.dialogRef=t;this.data=e;}dialogRef;data;onCancel(){this.dialogRef.close("cancel");}onDeleteShape(){this.dialogRef.close("delete-shape");}onDeleteAll(){this.dialogRef.close("delete-all");}static ɵfac=function(e){return new(e||n)(le(Li),le(fo));};static ɵcmp=Te({type:n,selectors:[["app-subprocess-delete-dialog"]],decls:15,vars:3,consts:[["mat-dialog-title",""],["align","end"],["mat-button","",3,"click"],["mat-button","","color","primary",3,"click"],["mat-button","","color","warn",3,"click"]],template:function(e,i){e&1&&(s(0,"h2",0),u(1),c(),s(2,"mat-dialog-content")(3,"p"),u(4),c(),s(5,"p")(6,"strong"),u(7),c()()(),s(8,"mat-dialog-actions",1)(9,"button",2),E("click",function(){return i.onCancel();}),u(10,"Cancel"),c(),s(11,"button",3),E("click",function(){return i.onDeleteShape();}),u(12,"Delete shape only"),c(),s(13,"button",4),E("click",function(){return i.onDeleteAll();}),u(14,"Delete shape & data"),c()()),e&2&&(m(),G(i.data.title),m(3),G(i.data.message),m(3),G(i.data.subProcessName));},dependencies:[Zi,Bo,Vo,$o,$e,Qe],styles:["mat-dialog-actions[_ngcontent-%COMP%]{gap:8px}"]});};function Fe(n,t){t&&(n.super_=t,n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}));}function xie(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;}var cM={exports:{}},lN;function Cie(){if(lN)return cM.exports;lN=1;var n=cM.exports=function(t,e){if(e||(e=16),t===void 0&&(t=128),t<=0)return"0";for(var i=Math.log(Math.pow(2,t))/Math.log(e),o=2;i===1/0;o*=2)i=Math.log(Math.pow(2,t/o))/Math.log(e)*o;for(var a=i-Math.floor(i),r="",o=0;o<Math.floor(i);o++){var l=Math.floor(Math.random()*e).toString(e);r=l+r;}if(a){var p=Math.pow(e,a),l=Math.floor(Math.random()*p).toString(e);r=l+r;}var d=parseInt(r,e);return d!==1/0&&d>=Math.pow(2,t)?n(t,e):r;};
595return n.rack=function(t,e,i){var o=function(r){var l=0;do{if(l++>10)if(i)t+=i;else throw new Error("too many ID collisions, use more bits");var p=n(t,e);}while(Object.hasOwnProperty.call(a,p));return a[p]=r,p;},a=o.hats={};return o.get=function(r){return o.hats[r];},o.set=function(r,l){return o.hats[r]=l,o;},o.bits=t||128,o.base=e||16,o;},cM.exports;}var vie=Cie(),bie=xie(vie);function Ll(n){if(!(this instanceof Ll))return new Ll(n);n=n||[128,36,1],this._seed=n.length?bie.rack(n[0],n[1],n[2]):n;}Ll.prototype.next=function(n){return this._seed(n||!0);};Ll.prototype.nextPrefixed=function(n,t){var e;do e=n+this.next(!0);while(this.assigned(e));return this.claim(e,t),e;};Ll.prototype.claim=function(n,t){this._seed.set(n,t||!0);};Ll.prototype.assigned=function(n){return this._seed.get(n)||!1;};Ll.prototype.unclaim=function(n){delete this._seed.hats[n];};Ll.prototype.clear=function(){var n=this._seed.hats,t;for(t in n)this.unclaim(t);};function oh(n){return Array.prototype.concat.apply([],n);}var D0=Object.prototype.toString,yie=Object.prototype.hasOwnProperty;function Fc(n){return n===void 0;}function Ko(n){return n!==void 0;}function Ep(n){return n==null;}function gt(n){return D0.call(n)==="[object Array]";}function eo(n){return D0.call(n)==="[object Object]";}function nn(n){return D0.call(n)==="[object Number]";}function qo(n){let t=D0.call(n);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]";}function ka(n){return D0.call(n)==="[object String]";}function Pie(n){if(!gt(n))throw new Error("must supply array");}function Ka(n,t){return!Ep(n)&&yie.call(n,t);}function $n(n,t){let e=Ev(t),i;return ne(n,function(o,a){if(e(o,a))return i=o,!1;}),i;}function Ov(n,t){let e=Ev(t),i=gt(n)?-1:void 0;return ne(n,function(o,a){if(e(o,a))return i=a,!1;}),i;}function Yt(n,t){let e=Ev(t),i=[];return ne(n,function(o,a){e(o,a)&&i.push(o);}),i;}function ne(n,t){let e,i;if(Fc(n))return;let o=gt(n)?Sie:wie;for(let a in n)if(Ka(n,a)&&(e=n[a],i=t(e,o(a)),i===!1))return e;}function cN(n,t){if(Fc(n))return[];Pie(n);let e=Ev(t);return n.filter(function(i,o){return!e(i,o);});}function _a(n,t,e){return ne(n,function(i,o){e=t(e,i,o);}),e;}function zl(n,t){return!!_a(n,function(e,i,o){return e&&t(i,o);},!0);}function xs(n,t){return!!$n(n,t);}function sa(n,t){let e=[];return ne(n,function(i,o){e.push(t(i,o));}),e;}function ah(n){return n&&Object.keys(n)||[];}function pN(n){return ah(n).length;}function mc(n){return sa(n,t=>t);}function uc(n,t,e={}){return t=dM(t),ne(n,function(i){let o=t(i)||"_",a=e[o];a||(a=e[o]=[]),a.push(i);}),e;}function pM(n,...t){n=dM(n);let e={};return ne(t,o=>uc(o,n,e)),sa(e,function(o,a){return o[0];});}var dN=pM;function jr(n,t){t=dM(t);let e=[];return ne(n,function(i,o){let a=t(i,o),r={d:a,v:i};for(var l=0;l<e.length;l++){let{d:p}=e[l];if(a<p){e.splice(l,0,r);return;}}e.push(r);}),sa(e,i=>i.v);}function fc(n){return function(t){return zl(n,function(e,i){return t[i]===e;});};}function dM(n){return qo(n)?n:t=>t[n];}function Ev(n){return qo(n)?n:t=>t===n;}function wie(n){return n;}function Sie(n){return Number(n);}function au(n,t){let e,i,o,a;function r(h){let g=Date.now(),b=h?0:a+t-g;if(b>0)return l(b);n.apply(o,i),p();}function l(h){e=setTimeout(r,h);}function p(){e&&clearTimeout(e),e=a=i=o=void 0;}function d(){e&&r(!0),p();}function f(...h){a=Date.now(),i=h,o=this,e||l(t);}return f.flush=d,f.cancel=p,f;}function Ra(n,t){return n.bind(t);}function me(n,...t){return Object.assign(n,...t);}function mN(n,t,e){let i=n;return ne(t,function(o,a){if(typeof o!="number"&&typeof o!="string")throw new Error("illegal key type: "+typeof o+". Key should be of type number or string.");if(o==="constructor")throw new Error("illegal key: constructor");if(o==="__proto__")throw new Error("illegal key: __proto__");let r=t[a+1],l=i[o];Ko(r)&&Ep(l)&&(l=i[o]=isNaN(+r)?{}:[]),Fc(r)?Fc(e)?delete i[o]:i[o]=e:i=l;}),n;}function Za(n,t){let e={},i=Object(n);return ne(t,function(o){o in i&&(e[o]=n[o]);}),e;}function ns(n,t){let e={},i=Object(n);return ne(i,function(o,a){t.indexOf(a)===-1&&(e[a]=o);}),e;}var ja={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};ja.td=ja.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];ja.option=ja.optgroup=[1,'<select multiple="multiple">',"</select>"];ja.thead=ja.tbody=ja.colgroup=ja.caption=ja.tfoot=[1,"<table>","</table>"];
595ja.polyline=ja.ellipse=ja.polygon=ja.circle=ja.text=ja.line=ja.path=ja.rect=ja.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function ri(n,t=globalThis.document){if(typeof n!="string")throw new TypeError("String expected");let e=/^<!--(.*?)-->$/s.exec(n);if(e)return t.createComment(e[1]);let i=/<([\w:]+)/.exec(n)?.[1];if(!i)return t.createTextNode(n);if(n=n.trim(),i==="body"){let d=t.createElement("html");d.innerHTML=n;let{lastChild:f}=d;return f.remove(),f;}let[o,a,r]=Object.hasOwn(ja,i)?ja[i]:ja._default,l=t.createElement("div");for(l.innerHTML=a+n+r;o--;)l=l.lastChild;if(l.firstChild===l.lastChild){let{firstChild:d}=l;return d.remove(),d;}let p=t.createDocumentFragment();return p.append(...l.childNodes),p;}function Mie(n,t){return t.forEach(function(e){e&&typeof e!="string"&&!Array.isArray(e)&&Object.keys(e).forEach(function(i){if(i!=="default"&&!(i in n)){var o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,o.get?o:{enumerable:!0,get:function(){return e[i];}});}});}),Object.freeze(n);}function La(n,...t){let e=n.style;return ne(t,function(i){i&&ne(i,function(o,a){e[a]=o;});}),n;}function Zo(n,t,e){return arguments.length==2?n.getAttribute(t):e===null?n.removeAttribute(t):(n.setAttribute(t,e),n);}var Oie=Object.prototype.toString;function Ji(n){return new qd(n);}function qd(n){if(!n||!n.nodeType)throw new Error("A DOM element reference is required");this.el=n,this.list=n.classList;}qd.prototype.add=function(n){return this.list.add(n),this;};qd.prototype.remove=function(n){return Oie.call(n)=="[object RegExp]"?this.removeMatching(n):(this.list.remove(n),this);};qd.prototype.removeMatching=function(n){let t=this.array();for(let e=0;e<t.length;e++)n.test(t[e])&&this.remove(t[e]);return this;};qd.prototype.toggle=function(n,t){return typeof t<"u"?t!==this.list.toggle(n,t)&&this.list.toggle(n):this.list.toggle(n),this;};qd.prototype.array=function(){return Array.from(this.list);};qd.prototype.has=qd.prototype.contains=function(n){return this.list.contains(n);};function Jd(n){for(var t;t=n.firstChild;)n.removeChild(t);return n;}function Bs(n,t,e){var i=e?n:n.parentNode;return i&&typeof i.closest=="function"&&i.closest(t)||null;}function Eie(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;}var Tv={},uN;function Tie(){if(uN)return Tv;uN=1;var n,t,e;function i(){n=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",e=n!=="addEventListener"?"on":"";}return Tv.bind=function(o,a,r,l){return n||i(),o[n](e+a,r,l||!1),r;},Tv.unbind=function(o,a,r,l){return t||i(),o[t](e+a,r,l||!1),r;},Tv;}var fN=Tie(),Iie=Eie(fN),Cn=Mie({__proto__:null,default:Iie},[fN]),hN=["focus","blur"];function kie(n,t,e,i,o){return hN.indexOf(e)!==-1&&(o=!0),Cn.bind(n,e,function(a){var r=a.target||a.srcElement;a.delegateTarget=Bs(r,t,!0),a.delegateTarget&&i.call(n,a);},o);}function Rie(n,t,e,i){return hN.indexOf(t)!==-1&&(i=!0),Cn.unbind(n,t,e,i);}var wa={bind:kie,unbind:Rie};function j0(n,t){return n&&typeof n.matches=="function"&&n.matches(t)||!1;}function si(n,t){return t=t||document,t.querySelector(n);}function ru(n,t){return t=t||document,t.querySelectorAll(n);}function Cs(n){n.parentNode&&n.parentNode.removeChild(n);}function Nie(n,t){if(n.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(n,!0);}catch(e){}return n;}function CN(n,t){return t.appendChild(Nie(n,t));}function Kt(n,t){return CN(t,n),n;}var fM=2,vN={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":fM,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":fM,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode
595-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Aie(n,t){return vN[t]?n.style[t]:n.getAttributeNS(null,t);}function bN(n,t,e){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=vN[i];o?(o===fM&&typeof e=="number"&&(e=String(e)+"px"),n.style[i]=e):n.setAttributeNS(null,t,e);}function Die(n,t){var e=Object.keys(t),i,o;for(i=0,o;o=e[i];i++)bN(n,o,t[o]);}function lt(n,t,e){if(typeof t=="string"){if(e!==void 0)bN(n,t,e);else return Aie(n,t);}else Die(n,t);return n;}var jie=Object.prototype.toString;function En(n){return new Hd(n);}function Hd(n){if(!n||!n.nodeType)throw new Error("A DOM element reference is required");this.el=n,this.list=n.classList;}Hd.prototype.add=function(n){return this.list.add(n),this;};Hd.prototype.remove=function(n){return jie.call(n)=="[object RegExp]"?this.removeMatching(n):(this.list.remove(n),this);};Hd.prototype.removeMatching=function(n){let t=this.array();for(let e=0;e<t.length;e++)n.test(t[e])&&this.remove(t[e]);return this;};Hd.prototype.toggle=function(n,t){return typeof t<"u"?t!==this.list.toggle(n,t)&&this.list.toggle(n):this.list.toggle(n),this;};Hd.prototype.array=function(){return Array.from(this.list);};Hd.prototype.has=Hd.prototype.contains=function(n){return this.list.contains(n);};function Tp(n){for(var t;t=n.firstChild;)n.removeChild(t);return n;}function _M(n){return n.cloneNode(!0);}var gM={svg:"http://www.w3.org/2000/svg"},_N='<svg xmlns="'+gM.svg+'"';function yN(n){var t=!1;n.substring(0,4)==="<svg"?n.indexOf(gM.svg)===-1&&(n=_N+n.substring(4)):(n=_N+">"+n+"</svg>",t=!0);var e=Lie(n);if(!t)return e;for(var i=document.createDocumentFragment(),o=e.firstChild;o.firstChild;)i.appendChild(o.firstChild);return i;}function Lie(n){var t;return t=new DOMParser(),t.async=!1,t.parseFromString(n,"text/xml");}function xt(n,t){var e;return n=n.trim(),n.charAt(0)==="<"?(e=yN(n).firstChild,e=document.importNode(e,!0)):e=document.createElementNS(gM.svg,n),t&<(e,t),e;}var mM=null;function hM(){return mM===null&&(mM=xt("svg")),mM;}function gN(n,t){var e,i,o=Object.keys(t);for(e=0;i=o[e];e++)n[i]=t[i];return n;}function PN(n,t,e,i,o,a){var r=hM().createSVGMatrix();switch(arguments.length){case 0:return r;case 1:return gN(r,n);case 6:return gN(r,{a:n,b:t,c:e,d:i,e:o,f:a});}}function rh(n){return n?hM().createSVGTransformFromMatrix(n):hM().createSVGTransform();}var xN=/([&<>]{1})/g,zie=/([&<>\n\r"]{1})/g,Fie={"&":"&","<":"<",">":">",'"':"'"};function uM(n,t){function e(i,o){return Fie[o]||o;}return n.replace(t,e);}function wN(n,t){var e,i,o,a,r;switch(n.nodeType){case 3:t.push(uM(n.textContent,xN));break;case 1:if(t.push("<",n.tagName),n.hasAttributes())for(o=n.attributes,e=0,i=o.length;e<i;++e)a=o.item(e),t.push(" ",a.name,'="',uM(a.value,zie),'"');if(n.hasChildNodes()){for(t.push(">"),r=n.childNodes,e=0,i=r.length;e<i;++e)wN(r.item(e),t);t.push("</",n.tagName,">");}else t.push("/>");break;case 8:t.push("<!--",uM(n.nodeValue,xN),"-->");break;case 4:t.push("<![CDATA[",n.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+n.nodeType);}return t;}function Bie(n,t){var e=yN(t);if(Tp(n),!!t){Vie(e)||(e=e.documentElement);for(var i=Gie(e.childNodes),o=0;o<i.length;o++)CN(i[o],n);}}function $ie(n){for(var t=n.firstChild,e=[];t;)wN(t,e),t=t.nextSibling;return e.join("");}function Vie(n){return n.nodeName==="#document-fragment";}function xM(n,t){if(t!==void 0){try{Bie(n,t);}catch(e){throw new Error("error parsing SVG: "+e.message);}return n;}else return $ie(n);}function Gie(n){return Array.prototype.slice.call(n);}function Hi(n){var t=n.parentNode;return t&&t.removeChild(n),n;}function qie(n,t){return t instanceof SVGMatrix?n.createSVGTransformFromMatrix(t):t;}function Jie(n,t){var e,i;for(n.clear(),e=0;i=t[e];e++)n.appendItem(qie(n,i));}function su(n,t){var e=n.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Jie(e,t)),e.consolidate();}var Hie=/^class[ {]/;function Uie(n){return Hie.test(n.toString());}function vM(n){return Array.isArray(n);}function CM(n,t){return Object.prototype.hasOwnProperty.call(n,t);}function Iv(...n){n.length===1&&vM(n[0])&&(n=n[0]),n=[...n];let t=n.pop();return t.$inject=n,t;}var Wie=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Xie=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Yie=/\/\*([^*]*)\*\//m;function Kie(n){if(typeof n!="function")throw new Error(`Cannot annotate "${n}". Expected a function!`);
595let t=n.toString().match(Uie(n)?Wie:Xie);if(!t)return[];let e=t[1]||t[2];return e&&e.split(",").map(i=>{let o=i.match(Yie);return(o&&o[1]||i).trim();})||[];}function bM(n,t){let e=t||{get:function(L,A){if(i.push(L),A===!1)return null;throw l(`No provider for "${L}"!`);}},i=[],o=this._providers=Object.create(e._providers||null),a=this._instances=Object.create(null),r=a.injector=this,l=function(L){let A=i.join(" -> ");return i.length=0,new Error(A?`${L} (Resolving: ${A})`:L);};function p(L,A){if(!o[L]&&L.includes(".")){let J=L.split("."),Q=p(J.shift());for(;J.length;)Q=Q[J.shift()];return Q;}if(CM(a,L))return a[L];if(CM(o,L)){if(i.indexOf(L)!==-1)throw i.push(L),l("Cannot resolve circular dependency!");return i.push(L),a[L]=o[L][0](o[L][1]),i.pop(),a[L];}return e.get(L,A);}function d(L,A){if(typeof A>"u"&&(A={}),typeof L!="function")if(vM(L))L=Iv(L.slice());else throw l(`Cannot invoke "${L}". Expected a function!`);let Q=(L.$inject||Kie(L)).map(te=>CM(A,te)?A[te]:p(te));return{fn:L,dependencies:Q};}function f(L){let{fn:A,dependencies:J}=d(L),Q=Function.prototype.bind.call(A,null,...J);return new Q();}function h(L,A,J){let{fn:Q,dependencies:te}=d(L,J);return Q.apply(A,te);}function g(L){return Iv(A=>L.get(A));}function b(L,A){if(A&&A.length){let J=Object.create(null),Q=Object.create(null),te=[],U=[],ce=[],W,Y,se,de;for(let Ae in o)W=o[Ae],A.indexOf(Ae)!==-1&&(W[2]==="private"?(Y=te.indexOf(W[3]),Y===-1?(se=W[3].createChild([],A),de=g(se),te.push(W[3]),U.push(se),ce.push(de),J[Ae]=[de,Ae,"private",se]):J[Ae]=[ce[Y],Ae,"private",U[Y]]):J[Ae]=[W[2],W[1]],Q[Ae]=!0),(W[2]==="factory"||W[2]==="type")&&W[1].$scope&&A.forEach(rt=>{W[1].$scope.indexOf(rt)!==-1&&(J[Ae]=[W[2],W[1]],Q[rt]=!0);});A.forEach(Ae=>{if(!Q[Ae])throw new Error('No provider for "'+Ae+'". Cannot use provider from the parent!');}),L.unshift(J);}return new bM(L,r);}let w={factory:h,type:f,value:function(L){return L;}};function T(L,A){let J=L.__init__||[];return function(){J.forEach(Q=>{typeof Q=="string"?A.get(Q):A.invoke(Q);});};}function O(L){let A=L.__exports__;if(A){let J=L.__modules__,Q=Object.keys(L).reduce((Y,se)=>(se!=="__exports__"&&se!=="__modules__"&&se!=="__init__"&&se!=="__depends__"&&(Y[se]=L[se]),Y),Object.create(null)),te=(J||[]).concat(Q),U=b(te),ce=Iv(function(Y){return U.get(Y);});A.forEach(function(Y){o[Y]=[ce,Y,"private",U];});let W=(L.__init__||[]).slice();return W.unshift(function(){U.init();}),L=Object.assign({},L,{__init__:W}),T(L,U);}return Object.keys(L).forEach(function(J){if(J==="__init__"||J==="__depends__")return;let Q=L[J];if(Q[2]==="private"){o[J]=Q;return;}let te=Q[0],U=Q[1];o[J]=[w[te],Zie(te,U),te];}),T(L,r);}function V(L,A){return L.indexOf(A)!==-1||(L=(A.__depends__||[]).reduce(V,L),L.indexOf(A)!==-1)?L:L.concat(A);}function j(L){let A=L.reduce(V,[]).map(O),J=!1;return function(){J||(J=!0,A.forEach(Q=>Q()));};}this.get=p,this.invoke=h,this.instantiate=f,this.createChild=b,this.init=j(n);}function Zie(n,t){return n!=="value"&&vM(t)&&(t=Iv(t.slice())),t;}var Qie=1e3;function Fl(n,t){var e=this;t=t||Qie,n.on(["render.shape","render.connection"],t,function(i,o){var a=i.type,r=o.element,l=o.gfx,p=o.attrs;if(e.canRender(r))return a==="render.shape"?e.drawShape(l,r,p):e.drawConnection(l,r,p);}),n.on(["render.getShapePath","render.getConnectionPath"],t,function(i,o){if(e.canRender(o))return i.type==="render.getShapePath"?e.getShapePath(o):e.getConnectionPath(o);});}Fl.prototype.canRender=function(n){};Fl.prototype.drawShape=function(n,t){};Fl.prototype.drawConnection=function(n,t){};Fl.prototype.getShapePath=function(n){};Fl.prototype.getConnectionPath=function(n){};function Ip(n){return n.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1");}function eoe(n){return["M",n.x,n.y];}function yM(n){return["L",n.x,n.y];}function toe(n,t,e){return["C",n.x,n.y,t.x,t.y,e.x,e.y];}function noe(n,t){let e=n.length,i=[eoe(n[0])];for(let o=1;o<e;o++){let a=n[o-1],r=n[o],l=n[o+1];if(!l||!t){i.push(yM(r));continue;}
595let p=Math.min(t,PM(r.x-a.x,r.y-a.y),PM(l.x-r.x,l.y-r.y));if(!p){i.push(yM(r));continue;}let d=kv(r,a,p),f=kv(r,a,p*.5),h=kv(r,l,p),g=kv(r,l,p*.5);i.push(yM(d)),i.push(toe(f,g,h));}return i;}function kv(n,t,e){let i=t.x-n.x,o=t.y-n.y,a=PM(i,o),r=e/a;return{x:n.x+i*r,y:n.y+o*r};}function PM(n,t){return Math.sqrt(Math.pow(n,2)+Math.pow(t,2));}function Bc(n,t,e){nn(t)&&(e=t,t=null),t||(t={});let i=xt("path",t);return nn(e)&&(i.dataset.cornerRadius=String(e)),L0(i,n);}function L0(n,t){let e=parseInt(n.dataset.cornerRadius,10)||0;return lt(n,{d:Ip(noe(t,e))}),n;}function Ud(n){var t=new Set(n);return Yt(n,function(e){for(var i=e.parent;i;){if(t.has(i))return!1;i=i.parent;}return!0;});}function hc(n,t,e){e=e||0,gt(n)||(n=[n]),ne(n,function(i,o){var a=t(i,o,e);gt(a)&&a.length&&hc(a,t,e+1);});}function F0(n,t,e){var i=new Set(),o=new Set();return hc(n,function(a,r,l){i.add(a);var p=a.children;if((e===-1||l<e)&&p&&!o.has(p))return o.add(p),p;}),Array.from(i);}function $c(n,t){return F0(n,!0,-1);}function SN(n,t,e){Fc(t)&&(t=!0),eo(t)&&(e=t,t=!0),e=e||{};var i=z0(e.allShapes),o=z0(e.allConnections),a=z0(e.enclosedElements),r=z0(e.enclosedConnections),l=z0(e.topLevel,t&&uc(n,function(f){return f.id;}));function p(f){l[f.source.id]&&l[f.target.id]&&(l[f.id]=[f]),i[f.source.id]&&i[f.target.id]&&(r[f.id]=a[f.id]=f),o[f.id]=f;}function d(f){if(a[f.id]=f,f.waypoints)r[f.id]=o[f.id]=f;else return i[f.id]=f,ne(f.incoming,p),ne(f.outgoing,p),f.children;}return hc(n,d),{allShapes:i,allConnections:o,topLevel:l,enclosedConnections:r,enclosedElements:a};}function Pi(n,t){t=!!t,gt(n)||(n=[n]);var e,i,o,a;return ne(n,function(r){var l=r;r.waypoints&&!t&&(l=Pi(r.waypoints,!0));var p=l.x,d=l.y,f=l.height||0,h=l.width||0;(p<e||e===void 0)&&(e=p),(d<i||i===void 0)&&(i=d),(p+h>o||o===void 0)&&(o=p+h),(d+f>a||a===void 0)&&(a=d+f);}),{x:e,y:i,height:a-i,width:o-e};}function Vc(n,t){var e={};return ne(n,function(i){var o=i;o.waypoints&&(o=Pi(o)),!nn(t.y)&&o.x>t.x&&(e[i.id]=i),!nn(t.x)&&o.y>t.y&&(e[i.id]=i),o.x>t.x&&o.y>t.y&&(nn(t.width)&&nn(t.height)&&o.width+o.x<t.width+t.x&&o.height+o.y<t.height+t.y||!nn(t.width)||!nn(t.height))&&(e[i.id]=i);}),e;}function Rv(n){return"waypoints"in n?"connection":"x"in n?"shape":"root";}function Nv(n){return!!(n&&n.isFrame);}function z0(n,t){return me({},n||{},t||{});}var ioe=1;function Gc(n,t){Fl.call(this,n,ioe),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2});}Fe(Gc,Fl);Gc.prototype.canRender=function(){return!0;};Gc.prototype.drawShape=function(t,e,i){var o=xt("rect");return lt(o,{x:0,y:0,width:e.width||0,height:e.height||0}),Nv(e)?lt(o,me({},this.FRAME_STYLE,i||{})):lt(o,me({},this.SHAPE_STYLE,i||{})),Kt(t,o),o;};Gc.prototype.drawConnection=function(t,e,i){var o=Bc(e.waypoints,me({},this.CONNECTION_STYLE,i||{}));return Kt(t,o),o;};Gc.prototype.getShapePath=function(t){var e=t.x,i=t.y,o=t.width,a=t.height,r=[["M",e,i],["l",o,0],["l",0,a],["l",-o,0],["z"]];return Ip(r);};Gc.prototype.getConnectionPath=function(t){var e=t.waypoints,i,o,a=[];for(i=0;o=e[i];i++)o=o.original||o,a.push([i===0?"M":"L",o.x,o.y]);return Ip(a);};Gc.$inject=["eventBus","styles"];function wM(){var n={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,i,o){var a=this.style(i,o);return me(a,{class:e});},this.style=function(e,i){!gt(e)&&!i&&(i=e,e=[]);var o=_a(e,function(a,r){return me(a,n[r]||{});},{});return i?me(o,i):o;},this.computeStyle=function(e,i,o){return gt(i)||(o=i,i=[]),t.style(i||[],me({},o,e||{}));};}var MN={__init__:["defaultRenderer"],defaultRenderer:["type",Gc],styles:["type",wM]};function Ui(n,t){if(!n||!t)return-1;var e=n.indexOf(t);return e!==-1&&n.splice(e,1),e;}function Ni(n,t,e){if(!(!n||!t)){typeof e!="number"&&(e=-1);var i=n.indexOf(t);if(i!==-1){if(i===e)return;if(e!==-1)n.splice(i,1);else return;}e!==-1?n.splice(e,0,t):n.push(t);}}function sh(n,t){return!n||!t?-1:n.indexOf(t);}function Wd(n,t){return!n||!t?-1:Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2));}function lh(n,t,e,i){if(typeof i>"u"&&(i=5),!n||!t||!e)return!1;var o=(t.x-n.x)*(e.y-n.y)-(t.y-n.y)*(e.x-n.x),a=Wd(n,t);return Math.abs(o/a)<=i;}var ooe=2;function $s(n,t){var e=Array.from(arguments).flat();let i={x:"v",y:"h"};
595for(let[o,a]of Object.entries(i))if(aoe(o,e))return a;return!1;}function aoe(n,t){let e=t[0];return zl(t,function(i){return Math.abs(e[n]-i[n])<=ooe;});}function SM(n,t,e){return e=e||0,n.x>t.x-e&&n.y>t.y-e&&n.x<t.x+t.width+e&&n.y<t.y+t.height+e;}function B0(n,t){return{x:Math.round(n.x+(t.x-n.x)/2),y:Math.round(n.y+(t.y-n.y)/2)};}var roe=/,?([a-z]),?/gi,ON=parseFloat,Na=Math,Xd=Na.PI,qc=Na.min,Jc=Na.max,EN=Na.pow,Kd=Na.abs,soe=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,loe=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,TN=Array.isArray||function(n){return n instanceof Array;};function coe(n,t){return Object.prototype.hasOwnProperty.call(n,t);}function poe(n,t){for(var e=0,i=n.length;e<i;e++)if(n[e]===t)return n.push(n.splice(e,1)[0]);}function doe(n){function t(){var e=Array.prototype.slice.call(arguments,0),i=e.join("\u2400"),o=t.cache=t.cache||{},a=t.count=t.count||[];return coe(o,i)?(poe(a,i),o[i]):(a.length>=1e3&&delete o[a.shift()],a.push(i),o[i]=n(...arguments),o[i]);}return t;}function moe(n){if(!n)return null;var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=[];return String(n).replace(soe,function(i,o,a){var r=[],l=o.toLowerCase();for(a.replace(loe,function(p,d){d&&r.push(+d);}),l=="m"&&r.length>2&&(e.push([o,...r.splice(0,2)]),l="l",o=o=="m"?"l":"L");r.length>=t[l]&&(e.push([o,...r.splice(0,t[l])]),!!t[l]););}),e.toString=OM,e;}function uoe(n){for(var t=0,e=n.length;t<e;t++){var i=n[t][0];if(typeof i=="string"&&i!==i.toUpperCase())return!1;}return!0;}function foe(n){for(var t=0,e=n.length;t<e;t++){var i=n[t][0];if(i!=="M"&&i!=="C")return!1;}return!0;}function MM(n,t,e,i){return arguments.length===1&&(t=n.y,e=n.width,i=n.height,n=n.x),{x:n,y:t,width:e,height:i,x2:n+e,y2:t+i};}function OM(){return this.join(",").replace(roe,"$1");}function hoe(n){for(var t=new Array(n.length),e=0,i=n.length;e<i;e++)for(var o=n[e],a=t[e]=new Array(o.length),r=0,l=o.length;r<l;r++)a[r]=o[r];return t.toString=OM,t;}function IN(n,t,e,i,o,a,r,l,p){var d=1-p,f=EN(d,3),h=EN(d,2),g=p*p,b=g*p,w=f*n+h*3*p*e+d*3*p*p*o+b*r,T=f*t+h*3*p*i+d*3*p*p*a+b*l;return{x:Dv(w),y:Dv(T)};}function kN(n){var t=boe(...n);return MM(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0);}function Yd(n,t,e){return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height;}function _oe(n,t){return n=MM(n),t=MM(t),Yd(t,n.x,n.y)||Yd(t,n.x2,n.y)||Yd(t,n.x,n.y2)||Yd(t,n.x2,n.y2)||Yd(n,t.x,t.y)||Yd(n,t.x2,t.y)||Yd(n,t.x,t.y2)||Yd(n,t.x2,t.y2)||(n.x<t.x2&&n.x>t.x||t.x<n.x2&&t.x>n.x)&&(n.y<t.y2&&n.y>t.y||t.y<n.y2&&t.y>n.y);}function RN(n,t,e,i,o){var a=-3*t+9*e-9*i+3*o,r=n*a+6*t-12*e+6*i;return n*r-3*t+3*e;}function NN(n,t,e,i,o,a,r,l,p){p==null&&(p=1),p=p>1?1:p<0?0:p;for(var d=p/2,f=12,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],g=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],b=0,w=0;w<f;w++){var T=d*h[w]+d,O=RN(T,n,e,o,r),V=RN(T,t,i,a,l),j=O*O+V*V;b+=g[w]*Na.sqrt(j);}return d*b;}function goe(n,t,e,i,o,a,r,l){if(!(Jc(n,e)<qc(o,r)||qc(n,e)>Jc(o,r)||Jc(t,i)<qc(a,l)||qc(t,i)>Jc(a,l))){var p=(n*i-t*e)*(o-r)-(n-e)*(o*l-a*r),d=(n*i-t*e)*(a-l)-(t-i)*(o*l-a*r),f=(n-e)*(a-l)-(t-i)*(o-r);if(f){var h=Dv(p/f),g=Dv(d/f),b=+h.toFixed(2),w=+g.toFixed(2);if(!(b<+qc(n,e).toFixed(2)||b>+Jc(n,e).toFixed(2)||b<+qc(o,r).toFixed(2)||b>+Jc(o,r).toFixed(2)||w<+qc(t,i).toFixed(2)||w>+Jc(t,i).toFixed(2)||w<+qc(a,l).toFixed(2)||w>+Jc(a,l).toFixed(2)))return{x:h,y:g};}}}function Dv(n){return Math.round(n*1e11)/1e11;}function xoe(n,t,e){var i=kN(n),o=kN(t);if(!_oe(i,o))return e?0:[];var a=NN(...n),r=NN(...t),l=AN(n)?1:~~(a/5)||1,p=AN(t)?1:~~(r/5)||1,d=new Array(l+1),f=new Array(p+1),h={},g=e?0:[],b,w;for(b=0;b<l+1;b++){var T=IN(...n,b/l);d[b]={x:T.x,y:T.y,t:b/l};}for(b=0;b<p+1;b++)T=IN(...t,b/p),f[b]={x:T.x,y:T.y,t:b/p};for(b=0;b<l;b++)for(w=0;w<p;w++){var O=d[b],V=d[b+1],j=f[w],L=f[w+1],A=Kd(V.x-O.x)<.01?"y":"x",J=Kd(L.x-j.x)<.01?"y":"x",Q=goe(O.x,O.y,V.x,V.y,j.x,j.y,L.x,L.y),te;if(Q){if(te=Q.x.toFixed(9)+"#"+Q.y.toFixed(9),h[te])continue;h[te]=!0;var U=O.t+Kd((Q[A]-O[A])/(V[A]-O[A]))*(V.t-O.t),ce=j.t+Kd((Q[J]-j[J])/(L[J]-j[J]))*(L.t-j.t);U>
595=0&&U<=1&&ce>=0&&ce<=1&&(e?g++:g.push({x:Q.x,y:Q.y,t1:U,t2:ce}));}}return g;}function $0(n,t,e){n=jN(n),t=jN(t);for(var i,o,a,r,l,p,d,f,h,g,b=e?0:[],w=0,T=n.length;w<T;w++){var O=n[w];if(O[0]=="M")i=l=O[1],o=p=O[2];else{O[0]=="C"?(h=[i,o,...O.slice(1)],i=h[6],o=h[7]):(h=[i,o,i,o,l,p,l,p],i=l,o=p);for(var V=0,j=t.length;V<j;V++){var L=t[V];if(L[0]=="M")a=d=L[1],r=f=L[2];else{L[0]=="C"?(g=[a,r,...L.slice(1)],a=g[6],r=g[7]):(g=[a,r,a,r,d,f,d,f],a=d,r=f);var A=xoe(h,g,e);if(e)b+=A;else{for(var J=0,Q=A.length;J<Q;J++)A[J].segment1=w,A[J].segment2=V,A[J].bez1=h,A[J].bez2=g;b=b.concat(A);}}}}}return b;}function Coe(n){return TN(n)&&TN(n[0]);}function voe(n){if(uoe(n))return n;var t=new Array(n.length),e=0,i=0,o=0,a=0,r=0,l;n[0][0]=="M"&&(e=+n[0][1],i=+n[0][2],o=e,a=i,r++,t[0]=["M",e,i]);for(var p,d,f=r,h=n.length;f<h;f++){if(d=n[f],l=d[0],t[f]=p=new Array(d.length),l!=l.toUpperCase())switch(p[0]=l.toUpperCase(),p[0]){case"A":p[1]=d[1],p[2]=d[2],p[3]=d[3],p[4]=d[4],p[5]=d[5],p[6]=+d[6]+e,p[7]=+d[7]+i;break;case"V":p[1]=+d[1]+i;break;case"H":p[1]=+d[1]+e;break;case"M":o=+d[1]+e,a=+d[2]+i;default:for(var g=1,b=d.length;g<b;g++)p[g]=+d[g]+(g%2?e:i);}else for(var w=0,T=d.length;w<T;w++)p[w]=d[w];switch(l=l.toUpperCase(),p[0]){case"Z":e=+o,i=+a;break;case"H":e=p[1];break;case"V":i=p[1];break;case"M":o=p[p.length-2],a=p[p.length-1];default:e=p[p.length-2],i=p[p.length-1];}}return t.toString=OM,t;}function AN(n){return n[0]===n[2]&&n[1]===n[3]&&n[4]===n[6]&&n[5]===n[7];}function Av(n,t,e,i){return[n,t,e,i,e,i];}function DN(n,t,e,i,o,a){var r=.3333333333333333,l=2/3;return[r*n+l*e,r*t+l*i,r*o+l*e,r*a+l*i,o,a];}function LN(n,t,e,i,o,a,r,l,p,d){var f=Xd*120/180,h=Xd/180*(+o||0),g=[],b,w=doe(function(Z,D,F){var fe=Z*Na.cos(F)-D*Na.sin(F),he=Z*Na.sin(F)+D*Na.cos(F);return{x:fe,y:he};});if(d)te=d[0],U=d[1],J=d[2],Q=d[3];else{b=w(n,t,-h),n=b.x,t=b.y,b=w(l,p,-h),l=b.x,p=b.y;var T=(n-l)/2,O=(t-p)/2,V=T*T/(e*e)+O*O/(i*i);V>1&&(V=Na.sqrt(V),e=V*e,i=V*i);var j=e*e,L=i*i,A=(a==r?-1:1)*Na.sqrt(Kd((j*L-j*O*O-L*T*T)/(j*O*O+L*T*T))),J=A*e*O/i+(n+l)/2,Q=A*-i*T/e+(t+p)/2,te=Na.asin(((t-Q)/i).toFixed(9)),U=Na.asin(((p-Q)/i).toFixed(9));te=n<J?Xd-te:te,U=l<J?Xd-U:U,te<0&&(te=Xd*2+te),U<0&&(U=Xd*2+U),r&&te>U&&(te=te-Xd*2),!r&&U>te&&(U=U-Xd*2);}var ce=U-te;if(Kd(ce)>f){var W=U,Y=l,se=p;U=te+f*(r&&U>te?1:-1),l=J+e*Na.cos(U),p=Q+i*Na.sin(U),g=LN(l,p,e,i,o,0,r,Y,se,[U,W,J,Q]);}ce=U-te;var de=Na.cos(te),Ae=Na.sin(te),rt=Na.cos(U),et=Na.sin(U),pt=Na.tan(ce/4),ft=4/3*e*pt,je=4/3*i*pt,ke=[n,t],Ke=[n+ft*Ae,t-je*de],ve=[l+ft*et,p-je*rt],Se=[l,p];if(Ke[0]=2*ke[0]-Ke[0],Ke[1]=2*ke[1]-Ke[1],d)return[Ke,ve,Se].concat(g);g=[Ke,ve,Se].concat(g).join().split(",");for(var Be=[],Ze=0,kt=g.length;Ze<kt;Ze++)Be[Ze]=Ze%2?w(g[Ze-1],g[Ze],h).y:w(g[Ze],g[Ze+1],h).x;return Be;}function boe(n,t,e,i,o,a,r,l){for(var p=[],d=[[],[]],f,h,g,b,w,T,O,V,j=0;j<2;++j){if(j==0?(h=6*n-12*e+6*o,f=-3*n+9*e-9*o+3*r,g=3*e-3*n):(h=6*t-12*i+6*a,f=-3*t+9*i-9*a+3*l,g=3*i-3*t),Kd(f)<1e-12){if(Kd(h)<1e-12)continue;b=-g/h,0<b&&b<1&&p.push(b);continue;}O=h*h-4*g*f,V=Na.sqrt(O),!(O<0)&&(w=(-h+V)/(2*f),0<w&&w<1&&p.push(w),T=(-h-V)/(2*f),0<T&&T<1&&p.push(T));}for(var L=p.length,A=L,J;L--;)b=p[L],J=1-b,d[0][L]=J*J*J*n+3*J*J*b*e+3*J*b*b*o+b*b*b*r,d[1][L]=J*J*J*t+3*J*J*b*i+3*J*b*b*a+b*b*b*l;return d[0][A]=n,d[1][A]=t,d[0][A+1]=r,d[1][A+1]=l,d[0].length=d[1].length=A+2,{x0:qc(...d[0]),y0:qc(...d[1]),x1:Jc(...d[0]),y1:Jc(...d[1])};}function jN(n){if(Coe(n)||(n=moe(n)),foe(n))return n;for(var t=hoe(voe(n)),e={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i=function(g,b,w){var T,O;if(!g)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(g[0]in{T:1,Q:1})&&(b.qx=b.qy=null),g[0]){case"M":b.X=g[1],b.Y=g[2];break;case"A":g=["C",...LN(b.x,b.y,...g.slice(1))];break;case"S":w=="C"||w=="S"?(T=b.x*2-b.bx,O=b.y*2-b.by):(T=b.x,O=b.y),g=["C",T,O,...g.slice(1)];break;case"T":w=="Q"||w=="T"?(b.qx=b.x*2-b.qx,b.qy=b.y*2-b.qy):(b.qx=b.x,b.qy=b.y),g=["C",...DN(b.x,b.y,b.qx,b.qy,g[1],g[2])];break;case"Q":b.qx=g[1],b.qy=g[2],g=["C",...DN(b.x,b.y,g[1],g[2],g[3],g[4])];break;case"L":g=["C",...Av(b.x,b.y,g[1],g[2])];break;case"H":g=["C",...Av(b.x,b.y,g[1],b.y)];break;case"V":g=["C",...Av(b.x,b.y,b.x,g[1])];break;case"Z":g=["C",...Av(b.x,b.y,b.X,b.Y)];break;}return g;},o=function(g,b){if(g[b].length>7){g[b].shift();for(var w=g[b];w.length;)a[b]="A",g.splice(b++,0,["C",...w.splice(0,6)]);g.splice(b,1),d=t.length;}},a=[],r="",l="",p=0,d=t.length;p<d;p++){t[p]&&(r=t[p][0]),r!="C"&&(a[p]=r,p&&(l=a[p-1])),t[p]=i(t[p],e,l),a[p]!="A"&&r=="C"&&(a[p]="C"),o(t,p);var f=t[p],h=f.length;e.x=f[h-2],e.y=f[h-1],e.bx=ON(f[h-4])||e.x,e.by=ON(f[h-3])||e.y;}return t;}function zn(n){return eo(n)&&Ka(n,"waypoints");}function Ut(n){return eo(n)&&Ka(n,"labelTarget");}function zN(n){return eo(n)&&Ep(n.parent);}function jv(n){return{x:Math.round(n.x),y:Math.round(n.y),width:Math.round(n.width),height:Math.round(n.height)};}function Bl(n){return{x:Math.round(n.x),y:Math.round(n.y)};}function Ot(n){return{top:n.y,right:n.x+(n.width||0),bottom:n.y+(n.height||0),left
595:n.x};}function lu(n){return{x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top};}function yoe(n){return Bl({x:n.x+(n.width||0)/2,y:n.y+(n.height||0)/2});}function Poe(n){for(var t=n.waypoints,e=t.reduce(function(d,f,h){var g=t[h-1];if(g){var b=d[d.length-1],w=b&&b.endLength||0,T=Soe(g,f);d.push({start:g,end:f,startLength:w,endLength:w+T,length:T});}return d;},[]),i=e.reduce(function(d,f){return d+f.length;},0),o=i/2,a=0,r=e[a];r.endLength<o;)r=e[++a];var l=(o-r.startLength)/r.length,p={x:r.start.x+(r.end.x-r.start.x)*l,y:r.start.y+(r.end.y-r.start.y)*l};return p;}function Rt(n){return zn(n)?Poe(n):yoe(n);}function Jo(n,t,e){e=e||0,eo(e)||(e={x:e,y:e});var i=Ot(n),o=Ot(t),a=i.bottom+e.y<=o.top,r=i.left-e.x>=o.right,l=i.top-e.y>=o.bottom,p=i.right+e.x<=o.left,d=a?"top":l?"bottom":null,f=p?"left":r?"right":null;return f&&d?d+"-"+f:f||d||"intersect";}function Zd(n,t,e){var i=woe(n,t);return i.length===1||i.length===2&&Wd(i[0],i[1])<1?Bl(i[0]):i.length>1?(i=jr(i,function(o){var a=Math.floor(o.t2*100)||1;return a=100-a,a=(a<10?"0":"")+a,o.segment2+"#"+a;}),Bl(i[e?0:i.length-1])):null;}function woe(n,t){return $0(n,t);}function FN(n){n=n.slice();for(var t=0,e,i,o;n[t];)e=n[t],i=n[t-1],o=n[t+1],Wd(e,o)===0||lh(i,o,e)?n.splice(t,1):t++;return n;}function Soe(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2));}function Lv(n,t){return Math.round(n*t)/t;}function BN(n){return nn(n)?n+"px":n;}function Moe(n){for(;n.parent;)n=n.parent;return n;}function Ooe(n){n=me({},{width:"100%",height:"100%"},n);let t=n.container||document.body,e=document.createElement("div");return e.setAttribute("class","djs-container djs-parent"),La(e,{position:"relative",overflow:"hidden",width:BN(n.width),height:BN(n.height)}),t.appendChild(e),e;}function $N(n,t,e){let i=xt("g");En(i).add(t);let o=e!==void 0?e:n.childNodes.length-1;return n.insertBefore(i,n.childNodes[o]||null),i;}var Eoe="base",VN=0,Toe=1,Ioe={shape:["x","y","width","height"],connection:["waypoints"]};function Tn(n,t,e,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=e,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(n||{});}Tn.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];Tn.prototype._init=function(n){let t=this._eventBus,e=this._container=Ooe(n),i=this._svg=xt("svg");lt(i,{width:"100%",height:"100%"}),Zo(i,"tabindex",0),n.autoFocus&&t.on("element.hover",()=>{this.restoreFocus();}),t.on("element.mousedown",500,a=>{this.focus();}),i.addEventListener("focusin",()=>{this._setFocused(!0);}),i.addEventListener("focusout",()=>{this._setFocused(!1);}),i.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover");}),i.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout");}),Kt(e,i);let o=this._viewport=$N(i,"viewport");n.deferUpdate&&(this._viewboxChanged=au(this._viewboxChanged,300)),this._restoreFocus=au(this._restoreFocus,0),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:i,viewport:o});}),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox;}),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this);};Tn.prototype._destroy=function(){this._restoreFocus.cancel(),this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});let n=this._container.parentNode;n&&n.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport;};Tn.prototype._setFocused=function(n){n!=this._focused&&(this._focused=n,this._eventBus.fire("canvas.focus.changed",{focused:n}));};Tn.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{let e=Rv(t);e==="root"?this.removeRootElement(t):this._removeElement(t,e);}),this._planes=[],this._rootElement=null,delete this._cachedViewbox;};Tn.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0);};Tn.prototype.restoreFocus=function(){this._restoreFocus();};Tn.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus();};Tn.prototype.isFocused=function(){return this._focused;};Tn.prototype.getDefaultLayer=function(){return this.getLayer(Eoe,VN);};Tn.prototype.getLayer=function(n,t){if(!n)throw new Error("must specify a name");let e=this._layers[n];if(e||(e=this._layers[n]=this._createLayer(n,t)),typeof t<"u"&&e.index!==t)throw new Error("layer <"+n+"> already created at index <"+t+">");return e.group;};Tn.prototype._getChildIndex=function(n){return _a(this._layers,function(t,e){return e.visible&&n>=e.index&&t++,t;},0);};Tn.prototype._createLayer=function(n,t){typeof t>"u"&&(t=Toe);let e=this._getChildIndex(t);return{group:$N(this._viewport,"layer-"+n,e),index:t,visible:!0};};Tn.prototype.showLayer=function(n){if(!n)throw new Error("must specify a name");let t=this._layers[n];if(!t)throw new Error("layer <"+n+"> does not exist");let e=this._viewport,i=t.group,o=t.index;if(t.visible)return i;let a=this._getChildIndex(o);return e.insertBefore(i,e.childNodes[a]||null),t.visible=!0,i;};Tn.prototype.hideLayer=function(n){if(!n)throw new Error("must specify a name");let t=this._layers[n];if(!t)throw new Error("layer <"+n+"> does not exist");let e=t.group;return t.visible&&(Hi(e),t.visible=!1),e;};Tn.prototype._removeLayer=function(n){let t=this._layers[n];t&&(delete this._layers[n],Hi(t.group));};Tn.prototype.getActiveLayer=function(){let n=this._findPlaneForRoot(this.getRootElement());return n?n.layer:null;};Tn.prototype.findRoot=function(n){let t=this._resolveElements(n),e;for(let i of t){let o=this._findPlaneForRoot(Moe(i));if(!o||e&&o.rootElement!==e)return;e=o.rootElement;}return e;};Tn.prototype.getRootElements=function(){return this._planes.map(function(n){return n.rootElement;});};Tn.prototype._findPlaneForRoot=function(n){return $n(this._planes,function(t){return t.rootElement===n;});};Tn.prototype._resolveElement=function(n){return typeof n=="string"?this._elementRegistry.get(n):n;};Tn.prototype._resolveElements=function(n){return gt(n)||(n=[n]),n.map(t=>
595this._resolveElement(t)).filter(Boolean);};Tn.prototype.getContainer=function(){return this._container;};Tn.prototype._updateMarker=function(n,t,e){let i;n=this._resolveElement(n),n.markers=n.markers||new Set(),i=this._elementRegistry._elements[n.id],i&&(ne([i.gfx,i.secondaryGfx],function(o){o&&(e?(n.markers.add(t),En(o).add(t)):(n.markers.delete(t),En(o).remove(t)));}),this._eventBus.fire("element.marker.update",{element:n,gfx:i.gfx,marker:t,add:!!e}));};Tn.prototype.addMarker=function(n,t){this._updateMarker(n,t,!0);};Tn.prototype.removeMarker=function(n,t){this._updateMarker(n,t,!1);};Tn.prototype.hasMarker=function(n,t){return n=this._resolveElement(n),n.markers?n.markers.has(t):!1;};Tn.prototype.toggleMarker=function(n,t){this.hasMarker(n,t)?this.removeMarker(n,t):this.addMarker(n,t);};Tn.prototype.getRootElement=function(){let n=this._rootElement;return n||this._planes.length?n:this.setRootElement(this.addRootElement(null));};Tn.prototype.addRootElement=function(n){let t=this._rootsIdx++;n||(n={id:"__implicitroot_"+t,children:[],isImplicit:!0});let e=n.layer="root-"+t;this._ensureValid("root",n);let i=this.getLayer(e,VN);return this.hideLayer(e),this._addRoot(n,i),this._planes.push({rootElement:n,layer:i}),n;};Tn.prototype.removeRootElement=function(n){if(n=this._resolveElement(n),!!this._findPlaneForRoot(n))return this._removeRoot(n),this._removeLayer(n.layer),this._planes=this._planes.filter(function(e){return e.rootElement!==n;}),this._rootElement===n&&(this._rootElement=null),n;};Tn.prototype.setRootElement=function(n){if(n===this._rootElement)return n;let t;if(!n)throw new Error("rootElement required");return t=this._findPlaneForRoot(n),t||(n=this.addRootElement(n)),this._setRoot(n),n;};Tn.prototype._removeRoot=function(n){let t=this._elementRegistry,e=this._eventBus;e.fire("root.remove",{element:n}),e.fire("root.removed",{element:n}),t.remove(n);};Tn.prototype._addRoot=function(n,t){let e=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:n}),e.add(n,t),i.fire("root.added",{element:n,gfx:t});};Tn.prototype._setRoot=function(n,t){let e=this._rootElement;e&&(this._elementRegistry.updateGraphics(e,null,!0),this.hideLayer(e.layer)),n&&(t||(t=this._findPlaneForRoot(n).layer),this._elementRegistry.updateGraphics(n,this._svg,!0),this.showLayer(n.layer)),this._rootElement=n,this._eventBus.fire("root.set",{element:n});};Tn.prototype._ensureValid=function(n,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");let e=Ioe[n];if(!zl(e,function(o){return typeof t[o]<"u";}))throw new Error("must supply { "+e.join(", ")+" } with "+n);};Tn.prototype._setParent=function(n,t,e){Ni(t.children,n,e),n.parent=t;};Tn.prototype._addElement=function(n,t,e,i){e=e||this.getRootElement();let o=this._eventBus,a=this._graphicsFactory;this._ensureValid(n,t),o.fire(n+".add",{element:t,parent:e}),this._setParent(t,e,i);let r=a.create(n,t,i);return this._elementRegistry.add(t,r),a.update(n,t,r),o.fire(n+".added",{element:t,gfx:r}),t;};Tn.prototype.addShape=function(n,t,e){return this._addElement("shape",n,t,e);};Tn.prototype.addConnection=function(n,t,e){return this._addElement("connection",n,t,e);};Tn.prototype._removeElement=function(n,t){let e=this._elementRegistry,i=this._graphicsFactory,o=this._eventBus;if(n=e.get(n.id||n),!!n)return o.fire(t+".remove",{element:n}),i.remove(n),Ui(n.parent&&n.parent.children,n),n.parent=null,o.fire(t+".removed",{element:n}),e.remove(n),n;};Tn.prototype.removeShape=function(n){return this._removeElement(n,"shape");};Tn.prototype.removeConnection=function(n){return this._removeElement(n,"connection");};Tn.prototype.getGraphics=function(n,t){return this._elementRegistry.getGraphics(n,t);};Tn.prototype._changeViewbox=function(n){this._eventBus.fire("canvas.viewbox.changing"),n.apply(this),this._cachedViewbox=null,this._viewboxChanged();};Tn.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()});};Tn.prototype.viewbox=function(n){if(n===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);let t=this._viewport,e=this.getSize(),i,o,a,r,l,p,d;if(n)this._changeViewbox(function(){l=Math.min(e.width/n.width,e.height/n.height);let f=this._svg.createSVGMatrix().scale(l).translate(-n.x,-n.y);su(t,f);});else return a=this._rootElement?this.getActiveLayer():null,i=a&&a.getBBox()||{},r=su(t),o=r?r.matrix:PN(),l=Lv(o.a,1e3),p=Lv(-o.e||0,1e3),d=Lv(-o.f||0,1e3),n=this._cachedViewbox={x:p?p/l:0,y:d?d/l:0,width:e.width/l,height:e.height/l,scale:l,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:e},n;return n;};Tn.prototype.scroll=function(n){let t=this._viewport,e=t.getCTM();return n&&this._changeViewbox(function(){n=me({dx:0,dy:0},n||{}),e=this._svg.createSVGMatrix().translate(n.dx,n.dy).multiply(e),GN(t,e);}),{x:e.e,y:e.f};};Tn.prototype.scrollToElement=function(n,t){let e=100,i=this._resolveElements(n);if(!i.length)return;let o=this.findRoot(i);if(!o)return;o!==this.getRootElement()&&this.setRootElement(o);let a=i.filter(w=>w!=o);if(!a.length)return;t||(t={}),typeof t=="number"&&(e=t),t={top:t.top||e,right:t.right||e,bottom:t.bottom||e,left:t.left||e};let r=Pi(a),l=Ot(r),p=this.viewbox(),d=this.zoom(),f,h;p.y+=t.top/d,p.x+=t.left/d,p.width-=(t.right+t.left)/d,p.height-=(t.bottom+t.top)/d;let g=Ot(p);if(!(r.width<p.width&&r.height<p.height))f=r.x-p.x,h=r.y-p.y;else{let w=Math.max(0,l.right-g.right),T=Math.min(0,l.left-g.left),O=Math.max(0,l.bottom-g.bottom),V=Math.min(0,l.to
595p-g.top);f=w||T,h=O||V;}this.scroll({dx:-f*d,dy:-h*d});};Tn.prototype.zoom=function(n,t){if(!n)return this.viewbox(n).scale;if(n==="fit-viewport")return this._fitViewport(t);let e,i;return this._changeViewbox(function(){typeof t!="object"&&(e=this.viewbox().outer,t={x:e.width/2,y:e.height/2}),i=this._setZoom(n,t);}),Lv(i.a,1e3);};function GN(n,t){let e="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";n.setAttribute("transform",e);}Tn.prototype._fitViewport=function(n){let t=this.viewbox(),e=t.outer,i=t.inner,o,a;return i.x>=0&&i.y>=0&&i.x+i.width<=e.width&&i.y+i.height<=e.height&&!n?a={x:0,y:0,width:Math.max(i.width+i.x,e.width),height:Math.max(i.height+i.y,e.height)}:(o=Math.min(1,e.width/i.width,e.height/i.height),a={x:i.x+(n?i.width/2-e.width/o/2:0),y:i.y+(n?i.height/2-e.height/o/2:0),width:e.width/o,height:e.height/o}),this.viewbox(a),this.viewbox(!1).scale;};Tn.prototype._setZoom=function(n,t){let e=this._svg,i=this._viewport,o=e.createSVGMatrix(),a=e.createSVGPoint(),r,l,p,d,f;p=i.getCTM();let h=p.a;return t?(r=me(a,t),l=r.matrixTransform(p.inverse()),d=o.translate(l.x,l.y).scale(1/h*n).translate(-l.x,-l.y),f=p.multiply(d)):f=o.scale(n),GN(this._viewport,f),f;};Tn.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight};};Tn.prototype.getAbsoluteBBox=function(n){let t=this.viewbox(),e;n.waypoints?e=this.getGraphics(n).getBBox():e=n;let i=e.x*t.scale-t.x*t.scale,o=e.y*t.scale-t.y*t.scale,a=e.width*t.scale,r=e.height*t.scale;return{x:i,y:o,width:a,height:r};};Tn.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized");};var ch="data-element-id";function vs(n){this._elements={},this._eventBus=n;}vs.$inject=["eventBus"];vs.prototype.add=function(n,t,e){var i=n.id;this._validateId(i),lt(t,ch,i),e&<(e,ch,i),this._elements[i]={element:n,gfx:t,secondaryGfx:e};};vs.prototype.remove=function(n){var t=this._elements,e=n.id||n,i=e&&t[e];i&&(lt(i.gfx,ch,""),i.secondaryGfx&<(i.secondaryGfx,ch,""),delete t[e]);};vs.prototype.updateId=function(n,t){this._validateId(t),typeof n=="string"&&(n=this.get(n)),this._eventBus.fire("element.updateId",{element:n,newId:t});var e=this.getGraphics(n),i=this.getGraphics(n,!0);this.remove(n),n.id=t,this.add(n,e,i);};vs.prototype.updateGraphics=function(n,t,e){var i=n.id||n,o=this._elements[i];return e?o.secondaryGfx=t:o.gfx=t,t&<(t,ch,i),t;};vs.prototype.get=function(n){var t;typeof n=="string"?t=n:t=n&<(n,ch);var e=this._elements[t];return e&&e.element;};vs.prototype.filter=function(n){var t=[];return this.forEach(function(e,i){n(e,i)&&t.push(e);}),t;};vs.prototype.find=function(n){for(var t=this._elements,e=Object.keys(t),i=0;i<e.length;i++){var o=e[i],a=t[o],r=a.element,l=a.gfx;if(n(r,l))return r;}};vs.prototype.getAll=function(){return this.filter(function(n){return n;});};vs.prototype.forEach=function(n){var t=this._elements;Object.keys(t).forEach(function(e){var i=t[e],o=i.element,a=i.gfx;return n(o,a);});};vs.prototype.getGraphics=function(n,t){var e=n.id||n,i=this._elements[e];return i&&(t?i.secondaryGfx:i.gfx);};vs.prototype._validateId=function(n){if(!n)throw new Error("element must have an id");if(this._elements[n])throw new Error("element with id "+n+" already added");};function koe(n,t,e,i){var o=e.inverse;return Object.defineProperty(n,"remove",{value:function(a){var r=this.indexOf(a);return r!==-1&&(this.splice(r,1),t.unset(a,o,i)),a;}}),Object.defineProperty(n,"contains",{value:function(a){return this.indexOf(a)!==-1;}}),Object.defineProperty(n,"add",{value:function(a,r){var l=this.indexOf(a);if(typeof r>"u"){if(l!==-1)return;r=this.length;}l!==-1&&this.splice(l,1),this.splice(r,0,a),l===-1&&t.set(a,o,i);}}),Object.defineProperty(n,"__refs_collection",{value:!0}),n;}function Roe(n){return n.__refs_collection===!0;}function Noe(n,t){return Object.prototype.hasOwnProperty.call(n,t.name||t);}function qN(n,t,e){var i=koe(e[t.name]||[],n,t,e);Object.defineProperty(e,t.name,{enumerable:t.enumerable,value:i}),i.length&&i.forEach(function(o){n.set(o,t.inverse,e);});}function Aoe(n,t,e){var i=t.inverse,o=e[t.name];Object.defineProperty(e,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return o;}
595,set:function(a){if(a!==o){var r=o;o=null,r&&n.unset(r,i,e),o=a,n.set(o,i,e);}}});}function Qs(n,t){if(!(this instanceof Qs))return new Qs(n,t);n.inverse=t,t.inverse=n,this.props={},this.props[n.name]=n,this.props[t.name]=t;}Qs.prototype.bind=function(n,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t];}t.collection?qN(this,t,n):Aoe(this,t,n);};Qs.prototype.ensureRefsCollection=function(n,t){var e=n[t.name];return Roe(e)||qN(this,t,n),e;};Qs.prototype.ensureBound=function(n,t){Noe(n,t)||this.bind(n,t);};Qs.prototype.unset=function(n,t,e){n&&(this.ensureBound(n,t),t.collection?this.ensureRefsCollection(n,t).remove(e):n[t.name]=void 0);};Qs.prototype.set=function(n,t,e){n&&(this.ensureBound(n,t),t.collection?this.ensureRefsCollection(n,t).add(e):n[t.name]=e);};var EM=new Qs({name:"children",enumerable:!0,collection:!0},{name:"parent"}),HN=new Qs({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),JN=new Qs({name:"attachers",collection:!0},{name:"host"}),UN=new Qs({name:"outgoing",collection:!0}
595,{name:"source"}),WN=new Qs({name:"incoming",collection:!0},{name:"target"});function ph(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0];},set:function(n){var t=this.label,e=this.labels;!n&&t?e.remove(t):e.add(n,0);}}),EM.bind(this,"parent"),HN.bind(this,"labels"),UN.bind(this,"outgoing"),WN.bind(this,"incoming");}function V0(){ph.call(this),EM.bind(this,"children"),JN.bind(this,"host"),JN.bind(this,"attachers");}Fe(V0,ph);function XN(){ph.call(this),EM.bind(this,"children");}Fe(XN,V0);function YN(){V0.call(this),HN.bind(this,"labelTarget");}Fe(YN,V0);function KN(){ph.call(this),UN.bind(this,"source"),WN.bind(this,"target");}Fe(KN,ph);var Doe={connection:KN,shape:V0,label:YN,root:XN};function ZN(n,t){var e=Doe[n];if(!e)throw new Error("unknown type: <"+n+">");return me(new e(),t);}function QN(n){return n instanceof ph;}function $l(){this._uid=12;}$l.prototype.createRoot=function(n){return this.create("root",n);};$l.prototype.createLabel=function(n){return this.create("label",n);};$l.prototype.createShape=function(n){return this.create("shape",n);};$l.prototype.createConnection=function(n){return this.create("connection",n);};$l.prototype.create=function(n,t){return t=me({},t||{}),t.id||(t.id=n+"_"+this._uid++),ZN(n,t);};var zv="__fn",e4=1e3,joe=Array.prototype.slice;function is(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this);}is.prototype.on=function(n,t,e,i){if(n=gt(n)?n:[n],qo(t)&&(i=e,e=t,t=e4),!nn(t))throw new Error("priority must be a number");var o=e;i&&(o=Ra(e,i),o[zv]=e[zv]||e);var a=this;n.forEach(function(r){a._addListener(r,{priority:t,callback:o,next:null});});};is.prototype.once=function(n,t,e,i){var o=this;if(qo(t)&&(i=e,e=t,t=e4),!nn(t))throw new Error("priority must be a number");function a(){a.__isTomb=!0;var r=e.apply(i,arguments);return o.off(n,a),r;}a[zv]=e,this.on(n,t,a);};is.prototype.off=function(n,t){n=gt(n)?n:[n];var e=this;n.forEach(function(i){e._removeListener(i,t);});};is.prototype.createEvent=function(n){var t=new G0();return t.init(n),t;};is.prototype.fire=function(n,t){var e,i,o,a;if(a=joe.call(arguments),typeof n=="object"&&(t=n,n=t.type),!n)throw new Error("no event type specified");if(i=this._listeners[n],!!i){t instanceof G0?e=t:e=this.createEvent(t),a[0]=e;var r=e.type;n!==r&&(e.type=n);try{o=this._invokeListeners(e,a,i);}finally{n!==r&&(e.type=r);}return o===void 0&&e.defaultPrevented&&(o=!1),o;}};is.prototype.handleError=function(n){return this.fire("error",{error:n})===!1;};is.prototype._destroy=function(){this._listeners={};};is.prototype._invokeListeners=function(n,t,e){for(var i;e&&!n.cancelBubble;)i=this._invokeListener(n,t,e),e=e.next;return i;};is.prototype._invokeListener=function(n,t,e){var i;if(e.callback.__isTomb)return i;try{i=Loe(e.callback,t),i!==void 0&&(n.returnValue=i,n.stopPropagation()),i===!1&&n.preventDefault();}catch(o){if(!this.handleError(o))throw console.error("unhandled error in event listener",o),o;}return i;};is.prototype._addListener=function(n,t){var e=this._getListeners(n),i;if(!e){this._setListeners(n,t);return;}for(;e;){if(e.priority<t.priority){t.next=e,i?i.next=t:this._setListeners(n,t);return;}i=e,e=e.next;}i.next=t;};is.prototype._getListeners=function(n){return this._listeners[n];};is.prototype._setListeners=function(n,t){this._listeners[n]=t;};is.prototype._removeListener=function(n,t){var e=this._getListeners(n),i,o,a;if(!t){this._setListeners(n,null);return;}for(;e;)i=e.next,a=e.callback,(a===t||a[zv]===t)&&(o?o.next=i:this._setListeners(n,i)),o=e,e=i;};function G0(){}G0.prototype.stopPropagation=function(){this.cancelBubble=!0;};G0.prototype.preventDefault=function(){this.defaultPrevented=!0;};G0.prototype.init=function(n){me(this,n||{});};function Loe(n,t){return n.apply(null,t);}function _c(n){return n.childNodes[0];}function t4(n){return n.parentNode.childNodes[1];}function dh(n,t,e,i,o){var a=rh();a.setTranslate(t,e);var r=rh();r.setRotate(i||0,0,0);var l=rh();l.setScale(o||1,o||1),su(n,[a,r,l]);}function Ao(n,t,e){var i=rh();i.setTranslate(t,e),su(n,i);}function Fv(n,t){var e=rh();e.setRotate(t,0,0),su(n,e);}function bs(n,t){this._eventBus=n,this._elementRegistry=t;}bs.$inject=["eventBus","elementRegistry"];bs.prototype._getChildrenContainer=function(n){var t=this._elementRegistry.getGraphics(n),e;return n.parent?(e=t4(t),e||(e=xt("g"),En(e).add("djs-children"),Kt(t.parentNode,e))):e=t,e;};bs.prototype._clear=function(n){var t=_c(n);return Jd(t),t;};bs.prototype._createContainer=function(n,t,e,i){var o=xt("g");En(o).add("djs-group"),typeof e<"u"?zoe(o,t,t.childNodes[e]):Kt(t,o);var a=xt("g");En(a).add("djs-element"),En(a).add("djs-"+n),i&&En(a).add("djs-frame"),Kt(o,a);var r=xt("g");return En(r).add("djs-visual"),Kt(a,r),a;};bs.prototype.create=function(n,t,e){var i=this._getChildrenContainer(t.parent);return this._createContainer(n,i,e,Nv(t));};bs.prototype.updateContainments=function(n){var t=this,e=this._elementRegistry,i;i=_a(n,function(o,a){return a.parent&&(o[a.parent.id]=a.parent),o;},{}),ne(i,function(o){var a=o.children;if(a){var r=t._getChildrenContainer(o),l=r.firstChild;ne(a,function(p){var d=e.getGraphics(p).parentNode;
595d===l?l=l.nextSibling:r.insertBefore(d,l);});}});};bs.prototype.drawShape=function(n,t,e={}){var i=this._eventBus;return i.fire("render.shape",{gfx:n,element:t,attrs:e});};bs.prototype.getShapePath=function(n){var t=this._eventBus;return t.fire("render.getShapePath",n);};bs.prototype.drawConnection=function(n,t,e={}){var i=this._eventBus;return i.fire("render.connection",{gfx:n,element:t,attrs:e});};bs.prototype.getConnectionPath=function(n){var t=this._eventBus;return t.fire("render.getConnectionPath",n);};bs.prototype.update=function(n,t,e){if(t.parent){var i=this._clear(e);if(n==="shape")this.drawShape(i,t),Ao(e,t.x,t.y);else if(n==="connection")this.drawConnection(i,t);else throw new Error("unknown type: "+n);t.hidden?lt(e,"display","none"):lt(e,"display","block");}};bs.prototype.remove=function(n){var t=this._elementRegistry.getGraphics(n);Hi(t.parentNode);};function zoe(n,t,e){var i=e||t.firstChild;n!==i&&t.insertBefore(n,i);}var n4={__depends__:[MN],__init__:["canvas"],canvas:["type",Tn],elementRegistry:["type",vs],elementFactory:["type",$l],eventBus:["type",is],graphicsFactory:["type",bs]};function Foe(n){var t=new bM(n);return t.init(),t;}function Boe(n){n=n||{};var t={config:["value",n]},e=[t,n4].concat(n.modules||[]);return Foe(e);}function Hc(n,t){this._injector=t||Boe(n),this.get("eventBus").fire("diagram.init");}Hc.prototype.get=function(n,t){return this._injector.get(n,t);};Hc.prototype.invoke=function(n,t,e){return this._injector.invoke(n,t,e);};Hc.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy");};Hc.prototype.clear=function(){this.get("eventBus").fire("diagram.clear");};function kM(){}kM.prototype.get=function(n){return this.$model.properties.get(this,n);};kM.prototype.set=function(n,t){this.$model.properties.set(this,n,t);};function o4(n,t){this.model=n,this.properties=t;}o4.prototype.createType=function(n){var t=this.model,e=this.properties,i=Object.create(kM.prototype);ne(n.properties,function(r){!r.isMany&&r.default!==void 0&&(i[r.name]=r.default);}),e.defineModel(i,t),e.defineDescriptor(i,n);var o=n.ns.name;function a(r){e.define(this,"$type",{value:o,enumerable:!0}),e.define(this,"$attrs",{value:{}}),e.define(this,"$parent",{writable:!0}),ne(r,Ra(function(l,p){this.set(p,l);},this));}return a.prototype=i,a.hasType=i.$instanceOf=this.model.hasType,e.defineModel(a,t),e.defineDescriptor(a,n),a;};var $oe=me(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),a4=me(Object.create(null),{String:function(n){return n;},Boolean:function(n){return n==="true";},Integer:function(n){return parseInt(n,10);},Real:function(n){return parseFloat(n);}});function Bv(n,t){var e=a4[n];return e?e(t):t;}function TM(n){return!!$oe[n];}function RM(n){return!!a4[n];}function Pr(n,t){var e=n.split(/:/),i,o;if(e.length===1)i=n,o=t;else if(e.length===2)i=e[1],o=e[0];else throw new Error("expected <prefix:localName> or <localName>, got "+n);return n=(o?o+":":"")+i,{name:n,prefix:o,localName:i};}function el(n){this.ns=n,this.name=n.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null);}el.prototype.build=function(){return Za(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"]);};el.prototype.addProperty=function(n,t,e){typeof t=="boolean"&&(e=t,t=void 0),this.addNamedProperty(n,e!==!1);var i=this.properties;t!==void 0?i.splice(t,0,n):i.push(n);};el.prototype.replaceProperty=function(n,t,e){var i=n.ns,o=this.properties,a=this.propertiesByName,r=n.name!==t.name;if(n.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+n.ns.name+">");this.setIdProperty(t,!1);}if(n.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+n.ns.name+">");this.setBodyProperty(t,!1);}var l=o.indexOf(n);if(l===-1)throw new Error("property <"+i.name+"> not found in property list");o.splice(l,1),this.addProperty(t,e?void 0:l,r),a[i.name]=a[i.localName]=t;};el.prototype.redefineProperty=function(n,t,e){var i=n.ns.prefix,o=t.split("#"),a=Pr(o[0],i),r=Pr(o[1],a.prefix).name,l=this.propertiesByName[r];if(l)this.replaceProperty(l,n,e);else throw new Error("refined property <"+r+"> not found");delete n.redefines;};el.prototype.addNamedProperty=function(n,t){var e=n.ns,i=this.propertiesByName;t&&(this.assertNotDefined(n,e.name),this.assertNotDefined(n,e.localName)),i[e.name]=i[e.localName]=n;};el.prototype.removeNamedProperty=function(n){var t=n.ns,e=this.propertiesByName;delete e[t.name],delete e[t.localName];};el.prototype.setBodyProperty=function(n,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+n.ns.name+">)");this.bodyProperty=n;};
595el.prototype.setIdProperty=function(n,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+n.ns.name+">)");this.idProperty=n;};el.prototype.assertNotTrait=function(n){if((n.extends||[]).length)throw new Error(`cannot create <${n.name}> extending <${n.extends}>`);};el.prototype.assertNotDefined=function(n,t){var e=n.name,i=this.propertiesByName[e];if(i)throw new Error("property <"+e+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+n.definedBy.ns.name+"#"+n.ns.name+"> not allowed without redefines");};el.prototype.hasProperty=function(n){return this.propertiesByName[n];};el.prototype.addTrait=function(n,t){t&&this.assertNotTrait(n);var e=this.allTypesByName,i=this.allTypes,o=n.name;o in e||(ne(n.properties,Ra(function(a){a=me({},a,{name:a.ns.localName,inherited:t}),Object.defineProperty(a,"definedBy",{value:n});var r=a.replaces,l=a.redefines;r||l?this.redefineProperty(a,r||l,r):(a.isBody&&this.setBodyProperty(a),a.isId&&this.setIdProperty(a),this.addProperty(a));},this)),i.push(n),e[o]=n);};function Qd(n,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,ne(n,Ra(this.registerPackage,this));}Qd.prototype.getPackage=function(n){return this.packageMap[n];};Qd.prototype.getPackages=function(){return this.packages;};Qd.prototype.registerPackage=function(n){n=me({},n);var t=this.packageMap;i4(t,n,"prefix"),i4(t,n,"uri"),ne(n.types,Ra(function(e){this.registerType(e,n);},this)),t[n.uri]=t[n.prefix]=n,this.packages.push(n);};Qd.prototype.registerType=function(n,t){n=me({},n,{superClass:(n.superClass||[]).slice(),extends:(n.extends||[]).slice(),properties:(n.properties||[]).slice(),meta:me({},n.meta||{})});var e=Pr(n.name,t.prefix),i=e.name,o=Object.create(null);ne(n.properties,Ra(function(a){var r=Pr(a.name,e.prefix),l=r.name;TM(a.type)||(a.type=Pr(a.type,r.prefix).name),me(a,{ns:r,name:l}),o[l]=a;},this)),me(n,{ns:e,name:i,propertiesByName:o}),ne(n.extends,Ra(function(a){var r=Pr(a,e.prefix),l=this.typeMap[r.name];l.traits=l.traits||[],l.traits.push(i);},this)),this.definePackage(n,t),this.typeMap[i]=n;};Qd.prototype.mapTypes=function(n,t,e){var i=TM(n.name)?{name:n.name}:this.typeMap[n.name],o=this;function a(p,d){var f=Pr(p,TM(p)?"":n.prefix);o.mapTypes(f,t,d);}function r(p){return a(p,!0);}function l(p){return a(p,!1);}if(!i)throw new Error("unknown type <"+n.name+">");ne(i.superClass,e?r:l),t(i,!e),ne(i.traits,r);};Qd.prototype.getEffectiveDescriptor=function(n){var t=Pr(n),e=new el(t);this.mapTypes(t,function(o,a){e.addTrait(o,a);});var i=e.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i;};Qd.prototype.definePackage=function(n,t){this.properties.define(n,"$pkg",{value:t});};function i4(n,t,e){var i=t[e];if(i in n)throw new Error("package with "+e+" <"+i+"> already defined");}function cu(n){this.model=n;}cu.prototype.set=function(n,t,e){if(!ka(t)||!t.length)throw new TypeError("property name must be a non-empty string");var i=this.getProperty(n,t),o=i&&i.name;Voe(e)?i?delete n[o]:delete n.$attrs[IM(t)]:i?o in n?n[o]=e:r4(n,i,e):n.$attrs[IM(t)]=e;};cu.prototype.get=function(n,t){var e=this.getProperty(n,t);if(!e)return n.$attrs[IM(t)];var i=e.name;return!n[i]&&e.isMany&&r4(n,e,[]),n[i];};cu.prototype.define=function(n,t,e){if(!e.writable){var i=e.value;e=me({},e,{get:function(){return i;}}),delete e.value;}Object.defineProperty(n,t,e);};cu.prototype.defineDescriptor=function(n,t){this.define(n,"$descriptor",{value:t});};cu.prototype.defineModel=function(n,t){this.define(n,"$model",{value:t});};cu.prototype.getProperty=function(n,t){var e=this.model,i=e.getPropertyDescriptor(n,t);if(i)return i;if(t.includes(":"))return null;let o=e.config.strict;if(typeof o<"u"){let a=new TypeError(`unknown property <${t}> on <${n.$type}>`);if(o)throw a;typeof console<"u"&&console.warn(a);}return null;};function Voe(n){return typeof n>"u";}function r4(n,t,e){Object.defineProperty(n,t.name,{enumerable:!t.isReference,writable:!0,value:e,configurable:!0});}function IM(n){return n.replace(/^:/,"");}function Vs(n,t={}){this.properties=new cu(this),this.factory=new o4(this,this.properties),this.registry=new Qd(n,this.properties),this.typeCache=Object.create(null),this.config=t;}Vs.prototype.create=function(n,t){var e=this.getType(n);if(!e)throw new Error("unknown type <"+n+">");return new e(t);};
595Vs.prototype.getType=function(n){var t=this.typeCache,e=ka(n)?n:n.ns.name,i=t[e];return i||(n=this.registry.getEffectiveDescriptor(e),i=t[e]=this.factory.createType(n)),i;};Vs.prototype.createAny=function(n,t,e){var i=Pr(n),o={$type:n,$instanceOf:function(r){return r===this.$type;},get:function(r){return this[r];},set:function(r,l){mN(this,[r],l);}},a={name:n,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};return this.properties.defineDescriptor(o,a),this.properties.defineModel(o,this),this.properties.define(o,"get",{enumerable:!1,writable:!0}),this.properties.define(o,"set",{enumerable:!1,writable:!0}),this.properties.define(o,"$parent",{enumerable:!1,writable:!0}),this.properties.define(o,"$instanceOf",{enumerable:!1,writable:!0}),ne(e,function(r,l){eo(r)&&r.value!==void 0?o[r.name]=r.value:o[l]=r;}),o;};Vs.prototype.getPackage=function(n){return this.registry.getPackage(n);};Vs.prototype.getPackages=function(){return this.registry.getPackages();};Vs.prototype.getElementDescriptor=function(n){return n.$descriptor;};Vs.prototype.hasType=function(n,t){t===void 0&&(t=n,n=this);var e=n.$model.getElementDescriptor(n);return t in e.allTypesByName;};Vs.prototype.getPropertyDescriptor=function(n,t){return this.getElementDescriptor(n).propertiesByName[t];};Vs.prototype.getTypeDescriptor=function(n){return this.registry.typeMap[n];};var s4=String.fromCharCode,Goe=Object.prototype.hasOwnProperty,qoe=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,q0={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(q0).forEach(function(n){q0[n.toUpperCase()]=q0[n];});function Joe(n,t,e,i){return i?Goe.call(q0,i)?q0[i]:"&"+i+";":s4(t||parseInt(e,16));}function pu(n){return n.length>3&&n.indexOf("&")!==-1?n.replace(qoe,Joe):n;}var l4="non-whitespace outside of root node";function em(n){return new Error(n);}function Hoe(n){return"missing namespace for prefix <"+n+">";}function $v(n){return{get:n,enumerable:!0};}function Uoe(n){var t=Object.create(null),e;for(e in n)t[e]=n[e];return t;}var c4=Symbol("nameCache");function NM(n){return n+"$uri";}function Woe(n){var t=Object.create(null),e,i;for(e in n)i=n[e],t[i]=i,t[NM(i)]=e;return t;}function Vv(){return{line:0,column:0};}function Xoe(n){throw n;}function AM(n){if(!this)return new AM(n);var t=n&&n.proxy,e,i,o,a,r=Xoe,l,p,d,f,h=Vv,g=!1,b=!1,w="",T=!1,O=!1,V=null,j=!1,L,A,J,Q;function te(Y){Y instanceof Error||(Y=em(Y)),V=Y,r(Y,h);}function U(Y){l&&(Y instanceof Error||(Y=em(Y)),l(Y,h));}this.on=function(Y,se){if(typeof se!="function")throw em("required args <name, cb>");switch(Y){case"openTag":i=se;break;case"text":e=se;break;case"closeTag":o=se;break;case"error":r=se;break;case"warn":l=se;break;case"cdata":a=se;break;case"attention":f=se;break;case"question":d=se;break;case"comment":p=se;break;default:throw em("unsupported event: "+Y);}return this;},this.ns=function(Y){if(typeof Y>"u"&&(Y={}),typeof Y!="object")throw em("required args <nsMap={}>");var se=Object.create(null),de;for(de in Y)se[de]=Y[de];return O=!0,Q=se,this;};function ce(){L=O?[]:null,A=O?Woe(Q):null,J=[],h=Vv,j=!1,V=null,b=!1,w="";}this.parse=function(Y){if(typeof Y!="string")throw em("required args <xml=string>");if(g)throw em("parse during stream; call end() first");return ce(),W(Y),h=Vv,j=!1,V;},this.write=function(Y){if(typeof Y!="string")throw em("required args <xml=string>");return g||(ce(),g=!0),V||(w=W(w+Y,!0)||""),this;},this.end=function(){return g||ce(),g=!1,V||W(w),w="",h=Vv,j=!1,V;},this.stop=function(){j=!0;};function W(Y,se=!1){var de=null,Ae=null,rt,et=0,pt=!1,ft=!1,je=0,ke=0,Ke,ve,Se,Be,Ze,kt,Z,D,F,fe="",he=0,xe;function nt(Pe,Oe){var ct=Pe.indexOf(":");if(ct===-1)return Pe;var ht=A[Pe.substring(0,ct)];return ht?Oe===ht?Pe.substr(ct+1):ht+Pe.substr(ct):(U(Hoe(Pe.substring(0,ct))),null);}function Je(){if(xe!==null)return xe;var Pe,Oe,ct=O&&A.xmlns,ht=O&&T?[]:null,qt=he,zt=fe,rn=zt.length,ni,Vn,pi,di,Kn,Ai={},$i=new Set(),mi,sn,Pn;e:for(;qt<rn;qt++)if(mi=!1,sn=zt.charCodeAt(qt),!(sn===32||sn<14&&sn>8)){for((sn<65||sn>122||sn>90&&sn<97)&&sn!==95&&sn!==58&&(U("illegal first char attribute name"),mi=!0),Pn=qt+1;Pn<rn;Pn++)if(sn=zt.charCodeAt(Pn),!(sn>96&&sn<123||sn>64&&sn<91||sn>
59547&&sn<59||sn===46||sn===45||sn===95)){if(sn===32||sn<14&&sn>8){U("missing attribute value"),qt=Pn;continue e;}if(sn===61)break;U("illegal attribute name char"),mi=!0;}if(Kn=zt.substring(qt,Pn),Kn==="xmlns:xmlns"&&(U("illegal declaration of xmlns"),mi=!0),sn=zt.charCodeAt(Pn+1),sn===34)Pn=zt.indexOf('"',qt=Pn+2),Pn===-1&&(Pn=zt.indexOf("'",qt),Pn!==-1&&(U("attribute value quote missmatch"),mi=!0));else if(sn===39)Pn=zt.indexOf("'",qt=Pn+2),Pn===-1&&(Pn=zt.indexOf('"',qt),Pn!==-1&&(U("attribute value quote missmatch"),mi=!0));else for(U("missing attribute value quotes"),mi=!0,Pn=Pn+1;Pn<rn&&(sn=zt.charCodeAt(Pn+1),!(sn===32||sn<14&&sn>8));Pn++);for(Pn===-1&&(U("missing closing quotes"),Pn=rn,mi=!0),mi||(pi=zt.substring(qt,Pn)),qt=Pn;Pn+1<rn&&(sn=zt.charCodeAt(Pn+1),!(sn===32||sn<14&&sn>8));Pn++)qt===Pn&&(U("illegal character after attribute end"),mi=!0);if(qt=Pn+1,mi)continue e;if($i.has(Kn)){U("attribute <"+Kn+"> already defined");continue;}if($i.add(Kn),!O){Ai[Kn]=pi;continue;}if(T){if(Vn=Kn==="xmlns"?"xmlns":Kn.charCodeAt(0)===120&&Kn.substr(0,6)==="xmlns:"?Kn.substr(6):null,Vn!==null){if(Pe=pu(pi),Oe=NM(Vn),di=Q[Pe],!di){if(Vn==="xmlns"||Oe in A&&A[Oe]!==Pe)do di="ns"+et++;while(typeof A[di]<"u");else di=Vn;Q[Pe]=di;}A[Vn]!==di&&(ni||(A=Uoe(A),ni=!0),A[Vn]=di,Vn==="xmlns"&&(A[NM(di)]=Pe,ct=di),A[Oe]=Pe),Ai[Kn]=pi;continue;}ht.push(Kn,pi);continue;}Kn=nt(Kn,ct),Kn!==null&&(Ai[Kn]=pi);}if(T)for(qt=0,rn=ht.length;qt<rn;qt++)Kn=nt(ht[qt++],ct),pi=ht[qt],Kn!==null&&(Ai[Kn]=pi);return xe=Ai;}function Ge(){for(var Pe=/(\r\n|\r|\n)/g,Oe=0,ct=0,ht=0,qt=ke,zt,rn;je>=ht&&(zt=Pe.exec(Y),!(!zt||(qt=zt[0].length+zt.index,qt>je)));)Oe+=1,ht=qt;return je==-1?(ct=qt,rn=Y.substring(ke)):ke===0?rn=Y.substring(ke,je):(ct=je-ht,rn=ke==-1?Y.substring(je):Y.substring(je,ke+1)),{data:rn,line:Oe,column:ct};}for(h=Ge,t&&(F=Object.create({},{name:$v(function(){return Z;}),originalName:$v(function(){return D;}),attrs:$v(Je),ns:$v(function(){return A;})}));ke!==-1;){if(Y.charCodeAt(ke)===60?je=ke:je=Y.indexOf("<",ke),je===-1){if(se)return Y.substring(ke);if(J.length)return te("unexpected end of file");if(!b)return te("missing start tag");ke<Y.length&&Y.substring(ke).trim()&&U(l4);return;}if(b||(b=!0),ke!==je){if(J.length){if(e&&(e(Y.substring(ke,je),pu,h),j))return;}else if(Y.substring(ke,je).trim()&&(U(l4),j))return;}if(Be=Y.charCodeAt(je+1),Be===33){if(Se=Y.charCodeAt(je+2),Se===91&&Y.substr(je+3,6)==="CDATA["){if(ke=Y.indexOf("]]>",je),ke===-1)return se?Y.substring(je):te("unclosed cdata");if(a&&(a(Y.substring(je+9,ke),h),j))return;ke+=3;continue;}if(Se===45&&Y.charCodeAt(je+3)===45){if(ke=Y.indexOf("-->",je),ke===-1)return se?Y.substring(je):te("unclosed comment");
595if(p&&(p(Y.substring(je+4,ke),pu,h),j))return;ke+=3;continue;}}if(Be===63){if(ke=Y.indexOf("?>",je),ke===-1)return se?Y.substring(je):te("unclosed question");if(d&&(d(Y.substring(je,ke+2),h),j))return;ke+=2;continue;}for(Ke=je+1;;Ke++){if(Ze=Y.charCodeAt(Ke),isNaN(Ze))return se?Y.substring(je):(ke=-1,te("unclosed tag"));if(Ze===34)Se=Y.indexOf('"',Ke+1),Ke=Se!==-1?Se:Ke;else if(Ze===39)Se=Y.indexOf("'",Ke+1),Ke=Se!==-1?Se:Ke;else if(Ze===62){ke=Ke;break;}}if(Be===33){if(f&&(f(Y.substring(je,ke+1),pu,h),j))return;ke+=1;continue;}if(xe={},Be===47){if(pt=!1,ft=!0,!J.length)return te("missing open tag");if(Ke=Z=J.pop(),Se=je+2+Ke.length,Y.substring(je+2,Se)!==Ke)return te("closing tag mismatch");for(;Se<ke;Se++)if(Be=Y.charCodeAt(Se),!(Be===32||Be>8&&Be<14))return te("close tag");}else{if(Y.charCodeAt(ke-1)===47?(Ke=Z=Y.substring(je+1,ke-1),pt=!0,ft=!0):(Ke=Z=Y.substring(je+1,ke),pt=!0,ft=!1),!(Be>96&&Be<123||Be>64&&Be<91||Be===95||Be===58))return te("illegal first char nodeName");for(Se=1,ve=Ke.length;Se<ve;Se++)if(Be=Ke.charCodeAt(Se),!(Be>96&&Be<123||Be>64&&Be<91||Be>47&&Be<59||Be===45||Be===95||Be==46)){if(Be===32||Be<14&&Be>8){Z=Ke.substring(0,Se),xe=null;break;}return te("invalid nodeName");}ft||J.push(Z);}if(O){rt=A,pt&&(ft||L.push(rt),xe===null&&(T=Ke.indexOf("xmlns",Se)!==-1)&&(he=Se,fe=Ke,Je(),T=!1)),D=Z,Ae!==A&&(de=A[c4],de===void 0&&(de=A[c4]=Object.create(null)),Ae=A);var Ne=de[Z];if(Ne!==void 0)Z=Ne;else{if(Be=Z.indexOf(":"),Be!==-1){if(kt=A[Z.substring(0,Be)],!kt)return te("missing namespace on <"+D+">");Z=Z.substr(Be+1);}else kt=A.xmlns;kt&&(Z=kt+":"+Z),de[D]=Z;}}if(pt&&(he=Se,fe=Ke,i&&(t?i(F,pu,ft,h):i(Z,Je,pu,ft,h),j)))return;if(ft){if(o&&(o(t?F:Z,pu,pt,h),j))return;O&&(pt?A=rt:A=L.pop());}ke+=1;}}}function p4(n){return n.xml&&n.xml.tagAlias==="lowerCase";}var DM={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},d4="property";function m4(n){return n.xml&&n.xml.serialize;}function Yoe(n){let t=m4(n);return t!==d4&&(t||null);}function Koe(n){return n.charAt(0).toUpperCase()+n.slice(1);}function u4(n,t){return p4(t)?n.prefix+":"+Koe(n.localName):n.name;}function Zoe(n,t){var e=n.name,i=n.localName,o=t&&t.xml&&t.xml.typePrefix;return o&&i.indexOf(o)===0?n.prefix+":"+i.slice(o.length):e;}function Qoe(n,t,e){let i=Pr(n,t.xmlns),o=`${t[i.prefix]||i.prefix}:${i.localName}`,a=Pr(o);var r=e.getPackage(a.prefix);return Zoe(a,r);}function tm(n){return new Error(n);}function kp(n){return n.$descriptor;}function eae(n){me(this,n),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t);},this.addElement=function(t){if(!t)throw tm("expected element");var e=this.elementsById,i=kp(t),o=i.idProperty,a;if(o&&(a=t.get(o.name),a)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(a))throw new Error("illegal ID <"+a+">");if(e[a])throw tm("duplicate ID <"+a+">");e[a]=t;}},this.addWarning=function(t){this.warnings.push(t);};}function J0(){}J0.prototype.handleEnd=function(){};J0.prototype.handleText=function(){};J0.prototype.handleNode=function(){};function jM(){}jM.prototype=Object.create(J0.prototype);jM.prototype.handleNode=function(){return this;};function uh(){}uh.prototype=Object.create(J0.prototype);uh.prototype.handleText=function(n){this.body=(this.body||"")+n;};function H0(n,t){this.property=n,this.context=t;}H0.prototype=Object.create(uh.prototype);H0.prototype.handleNode=function(n){if(this.element)throw tm("expected no sub nodes");return this.element=this.createReference(n),this;};H0.prototype.handleEnd=function(){this.element.id=this.body;};H0.prototype.createReference=function(n){return{property:this.property.ns.name,id:""};};function LM(n,t){this.element=t,this.propertyDesc=n;}LM.prototype=Object.create(uh.prototype);LM.prototype.handleEnd=function(){var n=this.body||"",t=this.element,e=this.propertyDesc;n=Bv(e.type,n),e.isMany?t.get(e.name).push(n):t.set(e.name,n);};function Gv(){}Gv.prototype=Object.create(uh.prototype);Gv.prototype.handleNode=function(n){var t=this,e=this.element;return e?t=this.handleChild(n):(e=this.element=this.createElement(n),this.context.addElement(e)),t;};function os(n,t,e){this.model=n,this.type=n.getType(t),this.context=e;}os.prototype=Object.create(Gv.prototype);os.prototype.addReference=function(n){this.context.addReference(n);};os.prototype.handleText=function(n){var t=this.element,e=kp(t),i=e.bodyProperty;if(!i)throw tm("unexpected body text <"+n+">");uh.prototype.handleText.call(this,n);};os.prototype.handleEnd=function(){var n=this.body,t=this.element,e=kp(t),i=e.bodyProperty;i&&n!==void 0&&(n=Bv(i.type,n),t.set(i.name,n));};os.prototype.createElement=function(n){var t=n.attributes,e=this.type,i=kp(e),o=this.context,a=new e({}),r=this.model,l;return ne(t,function(p,d){var f=i.propertiesByName[d],h;f&&f.isReference?f.isMany?(h=p.split(" "),ne(h,function(g){o.addReference({element:a,property:f.ns.name,id:g});})):o.addReference({element:a,property:f.ns.name,id:p}):(f?p=Bv(f.type,p):d==="xmlns"?d=":"+d:(l=Pr(d,i.ns.prefix),r.getPackage(l.prefix)&&o.addWarning({message:"unknown attribute <"+d+">",element:a,property:d,value:p})),a.set(d,p));}),a;};os.prototype.getPropertyForNode=function(n){var t=n.name,e=Pr(t),i=this.type,o=this.model,a=kp(i),r=e.name,l=a.propertiesByName[r];if(l&&!l.isAttr){let d=Yoe(l);if(d){let f=n.attributes[d];if(f){let h=Qoe(f,n.ns,o),g=o.getType(h);return me({},l,{effectiveType:kp(g).name});}}return l;}var p=o.getPackage(e.prefix);if(p){let d=u4(e,p),f=o.getType(d);if(l=$n(a.properties,function(h){return!h.isVirtual&&!h.isReference&&!h.isAttribute&&f.hasType(h.type);}),l)return me({},l,{effectiveType:kp(f).name});}else if(l=$n(a.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element";}),l)return l;throw tm("unrecognized element <"+e.name+">");};os.prototype.toString=function(){return"ElementDescriptor["+kp(this.type).name+"]";};os.prototype.valueHandler=function(n,t){return new LM(n,t);};os.prototype.referenceHandler=function(n){return new H0(n,this.context);};os.prototype.handler=function(n){return n==="Element"?new mh(this.model,n,this.context):new os(this.model,n,this.context);};os.prototype.handleChild=function(n){var t,e,i,o;if(t=this.getPropertyForNode(n),i=this.element,e=t.effectiveType||t.type,RM(e))return this.valueHandler(t,i);t.isReference?o=this.referenceHandler(t).handleNode(n):o=this.handler(e).handleNode(n);var a=o.element;return a!==void 0&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(me(a,{element:i}),this.context.addReference(a)):a.$parent=i),o;};function zM(n,t,e){os.call(this,n,t,e);}zM.prototype=Object.create(os.prototype);zM.prototype.createElement=function(n){var t=n.name,e=Pr(t),i=this.model,o=this.type,a=i.getPackage(e.prefix),r=a&&u4(e,a)||t;if(!o.hasType(r))throw tm("unexpected element <"+n.originalName+">");return os.prototype.createElement.call(this,n);};function mh(n,t,e){this.model=n,this.context=e;}mh.prototype=Object.create(Gv.prototype);mh.prototype.createElement=function(n){var t=n.name,e=Pr(t),i=e.prefix,o=n.ns[i+"$uri"],a=n.attributes;return this.model.createAny(t,o,a);};mh.prototype.handleChild=function(n){var t=new mh(this.model,"Element",this.context).handleNode(n),e=this.element,i=t.element,o;return i!==void 0&&(o=e.$children=e.$children||[],o.push(i),i.$parent=e),t;};mh.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body);};function qv(n){n instanceof Vs&&(n={model:n}),me(this,{lax:!1},n);}qv.prototype.fromXML=function(n,t,e){var i=t.rootHandler;t instanceof os?(i=t,t={}):typeof t=="string"?(i=this.handler(t),t={}):typeof i=="string"&&(i=this.handler(i));var o=this.model,a=this.lax,r=new eae(me({},t,{rootHandler:i})),l=new AM({proxy:!0}),p=tae();i.context=r,p.push(i);function d(J,Q,te){var U=Q(),ce=U.line,W=U.column,Y=U.data;Y.charAt(0)==="<"&&Y.indexOf(" ")!==-1&&(Y=Y.slice(0,Y.indexOf(" "))+">");var se="unparsable content "+(Y?Y+" ":"")+`detected 596 line: `+ce+` 597 column: `+W+` 598 nested error: `+J.message;if(te)return r.addWarning({message:se,error:J}),!0;throw tm(se);}function f(J,Q){return d(J,Q,!0);}function h(){var J=r.elementsById,Q=r.references,te,U;for(te=0;U=Q[te];te++){var ce=U.element,W=J[U.id],Y=kp(ce).propertiesByName[U.property];if(W||r.addWarning({message:"unresolved reference <"+U.id+">",element:U.element,property:U.property,value:U.id}),Y.isMany){var se=ce.get(Y.name),de=se.indexOf(U);de===-1&&(de=se.length),W?se[de]=W:se.splice(de,1);}else ce.set(Y.name,W);}}function g(){p.pop().handleEnd();}var b=/^<\?xml /i,w=/ encoding="([^"]+)"/i,T=/^utf-8$/i;function O(J){if(b.test(J)){var Q=w.exec(J),te=Q&&Q[1];!te||T.test(te)||r.addWarning({message:"unsupported document encoding <"+te+">, falling back to UTF-8"});}}function V(J,Q){var te=p.peek();try{p.push(te.handleNode(J));}catch(U){d(U,Q,a)&&p.push(new jM());}}function j(J,Q){try{p.peek().handleText(J);}catch(te){f(te,Q);}}function L(J,Q){J.trim()&&j(J,Q);}var A=o.getPackages().reduce(function(J,Q){return J[Q.uri]=Q.prefix,J;},Object.entries(DM).reduce(function(J,[Q,te]){return J[te]=Q,J;},o.config&&o.config.nsMap||{}));return l.ns(A).on("openTag",function(J,Q,te,U){var ce=J.attrs||{},W=Object.keys(ce).reduce(function(se,de){var Ae=Q(ce[de]);return se[de]=Ae,se;},{}),Y={name:J.name,originalName:J.originalName,attributes:W,ns:J.ns};V(Y,U);}).on("question",O).on("closeTag",g).on("cdata",j).on("text",function(J,Q,te){L(Q(J),te);}).on("error",d).on("warn",f),new Promise(function(J,Q){var te;try{l.parse(n),h();}catch(se){te=se;}var U=i.element;!te&&!U&&(te=tm("failed to parse document as <"+i.type.$descriptor.name+">"));var ce=r.warnings,W=r.references,Y=r.elementsById;return te?(te.warnings=ce,Q(te)):J({rootElement:U,elementsById:Y,references:W,warnings:ce});});};qv.prototype.handler=function(n){return new zM(this.model,n);};function tae(){var n=[];return Object.defineProperty(n,"peek",{value:function(){return this[this.length-1];}}),n;}var nae=`<?xml version="1.0" encoding="UTF-8"?> 599`,iae=/<|>|'|"|&|\n\r|\n/g,f4=/<|>|&/g;function Vl(n){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=n,this.defaultPrefixMap=n&&n.defaultPrefixMap||{};}Vl.prototype.mapDefaultPrefixes=function(n){this.defaultPrefixMap=n;};Vl.prototype.defaultUriByPrefix=function(n){return this.defaultPrefixMap[n];};Vl.prototype.resolve=function(n){for(var t=this;t;){var e=n(t);if(e)return e;t=t.parent;}};Vl.prototype.eachScope=function(n){for(var t=this;t;)n(t),t=t.parent;};Vl.prototype.byUri=function(n){return this.resolve(function(t){return t.uriMap[n];});};Vl.prototype.add=function(n,t){this.uriMap[n.uri]=n,t?this.wellknown.push(n):this.custom.push(n),this.mapPrefix(n.prefix,n.uri);};Vl.prototype.uriByPrefix=function(n){var t=n||"xmlns";return this.resolve(function(e){return e.prefixMap[t];});};Vl.prototype.mapPrefix=function(n,t){this.prefixMap[n||"xmlns"]=t;};Vl.prototype.getNSKey=function(n){return n.prefix!==void 0?n.uri+"|"+n.prefix:n.uri;};Vl.prototype.logUsed=function(n){var t=n.uri,e=this.getNSKey(n);this.eachScope(function(i){i.used[e]=i.byUri(t);});};Vl.prototype.getUsed=function(n){var t=[].concat(this.wellknown,this.custom);return t.filter(e=>{var i=this.getNSKey(e);return this.used[i];});};function oae(n){return n.charAt(0).toLowerCase()+n.slice(1);}function aae(n,t){return p4(t)?oae(n):n;}function h4(n,t){n.super_=t,n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});}function _4(n){return ka(n)?n:(n.prefix?n.prefix+":":"")+n.localName;}function rae(n){return n.getUsed().filter(function(t){return t.prefix!=="xml";}).map(function(t){var e="xmlns"+(t.prefix?":"+t.prefix:"");return{name:e,value:t.uri};});}function sae(n,t){return t.isGeneric?me({localName:t.ns.localName},n):me({localName:aae(t.ns.localName,t.$pkg)},n);}function lae(n,t){return me({localName:t.ns.localName},n);}function cae(n){var t=n.$descriptor;return Yt(t.properties,function(e){var i=e.name;if(e.isVirtual||!Ka(n,i))return!1;var o=n[i];return o===e.default||o===null?!1:e.isMany?o.length:!0;});}var pae={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},dae={"<":"lt",">":"gt","&":"amp"};function g4(n,t,e){return n=ka(n)?n:""+n,n.replace(t,function(i){return"&"+e[i]+";";});}function mae(n){return g4(n,iae,pae);}function uae(n){return g4(n,f4,dae);}function fae(n){return Yt(n,function(t){return t.isAttr;});}function hae(n){return Yt(n,function(t){return!t.isAttr;});}function FM(n){this.tagName=n;}FM.prototype.build=function(n){return this.element=n,this;};FM.prototype.serializeTo=function(n){n.appendIndent().append("<"+this.tagName+">
599"+this.element.id+"</"+this.tagName+">").appendNewLine();};function du(){}du.prototype.serializeValue=du.prototype.serializeTo=function(n){n.append(this.escape?uae(this.value):this.value);};du.prototype.build=function(n,t){return this.value=t,n.type==="String"&&t.search(f4)!==-1&&(this.escape=!0),this;};function BM(n){this.tagName=n;}h4(BM,du);BM.prototype.serializeTo=function(n){n.appendIndent().append("<"+this.tagName+">"),this.serializeValue(n),n.append("</"+this.tagName+">").appendNewLine();};function Io(n,t){this.body=[],this.attrs=[],this.parent=n,this.propertyDescriptor=t;}Io.prototype.build=function(n){return Cae(this,n),this;};Io.prototype.enter=function(n){this.element=n;var t=n.$descriptor,e=this.propertyDescriptor,i=t.isGeneric;if(i?this.otherAttrs=this.parseGenericNsAttributes(n):this.otherAttrs=this.parseNsAttributes(n),e?this.ns=this.nsPropertyTagName(e):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),i)return this.collectGenericContainments(n);var o=cae(n);return this.parseAttributes(fae(o)),this.collectContainments(hae(o));};Io.prototype.exit=function(){this.parseGenericAttributes(this.element,this.otherAttrs);};Io.prototype.nsTagName=function(n){var t=this.logNamespaceUsed(n.ns);return sae(t,n);};Io.prototype.nsPropertyTagName=function(n){var t=this.logNamespaceUsed(n.ns);return lae(t,n);};Io.prototype.isLocalNs=function(n){return n.uri===this.ns.uri;};Io.prototype.nsAttributeName=function(n){var t;if(ka(n)?t=Pr(n):t=n.ns,n.inherited)return{localName:t.localName};var e=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(e),this.isLocalNs(e)?{localName:t.localName}:me({localName:t.localName},e);};Io.prototype.parseGenericNsAttributes=function(n){return Object.entries(n).filter(([t,e])=>!t.startsWith("$")&&this.parseNsAttribute(n,t,e)).map(([t,e])=>({name:t,value:e}));};Io.prototype.collectGenericContainments=function(n){var t=this,e=[],i=n.$body;i&&e.push({create:function(){return new du().build({type:"String"},i);}});var o=n.$children;return o&&ne(o,function(a){e.push({create:function(){return new Io(t);},element:a});}),e;};Io.prototype.parseNsAttribute=function(n,t,e){var i=n.$model,o=Pr(t),a;if(o.prefix==="xmlns"&&(a={prefix:o.localName,uri:e}),!o.prefix&&o.localName==="xmlns"&&(a={uri:e}),!a)return{name:t,value:e};if(i&&i.getPackage(e))this.logNamespace(a,!0,!0);else{var r=this.logNamespaceUsed(a,!0);this.getNamespaces().logUsed(r);}};Io.prototype.parseNsAttributes=function(n){var t=this,e=n.$attrs,i=[];return ne(e,function(o,a){var r=t.parseNsAttribute(n,a,o);r&&i.push(r);}),i;};Io.prototype.parseGenericAttributes=function(n,t){var e=this;ne(t,function(i){try{e.addAttribute(e.nsAttributeName(i.name),i.value);}catch(o){typeof console<"u"&&console.warn(`missing namespace information for <${i.name}=${i.value}> on`,n,o);}});};Io.prototype.collectContainments=function(n){var t=this,e=this.element,i=[];return ne(n,function(o){var a=e.get(o.name),r=o.isReference,l=o.isMany;if(l||(a=[a]),o.isBody)i.push({create:function(){return new du().build(o,a[0]);}});else if(RM(o.type))ne(a,function(d){i.push({create:function(){return new BM(t.addTagName(t.nsPropertyTagName(o))).build(o,d);}});});else if(r)ne(a,function(d){i.push({create:function(){return new FM(t.addTagName(t.nsPropertyTagName(o))).build(d);}});});else{var p=m4(o);ne(a,function(d){i.push({create:function(){return p?p===d4?new Io(t,o):new Jv(t,o,p):new Io(t);},element:d});});}}),i;};Io.prototype.getNamespaces=function(n){var t=this.namespaces;if(!t){var e=this.getParentNamespaces();n||!e?this.namespaces=t=new Vl(e):t=e;}return t;};Io.prototype.getParentNamespaces=function(){if(this.parentNamespaces!==void 0)return this.parentNamespaces;for(var n=null,t=this.parent;t;){if(t.namespaces){n=t.namespaces;break;}if(t.parentNamespaces!==void 0){n=t.parentNamespaces;break;}t=t.parent;}return this.parentNamespaces=n;};Io.prototype.logNamespace=function(n,t,e){var i=this.getNamespaces(e),o=n.uri,a=n.prefix,r=i.byUri(o);return(!r||e)&&i.add(n,t),i.mapPrefix(a,o),n;};Io.prototype.logNamespaceUsed=function(n,t){var e=this.getNamespaces(t),i=n.prefix,o=n.uri,a,r,l;if(!i&&!o)return{localName:n.localName};if(l=e.defaultUriByPrefix(i),o=o||l||e.uriByPrefix(i),!o)throw new Error("no namespace uri given for prefix <"+i+">");if(n=e.byUri(o),!n&&!i&&(n=this.logNamespace({uri:o},l===o,!0)),!n){for(a=i,r=1;e.uriByPrefix(a);)a=i+"_"+r++;n=this.logNamespace({prefix:a,uri:o},l===o);}return i&&e.mapPrefix(i,o),n;};Io.prototype.parseAttributes=function(n){var t=this,e=this.element;ne(n,function(i){var o=e.get(i.name);if(i.isReference)if(!i.isMany)o=o.id;else{var a=[];
599ne(o,function(r){a.push(r.id);}),o=a.join(" ");}t.addAttribute(t.nsAttributeName(i),o);});};Io.prototype.addTagName=function(n){var t=this.logNamespaceUsed(n);return this.getNamespaces().logUsed(t),_4(n);};Io.prototype.addAttribute=function(n,t){var e=this.attrs;ka(t)&&(t=mae(t));var i=Ov(e,function(a){return a.name.localName===n.localName&&a.name.uri===n.uri&&a.name.prefix===n.prefix;}),o={name:n,value:t};i!==-1?e.splice(i,1,o):e.push(o);};Io.prototype.serializeAttributes=function(n){var t=this.attrs,e=this.namespaces;e&&(t=rae(e).concat(t)),ne(t,function(i){n.append(" ").append(_4(i.name)).append('="').append(i.value).append('"');});};Io.prototype.serializeTo=function(n){_ae(this,n);};function _ae(n,t){for(var e=[{serializer:n,index:0,opened:!1,indent:!1}];e.length;){var i=e[e.length-1],o=i.serializer;if(!i.opened){var a=o.body[0];if(i.indent=a&&a.constructor!==du,t.appendIndent().append("<"+o.tagName),o.serializeAttributes(t),t.append(a?">":" />"),i.opened=!0,!a){t.appendNewLine(),e.pop();continue;}i.indent&&t.appendNewLine().indent();}if(i.index<o.body.length){var r=o.body[i.index++];r instanceof Io?e.push({serializer:r,index:0,opened:!1,indent:!1}):r.serializeTo(t);continue;}i.indent&&t.unindent().appendIndent(),t.append("</"+o.tagName+">").appendNewLine(),e.pop();}}function Jv(n,t,e){Io.call(this,n,t),this.serialization=e;}h4(Jv,Io);Jv.prototype.parseNsAttributes=function(n){var t=Io.prototype.parseNsAttributes.call(this,n).filter(r=>r.name!==this.serialization),e=n.$descriptor;if(e.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(e);this.getNamespaces().logUsed(this.typeNs);var o=n.$model.getPackage(i.uri),a=o.xml&&o.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(this.serialization),(i.prefix?i.prefix+":":"")+a+e.ns.localName),t;};Jv.prototype.isLocalNs=function(n){return n.uri===(this.typeNs||this.ns).uri;};function gae(){this.value="",this.write=function(n){this.value+=n;};}function xae(n,t){var e=[""];this.append=function(i){return n.write(i),this;},this.appendNewLine=function(){return t&&n.write(` 600`),this;},this.appendIndent=function(){return t&&n.write(e.join(" ")),this;},this.indent=function(){return e.push(""),this;},this.unindent=function(){return e.pop(),this;};}function x4(n){n=me({format:!1,preamble:!0},n||{});function t(e,i){var o=i||new gae(),a=new xae(o,n.format);n.preamble&&a.append(nae);var r=new Io(),l=e.$model;if(r.getNamespaces().mapDefaultPrefixes(vae(l)),r.build(e).serializeTo(a),!i)return o.value;}return{toXML:t};}function Cae(n,t){for(var e=[{serializer:n,children:n.enter(t),index:0}];e.length;){var i=e[e.length-1];if(i.index>=i.children.length){i.serializer.exit(),e.pop();continue;}var o=i.children[i.index++],a=o.create();i.serializer.body.push(a),o.element&&e.push({serializer:a,children:a.enter(o.element),index:0});}}function vae(n){let t=n.config&&n.config.nsMap||{},e={};for(let i in DM)e[i]=DM[i];for(let i in t){let o=t[i];e[o]=i;}for(let i of n.getPackages())e[i.prefix]=i.uri;return e;}function Hv(n,t){Vs.call(this,n,t);}Hv.prototype=Object.create(Vs.prototype);Hv.prototype.fromXML=function(n,t,e){ka(t)||(e=t,t="bpmn:Definitions");var i=new qv(me({model:this,lax:!0},e)),o=i.handler(t);return i.fromXML(n,o);};Hv.prototype.toXML=function(n,t){var e=new x4(t);return new Promise(function(i,o){try{var a=e.toXML(n);return i({xml:a});}catch(r){return o(r);}});};var bae="BPMN20",yae="http://www.omg.org/spec/BPMN/20100524/MODEL",Pae="bpmn",wae=[],Sae=
vendor: 27,444 bytes, line 600
600[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],
600Mae=[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],Oae={tagAlias:"lowerCase",typePrefix:"t"},Eae={name:bae,uri:yae,prefix:Pae,associations:wae,types:Sae,enumerations:Mae,xml:Oae},Tae="BPMNDI",Iae="http://www.omg.org/spec/BPMN/20100524/DI",kae="bpmndi",Rae=[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],Nae=[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],Aae=[],Dae={name:Tae,uri:Iae,prefix:kae,types:Rae,enumerations:Nae,associations:Aae},jae="DC",Lae="http://www.omg.org/spec/DD/20100524/DC",zae="dc",Fae=[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],Bae=[],$ae={name:jae,uri:Lae,prefix:zae,types:Fae,associations:Bae},Vae="DI",Gae="http://www.omg.org/spec/DD/20100524/DI",qae="di",Jae=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],Hae=[],Uae={tagAlias:"lowerCase"},Wae={name:Vae,uri:Gae,prefix:qae,types:Jae,associations:Hae,xml:Uae},Xae="bpmn.io colors for BPMN",Yae="http://bpmn.io/schema/bpmn/biocolor/1.0",Kae="bioc",Zae=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],Qae=[],ere=[],tre={name:Xae,uri:Yae,prefix:Kae,types:Zae,enumerations:Qae,associations:ere},nre="BPMN in Color",ire="http://www.omg.org/spec/BPMN/non-normative/color/1.0",ore="color",are=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],rre=[],sre=[],lre={name:nre,uri:ire,prefix:ore,types:are,enumerations:rre,associations:sre}
600,cre={bpmn:Eae,bpmndi:Dae,dc:$ae,di:Wae,bioc:tre,color:lre};function C4(n,t){let e=me({},cre,n);return new Hv(e,t);}function pr(n){return n?"<"+n.$type+(n.id?' id="'+n.id:"")+'" />':"<null>";}function ys(n,t){return n.$instanceOf(t);}function pre(n){return $n(n.rootElements,function(t){return ys(t,"bpmn:Process")||ys(t,"bpmn:Collaboration");});}function $M(n){var t={},e=[],i={};function o(ve,Se){return function(Be){ve(Be,Se);};}function a(ve){t[ve.id]=ve;}function r(ve){return t[ve.id];}function l(ve,Se){var Be=ve.gfx;if(Be)throw new Error(`already rendered ${pr(ve)}`);return n.element(ve,i[ve.id],Se);}function p(ve,Se){return n.root(ve,i[ve.id],Se);}function d(ve,Se){try{var Be=i[ve.id]&&l(ve,Se);return a(ve),Be;}catch(Ze){f(Ze.message,{element:ve,error:Ze}),console.error(`failed to import ${pr(ve)}`,Ze);}}function f(ve,Se){n.error(ve,Se);}var h=this.registerDi=function(Se){var Be=Se.bpmnElement;Be?i[Be.id]?f(`multiple DI elements defined for ${pr(Be)}`,{element:Be}):i[Be.id]=Se:f(`no bpmnElement referenced in ${pr(Se)}`,{element:Se});};function g(ve){b(ve.plane);}function b(ve){h(ve),ne(ve.planeElement,w);}function w(ve){h(ve);}this.handleDefinitions=function(Se,Be){var Ze=Se.diagrams;if(Be&&Ze.indexOf(Be)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!Be&&Ze&&Ze.length&&(Be=Ze[0]),!Be)throw new Error("no diagram to display");i={},g(Be);var kt=Be.plane;if(!kt)throw new Error(`no plane for ${pr(Be)}`);var Z=kt.bpmnElement;if(!Z)if(Z=pre(Se),Z)f(`correcting missing bpmnElement on ${pr(kt)} to ${pr(Z)}`),kt.bpmnElement=Z,h(kt);else throw new Error("no process or collaboration to display");var D=p(Z,kt);if(ys(Z,"bpmn:Process")||ys(Z,"bpmn:SubProcess"))O(Z,D);else if(ys(Z,"bpmn:Collaboration"))ke(Z,D),V(Se.rootElements,D);else throw new Error(`unsupported bpmnElement for ${pr(kt)}: ${pr(Z)}`);T(e);};var T=this.handleDeferred=function(){for(var Se;e.length;)Se=e.shift(),Se();};function O(ve,Se){pt(ve,Se),ce(ve.ioSpecification,Se),U(ve.artifacts,Se),a(ve);}function V(ve,Se){var Be=Yt(ve,function(Ze){return!r(Ze)&&ys(Ze,"bpmn:Process")&&Ze.laneSets;});Be.forEach(o(O,Se));}function j(ve,Se){d(ve,Se);}function L(ve,Se){ne(ve,o(j,Se));}function A(ve,Se){d(ve,Se);}function J(ve,Se){d(ve,Se);}function Q(ve,Se){d(ve,Se);}function te(ve,Se){d(ve,Se);}function U(ve,Se){ne(ve,function(Be){ys(Be,"bpmn:Association")?e.push(function(){te(Be,Se);}):te(Be,Se);});}function ce(ve,Se){ve&&(ne(ve.dataInputs,o(J,Se)),ne(ve.dataOutputs,o(Q,Se)));}var W=this.handleSubProcess=function(Se,Be){pt(Se,Be),U(Se.artifacts,Be);};function Y(ve,Se){var Be=d(ve,Se);ys(ve,"bpmn:SubProcess")&&W(ve,Be||Se),ys(ve,"bpmn:Activity")&&ce(ve.ioSpecification,Se),e.push(function(){ne(ve.dataInputAssociations,o(A,Se)),ne(ve.dataOutputAssociations,o(A,Se));});}function se(ve,Se){d(ve,Se);}function de(ve,Se){d(ve,Se);}function Ae(ve,Se){e.push(function(){var Be=d(ve,Se);ve.childLaneSet&&rt(ve.childLaneSet,Be||Se),Ke(ve);});}function rt(ve,Se){ne(ve.lanes,o(Ae,Se));}function et(ve,Se){ne(ve,o(rt,Se));}function pt(ve,Se){ft(ve.flowElements,Se),ve.laneSets&&et(ve.laneSets,Se);}function ft(ve,Se){ne(ve,function(Be){ys(Be,"bpmn:SequenceFlow")?e.push(function(){se(Be,Se);}):ys(Be,"bpmn:BoundaryEvent")?e.unshift(function(){Y(Be,Se);}):ys(Be,"bpmn:FlowNode")?Y(Be,Se):ys(Be,"bpmn:DataObject")||(ys(Be,"bpmn:DataStoreReference")||ys(Be,"bpmn:DataObjectReference")?de(Be,Se):f(`unrecognized flowElement ${pr(Be)} in context ${pr(Se&&Se.businessObject)}`,{element:Be,context:Se}));});}function je(ve,Se){var Be=d(ve,Se),Ze=ve.processRef;Ze&&O(Ze,Be||Se);}function ke(ve,Se){ne(ve.participants,o(je,Se)),e.push(function(){L(ve.messageFlows,Se);}),U(ve.artifacts,Se);}function Ke(ve){ne(ve.flowNodeRef,function(Se){var Be=Se.get("lanes");Be&&Be.push(ve);});}}function z(n,t){var e=qe(n);return e&&typeof e.$instanceOf=="function"&&e.$instanceOf(t);}function en(n,t){return xs(t,function(e){return z(n,e);});}function qe(n){return n&&n.businessObject||n;}function In(n){return n&&n.di;}function v4(n,t,e){var i,o,a,r,l=[];function p(d,f){var h={root:function(T,O){return i.add(T,O);},element:function(T,O,V){return i.add(T,O,V);},error:function(T,O){l.push({message:T,context:O});}},g=new $M(h);f=f||d.diagrams&&d.diagrams[0];var b=dre(d,f);if(!b)throw new Error("no diagram to display");ne(b,function(T){g.handleDefinitions(d,T);});var w=f.plane.bpmnElement.id;a.setRootElement(a.findRoot(w+"_plane")||a.findRoot(w));}return new Promise(function(d,f){try{return i=n.get("bpmnImporter"),o=n.get("eventBus"),a=n.get("canvas"),o.fire("import.render.start",{definitions:t}),p(t,e),o.fire("import.render.complete",{error:r,warnings:l}),d({warnings:l});}catch(h){return h.warnings=l,f(h);}}
600);}function dre(n,t){if(!(!t||!t.plane)){var e=t.plane.bpmnElement,i=e;!z(e,"bpmn:Process")&&!z(e,"bpmn:Collaboration")&&(i=mre(e));var o;z(i,"bpmn:Collaboration")?o=i:o=$n(n.rootElements,function(d){if(z(d,"bpmn:Collaboration"))return $n(d.participants,function(f){return f.processRef===i;});});var a=[i];o&&(a=sa(o.participants,function(d){return d.processRef;}),a.push(o));var r=b4(a),l=[t],p=[e];return ne(n.diagrams,function(d){if(d.plane){var f=d.plane.bpmnElement;r.indexOf(f)!==-1&&p.indexOf(f)===-1&&(l.push(d),p.push(f));}}),l;}}function b4(n){var t=[];return ne(n,function(e){e&&(t.push(e),t=t.concat(b4(e.flowElements)));}),t;}function mre(n){for(var t=n;t;){if(z(t,"bpmn:Process"))return t;t=t.$parent;}}var ure='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',VM=ure,GM={verticalAlign:"middle"},qM={color:"#404040"},fre={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},hre={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},_re={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},gre='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+VM+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',Uc;function xre(){Uc=ri(gre),La(Uc,fre),La(si("svg",Uc),GM),La(si(".backdrop",Uc),hre),La(si(".notice",Uc),_re),La(si(".link",Uc),qM,{margin:"15px 20px 15px 10px",alignSelf:"center"});}function y4(){Uc||(xre(),wa.bind(Uc,".backdrop","click",function(n){document.body.removeChild(Uc);})),document.body.appendChild(Uc);}var Uv=5,P4="djs-outline-hidden";function Ho(n){n=me({},vre,n),this._moddle=this._createModdle(n),this._container=this._createContainer(n),this._init(this._container,this._moddle,n),yre(this._container);}Fe(Ho,Hc);Ho.prototype.importXML=function(t,e){return $(this,null,function*(){let i=this;function o(r){return i.get("eventBus").createEvent(r);}let a=[];try{t=this._emit("import.parse.start",{xml:t})||t;let r;try{r=yield this._moddle.fromXML(t,"bpmn:Definitions");}catch(g){throw this._emit("import.parse.complete",{error:g}),g;}let l=r.rootElement,p=r.references,d=r.warnings,f=r.elementsById;a=a.concat(d),l=this._emit("import.parse.complete",o({error:null,definitions:l,elementsById:f,references:p,warnings:a}))||l;let h=yield this.importDefinitions(l,e);return a=a.concat(h.warnings),this._emit("import.done",{error:null,warnings:a}),{warnings:a};}catch(r){let l=r;throw a=a.concat(l.warnings||[]),Wv(l,a),l=Cre(l),this._emit("import.done",{error:l,warnings:l.warnings}),l;}});};Ho.prototype.importDefinitions=function(t,e){return $(this,null,function*(){return this._setDefinitions(t),{warnings:(yield this.open(e)).warnings};});};Ho.prototype.open=function(t){return $(this,null,function*(){let e=this._definitions,i=t;if(!e){let a=new Error("no XML imported");throw Wv(a,[]),a;}if(typeof t=="string"&&(i=bre(e,t),!i)){let a=new Error("BPMNDiagram <"+t+"> not found");throw Wv(a,[]),a;}try{this.clear();}catch(a){throw Wv(a,[]),a;}let{warnings:o}=yield v4(this,e,i);return{warnings:o};});};Ho.prototype.saveXML=function(t){return $(this,null,function*(){t=t||{};let e=this._definitions,i,o;try{if(!e)throw new Error("no definitions loaded");e=this._emit("saveXML.start",{definitions:e})||e,o=(yield this._moddle.toXML(e,t)).xml,o=this._emit("saveXML.seri
600alized",{xml:o})||o;}catch(r){i=r;}let a=i?{error:i}:{xml:o};if(this._emit("saveXML.done",a),i)throw i;return a;});};Ho.prototype.saveSVG=function(){return $(this,null,function*(){this._emit("saveSVG.start");let t,e;try{let i=this.get("canvas"),o=i.getActiveLayer(),a=si(":scope > defs",i._svg),r=xM(o),l=a?"<defs>"+xM(a)+"</defs>":"",p=i.getContainer();Ji(p).add(P4);let d;try{d=o.getBBox();}finally{Ji(p).remove(P4);}let f=d.x-Uv,h=d.y-Uv,g=d.width+Uv*2,b=d.height+Uv*2;t=`<?xml version="1.0" encoding="utf-8"?> 601<!-- created with bpmn-js / http://bpmn.io --> 602<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> 603<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+g+'" height="'+b+'" viewBox="'+f+" "+h+" "+g+" "+b+'" version="1.1">'+l+r+"</svg>";}catch(i){e=i;}if(this._emit("saveSVG.done",{error:e,svg:t}),e)throw e;return{svg:t};});};Ho.prototype._setDefinitions=function(n){this._definitions=n;};Ho.prototype.getModules=function(){return this._modules;};Ho.prototype.clear=function(){this.getDefinitions()&&Hc.prototype.clear.call(this);};Ho.prototype.destroy=function(){Hc.prototype.destroy.call(this),Cs(this._container);};Ho.prototype.on=function(n,t,e,i){return this.get("eventBus").on(n,t,e,i);};Ho.prototype.off=function(n,t){this.get("eventBus").off(n,t);};Ho.prototype.attachTo=function(n){if(!n)throw new Error("parentNode required");this.detach(),n.get&&n.constructor.prototype.jquery&&(n=n.get(0)),typeof n=="string"&&(n=si(n)),n.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized();};Ho.prototype.getDefinitions=function(){return this._definitions;};Ho.prototype.detach=function(){let n=this._container,t=n.parentNode;t&&(this._emit("detach",{}),t.removeChild(n));};Ho.prototype._init=function(n,t,e){let i=e.modules||this.getModules(e),o=e.additionalModules||[],a=[{bpmnjs:["value",this],moddle:["value",t]}],r=[].concat(a,i,o),l=me(ns(e,["additionalModules"]),{canvas:me({},e.canvas,{container:n}),modules:r});Hc.call(this,l),e&&e.container&&this.attachTo(e.container);};Ho.prototype._emit=function(n,t){return this.get("eventBus").fire(n,t);};Ho.prototype._createContainer=function(n){let t=ri('<div class="bjs-container"></div>');return La(t,{width:w4(n.width),height:w4(n.height),position:n.position}),t;};Ho.prototype._createModdle=function(n){let t=me({},this._moddleExtensions,n.moddleExtensions);return new C4(t);};Ho.prototype._modules=[];function Wv(n,t){return n.warnings=t,n;}function Cre(n){let e=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(n.message);return e&&(n.message="unparsable content <"+e[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+e[2]),n;}var vre={width:"100%",height:"100%",position:"relative"};function w4(n){return n+(nn(n)?"px":"");}function bre(n,t){return t&&$n(n.diagrams,function(e){return e.id===t;})||null;}function yre(n){let e='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+VM+"</a>",i=ri(e);La(si("svg",i),GM),La(i,qM,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),n.appendChild(i),Cn.bind(i,"click",function(o){y4(),o.preventDefault();});}function mu(n){Ho.call(this,n),this.on("import.parse.complete",function(t){t.error||this._collectIds(t.definitions,t.elementsById);},this),this.on("diagram.destroy",function(){this.get("moddle").ids.clear();},this);}Fe(mu,Ho);mu.prototype._createModdle=function(n){var t=Ho.prototype._createModdle.call(this,n);return t.ids=new Ll([32,36,1]),t;};mu.prototype._collectIds=function(n,t){var e=n.$model,i=e.ids,o;i.clear();for(o in t)i.claim(o,t[o]);};function mn(n,t){return z(n,"bpmn:CallActivity")?!1:z(n,"bpmn:SubProcess")?(t=t||In(n),t&&z(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):z(n,"bpmn:Participant")?!!qe(n).processRef:!0;}function ao(n){if(!(!z(n,"bpmn:Participant")&&!z(n,"bpmn:Lane"))){var t=In(n).isHorizontal;return t===void 0?!0:t;}}function S4(n){return n&&qe(n).isInterrupting!==!1;}function ua(n){return n&&!!qe(n).triggeredByEvent;}function Rp(n,t){var e=qe(n).eventDefinitions;return xs(e,function(i){return z(i,t);});}function M4(n){return Rp(n,"bpmn:ErrorEventDefinition");}function O4(n){return Rp(n,"bpmn:EscalationEventDefinition");}function E4(n){return Rp(n,"bpmn:CompensateEventDefinition");}var Wc={width:90,height:20},T4=15;function tl(n){return z(n,"bpmn:Event")||z(n,"bpmn:Gateway")||z(n,"bpmn:DataStoreReference")||z(n,"bpmn:DataObjectReference")||z(n,"bpmn:DataInput")||z(n,"bpmn:DataOutput")||z(n,"bpmn:SequenceFlow")||z(n,"bpmn:MessageFlow")||z(n,"bpmn:Group");}function nm(n){return Ut(n.label);}function Pre(n){var t=n.length/2-1,e=n[Math.floor(t)],i=n[Math.ceil(t+.01)],o=wre(n),a=Math.atan((i.y-e.y)/(i.x-e.x)),r=o.x,l=o.y;return Math.abs(a)<Math.PI/2?l-=T4:r+=T4,{x:r,y:l};}function wre(n){var t=n.length/2-1,e=n[Math.floor(t)],i=n[Math.ceil(t+.01)];return{x:e.x+(i.x-e.x)/2,y:e.y+(i.y-e.y)/2};}function U0(n){return n.waypoints?Pre(n.waypoints):z(n,"bpmn:Group")?{x:n.x+n.width/2,y:n.y+Wc.height/2}:{x:n.x+n.width/2,y:n.y+n.height+Wc.height/2};}function I4(n,t){var e,i,o,a=n.label;return a&&a.bounds?(o=a.bounds,i={width:Math.max(Wc.width,o.width),height:o.height},e={x:o.x+o.width/2,y:o.y+o.height/2}):(e=U0(t),i=Wc),me({x:e.x-i.width/2,y:e.y-i.height/2},i);}function k4(n){if(z(n,"bpmn:FlowElement")||z(n,"bpmn:Participant")||z(n,"bpmn:Lane")||z(n,"bpmn:SequenceFlow")||z(n,"bpmn:MessageFlow")||z(n,"bpmn:DataInput")||z(n,"bpmn:DataOutput"))return"name";if(z(n,"bpmn:TextAnnotation"))return"text";if(z(n,"bpmn:Group"))return"categoryValueRef";}function Sre(n){var t=n.categoryValueRef;return t&&t.value||"";}function za(n){var t=n.businessObject,e=k4(t);if(e)return e==="categoryValueRef"?Sre(t):t[e]||"";}function R4(n,t){var e=n.businessObject,i=k4(e);
603if(i)if(i==="categoryValueRef"){if(!e[i])return n;e[i].value=t;}else e[i]=t;return n;}function N4(n){return Ut(n)&&tl(n.labelTarget);}var Np=7;function JM(n){let t=[];return ne(n.incoming,e=>{z(e,"bpmn:Association")&&z(e.source,"bpmn:TextAnnotation")&&t.push({annotation:e.source,association:e});}),ne(n.outgoing,e=>{z(e,"bpmn:Association")&&z(e.target,"bpmn:TextAnnotation")&&t.push({annotation:e.target,association:e});}),t;}function uu(n){let t=new Map();return ne(F0(n,!0,-1),e=>{ne(JM(e),i=>{t.has(i.annotation)||t.set(i.annotation,{annotation:i.annotation,associations:[]}),t.get(i.annotation).associations.push(i.association);});}),[...t.values()];}var Xv="hsl(225, 10%, 15%)",Mre="white";function gc(n,t){return xs(n.eventDefinitions,function(e){return e.$type===t;});}function A4(n){return n.$type==="bpmn:IntermediateThrowEvent"||n.$type==="bpmn:EndEvent";}function D4(n){var t=n.dataObjectRef;return n.isCollection||t&&t.isCollection;}function oi(n,t,e){var i=In(n);return e||i.get("color:background-color")||i.get("bioc:fill")||t||Mre;}function It(n,t,e){var i=In(n);return e||i.get("color:border-color")||i.get("bioc:stroke")||t||Xv;}function fh(n,t,e,i){var o=In(n),a=o.get("label");return i||a&&a.get("color:color")||t||It(n,e);}function Yv(n){var t=n.x+n.width/2,e=n.y+n.height/2,i=n.width/2,o=[["M",t,e],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]];return Ip(o);}function W0(n,t){var e=n.x,i=n.y,o=n.width,a=n.height,r=[["M",e+t,i],["l",o-t*2,0],["a",t,t,0,0,1,t,t],["l",0,a-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-o,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-a],["a",t,t,0,0,1,t,-t],["z"]];return Ip(r);}function j4(n){var t=n.width,e=n.height,i=n.x,o=n.y,a=t/2,r=e/2,l=[["M",i+a,o],["l",a,r],["l",-a,r],["l",-a,-r],["z"]];return Ip(l);}function L4(n){var t=n.x,e=n.y,i=n.width,o=n.height,a=[["M",t,e],["l",i,0],["l",0,o],["l",-i,0],["z"]];return Ip(a);}function hh(n,t={}){return{width:nl(n,t),height:Ps(n,t)};}function nl(n,t={}){return Ka(t,"width")?t.width:n.width;}function Ps(n,t={}){return Ka(t,"height")?t.height:n.height;}var Ore=new Ll(),Ere=10,Kv=3,Tre=1.5,Zv=10,Ire=4,_h=.95,kre=1,Rre=.25;function Ap(n,t,e,i,o,a,r){Fl.call(this,t,r);var l=n&&n.defaultFillColor,p=n&&n.defaultStrokeColor,d=n&&n.defaultLabelColor;function f(Z){return e.computeStyle(Z,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Xv,strokeWidth:2,fill:"white"});}function h(Z){return e.computeStyle(Z,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Xv,strokeWidth:2});}function g(Z,D){var{ref:F={x:0,y:0},scale:fe=1,element:he,parentGfx:xe=o._svg}=D,nt=xt("marker",{id:Z,viewBox:"0 0 20 20",refX:F.x,refY:F.y,markerWidth:20*fe,markerHeight:20*fe,orient:"auto"});Kt(nt,he);var Je=si(":scope > defs",xe);Je||(Je=xt("defs"),Kt(xe,Je)),Kt(Je,nt);}function b(Z,D,F,fe){var he=Ore.nextPrefixed("marker-");return w(Z,he,D,F,fe),"url(#"+he+")";}function w(Z,D,F,fe,he){if(F==="sequenceflow-end"){var xe=xt("path",X({d:"M 1 5 L 11 10 L 1 15 Z"},f({fill:he,stroke:he,strokeWidth:1})));g(D,{element:xe,ref:{x:11,y:10},scale:.5,parentGfx:Z});}if(F==="messageflow-start"){var nt=xt("circle",X({cx:6,cy:6,r:3.5},f({fill:fe,stroke:he,strokeWidth:1,strokeDasharray:[1e4,1]})));g(D,{element:nt,ref:{x:6,y:6},parentGfx:Z});}if(F==="messageflow-end"){var Je=xt("path",X({d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"},f({fill:fe,stroke:he,strokeWidth:1,strokeDasharray:[1e4,1]})));g(D,{element:Je,ref:{x:8.5,y:5},parentGfx:Z});}if(F==="association-start"){var Ge=xt("path",X({d:"M 11 5 L 1 10 L 11 15"},h({fill:"none",stroke:he,strokeWidth:1.5,strokeDasharray:[1e4,1]})));g(D,{element:Ge,ref:{x:1,y:10},scale:.5,parentGfx:Z});}if(F==="association-end"){var Ne=xt("path",X({d:"M 1 5 L 11 10 L 1 15"},h({fill:"none",stroke:he,strokeWidth:1.5,strokeDasharray:[1e4,1]})));g(D,{element:Ne,ref:{x:11,y:10},scale:.5,parentGfx:Z});}if(F==="conditional-flow-marker"){var Pe=xt("path",X({d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"},f({fill:fe,stroke:he})));g(D,{element:Pe,ref:{x:-1,y:10},scale:.5,parentGfx:Z});}if(F==="conditional-default-flow-marker"){var Oe=xt("path",X({d:"M 6 4 L 10 16"},f({stroke:he,fill:"none"})));g(D,{element:Oe,ref:{x:0,y:10},scale:.5,parentGfx:Z});}}function T(Z,D,F,fe,he={}){eo(fe)&&(he=fe,fe=0),fe=fe||0,he=f(he);var xe=D/2,nt=F/2,Je=xt("circle",X({cx:xe,cy:nt,r:Math.round((D+F)/4-fe)},he));return Kt(Z,Je),Je;}function O(Z,D,F,fe,he,xe){eo(he)&&(xe=he,he=0),he=he||0,xe=f(xe);var nt=xt("rect",X({x:he,y:he,width:D-he*2,height:F-he*2,rx:fe,ry:fe},xe));return Kt(Z,nt),nt;}
603function V(Z,D,F,fe){var he=D/2,xe=F/2,nt=[{x:he,y:0},{x:D,y:xe},{x:he,y:F},{x:0,y:xe}],Je=nt.map(function(Ne){return Ne.x+","+Ne.y;}).join(" ");fe=f(fe);var Ge=xt("polygon",Ve(X({},fe),{points:Je}));return Kt(Z,Ge),Ge;}function j(Z,D,F,fe){F=h(F);var he=Bc(D,F,fe);return Kt(Z,he),he;}function L(Z,D,F){return j(Z,D,F,5);}function A(Z,D,F){F=h(F);var fe=xt("path",Ve(X({},F),{d:D}));return Kt(Z,fe),fe;}function J(Z,D,F,fe){return A(D,F,me({"data-marker":Z},fe));}function Q(Z){return kt[Z];}function te(Z){return function(D,F,fe){return Q(Z)(D,F,fe);};}var U={"bpmn:MessageEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.235,my:.315}}),xe=fe?It(D,p,F.stroke):oi(D,l,F.fill),nt=fe?oi(D,l,F.fill):It(D,p,F.stroke),Je=A(Z,he,{fill:xe,stroke:nt,strokeWidth:1});return Je;},"bpmn:TimerEventDefinition":function(Z,D,F={}){var fe=F.width||D.width,he=F.height||D.height,xe=F.width?1:2,nt=T(Z,fe,he,.2*he,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:xe}),Je=i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:fe,containerHeight:he,position:{mx:.5,my:.5}});A(Z,Je,{stroke:It(D,p,F.stroke),strokeWidth:xe});for(var Ge=0;Ge<12;Ge++){var Ne=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:fe,containerHeight:he,position:{mx:.5,my:.5}}),Pe=fe/2,Oe=he/2;A(Z,Ne,{strokeWidth:1,stroke:It(D,p,F.stroke),transform:"rotate("+Ge*30+","+Oe+","+Pe+")"});}return nt;},"bpmn:EscalationEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.5,my:.2}}),xe=fe?It(D,p,F.stroke):oi(D,l,F.fill);return A(Z,he,{fill:xe,stroke:It(D,p,F.stroke),strokeWidth:1});},"bpmn:ConditionalEventDefinition":function(Z,D,F={}){var fe=i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.5,my:.222}});return A(Z,fe,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1});},"bpmn:LinkEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:D.width,containerHeight:D.height,position:{mx:.57,my:.263}}),xe=fe?It(D,p,F.stroke):oi(D,l,F.fill);return A(Z,he,{fill:xe,stroke:It(D,p,F.stroke),strokeWidth:1});},"bpmn:ErrorEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.2,my:.722}}),xe=fe?It(D,p,F.stroke):oi(D,l,F.fill);return A(Z,he,{fill:xe,stroke:It(D,p,F.stroke),strokeWidth:1});},"bpmn:CancelEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:D.width,containerHeight:D.height,position:{mx:.638,my:-.055}}),xe=fe?It(D,p,F.stroke):"none",nt=A(Z,he,{fill:xe,stroke:It(D,p,F.stroke),strokeWidth:1});return Fv(nt,45),nt;},"bpmn:CompensateEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.22,my:.5}}),xe=fe?It(D,p,F.stroke):oi(D,l,F.fill);return A(Z,he,{fill:xe,stroke:It(D,p,F.stroke),strokeWidth:1});},"bpmn:SignalEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.5,my:.2}}),xe=fe?It(D,p,F.stroke):oi(D,l,F.fill);return A(Z,he,{strokeWidth:1,fill:xe,stroke:It(D,p,F.stroke)});},"bpmn:MultipleEventDefinition":function(Z,D,F={},fe){var he=i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.211,my:.36}}),xe=fe?It(D,p,F.stroke):oi(D,l,F.fill);return A(Z,he,{fill:xe,stroke:It(D,p,F.stroke),strokeWidth:1});},"bpmn:ParallelMultipleEventDefinition":function(Z,D,F={}){var fe=i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:F.width||D.width,containerHeight:F.height||D.height,position:{mx:.458,my:.194}});return A(Z,fe,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1});},"bpmn:TerminateEventDefinition":function(Z,D,F={}){var fe=T(Z,D.width,D.height,8,{fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke),strokeWidth:4});return fe;}};function ce(Z,D,F={},fe){var he=qe(Z),xe=A4(he),nt=fe||Z;return he.get("eventDefinitions")&&he.get("eventDefinitions").length>1?he.get("parallelMultiple")?U["bpmn:ParallelMultipleEventDefinition"](D,nt,F,xe):U["bpmn:MultipleEventDefinition"](D,nt,F,xe):gc(he,"bpmn:MessageEventDefinition")?U["bpmn:MessageEventDefinition"](D,nt,F,xe):gc(he,"bpmn:TimerEventDefinition")?U["bpmn:TimerEventDefinition"](D,nt,F,xe):gc(he,"bpmn:ConditionalEventDefinition")?U["bpmn:ConditionalEventDefinition"](D,nt,F,xe):gc(he,"bpmn:SignalEventDefinition")?U["bpmn:SignalEventDefinition"](D,nt,F,xe):gc(he,"bpmn:EscalationEventDefinition")?U["bpmn:EscalationEventDefinition"](D,nt,F,xe):gc(he,"bpmn:LinkEventDefinition")?U["bpmn:LinkEventDefinition"](D,nt,F,xe):gc(he,"bpmn:ErrorEventDefinition")?U["bpmn:ErrorEventDefinition"](D,nt,F,xe):gc(he,"bpmn:CancelEventDefinition")?U["bpmn:CancelEventDefinition"](D,nt,F,xe):gc(he,"bpmn:CompensateEventDefinition")?U["bpmn:CompensateEventDefinition"](D,nt,F,xe):gc(he,"bpmn:TerminateEventDefinition")?U["bpmn:TerminateEventDefinition"](D,nt,F,xe):null;}var W={ParticipantMultiplicityMarker:function(Z,D,F={}){var fe=nl(D,F),he=Ps(D,F),xe=i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:fe,containerHeight:he,position:{mx:(fe/2-6)/fe,my:(he-15
603)/he}});J("participant-multiplicity",Z,xe,{strokeWidth:2,fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke)});},SubProcessMarker:function(Z,D,F={}){var fe=O(Z,14,14,0,{strokeWidth:1,fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke)});Ao(fe,D.width/2-7.5,D.height-20);var he=i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:D.width,containerHeight:D.height,position:{mx:(D.width/2-7.5)/D.width,my:(D.height-20)/D.height}});J("sub-process",Z,he,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke)});},ParallelMarker:function(Z,D,F){var fe=nl(D,F),he=Ps(D,F),xe=i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:fe,containerHeight:he,position:{mx:(fe/2+F.parallel)/fe,my:(he-20)/he}});J("parallel",Z,xe,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke)});},SequentialMarker:function(Z,D,F){var fe=i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:D.width,containerHeight:D.height,position:{mx:(D.width/2+F.seq)/D.width,my:(D.height-19)/D.height}});J("sequential",Z,fe,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke)});},CompensationMarker:function(Z,D,F){var fe=i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:D.width,containerHeight:D.height,position:{mx:(D.width/2+F.compensation)/D.width,my:(D.height-13)/D.height}});J("compensation",Z,fe,{strokeWidth:1,fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke)});},LoopMarker:function(Z,D,F){var fe=nl(D,F),he=Ps(D,F),xe=i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:fe,containerHeight:he,position:{mx:(fe/2+F.loop)/fe,my:(he-7)/he}});J("loop",Z,xe,{strokeWidth:1.5,fill:"none",stroke:It(D,p,F.stroke),strokeMiterlimit:.5});},AdhocMarker:function(Z,D,F){var fe=nl(D,F),he=Ps(D,F),xe=i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:fe,containerHeight:he,position:{mx:(fe/2+F.adhoc)/fe,my:(he-15)/he}});J("adhoc",Z,xe,{strokeWidth:1,fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke)});}};function Y(Z,D,F,fe){W[Z](D,F,fe);}function se(Z,D,F=[],fe={}){fe={fill:fe.fill,stroke:fe.stroke,width:nl(D,fe),height:Ps(D,fe)};var he=qe(D),xe=F.includes("SubProcessMarker");xe?fe=Ve(X({},fe),{seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}):fe=Ve(X({},fe),{seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8}),he.get("isForCompensation")&&F.push("CompensationMarker"),z(he,"bpmn:AdHocSubProcess")&&(F.push("AdhocMarker"),xe||me(fe,{compensation:fe.compensation-18}));var nt=he.get("loopCharacteristics"),Je=nt&&nt.get("isSequential");nt&&(me(fe,{compensation:fe.compensation-18}),F.includes("AdhocMarker")&&me(fe,{seq:-23,loop:-18,parallel:-24}),Je===void 0&&F.push("LoopMarker"),Je===!1&&F.push("ParallelMarker"),Je===!0&&F.push("SequentialMarker")),F.includes("CompensationMarker")&&F.length===1&&me(fe,{compensation:-8}),ne(F,function(Ge){Y(Ge,Z,D,fe);});}function de(Z,D,F={}){F=me({size:{width:100}},F);var fe=a.createText(D||"",F);return En(fe).add("djs-label"),Kt(Z,fe),fe;}function Ae(Z,D,F,fe={}){var he=qe(D),xe=hh({x:D.x,y:D.y,width:D.width,height:D.height},fe);return de(Z,he.name,{align:F,box:xe,padding:7,style:{fill:fh(D,d,p,fe.stroke)}});}function rt(Z,D,F={}){var fe={width:D.width,height:D.height,x:D.width/2+D.x,y:D.height/2+D.y};return de(Z,za(D),{box:fe,style:me({},a.getExternalStyle(),{fill:fh(D,d,p,F.stroke)})});}function et(Z,D,F,fe={}){var he=ao(F),xe=de(Z,D,{box:{height:30,width:he?Ps(F,fe):nl(F,fe)},align:"center-middle",style:{fill:fh(F,d,p,fe.stroke)}});if(he){var nt=-1*Ps(F,fe);dh(xe,0,-nt,270);}}function pt(Z,D,F={}){var{width:fe,height:he}=hh(D,F);return O(Z,fe,he,Zv,Ve(X({},F),{fill:oi(D,l,F.fill),fillOpacity:_h,stroke:It(D,p,F.stroke)}));}function ft(Z,D,F={}){var fe=qe(D),he=oi(D,l,F.fill),xe=It(D,p,F.stroke);return(fe.get("associationDirection")==="One"||fe.get("associationDirection")==="Both")&&(F.markerEnd=b(Z,"association-end",he,xe)),fe.get("associationDirection")==="Both"&&(F.markerStart=b(Z,"association-start",he,xe)),F=wi(F,["markerStart","markerEnd"]),L(Z,D.waypoints,Ve(X({},F),{stroke:xe,strokeDasharray:"0, 5"}));}function je(Z,D,F={}){var fe=oi(D,l,F.fill),he=It(D,p,F.stroke),xe=i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:D.width,containerHeight:D.height,position:{mx:.474,my:.296}}),nt=A(Z,xe,{fill:fe,fillOpacity:_h,stroke:he}),Je=qe(D);if(D4(Je)){var Ge=i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:D.width,containerHeight:D.height,position:{mx:.33,my:(D.height-18)/D.height}});A(Z,Ge,{strokeWidth:2,fill:fe,stroke:he});}return nt;}function ke(Z,D,F={}){return T(Z,D.width,D.height,Ve(X({fillOpacity:_h},F),{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke)}));}function Ke(Z,D,F={}){return V(Z,D.width,D.height,{fill:oi(D,l,F.fill),fillOpacity:_h,stroke:It(D,p,F.stroke)});}function ve(Z,D,F={}){var fe=O(Z,nl(D,F),Ps(D,F),0,{fill:oi(D,l,F.fill),fillOpacity:F.fillOpacity||_h,stroke:It(D,p,F.stroke),strokeWidth:1.5}),he=qe(D);
603if(z(he,"bpmn:Lane")){var xe=he.get("name");et(Z,xe,D,F);}return fe;}function Se(Z,D,F={}){var fe=pt(Z,D,F),he=mn(D);if(ua(D)&&(lt(fe,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!he)){var xe=qe(D).flowElements||[],nt=xe.filter(Je=>z(Je,"bpmn:StartEvent"));nt.length===1&&Be(nt[0],Z,F,D);}return Ae(Z,D,he?"center-top":"center-middle",F),he?se(Z,D,void 0,F):se(Z,D,["SubProcessMarker"],F),fe;}function Be(Z,D,F,fe){var he=22,xe={fill:oi(fe,l,F.fill),stroke:It(fe,p,F.stroke),width:he,height:he},nt=qe(Z).isInterrupting,Je=nt?0:3,Ge=nt?1:1.2,Ne=20,Pe=(he-Ne)/2,Oe="translate("+Pe+","+Pe+")";T(D,Ne,Ne,{fill:xe.fill,stroke:xe.stroke,strokeWidth:Ge,strokeDasharray:Je,transform:Oe}),ce(Z,D,xe,fe);}function Ze(Z,D,F={}){var fe=pt(Z,D,F);return Ae(Z,D,"center-middle",F),se(Z,D,void 0,F),fe;}var kt=this.handlers={"bpmn:AdHocSubProcess":function(Z,D,F={}){return mn(D)?F=wi(F,["fill","stroke","width","height"]):F=wi(F,["fill","stroke"]),Se(Z,D,F);},"bpmn:Association":function(Z,D,F={}){return F=wi(F,["fill","stroke"]),ft(Z,D,F);},"bpmn:BoundaryEvent":function(Z,D,F={}){var{renderIcon:fe=!0}=F;F=wi(F,["fill","stroke"]);var he=qe(D),xe=he.get("cancelActivity");F={strokeWidth:1.5,fill:oi(D,l,F.fill),fillOpacity:kre,stroke:It(D,p,F.stroke)},xe||(F.strokeDasharray="6");var nt=ke(Z,D,F);return T(Z,D.width,D.height,Kv,Ve(X({},F),{fill:"none"})),fe&&ce(D,Z,F),nt;},"bpmn:BusinessRuleTask":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ze(Z,D,F),he=i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),xe=A(Z,he);lt(xe,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1});var nt=i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),Je=A(Z,nt);return lt(Je,{fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke),strokeWidth:1}),fe;},"bpmn:CallActivity":function(Z,D,F={}){return F=wi(F,["fill","stroke"]),Se(Z,D,X({strokeWidth:5},F));},"bpmn:ComplexGateway":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ke(Z,D,F),he=i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:D.width,containerHeight:D.height,position:{mx:.46,my:.26}});return A(Z,he,{fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke),strokeWidth:1}),fe;},"bpmn:DataInput":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=i.getRawPath("DATA_ARROW"),he=je(Z,D,F);return A(Z,fe,{fill:"none",stroke:It(D,p,F.stroke),strokeWidth:1}),he;},"bpmn:DataInputAssociation":function(Z,D,F={}){return F=wi(F,["fill","stroke"]),ft(Z,D,Ve(X({},F),{markerEnd:b(Z,"association-end",oi(D,l,F.fill),It(D,p,F.stroke))}));},"bpmn:DataObject":function(Z,D,F={}){return F=wi(F,["fill","stroke"]),je(Z,D,F);},"bpmn:DataObjectReference":te("bpmn:DataObject"),"bpmn:DataOutput":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=i.getRawPath("DATA_ARROW"),he=je(Z,D,F);return A(Z,fe,{strokeWidth:1,fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke)}),he;},"bpmn:DataOutputAssociation":function(Z,D,F={}){return F=wi(F,["fill","stroke"]),ft(Z,D,Ve(X({},F),{markerEnd:b(Z,"association-end",oi(D,l,F.fill),It(D,p,F.stroke))}));},"bpmn:DataStoreReference":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:D.width,containerHeight:D.height,position:{mx:0,my:.133}});return A(Z,fe,{fill:oi(D,l,F.fill),fillOpacity:_h,stroke:It(D,p,F.stroke),strokeWidth:2});},"bpmn:EndEvent":function(Z,D,F={}){var{renderIcon:fe=!0}=F;F=wi(F,["fill","stroke"]);var he=ke(Z,D,Ve(X({},F),{strokeWidth:4}));return fe&&ce(D,Z,F),he;},"bpmn:EventBasedGateway":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=qe(D),he=Ke(Z,D,F);T(Z,D.width,D.height,D.height*.2,{fill:oi(D,"none",F.fill),stroke:It(D,p,F.stroke),strokeWidth:1});var xe=fe.get("eventGatewayType"),nt=!!fe.get("instantiate");function Je(){var Ne=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:D.width,containerHeight:D.height,position:{mx:.36,my:.44}});A(Z,Ne,{fill:"none",stroke:It(D,p,F.stroke),strokeWidth:2});}if(xe==="Parallel"){var Ge=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:D.width,containerHeight:D.height,position:{mx:.474,my:.296}});A(Z,Ge,{fill:"none",stroke:It(D,p,F.stroke),strokeWidth:1});}else xe==="Exclusive"&&(nt||T(Z,D.width,D.height,D.height*.26,{fill:"none",stroke:It(D,p,F.stroke),strokeWidth:1}),Je());return he;},"bpmn:ExclusiveGateway":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ke(Z,D,F),he=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:D.width,containerHeight:D.height,position:{mx:.32,my:.3}}),xe=In(D);return xe.get("isMarkerVisible")&&A(Z,he,{fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke),strokeWidth:1}),fe;},"bpmn:Gateway":function(Z,D,F={}){return F=wi(F,["fill","stroke"]),Ke(Z,D,F);},"bpmn:Group":function(Z,D,F={}){return F=wi(F,["fill","stroke","width","height"]),O(Z,D.width,D.height,Zv,{stroke:It(D,p,F.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:nl(D,F),height:Ps(D,F)});},"bpmn:InclusiveGateway":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ke(Z,D,F);return T(Z,D.width,D.height,D.height*.24,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:2.5}),fe;},"bpmn:IntermediateEvent":function(Z,D,F={}){var{renderIcon:fe=!0}=F;F=wi(F,["fill","stroke"]);var he=ke(Z,D,Ve(X({},F),{strokeWidth:1.5}));return T(Z,D.width,D.height,Kv,{fill:"none",stroke:It(D,p,F.stroke),strokeWidth:1.5}),fe&&ce(D,Z,F),he;},"bpmn:IntermediateCatchEvent":te("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":te("bpmn:IntermediateEvent"),"bpmn:Lane":function(Z,D,F={}){return F=wi(F,["fill","stroke","width","height"]),ve(Z,D,Ve(X({},F),{fillOpacity:Rre}));},"bpmn:ManualTask":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ze(Z,D,F),he=i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return A(Z,he,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:.5}),fe;},"bpmn:MessageFlow":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=qe(D),he=In(D),xe=oi(D,l,F.fill),nt=It(D,p,F.stroke),Je=L(Z,D.waypoints,{markerEnd:b(Z,"messageflow-end",xe,nt),markerStart:b(Z,"messageflow-start",xe,nt),stroke:nt,strokeDasharray:"10, 11",strokeWidth:1.5});if(fe.get("messageRef")){var Ge=Je.getPointAtLength(Je.getTotalLength()/2),Ne=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:Ge.x,y:Ge.y}}),Pe={strokeWidth:1};he.get("messageVisibleKind")==="initiating"?(Pe.fill=xe,Pe.stroke=nt):(Pe.fill=nt,Pe.stroke=xe);var Oe=A(Z,Ne,Pe),ct=fe.get("messageRef"),ht=ct.get("name"),qt=de(Z,ht,{align:"center-top",fitBox:!0,style:{fill:nt}}),zt=Oe.getBBox(),rn=qt.getBBox(),ni=Ge.x-rn.width/2,Vn=Ge.y+zt.height/2+Ere;dh(qt,ni,Vn,0);}return Je;},"bpmn:ParallelGateway":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ke(Z,D,F),he=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,c
603ontainerWidth:D.width,containerHeight:D.height,position:{mx:.46,my:.2}});return A(Z,he,{fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke),strokeWidth:1}),fe;},"bpmn:Participant":function(Z,D,F={}){F=wi(F,["fill","stroke","width","height"]);var fe=ve(Z,D,F),he=mn(D),xe=ao(D),nt=qe(D),Je=nt.get("name");if(he){var Ge=xe?[{x:30,y:0},{x:30,y:Ps(D,F)}]:[{x:0,y:30},{x:nl(D,F),y:30}];j(Z,Ge,{stroke:It(D,p,F.stroke),strokeWidth:Tre}),et(Z,Je,D,F);}else{var Ne=hh(D,F);xe||(Ne.height=nl(D,F),Ne.width=Ps(D,F));var Pe=de(Z,Je,{box:Ne,align:"center-middle",style:{fill:fh(D,d,p,F.stroke)}});if(!xe){var Oe=-1*Ps(D,F);dh(Pe,0,-Oe,270);}}return nt.get("participantMultiplicity")&&Y("ParticipantMultiplicityMarker",Z,D,F),fe;},"bpmn:ReceiveTask":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=qe(D),he=Ze(Z,D,F),xe;return fe.get("instantiate")?(T(Z,28,28,20*.22,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1}),xe=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):xe=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),A(Z,xe,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1}),he;},"bpmn:ScriptTask":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ze(Z,D,F),he=i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return A(Z,he,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1}),fe;},"bpmn:SendTask":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ze(Z,D,F),he=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return A(Z,he,{fill:It(D,p,F.stroke),stroke:oi(D,l,F.fill),strokeWidth:1}),fe;},"bpmn:SequenceFlow":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=oi(D,l,F.fill),he=It(D,p,F.stroke),xe=L(Z,D.waypoints,{markerEnd:b(Z,"sequenceflow-end",fe,he),stroke:he}),nt=qe(D),{source:Je}=D;if(Je){var Ge=qe(Je);nt.get("conditionExpression")&&z(Ge,"bpmn:Activity")&<(xe,{markerStart:b(Z,"conditional-flow-marker",fe,he)}),Ge.get("default")&&(z(Ge,"bpmn:Gateway")||z(Ge,"bpmn:Activity"))&&Ge.get("default")===nt&<(xe,{markerStart:b(Z,"conditional-default-flow-marker",fe,he)});}return xe;},"bpmn:ServiceTask":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ze(Z,D,F);T(Z,10,10,{fill:oi(D,l,F.fill),stroke:"none",transform:"translate(6, 6
603)"});var he=i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});A(Z,he,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1}),T(Z,10,10,{fill:oi(D,l,F.fill),stroke:"none",transform:"translate(11, 10)"});var xe=i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return A(Z,xe,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:1}),fe;},"bpmn:StartEvent":function(Z,D,F={}){var{renderIcon:fe=!0}=F;F=wi(F,["fill","stroke"]);var he=qe(D);he.get("isInterrupting")||(F=Ve(X({},F),{strokeDasharray:"6"}));var xe=ke(Z,D,F);return fe&&ce(D,Z,F),xe;},"bpmn:SubProcess":function(Z,D,F={}){return mn(D)?F=wi(F,["fill","stroke","width","height"]):F=wi(F,["fill","stroke"]),Se(Z,D,F);},"bpmn:Task":function(Z,D,F={}){return F=wi(F,["fill","stroke"]),Ze(Z,D,F);},"bpmn:TextAnnotation":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var{width:fe,height:he}=hh(D,F),xe=O(Z,fe,he,0,0,{fill:"none",stroke:"none"}),nt=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:fe,containerHeight:he,position:{mx:0,my:0}});A(Z,nt,{stroke:It(D,p,F.stroke)});var Je=qe(D),Ge=Je.get("text")||"";return de(Z,Ge,{align:"left-top",box:hh(D,F),padding:Np,style:{fill:fh(D,d,p,F.stroke)}}),xe;},"bpmn:Transaction":function(Z,D,F={}){mn(D)?F=wi(F,["fill","stroke","width","height"]):F=wi(F,["fill","stroke"]);var fe=Se(Z,D,X({strokeWidth:1.5},F)),he=e.style(["no-fill","no-events"],{stroke:It(D,p,F.stroke),strokeWidth:1.5}),xe=mn(D);return xe||(F={}),O(Z,nl(D,F),Ps(D,F),Zv-Kv,Kv,he),fe;},"bpmn:UserTask":function(Z,D,F={}){F=wi(F,["fill","stroke"]);var fe=Ze(Z,D,F),he=15,xe=12,nt=i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:he,y:xe}});A(Z,nt,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:.5});var Je=i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:he,y:xe}});A(Z,Je,{fill:oi(D,l,F.fill),stroke:It(D,p,F.stroke),strokeWidth:.5});var Ge=i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:he,y:xe}});return A(Z,Ge,{fill:It(D,p,F.stroke),stroke:It(D,p,F.stroke),strokeWidth:.5}),fe;},label:function(Z,D,F={}){return rt(Z,D,F);}};this._drawPath=A,this._renderer=Q;}Fe(Ap,Fl);Ap.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];Ap.prototype.canRender=function(n){return z(n,"bpmn:BaseElement");};Ap.prototype.drawShape=function(n,t,e={}){var{type:i}=t,o=this._renderer(i);return o(n,t,e);};Ap.prototype.drawConnection=function(n,t,e={}){var{type:i}=t,o=this._renderer(i);return o(n,t,e);};Ap.prototype.getShapePath=function(n){return Ut(n)?W0(n,Ire):z(n,"bpmn:Event")?Yv(n):z(n,"bpmn:Activity")?W0(n,Zv):z(n,"bpmn:Gateway")?j4(n):L4(n);};function wi(n,t=[]){return t.reduce((e,i)=>(n[i]&&(e[i]=n[i]),e),{});}var Nre=0,Are={width:150,height:50};function Dre(n){var t=n.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"};}function jre(n){return eo(n)?me({top:0,left:0,right:0,bottom:0},n):{top:n,left:n,right:n,bottom:n};}var HM=null;function Lre(){return HM||(HM=document.createElement("canvas").getContext("2d")),HM;}function zre(n){var t=[];return n.fontStyle&&t.push(n.fontStyle),n.fontVariant&&t.push(n.fontVariant),n.fontWeight&&t.push(n.fontWeight),n.fontStretch&&t.push(n.fontStretch),t.push(F4(n.fontSize)||"12px"),t.push(n.fontFamily||"sans-serif"),t.join(" ");}function F4(n){if(n!=null)return typeof n=="number"||/^-?\d+(\.\d+)?$/.test(n)?n+"px":n;}function Fre(n,t){var e=Lre();if(!e)return{width:0,height:0};e.font=zre(t),"letterSpacing"in e&&(e.letterSpacing=F4(t.letterSpacing)||"0px");var i=n==="",o=i?"dummy":n.replace(/\s+$/,""),a=e.measureText(o);return{width:i?0:a.width,height:"fontBoundingBoxAscent"in a?a.fontBoundingBoxAscent+a.fontBoundingBoxDescent:a.actualBoundingBoxAscent+a.actualBoundingBoxDescent};}function Bre(n,t,e){for(var i=n.shift(),o=i,a;;){if(a=Fre(o,e),a.width=o?a.width:0,o===" "||o===""||a.width<Math.round(t)||o.length<2)return $re(n,o,i,a);o=Gre(o,a.width,t);}}function $re(n,t,e,i){if(t.length<e.length){var o=e.slice(t.length).trim();n.unshift(o);}return{width:i.width,height:i.height,text:t};}var z4="\xAD";function Vre(n,t){var e=n.split(/(\s|-|\u00AD)/g),i,o=[],a=0;if(e.length>1)for(;i=e.shift();)if(i.length+a<t)o.push(i),a+=i.length;else{(i==="-"||i===z4)&&o.pop();break;}var r=o[o.length-1];return r&&r===z4&&(o[o.length-1]="-"),o.join("");}function Gre(n,t,e){var i=Math.max(n.length*(e/t),1),o=Vre(n,i);return o||(o=n.slice(0,Math.max(Math.round(i-1),1))),o;}function gh(n){this._config=me({},{size:Are,padding:Nre,style:{},align:"center-top"},n||{});}gh.prototype.createText=function(n,t){return this.layoutText(n,t).element;};gh.prototype.getDimensions=function(n,t){return this.layoutText(n,t).dimensions;};gh.prototype.layoutText=function(n,t){for(var e=me({},this._config.size,t.box),i=me({},this._config.style,t.style),o=Dre(t.align||this._config.align),a=jre(t.padding!==void 0?t.padding:this._config.padding),r=t.fitBox||!1,l=qre(i),p=n.split(/\u00AD?\r?\n/),d=[],f=e.width-a.left-a.right;p.length;
603)d.push(Bre(p,f,i));o.vertical==="middle"&&(a.top=a.bottom=0);var h=_a(d,function(O,V,j){return O+(l||V.height);},0)+a.top+a.bottom,g=_a(d,function(O,V,j){return V.width>O?V.width:O;},0),b=a.top;o.vertical==="middle"&&(b+=(e.height-h)/2),b-=(l||d[0].height)/4;var w=xt("text");lt(w,i),ne(d,function(O){var V;switch(b+=l||O.height,o.horizontal){case"left":V=a.left;break;case"right":V=(r?g:f)-a.right-O.width;break;default:V=Math.max(((r?g:f)-O.width)/2+a.left,0);}var j=xt("tspan");lt(j,{x:V,y:b}),j.textContent=O.text,Kt(w,j);});var T={width:g,height:h};return{dimensions:T,element:w};};function qre(n){if("fontSize"in n&&"lineHeight"in n)return n.lineHeight*parseInt(n.fontSize,10);}var Jre=12,Hre=1.2,Ure=40;function Qv(n){var t=me({fontFamily:"Arial, sans-serif",fontSize:Jre,fontWeight:"normal",lineHeight:Hre},n&&n.defaultStyle||{}),e=parseInt(t.fontSize,10)-1,i=me({},t,{fontSize:e},n&&n.externalStyle||{}),o=new gh({style:t});this.getExternalLabelBounds=function(r,l){var p={width:Math.max(r.width,Wc.width),height:30},d=a(l,p,{style:i});return{x:Math.round(r.x+r.width/2-d.width/2),y:r.y,width:Math.ceil(d.width),height:Math.ceil(d.height)};},this.getTextAnnotationBounds=function(r,l){var p=a(l,r,{style:t,align:"left-top",padding:Np});return{x:r.x,y:r.y,width:r.width,height:Math.max(Ure,Math.round(p.height))};},this.getDimensions=function(r,l){return o.getDimensions(r,l||{});};function a(r,l,p){return o.getDimensions(r,me({box:l},p));}this.createText=function(r,l){return o.createText(r,l||{});},this.getDefaultStyle=function(){return t;},this.getExternalStyle=function(){return i;};}Qv.$inject=["config.textRenderer"];function UM
vendor: 10,194 bytes, line 603
603(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(
603t){return this.pathMap[t].d;},this.getScaledPath=function(t,e){var i=this.pathMap[t],o,a;e.abspos?(o=e.abspos.x,a=e.abspos.y):(o=e.containerWidth*e.position.mx,a=e.containerHeight*e.position.my);var r={};if(e.position){for(var l=e.containerHeight/i.height*e.yScaleFactor,p=e.containerWidth/i.width*e.xScaleFactor,d=0;d<i.heightElements.length;d++)r["y"+d]=i.heightElements[d]*l;for(var f=0;f<i.widthElements.length;f++)r["x"+f]=i.widthElements[f]*p;}var h=Kre(i.d,{mx:o,my:a,e:r});return h;};}var Wre=/\{([^{}]+)\}/g,Xre=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Yre(n,t,e){var i=e;return t.replace(Xre,function(o,a,r,l,p){a=a||l,i&&(a in i&&(i=i[a]),typeof i=="function"&&p&&(i=i()));}),i=(i==null||i==e?n:i)+"",i;}function Kre(n,t){return String(n).replace(Wre,function(e,i){return Yre(e,i,t);});}var B4={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ap],textRenderer:["type",Qv],pathMap:["type",UM]};function WM(n,t){return t=t||{},n.replace(/{([^}]+)}/g,function(e,i){return t[i]||"{"+i+"}";});}var im={translate:["value",WM]};function eb(n,t,e){return me({id:n.id,type:n.$type,businessObject:n,di:t},e);}function Zre(n,t,e){var i=n.waypoint;return!i||i.length<2?[Rt(t),Rt(e)]:i.map(function(o){return{x:o.x,y:o.y};});}function $4(n,t,e){return new Error(`element ${pr(t)} referenced by ${pr(n)}#${e} not yet drawn`);}function xc(n,t,e,i,o){this._eventBus=n,this._canvas=t,this._elementFactory=e,this._elementRegistry=i,this._textRenderer=o;}xc.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"];xc.prototype.add=function(n,t,e){var i,o,a;if(z(t,"bpmndi:BPMNPlane")){var r=z(n,"bpmn:SubProcess")?{id:n.id+"_plane"}:{};i=this._elementFactory.createRoot(eb(n,t,r)),this._canvas.addRootElement(i);}else if(z(t,"bpmndi:BPMNShape")){var l=!mn(n,t),p=ese(n);o=e&&(e.hidden||e.collapsed);var d=t.bounds;i=this._elementFactory.createShape(eb(n,t,{collapsed:l,hidden:o,x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),isFrame:p})),z(n,"bpmn:BoundaryEvent")&&this._attachBoundary(n,i),z(n,"bpmn:Lane")&&(a=0),z(n,"bpmn:DataStoreReference")&&(Qre(e,Rt(d))||(e=this._canvas.findRoot(e))),this._canvas.addShape(i,e,a);}else if(z(t,"bpmndi:BPMNEdge")){var f=this._getSource(n),h=this._getTarget(n);o=e&&(e.hidden||e.collapsed),i=this._elementFactory.createConnection(eb(n,t,{hidden:o,source:f,target:h,waypoints:Zre(t,f,h)})),z(n,"bpmn:DataAssociation")&&(e=this._canvas.findRoot(e)),this._canvas.addConnection(i,e,a);}else throw new Error(`unknown di ${pr(t)} for element ${pr(n)}`);return tl(n)&&za(i)&&this.addLabel(n,t,i),this._eventBus.fire("bpmnElement.added",{element:i}),i;};xc.prototype._attachBoundary=function(n,t){var e=n.attachedToRef;if(!e)throw new Error(`missing ${pr(n)}#attachedToRef`);var i=this._elementRegistry.get(e.id),o=i&&i.attachers;if(!i)throw $4(n,e,"attachedToRef");t.host=i,o||(i.attachers=o=[]),o.indexOf(t)===-1&&o.push(t);};xc.prototype.addLabel=function(n,t,e){var i,o,a;return i=I4(t,e),o=za(e),o&&(i=this._textRenderer.getExternalLabelBounds(i,o)),a=this._elementFactory.createLabel(eb(n,t,{id:n.id+"_label",labelTarget:e,type:"label",hidden:e.hidden||!za(e),x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)})),this._canvas.addShape(a,e.parent);};xc.prototype._getConnectedElement=function(n,t){var e,i,o=n.$type;if(i=n[t+"Ref"],t==="source"&&o==="bpmn:DataInputAssociation"&&(i=i&&i[0]),(t==="source"&&o==="bpmn:DataOutputAssociation"||t==="target"&&o==="bpmn:DataInputAssociation")&&(i=n.$parent),e=i&&this._getElement(i),e)return e;throw i?$4(n,i,t+"Ref"):new Error(`${pr(n)}#${t} Ref not specified`);};xc.prototype._getSource=function(n){return this._getConnectedElement(n,"source");};xc.prototype._getTarget=function(n){return this._getConnectedElement(n,"target");};xc.prototype._getElement=function(n){return this._elementRegistry.get(n.id);};function Qre(n,t){var e=t.x,i=t.y;return e>=n.x&&e<=n.x+n.width&&i>=n.y&&i<=n.y+n.height;}function ese(n){return z(n,"bpmn:Group");}var V4={__depends__:[im],bpmnImporter:["type",xc]};var G4={__depends__:[B4,V4]};function Gl(n){this._counter=0,this._prefix=(n?n+"-":"")+Math.floor(Math.random()*1e9)+"-";}Gl.prototype.next=function(){return this._prefix+ ++this._counter;};var tse=new Gl("ov"),nse=500;function Fa(n,t,e,i){this._eventBus=t,this._canvas=e,this._elementRegistry=i,this._ids=tse,this._overlayDefaults=me({show:null,scale:!0},n&&n.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=ise(e.getContainer()),this._init();}Fa.$inject=["config.overlays","eventBus","canvas","elementRegistry"];Fa.prototype.get=function(n){if(ka(n)&&(n={id:n}),ka(n.element)&&(n.element=this._elementRegistry.get(n.element)),n.element){var t=this._getOverlayContainer(n.element,!0);return t?n.type?Yt(t.overlays,fc({type:n.type})):t.overlays.slice():[];}else return n.type?Yt(this._overlays,fc({type:n.type})):n.id?this._overlays[n.id]:null;};
603Fa.prototype.add=function(n,t,e){if(eo(t)&&(e=t,t=null),n.id||(n=this._elementRegistry.get(n)),!e.position)throw new Error("must specifiy overlay position");if(!e.html)throw new Error("must specifiy overlay html");if(!n)throw new Error("invalid element specified");var i=this._ids.next();return e=me({},this._overlayDefaults,e,{id:i,type:t,element:n,html:e.html}),this._addOverlay(e),i;};Fa.prototype.remove=function(n){var t=this.get(n)||[];gt(t)||(t=[t]);var e=this;ne(t,function(i){var o=e._getOverlayContainer(i.element,!0);if(i&&(Cs(i.html),Cs(i.htmlContainer),delete i.htmlContainer,delete i.element,delete e._overlays[i.id]),o){var a=o.overlays.indexOf(i);a!==-1&&o.overlays.splice(a,1);}});};Fa.prototype.isShown=function(){return this._overlayRoot.style.display!=="none";};Fa.prototype.show=function(){tb(this._overlayRoot);};Fa.prototype.hide=function(){tb(this._overlayRoot,!1);};Fa.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Jd(this._overlayRoot);};Fa.prototype._updateOverlayContainer=function(n){var t=n.element,e=n.html,i=t.x,o=t.y;if(t.waypoints){var a=Pi(t);i=a.x,o=a.y;}q4(e,i,o),Zo(n.html,"data-container-id",t.id);};Fa.prototype._updateOverlay=function(n){var t=n.position,e=n.htmlContainer,i=n.element,o=t.left,a=t.top;if(t.right!==void 0){var r;i.waypoints?r=Pi(i).width:r=i.width,o=t.right*-1+r;}if(t.bottom!==void 0){var l;i.waypoints?l=Pi(i).height:l=i.height,a=t.bottom*-1+l;}q4(e,o||0,a||0),this._updateOverlayVisibilty(n,this._canvas.viewbox());};Fa.prototype._createOverlayContainer=function(n){var t=ri('<div class="djs-overlays" />');La(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var e={html:t,element:n,overlays:[]};return this._updateOverlayContainer(e),this._overlayContainers.push(e),e;};Fa.prototype._updateRoot=function(n){var t=n.scale||1,e="matrix("+[t,0,0,t,-1*n.x*t,-1*n.y*t].join(",")+")";J4(this._overlayRoot,e);};Fa.prototype._getOverlayContainer=function(n,t){var e=$n(this._overlayContainers,function(i){return i.element===n;});return!e&&!t?this._createOverlayContainer(n):e;};Fa.prototype._addOverlay=function(n){var t=n.id,e=n.element,i=n.html,o,a;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),ka(i)&&(i=ri(i)),a=this._getOverlayContainer(e),o=ri('<div class="djs-overlay" data-overlay-id="'+t+'">'),La(o,{position:"absolute"}),o.appendChild(i),n.type&&Ji(o).add("djs-overlay-"+n.type);var r=this._canvas.findRoot(e),l=this._canvas.getRootElement();tb(o,r===l),n.htmlContainer=o,a.overlays.push(n),a.html.appendChild(o),this._overlays[t]=n,this._updateOverlay(n),this._updateOverlayVisibilty(n,this._canvas.viewbox());};Fa.prototype._updateOverlayVisibilty=function(n,t){var e=n.show,i=this._canvas.findRoot(n.element),o=e&&e.minZoom,a=e&&e.maxZoom,r=n.htmlContainer,l=this._canvas.getRootElement(),p=!0;(i!==l||e&&(Ko(o)&&o>t.scale||Ko(a)&&a<t.scale))&&(p=!1),tb(r,p),this._updateOverlayScale(n,t);};Fa.prototype._updateOverlayScale=function(n,t){var e=n.scale,i,o,a=n.htmlContainer,r,l="";e!==!0&&(e===!1?(i=1,o=1):(i=e.min,o=e.max),Ko(i)&&t.scale<i&&(r=(1/t.scale||1)*i),Ko(o)&&t.scale>o&&(r=(1/t.scale||1)*o)),Ko(r)&&(l="scale("+r+","+r+")"),J4(a,l);};Fa.prototype._updateOverlaysVisibilty=function(n){var t=this;ne(this._overlays,function(e){t._updateOverlayVisibilty(e,n);});};Fa.prototype._init=function(){var n=this._eventBus,t=this;function e(i){t._updateRoot(i),t._updateOverlaysVisibilty(i),t.show();}n.on("canvas.viewbox.changing",function(i){t.hide();}),n.on("canvas.viewbox.changed",function(i){e(i.viewbox);}),n.on(["shape.remove","connection.remove"],function(i){var o=i.element,a=t.get({element:o});ne(a,function(p){t.remove(p.id);});var r=t._getOverlayContainer(o);if(r){Cs(r.html);var l=t._overlayContainers.indexOf(r);l!==-1&&t._overlayContainers.splice(l,1);}}),n.on("element.changed",nse,function(i){var o=i.element,a=t._getOverlayContainer(o,!0);a&&(ne(a.overlays,function(r){t._updateOverlay(r);}),t._updateOverlayContainer(a));}),n.on("element.marker.update",function(i){var o=t._getOverlayContainer(i.element,!0);o&&Ji(o.html)[i.add?"add":"remove"](i.marker);}),n.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox());}),n.on("diagram.clear",this.clear,this);};function ise(n){var t=ri('<div class="djs-overlay-container" />');return La(t,{position:"absolute",width:0,height:0}),n.insertBefore(t,n.firstChild),t;}
603function q4(n,t,e){La(n,{left:t+"px",top:e+"px"});}function tb(n,t){n.style.display=t===!1?"none":"";}function J4(n,t){n.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(e){n.style[e+"transform"]=t;});}var om={__init__:["overlays"],overlays:["type",Fa]};function nb(n,t,e,i){n.on("element.changed",function(o){var a=o.element;(a.parent||a===t.getRootElement())&&(o.gfx=e.getGraphics(a)),o.gfx&&n.fire(Rv(a)+".changed",o);}),n.on("elements.changed",function(o){var a=o.elements;a.forEach(function(r){n.fire("element.changed",{element:r});}),i.updateContainments(a);}),n.on("shape.changed",function(o){i.update("shape",o.element,o.gfx);}),n.on("connection.changed",function(o){i.update("connection",o.element,o.gfx);});}nb.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var xh={__init__:["changeSupport"],changeSupport:["type",nb]};var ose=1e3;function Re(n){this._eventBus=n;}Re.$inject=["eventBus"];function ase(n,t){return function(e){return n.call(t||null,e.context,e.command,e);};}Re.prototype.on=function(n,t,e,i,o,a){if((qo(t)||nn(t))&&(a=o,o=i,i=e,e=t,t=null),qo(e)&&(a=o,o=i,i=e,e=ose),eo(o)&&(a=o,o=!1),!qo(i))throw new Error("handlerFn must be a function");gt(n)||(n=[n]);var r=this._eventBus;ne(n,function(l){var p=["commandStack",l,t].filter(function(d){return d;}).join(".");r.on(p,e,o?ase(i,a):i,a);});};Re.prototype.canExecute=Dp("canExecute");Re.prototype.preExecute=Dp("preExecute");Re.prototype.preExecuted=Dp("preExecuted");Re.prototype.execute=Dp("execute");Re.prototype.executed=Dp("executed");Re.prototype.postExecute=Dp("postExecute");Re.prototype.postExecuted=Dp("postExecuted");Re.prototype.revert=Dp("revert");Re.prototype.reverted=Dp("reverted");function Dp(n){return function(e,i,o,a,r){(qo(e)||nn(e))&&(r=a,a=o,o=i,i=e,e=null),this.on(e,n,i,o,a,r);};}function X0(n,t){t.invoke(Re,this),this.executed(function(e){var i=e.context;i.rootElement?n.setRootElement(i.rootElement):i.rootElement=n.getRootElement();}),this.revert(function(e){var i=e.context;i.rootElement&&n.setRootElement(i.rootElement);});}Fe(X0,Re);X0.$inject=["canvas","injector"];var H4={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",X0]};function jp(n){return CSS.escape(n);}var rse={"&":"&","<":"<",">":">",'"':""","'":"'"};function Y0(n){return n=""+n,n&&n.replace(/[&<>"']/g,function(t){return rse[t];});}var U4="_plane";function XM(n){var t=n.id;return sse(t);}function il(n){var t=n.id;return z(n,"bpmn:SubProcess")?W4(t):t;}function am(n){return W4(n);}function Ch(n){var t=In(n);return z(t,"bpmndi:BPMNPlane");}function W4(n){return n+U4;}function sse(n){return n.replace(new RegExp(U4+"$"),"");}var lse="bjs-breadcrumbs-shown";function ib(n,t,e){var i=ri('<ul class="bjs-breadcrumbs"></ul>'),o=e.getContainer(),a=Ji(o);o.appendChild(i);var r=[];n.on("element.changed",function(p){var d=p.element,f=qe(d),h=$n(r,function(g){return g===f;});h&&l();});function l(p){p&&(r=cse(p));var d=r.flatMap(function(h){var g=e.findRoot(il(h))||e.findRoot(h.id);if(!g&&z(h,"bpmn:Process")){var b=t.find(function(w){var T=qe(w);return T&&T.get("processRef")===h;});g=b&&e.findRoot(b.id);}return g?[{parent:h,parentPlane:g}]:[];});i.innerHTML="";var f=d.length>1;a.toggle(lse,f),d.forEach(function(h,g){var b=h.parent,w=h.parentPlane,T=Y0(b.name||b.id),O=g===d.length-1,V;if(O)V=ri('<li><span class="bjs-crumb" title="'+T+'">'+T+"</span></li>");else{var j="#"+Y0(b.id);V=ri('<li><a class="bjs-crumb" href="'+j+'" title="'+T+'">'+T+"</a></li>"),V.addEventListener("click",function(L){L.preventDefault(),e.setRootElement(w);});}i.appendChild(V);});}n.on("root.set",function(p){l(p.element);});}ib.$inject=["eventBus","elementRegistry","canvas"];function cse(n){for(var t=qe(n),e=[],i=t;i;i=i.$parent)(z(i,"bpmn:SubProcess")||z(i,"bpmn:Process"))&&e.push(i);return e.reverse();}function ob(n,t){var e=null,i=new pse();n.on("root.set",function(o){var a=o.element,r=t.viewbox(),l=i.get(a);if(i.set(e,{x:r.x,y:r.y,zoom:r.scale}),e=a,!(!z(a,"bpmn:SubProcess")&&!l)){l=l||{x:0,y:0,zoom:1};var p=(r.x-l.x)*r.scale,d=(r.y-l.y)*r.scale;(p!==0||d!==0)&&t.scroll({dx:p,dy:d}),l.zoom!==r.scale&&t.zoom(l.zoom,{x:0,y:0});}}),n.on("diagram.clear",function(){i.clear(),e=null;});}ob.$inject=["eventBus","canvas"];function pse(){this._entries=[],this.set=function(n,t){var e=!1;for(var i in this._entries)if(this._entries[i][0]===n){this._entries[i][1]=t,e=!0;break;}e||this._entries.push([n,t]);},this.get=function(n){for(var t in this._entries)if(this._entries[t][0]===n)return this._entries[t][1];return null;},this.clear=function(){this._entries.length=0;},this.remove=function(n){var t=-1;for(var e in this._entries)if(this._entries[e][0]===n){t=e;break;}t!==-1&&this._entries.splice(t,1);};}var X4={x:180,y:160};function Lp(n,t){this._eventBus=n,this._moddle=t;var e=this;n.on("import.render.start",1500,function(i,o){e._handleImport(o.definitions);});}Lp.prototype._handleImport=function(n){if(n.diagrams){var t=this;this._definitions=n,this._processToDiagramMap={}
603,n.diagrams.forEach(function(i){!i.plane||!i.plane.bpmnElement||(t._processToDiagramMap[i.plane.bpmnElement.id]=i);});var e=n.diagrams.filter(i=>i.plane).flatMap(i=>t._createNewDiagrams(i.plane));e.forEach(function(i){t._movePlaneElementsToOrigin(i.plane);});}};Lp.prototype._createNewDiagrams=function(n){var t=this,e=[],i=[];n.get("planeElement").forEach(function(a){var r=a.bpmnElement;if(r){var l=r.$parent;z(r,"bpmn:SubProcess")&&!a.isExpanded&&e.push(r),mse(r,n)&&i.push({diElement:a,parent:l});}});var o=[];return e.forEach(function(a){if(!t._processToDiagramMap[a.id]){var r=t._createDiagram(a);t._processToDiagramMap[a.id]=r,o.push(r);}}),i.forEach(function(a){for(var r=a.diElement,l=a.parent;l&&e.indexOf(l)===-1;)l=l.$parent;if(l){var p=t._processToDiagramMap[l.id];t._moveToDiPlane(r,p.plane);}}),o;};Lp.prototype._movePlaneElementsToOrigin=function(n){var t=n.get("planeElement"),e=dse(n),i={x:e.x-X4.x,y:e.y-X4.y};t.forEach(function(o){o.waypoint?o.waypoint.forEach(function(a){a.x=a.x-i.x,a.y=a.y-i.y;}):o.bounds&&(o.bounds.x=o.bounds.x-i.x,o.bounds.y=o.bounds.y-i.y);});};Lp.prototype._moveToDiPlane=function(n,t){var e=Y4(n),i=e.plane.get("planeElement");i.splice(i.indexOf(n),1),t.get("planeElement").push(n);};Lp.prototype._createDiagram=function(n){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:n}),e=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=e,t.bpmnElement=n,e.$parent=this._definitions,this._definitions.diagrams.push(e),e;};Lp.$inject=["eventBus","moddle"];function Y4(n){return z(n,"bpmndi:BPMNDiagram")?n:Y4(n.$parent);}function dse(n){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return n.planeElement.forEach(function(e){if(e.bounds){var i=Ot(e.bounds);t.top=Math.min(i.top,t.top),t.left=Math.min(i.left,t.left);}}),lu(t);}function mse(n,t){var e=n.$parent;return!(!z(e,"bpmn:SubProcess")||e===t.bpmnElement||en(n,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]));}var ab=250,use='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',fse="bjs-drilldown-empty";function Xc(n,t,e,i,o){Re.call(this,t),this._canvas=n,this._eventBus=t,this._elementRegistry=e,this._overlays=i,this._translate=o;var a=this;this.executed("shape.toggleCollapse",ab,function(r){var l=r.shape;a._canDrillDown(l)?a._addOverlay(l):a._removeOverlay(l);},!0),this.reverted("shape.toggleCollapse",ab,function(r){var l=r.shape;a._canDrillDown(l)?a._addOverlay(l):a._removeOverlay(l);},!0),this.executed(["shape.create","shape.move","shape.delete"],ab,function(r){var l=r.oldParent,p=r.newParent||r.parent,d=r.shape;a._canDrillDown(d)&&a._addOverlay(d),a._updateDrilldownOverlay(l),a._updateDrilldownOverlay(p),a._updateDrilldownOverlay(d);},!0),this.reverted(["shape.create","shape.move","shape.delete"],ab,function(r){var l=r.oldParent,p=r.newParent||r.parent,d=r.shape;a._canDrillDown(d)&&a._addOverlay(d),a._updateDrilldownOverlay(l),a._updateDrilldownOverlay(p),a._updateDrilldownOverlay(d);},!0),t.on("import.render.complete",function(){e.filter(function(r){return a._canDrillDown(r);}).map(function(r){a._addOverlay(r);});});}Fe(Xc,Re);Xc.prototype._updateDrilldownOverlay=function(n){var t=this._canvas;if(n){var e=t.findRoot(n);e&&this._updateOverlayVisibility(e);}};Xc.prototype._canDrillDown=function(n){var t=this._canvas;return z(n,"bpmn:SubProcess")&&t.findRoot(il(n));};Xc.prototype._updateOverlayVisibility=function(n){var t=this._overlays,e=qe(n),i=t.get({element:e.id,type:"drilldown"})[0];if(i){var o=e&&e.get("flowElements")&&e.get("flowElements").length;Ji(i.html).toggle(fse,!o);}};Xc.prototype._addOverlay=function(n){var t=this._canvas,e=this._overlays,i=qe(n),o=e.get({element:n,type:"drilldown"});o.length&&this._removeOverlay(n);var a=ri('<button type="button" class="bjs-drilldown">'+use+"</button>"),r=i.get("name")||i.get("id"),l=this._translate("Open {element}",{element:r});a.setAttribute("title",l),a.addEventListener("click",function(){t.setRootElement(t.findRoot(il(n)));}),e.add(n,"drilldown",{position:{bottom:-7,right:-8},html:a}),this._updateOverlayVisibility(n);};Xc.prototype._removeOverlay=function(n){var t=this._overlays;t.remove({element:n,type:"drilldown"});};Xc.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var K4={__depends__:[om,xh,H4],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",ib],drilldownCentering:["type",ob],drilldownOverlayBehavior:["type",Xc],subprocessCompatibility:["type",Lp]};function Z4(n){!n||typeof n.stopPropagation!="function"||n.stopPropagation();}function zp(n){return n.originalEvent||n.srcEvent;}function rb(n){Z4(n),Z4(zp(n));}function ql(n){return n.pointers&&n.pointers.length&&(n=n.pointers[0]),n.touches&&n.touches.length&&(n=n.touches[0]),n?{x:n.clientX,y:n.clientY}:null;}
603function sb(){return /mac/i.test(navigator.platform);}function Q4(n,t){return(zp(n)||n).button===t;}function ol(n){return Q4(n,0);}function e8(n){return Q4(n,1);}function Fp(n){var t=zp(n)||n;return ol(n)?sb()?t.metaKey:t.ctrlKey:!1;}function fu(n){var t=zp(n)||n;return ol(n)&&t.shiftKey;}function hse(n){return!0;}function lb(n){return ol(n)||e8(n);}var t8=500;function cb(n,t,e){var i=this;function o(U,ce,W){if(!l(U,ce)){var Y,se,de;W?se=t.getGraphics(W):(Y=ce.delegateTarget||ce.target,Y&&(se=Y,W=t.get(se))),!(!se||!W)&&(de=n.fire(U,{element:W,gfx:se,originalEvent:ce}),de===!1&&(ce.stopPropagation(),ce.preventDefault()));}}var a={};function r(U){return a[U];}function l(U,ce){var W=d[U]||ol;return!W(ce);}var p={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},d={"element.contextmenu":hse,"element.mousedown":lb,"element.mouseup":lb,"element.click":lb,"element.dblclick":lb};function f(U,ce,W){var Y=p[U];if(!Y)throw new Error("unmapped DOM event name <"+U+">");return o(Y,ce,W);}var h="svg, .djs-element";function g(U,ce,W,Y){var se=a[W]=function(de){o(W,de);};Y&&(d[W]=Y),se.$delegate=wa.bind(U,h,ce,se);}function b(U,ce,W){var Y=r(W);Y&&wa.unbind(U,ce,Y.$delegate);}function w(U){ne(p,function(ce,W){g(U,W,ce);});}function T(U){ne(p,function(ce,W){b(U,W,ce);});}n.on("canvas.destroy",function(U){T(U.svg);}),n.on("canvas.init",function(U){w(U.svg);}),n.on(["shape.added","connection.added"],function(U){var ce=U.element,W=U.gfx;n.fire("interactionEvents.createHit",{element:ce,gfx:W});}),n.on(["shape.changed","connection.changed"],t8,function(U){var ce=U.element,W=U.gfx;n.fire("interactionEvents.updateHit",{element:ce,gfx:W});}),n.on("interactionEvents.createHit",t8,function(U){var ce=U.element,W=U.gfx;i.createDefaultHit(ce,W);}),n.on("interactionEvents.updateHit",function(U){var ce=U.element,W=U.gfx;i.updateDefaultHit(ce,W);});var O=J("djs-hit djs-hit-stroke"),V=J("djs-hit djs-hit-click-stroke"),j=J("djs-hit djs-hit-all"),L=J("djs-hit djs-hit-no-move"),A={all:j,"click-stroke":V,stroke:O,"no-move":L};function J(U,ce){return ce=me({stroke:"white",strokeWidth:15},ce||{}),e.cls(U,["no-fill","no-border"],ce);}function Q(U,ce){var W=A[ce];if(!W)throw new Error("invalid hit type <"+ce+">");return lt(U,W),U;}function te(U,ce){Kt(U,ce);}this.removeHits=function(U){var ce=ru(".djs-hit",U);ne(ce,Hi);},this.createDefaultHit=function(U,ce){var W=U.waypoints,Y=U.isFrame,se;return W?this.createWaypointsHit(ce,W):(se=Y?"stroke":"all",this.createBoxHit(ce,se,{width:U.width,height:U.height}));},this.createWaypointsHit=function(U,ce){var W=Bc(ce);return Q(W,"stroke"),te(U,W),W;},this.createBoxHit=function(U,ce,W){W=me({x:0,y:0},W);var Y=xt("rect");return Q(Y,ce),lt(Y,W),te(U,Y),Y;},this.updateDefaultHit=function(U,ce){var W=si(".djs-hit",ce);if(W)return U.waypoints?L0(W,U.waypoints):lt(W,{width:U.width,height:U.height}),W;},this.fire=o,this.triggerMouseEvent=f,this.mouseHandler=r,this.registerEvent=g,this.unregisterEvent=b;}cb.$inject=["eventBus","elementRegistry","styles"];var rm={__init__:["interactionEvents"],interactionEvents:["type",cb]};function sm(n,t){this._eventBus=n,this._canvas=t,this._selectedElements=new Set();var e=this;n.on(["shape.remove","connection.remove"],function(i){var o=i.element;e.deselect(o);}),n.on(["diagram.clear","root.set"],function(i){e.select(null);});}sm.$inject=["eventBus","canvas"];sm.prototype.deselect=function(n){if(this._selectedElements.has(n)){var t=this.get();this._selectedElements.delete(n),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()});}};sm.prototype.get=function(){return Array.from(this._selectedElements);};sm.prototype.isSelected=function(n){return this._selectedElements.has(n);};sm.prototype.select=function(n,t){var e=this.get();gt(n)||(n=n?[n]:[]);var i=this._canvas,o=i.getRootElement();n=n.filter(function(a){var r=i.findRoot(a);return o===r;}),t?ne(n,a=>{this._selectedElements.add(a);}):this._selectedElements=new Set(n),this._eventBus.fire("selection.changed",{oldSelection:e,newSelection:this.get()});};var n8="hover",i8="selected";function pb(n,t){this._canvas=n;function e(o,a){n.addMarker(o,a);}function i(o,a){n.removeMarker(o,a);}t.on("element.hover",function(o){e(o.element,n8);}),t.on("element.out",function(o){i(o.element,n8);}),t.on("selection.changed",function(o){function a(d){i(d,i8);}function r(d){e(d,i8);}var l=new Set(o.oldSelection),p=new Set(o.newSelection);for(let d of l)p.has(d)||a(d);for(let d of p)l.has(d)||r(d);});}pb.$inject=["canvas","eventBus"];function db(n,t,e,i){n.on("create.end",500,function(o){var a=o.context,r=a.canExecute,l=a.elements,p=a.hints||{},d=p.autoSelect;if(r){if(d===!1)return;gt(d)?t.select(d):t.select(l.filter(_se));}}),n.on("connect.end",500,function(o){var a=o.context,r=a.connection;r&&t.select(r);}),n.on("shape.move.end",500,function(o){var a=o.previousSelection||[],r=i.get(o.context.shape.id),l=$n(a,function(p){return r.id===p.id;});l||t.select(r);}
603),n.on("element.click",function(o){if(ol(o)){var a=o.element;a===e.getRootElement()&&(a=null);var r=t.isSelected(a),l=t.get().length>1,p=fu(o);if(r&&l)return p?t.deselect(a):t.select(a);r?t.deselect(a):t.select(a,p);}});}db.$inject=["eventBus","selection","canvas","elementRegistry"];function _se(n){return!n.hidden;}var la={__init__:["selectionVisuals","selectionBehavior"],__depends__:[rm],selection:["type",sm],selectionVisuals:["type",pb],selectionBehavior:["type",db]};function Cc(n){Ho.call(this,n);}Fe(Cc,Ho);Cc.prototype._modules=[G4,K4,om,la,im];Cc.prototype._moddleExtensions={};var gse=300;function mb(n,t,e){this._selectionWasVisible=!1;let i=au(()=>{this._selectionWasVisible=o();},gse);n.on("canvas.viewbox.changed",i),n.on("selection.changed",i),n.on("diagram.destroy",()=>{i.cancel();}),n.on("canvas.resized",()=>{var a=e.get();if(a.length&&this._selectionWasVisible&&!o()){var r=t.getRootElement();t.scrollToElement(a.concat(r));}});function o(){var a=e.get();if(!a.length)return!1;var r=Pi(a),l=t.viewbox(),p=Ot(r),d=Ot(l);return p.left>=d.left&&p.right<=d.right&&p.top>=d.top&&p.bottom<=d.bottom;}this._flush=i.flush;}mb.$inject=["eventBus","canvas","selection"];var ub={__init__:["keepSelectionVisible"],__depends__:[la],keepSelectionVisible:["type",mb]};var o8=["c","C"],a8=["v","V"],xse=["d","D"],Cse=["x","X"],r8=["y","Y"],YM=["z","Z"];function s8(n){return n.ctrlKey||n.metaKey||n.shiftKey||n.altKey;}function Qa(n){return n.altKey?!1:n.ctrlKey||n.metaKey;}function ca(n,t){return n=gt(n)?n:[n],n.indexOf(t.key)!==-1||n.indexOf(t.code)!==-1;}function fb(n){return n.shiftKey;}function l8(n){return Qa(n)&&ca(o8,n);}function c8(n){return Qa(n)&&ca(a8,n);}function p8(n){return Qa(n)&&ca(xse,n);}function d8(n){return Qa(n)&&ca(Cse,n);}function m8(n){return Qa(n)&&!fb(n)&&ca(YM,n);}function u8(n){return Qa(n)&&(ca(r8,n)||ca(YM,n)&&fb(n));}var hb="keyboard.keydown",vse="keyboard.keyup",bse=1e3,f8="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function wr(n,t){var e=this;this._config=n=n||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",function(){e._fire("destroy"),e.unbind();}),n.bindTo&&console.error("unsupported configuration <keyboard.bindTo>",new Error(f8));var i=n&&n.bind!==!1;t.on("canvas.init",function(o){e._target=o.svg,i&&e.bind(),e._fire("init");});}wr.$inject=["config.keyboard","eventBus"];wr.prototype._keydownHandler=function(n){this._keyHandler(n,hb);};wr.prototype._keyupHandler=function(n){this._keyHandler(n,vse);};wr.prototype._keyHandler=function(n,t){var e;if(!this._isEventIgnored(n)){var i={keyEvent:n};e=this._eventBus.fire(t||hb,i),e&&n.preventDefault();}};wr.prototype._isEventIgnored=function(n){return!1;};wr.prototype.bind=function(n){n&&console.error("unsupported argument <node>",new Error(f8)),this.unbind(),n=this._node=this._target,Cn.bind(n,"keydown",this._keydownHandler),Cn.bind(n,"keyup",this._keyupHandler),this._fire("bind");};wr.prototype.getBinding=function(){return this._node;};wr.prototype.unbind=function(){var n=this._node;n&&(this._fire("unbind"),Cn.unbind(n,"keydown",this._keydownHandler),Cn.unbind(n,"keyup",this._keyupHandler)),this._node=null;};wr.prototype._fire=function(n){this._eventBus.fire("keyboard."+n,{node:this._node});};wr.prototype.addListener=function(n,t,e){qo(n)&&(e=t,t=n,n=bse),this._eventBus.on(e||hb,n,t);};wr.prototype.removeListener=function(n,t){this._eventBus.off(t||hb,n);};wr.prototype.hasModifier=s8;wr.prototype.isCmd=Qa;wr.prototype.isShift=fb;wr.prototype.isKey=ca;var yse=500;function Bp(n,t){var e=this;n.on("editorActions.init",yse,function(i){var o=i.editorActions;e.registerBindings(t,o);});}Bp.$inject=["eventBus","keyboard"];Bp.prototype.registerBindings=function(n,t){function e(i,o){t.isRegistered(i)&&n.addListener(o);}e("undo",function(i){var o=i.keyEvent;if(m8(o))return t.trigger("undo"),!0;}),e("redo",function(i){var o=i.keyEvent;if(u8(o))return t.trigger("redo"),!0;}),e("copy",function(i){var o=i.keyEvent;if(l8(o))return t.trigger("copy"),!0;}),e("paste",function(i){var o=i.keyEvent;if(c8(o))return t.trigger("paste"),!0;}),e("duplicate",function(i){var o=i.keyEvent;if(p8(o))return t.trigger("duplicate"),!0;}),e("cut",function(i){var o=i.keyEvent;if(d8(o))return t.trigger("cut"),!0;}),e("stepZoom",function(i){var o=i.keyEvent;if(ca(["+","Add","="],o)&&Qa(o))return t.trigger("stepZoom",{value:1}),!0;}),e("stepZoom",function(i){var o=i.keyEvent;if(ca(["-","Subtract"],o)&&Qa(o))return t.trigger("stepZoom",{value:-1}),!0;}),e("zoom",function(i){var o=i.keyEvent;if(ca("0",o)&&Qa(o))return t.trigger("zoom",{value:1}),!0;}),e("removeSelection",function(i){var o=i.keyEvent;if(ca(["Backspace","Delete","Del"],o))return t.trigger("removeSelection"),!0;});};var vh={__init__:["keyboard","keyboardBindings"],keyboard:["type",wr],keyboardBindings:["type",Bp]};var Pse={moveSpeed:50,moveSpeedAccelerated:200};function _b(n,t,e){var i=this;this._config=me({},Pse,n||{}),t.addListener(o);function o(a){var r=a.keyEvent,l=i._config;if(t.isCmd(r)&&t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],r)){var p=t.isShift(r)?l.moveSpeedAccelerated:l.moveSpeed,d;switch(r.key){case"ArrowLeft":case"Left":d="left";break;case"ArrowUp":case"Up":d="up";break;case"ArrowRight":case"Right":d="right";break;case"ArrowDown":case"Down":d="down";break;}return i.moveCanvas({speed:p,direction:d}),!0;}}this.moveCanvas=function(a){var r=0,l=0,p=a.speed,d=p/Math.min(Math.sqrt(e.viewbox().scale),1);switch(a.direction){case"left":r=d;break;case"up":l=d;break;case"right":r=-d;break;case"down":l=-d;break;}e.scroll({dx:r,dy:l});};}_b.$inject=["config.keyboardMove","keyboard","canvas"];var gb={__depends__:[vh],__init__:["keyboardMove"],keyboardMove:["type",_b]};var wse=/^djs-cursor-.*$/;function hu(n){var t=Ji(document.body);t.removeMatching(wse),n&&t.add("djs-cursor-"+n);}function xb(){hu(null);}var Sse=5e3;function Cb(n,t){t=t||"element.click";function e(){return!1;}return n.once(t,Sse,e),function(){n.off(t,e);};}function bh(n){return{x:n.x+n.width/2,y:n.y+n.height/2};}function Sr(n,t){return{x:n.x-t.x,y:n.y-t.y};}var Mse=15;function vb(n,t){var e;function i(l){return r(l.originalEvent);}n.on("canvas.focus.changed",function(l){l.focused?n.on("element.mousedown",500,i):n.off("element.mousedown",i);});function o(l){var p=e.start,d=e.button,f=ql(l),h=Sr(f,p);if(!e.dragging&&Ose(h)>Mse&&(e.dragging=!0,d===0&&Cb(n),hu("grab")),e.dragging){var g=e.last||e.start;
603h=Sr(f,g),t.scroll({dx:h.x,dy:h.y}),e.last=f;}l.preventDefault();}function a(l){Cn.unbind(document,"mousemove",o),Cn.unbind(document,"mouseup",a),e=null,xb();}function r(l){if(!Bs(l.target,".djs-draggable")){var p=l.button;if(!(p>=2||l.ctrlKey||l.shiftKey||l.altKey))return e={button:p,start:ql(l)},Cn.bind(document,"mousemove",o),Cn.bind(document,"mouseup",a),!0;}}this.isActive=function(){return!!e;};}vb.$inject=["eventBus","canvas"];function Ose(n){return Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2));}var bb={__init__:["moveCanvas"],moveCanvas:["type",vb]};function K0(n){return Math.log(n)/Math.log(10);}function KM(n,t){var e=K0(n.min),i=K0(n.max),o=Math.abs(e)+Math.abs(i);return o/t;}function h8(n,t){return Math.max(n.min,Math.min(n.max,t));}var Ese=Math.sign||function(n){return n>=0?1:-1;},ZM={min:.2,max:4},_8=10,Tse=.1,Ise=.75;function Jl(n,t,e){n=n||{},this._enabled=!1,this._canvas=e,this._container=e._container,this._handleWheel=Ra(this._handleWheel,this),this._totalDelta=0,this._scale=n.scale||Ise;var i=this;t.on("canvas.mouseover",function(){i._init(n.enabled!==!1);}),t.on("canvas.mouseout",function(){i._init(!1);});}Jl.$inject=["config.zoomScroll","eventBus","canvas"];Jl.prototype.scroll=function(t){this._canvas.scroll(t);};Jl.prototype.reset=function(){this._canvas.zoom("fit-viewport");};Jl.prototype.zoom=function(t,e){var i=KM(ZM,_8*2);this._totalDelta+=t,Math.abs(this._totalDelta)>Tse&&(this._zoom(t,e,i),this._totalDelta=0);};Jl.prototype._handleWheel=function(t){if(this._enabled){var e=this._container;t.preventDefault();var i=t.ctrlKey||sb()&&t.metaKey,o=t.shiftKey,a=-1*this._scale,r;if(i?a*=t.deltaMode===0?.02:.32:a*=t.deltaMode===0?1:16,i){var l=e.getBoundingClientRect(),p={x:t.clientX-l.left,y:t.clientY-l.top};r=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*Ese(t.deltaY)*a,this.zoom(r,p);}else o?r={dx:a*t.deltaY,dy:0}:r={dx:a*t.deltaX,dy:a*t.deltaY},this.scroll(r);}};Jl.prototype.stepZoom=function(t,e){var i=KM(ZM,_8);this._zoom(t,e,i);};Jl.prototype._zoom=function(n,t,e){var i=this._canvas,o=n>0?1:-1,a=K0(i.zoom()),r=Math.round(a/e)*e;r+=e*o;var l=Math.pow(10,r);i.zoom(h8(ZM,l),t);};Jl.prototype.toggle=function(t){var e=this._container,i=this._handleWheel,o=this._enabled;return typeof t>"u"&&(t=!o),o!==t&&Cn[t?"bind":"unbind"](e,"wheel",i,!1),this._enabled=t,t;};Jl.prototype._init=function(n){this.toggle(n);};var yb={__init__:["zoomScroll"],zoomScroll:["type",Jl]};function _u(n){Cc.call(this,n);}Fe(_u,Cc);_u.prototype._navigationModules=[ub,gb,bb,yb];_u.prototype._modules=[].concat(Cc.prototype._modules,_u.prototype._navigationModules);function QM(n){return n&&n[n.length-1];}function g8(n){return n.y;}function x8(n){return n.x;}var kse={left:x8,center:x8,right:function(n){return n.x+n.width;},top:g8,middle:g8,bottom:function(n){return n.y+n.height;}};function lm(n,t){this._modeling=n,this._rules=t;}lm.$inject=["modeling","rules"];lm.prototype._getOrientationDetails=function(n){var t=["top","bottom","middle"],e="x",i="width";return t.indexOf(n)!==-1&&(e="y",i="height"),{axis:e,dimension:i};};lm.prototype._isType=function(n,t){return t.indexOf(n)!==-1;};lm.prototype._alignmentPosition=function(n,t){var e=this._getOrientationDetails(n),i=e.axis,o=e.dimension,a={},r={},l=!1,p,d,f;function h(g,b){return Math.round((g[i]+b[i]+b[o])/2);}if(this._isType(n,["left","top"]))a[n]=t[0][i];else if(this._isType(n,["right","bottom"]))f=QM(t),a[n]=f[i]+f[o];else if(this._isType(n,["center","middle"])){if(ne(t,function(g){var b=g[i]+Math.round(g[o]/2);r[b]?r[b].elements.push(g):r[b]={elements:[g],center:b};}),p=jr(r,function(g){return g.elements.length>1&&(l=!0),g.elements.length;}),l)return a[n]=QM(p).center,a;d=t[0],t=jr(t,function(g){return g[i]+g[o];}),f=QM(t),a[n]=h(d,f);}return a;};lm.prototype.trigger=function(n,t){var e=this._modeling,i,o=Yt(n,function(p){return!(p.waypoints||p.host||p.labelTarget);});if(i=this._rules.allowed("elements.align",{elements:o}),gt(i)&&(o=i),!(o.length<2||!i)){var a=kse[t],r=jr(o,a),l=this._alignmentPosition(t,r);e.alignElements(r,l);}};var C8={__init__:["alignElements"],alignElements:["type",lm]};var Rse=new Gl();function cm(n){this._scheduled={},n.on("diagram.destroy",()=>
603{Object.keys(this._scheduled).forEach(t=>{this.cancel(t);});});}cm.$inject=["eventBus"];cm.prototype.schedule=function(n,t=Rse.next()){this.cancel(t);let e=this._schedule(n,t);return this._scheduled[t]=e,e.promise;};cm.prototype._schedule=function(n,t){let e=Nse();return{executionId:setTimeout(()=>{try{this._scheduled[t]=null;try{e.resolve(n());}catch(o){e.reject(o);}}catch(o){console.error("Scheduler#_schedule execution failed",o);}}),promise:e.promise};};cm.prototype.cancel=function(n){let t=this._scheduled[n];t&&(this._cancel(t),this._scheduled[n]=null);};cm.prototype._cancel=function(n){clearTimeout(n.executionId);};function Nse(){let n={};return n.promise=new Promise((t,e)=>{n.resolve=t,n.reject=e;}),n;}var v8={scheduler:["type",cm]};var Ase="djs-element-hidden",Pb=".entry",Dse=1e3,b8=8,jse=300;function ga(n,t,e,i){this._canvas=n,this._elementRegistry=t,this._eventBus=e,this._scheduler=i,this._current=null,this._init();}ga.$inject=["canvas","elementRegistry","eventBus","scheduler"];ga.prototype._init=function(){var n=this;this._eventBus.on("selection.changed",function(t){var e=t.newSelection,i=e.length?e.length===1?e[0]:e:null;i?n.open(i,!0):n.close();}),this._eventBus.on("elements.changed",function(t){var e=t.elements,i=n._current;if(i){var o=i.target,a=gt(o)?o:[o],r=a.filter(function(p){return e.includes(p);});if(r.length){n.close();var l=a.filter(function(p){return n._elementRegistry.get(p.id);});l.length&&n._updateAndOpen(l.length>1?l:l[0]);}}}),this._eventBus.on("canvas.viewbox.changed",function(){n._updatePosition();}),this._eventBus.on("element.marker.update",function(t){if(n.isOpen()){var e=t.element,i=n._current,o=gt(i.target)?i.target:[i.target];o.includes(e)&&n._updateVisibility();}}),this._container=this._createContainer();};ga.prototype._createContainer=function(){var n=ri('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(n),n;};ga.prototype.registerProvider=function(n,t){t||(t=n,n=Dse),this._eventBus.on("contextPad.getProviders",n,function(e){e.providers.push(t);});};ga.prototype.getEntries=function(n){var t=this._getProviders(),e=gt(n)?"getMultiElementContextPadEntries":"getContextPadEntries",i={};return ne(t,function(o){if(qo(o[e])){var a=o[e](n);qo(a)?i=a(i):ne(a,function(r,l){i[l]=r;});}}),i;};ga.prototype.trigger=function(n,t,e){var i=this,o,a,r=t.delegateTarget||t.target;if(!r)return t.preventDefault();if(o=Zo(r,"data-action"),a=t.originalEvent||t,n==="mouseover"){this._timeout=setTimeout(function(){i._mouseout=i.triggerEntry(o,"hover",a,e);},jse);return;}else if(n==="mouseout"){clearTimeout(this._timeout),this._mouseout&&(this._mouseout(),this._mouseout=null);return;}return this.triggerEntry(o,n,a,e);};ga.prototype.triggerEntry=function(n,t,e,i){if(this.isShown()){var o=this._current.target,a=this._current.entries,r=a[n];if(r){var l=r.action;if(this._eventBus.fire("contextPad.trigger",{entry:r,event:e})!==!1){if(qo(l)){if(t==="click")return l(e,o,i);}else if(l[t])return l[t](e,o,i);e.preventDefault();}}}};ga.prototype.open=function(n,t){if(!(!t&&this.isOpen(n))){var e=this._eventBus.fire("contextPad.open.allowed",{target:n});e!==!1&&(this.close(),this._updateAndOpen(n));}};ga.prototype._getProviders=function(){var n=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(n),n.providers;};ga.prototype._updateAndOpen=function(n){var t=this.getEntries(n),e=this._createHtml(n),i;ne(t,function(o,a){var r=o.group||"default",l=ri(o.html||'<div class="entry" draggable="true"></div>'),p;Zo(l,"data-action",a),p=si("[data-group="+jp(r)+"]",e),p||(p=ri('<div class="group"></div>'),Zo(p,"data-group",r),e.appendChild(p)),p.appendChild(l),o.className&&Lse(l,o.className),o.title&&Zo(l,"title",o.title),o.imageUrl&&(i=ri("<img>"),Zo(i,"src",o.imageUrl),i.style.width="100%",i.style.height="100%",l.appendChild(i));}),Ji(e).add("open"),this._current={entries:t,html:e,target:n},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current});};ga.prototype._createHtml=function(n){var t=this,e=ri('<div class="djs-context-pad"></div>');return wa.bind(e,Pb,"click",function(i){t.trigger("click",i);}),wa.bind(e,Pb,"dragstart",function(i){t.trigger("dragstart",i);}),wa.bind(e,Pb,"mouseover",function(i){t.trigger("mouseover",i);}),wa.bind(e,Pb,"mouseout",function(i){t.trigger("mouseout",i);}),Cn.bind(e,"mousedown",function(i){i.stopPropagation();}),this._container.appendChild(e),this._eventBus.fire("contextPad.create",{target:n,pad:e}),e;};ga.prototype.getPad=function(n){console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888"));let t;return this.isOpen()&&Fse(this._current.target,n)?t=this._current.html:t=this._createHtml(n),{html:t};};ga.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null);};ga.prototype.isOpen=function(n){var t=this._current;if(!t)return!1;if(!n)return!0;var e=t.target;return gt(n)!==gt(e)?!1:gt(n)?n.length===e.length&&zl(n,function(i){return e.includes(i);}):e===n;};ga.prototype.isShown=function(){return this.isOpen()&&Ji(this._current.html).has("open");};ga.prototype.show=function(){this.isOpen()&&(Ji(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}));};ga.prototype.hide=function(){this.isOpen()&&(Ji(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}));};ga.prototype._getPosition=function(n){if(!gt(n)&&zn(n)){var t=this._canvas.viewbox(),e=zse(n),i=e.x*t.
603scale-t.x*t.scale,o=e.y*t.scale-t.y*t.scale;return{left:i+b8*this._canvas.zoom(),top:o};}var a=this._canvas.getContainer(),r=a.getBoundingClientRect(),l=this._getTargetBounds(n);return{left:l.right-r.left+b8*this._canvas.zoom(),top:l.top-r.top};};ga.prototype._updatePosition=function(){let n=()=>{if(this.isOpen()){var t=this._current.html,e=this._getPosition(this._current.target);"x"in e&&"y"in e?(t.style.left=e.x+"px",t.style.top=e.y+"px"):["top","right","bottom","left"].forEach(function(i){i in e&&(t.style[i]=e[i]+"px");});}};this._scheduler.schedule(n,"ContextPad#_updatePosition");};ga.prototype._updateVisibility=function(){let n=()=>{if(this.isOpen()){var t=this,e=this._current.target,i=gt(e)?e:[e],o=i.some(function(a){return t._canvas.hasMarker(a,Ase);});o?t.hide():t.show();}};this._scheduler.schedule(n,"ContextPad#_updateVisibility");};ga.prototype._getTargetBounds=function(n){var t=this,e=gt(n)?n:[n],i=e.map(function(o){return t._canvas.getGraphics(o);});return i.reduce(function(o,a){let r=a.getBoundingClientRect();return o.top=Math.min(o.top,r.top),o.right=Math.max(o.right,r.right),o.bottom=Math.max(o.bottom,r.bottom),o.left
vendor: 10,987 bytes, line 603
603=Math.min(o.left,r.left),o.x=o.left,o.y=o.top,o.width=o.right-o.left,o.height=o.bottom-o.top,o;},{top:1/0,right:-1/0,bottom:-1/0,left:1/0});};function Lse(n,t){var e=Ji(n);t=gt(t)?t:t.split(/\s+/g),t.forEach(function(i){e.add(i);});}function zse(n){return n.waypoints[n.waypoints.length-1];}function Fse(n,t){return n=gt(n)?n:[n],t=gt(t)?t:[t],n.length===t.length&&zl(n,function(e){return t.includes(e);});}var wb={__depends__:[rm,v8,om],contextPad:["type",ga]};var kb,pa,M8,Bse,pm,y8,O8,E8,e2,Mb,Z0,T8,i2,t2,n2,$se,Eb={},Tb=[],Vse=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Rb=Array.isArray;function $p(n,t){for(var e in t)n[e]=t[e];return n;}function o2(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function Nb(n,t,e){var i,o,a,r={};for(a in t)a=="key"?i=t[a]:a=="ref"?o=t[a]:r[a]=t[a];if(arguments.length>2&&(r.children=arguments.length>3?kb.call(arguments,2):e),typeof n=="function"&&n.defaultProps!=null)for(a in n.defaultProps)r[a]===void 0&&(r[a]=n.defaultProps[a]);return Ob(n,r,i,o,null);}function Ob(n,t,e,i,o){var a={type:n,props:t,key:e,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++M8,__i:-1,__u:0};return o==null&&pa.vnode!=null&&pa.vnode(a),a;}function Ab(n){return n.children;}function Q0(n,t){this.props=n,this.context=t;}function gu(n,t){if(t==null)return n.__?gu(n.__,n.__i+1):null;for(var e;t<n.__k.length;t++)if((e=n.__k[t])!=null&&e.__e!=null)return e.__e;return typeof n.type=="function"?gu(n):null;}function Gse(n){if(n.__P&&n.__d){var t=n.__v,e=t.__e,i=[],o=[],a=$p({},t);a.__v=t.__v+1,pa.vnode&&pa.vnode(a),a2(n.__P,a,t,n.__n,n.__P.namespaceURI,32&t.__u?[e]:null,i,e??gu(t),!!(32&t.__u),o),a.__v=t.__v,a.__.__k[a.__i]=a,A8(i,a,o),t.__e=t.__=null,a.__e!=e&&I8(a);}}function I8(n){if((n=n.__)!=null&&n.__c!=null)return n.__e=n.__c.base=null,n.__k.some(function(t){if(t!=null&&t.__e!=null)return n.__e=n.__c.base=t.__e;}),I8(n);}function P8(n){(!n.__d&&(n.__d=!0)&&pm.push(n)&&!Ib.__r++||y8!=pa.debounceRendering)&&((y8=pa.debounceRendering)||O8)(Ib);}function Ib(){try{for(var n,t=1;pm.length;)pm.length>t&&pm.sort(E8),n=pm.shift(),t=pm.length,Gse(n);}finally{pm.length=Ib.__r=0;}}function k8(n,t,e,i,o,a,r,l,p,d,f){var h,g,b,w,T,O,V=i&&i.__k||Tb,j=t.length;for(p=qse(e,t,V,p,j),h=0;h<j;h++)(b=e.__k[h])!=null&&(g=b.__i!=-1&&V[b.__i]||Eb,b.__i=h,O=a2(n,b,g,o,a,r,l,p,d,f),w=b.__e,b.ref&&g.ref!=b.ref&&(g.ref&&r2(g.ref,null,b),f.push(b.ref,b.__c||w,b)),T==null&&w!=null&&(T=w),4&b.__u?(p=R8(b,p,n),g.__e&&(g.__e=null)):typeof b.type=="function"&&O!==void 0?p=O:w&&(p=w.nextSibling),b.__u&=-7);return e.__e=T,p;}function qse(n,t,e,i,o){var a,r,l,p,d,f=e.length,h=f,g=0;for(n.__k=new Array(o),a=0;a<o;a++)(r=t[a])!=null&&typeof r!="boolean"&&typeof r!="function"?(typeof r=="string"||typeof r=="number"||typeof r=="bigint"||r.constructor==String?r=n.__k[a]=Ob(null,r,null,null,null):Rb(r)?r=n.__k[a]=Ob(Ab,{children:r},null,null,null):r.constructor===void 0&&r.__b>0?r=n.__k[a]=Ob(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):n.__k[a]=r,p=a+g,r.__=n,r.__b=n.__b+1,l=null,(d=r.__i=Jse(r,e,p,h))!=-1&&(h--,(l=e[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(o>f?g--:o<f&&g++),typeof r.type!="function"&&(r.__u|=4)):d!=p&&(d==p-1?g--:d==p+1?g++:(d>p?g--:g++,r.__u|=4))):n.__k[a]=null;if(h)for(a=0;a<f;a++)(l=e[a])!=null&&(2&l.__u)==0&&(l.__e==i&&(i=gu(l)),j8(l,l));return i;}function R8(n,t,e){var i,o;if(typeof n.type=="function"){for(i=n.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=n,t=R8(i[o],t,e));return t;}n.__e!=t&&(t&&n.type&&!t.parentNode&&(t=gu(n)),t=e.insertBefore(n.__e,t||null));do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t;}function Jse(n,t,e,i){var o,a,r,l=n.key,p=n.type,d=t[e],f=d!=null&&(2&d.__u)==0;if(d===null&&l==null||f&&l==d.key&&p==d.type)return e;if(i>(f?1:0)){for(o=e-1,a=e+1;o>=0||a<t.length;)if((d=t[r=o>=0?o--:a++])!=null&&(2&d.__u)==0&&l==d.key&&p==d.type)return r;}return-1;}function w8(n,t,e){t[0]=="-"?n.setProperty(t,e??""):n[t]=e==null?"":typeof e!="number"||Vse.test(t)?e:e+"px";}function Sb(n,t,e,i,o){var a,r;e:if(t=="style"){if(typeof e=="string")n.style.cssText=e;else{if(typeof i=="string"&&(n.style.cssText=i=""),i)for(t in i)e&&t in e||w8(n.style,t,"");if(e)for(t in e)i&&e[t]==i[t]||w8(n.style,t,e[t]);}}else if(t[0]=="o"&&t[1]=="n")a=t!=(t=t.replace(T8,"$1")),r=t.toLowerCase(),t=r in n||t=="onFocusOut"||t=="onFocusIn"?r.slice(2):t.slice(2),n.l||(n.l={}),n.l[t+a]=e,e?i?e[Z0]=i[Z0]:(e[Z0]=i2,n.addEventListener(t,a?n2:t2,a)):n.removeEventListener(t,a?n2:t2,a);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in n)try{n[t]=e??"";break e;}catch(l){}typeof e=="function"||(e==null||e===!1&&t[4]!="-"?n.removeAttribute(t):n.setAttribute(t,t=="popover"&&e==1?"":e));}}function S8(n){return function(t){if(this.l){var e=this.l[t.type+n];if(t[Mb]==null)t[Mb]=i2++;else if(t[Mb]<e[Z0])return;return e(pa.event?pa.event(t):t);}};}function a2(n,t,e,i,o,a,r,l,p,d){var f,h,g,b,w,T,O,V,j,L,A,J,Q,te,U,ce,W=t.type;if(t.constructor!==void 0)return null;128&e.__u&&(p=!!(32&e.__u),a=[l=t.__e=e.__e]),(f=pa.__b)&&f(t);e:if(typeof W=="function"){h=r.length;try{if(j=t.props,L=W.prototype&&W.prototype.render,A=(f=W.contextType)&&i[f.__c],J=f?A?A.props.value:f.__:i,e.__c?V=(g=t.__c=e.__c).__=g.__E:(L?t.__c=g=new W(j,J):(t.__c=g=new Q0(j,J),g.constructor=W,g.render=Use),A&&A.sub(g),g.state||(g.state={}),g.__n=i,b=g.__d=!0,g.__h=[],g._sb=[]),L&&g.__s==null&&(g.__s=g.state),L&&W.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=$p({},g.__s)),$p(g.__s,W.getDerivedStateFromProps(j,g.__s))),w=g.props,T=g.state,g.__v=t,b)L&&W.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),L&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(L&&W.getDerivedStateFromProps==null&&j!==w&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(j,J),t.__v==e.__v||!g.__e&&g.shouldComponentUpdate!=null&&g.shouldComponentUpdate(j,g.__s,J)===!1){t.__v!=e.__v&&(g.props=j,g.state=g.__s,g.__d=!1),t.__e=e.__e,t.__k=e.__k,t.__k.some(function(Y){Y&&(Y.__=t);}),Tb.push.apply(g.__h,g._sb),g._sb=[],g.__h.length&&r.push(g),l=gu(e);break e;}g.componentWillUpdate!=null&&g.componentWillUpdate(j,g.__s,J),L&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(w,T,O);});}if(g.context=J,g.props=j,g.__P=n,g.__e=!1,Q=pa.__r,te=0,L)g.state=g.__s,g.__d=!1,Q&&Q(t),f=g.render(g.props,g.state,g.context),Tb.push.apply(g.__h,g._sb),g._sb=[];else do g.__d=!1,Q&&Q(t),f=g.render(g.props,g.state,g.context),g.state=g.__s;while(g.__d&&++te<25);g.state=g.__s,g.getChildContext!=null&&(i=$p($p({},i),g.getChildContext())),L&&!b&&g.getSnapshotBeforeUpdate!=null&&(O=g.getSnapshotBeforeUpdate(w,T)),U=f!=null&&f.type===Ab&&f.key==null?D8(f.props.children):f,l=k8(n,Rb(U)?U:[U],t,e,i,o,a,r,l,p,d),g.base=t.__e,t.__u&=-161,g.__h.length&&r.push(g),V&&(g.__E=g.__=null);}catch(Y){if(r.length=h,t.__v=null,p||a!=null){if(Y.then){for(t.__u|=p?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;a!=null&&(a[a.indexOf(l)]=null),t.__e=l;}else if(a!=null)for(ce=a.length;ce--;)o2(a[ce]);}else t.__e=e.__e;t.__k==null&&(t.__k=e.__k||[]),Y.then||N8(t),pa.__e(Y,t,e);}}else a==null&&t.__v==e.__v?(t.__k=e.__k,t.__e=e.__e):l=t.__e=Hse(e.__e,t,e,i,o,a,r,p,d);return(f=pa.diffed)&&f(t),128&t.__u?void 0:l;}function N8(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(N8));}function A8(n,t,e){for(var i=0;i<e.length;i++)r2(e[i],e[++i],e[++i]);pa.__c&&pa.__c(t,n),n.some(function(o){try{n=o.__h,o.__h=[],n.some(function(a){a.call(o);});}catch(a){pa.__e(a,o.__v);}});}function D8(n){return typeof n!="object"||n==null||n.__b>0?n:Rb(n)?n.map(D8):n.constructor!==void 0?null:$p({},n);}function Hse(n,t,e,i,o,a,r,l,p){var d,f,h,g,b,w,T,O=e.props||Eb,V=t.props,j=t.type;if(j=="svg"?o="http://www.w3.org/2000/svg":j=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(d=0;d<a.length;d++)if((b=a[d])&&"setAttribute"in b==!!j&&(j?b.localName==j:b.nodeType==3)){n=b,a[d]=null;break;}}if(n==null){if(j==null)return document.createTextNode(V);n=document.createElementNS(o,j,V.is&&V),l&&(pa.__m&&pa.__m(t,a),l=!1),a=null;}if(j==null)O===V||l&&n.data==V||(n.data=V);else{if(a=j=="textarea"&&V.defaultValue!=null?null:a&&kb.call(n.childNodes),!l&&a!=null)for(O={},d=0;d<n.attributes.length;d++)O[(b=n.attributes[d]).name]=b.value;for(d in O)b=O[d],d=="dangerouslySetInnerHTML"?h=b:d=="children"||d in V||d=="value"&&"defaultValue"in V||d=="checked"&&"defaultChecked"in V||Sb(n,d,null,b,o);for(d in V)b=V[d],d=="children"?g=b:d=="dangerouslySetInnerHTML"?f=b:d=="value"?w=b:d=="checked"?T=b:l&&typeof b!="function"||O[d]===b||Sb(n,d,b,O[d],o);if(f)l||h&&(f.__html==h.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),t.__k=[];else if(h&&(n.innerHTML=""),k8(t.type=="template"?n.content:n,Rb(g)?g:[g],t,e,i,j=="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,r,a?a[0]:e.__k&&gu(e,0),l,p),a!=null)for(d=a.length;d--;)o2(a[d]);l&&j!="textarea"||(d="value",j=="progress"&&w==null?n.removeAttribute("value"):w!=null&&(w!==n[d]||j=="progress"&&!w||j=="option"&&w!=O[d])&&Sb(n,d,w,O[d],o),d="checked",T!=null&&T!=n[d]&&Sb(n,d,T,O[d],o));}return n;}function r2(n,t,e){try{if(typeof n=="function"){var i=typeof n.__u=="function";i&&n.__u(),i&&t==null||(n.__u=n(t));}else n.current=t;}catch(o){pa.__e(o,e);}}function j8(n,t,e){var i,o;if(pa.unmount&&pa.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||r2(i,null,t)),(i=n.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(a){pa.__e(a,t);}i.base=i.__P=i.__n=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&j8(i[o],t,e||typeof n.type!="function");e||o2(n.__e),n.__c=n.__=n.__e=void 0;}function Use(n,t,e){return this.constructor(n,e);}function xu(n,t,e){var i,o,a,r;t==document&&(t=document.documentElement),pa.__&&pa.__(n,t),o=(i=typeof e=="function")?null:e&&e.__k||t.__k,a=[],r=[],a2(t,n=(!i&&e||t).__k=Nb(Ab,null,[n]),o||Eb,Eb,t.namespaceURI,!i&&e?[e]:o?null:t.firstChild?kb.call(t.childNodes):null,a,!i&&e?e:o?o.__e:t.firstChild,i,r),A8(a,n,r),n.props.children=null;}kb=Tb.slice,pa={__e:function(n,t,e,i){for(var o,a,r;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(n)),r=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(n,i||{}),r=o.__d),r)return o.__E=o;}catch(l){n=l;}throw n;}},M8=0,Bse=function(n){return n!=null&&n.constructor===void 0;},Q0.prototype.setState=function(n,t){var e;e=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$p({},this.state),typeof n=="function"&&(n=n($p({},e),this.props)),n&&$p(e,n),n!=null&&this.__v&&(t&&this._sb.push(t),P8(this));},Q0.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),P8(this));},Q0.prototype.render=Ab,pm=[],O8=typeof Promise=="function"?Promise.prototype.then.bind(Prom
603ise.resolve()):setTimeout,E8=function(n,t){return n.__v.__b-t.__v.__b;},Ib.__r=0,e2=Math.random().toString(8),Mb="__d"+e2,Z0="__a"+e2,T8=/(PointerCapture)$|Capture$/i,i2=0,t2=S8(!1),n2=S8(!0),$se=0;var z8=function(n,t,e,i){var o;t[0]=0;for(var a=1;a<t.length;a++){var r=t[a++],l=t[a]?(t[0]|=r?1:2,e[t[a++]]):t[++a];r===3?i[0]=l:r===4?i[1]=Object.assign(i[1]||{},l):r===5?(i[1]=i[1]||{})[t[++a]]=l:r===6?i[1][t[++a]]+=l+"":r?(o=n.apply(l,z8(n,l,e,["",null])),i.push(o),l[0]?t[0]|=2:(t[a-2]=0,t[a]=o)):i.push(l);}return i;},L8=new Map();function F8(n){var t=L8.get(this);return t||(t=new Map(),L8.set(this,t)),(t=z8(this,t.get(n)||(t.set(n,t=function(e){for(var i,o,a=1,r="",l="",p=[0],d=function(g){a===1&&(g||(r=r.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?p.push(0,g,r):a===3&&(g||r)?(p.push(3,g,r),a=2):a===2&&r==="..."&&g?p.push(4,g,0):a===2&&r&&!g?p.push(5,0,!0,r):a>=5&&((r||!g&&a===5)&&(p.push(a,0,r,o),a=6),g&&(p.push(a,g,0,o),a=6)),r="";},f=0;f<e.length;f++){f&&(a===1&&d(),d(f));for(var h=0;h<e[f].length;h++)i=e[f][h],a===1?i==="<"?(d(),p=[p],a=3):r+=i:a===4?r==="--"&&i===">"?(a=1,r=""):r=i+r[0]:l?i===l?l="":r+=i:i==='"'||i==="'"?l=i:i===">"?(d(),a=1):a&&(i==="="?(a=5,o=r,r=""):i==="/"&&(a<5||e[f][h+1]===">")?(d(),a===3&&(p=p[0]),a=p,(p=p[0]).push(2,0,a),a=0):i===" "||i===" "||i===` 604`||i==="\r"?(d(),a=2):r+=i),a===3&&r==="!--"&&(a=4,p=p[0]);}return d(),p;}(n)),t),arguments,[])).length>1?t:t[0];}var Yn=F8.bind(Nb);var yh,Aa,s2,B8,eg=0,W8=[],Ba=pa,$8=Ba.__b,V8=Ba.__r,G8=Ba.diffed,q8=Ba.__c,J8=Ba.unmount,H8=Ba.__;function jb(n,t){Ba.__h&&Ba.__h(Aa,n,eg||t),eg=0;var e=Aa.__H||(Aa.__H={__:[],__h:[]});return n>=e.__.length&&e.__.push({}),e.__[n];}function Cu(n){return eg=1,X8(Y8,n);}function X8(n,t,e){var i=jb(yh++,2);if(i.t=n,!i.__c&&(i.__=[e?e(t):Y8(void 0,t),function(l){var p=i.__N?i.__N[0]:i.__[0],d=i.t(p,l);p!==d&&(i.__N=[d,i.__[1]],i.__c.setState({}));}],i.__c=Aa,!Aa.__f)){var o=function(l,p,d){if(!i.__c.__H)return!0;var f=!1,h=i.__c.props!==l;if(i.__c.__H.__.some(function(b){if(b.__N){f=!0;var w=b.__[0];b.__=b.__N,b.__N=void 0,w!==b.__[0]&&(h=!0);}}),a){var g=a.call(this,l,p,d);return f?g||h:g;}return!f||h;};Aa.__f=!0;var a=Aa.shouldComponentUpdate,r=Aa.componentWillUpdate;Aa.componentWillUpdate=function(l,p,d){if(this.__e){var f=a;a=void 0,o(l,p,d),a=f;}r&&r.call(this,l,p,d);},Aa.shouldComponentUpdate=o;}return i.__N||i.__;}function Ph(n,t){var e=jb(yh++,3);!Ba.__s&&c2(e.__H,t)&&(e.__=n,e.u=t,Aa.__H.__h.push(e));}function dm(n,t){var e=jb(yh++,4);!Ba.__s&&c2(e.__H,t)&&(e.__=n,e.u=t,Aa.__h.push(e));}function mm(n){return eg=5,Gs(function(){return{current:n};},[]);}function Gs(n,t){var e=jb(yh++,7);return c2(e.__H,t)&&(e.__=n(),e.__H=t,e.__h=n),e.__;}function al(n,t){return eg=8,Gs(function(){return n;},t);}function Wse(){for(var n;n=W8.shift();){var t=n.__H;if(n.__P&&t)try{t.__h.some(Db),t.__h.some(l2),t.__h=[];}catch(e){t.__h=[],Ba.__e(e,n.__v);}}}Ba.__b=function(n){Aa=null,$8&&$8(n);},Ba.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),H8&&H8(n,t);},Ba.__r=function(n){V8&&V8(n),yh=0;var t=(Aa=n.__c).__H;t&&(s2===Aa?(t.__h=[],Aa.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0;})):(t.__h.some(Db),t.__h.some(l2),t.__h=[],yh=0)),s2=Aa;},Ba.diffed=function(n){G8&&G8(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(W8.push(t)!==1&&B8===Ba.requestAnimationFrame||((B8=Ba.requestAnimationFrame)||Xse)(Wse)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0);})),s2=Aa=null;},Ba.__c=function(n,t){t.some(function(e){try{e.__h.some(Db),e.__h=e.__h.filter(function(i){return!i.__||l2(i);});}catch(i){t.some(function(o){o.__h&&(o.__h=[]);}),t=[],Ba.__e(i,e.__v);}}),q8&&q8(n,t);},Ba.unmount=function(n){J8&&J8(n);var t,e=n.__c;e&&e.__H&&(e.__H.__.some(function(i){try{Db(i);}catch(o){t=o;}}),e.__H=void 0,t&&Ba.__e(t,e.__v));};var U8=typeof requestAnimationFrame=="function";function Xse(n){var t,e=function(){clearTimeout(i),U8&&cancelAnimationFrame(t),setTimeout(n);},i=setTimeout(e,35);U8&&(t=requestAnimationFrame(e));}function Db(n){var t=Aa,e=n.__c;typeof e=="function"&&(n.__c=void 0,e()),Aa=t;}function l2(n){var t=Aa;n.__c=n.__(),Aa=t;}function c2(n,t){return!n||n.length!==t.length||t.some(function(e,i){return e!==n[i];});}function Y8(n,t){return typeof t=="function"?t(n):t;}function p2(n){let{navigationStack:t,setNavigationStack:e}=n,i=Gs(()=>t.length<=1?[]:t.slice(0,-1).map((r,l)=>({label:r.label,onClick:()=>e(p=>p.slice(0,l+1))})),[t,e]),o=t.length>0?()=>e([]):null,a=t.length>0?t[t.length-1].label:null;return Yn` 605 <div class="djs-popup-breadcrumbs"> 606 ${o&&Yn` 607 <button 608 type="button" 609 class="djs-popup-breadcrumbs-item djs-popup-breadcrumbs-item--back" 610 title="Back" 611 aria-label="Back" 612 onClick=${o}
612 613 > 614 <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"> 615 <path fill-rule="evenodd" clip-rule="evenodd" d="M8.03033 1.46967C8.32322 1.76256 8.32322 2.23744 8.03033 2.53033L4.56066 6L8.03033 9.46967C8.32322 9.76256 8.32322 10.2374 8.03033 10.5303C7.73744 10.8232 7.26256 10.8232 6.96967 10.5303L2.96967 6.53033C2.67678 6.23744 2.67678 5.76256 2.96967 5.46967L6.96967 1.46967C7.26256 1.17678 7.73744 1.17678 8.03033 1.46967Z" fill="currentColor"/> 616 </svg> 617 </button> 618 `} 619 ${i.map((r,l)=>Yn` 620 <button 621 key=${l} 622 type="button" 623 class="djs-popup-breadcrumbs-item" 624 onClick=${r.onClick} 625 title=${r.label} 626 > 627 ${r.label} 628 </button> 629 <span class="djs-popup-breadcrumbs-item--separator" aria-hidden="true"></span> 630 `)} 631 ${a&&Yn` 632 <span class="djs-popup-breadcrumbs-item djs-popup-breadcrumbs-item--current" title=${a}> 633 ${a} 634 </span> 635 `} 636 </div> 637 `;}function K8(n){var t,e,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(t=0;t<o;t++)n[t]&&(e=K8(n[t]))&&(i&&(i+=" "),i+=e);}else for(e in n)n[e]&&(i&&(i+=" "),i+=e);return i;}function Yse(){for(var n,t,e=0,i="",o=arguments.length;e<o;e++)(n=arguments[e])&&(t=K8(n))&&(i&&(i+=" "),i+=t);return i;}var vu=Yse;function d2(n){let{headerEntries:t,onSelect:e,selectedEntry:i,setSelectedEntry:o,title:a}=n,r=Gs(()=>Kse(t),[t]),l=d=>d.action&&!d.disabled,p=(d,f)=>{if(l(f))return e(d,f);};return Yn` 638 <div class="djs-popup-header"> 639 <h3 class="djs-popup-title" title=${a}>${a}</h3> 640 ${r.map(d=>Yn` 641 <ul key=${d.id} class="djs-popup-header-group" data-header-group=${d.id}> 642 643 ${d.entries.map(f=>Yn` 644 <li key=${f.id}> 645 <${l(f)?"button":"span"} 646 class=${Zse(f,f===i)} 647 onClick=${h=>p(h,f)} 648 title=${f.title||f.label} 649 data-id=${f.id} 650 aria-disabled=${f.disabled||void 0} 651 onMouseEnter=${()=>l(f)&&o(f)} 652 onMouseLeave=${()=>l(f)&&o(null)} 653 onFocus=${()=>l(f)&&o(f)} 654 onBlur=${()=>l(f)&&o(null)} 655 > 656 ${f.imageUrl&&Yn`<img class="djs-popup-entry-icon" src=${f.imageUrl} alt="" />`||f.imageHtml&&Yn`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${{__html:f.imageHtml}} />`} 657 ${f.label?Yn` 658 <span class="djs-popup-label">${f.label}</span> 659 `:null} 660 </${f.action?"button":"span"}> 661 </li> 662 `)} 663 </ul> 664 `)} 665 </div> 666 `;}function Kse(n){return n.reduce((t,e)=>{let i=e.group||"default",o=t.find(a=>a.id===i);return o?o.entries.push(e):t.push({id:i,entries:[e]}),t;},[]);}function Zse(n,t){return vu("entry",n.className,n.active?"active":"",n.disabled?"disabled":"",t?"selected":"");}function m2(n,t){return`${n}-entry-${t.id}`;}function u2(n){let{idPrefix:t,entry:e,selected:i,onMouseEnter:o,onMouseLeave:a,onAction:r}=n,l=(d,f)=>{if(!e.disabled)return r(d,e,f);},p=!e.entries;return Yn` 667 <li 668 class=${vu("entry",{selected:i,disabled:e.disabled})} 669 data-id=${e.id} 670 id=${m2(t,e)} 671 role="option" 672 aria-selected=${i||void 0} 673 aria-haspopup=${e.entries?"true":void 0} 674 title=${e.title} 675 aria-disabled=${e.disabled||void 0} 676 onClick=${l} 677 onMouseEnter=${o} 678 onMouseLeave=${a} 679 onDragStart=${d=>p&&l(d,"dragstart")} 680 draggable=${p} 681 > 682 <div class="djs-popup-entry-content"> 683 <span 684 class=${vu("djs-popup-entry-name",e.className)} 685 > 686 ${e.imageUrl&&Yn`<img class="djs-popup-entry-icon" src=${e.imageUrl} alt="" />`||e.imageHtml&&Yn`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${{__html:e.imageHtml}} />`} 687 688 ${e.label?Yn` 689 <span class="djs-popup-label"> 690 ${e.label} 691 </span> 692 `:null} 693 </span> 694 ${e.description&&Yn`
695 <span 696 class="djs-popup-entry-description" 697 > 698 ${e.description} 699 </span> 700 `} 701 </div> 702 ${(e.documentationRef||e.entries)&&Yn` 703 <div class="djs-popup-entry-actions"> 704 ${e.documentationRef&&Yn` 705 <a 706 class="djs-popup-entry-docs" 707 href=${e.documentationRef} 708 onClick=${d=>d.stopPropagation()} 709 title="Open entry documentation" 710 tabIndex="-1" 711 aria-hidden="true" 712 target="_blank" 713 rel="noopener" 714 > 715 <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"> 716 <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6368 10.6375V5.91761H11.9995V10.6382C11.9995 10.9973 11.8623 11.3141 11.5878 11.5885C11.3134 11.863 10.9966 12.0002 10.6375 12.0002H1.36266C0.982345 12.0002 0.660159 11.8681 0.396102 11.6041C0.132044 11.34 1.52588e-05 11.0178 1.52588e-05 10.6375V1.36267C1.52588e-05 0.98236 0.132044 0.660173 0.396102 0.396116C0.660159 0.132058 0.982345 2.95639e-05 1.36266 2.95639e-05H5.91624V1.36267H1.36266V10.6375H10.6368ZM12 0H7.2794L7.27873 1.36197H9.68701L3.06507 7.98391L4.01541 8.93425L10.6373 2.31231V4.72059H12V0Z" fill="currentColor"/> 717 </svg> 718 </a> 719 `} 720 ${e.entries&&Yn` 721 <div class="djs-popup-entry-chevron" aria-hidden="true"> 722 <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"> 723 <path fill-rule="evenodd" clip-rule="evenodd" d="M3.96967 1.46967C4.26256 1.17678 4.73744 1.17678 5.03033 1.46967L9.03033 5.46967C9.32322 5.76256 9.32322 6.23744 9.03033 6.53033L5.03033 10.5303C4.73744 10.8232 4.26256 10.8232 3.96967 10.5303C3.67678 10.2374 3.67678 9.76256 3.96967 9.46967L7.43934 6L3.96967 2.53033C3.67678 2.23744 3.67678 1.76256 3.96967 1.46967Z" fill="currentColor"/> 724 </svg> 725 </div> 726 `} 727 </div> 728 `} 729 </li> 730 `;}function f2(n){let T=n,{selectedEntry:t,setSelectedEntry:e,groupedEntries:i,keyboardSelection:o,idPrefix:a,id:r,ariaLabel:l,tabIndex:p,ariaActivedescendant:d}=T,f=qE(T,["selectedEntry","setSelectedEntry","groupedEntries","keyboardSelection","idPrefix","id","ariaLabel","tabIndex","ariaActivedescendant"]),h=mm();dm(()=>{if(!o||!o.current)return;let O=h.current;if(!O)return;let V=O.querySelector(".selected");V&&Qse(V);},[t]);let g=()=>{o.current=!1;},b=O=>{o.current||e(O);},w=()=>{o.current||e(null);};return Yn` 731 <div 732 class="djs-popup-results" 733 ref=${h} 734 id=${r} 735 role="listbox" 736 aria-label=${l} 737 tabIndex=${p} 738 aria-activedescendant=${d} 739 onMouseMove=${g} 740 > 741 ${i.map(O=>Yn` 742 ${O.name&&Yn` 743 <div key=${O.id} id=${Z8(a,O)} class="entry-header" title=${O.name}> 744 ${O.name} 745 </div> 746 `} 747 <ul 748 class="djs-popup-group" 749 data-group=${O.id} 750 role="group" 751 aria-labelledby=${O.name?Z8(a,O):void 0} 752 > 753 ${O.entries.map(V=>Yn` 754 <${u2} 755 key=${V.id} 756 idPrefix=${a} 757 entry=${V} 758 selected=${V===t} 759 onMouseEnter=${()=>b(V)} 760 onMouseLeave=${w} 761 ...${f} 762 /> 763 `)} 764 </ul> 765 `)} 766 </div> 767 `;}function Z8(n,t){return`${n}-group-${t.id}`;}function Qse(n){typeof n.scrollIntoViewIfNeeded=="function"?n.scrollIntoViewIfNeeded():n.scrollIntoView({scrollMode:"if-needed",block:"nearest"});}var ele=new Gl("djs-popup");function h2(n){let{onClose:t,onSelect:e,className:i,headerEntries:o,position:a,title:r,width:l,scale:p,search:d,emptyPlaceholder:f,searchFn:h,entries:g,onOpened:b,onClosed:w,defaultTab:T}=n,[O,V]=Cu([]);Ph(()=>{V([]),A(null);},[g]);let j=Gs(()=>{let Pe=[],Oe=new Set(),ct=!1;return g.forEach(({tab:ht})=>{if(!ht){ct=!0;return;}Oe.has(ht.id)||(Oe.add(ht.id),Pe.push(ht));}),Pe.length?ct&&!T?[]:ct?[T,...Pe.filter(ht=>
767ht.id!==T.id)]:Pe:[];},[g,T]),[L,A]=Cu(null),J=j.some(Pe=>Pe.id===L)?L:j.length?j[0].id:null,Q=mm();dm(()=>{let Pe=Q.current;if(!Pe)return;let Oe=Pe.querySelector('[aria-selected="true"]');Oe&&Q8(Oe);},[J]);let[te,U]=Cu({start:!1,end:!1}),ce=al(()=>{let{scrollLeft:Pe,scrollWidth:Oe,clientWidth:ct}=Q.current;U({start:Pe>0,end:Oe-ct-Pe>1});},[]),W=al(Pe=>{let Oe=Q.current,ct=Math.abs(Pe.deltaX)>Math.abs(Pe.deltaY)?Pe.deltaX:Pe.deltaY;if(!ct)return;let{scrollLeft:ht,scrollWidth:qt,clientWidth:zt}=Oe;qt-zt<1||(Pe.preventDefault(),Oe.scrollLeft=ht+ct,ce());},[ce]);dm(()=>{let Pe=Q.current;if(Pe)return ce(),Pe.addEventListener("scroll",ce),Pe.addEventListener("wheel",W,{passive:!1}),()=>{Pe.removeEventListener("scroll",ce),Pe.removeEventListener("wheel",W);};},[j,J,ce,W]);let Y=al(Pe=>{let Oe=Q.current,ct=Pe>0?[...Oe.children]:[...Oe.children].reverse(),ht=Oe.getBoundingClientRect(),qt=ct.find(zt=>{let rn=zt.getBoundingClientRect();return Pe>0?rn.right>ht.right+1:rn.left<ht.left-1;});qt&&(Q8(qt),ce());},[ce]),se=al(Pe=>Pe.tab&&Pe.tab.id||T&&T.id,[T]),[de,Ae]=Cu(""),rt=de.trim().length>0,et=Gs(()=>ile(g),[g]),pt=Gs(()=>Ko(d)?et.length>5:!1,[d,et]),ft=Gs(()=>{let Pe=O.length?O[O.length-1].entries:j.length>1?g.filter(Oe=>se(Oe)===J):g;return pt?rt?h(et.filter(({searchable:Oe})=>Oe!==!1),de,{keys:["label","search","description"]}).map(({item:Oe})=>Oe):Pe.filter(({rank:Oe=0})=>Oe>=0):Pe;},[pt,rt,et,de,h,O,g,j,J,se]),je=Gs(()=>rt?ft.length?[{id:"default",entries:ft}]:[]:ole(ft),[ft,rt]),[ke,Ke]=Cu(ft[0]),ve=mm(null),Se=mm(!1),Be=Gs(()=>ele.next(),[]),Ze=`${Be}-results`,kt=ke&&m2(Be,ke);Ph(()=>{let Pe=ve.current;Pe&&ft.includes(Pe)?Ke(Pe):Ke(ft[0]),ve.current=null;},[ft]);let Z=al(Pe=>{let Oe=nle(je),ht=Oe.indexOf(ke)+Pe;ht<0&&(ht=Oe.length-1),ht>=Oe.length&&(ht=0),Se.current=!0,Ke(Oe[ht]);},[je,ke]),D=al(Pe=>{Pe>0&&ke&&ke.entries&&(Se.current=!0,V(Oe=>[...Oe,ke])),Pe<0&&O.length>0&&(Se.current=!0,ve.current=O[O.length+Pe],V(Oe=>Oe.slice(0,Pe)));},[ke,O]),F=al((Pe,Oe,ct)=>{if(!(!Oe||Oe.disabled))return Oe.entries?(Pe.preventDefault(),D(1)):e(Pe,Oe,ct);},[e,D]),fe=al(Pe=>{if(Pe.key==="Enter"&&ke){let Oe=Pe.target;return!!Bs(Oe,"a, button",!0)||ke.disabled?void 0:F(Pe,ke);}if(Pe.key==="Backspace"){let Oe=Pe.target;if(!(j0(Oe,"input")&&Oe.value!==""))return D(-1),Pe.preventDefault();}if(Pe.key==="ArrowUp")return Z(-1),Pe.preventDefault();if(Pe.key==="ArrowDown")return Z(1),Pe.preventDefault();if(Pe.key==="ArrowRight")return D(1),Pe.preventDefault();if(Pe.key==="ArrowLeft")return D(-1),Pe.preventDefault();},[ke,Z,D,F]),he=al((Pe,Oe)=>{if(A(Oe),!Pe.detail)return;let ct=Bs(Pe.currentTarget,".djs-popup",!0),ht=ct&&ct.querySelector("input");ht&&ht.focus();},[]),xe=al(Pe=>{if(Pe.key==="Enter"||Pe.key===" "){Pe.stopPropagation();return;}if(Pe.key==="ArrowDown"||Pe.key==="ArrowUp"){let zt=Bs(Pe.currentTarget,".djs-popup",!0),rn=zt.querySelector("input")||zt.querySelector('[role="listbox"]');rn&&rn.focus();return;}let Oe=j.findIndex(zt=>zt.id===J),ct;if(Pe.key==="ArrowLeft")ct=(Oe-1+j.length)%j.length;else if(Pe.key==="ArrowRight")ct=(Oe+1)%j.length;else if(Pe.key==="Home")ct=0;else if(Pe.key==="End")ct=j.length-1;else return;Pe.preventDefault(),Pe.stopPropagation(),A(j[ct].id);let ht=Pe.currentTarget.parentNode,qt=ht&&ht.children[ct];
767qt&&qt.focus();},[j,J]),nt=al(Pe=>{j0(Pe.target,"input")&&Ae(()=>Pe.target.value);},[Ae]);Ph(()=>(b(),()=>{w();}),[]);let Je=!rt&&O.length>0,Ge=j.length>1&&!rt&&O.length===0,Ne=(r||o.length>0)&&!Je;return Yn` 768 <${e5} 769 onClose=${t} 770 onKeyup=${nt} 771 onKeydown=${fe} 772 className=${i} 773 position=${a} 774 width=${l} 775 scale=${p} 776 navigationStack=${O} 777 > 778 ${Ne&&Yn` 779 <${d2} 780 headerEntries=${o} 781 onSelect=${e} 782 selectedEntry=${ke} 783 setSelectedEntry=${Ke} 784 title=${r} 785 /> 786 `} 787 ${Je&&Yn` 788 <${p2} 789 navigationStack=${O} 790 setNavigationStack=${V} 791 /> 792 `} 793 ${g.length>0&&Yn` 794 <div class="djs-popup-body"> 795 796 ${pt&&Yn` 797 <div class="djs-popup-search"> 798 <svg class="djs-popup-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"> 799 <path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/> 800 </svg> 801 <input 802 type="text" 803 spellcheck=${!1} 804 role="combobox" 805 aria-label="${r||"Search"}" 806 aria-expanded="true" 807 aria-controls=${Ze} 808 aria-activedescendant=${kt||void 0} 809 aria-autocomplete="list" 810 /> 811 </div> 812 `} 813 814 ${Ge&&Yn` 815 <div class="djs-popup-tabs-container"> 816 <div class="djs-popup-tabs" ref=${Q} role="tablist"> 817 ${j.map(Pe=>Yn` 818 <button 819 type="button" 820 class="djs-popup-tab" 821 role="tab" 822 title=${Pe.title||void 0} 823 aria-controls=${Ze} 824 aria-selected=${Pe.id===J} 825 tabIndex=${Pe.id===J?0:-1} 826 onClick=${Oe=>he(Oe,Pe.id)} 827 onKeydown=${xe} 828 >${Pe.label}</button> 829 `)} 830 </div> 831 832 ${""} 833 ${[-1,1].map(Pe=>(Pe<0?te.start:te.end)&&Yn` 834 <button 835 type="button" 836 class=${`djs-popup-tabs-scroll djs-popup-tabs-scroll-${Pe<0?"start":"end"}`} 837 aria-hidden="true" 838 tabIndex="-1" 839 onMousedown=${Oe=>Oe.preventDefault()} 840 onClick=${()=>Y(Pe)} 841 > 842 <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"> 843 <path fill-rule="evenodd" clip-rule="evenodd" d="M3.96967 1.46967C4.26256 1.17678 4.73744 1.17678 5.03033 1.46967L9.03033 5.46967C9.32322 5.76256 9.32322 6.23744 9.03033 6.53033L5.03033 10.5303C4.73744 10.8232 4.26256 10.8232 3.96967 10.5303C3.67678 10.2374 3.67678 9.76256 3.96967 9.46967L7.43934 6L3.96967 2.53033C3.67678 2.23744 3.67678 1.76256 3.96967 1.46967Z" fill="currentColor"/> 844 </svg> 845 </button> 846 `)} 847 </div> 848 `} 849 850 ${rt&&Yn` 851 <div class="djs-popup-search-count" aria-live="polite"> 852 ${ft.length} ${ft.length===1?"result":"results"} found 853 </div> 854 `} 855 856 <${f2} 857 groupedEntries=${je} 858 selectedEntry=${ke} 859 setSelectedEntry=${Ke} 860 keyboardSelection=${Se} 861 onAction=${F} 862 idPrefix=${Be} 863 id=${Ze} 864 ariaLabel=${r||"Results"} 865 tabIndex=${pt?-1:0} 866 ariaActivedescendant=${pt?void 0:kt||void 0} 867 /> 868 869 ${ke&&ke.documentationRef&&Yn` 870 <div class="djs-popup-footer"> 871 <a 872 class="djs-popup-footer-docs" 873 href=${ke.documentationRef} 874 onClick=${Pe=>Pe.stopPropagation()} 875 aria-label=${ke.label?`Open entry documentation for ${ke.label}`:"Open entry documentation"} 876 target="_blank" 877 rel="noopener" 878 > 879 Open entry documentation 880 881 <svg aria-hidden="true" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"> 882 <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6368 10.6375V5.91761H11.9995V10.6382C11.9995 10.9973 11.8623 11.3141 11.5878 11.5885C11.3134 11.863 10.9966 12.0002 10.6375 12.0002H1.36266C0.982345 12.0002 0.660159 11.8681 0.396102 11.604
8821C0.132044 11.34 1.52588e-05 11.0178 1.52588e-05 10.6375V1.36267C1.52588e-05 0.98236 0.132044 0.660173 0.396102 0.396116C0.660159 0.132058 0.982345 2.95639e-05 1.36266 2.95639e-05H5.91624V1.36267H1.36266V10.6375H10.6368ZM12 0H7.2794L7.27873 1.36197H9.68701L3.06507 7.98391L4.01541 8.93425L10.6373 2.31231V4.72059H12V0Z" fill="#818798"/> 883 </svg> 884 </a> 885 </div> 886 `} 887 </div> 888 `} 889 ${f&&ft.length===0&&Yn` 890 <div class="djs-popup-no-results">${qo(f)?f(de):f}</div> 891 `} 892 </${e5}> 893 `;}function Q8(n){typeof n.scrollIntoViewIfNeeded=="function"?n.scrollIntoViewIfNeeded():n.scrollIntoView({scrollMode:"if-needed",block:"nearest",inline:"nearest"});}function e5(n){let{onClose:t,onKeydown:e,onKeyup:i,className:o,children:a,navigationStack:r,position:l}=n,p=mm();return dm(()=>{if(typeof l!="function")return;let d=p.current,f=l(d);d.style.left=`${f.x}px`,d.style.top=`${f.y}px`;},[p.current,l]),dm(()=>{let d=p.current;if(!d)return;(d.querySelector("input")||d.querySelector('[role="listbox"]')||d).focus();},[r]),Ph(()=>{let d=h=>{if(h.key==="Escape")return h.preventDefault(),t();},f=h=>{if(!Bs(h.target,".djs-popup",!0))return t();};return document.documentElement.addEventListener("keydown",d),document.body.addEventListener("click",f,!0),()=>{document.documentElement.removeEventListener("keydown",d),document.body.removeEventListener("click",f,!0);};},[]),Yn` 894 <div 895 class=${vu("djs-popup",o)} 896 style=${tle(n)} 897 onKeydown=${e} 898 onKeyup=${i} 899 ref=${p} 900 tabIndex="-1" 901 > 902 ${a} 903 </div> 904 `;}function tle(n){let{width:t}=n,e=typeof t=="number"?`${t}px`:t;return{transform:`scale(${n.scale})`,width:Ko(t)?e:void 0,maxWidth:Ko(t)?"unset":void 0,"transform-origin":"top left"};}function nle(n){let t=[];return n.forEach(e=>{e.entries.forEach(i=>{t.push(i);});}),t;}function ile(n){let t=[];function e(i){i.forEach(o=>
904{if(o.entries){e(o.entries);return;}t.push(o);});}return e(n),t;}function ole(n){let t=[],e=a=>t.find(r=>a.id===r.id),i=a=>!!e(a),o=a=>typeof a=="string"?{id:a}:a;return n.forEach(a=>{let r=a.group?o(a.group):{id:"default"};i(r)?e(r).entries.push(a):t.push(Ve(X({},r),{entries:[a]}));}),t;}var ale="data-id",n5=["contextPad.close","canvas.viewbox.changing","commandStack.changed"],rle=1e3;function Qo(n,t,e,i){this._eventBus=t,this._canvas=e,this._search=i,this._current=null;var o=Ko(n&&n.scale)?n.scale:{min:1,max:1};this._config={scale:o,defaultTab:n&&n.defaultTab},t.on("diagram.destroy",()=>{this.close();}),t.on("element.changed",a=>{let r=this.isOpen()&&this._current.target;a.element===r&&this.refresh();});}Qo.$inject=["config.popupMenu","eventBus","canvas","search"];Qo.prototype._render=function(){let{position:n,providerId:t,entries:e,headerEntries:i,emptyPlaceholder:o,options:a}=this._current,r=i5(e),l=Object.entries(i).map(([g,b])=>X({id:g},b)),p=n&&(g=>this._ensureVisible(g,n)),d=this._updateScale(this._current.container);xu(Yn` 905 <${h2} 906 onClose=${g=>this.close(g)} 907 onSelect=${(g,b,w)=>this.trigger(g,b,w)} 908 position=${p} 909 className=${t} 910 entries=${r} 911 headerEntries=${l} 912 emptyPlaceholder=${o} 913 scale=${d} 914 onOpened=${this._onOpened.bind(this)} 915 onClosed=${this._onClosed.bind(this)} 916 searchFn=${this._search} 917 defaultTab=${this._config.defaultTab} 918 ...${X({},a)} 919 /> 920 `,this._current.container);};Qo.prototype.open=function(n,t,e,i){if(!n)throw new Error("target is missing");if(!t)throw new Error("providers for <"+t+"> not found");if(!e)throw new Error("position is missing");var o=this._eventBus.fire("popupMenu.open.allowed",{target:n,providerId:t});if(o===!1)return;this.isOpen()&&this.close();let{entries:a,headerEntries:r,emptyPlaceholder:l}=this._getContext(n,t);this._current={position:e,providerId:t,target:n,entries:a,headerEntries:r,emptyPlaceholder:l,container:this._createContainer({provider:t}),options:i},this._emit("open"),this._bindAutoClose(),this._render();};Qo.prototype.refresh=function(){if(!this.isOpen())return;let{target:n,providerId:t}=this._current,{entries:e,headerEntries:i,emptyPlaceholder:o}=this._getContext(n,t);this._current=Ve(X({},this._current),{entries:e,headerEntries:i,emptyPlaceholder:o}),this._emit("refresh"),this._render();};Qo.prototype._getContext=function(n,t){let e=this._getProviders(t);if(!e||!e.length)throw new Error("provider for <"+t+"> not found");let i=this._getEntries(n,e),o=this._getHeaderEntries(n,e),a=this._getEmptyPlaceholder(e);return{entries:i,headerEntries:o,emptyPlaceholder:a,empty:!(Object.keys(i).length||Object.keys(o).length)};};Qo.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._canvas.restoreFocus(),this._current=null);};Qo.prototype.reset=function(){let n=this._current.container;xu(null,n),Cs(n);};Qo.prototype._emit=function(n,t){this._eventBus.fire(`popupMenu.${n}`,t);};Qo.prototype._onOpened=function(){this._emit("opened");};Qo.prototype._onClosed=function(){this._emit("closed");};Qo.prototype._createContainer=function(n){var t=this._canvas,e=t.getContainer();let i=ri(`<div class="djs-popup-parent djs-scrollable" data-popup=${n.provider}></div>`);return e.appendChild(i),i;};Qo.prototype._bindAutoClose=function(){this._eventBus.once(n5,this.close,this);};Qo.prototype._unbindAutoClose=function(){this._eventBus.off(n5,this.close,this);};Qo.prototype._updateScale=function(){var n=this._canvas.zoom(),t=this._config.scale,e,i,o=n;return t!==!0&&(t===!1?(e=1,i=1):(e=t.min,i=t.max),Ko(e)&&n<e&&(o=e),Ko(i)&&n>i&&(o=i)),o;};Qo.prototype._ensureVisible=function(n,t){var e=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect(),o={},a=t.x,r=t.y;return t.x+i.width>e.width&&(o.x=!0),t.y+i.height>e.height&&(o.y=!0),o.x&&o.y?(a=t.x-i.width,r=t.y-i.height):o.x?(a=t.x-i.width,r=t.y):o.y&&t.y<i.height?(a=t.x,r=10):o.y&&(a=t.x,r=t.y-i.height),t.y<e.top&&(r=t.y+i.height),{x:a,y:r};};Qo.prototype.isEmpty=function(n,t){if(!n)throw new Error("target is missing");if(!t)throw new Error("provider ID is missing");let e=this._getProviders(t);return!e||!e.length?!0:this._getContext(n,t).empty;};Qo.prototype.registerProvider=function(n,t,e){e||(e=t,t=rle),this._eventBus.on("popupMenu.getProviders."+n,t,function(i){i.providers.push(e);});};Qo.prototype._getProviders=function(n){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+n,providers:[]});return this._eventBus.fire(t),t.providers;};Qo.prototype._getEntries=function(n,t){var e={};
920return ne(t,function(i){if(!i.getPopupMenuEntries){ne(i.getEntries(n),function(a){var r=a.id;if(!r)throw new Error("entry ID is missing");e[r]=ns(a,["id"]);});return;}var o=i.getPopupMenuEntries(n);qo(o)?e=o(e):ne(o,function(a,r){e[r]=a;});}),e;};Qo.prototype._getHeaderEntries=function(n,t){var e={};return ne(t,function(i){if(!i.getPopupMenuHeaderEntries){if(!i.getHeaderEntries)return;ne(i.getHeaderEntries(n),function(a){var r=a.id;if(!r)throw new Error("entry ID is missing");e[r]=ns(a,["id"]);});return;}var o=i.getPopupMenuHeaderEntries(n);qo(o)?e=o(e):ne(o,function(a,r){e[r]=a;});}),e;};Qo.prototype._getEmptyPlaceholder=function(n){let t=n.find(e=>qo(e.getEmptyPlaceholder));return t&&t.getEmptyPlaceholder();};Qo.prototype.isOpen=function(){return!!this._current;};Qo.prototype.trigger=function(n,t,e="click"){if(n.preventDefault(),!t){let o=Bs(n.delegateTarget||n.target,".entry",!0),a=Zo(o,ale);t=X({id:a},this._getEntry(a));}let i=t.action;if(this._emit("trigger",{entry:t,event:n})!==!1){if(qo(i)){if(e==="click")return i(n,t);}else if(i[e])return i[e](n,t);}};Qo.prototype._getEntry=function(n){var t=this._current.entries[n]||this._current.headerEntries[n];if(!t)throw new Error("entry not found");return t;};function i5(n,t=[]){return Object.entries(n).map(([e,i])=>{let o=X({id:e},i);return o.entries?o.entries=i5(o.entries,[...t,...t5(o.search)]):t.length&&(o.search=[...t,...t5(o.search)]),o;});}function t5(n){return n?gt(n)?n:[n]:[];}function _2(n,t,e){let{keys:i}=e;if(t=t.trim().toLowerCase(),!t)throw new Error("<pattern> must not be empty");let o=t.trim().toLowerCase().split(/\s+/);return n.flatMap(a=>{let r=sle(a,o,i);return r?{item:a,tokens:r}:[];}).sort(lle(i));}function sle(n,t,e){let{matchedWords:i,tokens:o}=e.reduce((a,r)=>{let l=n[r],{tokens:p,matchedWords:d}=gt(l)?l.reduce((f,h)=>{let{tokens:g,matchedWords:b}=s5(h,t);return{tokens:[...f.tokens,g],matchedWords:X(X({},f.matchedWords),b)};},{matchedWords:{},tokens:[]}):s5(l,t);return{tokens:Ve(X({},a.tokens),{[r]:p}),matchedWords:X(X({},a.matchedWords),d)};},{matchedWords:{},tokens:{}});return Object.keys(i).length!==t.length?null:o;}function lle(n){return(t,e)=>{let i=0,o=1;for(let a of n){let r=cle(t.tokens[a],e.tokens[a]);if(r!==0){i+=r*o,o*=o5;continue;}let l=ple(t.item[a],e.item[a]);if(l!==0){i+=l*o,o*=o5;continue;}}return i;};}function cle(n,t){return a5(t)-a5(n);}var o5=.5,wh={FULL:131.9,START_FULL_WORD:8,START_WORD_PART:7.87,WORD_START:2.19,WORD_PART:1,NO_MATCH:-.07};function a5(n){let t=n.reduce((l,p)=>l+l5(p),0),e=n.flat(),i=e.reduce((l,p)=>l+p.value.length,0),o=e.reduce((l,p)=>l+(p.match?p.value.length:0),0),a=i?o/i:0;return t*(1+a);}function l5(n){if(gt(n))return Math.max(...n.map(l5));let t=Math.log(n.value.length);return n.match?(n.start?n.end?wh.FULL:n.wordEnd?wh.START_FULL_WORD:wh.START_WORD_PART:n.wordStart?wh.WORD_START:wh.WORD_PART)*t:wh.NO_MATCH*t;}function r5(n=""){return gt(n)?n.join(", "):n;}function ple(n,t){return r5(n).localeCompare(r5(t));}function s5(n,t){if(!n)return{tokens:[],matchedWords:{}};let e=[],i={},o=t.map(dle),a=[`(?<all>${o.join("\\s+")})`,...o].join("|"),r=new RegExp(a,"ig"),l,p=0;for(;l=r.exec(n);){let[d]=l,f=l.index,h=l.index+d.length,g=f===0,b=h===n.length,w=!!l.groups?.all,T=g||/\s/.test(n.charAt(f-1)),O=b||/\s/.test(n.charAt(h));l.index>p&&e.push({value:n.slice(p,l.index),index:p}),e.push({value:d,index:l.index,match:!0,wordStart:T,wordEnd:O,start:g,end:b,all:w});let V=w?t:[d];for(let j of V)i[j.toLowerCase()]=!0;p=l.index+d.length;}return p<n.length&&e.push({value:n.slice(p),index:p}),{tokens:e,matchedWords:i};}function dle(n){return n.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&");}var Lb={search:["value",_2]};var Sh={__depends__:[Lb],__init__:["popupMenu"],popupMenu:["type",Qo]};var mle={align:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000">
921 <line x1="200" y1="150" x2="200" y2="1850" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/> 922 <rect x="500" y="150" width="1300" height="700" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 923 <rect x="500" y="1150" width="700" height="700" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 924 </svg>`,bottom:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 925 <line x1="150" y1="1650" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/> 926 <rect x="150" y="350" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 927 <rect x="1050" y="850" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 928 </svg>`,center:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 929 <line x1="900" y1="150" x2="900" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/> 930 <rect x="250" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 931 <rect x="500" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 932 </svg>`,left:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 933 <line x1="100" y1="150" x2="100" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/> 934 <rect x="100" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 935 <rect x="100" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 936 </svg>`,right:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 937 <line x1="1650" y1="150" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/> 938 <rect x="350" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 939 <rect x="850" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 940 </svg>`,top:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 941 <line x1="150" y1="150" x2="1650" y2="150" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/> 942 <rect x="150" y="150" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 943 <rect x="1050" y="150" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 944 </svg>`,middle:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 945 <line x1="150" y1="900" x2="1650" y2="900" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/> 946 <rect x="150" y="250" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 947 <rect x="1050" y="500" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 948 </svg>`},zb=mle;var ule=900;function um(n,t,e,i){n.registerProvider(ule,this),this._contextPad=n,this._popupMenu=t,this._translate=e,this._canvas=i;}um.$inject=["contextPad","popupMenu","translate","canvas"];um.prototype.getMultiElementContextPadEntries=function(n){var t={};return this._isAllowed(n)&&me(t,this._getEntries(n)),t;};um.prototype._isAllowed=function(n){return!this._popupMenu.isEmpty(n,"align-elements");};um.prototype._getEntries=function(){var n=this;return{"align-elements":{group:"align-elements",title:n._translate("Align elements"),html:`<div class="entry">${zb.align}</div>`,action:{click:function(t,e){var i=n._getMenuPosition(e);me(i,{cursor:{x:t.x,y:t.y}}),n._popupMenu.open(e,"align-elements",i);}}}};};um.prototype._getMenuPosition=function(n){var t=5,e=this._contextPad.getPad(n).html,i=e.getBoundingClientRect(),o={x:i.left,y:i.bottom+t};return o;};var fle=["left","center","right","top","middle","bottom"];function bu(n,t,e,i){this._alignElements=t,this._translate=e,this._popupMenu=n,this._rules=i,n.registerProvider("align-elements",this);}bu.$inject=["popupMenu","alignElements","translate","rules"];bu.prototype.getPopupMenuEntries=function(n){var t={};return this._isAllowed(n)&&me(t,this._getEntries(n)),t;};bu.prototype._isAllowed=function(n){return this._rules.allowed("elements.align",{elements:n});};bu.prototype._getEntries=function(n){var t=this._alignElements,e=this._translate,i=this._popupMenu,o={};return ne(fle,function(a){o["align-elements-"+a]={group:"align",title:e("Align elements "+a),className:"bjs-align-elements-menu-entry",imageHtml:zb[a],action:function(){t.trigger(n,a),i.close();}};}),o;};function Lr(n){Re.call(this,n),this.init();}Lr.$inject=["eventBus"];Fe(Lr,Re);Lr.prototype.addRule=function(n,t,e){var i=this;
948typeof n=="string"&&(n=[n]),n.forEach(function(o){i.canExecute(o,t,function(a,r,l){return e(a);},!0);});};Lr.prototype.init=function(){};function Mh(n){Lr.call(this,n);}Mh.$inject=["eventBus"];Fe(Mh,Lr);Mh.prototype.init=function(){this.addRule("elements.align",function(n){var t=n.elements,e=Yt(t,function(i){return!(i.waypoints||i.host||i.labelTarget);});return e=Ud(e),e.length<2?!1:e;});};var c5={__depends__:[C8,wb,Sh],__init__:["alignElementsContextPadProvider","alignElementsMenuProvider","bpmnAlignElements"],alignElementsContextPadProvider:["type",um],alignElementsMenuProvider:["type",bu],bpmnAlignElements:["type",Mh]};var hle=10,x2=50,_le=250;function Fb(n,t,e,i){for(var o;o=gle(n,e,t);)e=i(t,e,o);return e;}function Bb(n){return function(t,e,i){var o={x:e.x,y:e.y};return["x","y"].forEach(function(a){var r=n[a];if(r){var l=a==="x"?"width":"height",p=r.margin,d=r.minDistance;p<0?o[a]=Math.min(i[a]+p-t[l]/2,e[a]-d+p):o[a]=Math.max(i[a]+i[l]+p+t[l]/2,e[a]+d+p);}}),o;};}function gle(n,t,e){var i={x:t.x-e.width/2,y:t.y-e.height/2,width:e.width,height:e.height},o=xle(n);return $n(o,function(a){if(a===e)return!1;var r=Jo(a,i,hle);return r==="intersect";});}function p5(n,t){t||(t={});function e(w){return w.source===n?1:-1;}var i=t.defaultDistance||x2,o=t.direction||"e",a=t.filter,r=t.getWeight||e,l=t.maxDistance||_le,p=t.reference||"start";a||(a=ble);function d(w,T){return o==="n"?p==="start"?Ot(w).top-Ot(T).bottom:p==="center"?Ot(w).top-Rt(T).y:Ot(w).top-Ot(T).top:o==="w"?p==="start"?Ot(w).left-Ot(T).right:p==="center"?Ot(w).left-Rt(T).x:Ot(w).left-Ot(T).left:o==="s"?p==="start"?Ot(T).top-Ot(w).bottom:p==="center"?Rt(T).y-Ot(w).bottom:Ot(T).bottom-Ot(w).bottom:p==="start"?Ot(T).left-Ot(w).right:p==="center"?Rt(T).x-Ot(w).right:Ot(T).right-Ot(w).right;}var f=n.incoming.filter(a).map(function(w){var T=r(w),O=T<0?d(w.source,n):d(n,w.source);return{id:w.source.id,distance:O,weight:T};}),h=n.outgoing.filter(a).map(function(w){var T=r(w),O=T>0?d(n,w.target):d(w.target,n);return{id:w.target.id,distance:O,weight:T};}),g=f.concat(h).reduce(function(w,T){return w[T.id+"__weight_"+T.weight]=T,w;},{}),b=_a(g,function(w,T){var O=T.distance,V=T.weight;return O<0||O>l||(w[String(O)]||(w[String(O)]=0),w[String(O)]+=1*V,(!w.distance||w[w.distance]<w[String(O)])&&(w.distance=O)),w;},{});return b.distance||i;}function xle(n){var t=g2(n);return n.host&&(t=t.concat(g2(n.host))),n.attachers&&(t=t.concat(n.attachers.reduce(function(e,i){return e.concat(g2(i));},[]))),t;}function g2(n){return vle(n).concat(Cle(n));}function Cle(n){return n.incoming.map(function(t){return t.source;});}function vle(n){return n.outgoing.map(function(t){return t.target;});}function ble(){return!0;}var yle=100;function $b(n,t,e){n.on("autoPlace",yle,function(i){var o=i.shape,a=i.source;return Ple(a,o);}),n.on("autoPlace.end",function(i){e.scrollToElement(i.shape);}),this.append=function(i,o,a){n.fire("autoPlace.start",{source:i,shape:o});var r=n.fire("autoPlace",{source:i,shape:o}),l=t.appendShape(i,o,r,i.parent,a);return n.fire("autoPlace.end",{source:i,shape:l}),l;};}$b.$inject=["eventBus","modeling","canvas"];function Ple(n,t,e){e||(e={});var i=e.defaultDistance||x2,o=Rt(n),a=Ot(n);return{x:a.right+i+t.width/2,y:o.y};}function Vb(n,t){n.on("autoPlace.end",500,function(e){t.select(e.shape);});}Vb.$inject=["eventBus","selection"];var d5={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",$b],autoPlaceSelectionBehavior:["type",Vb]};function Vp(n,t){for(ka(t)&&(t=[t]);n=n.parent;)if(en(n,t))return n;return null;}function Gb(n,t){var e=Vp(n,"bpmn:Process");if(e)return!0;var i=["bpmn:Participant","bpmn:Lane"];if(e=Vp(n,i),e)return ao(e);if(en(n,i))return ao(n);var o;for(o=qe(n);o&&!z(o,"bpmn:Process");o=o.$parent);if(!t)return!0;var a=t.find(function(r){var l=qe(r);return l&&l.get("processRef")===o;});return a?ao(a):!0;}function qb(n,t,e){var i=Gb(n,e);if(z(t,"bpmn:TextAnnotation"))return Sle(n,t,i);if(en(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"]))return Mle(n,t,i);if(z(t,"bpmn:FlowNode"))return wle(n,t,i);}function wle(n,t,e){var i=Ot(n),o=Rt(n),a=e?{directionHint:"e",minDistance:80,baseOrientation:"left",boundaryOrientation:"top",start:"top",end:"bottom"}:{directionHint:"s",minDistance:90,baseOrientation:"top",boundaryOrientation:"left",start:"left",end:"right"},r=p5(n,{filter:function(b){return z(b,"bpmn:SequenceFlow");},direction:a.directionHint}),l=30,p=a.minDistance,d=a.baseOrientation;z(n,"bpmn:BoundaryEvent")&&(d=Jo(n,n.host,-25),d.indexOf(a.boundaryOrientation)!==-1&&(l*=-1));var f=e?{x:i.right+r+t.width/2,y:o.y+m5(d,p,a)}:{x:o.x+m5(d,p,a),y:i.bottom+r+t.height/2},h={margin:l,minDistance:p},g=e?{y:h}
948:{x:h};return Fb(n,t,f,Bb(g));}function m5(n,t,e){return n.includes(e.start)?-1*t:n.includes(e.end)?t:0;}function Sle(n,t,e){var i=Ot(n),o=e?{x:i.right+t.width/2,y:i.top-50-t.height/2}:{x:i.right+50+t.width/2,y:i.bottom+t.height/2};zn(n)&&(o=Rt(n),e?(o.x+=100,o.y-=50):(o.x+=100,o.y+=50));var a={margin:e?-30:30,minDistance:20},r=e?{y:a}:{x:a};return Fb(n,t,o,Bb(r));}function Mle(n,t,e){var i=Ot(n),o=e?{x:i.right-10+t.width/2,y:i.bottom+40+t.width/2}:{x:i.left-40-t.width/2,y:i.bottom-10+t.height/2},a={margin:30,minDistance:30},r=e?{x:a}:{y:a};return Fb(n,t,o,Bb(r));}function Jb(n,t){n.on("autoPlace",function(e){var i=e.shape,o=e.source;return qb(o,i,t);});}Jb.$inject=["eventBus","elementRegistry"];var Oh={__depends__:[d5],__init__:["bpmnAutoPlace"],bpmnAutoPlace:["type",Jb]};function vc(n,t,e,i){Re.call(this,n),this._elementRegistry=t,this._modeling=e,this._rules=i;var o=this;this.postExecuted(["shape.create"],function(a){var r=a.context,l=r.hints||{},p=r.shape,d=r.parent||r.newParent;l.autoResize!==!1&&o._expand([p],d);}),this.postExecuted(["elements.move"],function(a){var r=a.context,l=oh(mc(r.closure.topLevel)),p=r.hints,d=p?p.autoResize:!0;if(d!==!1){var f=uc(l,function(h){return h.parent.id;});ne(f,function(h,g){gt(d)&&(h=h.filter(function(b){return $n(d,fc({id:b.id}));})),o._expand(h,g);});}}),this.postExecuted(["shape.toggleCollapse"],function(a){var r=a.context,l=r.hints,p=r.shape;l&&l.autoResize===!1||p.collapsed||o._expand(p.children||[],p);}),this.postExecuted(["shape.resize"],function(a){var r=a.context,l=r.hints,p=r.shape,d=p.parent;l&&l.autoResize===!1||d&&o._expand([p],d);});}vc.$inject=["eventBus","elementRegistry","modeling","rules"];Fe(vc,Re);vc.prototype._getOptimalBounds=function(n,t){var e=this.getOffset(t),i=this.getPadding(t),o=Ot(Pi(n)),a=Ot(t),r={};return o.top-a.top<i.top&&(r.top=o.top-e.top),o.left-a.left<i.left&&(r.left=o.left-e.left),a.right-o.right<i.right&&(r.right=o.right+e.right),a.bottom-o.bottom<i.bottom&&(r.bottom=o.bottom+e.bottom),lu(me({},a,r));};vc.prototype._expand=function(n,t){typeof t=="string"&&(t=this._elementRegistry.get(t));var e=this._rules.allowed("element.autoResize",{elements:n,target:t});if(e){var i=this._getOptimalBounds(n,t);if(Ole(i,t)){var o=Ele(Za(t,["x","y","width","height"]),i);this.resize(t,i,{autoResize:o});var a=t.parent;a&&this._expand([t],a);}}};vc.prototype.getOffset=function(n){return{top:60,bottom:60,left:100,right:100};};vc.prototype.getPadding=function(n){return{top:2,bottom:2,left:15,right:15};};vc.prototype.resize=function(n,t,e){this._modeling.resizeShape(n,t,null,e);};function Ole(n,t){return n.x!==t.x||n.y!==t.y||n.width!==t.width||n.height!==t.height;}function Ele(n,t){var e="";return n=Ot(n),t=Ot(t),n.top>t.top&&(e=e.concat("n")),n.right<t.right&&(e=e.concat("w")),n.bottom<t.bottom&&(e=e.concat("s")),n.left>t.left&&(e=e.concat("e")),e;}function Eh(n){n.invoke(vc,this);}Eh.$inject=["injector"];Fe(Eh,vc);Eh.prototype.resize=function(n,t,e){z(n,"bpmn:Participant")?this._modeling.resizeLane(n,t,null,e):this._modeling.resizeShape(n,t,null,e);};function yu(n){Lr.call(this,n);var t=this;this.addRule("element.autoResize",function(e){return t.canResize(e.elements,e.target);});}yu.$inject=["eventBus"];Fe(yu,Lr);yu.prototype.canResize=function(n,t){return!1;};function Th(n,t){yu.call(this,n),this._modeling=t;}Fe(Th,yu);Th.$inject=["eventBus","modeling"];Th.prototype.canResize=function(n,t){if(z(t.di,"bpmndi:BPMNPlane")||!z(t,"bpmn:Participant")&&!z(t,"bpmn:Lane")&&!z(t,"bpmn:SubProcess"))return!1;var e=!0;return ne(n,function(i){if(z(i,"bpmn:Lane")||Ut(i)){e=!1;return;}}),e;};var u5={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",Eh],bpmnAutoResizeProvider:["type",Th]};var f5=1500;function Hb(n,t,e){var i=this,o=e.get("dragging",!1);function a(r){if(!r.hover){var l=r.originalEvent,p=i._findTargetGfx(l),d=p&&n.get(p);p&&d&&(r.stopPropagation(),o.hover({element:d,gfx:p}),o.move(l));}}o&&t.on("drag.start",function(r){t.once("drag.move",f5,function(l){a(l);});}),function(){var r,l;t.on("element.hover",function(p){r=p.gfx,l=p.element;}),t.on("element.hover",f5,function(p){l&&t.fire("element.out",{element:l,gfx:r});}),t.on("element.out",function(){r=null,l=null;});}(),this._findTargetGfx=function(r){var l,p;if(r instanceof MouseEvent)return l=ql(r),p=document.elementFromPoint(l.x,l.y),Tle(p);};}Hb.$inject=["elementRegistry","eventBus","injector"];function Tle(n){return Bs(n,"svg, .djs-element",!0);}var h5={__init__:["hoverFix"],hoverFix:["type",Hb]};var Ih=Math.round,_5="djs-drag-active";function Pu(n){n.preventDefault();}function Ile(n){return typeof TouchEvent<"u"&&n instanceof TouchEvent;}function kle(n){return Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2));}function Ub(n,t,e,i){var o={threshold:5,trapClick:!0},a;function r(L){var A=t.viewbox(),J=t._container.getBoundingClientRect();return{x:A.x+(L.x-J.left)/A.scale,y:A.y+(L.y-J.top)/A.scale};}function l(L,A){A=A||a;var J=n.createEvent(me({},A.payload,A.data,{isTouch:A.isTouch}));return n.fire("drag."+L,J)===!1?!1:n.fire(A.prefix+"."+L,J);}function p(L){var A=L.filter(function(J){return i.get(J.id);});A.length&&e.select(A);}function d(L,A){var J=a.payload,Q=a.displacement,te=a.globalStart,U=ql(L),ce=Sr(U,te),W=
948a.localStart,Y=r(U),se=Sr(Y,W);if(!a.active&&(A||kle(ce)>a.threshold)){if(me(J,{x:Ih(W.x+Q.x),y:Ih(W.y+Q.y),dx:0,dy:0},{originalEvent:L}),l("start")===!1)return O();a.active=!0,a.keepSelection||(J.previousSelection=e.get(),e.select(null)),a.cursor&&hu(a.cursor),t.addMarker(t.getRootElement(),_5);}rb(L),a.active&&(me(J,{x:Ih(Y.x+Q.x),y:Ih(Y.y+Q.y),dx:Ih(se.x),dy:Ih(se.y)},{originalEvent:L}),l("move"));}function f(L){var A,J=!0;a.active&&(L&&(a.payload.originalEvent=L,rb(L)),J=l("end")),J===!1&&l("rejected"),A=V(J!==!0),l("ended",A);}function h(L){ca("Escape",L)&&(Pu(L),O());}function g(L){var A;a.active&&(A=Cb(n),setTimeout(A,400),Pu(L)),f(L);}function b(L){d(L);}function w(L){var A=a.payload;A.hoverGfx=L.gfx,A.hover=L.element,l("hover");}function T(L){l("out");var A=a.payload;A.hoverGfx=null,A.hover=null;}function O(L){var A;if(a){var J=a.active;J&&l("cancel"),A=V(L),J&&l("canceled",A);}}function V(L){var A,J;l("cleanup"),xb(),a.trapClick?J=g:J=f,Cn.unbind(document,"mousemove",d),Cn.unbind(document,"dragstart",Pu),Cn.unbind(document,"selectstart",Pu),Cn.unbind(document,"mousedown",J,!0),Cn.unbind(document,"mouseup",J,!0),Cn.unbind(document,"keyup",h),Cn.unbind(document,"touchstart",b,!0),Cn.unbind(document,"touchcancel",O,!0),Cn.unbind(document,"touchmove",d,!0),Cn.unbind(document,"touchend",f,!0),n.off("element.hover",w),n.off("element.out",T),t.removeMarker(t.getRootElement(),_5);var Q=a.payload.previousSelection;return L!==!1&&Q&&!e.get().length&&p(Q),A=a,a=null,A;}function j(L,A,J,Q){a&&O(!1),typeof A=="string"&&(Q=J,J=A,A=null),Q=me({},o,Q||{});var te=Q.data||{},U,ce,W,Y,se;if(Q.trapClick?Y=g:Y=f,L?(U=zp(L)||L,ce=ql(L),rb(L),U.type==="dragstart"&&Pu(U)):(U=null,ce={x:0,y:0}),W=r(ce),A||(A=W),se=Ile(U),a=me({prefix:J,data:te,payload:{},globalStart:ce,displacement:Sr(A,W),localStart:W,isTouch:se},Q),Q.manual||(se?(Cn.bind(document,"touchstart",b,!0),Cn.bind(document,"touchcancel",O,!0),Cn.bind(document,"touchmove",d,!0),Cn.bind(document,"touchend",f,!0)):(Cn.bind(document,"mousemove",d),Cn.bind(document,"dragstart",Pu),Cn.bind(document,"selectstart",Pu),Cn.bind(document,"mousedown",Y,!0),Cn.bind(document,"mouseup",Y,!0)),Cn.bind(document,"keyup",h),n.on("element.hover",w),n.on("element.out",T)),l("init")===!1)return O(),!1;Q.autoActivate&&d(L,!0);}n.on("diagram.destroy",O),this.init=j,this.move=d,this.hover=w,this.out=T,this.end=f,this.cancel=O,this.context=function(){return a;},this.setOptions=function(L){me(o,L);};}Ub.$inject=["eventBus","canvas","selection","elementRegistry"];var Mr={__depends__:[h5,la],dragging:["type",Ub]};function fm(n,t,e){this._canvas=e,this._opts=me({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},n);var i=this;t.on("drag.move",function(o){var a=i._toBorderPoint(o);i.startScroll(a);}),t.on(["drag.cleanup"],function(){i.stopScroll();});}fm.$inject=["config.autoScroll","eventBus","canvas"];fm.prototype.startScroll=function(n){var t=this._canvas,e=this._opts,i=this,o=t.getContainer().getBoundingClientRect(),a=[n.x,n.y,o.width-n.x,o.height-n.y];this.stopScroll();for(var r=0,l=0,p=0;p<4;p++)Rle(a[p],e.scrollThresholdOut[p],e.scrollThresholdIn[p])&&(p===0?r=e.scrollStep:p==1?l=e.scrollStep:p==2?r=-e.scrollStep:p==3&&(l=-e.scrollStep));(r!==0||l!==0)&&(t.scroll({dx:r,dy:l}),this._scrolling=setTimeout(function(){i.startScroll(n);},e.scrollRepeatTimeout));};function Rle(n,t,e){return t<n&&n<e;}fm.prototype.stopScroll=function(){clearTimeout(this._scrolling);};fm.prototype.setOptions=function(n){this._opts=me({},this._opts,n);};fm.prototype._toBorderPoint=function(n){var t=this._canvas._container.getBoundingClientRect(),e=ql(n.originalEvent);return{x:e.x-t.left,y:e.y-t.top};};var g5={__depends__:[Mr],__init__:["autoScroll"],autoScroll:["type",fm]};function tg(n){this._commandStack=n.get("commandStack",!1);}tg.$inject=["injector"];tg.prototype.allowed=function(n,t){var e=!0,i=this._commandStack;return i&&(e=i.canExecute(n,t)),e===void 0?!0:e;};var er={__init__:["rules"],rules:["type",tg]};var Wb=Math.round,Nle=Math.max;function Ale(n,t){var e=n.x,i=n.y;return[["M",e,i],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]];}function Dle(n){var t=[];
948return n.forEach(function(e,i){t.push([i===0?"M":"L",e.x,e.y]);}),t;}var x5=10;function jle(n,t){var e,i;for(e=0;i=n[e];e++)if(Wd(i,t)<=x5)return{point:n[e],bendpoint:!0,index:e};return null;}function Lle(n,t){var e=$0(Ale(t,x5),Dle(n)),i=e[0],o=e[e.length-1],a;return i?i!==o?i.segment2!==o.segment2?(a=Nle(i.segment2,o.segment2)-1,{point:n[a],bendpoint:!0,index:a}):{point:{x:Wb(i.x+o.x)/2,y:Wb(i.y+o.y)/2},index:i.segment2}:{point:{x:Wb(i.x),y:Wb(i.y)},index:i.segment2}:null;}function ng(n,t){return jle(n,t)||Lle(n,t);}function C5(n){return Math.sqrt(Math.pow(n.x,2)+Math.pow(n.y,2));}function C2(n){return Math.atan((n[1].y-n[0].y)/(n[1].x-n[0].x));}function v5(n,t){return t?{x:Math.cos(t)*n.x-Math.sin(t)*n.y,y:Math.sin(t)*n.x+Math.cos(t)*n.y}:n;}function zle(n,t,e){var i=[{n:n[0]-e[0],lambda:t[0]},{n:n[1]-e[1],lambda:t[1]}],o=i[0].n*t[0]+i[1].n*t[1],a=i[0].lambda*t[0]+i[1].lambda*t[1];return-o/a;}function v2(n,t){var e=t[0],i=t[1],o={x:i.x-e.x,y:i.y-e.y},a=zle([e.x,e.y],[o.x,o.y],[n.x,n.y]);return{x:e.x+a*o.x,y:e.y+a*o.y};}function b5(n,t){var e=v2(n,t),i={x:e.x-n.x,y:e.y-n.y};return C5(i);}function Gp(n,t){return C5({x:n.x-t.x,y:n.y-t.y});}var b2="djs-bendpoint",y2="djs-segment-dragger";function Fle(n,t){var e=ql(t),i=n._container.getBoundingClientRect(),o;o={x:i.left,y:i.top};var a=n.viewbox();return{x:a.x+(e.x-o.x)/a.scale,y:a.y+(e.y-o.y)/a.scale};}function ig(n,t,e){var i=Fle(n,e),o=ng(t,i);return o;}function og(n,t){var e=xt("g");En(e).add(b2),Kt(n,e);var i=xt("circle");lt(i,{cx:0,cy:0,r:4}),En(i).add("djs-visual"),Kt(e,i);var o=xt("circle");return lt(o,{cx:0,cy:0,r:10}),En(o).add("djs-hit"),Kt(e,o),t&&En(e).add(t),e;}function Ble(n,t,e,i){var o=xt("g");Kt(n,o);var a=18,r=6,l=11,p=$le(t,e,i),d=r+l,f=xt("rect");lt(f,{x:-a/2,y:-r/2,rx:3,width:a,height:r}),En(f).add("djs-visual"),Kt(o,f);var h=xt("rect");return lt(h,{x:-p/2,y:-d/2,width:p,height:d}),En(h).add("djs-hit"),Kt(o,h),Fv(o,i==="v"?90:0,0,0),o;}function Yb(n,t,e){var i=xt("g"),o=B0(t,e),a=$s(t,e);return Kt(n,i),Ble(i,t,e,a),En(i).add(y2),En(i).add(a==="h"?"horizontal":"vertical"),Ao(i,o.x,o.y),i;}function Xb(n){return Math.abs(Math.round(n*2/3));}function y5(n,t){var e=Vle(n,t);return v2(n,e);}function $le(n,t,e){var i=t.x-n.x,o=t.y-n.y;return Xb(e==="h"?i:o);}function Vle(n,t){for(var e=t.waypoints,i=1/0,o,a=0;a<e.length-1;a++){var r=e[a],l=e[a+1],p=b5(n,[r,l]);p<i&&(i=p,o=a);}return[e[o],e[o+1]];}function Kb(n,t,e,i,o){function a(L,A,J){var Q=L.index,te=L.point,U,ce,W,Y,se,de;return Q<=0||L.bendpoint?!1:(U=A[Q-1],ce=A[Q],W=B0(U,ce),Y=$s(U,ce),se=Math.abs(te.x-W.x),de=Math.abs(te.y-W.y),Y&&se<=J&&de<=J);}function r(L,A){var J=L.waypoints,Q,te,U,ce;return A.index<=0||A.bendpoint||(Q={start:J[A.index-1],end:J[A.index]},te=$s(Q.start,Q.end),!te)?null:(te==="h"?U=Q.end.x-Q.start.x:U=Q.end.y-Q.start.y,ce=Xb(U)/2,ce);}function l(L,A){var J=A.waypoints,Q=ig(t,J,L),te;if(Q){te=r(A,Q);var U;if(a(Q,J,te)?U=o.start(L,A,Q.index):U=i.start(L,A,Q.index,!Q.bendpoint),U!==!1)return!0;}}function p(L,A,J){Cn.bind(L,A,function(Q){e.triggerMouseEvent(A,Q,J),Q.stopPropagation();});}function d(L,A){var J=t.getLayer("overlays"),Q=si('.djs-bendpoints[data-element-id="'+jp(L.id)+'"]',J);return!Q&&A&&(Q=xt("g"),lt(Q,{"data-element-id":L.id}),En(Q).add("djs-bendpoints"),Kt(J,Q),p(Q,"mousedown",L),p(Q,"click",L),p(Q,"dblclick",L)),Q;}function f(L,A){return si('.djs-segment-dragger[data-segment-idx="'+L+'"]',A);}function h(L,A){A.waypoints.forEach(function(J,Q){var te=og(L);Kt(L,te),Ao(te,J.x,J.y);}),og(L,"floating");}function g(L,A){for(var J=A.waypoints,Q,te,U,ce=1;ce<J.length;ce++)Q=J[ce-1],te=J[ce],$s(Q,te)&&(U=Yb(L,Q,te),lt(U,{"data-segment-idx":ce}),p(U,"mousemove",A));}function b(L){ne(ru("."+b2,L),function(A){Hi(A);});}function w(L){ne(ru("."+y2,L),function(A){Hi(A);});}function T(L){var A=d(L);return A||(A=d(L,!0),h(A,L),g(A,L)),A;}function O(L){var A=d(L);A&&(w(A),b(A),g(A,L),h(A,L));}function V(L,A){var J=si(".floating",L),Q=A.point;J&&(Ao(J,Q.x,Q.y),En(J).add("positioned"));}function j(L,A,J){var Q=f(A.index,L),te=J[A.index-1],U=J[A.index],ce=A.point,W=B0(te,U),Y=$s(te,U),se,de;Q&&(se=Gle(Q),de={x:ce.x-W.x,y:ce.y-W.y},Y==="v"&&(de={x:de.y,y:de.x}),Ao(se,de.x,de.y));}n.on("connection.changed",function(L){O(L.element);}),n.on("connection.remove",function(L){var A=d(L.element);A&&Hi(A);}),n.on("element.marker.update",function(L){var A=L.element,J;A.waypoints&&(J=T(A),L.add?En(J).add(L.marker):En(J).remove(L.marker));}),n.on("element.mousemove",function(L){var A=L.element,J=A.waypoints,Q,te;if(J){if(Q=d(A,!0),te=ig(t,J,L.originalEvent),!te)return;V(Q,te),te.bendpoint||j(Q,te,J);}}),n.on("element.mousedown",function(L){if(ol(L)){var A=L.originalEvent,J=L.element;if(J.waypoints)return l(A,J);}}),n.on("selection.changed",function(L){var A=L.newSelection,J=A[0];J&&J.waypoints&&T(J);}),n.on("element.hover",function(L){var A=L.element;A.waypoints&&T(A);}),n.on("element.out",function(L){var A=L.element;if(A.waypoints){var J=d(A);if(J){var Q=si(".floating",J);Q&&En(Q).remove("positioned");}}}),n.on("element.updateId",function(L){var A=L.element,J=L.newId;if(A.waypoints){var Q=d(A);Q&<(Q,{"data-element-id":J});}}),this.addHandles=T,this.updateHandles=O,this.getBendpointsContainer=d,this.get
948SegmentDragger=f;}Kb.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];function Gle(n){return si(".djs-visual",n);}var P5=Math.round,wu="reconnectStart",Su="reconnectEnd",ag="updateWaypoints";function sg(n,t,e,i,o,a){this._injector=n,this.start=function(r,l,p,d){var f=e.getGraphics(l),h=l.source,g=l.target,b=l.waypoints,w;!d&&p===0?w=wu:!d&&p===b.length-1?w=Su:w=ag;var T=w===ag?"connection.updateWaypoints":"connection.reconnect",O=o.allowed(T,{connection:l,source:h,target:g});if(O===!1&&(O=o.allowed(T,{connection:l,source:g,target:h})),O!==!1)return i.init(r,"bendpoint.move",{data:{connection:l,connectionGfx:f,context:{allowed:O,bendpointIndex:p,connection:l,source:h,target:g,insert:d,type:w}}});},t.on("bendpoint.move.hover",function(r){var l=r.context,p=l.connection,d=p.source,f=p.target,h=r.hover,g=l.type;l.hover=h;var b;if(h){var w=g===ag?"connection.updateWaypoints":"connection.reconnect";if(b=l.allowed=o.allowed(w,{connection:p,source:g===wu?h:d,target:g===Su?h:f}),b){l.source=g===wu?h:d,l.target=g===Su?h:f;return;}b===!1&&(b=l.allowed=o.allowed(w,{connection:p,source:g===Su?h:f,target:g===wu?h:d})),b&&(l.source=g===Su?h:f,l.target=g===wu?h:d);}}),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],function(r){var l=r.context,p=l.type;l.hover=null,l.source=null,l.target=null,p!==ag&&(l.allowed=!1);}),t.on("bendpoint.move.end",function(r){var l=r.context,p=l.allowed,d=l.bendpointIndex,f=l.connection,h=l.insert,g=f.waypoints.slice(),b=l.source,w=l.target,T=l.type,O=l.hints||{},V={x:P5(r.x),y:P5(r.y)};if(!p)return!1;T===ag?(h?g.splice(d,0,V):g[d]=V,O.bendpointMove={insert:h,bendpointIndex:d},g=this.cropWaypoints(f,g),a.updateWaypoints(f,FN(g),O)):(T===wu?(O.docking="source",rg(l)&&(O.docking="target",O.newWaypoints=g.reverse())):T===Su&&(O.docking="target",rg(l)&&(O.docking="source",O.newWaypoints=g.reverse())),a.reconnect(f,b,w,V,O));},this);}sg.$inject=["injector","eventBus","canvas","dragging","rules","modeling"];sg.prototype.cropWaypoints=function(n,t){var e=this._injector.get("connectionDocking",!1);if(!e)return t;var i=n.waypoints;return n.waypoints=t,n.waypoints=e.getCroppedWaypoints(n),t=n.waypoints,n.waypoints=i,t;};function rg(n){var t=n.hover,e=n.source,i=n.target,o=n.type;if(o===wu)return t&&i&&t===i&&e!==i;if(o===Su)return t&&e&&t===e&&e!==i;}var qle="reconnectStart",Jle="reconnectEnd",w5="updateWaypoints",lg="connect-ok",Zb="connect-not-ok",S5="connect-hover",M5="djs-updating",O5="djs-dragging",E5=1100;function Qb(n,t,e,i){this._injector=t;var o=t.get("connectionPreview",!1);e.on("bendpoint.move.start",function(a){var r=a.context,l=r.bendpointIndex,p=r.connection,d=r.insert,f=p.waypoints,h=f.slice();r.waypoints=f,d&&h.splice(l,0,{x:a.x,y:a.y}),p.waypoints=h;var g=r.draggerGfx=og(i.getLayer("overlays"));En(g).add("djs-dragging"),i.addMarker(p,O5),i.addMarker(p,M5);}),e.on("bendpoint.move.hover",function(a){var r=a.context,l=r.allowed,p=r.hover,d=r.type;if(p){if(i.addMarker(p,S5),d===w5)return;l?(i.removeMarker(p,Zb),i.addMarker(p,lg)):l===!1&&(i.removeMarker(p,lg),i.addMarker(p,Zb));}}),e.on(["bendpoint.move.out","bendpoint.move.cleanup"],E5,function(a){var r=a.context,l=r.hover,p=r.target;l&&(i.removeMarker(l,S5),i.removeMarker(l,p?lg:Zb));}),e.on("bendpoint.move.move",function(a){var r=a.context,l=r.allowed,p=r.bendpointIndex,d=r.draggerGfx,f=r.hover,h=r.type,g=r.connection,b=g.source,w=g.target,T=g.waypoints.slice(),O={x:a.x,y:a.y},V=r.hints||{},j={};o&&(V.connectionStart&&(j.connectionStart=V.connectionStart),V.connectionEnd&&(j.connectionEnd=V.connectionEnd),h===qle?rg(r)?(j.connectionEnd=j.connectionEnd||O,j.source=w,j.target=f||b,T=T.reverse()):(j.connectionStart=j.connectionStart||O,j.source=f||b,j.target=w):h===Jle?rg(r)?(j.connectionStart=j.connectionStart||O,j.source=f||w,j.target=b,T=T.reverse()):(j.connectionEnd=j.connectionEnd||O,j.source=b,j.target=f||w):(j.noCropping=!0,j.noLayout=!0,T[p]=O),h===w5&&(T=n.cropWaypoints(g,T)),j.waypoints=T,o.drawPreview(r,l,j)),Ao(d,a.x,a.y);},this),e.on(["bendpoint.move.end","bendpoint.move.cancel"],E5,function(a){var r=a.context,l=r.connection,p=r.draggerGfx,d=r.hover,f=r.target,h=r.waypoints;l.waypoints=h,Hi(p),i.removeMarker(l,M5),i.removeMarker(l,O5),d&&(i.removeMarker(d,lg),i.removeMarker(d,f?lg:Zb)),o&&o.cleanUp(r);});}
948Qb.$inject=["bendpointMove","injector","eventBus","canvas"];var T5="connect-hover",I5="djs-updating";function k5(n,t,e){return P2(n,t,n[t]+e);}function P2(n,t,e){return{x:t==="x"?e:n.x,y:t==="y"?e:n.y};}function Hle(n,t,e,i){var o=Math.max(t[i],e[i]),a=Math.min(t[i],e[i]),r=20,l=Math.min(Math.max(a+r,n[i]),o-r);return P2(t,i,l);}function N5(n){return n==="x"?"y":"x";}function R5(n,t,e){var i,o;return n.original?n.original:(i=Rt(t),o=N5(e),P2(n,o,i[o]));}function ey(n,t,e,i,o,a){var r=n.get("connectionDocking",!1);this.start=function(h,g,b){var w,T=e.getGraphics(g),O=b-1,V=b,j=g.waypoints,L=j[O],A=j[V],J=ig(e,j,h),Q,te,U;if(Q=$s(L,A),!!Q)return te=Q==="v"?"x":"y",O===0&&(L=R5(L,g.source,te)),V===j.length-1&&(A=R5(A,g.target,te)),J?U=J.point:U={x:(L.x+A.x)/2,y:(L.y+A.y)/2},w={connection:g,segmentStartIndex:O,segmentEndIndex:V,segmentStart:L,segmentEnd:A,axis:te,dragPosition:U},i.init(h,U,"connectionSegment.move",{cursor:te==="x"?"resize-ew":"resize-ns",data:{connection:g,connectionGfx:T,context:w}});};function l(h,g){if(!r)return g;var b=h.waypoints,w;return h.waypoints=g,w=r.getCroppedWaypoints(h),h.waypoints=b,w;}function p(h){o.update("connection",h.connection,h.connectionGfx);}function d(h,g,b){var w=h.newWaypoints,T=h.segmentStartIndex+g,O=w[T],V=h.segmentEndIndex+g,j=w[V],L=N5(h.axis),A=Hle(b,O,j,L);Ao(h.draggerGfx,A.x,A.y);}function f(h,g){var b=0,w=h.filter(function(T,O){return lh(h[O-1],h[O+1],T)?(b=O<=g?b-1:b,!1):!0;});return{waypoints:w,segmentOffset:b};}t.on("connectionSegment.move.start",function(h){var g=h.context,b=h.connection,w=e.getLayer("overlays");g.originalWaypoints=b.waypoints.slice(),g.draggerGfx=Yb(w,g.segmentStart,g.segmentEnd),En(g.draggerGfx).add("djs-dragging"),e.addMarker(b,I5);}),t.on("connectionSegment.move.move",function(h){var g=h.context,b=g.connection,w=g.segmentStartIndex,T=g.segmentEndIndex,O=g.segmentStart,V=g.segmentEnd,j=g.axis,L=g.originalWaypoints.slice(),A=k5(O,j,h["d"+j]),J=k5(V,j,h["d"+j]),Q=L.length,te=0;L[w]=A,L[T]=J;var U,ce;w<2&&(U=Jo(b.source,A),w===1?U==="intersect"&&(L.shift(),L[0]=A,te--):U!=="intersect"&&(L.unshift(O),te++)),T>Q-3&&(ce=Jo(b.target,J),T===Q-2?ce==="intersect"&&(L.pop(),L[L.length-1]=J):ce!=="intersect"&&L.push(V)),g.newWaypoints=b.waypoints=l(b,L),d(g,te,h),g.newSegmentStartIndex=w+te,p(h);}),t.on("connectionSegment.move.hover",function(h){h.context.hover=h.hover,e.addMarker(h.hover,T5);}),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],function(h){var g=h.context.hover;g&&e.removeMarker(g,T5);}),t.on("connectionSegment.move.cleanup",function(h){var g=h.context,b=g.connection;g.draggerGfx&&Hi(g.draggerGfx),e.removeMarker(b,I5);}),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],function(h){var g=h.context,b=g.connection;b.waypoints=g.originalWaypoints,p(h);}),t.on("connectionSegment.move.end",function(h){var g=h.context,b=g.connection,w=g.newWaypoints,T=g.newSegmentStartIndex;w=w.map(function(J){return{original:J.original,x:Math.round(J.x),y:Math.round(J.y)};});var O=f(w,T),V=O.waypoints,j=l(b,V),L=O.segmentOffset,A={segmentMove:{segmentStartIndex:g.segmentStartIndex,newSegmentStartIndex:T+L}};a.updateWaypoints(b,j,A);});}ey.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var Ule=Math.abs,A5=Math.round;function D5(n,t,e){e=e===void 0?10:e;var i,o;for(i=0;i<t.length;i++)if(o=t[i],Ule(o-n)<=e)return o;}function ty(n){return{x:n.x,y:n.y};}function ny(n){return{x:n.x+n.width,y:n.y+n.height};}function qs(n,t){return!n||isNaN(n.x)||isNaN(n.y)?t:{x:A5(n.x+n.width/2),y:A5(n.y+n.height/2)};}function bc(n,t){var e=n.snapped;return e?typeof t=="string"?e[t]:e.x&&e.y:!1;}function Uo(n,t,e){if(typeof t!="string")throw new Error("axis must be in [x, y]");if(typeof e!="number"&&e!==!1)throw new Error("value must be Number or false");var i,o=n[t],a=n.snapped=n.snapped||{};return e===!1?a[t]=!1:(a[t]=!0,i=e-o,n[t]+=i,n["d"+t]+=i),o;}function iy(n){return n.children||[];}var Wle=Math.abs,j5=Math.round,w2=10;function oy(n){function t(a,r){if(gt(a)){for(var l=a.length;l--;)if(Wle(a[l]-r)<=w2)return a[l];}else{a=+a;var p=r%a;if(p<w2)return r-p;if(p>a-w2)return r-p+a;}return r;}function e(a,r){if(a.waypoints)return y5(r,a);if(a.width)return{x:j5(a.width/2+a.x),y:j5(a.height/2+a.y)};}function i(a){var r=a.context,l=r.snapPoints,p=r.connection,d=p.waypoints,f=r.segmentStart,h=r.segmentStartIndex,g=r.segmentEnd,b=r.segmentEndIndex,w=r.axis;
948if(l)return l;var T=[d[h-1],f,g,d[b+1]];return h<2&&T.unshift(e(p.source,a)),b>d.length-3&&T.unshift(e(p.target,a)),r.snapPoints=l={horizontal:[],vertical:[]},ne(T,function(O){O&&(O=O.original||O,w==="y"&&l.horizontal.push(O.y),w==="x"&&l.vertical.push(O.x));}),l;}n.on("connectionSegment.move.move",1500,function(a){var r=i(a),l=a.x,p=a.y,d,f;if(r){d=t(r.vertical,l),f=t(r.horizontal,p);var h=l-d,g=p-f;me(a,{dx:a.dx-h,dy:a.dy-g,x:d,y:f}),(h||r.vertical.indexOf(l)!==-1)&&Uo(a,"x",d),(g||r.horizontal.indexOf(p)!==-1)&&Uo(a,"y",f);}});function o(a){var r=a.snapPoints,l=a.connection.waypoints,p=a.bendpointIndex;if(r)return r;var d=[l[p-1],l[p+1]];return a.snapPoints=r={horizontal:[],vertical:[]},ne(d,function(f){f&&(f=f.original||f,r.horizontal.push(f.y),r.vertical.push(f.x));}),r;}n.on(["connect.hover","connect.move","connect.end"],1500,function(a){var r=a.context,l=r.hover,p=l&&e(l,a);!zn(l)||!p||!p.x||!p.y||(Uo(a,"x",p.x),Uo(a,"y",p.y));}),n.on(["bendpoint.move.move","bendpoint.move.end"],1500,function(a){var r=a.context,l=o(r),p=r.hover,d=p&&e(p,a),f=a.x,h=a.y,g,b;if(l){g=t(d?l.vertical.concat([d.x]):l.vertical,f),b=t(d?l.horizontal.concat([d.y]):l.horizontal,h);var w=f-g,T=h-b;me(a,{dx:a.dx-w,dy:a.dy-T,x:a.x-w,y:a.y-T}),(w||l.vertical.indexOf(f)!==-1)&&Uo(a,"x",g),(T||l.horizontal.indexOf(h)!==-1)&&Uo(a,"y",b);}});}oy.$inject=["eventBus"];var L5={__depends__:[Mr,er],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Kb],bendpointMove:["type",sg],bendpointMovePreview:["type",Qb],connectionSegmentMove:["type",ey],bendpointSnapping:["type",oy]};function ry(n,t,e,i){function o(r,l){return i.allowed("connection.create",{source:r,target:l});}function a(r,l){return o(l,r);}n.on("connect.hover",function(r){var l=r.context,p=l.start,d=r.hover,f;if(l.hover=d,f=l.canExecute=o(p,d),!Ep(f)){if(f!==!1){l.source=p,l.target=d;return;}f=l.canExecute=a(p,d),!Ep(f)&&f!==!1&&(l.source=d,l.target=p);}}),n.on(["connect.out","connect.cleanup"],function(r){var l=r.context;l.hover=null,l.source=null,l.target=null,l.canExecute=!1;}),n.on("connect.end",function(r){var l=r.context,p=l.canExecute,d=l.connectionStart,f={x:r.x,y:r.y},h=l.source,g=l.target;if(!p)return!1;var b=null,w={connectionStart:ay(l)?f:d,connectionEnd:ay(l)?d:f};eo(p)&&(b=p),l.connection=e.connect(h,g,b,w);}),this.start=function(r,l,p,d){eo(p)||(d=p,p=Rt(l)),t.init(r,"connect",{autoActivate:d,data:{shape:l,context:{start:l,connectionStart:p}}});};}ry.$inject=["eventBus","dragging","modeling","rules"];function ay(n){var t=n.hover,e=n.source,i=n.target;return t&&e&&t===e&&e!==i;}var Xle=1100,Yle=900,z5="connect-ok",F5="connect-not-ok";function sy(n,t,e){var i=n.get("connectionPreview",!1);i&&t.on("connect.move",function(o){var a=o.context,r=a.canExecute,l=a.hover,p=a.source,d=a.start,f=a.startPosition,h=a.target,g=a.connectionStart||f,b=a.connectionEnd||{x:o.x,y:o.y},w=g,T=b;ay(a)&&(w=b,T=g),i.drawPreview(a,r,{source:p||d,target:h||l,connectionStart:w,connectionEnd:T});}),t.on("connect.hover",Yle,function(o){var a=o.context,r=o.hover,l=a.canExecute;l!==null&&e.addMarker(r,l?z5:F5);}),t.on(["connect.out","connect.cleanup"],Xle,function(o){var a=o.hover;a&&(e.removeMarker(a,z5),e.removeMarker(a,F5));}),i&&t.on("connect.cleanup",function(o){i.cleanUp(o.context);});}sy.$inject=["injector","eventBus","canvas"];var kh={__depends__:[la,er,Mr],__init__:["connectPreview"],connect:["type",ry],connectPreview:["type",sy]};var Kle="djs-dragger";function yc(n,t,e,i){this._canvas=t,this._graphicsFactory=e,this._elementFactory=i,this._connectionDocking=n.get("connectionDocking",!1),this._layouter=n.get("layouter",!1);}yc.$inject=["injector","canvas","graphicsFactory","elementFactory"];yc.prototype.drawPreview=function(n,t,e){e=e||{};var i=n.connectionPreviewGfx,o=n.getConnection,a=e.source,r=e.target,l=e.waypoints,p=e.connectionStart,d=e.connectionEnd,f=e.noLayout,h=e.noCropping,g=e.noNoop,b,w=this;if(i||(i=n.connectionPreviewGfx=this.createConnectionPreviewGfx()),Tp(i),o||(o=n.getConnection=Zle(function(T,O,V){return w.getConnection(T,O,V);})),t&&(b=o(t,a,r)),!b){!g&&this.drawNoopPreview(i,e);return;}b.waypoints=l||[],this._layouter&&!f&&(b.waypoints=this._layouter.layoutConnection(b,{source:a,target:r,connectionStart:p,connectionEnd:d,waypoints:e.waypoints||b.waypoints})),(!b.waypoints||!b.waypoints.length)&&(b.waypoints=[a?Rt(a):p,r?Rt(r):d]),this._connectionDocking&&(a||r)&&!h&&(b.waypoints=this._connectionDocking.getCroppedWaypoints(b,a,r)),this._graphicsFactory.drawConnection(i,b,{stroke:"var(--element-dragger-color)"});};yc.prototype.drawNoopPreview=function(n,t){var e=t.source,i=t.target,o=t.connectionStart||Rt(e),a=t.connectionEnd||Rt(i),r=this.cropWaypoints(o,a,e,i),l=this.createNoopConnection(r[0],r[1]);Kt(n,l);};yc.prototype.cropWaypoints=function(n,t,e,i){var o=this._graphicsFactory,a=e&&o.getShapePath(e),r=i&&o.getShapePath(i),l=o.getConnectionPath({waypoints:[n,t]});return n=e&&Zd(a,l,!0)||n,t=i&&Zd(r,l,!1)||t,[n,t];};yc.prototype.cleanUp=function(n){n&&n.connectionPreviewGfx&&Hi(n.connectionPreviewGfx);};yc.prototype.getConnection=function(n){var t=Qle(n);return this._elementFactory.createConnection(t);};yc.prototype.createConnectionPreviewGfx=function(){var n=xt("g");return lt(n,{pointerEvents:"none"}),En(n).add(Kle),Kt(this._canvas.getActiveLayer(),n),n;};yc.prototype.createNoopConnection=function(n,t){return Bc([n,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"});};function Zle(n){var t={};return function(e){var i=JSON.stringify(e),o=t[i];return o||(o=t[i]=n.apply(null,arguments)),o;};}function Qle(n){return eo(n)?n:{};}var B5={__init__:["connectionPreview"],connectionPreview:["type",yc]};var ece=new Gl("ps"),tce=["marker-start","marker-mid","marker-end"],nce=["circle","ellipse","line","path","polygon","polyline","path","rect"];function Yc(n,t,e,i){this._elementRegistry=n,this._canvas=e,this._styles=i;}Yc.$inject=["elementRegistry","eventBus","canvas","styles"];Yc.prototype.cleanUp=function(){console.warn("PreviewSupport#cleanUp is deprecated and will be removed in future versions. You do not need to manually clean up previews anymore. cf. https://github.com/bpmn-io/diagram-js/pull/906");};Yc.prototype.getGfx=function(n){return this._elementRegistry.getGraphics(n);};Yc.prototype.addDragger=function(n,t,e,i="djs-dragger"){e=e||this.getGfx(n);var o=_M(e);return this._cloneMarkers(_c(o),i),lt(o,this._styles.cls(i,[])),Kt(t,o),lt(o,"data-preview-support-element-id",n.id),o;};Yc.prototype.addFrame=function(n,t){var e=xt("rect",{class:"djs-resize-overlay",width:n.width,height:n.height,x:n.x,y:n.y});return Kt(t,e),lt(e,"data-preview-support-element-id",n.id),e;};Yc.prototype._cloneMarkers=function(n,t="djs-dragger",e=n){var i=this;
948n.childNodes&&n.childNodes.forEach(o=>{i._cloneMarkers(o,t,e);}),rce(n)&&tce.forEach(function(o){if(lt(n,o)){var a=ice(n,o,i._canvas.getContainer());a&&i._cloneMarker(e,n,a,o,t);}});};Yc.prototype._cloneMarker=function(n,t,e,i,o="djs-dragger"){var a=[e.id,o,ece.next()].join("-"),r=si("marker#"+e.id,n);n=n||this._canvas._svg;var l=r||_M(e);l.id=a,En(l).add(o);var p=si(":scope > defs",n);p||(p=xt("defs"),Kt(n,p)),Kt(p,l);var d=ace(l.id);lt(t,i,d);};function ice(n,t,e){var i=oce(lt(n,t));return si("marker#"+i,e||document);}function oce(n){return n.match(/url\(['"]?#([^'"]*)['"]?\)/)[1];}function ace(n){return"url(#"+n+")";}function rce(n){return nce.indexOf(n.nodeName)!==-1;}var Hl={__init__:["previewSupport"],previewSupport:["type",Yc]};var ly="complex-preview",$5=(()=>{class n{constructor(e,i,o){this._canvas=e,this._graphicsFactory=i,this._previewSupport=o,this._markers=[];}create(e){this.cleanUp();let{created:i=[],moved:o=[],removed:a=[],resized:r=[]}=e,l=this._canvas.getLayer(ly);i.filter(p=>!sce(p)).forEach(p=>{let d;zn(p)?(d=this._graphicsFactory._createContainer("connection",xt("g")),this._graphicsFactory.drawConnection(_c(d),p)):(d=this._graphicsFactory._createContainer("shape",xt("g")),this._graphicsFactory.drawShape(_c(d),p),Ao(d,p.x,p.y)),this._previewSupport.addDragger(p,l,d);}),o.forEach(({element:p,delta:d})=>{this._previewSupport.addDragger(p,l,void 0,"djs-dragging"),this._canvas.addMarker(p,"djs-element-hidden"),this._markers.push([p,"djs-element-hidden"]);let f=this._previewSupport.addDragger(p,l);zn(p)?Ao(f,d.x,d.y):Ao(f,p.x+d.x,p.y+d.y);}),a.forEach(p=>{this._previewSupport.addDragger(p,l,void 0,"djs-dragging"),this._canvas.addMarker(p,"djs-element-hidden"),this._markers.push([p,"djs-element-hidden"]);}),r.forEach(({shape:p,bounds:d})=>{this._canvas.addMarker(p,"djs-hidden"),this._markers.push([p,"djs-hidden"]),this._previewSupport.addDragger(p,l,void 0,"djs-dragging");let f=this._graphicsFactory._createContainer("shape",xt("g"));this._graphicsFactory.drawShape(_c(f),p,{width:d.width,height:d.height}),Ao(f,d.x,d.y),this._previewSupport.addDragger(p,l,f);});}cleanUp(){Tp(this._canvas.getLayer(ly)),this._markers.forEach(([e,i])=>this._canvas.removeMarker(e,i)),this._markers=[];}show(){this._canvas.showLayer(ly);}hide(){this._canvas.hideLayer(ly);}}return n.$inject=["canvas","graphicsFactory","previewSupport"],n;})();function sce(n){return n.hidden;}var V5={__depends__:[Hl],__init__:["complexPreview"],complexPreview:["type",$5]};var S2=["top","bottom","left","right"],cy=10;function cg(n,t){Re.call(this,n),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],function(o){var a=o.context,r=a.connection,l=r.source,p=r.target,d=a.hints||{};d.createElementsBehavior!==!1&&(e(l),e(p));}),this.postExecuted(["label.create"],function(o){var a=o.context,r=a.shape,l=a.hints||{};l.createElementsBehavior!==!1&&e(r.labelTarget);}),this.postExecuted(["elements.create"],function(o){var a=o.context,r=a.elements,l=a.hints||{};l.createElementsBehavior!==!1&&r.forEach(function(p){e(p);});});function e(o){if(nm(o)&&!zn(o)&&!z(o,"bpmn:Group")){var a=pce(o);a&&i(o,a);}}function i(o,a){var r=Rt(o),l=o.label,p=Rt(l);if(l.parent){var d=Ot(o),f;switch(a){case"top":f={x:r.x,y:d.top-cy-l.height/2};break;case"left":f={x:d.left-cy-l.width/2,y:r.y};break;case"bottom":f={x:r.x,y:d.bottom+cy+l.height/2};break;case"right":f={x:d.right+cy+l.width/2,y:r.y};break;}var h=Sr(f,p);t.moveShape(l,h);}}}Fe(cg,Re);cg.$inject=["eventBus","modeling"];function lce(n){var t=n.host,e=Rt(n),i=Jo(e,t),o;i.indexOf("-")>=0?o=i.split("-"):o=[i];var a=S2.filter(function(r){return o.indexOf(r)===-1;});return a;}function cce(n){var t=Rt(n),e=[].concat(n.incoming.map(function(i){return i.waypoints[i.waypoints.length-2];}),n.outgoing.map(function(i){return i.waypoints[1];})).map(function(i){return G5(t,i);});return e;}function pce(n){var t=Rt(n.label),e=Rt(n),i=G5(e,t);if(dce(i)){var o=cce(n);if(n.host){var a=lce(n);o=o.concat(a);}var r=S2.filter(function(l){return o.indexOf(l)===-1;});return r.indexOf(i)!==-1?Jo(n.label,n)!=="intersect"?void 0:i:r[0];}}function G5(n,t){return Jo(t,n,5);}function dce(n){return S2.indexOf(n)!==-1;}
948function pg(n){Re.call(this,n),this.preExecute("shape.append",function(t){var e=t.source,i=t.shape;t.position||(z(i,"bpmn:TextAnnotation")?t.position={x:e.x+e.width/2+75,y:e.y-50-i.height/2}:t.position={x:e.x+e.width+80+i.width/2,y:e.y+e.height/2});},!0);}Fe(pg,Re);pg.$inject=["eventBus"];var mce=1500;function dg(n,t,e){n.invoke(Re,this),this.preExecute("elements.delete",mce,function(o){var a=o.context,r=a.elements,l=i(r);l.length&&(a.elements=r.concat(l));}),t.on("shape.move.start",function(o){var a=o.context.shapes,r=i(a);r.length&&(o.context.shapes=a.concat(r));});function i(o){var a=Yt(o,d=>z(d,"bpmn:Participant")||z(d,"bpmn:SubProcess"));if(!a.length)return[];var r=e.getRootElement(),l=new Set(r.children.filter(d=>z(d,"bpmn:Artifact"))),p=new Set();return ne(a,d=>{let f=new Set(mc(Vc(Array.from(l),Pi(d))));p=p.union(f),l=l.difference(f);}),Array.from(p);}}Fe(dg,Re);dg.$inject=["injector","eventBus","canvas"];function mg(n,t){n.invoke(Re,this),this.postExecute("shape.move",function(e){var i=e.newParent,o=e.shape,a=Yt(o.incoming.concat(o.outgoing),function(r){return z(r,"bpmn:Association");});ne(a,function(r){t.moveConnection(r,{x:0,y:0},i);});},!0);}Fe(mg,Re);mg.$inject=["injector","modeling"];var q5=500;function Rh(n,t){t.invoke(Re,this),this._bpmnReplace=n;var e=this;this.postExecuted("elements.create",q5,function(i){var o=i.elements;o=o.filter(function(a){var r=a.host;return J5(a,r);}),o.length===1&&o.map(function(a){return o.indexOf(a);}).forEach(function(a){var r=o[a];i.elements[a]=e._replaceShape(o[a],r);});},!0),this.preExecute("elements.move",q5,function(i){var o=i.shapes,a=i.newHost;if(o.length===1){var r=o[0];J5(r,a)&&(i.shapes=[e._replaceShape(r,a)]);}},!0);}Rh.$inject=["bpmnReplace","injector"];Fe(Rh,Re);Rh.prototype._replaceShape=function(n,t){var e=uce(n),i={type:"bpmn:BoundaryEvent",host:t};return e&&(i.eventDefinitionType=e.$type),this._bpmnReplace.replaceElement(n,i,{layoutConnection:!1});};function uce(n){var t=qe(n),e=t.eventDefinitions;return e&&e[0];}function J5(n,t){return!Ut(n)&&en(n,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t;}function ug(n,t){Re.call(this,n);function e(i){return Yt(i.attachers,function(o){return z(o,"bpmn:BoundaryEvent");});}this.postExecute("connection.create",function(i){var o=i.context.source,a=i.context.target,r=e(a);z(o,"bpmn:EventBasedGateway")&&z(a,"bpmn:ReceiveTask")&&r.length>0&&t.removeElements(r);}),this.postExecute("connection.reconnect",function(i){var o=i.context.oldSource,a=i.context.newSource;z(o,"bpmn:Gateway")&&z(a,"bpmn:EventBasedGateway")&&ne(a.outgoing,function(r){var l=r.target,p=e(l);z(l,"bpmn:ReceiveTask")&&p.length>0&&t.removeElements(p);});});}ug.$inject=["eventBus","modeling"];Fe(ug,Re);function M2(n){return n.create("bpmn:Category");}function fce(n){return n.create("bpmn:CategoryValue");}function py(n,t){var e=t.get("categoryValueRef");return e||(e=t.categoryValueRef=fce(n)),e.$parent||(e.$parent=M2(n)),e;}function H5(n,t,e){return Ni(t.get("categoryValue"),n),n.$parent=t,Ni(e.get("rootElements"),t),t.$parent=e,n;}function U5(n){var t=n.$parent;return t&&(Ui(t.get("categoryValue"),n),n.$parent=null),n;}function W5(n){var t=n.$parent;return t&&(Ui(t.get("rootElements"),n),n.$parent=null),n;}var hce=500;function fg(n,t,e){e.invoke(Re,this);function i(p){return t.filter(function(d){return z(d,"bpmn:Group")&&!d.labelTarget;}).map(qe).filter(function(d){return d!==p;});}function o(p,d){return i(d).some(function(f){return f.get("categoryValueRef")===p;});}function a(p,d){return i(d).some(function(f){var h=f.get("categoryValueRef");return h&&h.$parent===p;});}function r(p,d){p&&d&&H5(p,d,n.getDefinitions());}function l(p,d,f){d&&!a(d,f)&&W5(d),p&&!o(p,f)&&U5(p);}this.executed(["shape.create","label.create"],function(p){var d=p.labelTarget||p.shape;!z(d,"bpmn:Group")||d.labelTarget||r(p.categoryValue,p.category);},!0),this.reverted(["shape.create","label.create"],function(p){var d=p.labelTarget||p.shape;!z(d,"bpmn:Group")||d.labelTarget||l(p.categoryValue,p.category,qe(d));},!0),this.executed(["shape.move","shape.resize"],hce,function(p){r(p.categoryValue,p.category);},!0),this.reverted(["shape.move","shape.resize"],function(p){var d=p.shape;p.categoryValue&&l(p.categoryValue,p.category,qe(d));}
948,!0),this.executed("group.updateRefs",function(p){X5(p).forEach(function(d){r(d.categoryValue,d.category);});},!0),this.reverted("group.updateRefs",function(p){X5(p).forEach(function(d){l(d.categoryValue,d.category,qe(d.groupShape));});},!0),this.executed("shape.delete",function(p){var d=p.shape;!z(d,"bpmn:Group")||d.labelTarget||l(p.categoryValue,p.category,qe(d));},!0),this.reverted("shape.delete",function(p){var d=p.shape;!z(d,"bpmn:Group")||d.labelTarget||r(p.categoryValue,p.category);},!0);}fg.$inject=["bpmnjs","elementRegistry","injector"];Fe(fg,Re);function X5(n){return n.updates?.groups||[];}function _g(n,t,e){Re.call(this,n),this.preExecute("shape.replace",l,!0),this.postExecuted("shape.replace",p,!0),this.preExecute("connection.create",o,!0),this.postExecuted("connection.delete",i,!0),this.postExecuted("connection.reconnect",a,!0),this.postExecuted("element.updateProperties",r,!0);function i(O){let V=O.source,j=O.target;Nh(V)&&hg(j)&&f(j);}function o(O){let V=O.connection,j=O.source,L=O.target;Nh(j)&&dy(L)&&(d(L),g(j,[V]));}function a(O){let V=O.newTarget,j=O.oldSource,L=O.oldTarget;if(L!==V){let A=j;hg(L)&&f(L),Nh(A)&&dy(V)&&d(V);}}function r(O){let{element:V}=O;hg(V)?(h(V),b(V)):dy(V)&&w(V);}function l(O){let{newData:V,oldShape:j}=O;if(Nh(O.oldShape)&&V.eventDefinitionType!=="bpmn:CompensateEventDefinition"||V.type!=="bpmn:BoundaryEvent"){let L=j.outgoing.find(({target:A})=>hg(A));L&&L.target&&(O._connectionTarget=L.target);}else if(!Nh(O.oldShape)&&V.eventDefinitionType==="bpmn:CompensateEventDefinition"&&V.type==="bpmn:BoundaryEvent"){let L=j.outgoing.find(({target:A})=>dy(A));L&&L.target&&(O._connectionTarget=L.target),T(j);}}function p(O){let{_connectionTarget:V,newShape:j}=O;V&&t.connect(j,V);}function d(O){t.updateProperties(O,{isForCompensation:!0});}function f(O){t.updateProperties(O,{isForCompensation:void 0});}function h(O){for(let V of O.incoming)e.canConnect(V.source,O)||t.removeConnection(V);for(let V of O.outgoing)e.canConnect(O,V.target)||t.removeConnection(V);}function g(O,V){O.outgoing.filter(A=>z(A,"bpmn:Association")).filter(A=>hg(A.target)&&!V.includes(A)).forEach(A=>t.removeConnection(A));}function b(O){let V=O.attachers.slice();V.length&&t.removeElements(V);}function w(O){let V=O.incoming.filter(j=>Nh(j.source));t.removeElements(V);}function T(O){let V=O.outgoing.filter(j=>z(j,"bpmn:SequenceFlow"));t.removeElements(V);}}Fe(_g,Re);_g.$inject=["eventBus","modeling","bpmnRules"];function hg(n){let t=qe(n);return t&&t.get("isForCompensation");}function Nh(n){return n&&z(n,"bpmn:BoundaryEvent")&&Rp(n,"bpmn:CompensateEventDefinition");}function dy(n){return n&&z(n,"bpmn:Activity")&&!ua(n);}function gg(n){n.invoke(Re,this),this.preExecute("shape.create",1500,function(t){var e=t.context,i=e.parent,o=e.shape;z(i,"bpmn:Lane")&&!z(o,"bpmn:Lane")&&(e.parent=Vp(i,"bpmn:Participant"));});}gg.$inject=["injector"];Fe(gg,Re);
948function xg(n,t){Re.call(this,n),this.preExecute("shape.create",function(e){var i=e.context,o=i.shape;if(z(o,"bpmn:DataObjectReference")&&o.type!=="label"){var a=t.create("bpmn:DataObject");a.isCollection=o.businessObject.dataObjectRef?.isCollection||!1,o.businessObject.dataObjectRef=a;}});}xg.$inject=["eventBus","bpmnFactory"];Fe(xg,Re);var O2=20,E2=20,Y5=30,my=2e3;function Cg(n,t,e){Re.call(this,t),t.on(["create.start","shape.move.start"],my,function(o){var a=o.context,r=a.shape,l=n.getRootElement();if(!(!z(r,"bpmn:Participant")||!z(l,"bpmn:Process")||!l.children.length)){var p=l.children.filter(function(h){return!z(h,"bpmn:Group")&&!Ut(h)&&!zn(h);});if(p.length){var d=Pi(p),f=_ce(r,d);me(r,f),a.createConstraints=gce(r,d);}}}),t.on("create.start",my,function(o){var a=o.context,r=a.shape,l=n.getRootElement(),p=n.getGraphics(l);function d(f){f.element=l,f.gfx=p;}z(r,"bpmn:Participant")&&z(l,"bpmn:Process")&&(t.on("element.hover",my,d),t.once("create.cleanup",function(){t.off("element.hover",d);}));});function i(){var o=n.getRootElement();return z(o,"bpmn:Collaboration")?o:e.makeCollaboration();}this.preExecute("elements.create",my,function(o){var a=o.elements,r=o.parent,l=xce(a),p;l&&z(r,"bpmn:Process")&&(o.parent=i(),p=o.hints=o.hints||{},p.participant=l,p.process=r,p.processRef=qe(l).get("processRef"));},!0),this.preExecute("shape.create",function(o){var a=o.parent,r=o.shape;z(r,"bpmn:Participant")&&z(a,"bpmn:Process")&&(o.parent=i(),o.process=a,o.processRef=qe(r).get("processRef"));},!0),this.execute("shape.create",function(o){var a=o.hints||{},r=o.process||a.process,l=o.shape,p=a.participant;r&&(!p||l===p)&&qe(l).set("processRef",qe(r));},!0),this.revert("shape.create",function(o){var a=o.hints||{},r=o.process||a.process,l=o.processRef||a.processRef,p=o.shape,d=a.participant;r&&(!d||p===d)&&qe(p).set("processRef",l);},!0),this.postExecute("shape.create",function(o){var a=o.hints||{},r=o.process||o.hints.process,l=o.shape,p=a.participant;if(r){var d=r.children.slice();p?l===p&&e.moveElements(d,{x:0,y:0},p):e.moveElements(d,{x:0,y:0},l);}},!0);}Cg.$inject=["canvas","eventBus","modeling"];Fe(Cg,Re);function _ce(n,t){t={width:t.width+O2*2+Y5,height:t.height+E2*2};var e=Math.max(n.width,t.width),i=Math.max(n.height,t.height);return{x:-e/2,y:-i/2,width:e,height:i};}function gce(n,t){return t=Ot(t),{bottom:t.top+n.height/2-E2,left:t.right-n.width/2+O2,top:t.bottom-n.height/2+E2,right:t.left+n.width/2-O2-Y5};}function xce(n){return $n(n,function(t){return z(t,"bpmn:Participant");});}var K5="__targetRef_placeholder";function vg(n,t){Re.call(this,n),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],Z5(a)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],Z5(a));function e(r,l,p){var d=r.get("dataInputAssociations");return $n(d,function(f){return f!==p&&f.targetRef===l;});}function i(r,l){var p=r.get("properties"),d=$n(p,function(f){return f.name===K5;});return!d&&l&&(d=t.create("bpmn:Property",{name:K5}),Ni(p,d)),d;}function o(r,l){var p=i(r);p&&(e(r,p,l)||Ui(r.get("properties"),p));}function a(r){var l=r.context,p=l.connection,d=p.businessObject,f=p.target,h=f&&f.businessObject,g=l.newTarget,b=g&&g.businessObject,w=l.oldTarget||l.target,T=w&&w.businessObject,O=p.businessObject,V;T&&T!==h&&o(T,d),b&&b!==h&&o(b,d),h?(V=i(h,!0),O.targetRef=V):O.targetRef=null;}}vg.$inject=["eventBus","bpmnFactory"];Fe(vg,Re);function Z5(n){return function(t){var e=t.context,i=e.connection;if(z(i,"bpmn:DataInputAssociation"))return n(t);};}function Ah(n){this._bpmnUpdater=n;}Ah.$inject=["bpmnUpdater"];Ah.prototype.execute=function(n){var t=n.dataStoreBo,e=n.dataStoreDi,i=n.newSemanticParent,o=n.newDiParent;return n.oldSemanticParent=t.$parent,n.oldDiParent=e.$parent,this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(e,o),[];};Ah.prototype.revert=function(n){var t=n.dataStoreBo,e=n.dataStoreDi,i=n.oldSemanticParent,o=n.oldDiParent;return this._bpmnUpdater.updateSemanticParent(t,i),this._bpmnUpdater.updateDiParent(e,o),[];};function bg(n,t,e,i){Re.call(this,i),t.registerHandler("dataStore.updateContainment",Ah);
948function o(){return e.filter(function(l){return z(l,"bpmn:Participant")&&qe(l).processRef;})[0];}function a(l){return l.children.filter(function(p){return z(p,"bpmn:DataStoreReference")&&!p.labelTarget;});}function r(l,p){var d=l.businessObject||l;if(p=p||o(),p){var f=p.businessObject||p;t.execute("dataStore.updateContainment",{dataStoreBo:d,dataStoreDi:In(l),newSemanticParent:f.processRef||f,newDiParent:In(p)});}}this.preExecute("shape.create",function(l){var p=l.context,d=p.shape;z(d,"bpmn:DataStoreReference")&&d.type!=="label"&&(p.hints||(p.hints={}),p.hints.autoResize=!1);}),this.preExecute("elements.move",function(l){var p=l.context,d=p.shapes,f=d.filter(function(h){return z(h,"bpmn:DataStoreReference");});f.length&&(p.hints||(p.hints={}),p.hints.autoResize=d.filter(function(h){return!z(h,"bpmn:DataStoreReference");}));}),this.postExecute("shape.create",function(l){var p=l.context,d=p.shape,f=d.parent;z(d,"bpmn:DataStoreReference")&&d.type!=="label"&&z(f,"bpmn:Collaboration")&&r(d);}),this.postExecute("shape.move",function(l){var p=l.context,d=p.shape,f=p.oldParent,h=d.parent;if(!z(f,"bpmn:Collaboration")&&z(d,"bpmn:DataStoreReference")&&d.type!=="label"&&z(h,"bpmn:Collaboration")){var g=z(f,"bpmn:Participant")?f:vce(f,"bpmn:Participant");r(d,g);}}),this.postExecute("shape.delete",function(l){var p=l.context,d=p.shape,f=n.getRootElement();en(d,["bpmn:Participant","bpmn:SubProcess"])&&z(f,"bpmn:Collaboration")&&a(f).filter(function(h){return Cce(h,d);}).forEach(function(h){r(h);});}),this.postExecute("canvas.updateRoot",function(l){var p=l.context,d=p.oldRoot,f=p.newRoot,h=a(d);h.forEach(function(g){z(f,"bpmn:Process")&&r(g,f);});});}bg.$inject=["canvas","commandStack","elementRegistry","eventBus"];Fe(bg,Re);function Cce(n,t){for(var e=n.businessObject||n,i=t.businessObject||t;e.$parent;){if(e.$parent===i.processRef||i)return!0;e=e.$parent;}return!1;}function vce(n,t){for(;n.parent;){if(z(n.parent,t))return n.parent;n=n.parent;}}var fy=Math.max,hy=Math.min,bce=20;function _y(n,t){return{top:n.top-t.top,right:n.right-t.right,bottom:n.bottom-t.bottom,left:n.left-t.left};}function Q5(n,t,e){var i=e.x,o=e.y,a={x:n.x,y:n.y,width:n.width,height:n.height};return t.indexOf("n")!==-1?(a.y=n.y+o,a.height=n.height-o):t.indexOf("s")!==-1&&(a.height=n.height+o),t.indexOf("e")!==-1?a.width=n.width+i:t.indexOf("w")!==-1&&(a.x=n.x+i,a.width=n.width-i),a;}function eA(n,t){return{x:n.x+(t.left||0),y:n.y+(t.top||0),width:n.width-(t.left||0)+(t.right||0),height:n.height-(t.top||0)+(t.bottom||0)};}function uy(n,t,e){var i=t[n],o=e.min&&e.min[n],a=e.max&&e.max[n];return nn(o)&&(i=(/top|left/.test(n)?hy:fy)(i,o)),nn(a)&&(i=(/top|left/.test(n)?fy:hy)(i,a)),i;}function tA(n,t){if(!t)return n;var e=Ot(n);return lu({top:uy("top",e,t),right:uy("right",e,t),bottom:uy("bottom",e,t),left:uy("left",e,t)});}function nA(n,t,e,i){var o=Ot(t),a={top:/n/.test(n)?o.bottom-e.height:o.top,left:/w/.test(n)?o.right-e.width:o.left,bottom:/s/.test(n)?o.top+e.height:o.bottom,right:/e/.test(n)?o.left+e.width:o.right},r=i?Ot(i):a,l={top:hy(a.top,r.top),left:hy(a.left,r.left),bottom:fy(a.bottom,r.bottom),right:fy(a.right,r.right)};return lu(l);}function yg(n,t){return typeof n<"u"?n:bce;}function yce(n,t){var e,i,o,a;return typeof t=="object"?(e=yg(t.left),i=yg(t.right),o=yg(t.top),a=yg(t.bottom)):e=i=o=a=yg(t),{x:n.x-e,y:n.y-o,width:n.width+e+i,height:n.height+o+a};}function Pce(n){return!(n.waypoints||n.type==="label");}function gy(n,t){var e;if(n.length===void 0?e=Yt(n.children,Pce):e=n,e.length)return yce(Pi(e),t);}var hm=Math.abs;function wce(n,t){return _y(Ot(t),Ot(n));}var Sce=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],Js=30;function Dh(n,t){return t=t||[],n.children.filter(function(e){z(e,"bpmn:Lane")&&(Dh(e,t),t.push(e));}),t;}function rl(n){return n.children.filter(function(t){return z(t,"bpmn:Lane");});}function zr(n){return Vp(n,Sce)||n;}function iA(n,t){var e=zr(n),i=z(e,"bpmn:Process")?[]:[e],o=Dh(e,i),a=Ot(n),r=Ot(t),l=wce(n,t),p=[],d=ao(n);return o.forEach(function(f){if(f!==n){var h=d?0:l.top,g=d?l.right:0,b=d?0:l.bottom,w=d?l.left:0,T=Ot(f);l.top&&(hm(T.bottom-a.top)<10&&(b=r.top-T.bottom),hm(T.top-a.top)<5&&(h=r.top-T.top)),l.left&&(hm(T.right-a.left)<10&&(g=r.left-T.right),hm(T.left-a.left)<5&&(w=r.left-T.left)),l.bottom&&(hm(T.top-a.bottom)<10&&(h=r.bottom-T.top),hm(T.bottom-a.bottom)<5&&(b=r.bottom-T.bottom)),l.right&&(hm(T.left-a.right)<10&&(w=r.right-T.left),hm(T.right-a.right)<5&&(g=r.right-T.right)),(h||g||b||w)&&p.push({shape:f,newBounds:eA(f,{top:h,right:g,bottom:b,left:w})});}}
948),p;}var Mce=500;function Pg(n,t){Re.call(this,n);function e(i,o){var a=ao(i),r=rl(o),l=[],p=[],d=[],f=[];if(hc(r,function(O){return a?O.y>i.y?p.push(O):l.push(O):O.x>i.x?f.push(O):d.push(O),O.children;}),!!r.length){var h;a?p.length&&l.length?h=i.height/2:h=i.height:f.length&&d.length?h=i.width/2:h=i.width;var g,b,w,T;l.length&&(g=t.calculateAdjustments(l,"y",h,i.y-10),t.makeSpace(g.movingShapes,g.resizingShapes,{x:0,y:h},"s")),p.length&&(b=t.calculateAdjustments(p,"y",-h,i.y+i.height+10),t.makeSpace(b.movingShapes,b.resizingShapes,{x:0,y:-h},"n")),d.length&&(w=t.calculateAdjustments(d,"x",h,i.x-10),t.makeSpace(w.movingShapes,w.resizingShapes,{x:h,y:0},"e")),f.length&&(T=t.calculateAdjustments(f,"x",-h,i.x+i.width+10),t.makeSpace(T.movingShapes,T.resizingShapes,{x:-h,y:0},"w"));}}this.postExecuted("shape.delete",Mce,function(i){var o=i.context,a=o.hints,r=o.shape,l=o.oldParent;z(r,"bpmn:Lane")&&(a&&a.nested||e(r,l));});}Pg.$inject=["eventBus","spaceTool"];Fe(Pg,Re);var oA=500;function jh(n,t){t.invoke(Re,this),this._bpmnReplace=n;var e=this;this.postExecuted("elements.create",oA,function(i){var o=i.elements;o.filter(function(a){var r=a.host;return aA(a,r);}).map(function(a){return o.indexOf(a);}).forEach(function(a){i.elements[a]=e._replaceShape(o[a]);});},!0),this.preExecute("elements.move",oA,function(i){var o=i.shapes,a=i.newHost;o.forEach(function(r,l){var p=r.host;aA(r,Ece(o,p)?p:a)&&(o[l]=e._replaceShape(r));});},!0);}jh.$inject=["bpmnReplace","injector"];Fe(jh,Re);jh.prototype._replaceShape=function(n){var t=Oce(n),e;return t?e={type:"bpmn:IntermediateCatchEvent",eventDefinitionType:t.$type}:e={type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(n,e,{layoutConnection:!1});};function Oce(n){var t=qe(n),e=t.eventDefinitions;return e&&e[0];}function aA(n,t){return!Ut(n)&&z(n,"bpmn:BoundaryEvent")&&!t;}function Ece(n,t){return n.indexOf(t)!==-1;}function wg(n,t,e){Re.call(this,n);function i(o,a,r){var l=a.waypoints,p,d,f,h,g,b,w,T=o.outgoing.slice(),O=o.incoming.slice(),V;nn(r.width)?V=Rt(r):V=r;var j=ng(l,V);if(j){if(p=l.slice(0,j.index),d=l.slice(j.index+(j.bendpoint?1:0)),!p.length||!d.length)return;f=j.bendpoint?l[j.index]:V,(p.length===1||!rA(o,p[p.length-1]))&&p.push(sA(f)),(d.length===1||!rA(o,d[0]))&&d.unshift(sA(f));}h=a.source,g=a.target,t.canConnect(h,o,a)&&(e.reconnectEnd(a,o,p||V),b=a),t.canConnect(o,g,a)&&(b?w=e.connect(o,g,{type:a.type,waypoints:d}):(e.reconnectStart(a,o,d||V),w=a));var L=[].concat(b&&Yt(O,function(A){return A.source===b.source;})||[],w&&Yt(T,function(A){return A.target===w.target;})||[]);L.length&&e.removeElements(L);}this.preExecute("elements.move",function(o){var a=o.newParent,r=o.shapes,l=o.delta,p=r[0];if(!(!p||!a)){a&&a.waypoints&&(o.newParent=a=a.parent);var d=Rt(p),f={x:d.x+l.x,y:d.y+l.y},h=$n(a.children,function(g){var b=t.canInsert(r,g);return b&&ng(g.waypoints,f);});h&&(o.targetFlow=h,o.position=f);}},!0),this.postExecuted("elements.move",function(o){var a=o.shapes,r=o.targetFlow,l=o.position;r&&i(a[0],r,l);},!0),this.preExecute("shape.create",function(o){var a=o.parent,r=o.shape;t.canInsert(r,a)&&(o.targetFlow=a,o.parent=a.parent);},!0),this.postExecuted("shape.create",function(o){var a=o.shape,r=o.targetFlow,l=o.position;r&&i(a,r,l);},!0);}Fe(wg,Re);wg.$inject=["eventBus","bpmnRules","modeling"];function rA(n,t){var e=t.x,i=t.y;return e>=n.x&&e<=n.x+n.width&&i>=n.y&&i<=n.y+n.height;}function sA(n){return me({},n);}
948function Sg(n,t){Re.call(this,n),this.preExecuted("connection.create",function(e){var i=e.context,o=i.connection,a=i.source,r=i.target,l=i.hints;if(!(l&&l.createElementsBehavior===!1)&&Lh(o)){var p=[];z(a,"bpmn:EventBasedGateway")?p=r.incoming.filter(d=>d!==o&&Lh(d)):p=r.incoming.filter(d=>d!==o&&Lh(d)&&z(d.source,"bpmn:EventBasedGateway")),p.forEach(function(d){t.removeConnection(d);});}}),this.preExecuted("shape.replace",function(e){var i=e.context,o=i.newShape;if(z(o,"bpmn:EventBasedGateway")){var a=o.outgoing.filter(Lh).reduce(function(r,l){return r.includes(l.target)?r:r.concat(l.target);},[]);a.forEach(function(r){r.incoming.filter(Lh).forEach(function(l){let p=r.incoming.filter(Lh).filter(function(d){return d.source===o;});(l.source!==o||p.length>1)&&t.removeConnection(l);});});}});}Sg.$inject=["eventBus","modeling"];Fe(Sg,Re);function Lh(n){return z(n,"bpmn:SequenceFlow");}var xy=1500,lA=2e3;function Cy(n,t,e){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],xy,function(i){var o=i.context,a=o.shape||i.shape,r=i.hover;z(r,"bpmn:Lane")&&!en(a,["bpmn:Lane","bpmn:Participant"])&&(i.hover=zr(r),i.hoverGfx=n.getGraphics(i.hover));var l=e.getRootElement();r&&r!==l&&(a.labelTarget||en(a,["bpmn:Group","bpmn:TextAnnotation"]))&&(i.hover=l,i.hoverGfx=n.getGraphics(i.hover));}),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],xy,function(i){var o=i.hover;z(o,"bpmn:Lane")&&(i.hover=zr(o)||o,i.hoverGfx=n.getGraphics(i.hover));}),t.on(["bendpoint.move.hover"],xy,function(i){var o=i.context,a=i.hover,r=o.type;z(a,"bpmn:Lane")&&/reconnect/.test(r)&&(i.hover=zr(a)||a,i.hoverGfx=n.getGraphics(i.hover));}),t.on(["connect.start"],xy,function(i){var o=i.context,a=o.start;z(a,"bpmn:Lane")&&(o.start=zr(a)||a);}),t.on("shape.move.start",lA,function(i){var o=i.shape;z(o,"bpmn:Lane")&&(i.shape=zr(o)||o);}),t.on("spaceTool.move",lA,function(i){var o=i.hover;o&&z(o,"bpmn:Lane")&&(i.hover=zr(o));});}Cy.$inject=["elementRegistry","eventBus","canvas"];var cA=770;function Mg(n,t,e,i){e.invoke(Re,this);function o(l,p){var d=qe(l),f=p.categoryValue||d.categoryValueRef;f||(f=py(n,d));var h=p.category||f.$parent||M2(n);d.categoryValueRef=f,f.$parent=h,p.categoryValue=f,p.category=h;}function a(l,p){var d=qe(l),f=p.categoryValue||d.categoryValueRef,h=p.category||f&&f.$parent;f&&(p.categoryValue=f,p.category=h,d.categoryValueRef=null);}this.execute("label.create",function(l){var p=l.context,d=p.labelTarget;z(d,"bpmn:Group")&&o(d,p);}),this.revert("label.create",function(l){var p=l.context,d=p.labelTarget;z(d,"bpmn:Group")&&a(d,p);}),this.execute("shape.delete",function(l){var p=l.context,d=p.shape,f=qe(d);if(!(!z(d,"bpmn:Group")||d.labelTarget)){var h=p.categoryValue=f.categoryValueRef;h&&(p.category=h.$parent,f.categoryValueRef=null);}}),this.reverted("shape.delete",function(l){var p=l.context,d=p.shape;if(!(!z(d,"bpmn:Group")||d.labelTarget)){var f=p.category,h=p.categoryValue,g=qe(d);h&&(g.categoryValueRef=h,h.$parent=f);}}),this.execute("shape.create",function(l){var p=l.context,d=p.shape,f=p.hints||{};!z(d,"bpmn:Group")||d.labelTarget||f.createElementsBehavior===!1&&!qe(d).categoryValueRef&&!p.categoryValue||o(d,p);}),this.reverted("shape.create",function(l){var p=l.context,d=p.shape,f=p.hints||{};!z(d,"bpmn:Group")||d.labelTarget||f.createElementsBehavior===!1&&!qe(d).categoryValueRef&&!p.categoryValue||a(d,p);}),this.executed(["shape.move","shape.resize"],function(l){var p=l.context,d=p.shape;!z(d,"bpmn:Group")||d.labelTarget||qe(d).categoryValueRef||o(d,p);}),this.reverted(["shape.move","shape.resize"],function(l){var p=l.context,d=p.shape;!z(d,"bpmn:Group")||d.labelTarget||!p.categoryValue||a(d,p);});function r(l,p){var d=n.create(l.$type);return i.copyElement(l,d,null,p);}t.on("copyPaste.copyElement",cA,function(l){var p=l.descriptor,d=l.element;if(!(!z(d,"bpmn:Group")||d.labelTarget)){var f=qe(d);if(f.categoryValueRef){var h=f.categoryValueRef;p.categoryValue=r(h,!0),h.$parent&&(p.category=r(h.$parent,!0));}}}),t.on("copyPaste.pasteElement",cA,function(l){var p=l.descriptor,d=p.businessObject,f=p.categoryValue,h=p.c
948ategory;f&&(f=d.categoryValueRef=r(f)),h&&(f.$parent=r(h)),delete p.category,delete p.categoryValue;});}Mg.$inject=["bpmnFactory","eventBus","injector","moddleCopy"];Fe(Mg,Re);function zh(n,t,e,i){var o,a,r,l,p;return o=(i.y-e.y)*(t.x-n.x)-(i.x-e.x)*(t.y-n.y),o==0?null:(a=n.y-e.y,r=n.x-e.x,p=(i.x-e.x)*a-(i.y-e.y)*r,l=p/o,{x:Math.round(n.x+l*(t.x-n.x)),y:Math.round(n.y+l*(t.y-n.y))});}function vy(n){function t(i,o,a){var r={x:a.x,y:a.y-50},l={x:a.x-50,y:a.y},p=zh(i,o,a,r),d=zh(i,o,a,l),f;p&&d?pA(p,a)>pA(d,a)?f=d:f=p:f=p||d,i.original=f;}function e(i){var o=i.waypoints;t(o[0],o[1],Rt(i.source)),t(o[o.length-1],o[o.length-2],Rt(i.target));}n.on("bpmnElement.added",function(i){var o=i.element;o.waypoints&&e(o);});}vy.$inject=["eventBus"];function pA(n,t){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2));}function Og(n){Re.call(this,n);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],function(e){var i=e.context.shape,o=qe(i),a=In(i);if(en(o,t)){var r=a.get("isHorizontal");r===void 0&&(r=!0),a.set("isHorizontal",r);}});}Og.$inject=["eventBus"];Fe(Og,Re);var hA=Math.sqrt,_A=Math.min,Tce=Math.max,dA=Math.abs;function mA(n){return Math.pow(n,2);}function Eg(n,t){return hA(mA(n.x-t.x)+mA(n.y-t.y));}function gA(n,t){var e=0,i,o,a,r,l,p,d,f,h,g,b;for(e=0;e<t.length-1;e++){if(i=t[e],o=t[e+1],fA(i,o)?d=[i]:(a=Eg(n,i),r=Eg(n,o),p=_A(a,r),d=Ice(i,o,n,p)),d.length<1)throw new Error("expected between [1, 2] circle -> line intersections");d.length===1&&(f={type:"bendpoint",position:d[0],segmentIndex:e,bendpointIndex:fA(i,d[0])?e:e+1}),d.length===2&&(l=Rce(d[0],d[1]),f={type:"segment",position:l,segmentIndex:e,relativeLocation:Eg(i,l)/Eg(i,o)}),h=Eg(f.position,n),(!b||g>h)&&(b=f,g=h);}return b;}function Ice(n,t,e,i){var o=t.x-n.x,a=t.y-n.y,r=e.x-n.x,l=e.y-n.y,p=o*o+a*a,d=o*r+a*l,f=r*r+l*l-i*i,h=d/p,g=f/p,b=h*h-g;if(b<0&&b>-1e-6&&(b=0),b<0)return[];var w=hA(b),T=-h+w,O=-h-w,V={x:n.x-o*T,y:n.y-a*T};if(b===0)return[V];var j={x:n.x-o*O,y:n.y-a*O};return[V,j].filter(function(L){return kce(L,n,t);});}function kce(n,t,e){return uA(n.x,t.x,e.x)&&uA(n.y,t.y,e.y);}function uA(n,t,e){return n>=_A(t,e)-by&&n<=Tce(t,e)+by;}function Rce(n,t){return{x:(n.x+t.x)/2,y:(n.y+t.y)/2};}var by=.1;function fA(n,t){return dA(n.x-t.x)<=by&&dA(n.y-t.y)<=by;}function CA(n,t,e,i){var o=e.segmentIndex,a=t.length-n.length;if(i.segmentMove){var r=i.segmentMove.segmentStartIndex,l=i.segmentMove.newSegmentStartIndex;return o===r?l:o>=l?o+a<l?l:o+a:o;}if(i.bendpointMove){var p=i.bendpointMove.insert,d=i.bendpointMove.bendpointIndex,f;if(a===0)return o;if(o>=d&&(f=p?o+1:o-1),o<d&&(f=o,p&&e.type!=="bendpoint"&&d-1===o)){var h=vA(t,d);h<e.relativeLocation&&f++;}return f;}return a===0?o:i.connectionStart&&o===0?0:i.connectionEnd&&o===n.length-2?t.length-2:Math.floor((t.length-2)/2);}function yy(n,t,e,i){var o=0,a=0,r={point:n,delta:{x:0,y:0}},l=gA(n,e),p=l.segmentIndex,d=CA(e,t,l,i);if(d<0||d>t.length-2||d===null)return r;var f=xA(e,p),h=xA(t,d),g=l.position,b=Ace(f,g),w=Nce(f,h);if(l.type==="bendpoint"){var T=t.length-e.length,O=l.bendpointIndex,V=e[O];if(t.indexOf(V)!==-1)return r;if(T===0){var j=t[O];return o=j.x-l.position.x,a=j.y-l.position.y,{delta:{x:o,y:a},point:{x:n.x+o,y:n.y+a}};}T<0&&O!==0&&O<e.length-1&&(b=vA(e,O));}var L={x:(h[1].x-h[0].x)*b+h[0].x,y:(h[1].y-h[0].y)*b+h[0].y},A=v5({x:n.x-g.x,y:n.y-g.y},w);return o=L.x+A.x-n.x,a=L.y+A.y-n.y,{point:Bl(L),delta:Bl({x:o,y:a})};}function vA(n,t){var e=Gp(n[t-1],n[t]),i=Gp(n[t],n[t+1]),o=e/(e+i);return o;}function Nce(n,t){var e=C2(n),i=C2(t);return i-e;}function xA(n,t){return[n[t],n[t+1]];}function Ace(n,t){var e=Gp(n[0],n[1]),i=Gp(n[0],t);return e===0?0:i/e;}function bA(n,t,e,i){var o=Rt(n);return yy(o,t,e,i).delta;}function Mu(n,t,e){var i=bh(t),o=bh(e),a=Sr(n,i),r={x:a.x*(e.width/t.width),y:a.y*(e.height/t.height)};return Bl({x:o.x+r.x,y:o.y+r.y});}function T2(n,t,e){var i=bh(n),o=bh(t),a=bh(e),r=Sr(n,i),l=Sr(i,o),p=Dce(i,t,e);if(p)return p;var d={x:l.x*(e.width/t.width),y:l.y*(e.height/t.height)},f={x:a.x+d.x,y:a.y+d.y};return Bl({x:f.x+r.x-n.x,y:f.y+r.y-n.y});}function Dce(n,t,e){var i=Ot(t),o=Ot(e);if(jce(i,o))return null;var a=Jo(t,n),r,l,p;if(a==="top")r={x:0,y:o.bottom-i.bottom};else if(a==="bottom")r={x:0,y:o.top-i.top};else if(a==="right")r={x:o.left-i.left,y:0};else if(a==="left")r={x:o.right-i.right,y:0};else return null;return l={x:n.x+r.x,y:n.y+r.y},p=Jo(e,l),p!==a?null:r;}function jce(n,t){return Lce(n,t)||zce(n,t);}function Lce(n,t){return n.right!==t.right&&n.left!==t.left;}function zce(n,t){return n.top!==t.top&&n.bottom!==t.bottom;}function Py(n,t){if(t.length){var e=Fce(n,t);return wA(n,e);}}function yA(n){return[[{x:n.x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]];}function PA(n){for(var t=[],e=0;e<n.length-1;e++)t.push([n[e],n[e+1]]);return t;}function Fce(n,t){var e=t.map(function(o){return{line:o,distance:Gp(n,wA(n,o))};}),i=jr(e,"distance");return i[0].line;}function wA(n,t){var e=t[0],i=t[1],o=i.x-e.x,a=i.y-e.y,r=o*o+a*a;if(r===0)return{x:e.x,y:e.y};var l=((n.x-e.x)*o+(n.y-e.y)*a)/r;return l=Math.max(0,Math.min(1,l)),{x:e.x+l*o,y:e.y+l*a};}var SA="name",MA="text";function Tg(n,t,e,i){Re.call(this,n),this.postExecute("element.updateProperties",o),this.postExecute("element.updateModdleProperties",r=>{qe(r.context.element)===r.context.moddleElement&&o(r);});function o(r){var l=r.context,p=l.element,d=l.properties;if(SA in d&&t.updateLabel(p,d[SA]),MA in d&&z(p,"bpmn:TextAnnotation")){var f=i.getTextAnnotationBounds({x:p.x,y:p.y,width:p.width,height:p.height},d[MA]||"");t.updateLabel(p,d.text,f);}}this.postExecute(["shape.create","connection.create"],function(r){var l=r.context,p=l.hints||{};if(p.createElementsBehavior!==!1){var d=l.shape||l.connection;Ut(d)||!tl(d)||za(d)&&t.updateLabel(d,za(d));}}),this.postExecute("shape.delete",function(r){var l=r.context,p=l.labelTarget,d=l.hints||{};p&&d.unsetLabel!==!1&&t.updateLabel(p,null,null,{removeShape:!1});});function a(r){var l=r.context,p=l.connection,d=p.label,f=me({},l.hints),h=l.newWaypoints||p.waypoints,g=l.oldWaypoints;return typeof f.startChanged>"u"&&(f.startChanged=!!f.connectionStart),typeof f.endChanged>"u"&&(f.endChanged=!!f.connectionEnd),bA(d,h,g,f);}this.postExecute(["connection.layout","connection.updateWaypoints"],function(r){var l=r.context,p=l.hints||{};if(p.labelBehavior!==!1){var d=l.connection,f=d.label,h;!f||!f.parent||(h=a(r),t.moveShape(f,h));}}),this.postExecute(["shape.replace"],function(r){var l=r.context,p=l.newShape,d=l.oldShape,f=qe(p);f&&tl(f)&&d.label&&p.label&&(p.label.x=d.label.x,p.label.y=d.label.y);}
948),this.preExecute("shape.resize",function(r){var l=r.context,p=l.shape,d=l.hints||{};if(!(!Ut(p)||d.autoResize)){var f=l.newBounds,h=i.getDimensions(za(p)||"",{box:f,style:i.getExternalStyle()}),g=Math.ceil(h.height),b=f.y!==p.y,w=p.y+p.height;l.newBounds={width:f.width,height:g,x:f.x,y:b?w-g:f.y};}}),this.postExecute("shape.resize",function(r){var l=r.context,p=l.shape,d=l.newBounds,f=l.oldBounds;if(nm(p)){var h=p.label,g=Rt(h),b=yA(f),w=Py(g,b),T=Bce(w,f,d);t.moveShape(h,T);}});}Fe(Tg,Re);Tg.$inject=["eventBus","modeling","bpmnFactory","textRenderer"];function Bce(n,t,e){var i=Mu(n,t,e);return Bl(Sr(i,n));}function OA(n,t,e,i){return yy(n,t,e,i).point;}function Ig(n,t){Re.call(this,n);function e(i,o){var a=i.context,r=a.connection,l=me({},a.hints),p=a.newWaypoints||r.waypoints,d=a.oldWaypoints;return typeof l.startChanged>"u"&&(l.startChanged=!!l.connectionStart),typeof l.endChanged>"u"&&(l.endChanged=!!l.connectionEnd),OA(o,p,d,l);}this.postExecute(["connection.layout","connection.updateWaypoints"],function(i){var o=i.context,a=o.connection,r=a.outgoing,l=a.incoming;l.forEach(function(p){var d=p.waypoints[p.waypoints.length-1],f=e(i,d),h=[].concat(p.waypoints.slice(0,-1),[f]);t.updateWaypoints(p,h);}),r.forEach(function(p){var d=p.waypoints[0],f=e(i,d),h=[].concat([f],p.waypoints.slice(1));t.updateWaypoints(p,h);});}),this.postExecute(["connection.move"],function(i){var o=i.context,a=o.connection,r=a.outgoing,l=a.incoming,p=o.delta;l.forEach(function(d){var f=d.waypoints[d.waypoints.length-1],h={x:f.x+p.x,y:f.y+p.y},g=[].concat(d.waypoints.slice(0,-1),[h]);t.updateWaypoints(d,g);}),r.forEach(function(d){var f=d.waypoints[0],h={x:f.x+p.x,y:f.y+p.y},g=[].concat([h],d.waypoints.slice(1));t.updateWaypoints(d,g);});});}Fe(Ig,Re);Ig.$inject=["eventBus","modeling"];function _m(n,t,e){var i=wy(n),o=TA(i,t),a=i[0];return o.length?o[o.length-1]:Mu(a.original||a,e,t);}function gm(n,t,e){var i=wy(n),o=TA(i,t),a=i[i.length-1];return o.length?o[0]:Mu(a.original||a,e,t);}function Fh(n,t,e){var i=wy(n),o=EA(t,e),a=i[0];return Mu(a.original||a,o,t);}function Bh(n,t,e){var i=wy(n),o=EA(t,e),a=i[i.length-1];return Mu(a.original||a,o,t);}function EA(n,t){return{x:n.x-t.x,y:n.y-t.y,width:n.width,height:n.height};}function wy(n){var t=n.waypoints;if(!t.length)throw new Error("connection#"+n.id+": no waypoints");return t;}function TA(n,t){var e=sa(n,Vce);return Yt(e,function(i){return $ce(i,t);});}function $ce(n,t){return Jo(t,n,1)==="intersect";}function Vce(n){return n.original||n;}function kg(n,t){Re.call(this,n),this.postExecute("shape.replace",function(e){var i=e.oldShape,o=e.newShape;if(Gce(i,o)){var a=qce(i);a.incoming.forEach(function(r){var l=gm(r,o,i);t.reconnectEnd(r,o,l);}),a.outgoing.forEach(function(r){var l=_m(r,o,i);t.reconnectStart(r,o,l);});}},!0);}kg.$inject=["eventBus","modeling"];Fe(kg,Re);function Gce(n,t){return z(n,"bpmn:Participant")&&mn(n)&&z(t,"bpmn:Participant")&&!mn(t);}function qce(n){var t=$c([n],!1),e=[],i=[];return t.forEach(function(o){o!==n&&(o.incoming.forEach(function(a){z(a,"bpmn:MessageFlow")&&e.push(a);}),o.outgoing.forEach(function(a){z(a,"bpmn:MessageFlow")&&i.push(a);}));},[]),{incoming:e,outgoing:i};}var Jce=["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:EscalationEventDefinition","bpmn:ConditionalEventDefinition","bpmn:SignalEventDefinition"];function Sy(n){let t=qe(n);if(!z(t,"bpmn:BoundaryEvent")&&!(z(t,"bpmn:StartEvent")&&ua(t.$parent)))return!1;let e=t.get("eventDefinitions");return!e||!e.length?!1:Jce.some(i=>z(e[0],i));}function My(n){return z(n,"bpmn:BoundaryEvent")?"cancelActivity":"isInterrupting";}function Rg(n,t){n.invoke(Re,this),this.postExecuted("shape.replace",function(e){let i=e.context.oldShape,o=e.context.newShape,a=e.context.hints;if(!Sy(o))return;let r=My(o);if(a.targetElement&&a.targetElement[r]!==void 0)return;let p=qe(i).get(r),d=qe(o).get(r);p!==d&&t.updateProperties(o,{[r]:p});});}Rg.$inject=["injector","modeling"];Fe(Rg,Re);
948function Ng(n,t){Re.call(this,n),this.preExecute("shape.resize",function(e){var i=e.shape,o=In(i),a=o&&o.get("label"),r=a&&a.get("bounds");r&&t.updateModdleProperties(i,a,{bounds:void 0});},!0);}Fe(Ng,Re);Ng.$inject=["eventBus","modeling"];function Ag(n,t,e){Re.call(this,n),this.preExecute("shape.delete",function(i){var o=i.context.shape;if(!(o.incoming.length!==1||o.outgoing.length!==1)){var a=o.incoming[0],r=o.outgoing[0];if(!(!z(a,"bpmn:SequenceFlow")||!z(r,"bpmn:SequenceFlow"))&&t.canConnect(a.source,r.target,a)){var l=Hce(a.waypoints,r.waypoints);e.reconnectEnd(a,r.target,l);}}});}Fe(Ag,Re);Ag.$inject=["eventBus","bpmnRules","modeling"];function $h(n){return n.original||n;}function Hce(n,t){var e=zh($h(n[n.length-2]),$h(n[n.length-1]),$h(t[1]),$h(t[0]));return e?[].concat(n.slice(0,n.length-1),[e],t.slice(1)):[$h(n[0]),$h(t[t.length-1])];}function Dg(n,t){Re.call(this,n),this.preExecute("shape.delete",function(e){var i=e.shape,o=i.parent;z(i,"bpmn:Participant")&&(e.collaborationRoot=o);},!0),this.postExecute("shape.delete",function(e){var i=e.collaborationRoot;if(i&&!i.businessObject.participants.length){var o=t.makeProcess(),a=i.children.slice();t.moveElements(a,{x:0,y:0},o);}},!0);}Dg.$inject=["eventBus","modeling"];Fe(Dg,Re);function jg(n,t,e,i){Re.call(this,n);var o=i.get("dragging",!1);function a(p){var d=p.source,f=p.target,h=p.parent;if(h){var g,b;z(p,"bpmn:SequenceFlow")&&(e.canConnectSequenceFlow(d,f)||(b=!0),e.canConnectMessageFlow(d,f)&&(g="bpmn:MessageFlow")),z(p,"bpmn:MessageFlow")&&(e.canConnectMessageFlow(d,f)||(b=!0),e.canConnectSequenceFlow(d,f)&&(g="bpmn:SequenceFlow")),b&&t.removeConnection(p),g&&t.connect(d,f,{type:g,waypoints:p.waypoints.slice()});}}function r(p){var d=p.context,f=d.connection,h=d.newSource||f.source,g=d.newTarget||f.target,b,w;b=e.canConnect(h,g),!(!b||b.type===f.type)&&(w=t.connect(h,g,{type:b.type,associationDirection:b.associationDirection,waypoints:f.waypoints.slice()}),f.parent&&t.removeConnection(f),d.connection=w,o&&l(f,w));}function l(p,d){var f=o.context(),h=f&&f.payload.previousSelection,g;!h||!h.length||(g=h.indexOf(p),g!==-1&&h.splice(g,1,d));}this.postExecuted("elements.move",function(p){var d=p.closure,f=d.allConnections;ne(f,a);},!0),this.preExecute("connection.reconnect",r),this.postExecuted("element.updateProperties",function(p){var d=p.context,f=d.properties,h=d.element,g=h.businessObject,b;f.default&&(b=$n(h.outgoing,fc({id:h.businessObject.default.id})),b&&t.updateProperties(b,{conditionExpression:void 0})),f.conditionExpression&&g.sourceRef.default===g&&t.updateProperties(h.source,{default:void 0});});}Fe(jg,Re);jg.$inject=["eventBus","modeling","bpmnRules","injector"];function Vh(n,t,e,i,o,a){i.invoke(Re,this),this._bpmnReplace=n,this._elementRegistry=e,this._selection=a,this.postExecuted(["elements.create"],500,function(r){var l=r.context,p=l.parent,d=l.elements,f=_a(d,function(h,g){var b=t.canReplace([g],g.host||g.parent||p);return b?h.concat(b.replacements):h;},[]);f.length&&this._replaceElements(d,f);},this),this.postExecuted(["elements.move"],500,function(r){var l=r.context,p=l.newParent,d=l.newHost,f=[];ne(l.closure.topLevel,function(g){ua(g)?f=f.concat(g.children):f=f.concat(g);}),f.length===1&&d&&(p=d);var h=t.canReplace(f,p);h&&this._replaceElements(f,h.replacements,d);},this),this.postExecute(["shape.replace"],1500,function(r){var l=r.context,p=l.oldShape,d=l.newShape,f=p.attachers,h;f&&f.length&&(h=t.canReplace(f,d),this._replaceElements(f,h.replacements));},this),this.postExecuted(["shape.replace"],1500,function(r){var l=r.context,p=l.oldShape,d=l.newShape;o.unclaimId(p.businessObject.id,p.businessObject),o.updateProperties(d,{id:p.id});});}Fe(Vh,Re);Vh.prototype._replaceElements=function(n,t){var e=this._elementRegistry,i=this._bpmnReplace,o=this._selection;ne(t,function(a){var r={type:a.newElementType},l=e.get(a.oldElementId),p=n.indexOf(l);n[p]=i.replaceElement(l,r,{select:!1});}),t&&o.select(n);};Vh.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var Uce=1500,IA={width:140,height:120},Oy={width:300,height:60},Ey={width:60,height:300},Lg={width:300,height:150},zg={width:150,height:300},I2={width:140,height:120},k2={width:100,height:40};function Ty(n){n.on("resize.start",Uce,function(t){var e=t.context,i=e.shape,o=e.direction,a=e.balanced;(z(i,"bpmn:Lane")||z(i,"bpmn:Participant"))&&(e.resizeConstraints=Zce(i,o,a)),z(i,"bpmn:SubProcess")&&mn(i)&&(e.minDimensions=I2),z(i,"bpmn:TextAnnotation")&&(e.minDimensions=k2);});}Ty.$inject=["eventBus"];var xm=Math.abs,Wce=Math.min,Xce=Math.max;function kA(n,t,e,i){var o=n[t];n[t]=o===void 0?e:i(e,o);}function Gh(n,t,e){return kA(n,t,e,Wce);}function qh(n,t,e){return kA(n,t,e,Xce);}var Yce={top:20,left:50,right:20,bottom:20},Kce={top:50,left:20,right:20,bottom:20};function Zce(n,t,e){var i=zr(n),o=!0,a=!0,r=Dh(i,[i]),l=Ot(n),p={},d={}
948,f=ao(n),h=f?Oy:Ey;/n/.test(t)?d.top=l.bottom-h.height:/e/.test(t)?d.right=l.left+h.width:/s/.test(t)?d.bottom=l.top+h.height:/w/.test(t)&&(d.left=l.right-h.width),r.forEach(function(w){var T=Ot(w);f?(T.top<l.top-10&&(o=!1),T.bottom>l.bottom+10&&(a=!1)):(T.left<l.left-10&&(o=!1),T.right>l.right+10&&(a=!1)),/n/.test(t)&&(e&&xm(l.top-T.bottom)<10&&qh(p,"top",T.top+h.height),xm(l.top-T.top)<5&&Gh(d,"top",T.bottom-h.height)),/e/.test(t)&&(e&&xm(l.right-T.left)<10&&Gh(p,"right",T.right-h.width),xm(l.right-T.right)<5&&qh(d,"right",T.left+h.width)),/s/.test(t)&&(e&&xm(l.bottom-T.top)<10&&Gh(p,"bottom",T.bottom-h.height),xm(l.bottom-T.bottom)<5&&qh(d,"bottom",T.top+h.height)),/w/.test(t)&&(e&&xm(l.left-T.right)<10&&qh(p,"left",T.left+h.width),xm(l.left-T.left)<5&&Gh(d,"left",T.right-h.width));});var g=i.children.filter(function(w){return!w.hidden&&!w.waypoints&&(z(w,"bpmn:FlowElement")||z(w,"bpmn:Artifact"));}),b=f?Yce:Kce;return g.forEach(function(w){var T=Ot(w);/n/.test(t)&&(!f||o)&&Gh(d,"top",T.top-b.top),/e/.test(t)&&(f||a)&&qh(d,"right",T.right+b.right),/s/.test(t)&&(!f||a)&&qh(d,"bottom",T.bottom+b.bottom),/w/.test(t)&&(f||o)&&Gh(d,"left",T.left-b.left);}),{min:d,max:p};}var RA=1001;function Iy(n,t){n.on("resize.start",RA+500,function(e){var i=e.context,o=i.shape;(z(o,"bpmn:Lane")||z(o,"bpmn:Participant"))&&(i.balanced=!Fp(e));}),n.on("resize.end",RA,function(e){var i=e.context,o=i.shape,a=i.canExecute,r=i.newBounds;if(z(o,"bpmn:Lane")||z(o,"bpmn:Participant"))return a&&(r=jv(r),t.resizeLane(o,r,i.balanced)),!1;});}Iy.$inject=["eventBus","modeling"];var Qce=500;function Fg(n,t,e,i,o){e.invoke(Re,this);function a(f){return en(f,["bpmn:ReceiveTask","bpmn:SendTask"])||epe(f,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"]);}function r(f){var h=n.getDefinitions(),g=h.get("rootElements");return!!$n(g,fc({id:f.id}));}function l(f){if(z(f,"bpmn:ErrorEventDefinition"))return"errorRef";if(z(f,"bpmn:EscalationEventDefinition"))return"escalationRef";if(z(f,"bpmn:MessageEventDefinition"))return"messageRef";if(z(f,"bpmn:SignalEventDefinition"))return"signalRef";}function p(f){if(en(f,["bpmn:ReceiveTask","bpmn:SendTask"]))return f.get("messageRef");var h=f.get("eventDefinitions"),g=h[0];return g.get(l(g));}function d(f,h){if(en(f,["bpmn:ReceiveTask","bpmn:SendTask"]))return f.set("messageRef",h);var g=f.get("eventDefinitions"),b=g[0];return b.set(l(b),h);}this.executed(["shape.create","element.updateProperties","element.updateModdleProperties"],function(f){var h=f.shape||f.element;if(a(h)){var g=qe(h),b=p(g),w;b&&!r(b)&&(w=n.getDefinitions().get("rootElements"),Ni(w,b),f.addedRootElement=b);}},!0),this.reverted(["shape.create","element.updateProperties","element.updateModdleProperties"],function(f){var h=f.addedRootElement;if(h){var g=n.getDefinitions().get("rootElements");Ui(g,h);}},!0),t.on("copyPaste.copyElement",function(f){var h=f.descriptor,g=f.element;if(!(g.labelTarget||!a(g))){var b=qe(g),w=p(b);w&&(h.referencedRootElement=w);}}),t.on("copyPaste.pasteElement",Qce,function(f){var h=f.descriptor,g=h.businessObject,b=h.referencedRootElement;b&&(r(b)||(b=i.copyElement(b,o.create(b.$type))),d(g,b),delete h.referencedRootElement);});}Fg.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"];Fe(Fg,Re);function epe(n,t){return gt(t)||(t=[t]),xs(t,function(e){return Rp(n,e);});}var NA=Math.max;function ky(n){n.on("spaceTool.getMinDimensions",function(t){var e=t.shapes,i=t.axis,o=t.start,a={};return ne(e,function(r){var l=r.id;z(r,"bpmn:Participant")&&(a[l]=npe(r,i,o)),z(r,"bpmn:Lane")&&(a[l]=ao(r)?Oy:Ey),z(r,"bpmn:SubProcess")&&mn(r)&&(a[l]=I2),z(r,"bpmn:TextAnnotation")&&(a[l]=k2),z(r,"bpmn:Group")&&(a[l]=IA);}),a;});}ky.$inject=["eventBus"];function tpe(n){return n==="x";}function npe(n,t,e){var i=ao(n);if(!ape(n))return i?Lg:zg;var o=tpe(t),a={};return o?i?a=Lg:a={width:ope(n,e,o),height:zg.height}:i?a={width:Lg.width,height:ipe(n,e,o)}:a=zg,a;}function ipe(n,t,e){var i;return i=rpe(n,t,e),NA(Lg.height,i);}function ope(n,t,e){var i;return i=spe(n,t,e),NA(zg.width,i);}function ape(n){return!!rl(n).length;}function rpe(n,t,e){var i=rl(n),o;return o=R2(i,t,e),n.height-o.height+Oy.height;}function spe(n,t,e){var i=rl(n),o;return o=R2(i,t,e),n.width-o.width+Ey.width;}function R2(n,t,e){var i,o,a;for(i=0;i<n.length;i++)if(o=n[i],!e&&t>=o.y&&t<=o.y+o.height||e&&t>=o.x&&t<=o.x+o.width)return a=rl(o),a.length?R2(a,t,e):o;}var AA=400,lpe=600,DA={x:180,y:160};function Pc(n,t,e,i,o,a,r){Re.call(this,t),this._canvas=n,this._eventBus=t,this._modeling=e,this._elementFactory=i,this._bpmnFactory=o,this._bpmnjs=a,this._elementRegistry=r;var l=this;function p(h){return z(h,"bpmn:SubProcess")&&!mn(h);}function d(h){var g=h.shape,b=h.newRootElement,w=qe(g);b=l._addDiagram(b||w),h.newRootElement=n.addRootElement(b);}function f(h){var g=h.shape,b=qe(g);l._removeDiagram(b);var w=h.newRootElement=r.get(il(b));n.removeRootElement(w);}this.executed("shape.create",function(h){var g=h.shape;p(g)&&d(h);},!0),this.postExecuted("elements.create",function(h){var g=h.elements;ne(g,function(b){if(p(b)){var w=r.get(il(b));if(!(!w||!b.children||!b.children.length)){var T=jA(b);l._showRecursively(T),l._moveChildrenToShape(T,w);}}});},!0),this.reverted("shape.create",function(h){var g=h.shape;p(g)&&f(h);}
948,!0),this.preExecute("shape.delete",function(h){var g=h.shape;!z(g,"bpmn:SubProcess")||!mn(g)||ne(uu([g]),b=>{e.removeShape(b.annotation);});},!0),this.preExecuted("shape.delete",function(h){var g=h.shape;if(p(g)){var b=r.get(il(g));b&&e.removeElements(b.children.slice());}},!0),this.executed("shape.delete",function(h){var g=h.shape;p(g)&&f(h);},!0),this.reverted("shape.delete",function(h){var g=h.shape;p(g)&&d(h);},!0),this.preExecuted("shape.replace",function(h){var g=h.oldShape,b=h.newShape;!p(g)||!p(b)||(h.oldRoot=n.removeRootElement(il(g)));},!0),this.postExecuted("shape.replace",function(h){var g=h.newShape,b=h.oldRoot,w=n.findRoot(il(g));if(!(!b||!w)){var T=b.children;e.moveElements(T,{x:0,y:0},w);}},!0),this.executed("element.updateProperties",function(h){var g=h.element;if(z(g,"bpmn:SubProcess")){var b=h.properties,w=h.oldProperties,T=w.id,O=b.id;if(T!==O){if(Ch(g)){r.updateId(g,am(O)),r.updateId(T,O);return;}var V=r.get(am(T));V&&r.updateId(am(T),am(O));}}},!0),this.reverted("element.updateProperties",function(h){var g=h.element;if(z(g,"bpmn:SubProcess")){var b=h.properties,w=h.oldProperties,T=w.id,O=b.id;if(T!==O){if(Ch(g)){r.updateId(g,am(T)),r.updateId(O,T);return;}var V=r.get(am(O));V&&r.updateId(V,am(T));}}},!0),t.on("element.changed",function(h){var g=h.element;if(Ch(g)){var b=g,w=r.get(XM(b));!w||w===b||t.fire("element.changed",{element:w});}}),this.executed("shape.toggleCollapse",AA,function(h){var g=h.shape;z(g,"bpmn:SubProcess")&&(mn(g)?f(h):(d(h),l._showRecursively(g.children)));},!0),this.reverted("shape.toggleCollapse",AA,function(h){var g=h.shape;z(g,"bpmn:SubProcess")&&(mn(g)?f(h):(d(h),l._showRecursively(g.children)));},!0),this.postExecuted("shape.toggleCollapse",lpe,function(h){var g=h.shape;if(z(g,"bpmn:SubProcess")){var b=h.newRootElement;if(b)if(mn(g))l._moveChildrenToShape(b.children.slice(),g),ne(uu(g.children),T=>{e.moveShape(T.annotation,{x:0,y:0},g.parent),ne(T.associations,O=>{e.moveConnection(O,{x:0,y:0},g.parent);});});else{l._disconnectSharedAnnotations(g);var w=jA(g);l._moveChildrenToShape(w,b);}}},!0),t.on("copyPaste.createTree",function(h){var g=h.element,b=h.children;if(p(g)){var w=il(g),T=r.get(w);T&&b.push.apply(b,T.children);}}),t.on("copyPaste.copyElement",function(h){var g=h.descriptor,b=h.element,w=h.elements,T=b.parent,O=z(In(T),"bpmndi:BPMNPlane");if(O){var V=XM(T),j=$n(w,function(L){return L.id===V;});j&&(g.parent=j.id);}}),t.on("copyPaste.pasteElement",function(h){var g=h.descriptor;g.parent&&(p(g.parent)||g.parent.hidden)&&(g.hidden=!0);});}Fe(Pc,Re);Pc.prototype._moveChildrenToShape=function(n,t){var e=this._modeling;if(n.length){var i=n.filter(function(p){return!p.hidden;});if(!i.length){e.moveElements(n,{x:0,y:0},t,{autoResize:!1});return;}var o=Pi(i),a;if(!t.x)a={x:DA.x-o.x,y:DA.y-o.y};else{var r=Rt(t),l=Rt(o);a={x:r.x-l.x,y:r.y-l.y};}e.moveElements(n,a,t,{autoResize:!1});}};Pc.prototype._disconnectSharedAnnotations=function(n){var t=this._modeling,e=new Set(JM(n).map(i=>i.annotation));e.size&&ne(uu(n.children),i=>{e.has(i.annotation)&&ne(i.associations,o=>{t.removeConnection(o);});});};Pc.prototype._showRecursively=function(n,t){var e=this,i=[];return n.forEach(function(o){o.hidden=!!t,i=i.concat(o),o.children&&(i=i.concat(e._showRecursively(o.children,o.collapsed||t)));}),i;};Pc.prototype._addDiagram=function(n){var t=this._bpmnjs,e=t.getDefinitions().diagrams;return n.businessObject||(n=this._createNewDiagram(n)),e.push(n.di.$parent),n;};Pc.prototype._createNewDiagram=function(n){var t=this._bpmnFactory,e=this._elementFactory,i=t.create("bpmndi:BPMNPlane",{bpmnElement:n}),o=t.create("bpmndi:BPMNDiagram",{plane:i});i.$parent=o;var a=e.createRoot({id:il(n),type:n.$type,di:i,businessObject:n,collapsed:!0});return a;};Pc.prototype._removeDiagram=function(n){var t=this._bpmnjs,e=t.getDefinitions().diagrams,i=$n(e,function(o){return o.plane.bpmnElement.id===n.id;});return e.splice(e.indexOf(i),1),i;};Pc.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"];function cpe(n){var t=[];return ne(uu(n),e=>{t.push(e.annotation),t.push.apply(t,e.associations);}),t;}function jA(n){return n.children.slice().concat(cpe(n.children)).concat(ppe(n));}function ppe(n){return F0(n.children||[],!0,-1).reduce(function(t,e){return e.label&&e.label.parent!==n&&t.push(e.label),t;},[]);}function Bg(n,t){n.invoke(Re,this),this.postExecuted("shape.replace",function(e){var i=e.context.oldShape,o=e.context.newShape;if(!(!z(o,"bpmn:SubProcess")||z(o,"bpmn:AdHocSubProcess")||!(z(i,"bpmn:Task")||z(i,"bpmn:CallActivity"))||!mn(o))){var a=dpe(o);t.createShape({type:"bpmn:StartEvent"},a,o);}});}Bg.$inject=["injector","modeling"];Fe(Bg,Re);function dpe(n){return{x:n.x+n.width/6,y:n.y+n.height/2};}
948function $g(n,t){Re.call(this,n),this.preExecute("connection.create",function(e){let{target:i}=e;z(i,"bpmn:TextAnnotation")&&(e.parent=i.parent);},!0),this.preExecute(["shape.create","shape.resize","elements.move"],function(e){let i=e.shapes||[e.shape];i.length===1&&z(i[0],"bpmn:TextAnnotation")&&(e.hints=e.hints||{},e.hints.autoResize=!1);},!0),this.preExecute("shape.resize",function(e){var i=e.context,o=i.shape,a=i.hints||{};if(!(!z(o,"bpmn:TextAnnotation")||a.autoResize)){var r=i.newBounds,l=t.getTextAnnotationBounds(r,za(o)||""),p=r.y!==o.y&&Math.abs(r.y+r.height-(o.y+o.height))<=1,d=o.y+o.height;i.newBounds={width:r.width,height:l.height,x:r.x,y:p?d-l.height:r.y};}});}Fe($g,Re);$g.$inject=["eventBus","textRenderer"];function Vg(n,t){Re.call(this,n),this.postExecuted("shape.toggleCollapse",1500,function(e){var i=e.shape;if(mn(i))return;var o=$c(i);o.forEach(function(r){var l=r.incoming.slice(),p=r.outgoing.slice();ne(l,function(d){a(d,!0);}),ne(p,function(d){a(d,!1);});});function a(r,l){o.indexOf(r.source)!==-1&&o.indexOf(r.target)!==-1||z(r,"bpmn:Association")&&(z(r.source,"bpmn:TextAnnotation")||z(r.target,"bpmn:TextAnnotation"))||(l?t.reconnectEnd(r,i,Rt(i)):t.reconnectStart(r,i,Rt(i)));}},!0);}Fe(Vg,Re);Vg.$inject=["eventBus","modeling"];var N2=500;function Gg(n,t,e){Re.call(this,n);function i(r){r.length&&r.forEach(function(l){l.type==="label"&&!l.businessObject.name&&(l.hidden=!0);});}function o(r,l){var p=r.children,d=l,f,h;return f=mpe(p).concat([r]),h=gy(f),h?(d.width=Math.max(h.width,d.width),d.height=Math.max(h.height,d.height),d.x=h.x+(h.width-d.width)/2,d.y=h.y+(h.height-d.height)/2):(d.x=r.x+(r.width-d.width)/2,d.y=r.y+(r.height-d.height)/2),d;}function a(r,l){return{x:r.x+(r.width-l.width)/2,y:r.y+(r.height-l.height)/2,width:l.width,height:l.height};}this.executed(["shape.toggleCollapse"],N2,function(r){var l=r.context,p=l.shape;z(p,"bpmn:SubProcess")&&(p.collapsed?In(p).isExpanded=!1:(i(p.children),In(p).isExpanded=!0));}),this.reverted(["shape.toggleCollapse"],N2,function(r){var l=r.context,p=l.shape;p.collapsed?In(p).isExpanded=!1:In(p).isExpanded=!0;}),this.postExecuted(["shape.toggleCollapse"],N2,function(r){var l=r.context.shape,p=t.getDefaultSize(l),d;l.collapsed?d=a(l,p):d=o(l,p),e.resizeShape(l,d,null,{autoResize:l.collapsed?!1:"nwse"});});}Fe(Gg,Re);Gg.$inject=["eventBus","elementFactory","modeling"];function mpe(n){return n.filter(function(t){return!t.hidden;});}function qg(n,t,e,i){t.invoke(Re,this),this.preExecute("shape.delete",function(o){var a=o.context,r=a.shape,l=r.businessObject;Ut(r)||(z(r,"bpmn:Participant")&&mn(r)&&e.ids.unclaim(l.processRef.id),i.unclaimId(l.id,l));}),this.preExecute("connection.delete",function(o){var a=o.context,r=a.connection,l=r.businessObject;i.unclaimId(l.id,l);}),this.preExecute("canvas.updateRoot",function(){var o=n.getRootElement(),a=o.businessObject;z(o,"bpmn:Collaboration")&&e.ids.unclaim(a.id);});}Fe(qg,Re);qg.$inject=["canvas","injector","moddle","modeling"];
948function Jg(n,t){Re.call(this,n),this.preExecute("connection.delete",function(e){var i=e.context,o=i.connection,a=o.source;upe(o,a)&&t.updateProperties(a,{default:null});});}Fe(Jg,Re);Jg.$inject=["eventBus","modeling"];function upe(n,t){if(!z(n,"bpmn:SequenceFlow"))return!1;var e=qe(t),i=qe(n);return e.get("default")===i;}var fpe=500,hpe=5e3,zA=["shape.create","shape.delete","shape.move","shape.resize"],LA=[...zA,"spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move"];function Hg(n,t){Re.call(this,n);var e;function i(){return e=e||new _pe(),e.enter(),e;}function o(){if(!e)throw new Error("out of bounds release");return e;}function a(){if(!e)throw new Error("out of bounds release");var r=e.leave();return r&&(t.updateLaneRefs(e.flowNodes,e.lanes),e=null),r;}this.preExecute(LA,hpe,function(){i();}),this.postExecuted(LA,fpe,function(){a();}),this.preExecute(zA,function(r){var l=r.context,p=l.shape,d=o();!p||p.labelTarget||(z(p,"bpmn:Lane")&&d.addLane(p),z(p,"bpmn:FlowNode")&&d.addFlowNode(p));});}Hg.$inject=["eventBus","modeling"];Fe(Hg,Re);function _pe(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(n){this.lanes.push(n);},this.addFlowNode=function(n){this.flowNodes.push(n);},this.enter=function(){this.counter++;},this.leave=function(){return this.counter--,!this.counter;};}var gpe=500,xpe=5e3,BA=["connection.create","connection.delete","connection.layout","connection.move","connection.reconnect","connection.updateWaypoints","shape.create","shape.delete","shape.move","shape.resize"],FA=[...BA,"elements.create","elements.delete","elements.move","label.create","spaceTool"];function Ug(n,t){Re.call(this,n);var e;function i(){return e=e||new Cpe(),e.enter(),e;}function o(){if(!e)throw new Error("out of bounds release");return e;}function a(){if(!e)throw new Error("out of bounds release");var r=e.leave();return r&&(t.updateCategoryValueRefs(Array.from(e.affectedFlowElements),Array.from(e.affectedGroupEntries.values())),e=null),r;}this.preExecute(FA,xpe,function(){i();}),this.postExecuted(FA,gpe,function(){a();}),this.preExecute(BA,function(r){var l=r.context.connection||r.context.shape,p=o();!l||l.labelTarget||(z(l,"bpmn:FlowElement")&&p.addFlowElement(l),z(l,"bpmn:Group")&&p.addGroup(l));}),this.preExecute("label.create",function(r){var l=r.context.labelTarget;z(l,"bpmn:Group")&&o().addGroup(l);});}Ug.$inject=["eventBus","modeling"];Fe(Ug,Re);function Cpe(){this.affectedFlowElements=new Set(),this.affectedGroupEntries=new Map(),this.counter=0,this.addFlowElement=function(n){this.affectedFlowElements.add(n);},this.addGroup=function(n){this.affectedGroupEntries.has(n)||this.affectedGroupEntries.set(n,{categoryValue:n.businessObject.categoryValueRef,groupShape:n});},this.enter=function(){this.counter++;},this.leave=function(){return this.counter--,!this.counter;};}function Wg(n,t){Re.call(this,n),this.postExecuted("elements.create",function(e){let i=e.context,o=i.elements;for(let a of o)vpe(a)&&!ype(a)&&t.updateProperties(a,{isForCompensation:void 0});});}Fe(Wg,Re);Wg.$inject=["eventBus","modeling"];function vpe(n){let t=qe(n);return t&&t.isForCompensation;}function bpe(n){return n&&z(n,"bpmn:BoundaryEvent")&&Rp(n,"bpmn:CompensateEventDefinition");}function ype(n){return n.incoming.filter(e=>bpe(e.source)).length>0;}var $A={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","artifactBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","categoryRootElementReferenceBehavior","compensateBoundaryEventBehaviour","createBehavior","createDataObjectBehavior","createParticipantBehavior","dataInputAssociationBehavior","dataStoreBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","fixHoverBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","layoutConnectionBehavior","messageFlowBehavior","nonInterruptingBehavior","removeElementBehavior","removeEmbeddedLabelBoundsBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","rootElementReferenceBehavior","spaceToolBehavior","subProcessPlaneBehavior","subProcessStartEventBehavior","textAnnotationBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","unclaimIdBehavior","updateFlowNodeRefsBehavior","updateCategoryValueRefsBehavior","unsetDefaultFlowBehavior","setCompensationActivityAfterPasteBehavior"],adaptiveLabelPositioningBehavior:["type",cg],appendBehavior:["type",pg],associationBehavior:["type",mg],attachEventBehavior:["type",Rh],artifactBehavior:["type",dg],boundaryEventBehavior:["type",ug],categoryRootElementReferenceBehavior:["type",fg],compensateBoundaryEventBehaviour:["type",_g],createBehavior:["type",gg],createDataObjectBehavior:["type",xg],createParticipantBehavior:["type",Cg],dataInputAssociationBehavior:["type",vg],dataStoreBehavior:["type",bg],deleteLaneBehavior:["type",Pg],detachEventBehavior:["type",jh],dropOnFlowBehavior:["type",wg],eventBasedGatewayBehavior:["type",Sg],fixHoverBehavior:["type",Cy],groupBehavior:["type",Mg],importDockingFix:["type",vy],isHorizontalFix:["type",Og],labelBehavior:["type",Tg],layoutConnectionBehavior:["type",Ig],messageFlowBehavior:["type",kg],nonInterruptingBehavior:["type",Rg],removeElementBehavior:["type",Ag],removeEmbeddedLabelBoundsBehavior:["type",Ng],removeParticipantBehavior:["type",Dg],replaceConnectionBehavior:["type",jg],replaceElementBehaviour:["type",Vh],resizeBehavior:["type",Ty],resizeLaneBehavior:["type",Iy],rootElementReferenceBehavior:["type",Fg],spaceToolBehavior:["type",ky],subProcessPlaneBehavior:["type",Pc],subProcessStartEventBehavior:["type",Bg],textAnnotationBehavior:["type",$g],toggleCollapseConnectionBehaviour:["type",Vg],toggleElementCollapseBehaviour:["type",Gg],unclaimIdBehavior:["type",qg],unsetDefaultFlowBehavior:["type",Jg],updateFlowNodeRefsBehavior:["type",Hg],updateCategoryValueRefsBehavior:["type",Ug],setCompensationActivityAfterPasteBehavior:["type",Wg]};function Ry(n,t){var e=Jo(n,t,-15);return e!=="intersect"?e:null;}function tr(n){Lr.call(this,n);}Fe(tr,Lr);tr.$inject=["eventBus"];tr.prototype.init=function(){this.addRule("connection.start",function(n){var t=n.source;return Ppe(t);}),this.addRule("connection.create",function(n){var t=n.source,e=n.target,i=n.hints||{},o=i.targetParent,a=i.targetAttach;if(a)return!1;o&&(e.parent=o);try{return Ny(t,e);}finally{o&&(e.parent=null);}}),this.addRule("connection.reconnect",function(n){var t=n.connection,e=n.source,i=n.target;return Ny(e,i,t);}),this.addRule("connection.updateWaypoints",function(n){return{type:n.connection.type};}),this.addRule("shape.resize",function(n){var t=n.shape,e=n.newBounds,i=n.direction;return n6(t,e,i);}),this.addRule("elements.create",function(n){var t=n.elements,e=n.position,i=n.target;return zn(i)&&!Ay(t,i,e)?!1:zl(t,function(o){return zn(o)?Ny(o.source,o.target,o):o.host?Xg(o,o.host,null,e):j2(o,i,null,e);});}),this.addRule("elements.move",function(n){var t=n.target,e=n.shapes,i=n.position,o=n.hints;return o?.keyboardMove&&e.some(function(r){return YA(r)&&!e.includes(r.host);})?!1:Xg(e,t,null,i)||e6(e,t,i)||t6(e,t,i)||Ay(e,t,i);}),this.addRule("shape.create",function(n){return j2(n.shape,n.target,n.source,n.position);}),this.addRule("shape.attach",function(n){return Xg(n.shape,n.target,null,n.position);}),this.addRule("element.copy",function(n){var t=n.element,e=n.elements;return s6(e,t);});};tr.prototype.canConnectMessageFlow=a6;tr.prototype.canConnectSequenceFlow=r6;tr.prototype.canConnectDataAssociation=F2;tr.prototype.canConnectAssociation=i6;tr.prototype.canConnectCompensationAssociation=o6;tr.prototype.canMove=t6;tr.prototype.canAttach=Xg;tr.prototype.canReplace=e6;tr.prototype.canDrop=Jh;tr.prototype.canInsert=Ay;tr.prototype.canCreate=j2;tr.prototype.canConnect=Ny;tr.prototype.canResize=n6;tr.prototype.canCopy=s6;function Ppe(n){return A2(n)?null:en(n,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"]);}function A2(n){return!n||Ut(n);}function VA(n){do{if(z(n,"bpmn:Process"))return qe(n);if(z(n,"bpmn:Participant"))return qe(n).processRef||qe(n);}while(n=n.parent);}function D2(n){return z(n,"bpmn:TextAnnotation");}function z2(n){return z(n,"bpmn:Group")&&!n.labelTarget;}function UA(n){return z(n,"bpmn:BoundaryEvent")&&Kc(n,"bpmn:CompensateEventDefinition");}function Dy(n){return qe(n).isForCompensation;}function wpe(n,t){var e=VA(n),i=VA(t);return e===i;}function Spe(n){return z(n,"bpmn:InteractionNode")&&!z(n,"bpmn:BoundaryEvent")&&(!z(n,"bpmn:Event")||z(n,"bpmn:ThrowEvent")&&XA(n,"bpmn:MessageEventDefinition"));}function Mpe(n){return z(n,"bpmn:InteractionNode")&&!Dy(n)&&(!z(n,"bpmn:Event")||z(n,"bpmn:CatchEvent")&&XA(n,"bpmn:MessageEventDefinition"))&&!(z(n,"bpmn:BoundaryEvent")&&!Kc(n,"bpmn:MessageEventDefinition"));}function GA(n){for(var t=n;t=t.parent;){if(z(t,"bpmn:FlowElementsContainer"))return qe(t);if(z(t,"bpmn:Participant"))return qe(t).processRef;}return null;}function WA(n,t){var e=GA(n),i=GA(t);return e===i;}function Kc(n,t){var e=qe(n);return!!$n(e.eventDefinitions||[],function(i){return z(i,t);});}function XA(n,t){var e=qe(n);return(e.eventDefinitions||[]).every(function(i){return z(i,t);});}function Ope(n){return z(n,"bpmn:FlowNode")&&!z(n,"bpmn:EndEvent")&&!ua(n)&&!(z(n,"bpmn:IntermediateThrowEvent")&&Kc(n,"bpmn:LinkEventDefinition"))&&!UA(n)&&!Dy(n);}function Epe(n){return z(n,"bpmn:FlowNode")&&!z(n,"bpmn:StartEvent")&&!z(n,"bpmn:BoundaryEvent")&&!ua(n)&&!(z(n,"bpmn:IntermediateCatchEvent")&&Kc(n,"bpmn:LinkEventDefinition"))&&!Dy(n);}function Tpe(n){return z(n,"bpmn:ReceiveTask")||z(n,"bpmn:IntermediateCatchEvent")&&(Kc(n,"bpmn:MessageEventDefinition")||Kc(n,"bpmn:TimerEventDefinition")||Kc(n,"bpmn:ConditionalEventDefinition")||Kc(n,"bpmn:SignalEventDefinition"));}function Ipe(n){for(var t=[];n;
948)n=n.parent,n&&t.push(n);return t;}function qA(n,t){var e=Ipe(t);return e.indexOf(n)!==-1;}function Ny(n,t,e){if(A2(n)||A2(t))return null;if(!z(e,"bpmn:DataAssociation")){if(a6(n,t))return{type:"bpmn:MessageFlow"};if(r6(n,t))return{type:"bpmn:SequenceFlow"};}var i=F2(n,t);return i||(o6(n,t)?{type:"bpmn:Association",associationDirection:"One"}:i6(n,t)?{type:"bpmn:Association",associationDirection:"None"}:!1);}function Jh(n,t){return Ut(n)||z2(n)?!0:z(t,"bpmn:Participant")&&!mn(t)?!1:z(n,"bpmn:Participant")?z(t,"bpmn:Process")||z(t,"bpmn:Collaboration"):en(n,["bpmn:DataInput","bpmn:DataOutput"])&&n.parent?t===n.parent:z(n,"bpmn:Lane")?z(t,"bpmn:Participant")||z(t,"bpmn:Lane"):z(n,"bpmn:BoundaryEvent")&&!kpe(n)?!1:z(n,"bpmn:FlowElement")&&!z(n,"bpmn:DataStoreReference")?z(t,"bpmn:FlowElementsContainer")?mn(t):en(t,["bpmn:Participant","bpmn:Lane"]):z(n,"bpmn:DataStoreReference")&&z(t,"bpmn:Collaboration")?xs(qe(t).get("participants"),function(e){return!!e.get("processRef");}):en(n,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?en(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):z(n,"bpmn:MessageFlow")?z(t,"bpmn:Collaboration")||n.source.parent==t||n.target.parent==t:!1;}function kpe(n){return qe(n).cancelActivity&&(KA(n)||ZA(n));}function YA(n){return!Ut(n)&&z(n,"bpmn:BoundaryEvent");}function Rpe(n){return z(n,"bpmn:Lane");}function Npe(n){return YA(n)||z(n,"bpmn:IntermediateThrowEvent")&&KA(n)?!0:z(n,"bpmn:IntermediateCatchEvent")&&ZA(n);}function KA(n){var t=qe(n);return t&&!(t.eventDefinitions&&t.eventDefinitions.length);}function ZA(n){return QA(n,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"]);}function QA(n,t){return t.some(function(e){return Kc(n,e);});}function Ape(n){return z(n,"bpmn:ReceiveTask")&&$n(n.incoming,function(t){return z(t.source,"bpmn:EventBasedGateway");});}function Xg(n,t,e,i){if(Array.isArray(n)||(n=[n]),n.length!==1)return!1;var o=n[0];return Ut(o)||!Npe(o)||ua(t)||!z(t,"bpmn:Activity")||Dy(t)||i&&!Ry(i,t)||Ape(t)?!1:"attach";}function e6(n,t,e){if(!t)return!1;var i={replacements:[]};return ne(n,function(o){ua(t)||z(o,"bpmn:StartEvent")&&o.type!=="label"&&Jh(o,t)&&(S4(o)||i.replacements.push({oldElementId:o.id,newElementType:"bpmn:StartEvent"}),(M4(o)||O4(o)||E4(o))&&i.replacements.push({oldElementId:o.id,newElementType:"bpmn:StartEvent"}),QA(o,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&z(t,"bpmn:SubProcess")&&i.replacements.push({oldElementId:o.id,newElementType:"bpmn:StartEvent"})),z(t,"bpmn:Transaction")||Kc(o,"bpmn:CancelEventDefinition")&&o.type!=="label"&&(z(o,"bpmn:EndEvent")&&Jh(o,t)&&i.replacements.push({oldElementId:o.id,newElementType:"bpmn:EndEvent"}),z(o,"bpmn:BoundaryEvent")&&Xg(o,t,null,e)&&i.replacements.push({oldElementId:o.id,newElementType:"bpmn:BoundaryEvent"}));}),i.replacements.length?i:!1;}function t6(n,t){return xs(n,Rpe)?!1:t===void 0?!0:t===null?!1:n.every(function(e){return Jh(e,t);});}function j2(n,t,e,i){return t?Ut(n)||z2(n)?!0:Jh(n,t,i)||Ay(n,t,i):!1;}function n6(n,t,e){return z(n,"bpmn:SubProcess")?mn(n)&&(!t||t.width>=100&&t.height>=80):z(n,"bpmn:Lane")||z(n,"bpmn:Participant")?!0:D2(n)?e?e==="e"||e==="w":!0:z2(n)?!0:Ut(n)?e?e==="e"||e==="w":!0:!1;}function Dpe(n,t){var e=D2(n),i=D2(t);return(e||i)&&e!==i;}function i6(n,t){return qA(t,n)||qA(n,t)?!1:Dpe(n,t)?!0:!!F2(n,t);}function o6(n,t){return WA(n,t)&&UA(n)&&z(t,"bpmn:Activity")&&!Lpe(t,n)&&!ua(t);}function a6(n,t){return HA(n)&&!HA(t)?!1:Spe(n)&&Mpe(t)&&!wpe(n,t);}function r6(n,t){return Ope(n)&&Epe(t)&&WA(n,t)&&!(z(n,"bpmn:EventBasedGateway")&&!Tpe(t));}function F2(n,t){return en(n,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&en(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:en(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&en(n,["bpmn:Activity","bpmn:CatchEvent"])?{type:"bpmn:DataOutputAssociation"}:!1;}function Ay(n,t,e){if(!t)return!1;if(Array.isArray(n)){if(n.length!==1)return!1;n=n[0];}return t.source===n||t.target===n?!1:en(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!Ut(t)&&z(n,"bpmn:FlowNode")&&!z(n,"bpmn:BoundaryEvent")&&Jh(n,t.parent,e);}function L2(n,t){return n&&t&&n.indexOf(t)!==-1;}function s6(n,t){return Ut(t)?!0:!(z(t,"bpmn:Lane")&&!L2(n,t.parent)||z(t,"bpmn:MessageFlow")&&!jpe(n,t));}function jpe(n,t){var e=JA(t.source),i=JA(t.target);return L2(n,e)&&L2(n,i);}function JA(n){for(;n;n=n.parent)if(z(n,"bpmn:Participant"))return n;return null;}function HA(n){return Vp(n,"bpmn:Process")||Vp(n,"bpmn:Collaboration");}function Lpe(n,t){return n.attachers.includes(t);}var l6={__depends__:[er],__init__:["bpmnRules"],bpmnRules:["type",tr]};var zpe=2e3;function jy(n,t){n.on("saveXML.start",zpe,e);function e(){var i=t.getRootElements();ne(i,function(o){var a=In(o),r,l;r=$c([o],!1),r=Yt(r,function(p){return p!==o&&!p.labelTarget;}),l=sa(r,In),a.set("planeElement",l);});}}jy.$inject=["eventBus","canvas"];var c6={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",jy]};function Hh(n){Re.call(this,n);var t=this;
948this.preExecute(["shape.create","connection.create"],function(e){var i=e.context,o=i.shape||i.connection,a=i.parent,r=t.getOrdering(o,a);r&&(r.parent!==void 0&&(i.parent=r.parent),i.parentIndex=r.index);}),this.preExecute(["shape.move","connection.move"],function(e){var i=e.context,o=i.shape||i.connection,a=i.newParent||o.parent,r=t.getOrdering(o,a);r&&(r.parent!==void 0&&(i.newParent=r.parent),i.newParentIndex=r.index);});}Hh.prototype.getOrdering=function(n,t){return null;};Fe(Hh,Re);function Yg(n,t){Hh.call(this,n);var e=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:9,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:TextAnnotation",order:{level:9}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function i(r){if(r.labelTarget)return{level:10};var l=$n(e,function(p){return en(r,[p.type]);});return l&&l.order||{level:1};}function o(r){var l=r.order;if(l||(r.order=l=i(r)),!l)throw new Error(`no order for <${r.id}>`);return l;}function a(r,l,p){for(var d=l;d&&!en(d,p);)d=d.parent;if(!d)throw new Error(`no parent for <${r.id}> in <${l&&l.id}>`);return d;}this.getOrdering=function(r,l){if(r.labelTarget||z(r,"bpmn:TextAnnotation"))return{parent:t.findRoot(l)||t.getRootElement(),index:-1};var p=o(r);p.containers&&(l=a(r,l,p.containers));var d=l.children.indexOf(r),f=Ov(l.children,function(h){return!r.labelTarget&&h.labelTarget?!1:p.level<o(h).level;});return f!==-1&&d!==-1&&d<f&&(f-=1),{index:f,parent:l};};}Yg.$inject=["eventBus","canvas"];Fe(Yg,Hh);var p6={__init__:["bpmnOrderingProvider"],bpmnOrderingProvider:["type",Yg]};function Ou(){}Ou.prototype.get=function(){return this._data;};Ou.prototype.set=function(n){this._data=n;};Ou.prototype.clear=function(){var n=this._data;return delete this._data,n;};Ou.prototype.isEmpty=function(){return!this._data;};var d6={clipboard:["type",Ou]};var Fpe="drop-ok",m6="drop-not-ok",u6="attach-ok",f6="new-parent",h6="create",Bpe=2e3;function Ly(n,t,e,i,o){function a(p,d,f,h,g){if(!d)return!1;p=Yt(p,function(j){var L=j.labelTarget;return!j.parent&&!(Ut(j)&&p.indexOf(L)!==-1);});var b=$n(p,function(j){return!zn(j);}),w=!1,T=!1,O=!1;g6(p)&&(w=o.allowed("shape.attach",{position:f,shape:b,target:d})),w||(g6(p)?O=o.allowed("shape.create",{position:f,shape:b,source:h,target:d}):O=o.allowed("elements.create",{elements:p,position:f,target:d}));var V=g.connectionTarget;return O||w?(b&&h&&(T=o.allowed("connection.create",{source:V===h?b:h,target:V===h?h:b,hints:{targetParent:d,targetAttach:w}})),{attach:w,connect:T}):O===null||w===null?null:!1;}function r(p,d){[u6,Fpe,m6,f6].forEach(function(f){f===d?n.addMarker(p,f):n.removeMarker(p,f);});}e.on(["create.move","create.hover"],function(p){var d=p.context,f=d.elements,h=p.hover,g=d.source,b=d.hints||{};if(!h){d.canExecute=!1,d.target=null;return;}_6(p);var w={x:p.x,y:p.y},T=d.canExecute=h&&a(f,h,w,g,b);h&&T!==null&&(d.target=h,T&&T.attach?r(h,u6):r(h,T?f6:m6));}),e.on(["create.end","create.out","create.cleanup"],function(p){var d=p.hover;d&&r(d,null);}),e.on("create.end",function(p){var d=p.context,f=d.source,h=d.shape,g=d.elements,b=d.target,w=d.canExecute,T=w&&w.attach,O=w&&w.connect,V=d.hints||{};if(w===!1||!b)return!1;_6(p);var j={x:p.x,y:p.y};O?h=i.appendShape(f,h,j,b,{attach:T,connection:O===!0?{}:O,connectionTarget:V.connectionTarget}):(g=i.createElements(g,j,b,me({},V,{attach:T})),h=$n(g,function(L){return!zn(L);})),me(d,{elements:g,shape:h}),me(p,{elements:g,shape:h});});function l(){var p=t.context();p&&p.prefix===h6&&t.cancel();}e.on("create.init",function(){e.on("elements.changed",l),e.once(["create.cancel","create.end"],Bpe,function(){e.off("elements.changed",l);});}),this.start=function(p,d,f){gt(d)||(d=[d]);var h=$n(d,function(w){return!zn(w);});if(h){f=me({elements:d,hints:{},shape:h},f||{}),ne(d,function(w){nn(w.x)||(w.x=0),nn(w.y)||(w.y=0);});var g=Yt(d,function(w){return!w.hidden;}),b=Pi(g);ne(d,function(w){zn(w)&&(w.waypoints=sa(w.waypoints,function(T){return{x:T.x-b.x-b.width/2,y:T.y-b.y-b.height/2};})),me(w,{x:w.x-b.x-b.width/2,y:w.y-b.y-b.height/2});}),t.init(p,h6,{cursor:"grabbing",autoActivate:!0,data:{shape:h,elements:d,context:f}});}};}Ly.$inject=["canvas","dragging","eventBus","modeling","rules"];function _6(n){var t=n.context,e=t.createConstraints;e&&(e.left&&(n.x=Math.max(n.x,e.left)),e.right&&(n.x=Math.min(n.x,e.right)),e.top&&(n.y=Math.max(n.y,e.top)),e.bottom&&(n.y=Math.min(n.y,e.bottom)));}function g6(n){return n&&n.length===1&&!zn(n[0]);}var $pe=750;function zy(n,t,e,i,o){function a(r){var l=xt("g");lt(l,o.cls("djs-drag-group",["no-events"]));var p=xt("g");return r.forEach(function(d){var f;
948d.hidden||(d.waypoints?(f=e._createContainer("connection",p),e.drawConnection(_c(f),d)):(f=e._createContainer("shape",p),e.drawShape(_c(f),d),Ao(f,d.x,d.y)),i.addDragger(d,l,f));}),l;}t.on("create.move",$pe,function(r){var l=r.hover,p=r.context,d=p.elements,f=p.dragGroup;f||(f=p.dragGroup=a(d));var h;l?(f.parentNode||(h=n.getActiveLayer(),Kt(h,f)),Ao(f,r.x,r.y)):Hi(f);}),t.on("create.cleanup",function(r){var l=r.context,p=l.dragGroup;p&&Hi(p);});}zy.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];var Cm={__depends__:[Mr,Hl,er,la],__init__:["create","createPreview"],create:["type",Ly],createPreview:["type",zy]};function Kg(n){var t=this;this._lastMoveEvent=null;function e(i){t._lastMoveEvent=i;}n.on("canvas.init",function(i){var o=t._svg=i.svg;o.addEventListener("mousemove",e);}),n.on("canvas.destroy",function(){t._lastMouseEvent=null,t._svg.removeEventListener("mousemove",e);});}Kg.$inject=["eventBus"];Kg.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||Vpe(0,0);};function Vpe(n,t){var e=document.createEvent("MouseEvent"),i=n,o=t,a=n,r=t;return e.initMouseEvent&&e.initMouseEvent("mousemove",!0,!0,window,0,i,o,a,r,!1,!1,!1,!1,0,null),e;}var Zc={__init__:["mouse"],mouse:["type",Kg]};var x6=2e3;function as(n,t,e,i,o,a,r,l){this._canvas=n,this._create=t,this._elementFactory=i,this._eventBus=o,this._modeling=a,this._mouse=r,this._rules=l,o.on("copyPaste.copyElement",function(p){var d=p.descriptor,f=p.element,h=p.elementsSet;d.priority=1,d.id=f.id,h.has(f.parent)&&(d.parent=f.parent.id),Gpe(f)&&(d.priority=2,d.host=f.host.id),zn(f)&&(d.priority=3,d.source=f.source.id,d.target=f.target.id,d.waypoints=qpe(f)),Ut(f)&&(d.priority=4,d.labelTarget=f.labelTarget.id),ne(["x","y","width","height"],function(g){nn(f[g])&&(d[g]=f[g]);}),d.hidden=f.hidden,d.collapsed=f.collapsed;}),o.on("copyPaste.elementsCopied",x6,function(p){p.hints?.clip!==!1&&e.set(p.tree);}),o.on("copyPaste.pasteElements",x6,function(p){p.tree||(p.tree=e.get());}),o.on("copyPaste.pasteElements",function(p){var d=p.hints;me(d,{createElementsBehavior:!1});});}as.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"];as.prototype.copy=function(n,t={}){var e,i;return gt(n)||(n=n?[n]:[]),e=this._eventBus.fire("copyPaste.canCopyElements",{elements:n}),e===!1?i={}:i=this.createTree(gt(e)?e:n),this._eventBus.fire("copyPaste.elementsCopied",{elements:n,tree:i,hints:t}),i;};as.prototype.paste=function(n={}){var t=this._eventBus.createEvent(X({type:"copyPaste.pasteElements",hints:{}},n)),e=this._eventBus.fire(t);if(e!==!1){var i=t.tree;if(i){var o=t.hints,a=this._createElements(i);if(t.element&&t.point)return this._paste(a,t.element,t.point,o);this._create.start(this._mouse.getLastMoveEvent(),a,{hints:o});}}};as.prototype.duplicate=function(n,t={}){var e=this.copy(n,{clip:!1});return this.paste(Ve(X({},t),{tree:e}));};as.prototype.cut=function(n){var t=this.copy(n),e=this._getElementIdsFromTree(t),i=n.filter(function(o){return e[o.id];});return i.length>0&&this._modeling.removeElements(i),t;};as.prototype._getElementIdsFromTree=function(n){var t={};return ne(n,function(e){ne(e,function(i){i.id&&(t[i.id]=!0);});}),t;};as.prototype._paste=function(n,t,e,i){ne(n,function(a){nn(a.x)||(a.x=0),nn(a.y)||(a.y=0);});var o=Pi(n);return ne(n,function(a){zn(a)&&(a.waypoints=sa(a.waypoints,function(r){return{x:r.x-o.x-o.width/2,y:r.y-o.y-o.height/2};})),me(a,{x:a.x-o.x-o.width/2,y:a.y-o.y-o.height/2});}),this._modeling.createElements(n,e,t,me({},i));};as.prototype._createElements=function(n){var t=this,e=this._eventBus,i={},o=[];return ne(n,function(a,r){r=parseInt(r,10),a=jr(a,"priority"),ne(a,function(l){var p=me({},ns(l,["priority"]));i[l.parent]?p.parent=i[l.parent]:delete p.parent,e.fire("copyPaste.pasteElement",{cache:i,descriptor:p});var d;if(zn(p)){p.source=i[l.source],p.target=i[l.target],d=i[l.id]=t.createConnection(p),o.push(d);return;}if(Ut(p)){p.labelTarget=i[p.labelTarget],d=i[l.id]=t.createLabel(p),o.push(d);return;}p.host&&(p.host=i[p.host]),d=i[l.id]=t.createShape(p),o.push(d);});}),o;};as.prototype.createConnection=function(n){var t=this._elementFactory.createConnection(ns(n,["id"]));return t;};as.prototype.createLabel=function(n){var t=this._elementFactory.createLabel(ns(n,["id"]));return t;};as.prototype.createShape=function(n){var t=this._elementFactory.createShape(ns(n,["id"]));return t;};as.prototype.hasRelations=function(n,t,e){return e||(e=new Set(t)),!(zn(n)&&(!e.has(n.source)||!e.has(n.target))||Ut(n)&&!e.has(n.labelTarget));};as.prototype.createTree=function(n){var t=this._rules,e=this,i={},o=[],a=new Map(),r=Ud(n);function l(h,g){return t.allowed("element.copy",{element:h,elements:g});}function p(h,g){var b=a.get(h);if(!b){var w={element:h,depth:g};o.push(w),a.set(h,w);return;}if(b.depth<g){o=d(b,o);var T={element:b.element,depth:g};o.push(T),a.set(h,T);}}function d(h,g){var b=g.indexOf(h);return b!==-1&&g.splice(b,1),g;}hc(r,function(h,g,b){if(Ut(h))return;ne(h.labels,function(O){p(O,b);});function w(O){O&&O.length&&ne(O,function(V){ne(V.labels,function(j){p(j,b);}),p(V,b);});}ne([h.attachers,h.incoming,h.outgoing],w),p(h,b);var T=[];return h.children&&(T=h.children.slice()),e._eventBus.fire("copyPaste.createTree",{element:h,children:T}),T;}),n=sa(o,function(h){return h.element;});var f=new Set(n);return o=sa(o,function(h){return h.descriptor={},e._eventBus.fire("copyPaste.copyElement",{descriptor:h.descriptor,element:h.element,elements:n,elementsSet:f}),h;}),o=jr(o,function(h){return h.descriptor.priority;}),n=sa(o,function(h){return h.element;}),ne(o,function(h){var g=h.depth;if(!e.hasRelations(h.element,n,f)){v6(h.element,n),f.delete(h.element);return;}if(!l(h.element,n)){v6(h.element,n),f.delete(h.element);return;}i[g]||(i[g]=[]),i[g].push(h.descriptor);}),i;};function Gpe(n){return!!n.host;}function qpe(n){return sa(n.waypoints,function(t){return t=C6(t),t.original&&(t.original=C6(t.original)),t;});}function C6(n){return me({},n);}function v6(n,t){var e=t.indexOf(n);return e===-1?t:t.splice(e,1);}var b6={__depends__:[d6,Cm,Zc,er],__init__:["copyPaste"],copyPaste:["type",as]};function B2(n,t,e){gt(e)||(e=[e]),ne(e,function(i){Fc(n[i])||(t[i]=n[i]);});}var $2=750;function Fy(n,t,e){function i(p,d){var f=n.create(p.$type);return e.copyElement(p,f,null,d);}t.on("copyPaste.copyElement",$2,function(p){var d=p.descriptor,f=p.element,h=qe(f);if(Ut(f))return d;var g=d.businessObject=i(h,!0),b=d.di=i(In(f),!0);b.bpmnElement=g,B2(g,d,"name"),B2(b,d,"isExpanded"),h.default&&(d.default=h.default.id);});var o="-bpmn-js-refs";function a(p){return p[o]=p[o]||{};}function r(p,d){p[o]=d;}function l(p,d,f){var h=qe(p);return p.default&&(f[p.default]={element:h,property:"default"}),p.host&&(qe(p).attachedToRef=qe(d[p.host])),ns(f,_a(f,function(g,b,w){var T=b.element,O=b.property;return w===p.id&&(T.set(O,h),g.push(p.id)),g;},[]));}t.on("copyPaste.pasteElement",function(p){var d=p.cache,f=p.descriptor,h=f.businessObject,g=f.di;if(Ut(f)){f.businessObject=qe(d[f.labelTarget]),f.di=In(d[f.labelTarget]);return;}h=f.businessObject=i(h),g=f.di=i(g),g.bpmnElement=h,B2(f,h,["isExpanded","name"]),f.type=h.$type;}),t.on("copyPaste.copyElement",$2,function(p){var d=p.descriptor,f=p.element;
948if(z(f,"bpmn:Participant")){var h=qe(f);h.processRef&&(d.processRef=i(h.processRef,!0));}}),t.on("copyPaste.pasteElement",function(p){var d=p.descriptor,f=d.processRef;f&&(d.processRef=i(f));}),t.on("copyPaste.createTree",function(p){var d=p.element,f=p.children;z(d,"bpmn:SubProcess")&&ne(uu(f),h=>{f.push(h.annotation);});}),t.on("copyPaste.pasteElement",$2,function(p){var d=p.cache,f=p.descriptor;r(d,l(f,d,a(d)));});}Fy.$inject=["bpmnFactory","eventBus","moddleCopy"];var Jpe=["artifacts","dataInputAssociations","dataOutputAssociations","default","flowElements","lanes","incoming","outgoing","categoryValue"],Hpe=["errorRef","escalationRef","messageRef","signalRef","dataObjectRef"];function Eu(n,t,e){this._bpmnFactory=t,this._eventBus=n,this._moddle=e,n.on("moddleCopy.canCopyProperties",i=>{let{propertyNames:o}=i;if(!(!o||!o.length))return jr(o,a=>a==="extensionElements");}),n.on("moddleCopy.canCopyProperty",i=>{let{parent:o,property:a,propertyName:r}=i,l=eo(o)&&o.$descriptor;if(r&&Hpe.includes(r))return a;if(r&&Jpe.includes(r)||r&&l&&!$n(l.properties,fc({name:r})))return!1;}),n.on("moddleCopy.canSetCopiedProperty",i=>{let{property:o}=i;if(z(o,"bpmn:ExtensionElements")&&(!o.values||!o.values.length))return!1;});}Eu.$inject=["eventBus","bpmnFactory","moddle"];Eu.prototype.copyElement=function(n,t,e,i=!1){e&&!gt(e)&&(e=[e]),e=e||By(n.$descriptor);let o=this._eventBus.fire("moddleCopy.canCopyProperties",{propertyNames:e,sourceElement:n,targetElement:t,clone:i});return o===!1||(gt(o)&&(e=o),ne(e,a=>{let r;Ka(n,a)&&(r=n.get(a));let l=this.copyProperty(r,t,a,i);!Ko(l)||this._eventBus.fire("moddleCopy.canSetCopiedProperty",{parent:t,property:l,propertyName:a})===!1||t.set(a,l);})),t;};Eu.prototype.copyProperty=function(n,t,e,i=!1){let o=this._eventBus.fire("moddleCopy.canCopyProperty",{parent:t,property:n,propertyName:e,clone:i});if(o===!1)return;if(o)return eo(o)&&o.$type&&!o.$parent&&(o.$parent=t),o;let a=this._moddle.getPropertyDescriptor(t,e);if(!a.isReference)return a.isId?n&&this._copyId(n,t,i):gt(n)?_a(n,(r,l)=>{let p=this.copyProperty(l,t,e,i);return p?r.concat(p):r;},[]):eo(n)&&n.$type?this._moddle.getElementDescriptor(n).isGeneric?void 0:(o=this._bpmnFactory.create(n.$type),o.$parent=t,o=this.copyElement(n,o,null,i),o):n;};Eu.prototype._copyId=function(n,t,e=!1){if(e)return n;if(!this._moddle.ids.assigned(n))return this._moddle.ids.claim(n,t),n;};function By(n,t){return _a(n.properties,(e,i)=>t&&i.default?e:e.concat(i.name),[]);}var $y={__depends__:[b6],__init__:["bpmnCopyPaste","moddleCopy"],bpmnCopyPaste:["type",Fy],moddleCopy:["type",Eu]};var y6=Math.round;function Zg(n,t){this._modeling=n,this._eventBus=t;}Zg.$inject=["modeling","eventBus"];Zg.prototype.replaceElement=function(n,t,e){if(n.waypoints)return null;var i=this._modeling,o=this._eventBus;o.fire("replace.start",{element:n,attrs:t,hints:e});var a=t.width||n.width,r=t.height||n.height,l=t.x||n.x,p=t.y||n.y,d=y6(l+a/2),f=y6(p+r/2),h=i.replaceShape(n,me({},t,{x:d,y:f,width:a,height:r}),e);return o.fire("replace.end",{element:n,newElement:h,hints:e}),h;};function Vy(n,t){t.on("replace.end",500,function(e){let{newElement:i,hints:o={}}=e;o.select!==!1&&n.select(i);});}Vy.$inject=["selection","eventBus"];var P6={__init__:["replace","replaceSelectionBehavior"],replaceSelectionBehavior:["type",Vy],replace:["type",Zg]};function Upe(n,t,e){gt(e)||(e=[e]),ne(e,function(i){Fc(n[i])||(t[i]=n[i]);});}var Wpe=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];function Xpe(n,t){var e=n&&Ka(n,"collapsed")?n.collapsed:!mn(n),i;return t&&(Ka(t,"collapsed")||Ka(t,"isExpanded"))?i=Ka(t,"collapsed")?t.collapsed:!t.isExpanded:i=e,e!==i;}function qy(n,t,e,i,o,a){function r(l,p,d){d=d||{};var f=p.type,h=l.businessObject;if(Gy(h)&&(f==="bpmn:SubProcess"||f==="bpmn:AdHocSubProcess")&&Xpe(l,p))return i.toggleCollapse(l),l;var g=n.create(f),b={type:f,businessObject:g};b.di={},f==="bpmn:ExclusiveGateway"&&(b.di.isMarkerVisible=!0),Upe(l.di,b.di,["fill","stroke","background-color","border-color","color"]);var w=By(h.$descriptor),T=By(g.$descriptor,!0),O=Ype(w,T);me(g,Za(p,Wpe));var V=Yt(O,function(A){return A==="eventDefinitions"?w6(l,p.eventDefinitionType):A==="loopCharacteristics"?!ua(g):Ka(g,A)||A==="processRef"&&p.isExpanded===!1||A==="triggeredByEvent"?!1:A==="isFor
948Compensation"?!ua(g):!0;});if(g=e.copyElement(h,g,V),p.eventDefinitionType&&(w6(g,p.eventDefinitionType)||(b.eventDefinitionType=p.eventDefinitionType,b.eventDefinitionAttrs=p.eventDefinitionAttrs)),z(h,"bpmn:Activity")){if(Gy(h))b.isExpanded=mn(l);else if(p&&Ka(p,"isExpanded")){b.isExpanded=p.isExpanded;var j=t.getDefaultSize(g,{isExpanded:b.isExpanded});b.width=j.width,b.height=j.height,b.x=l.x-(b.width-l.width)/2,b.y=l.y-(b.height-l.height)/2;}mn(l)&&!z(h,"bpmn:Task")&&b.isExpanded&&(b.width=l.width,b.height=l.height);}if(Gy(h)&&!Gy(g)&&(d.moveChildren=!1),z(h,"bpmn:Participant")){p.isExpanded===!0?g.processRef=n.create("bpmn:Process"):d.moveChildren=!1;var L=ao(l);In(l).isHorizontal||(In(b).isHorizontal=L),b.width=L?l.width:t.getDefaultSize(b).width,b.height=L?t.getDefaultSize(b).height:l.height;}return a.allowed("shape.resize",{shape:g})||(b.height=t.getDefaultSize(b).height,b.width=t.getDefaultSize(b).width),g.name=h.name,en(h,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&en(g,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&(g.default=h.default),p.host&&!z(h,"bpmn:BoundaryEvent")&&z(g,"bpmn:BoundaryEvent")&&(b.host=p.host),(b.type==="bpmn:DataStoreReference"||b.type==="bpmn:DataObjectReference")&&(b.x=l.x+(l.width-b.width)/2),o.replaceElement(l,b,Ve(X({},d),{targetElement:p}));}this.replaceElement=r;}qy.$inject=["bpmnFactory","elementFactory","moddleCopy","modeling","replace","rules"];function Gy(n){return z(n,"bpmn:SubProcess");}function w6(n,t){var e=qe(n);return t&&e.get("eventDefinitions").some(function(i){return z(i,t);});}function Ype(n,t){return n.filter(function(e){return t.includes(e);});}var Jy={__depends__:[$y,P6,la],bpmnReplace:["type",qy]};var Kpe=250;function qp(n){this._eventBus=n,this._tools=[],this._active=null;}qp.$inject=["eventBus"];qp.prototype.registerTool=function(n,t){var e=this._tools;if(!t)throw new Error(`A tool has to be registered with it's "events"`);e.push(n),this.bindEvents(n,t);};qp.prototype.isActive=function(n){return n&&this._active===n;};qp.prototype.length=function(n){return this._tools.length;};qp.prototype.setActive=function(n){var t=this._eventBus;this._active!==n&&(this._active=n,t.fire("tool-manager.update",{tool:n}));};qp.prototype.bindEvents=function(n,t){var e=this._eventBus,i=[];e.on(t.tool+".init",function(o){var a=o.context;if(!a.reactivate&&this.isActive(n)){this.setActive(null);return;}this.setActive(n);},this),ne(t,function(o){i.push(o+".ended"),i.push(o+".canceled");}),e.on(i,Kpe,function(o){this._active&&(Zpe(o)||this.setActive(null));},this);};function Zpe(n){var t=n.originalEvent&&n.originalEvent.target;return t&&Bs(t,'.group[data-group="tools"]');}var vm={__depends__:[Mr],__init__:["toolManager"],toolManager:["type",qp]};function S6(n,t){if(n==="x"){if(t>0)return"e";if(t<0)return"w";}if(n==="y"){if(t>0)return"s";if(t<0)return"n";}return null;}function M6(n,t){var e=[],i=new Set(n);ne(t,function(a){i.add(a);});var o=new Set();return i.forEach(function(a){var r=a.incoming,l=a.outgoing;ne(r.concat(l),function(p){var d=p.source,f=p.target;(i.has(d)||i.has(f))&&(o.has(p)||(o.add(p),e.push(p)));});}),e;}function O6(n,t,e){var i=n.x,o=n.y,a=n.width,r=n.height,l=e.x,p=e.y;switch(t){case"n":return{x:i,y:o+p,width:a,height:r-p};case"s":return{x:i,y:o,width:a,height:r+p};case"w":return{x:i+l,y:o,width:a-l,height:r};case"e":return{x:i,y:o,width:a+l,height:r};default:throw new Error("unknown direction: "+t);}}var V2=Math.abs,Qpe=Math.round,Jp={x:"width",y:"height"},I6="crosshair",bm={n:"top",w:"left",s:"bottom",e:"right"},ede=1500,Hy={n:"s",w:"e",s:"n",e:"w"},Uy=20;function ws(n,t,e,i,o,a,r){this._canvas=n,this._dragging=t,this._eventBus=e,this._modeling=i,this._rules=o,this._toolManager=a,this._mouse=r;var l=this;a.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),e.on("spaceTool.selection.end",function(p){e.once("spaceTool.selection.ended",function(){l.activateMakeSpace(p.originalEvent);});}),e.on("spaceTool.move",ede,function(p){var d=p.context,f=d.initialized;f||(f=d.initialized=l.init(p,d)),f&&T6(p);}
948),e.on("spaceTool.end",function(p){var d=p.context,f=d.axis,h=d.direction,g=d.movingShapes,b=d.resizingShapes,w=d.start;if(d.initialized){T6(p);var T={x:0,y:0};T[f]=Qpe(p["d"+f]),l.makeSpace(g,b,T,h,w),e.once("spaceTool.ended",function(O){l.activateSelection(O.originalEvent,!0,!0);});}});}ws.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"];ws.prototype.activateSelection=function(n,t,e){this._dragging.init(n,"spaceTool.selection",{autoActivate:t,cursor:I6,data:{context:{reactivate:e}},trapClick:!1});};ws.prototype.activateMakeSpace=function(n){this._dragging.init(n,"spaceTool",{autoActivate:!0,cursor:I6,data:{context:{}}});};ws.prototype.makeSpace=function(n,t,e,i,o){return this._modeling.createSpace(n,t,e,i,o);};ws.prototype.init=function(n,t){var e=V2(n.dx)>V2(n.dy)?"x":"y",i=n["d"+e],o=n[e]-i;if(V2(i)<5)return!1;i<0&&(i*=-1),Fp(n)&&(i*=-1);var a=S6(e,i),r=this._canvas.getRootElement();!fu(n)&&n.hover&&(r=n.hover);var l=[...$c(r),...(r.attachers||[])],p=this.calculateAdjustments(l,e,i,o),d=this._eventBus.fire("spaceTool.getMinDimensions",{axis:e,direction:a,shapes:p.resizingShapes,start:o}),f=tde(p,e,a,o,d);return me(t,p,{axis:e,direction:a,spaceToolConstraints:f,start:o}),hu("resize-"+(e==="x"?"ew":"ns")),!0;};
948ws.prototype.calculateAdjustments=function(n,t,e,i){var o=this._rules,a=[],r=[],l=new Set(),p=new Set(),d=[],f=[];function h(b){l.has(b)||(l.add(b),a.push(b));var w=b.label;w&&!l.has(w)&&(l.add(w),a.push(w));}function g(b){p.has(b)||(p.add(b),r.push(b));}return ne(n,function(b){if(!(!b.parent||Ut(b))){if(zn(b)){f.push(b);return;}var w=b[t],T=w+b[Jp[t]];if(nde(b)&&(e>0&&Rt(b)[t]>i||e<0&&Rt(b)[t]<i)){d.push(b);return;}if(e>0&&w>i||e<0&&T<i){h(b);return;}if(w<i&&T>i&&o.allowed("shape.resize",{shape:b})){g(b);return;}}}),ne(a,function(b){var w=b.attachers;w&&ne(w,function(T){h(T);});}),ne(d,function(b){var w=b.host;(l.has(w)||p.has(w))&&h(b);}),ne(f,function(b){var w=b.source,T=b.target,O=b.label;(l.has(w)||p.has(w))&&(l.has(T)||p.has(T))&&O&&h(O);}),{movingShapes:a,resizingShapes:r};};ws.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var n=this._mouse.getLastMoveEvent();this.activateSelection(n,!!n);};ws.prototype.isActive=function(){var n=this._dragging.context();return n?/^spaceTool/.test(n.prefix):!1;};function E6(n){return{top:n.top-Uy,right:n.right+Uy,bottom:n.bottom+Uy,left:n.left-Uy};}function T6(n){var t=n.context,e=t.spaceToolConstraints;if(e){var i,o;nn(e.left)&&(i=Math.max(n.x,e.left),n.dx=n.dx+i-n.x,n.x=i),nn(e.right)&&(i=Math.min(n.x,e.right),n.dx=n.dx+i-n.x,n.x=i),nn(e.top)&&(o=Math.max(n.y,e.top),n.dy=n.dy+o-n.y,n.y=o),nn(e.bottom)&&(o=Math.min(n.y,e.bottom),n.dy=n.dy+o-n.y,n.y=o);}}function tde(n,t,e,i,o){var a=n.movingShapes,r=n.resizingShapes;if(r.length){var l={},p,d,f=new Set(a),h=new Set(r);return ne(r,function(g){var b=g.attachers,w=g.children,T=Ot(g),O=Yt(w,function(se){return!zn(se)&&!Ut(se)&&!f.has(se)&&!h.has(se);}),V=Yt(w,function(se){return!zn(se)&&!Ut(se)&&f.has(se);}),j,L,A,J=[],Q=[],te,U,ce,W;O.length&&(L=E6(Ot(Pi(O))),j=i-T[bm[e]]+L[bm[e]],e==="n"?l.bottom=d=nn(d)?Math.min(d,j):j:e==="w"?l.right=d=nn(d)?Math.min(d,j):j:e==="s"?l.top=p=nn(p)?Math.max(p,j):j:e==="e"&&(l.left=p=nn(p)?Math.max(p,j):j)),V.length&&(A=E6(Ot(Pi(V))),j=i-A[bm[Hy[e]]]+T[bm[Hy[e]]],e==="n"?l.bottom=d=nn(d)?Math.min(d,j):j:e==="w"?l.right=d=nn(d)?Math.min(d,j):j:e==="s"?l.top=p=nn(p)?Math.max(p,j):j:e==="e"&&(l.left=p=nn(p)?Math.max(p,j):j)),b&&b.length&&(b.forEach(function(se){f.has(se)?J.push(se):Q.push(se);}),J.length&&(te=Ot(Pi(J.map(Rt))),U=T[bm[Hy[e]]]-(te[bm[Hy[e]]]-i)),Q.length&&(ce=Ot(Pi(Q.map(Rt))),W=ce[bm[e]]-(T[bm[e]]-i)),e==="n"?(j=Math.min(U||1/0,W||1/0),l.bottom=d=nn(d)?Math.min(d,j):j):e==="w"?(j=Math.min(U||1/0,W||1/0),l.right=d=nn(d)?Math.min(d,j):j):e==="s"?(j=Math.max(U||-1/0,W||-1/0),l.top=p=nn(p)?Math.max(p,j):j):e==="e"&&(j=Math.max(U||-1/0,W||-1/0),l.left=p=nn(p)?Math.max(p,j):j));var Y=o&&o[g.id];Y&&(e==="n"?(j=i+g[Jp[t]]-Y[Jp[t]],l.bottom=d=nn(d)?Math.min(d,j):j):e==="w"?(j=i+g[Jp[t]]-Y[Jp[t]],l.right=d=nn(d)?Math.min(d,j):j):e==="s"?(j=i-g[Jp[t]]+Y[Jp[t]],l.top=p=nn(p)?Math.max(p,j):j):e==="e"&&(j=i-g[Jp[t]]+Y[Jp[t]],l.left=p=nn(p)?Math.max(p,j):j));}),l;}}function nde(n){return!!n.host;}
948var G2="djs-dragging",k6="djs-resizing",ide=250,Wy=Math.max;function Xy(n,t,e,i,o){function a(r,l){ne(r,function(p){o.addDragger(p,l),e.addMarker(p,G2);});}n.on("spaceTool.selection.start",function(r){var l=e.getLayer("space"),p=r.context,d={x:"M 0,-10000 L 0,10000",y:"M -10000,0 L 10000,0"},f=xt("g");lt(f,i.cls("djs-crosshair-group",["no-events"])),Kt(l,f);var h=xt("path");lt(h,"d",d.x),En(h).add("djs-crosshair"),Kt(f,h);var g=xt("path");lt(g,"d",d.y),En(g).add("djs-crosshair"),Kt(f,g),p.crosshairGroup=f;}),n.on("spaceTool.selection.move",function(r){var l=r.context.crosshairGroup;Ao(l,r.x,r.y);}),n.on("spaceTool.selection.cleanup",function(r){var l=r.context,p=l.crosshairGroup;p&&Hi(p);}),n.on("spaceTool.move",ide,function(r){var l=r.context,p=l.line,d=l.axis,f=l.movingShapes,h=l.resizingShapes;if(l.initialized){if(!l.dragGroup){var g=e.getLayer("space");p=xt("path"),lt(p,"d","M0,0 L0,0"),En(p).add("djs-crosshair"),Kt(g,p),l.line=p;var b=xt("g");lt(b,i.cls("djs-drag-group",["no-events"])),Kt(e.getActiveLayer(),b),a(f,b);var w=new Set(f);ne(h,function(Q){w.add(Q);});var T=new Set(),O=l.movingConnections=[];w.forEach(function(Q){ne(Q.outgoing,function(te){T.has(te)||!zn(te)||!w.has(te.target)||(T.add(te),O.push(te));});}),a(O,b),l.dragGroup=b;}if(!l.frameGroup){var V=xt("g");lt(V,i.cls("djs-frame-group",["no-events"])),Kt(e.getActiveLayer(),V);var j=[];ne(h,function(Q){var te=o.addFrame(Q,V),U=te.getBBox();j.push({element:te,initialBounds:U}),e.addMarker(Q,k6);}),l.frameGroup=V,l.frames=j;}var L={x:"M"+r.x+", -10000 L"+r.x+", 10000",y:"M -10000, "+r.y+" L 10000, "+r.y};lt(p,{d:L[d]});var A={x:"y",y:"x"},J={x:r.dx,y:r.dy};J[A[l.axis]]=0,Ao(l.dragGroup,J.x,J.y),ne(l.frames,function(Q){var te=Q.element,U=Q.initialBounds,ce,W;l.direction==="e"?lt(te,{width:Wy(U.width+J.x,5)}):(ce=Wy(U.width-J.x,5),lt(te,{width:ce,x:U.x+U.width-ce})),l.direction==="s"?lt(te,{height:Wy(U.height+J.y,5)}):(W=Wy(U.height-J.y,5),lt(te,{height:W,y:U.y+U.height-W}));});}}),n.on("spaceTool.cleanup",function(r){var l=r.context,p=l.movingShapes,d=l.movingConnections,f=l.resizingShapes,h=l.line,g=l.dragGroup,b=l.frameGroup;ne(p,function(w){e.removeMarker(w,G2);}),ne(d,function(w){e.removeMarker(w,G2);}),g&&(Hi(h),Hi(g)),ne(f,function(w){e.removeMarker(w,k6);}),b&&Hi(b);});}Xy.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];var R6={__init__:["spaceToolPreview"],__depends__:[Mr,er,vm,Hl,Zc],spaceTool:["type",ws],spaceToolPreview:["type",Xy]};function Uh(n,t){n.invoke(ws,this),this._canvas=t;}Uh.$inject=["injector","canvas"];Fe(Uh,ws);Uh.prototype.calculateAdjustments=function(n,t,e,i){var o=this._canvas.getRootElement(),a=n[0]===o?null:n[0],r=[];a&&(r=mc(Vc(o.children.filter(d=>z(d,"bpmn:Artifact")),Pi(a))));let l=[...n,...r];var p=ws.prototype.calculateAdjustments.call(this,l,t,e,i);return p.resizingShapes=p.resizingShapes.filter(function(d){return!(z(d,"bpmn:TextAnnotation")||ode(d)&&(t==="y"&&ao(d)||t==="x"&&!ao(d)));}),p;};function ode(n){return z(n,"bpmn:Participant")&&!qe(n).processRef;}var Yy={__depends__:[R6],spaceTool:["type",Uh]};function ea(n,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=n,this._uid=1,n.on(["diagram.destroy","diagram.clear"],function(){this.clear(!1);},this);}ea.$inject=["eventBus","injector"];ea.prototype.execute=function(n,t){if(!n)throw new Error("command required");this._currentExecution.trigger="execute";let e={command:n,context:t};this._pushAction(e),this._internalExecute(e),this._popAction();};ea.prototype.canExecute=function(n,t){let e={command:n,context:t},i=this._getHandler(n),o=this._fire(n,"canExecute",e);if(o===void 0){if(!i)return!1;i.canExecute&&(o=i.canExecute(t));}return o;};ea.prototype.clear=function(n){this._stack.length=0,this._stackIdx=-1,n!==!1&&this._fire("changed",{trigger:"clear"});};ea.prototype.undo=function(){let n=this._getUndoAction(),t;if(n){for(this._currentExecution.trigger="undo",this._pushAction(n);n&&(this._internalUndo(n),t=this._getUndoAction(),!(!t||t.id!==n.id));)n=t;this._popAction();}};ea.prototype.redo=function(){let n=this._getRedoAction(),t;if(n){for(this._currentExecution.trigger="redo",this._pushAction(n);n&&(this._internalExecute(n,!0),t=this._getRedoAction(),!(!t||t.id!==n.id
948));)n=t;this._popAction();}};ea.prototype.register=function(n,t){this._setHandler(n,t);};ea.prototype.registerHandler=function(n,t){if(!n||!t)throw new Error("command and handlerCls must be defined");let e=this._injector.instantiate(t);this.register(n,e);};ea.prototype.canUndo=function(){return!!this._getUndoAction();};ea.prototype.canRedo=function(){return!!this._getRedoAction();};ea.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1];};ea.prototype._getUndoAction=function(){return this._stack[this._stackIdx];};ea.prototype._internalUndo=function(n){let t=n.command,e=n.context,i=this._getHandler(t);this._atomicDo(()=>{this._fire(t,"revert",n),i.revert&&this._markDirty(i.revert(e)),this._revertedAction(n),this._fire(t,"reverted",n);});};ea.prototype._fire=function(n,t,e){arguments.length<3&&(e=t,t=null);let i=t?[n+"."+t,t]:[n],o;e=this._eventBus.createEvent(e);for(let a of i)if(o=this._eventBus.fire("commandStack."+a,e),e.cancelBubble)break;return o;};ea.prototype._createId=function(){return this._uid++;};ea.prototype._atomicDo=function(n){let t=this._currentExecution;t.atomic=!0;try{n();}finally{t.atomic=!1;}};ea.prototype._internalExecute=function(n,t){let e=n.command,i=n.context,o=this._getHandler(e);if(!o)throw new Error("no command handler registered for <"+e+">");this._pushAction(n),t||(this._fire(e,"preExecute",n),o.preExecute&&o.preExecute(i),this._fire(e,"preExecuted",n)),this._atomicDo(()=>{this._fire(e,"execute",n),o.execute&&this._markDirty(o.execute(i)),this._executedAction(n,t),this._fire(e,"executed",n);}),t||(this._fire(e,"postExecute",n),o.postExecute&&o.postExecute(i),this._fire(e,"postExecuted",n)),this._popAction();};ea.prototype._pushAction=function(n){let t=this._currentExecution,e=t.actions,i=e[0];if(t.atomic)throw new Error("illegal invocation in <execute> or <revert> phase (action: "+n.command+")");n.id||(n.id=i&&i.id||this._createId()),e.push(n);};ea.prototype._popAction=function(){let n=this._currentExecution,t=n.trigger,e=n.actions,i=n.dirty;e.pop(),e.length||(this._eventBus.fire("elements.changed",{elements:pM("id",i.reverse())}),i.length=0,this._fire("changed",{trigger:t}),n.trigger=null);};ea.prototype._markDirty=function(n){let t=this._currentExecution;n&&(n=gt(n)?n:[n],t.dirty=t.dirty.concat(n));};ea.prototype._executedAction=function(n,t){let e=++this._stackIdx;t||this._stack.splice(e,this._stack.length,n);};ea.prototype._revertedAction=function(n){this._stackIdx--;};ea.prototype._getHandler=function(n){return this._handlerMap[n];};ea.prototype._setHandler=function(n,t){if(!n||!t)throw new Error("command and handler required");if(this._handlerMap[n])throw new Error("overriding handler for command <"+n+">");this._handlerMap[n]=t;};var N6={commandStack:["type",ea]};function Ul(n,t){if(typeof t!="function")throw new Error("removeFn iterator must be a function");if(!n)return[];for(var e;e=n[0];)t(e);return n;}var ade=250,A6=1400;function Qg(n,t,e){Re.call(this,t);var i=n.get("movePreview",!1);t.on("shape.move.start",A6,function(o){var a=o.context,r=a.shapes,l=a.validatedShapes;a.shapes=D6(r),a.validatedShapes=D6(l);}),i&&t.on("shape.move.start",ade,function(o){var a=o.context,r=new Set(a.shapes),l=new Set();for(let p of r)for(let d of p.labels)!d.hidden&&!r.has(d)&&l.add(d),p.labelTarget&&l.add(p);for(let p of l)i.makeDraggable(a,p,!0);}),this.preExecuted("elements.move",A6,function(o){var a=o.context,r=a.closure,l=r.enclosedElements,p=[];ne(l,function(d){ne(d.labels,function(f){l[f.id]||p.push(f);});}),r.addAll(p);}),this.preExecute(["connection.delete","shape.delete"],function(o){var a=o.context,r=a.connection||a.shape;Ul(r.labels,function(l){e.removeShape(l,{nested:!0});});}),this.execute("shape.delete",function(o){var a=o.context,r=a.shape,l=r.labelTarget;l&&(a.labelTargetIndex=sh(l.labels,r),a.labelTarget=l,r.labelTarget=null);}),this.revert("shape.delete",function(o){var a=o.context,r=a.shape,l=a.labelTarget,p=a.labelTargetIndex;l&&(Ni(l.labels,r,p),r.labelTarget=l);});}Fe(Qg,Re);Qg.$inject=["injector","eventBus","modeling"];function D6(n){var t=new Set(n);return Yt(n,function(e){return!t.has(e.labelTarget);});}var j6={__init__:["labelSupport"],labelSupport:["type",Qg]};var rde=251,L6=1401,z6="attach-ok";function ex(n,t,e,i,o){Re.call(this,t);var a=n.get("movePreview",!1);t.on("shape.move.start",L6,function(r){var l=r.context,p=l.shapes,d=l.validatedShapes;l.shapes=sde(p),l.validatedShapes=lde(d);}),a&&t.on("shape.move.start",rde,function(r){var l=r.context,p=l.shapes,d=q2(p);ne(d,function(f){a.makeDraggable(l,f,!0),ne(f.labels,function(h){a.makeDraggable(l,h,!0);});});}),a&&t.on("shape.move.start",function(r){var l=r.context,p=l.shapes;if(p.length===1){var d=p[0],f=d.host;f&&(e.addMarker(f,z6),t.once(["shape.move.out","shape.move.cleanup"],function(){e.removeMarker(f,z6);}));}}
948),this.preExecuted("elements.move",L6,function(r){var l=r.context,p=l.closure,d=l.shapes,f=q2(d);ne(f,function(h){p.add(h,p.topLevel[h.host.id]);});}),this.postExecuted("elements.move",function(r){var l=r.context,p=l.shapes,d=l.newHost,f;d&&p.length!==1||(d?f=p:f=Yt(p,function(h){var g=h.host;return cde(h)&&!pde(p,g);}),ne(f,function(h){o.updateAttachment(h,d);}));}),this.postExecuted("elements.move",function(r){var l=r.context.shapes;ne(l,function(p){ne(p.attachers,function(d){ne(d.outgoing.slice(),function(f){var h=i.allowed("connection.reconnect",{connection:f,source:f.source,target:f.target});h||o.removeConnection(f);}),ne(d.incoming.slice(),function(f){var h=i.allowed("connection.reconnect",{connection:f,source:f.source,target:f.target});h||o.removeConnection(f);});});});}),this.postExecute("shape.create",function(r){var l=r.context,p=l.shape,d=l.host;d&&o.updateAttachment(p,d);}),this.postExecute("shape.replace",function(r){var l=r.context,p=l.oldShape,d=l.newShape;Ul(p.attachers,function(f){var h=i.allowed("elements.move",{target:d,shapes:[f]});h==="attach"?o.updateAttachment(f,d):o.removeShape(f);}),d.attachers.length&&ne(d.attachers,function(f){var h=T2(f,p,d);o.moveShape(f,h,f.parent);});}),this.postExecute("shape.resize",function(r){var l=r.context,p=l.shape,d=l.oldBounds,f=l.newBounds,h=p.attachers,g=l.hints||{};g.attachSupport!==!1&&ne(h,function(b){var w=T2(b,d,f);o.moveShape(b,w,b.parent),ne(b.labels,function(T){o.moveShape(T,w,T.parent);});});}),this.preExecute("shape.delete",function(r){var l=r.context.shape;Ul(l.attachers,function(p){o.removeShape(p);}),l.host&&o.updateAttachment(l,null);});}Fe(ex,Re);ex.$inject=["injector","eventBus","canvas","rules","modeling"];function q2(n){return oh(sa(n,function(t){return t.attachers||[];}));}function sde(n){var t=q2(n);return dN("id",n,t);}function lde(n){var t=uc(n,"id");return Yt(n,function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent;}return!0;});}function cde(n){return!!n.host;}function pde(n,t){return n.indexOf(t)!==-1;}var F6={__depends__:[er],__init__:["attachSupport"],attachSupport:["type",ex]};function Hs(n){this._model=n;}Hs.$inject=["moddle"];Hs.prototype._needsId=function(n){return en(n,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"]);};Hs.prototype._ensureId=function(n){if(n.id){this._model.ids.claim(n.id,n);return;}var t;z(n,"bpmn:Activity")?t="Activity":z(n,"bpmn:Event")?t="Event":z(n,"bpmn:Gateway")?t="Gateway":en(n,["bpmn:SequenceFlow","bpmn:MessageFlow"])?t="Flow":t=(n.$type||"").replace(/^[^:]*:/g,""),t+="_",!n.id&&this._needsId(n)&&(n.id=this._model.ids.nextPrefixed(t,n));};Hs.prototype.create=function(n,t){var e=this._model.create(n,t||{});return this._ensureId(e),e;};Hs.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()});};Hs.prototype.createDiShape=function(n,t){return this.create("bpmndi:BPMNShape",me({bpmnElement:n,bounds:this.createDiBounds()},t));};Hs.prototype.createDiBounds=function(n){return this.create("dc:Bounds",n);};Hs.prototype.createDiWaypoints=function(n){var t=this;return sa(n,function(e){return t.createDiWaypoint(e);});};Hs.prototype.createDiWaypoint=function(n){return this.create("dc:Point",Za(n,["x","y"]));};Hs.prototype.createDiEdge=function(n,t){return this.create("bpmndi:BPMNEdge",me({bpmnElement:n,waypoint:this.createDiWaypoints([])},t));};Hs.prototype.createDiPlane=function(n,t){return this.create("bpmndi:BPMNPlane",me({bpmnElement:n},t));};function rs(n,t,e){Re.call(this,n),this._bpmnFactory=t;var i=this;function o(b){var w=b.context,T=w.hints||{},O;!w.cropped&&T.createElementsBehavior!==!1&&(O=w.connection,O.waypoints=e.getCroppedWaypoints(O),w.cropped=!0);}this.executed(["connection.layout","connection.create"],o),this.reverted(["connection.layout"],function(b){delete b.context.cropped;});function a(b){var w=b.context;i.updateParent(w.shape||w.connection,w.oldParent);}function r(b){var w=b.context,T=w.shape||w.connection,O=w.parent||w.newParent;i.updateParent(T,O);}this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Us(a)),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Us(r));function l(b){var w=b.context,T=w.oldRoot,O=T.children;ne(O,function(V){z(V,"bpmn:BaseElement")&&i.updateParent(V);});}this.executed(["canvas.updateRoot"],l),this.reverted(["canvas.updateRoot"],l);function p(b){var w=b.context.shape;z(w,"bpmn:BaseElement")&&i.updateBounds(w);}this.executed(["shape.move","shape.create","shape.resize"],Us(function(b){b.context.shape.type!=="label"&&p(b);})),this.reverted(["shape.move","shape.create","shape.resize"],Us(function(b){b.context.shape.type!=="label"&&p(b);})),n.on("shape.changed",function(b){b.element.type==="label"&&p({context:{shape:b.element}});});function d(b){i.updateConnection(b.context);}this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Us(d)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Us(d));function f(b){i.updateConnectionWaypoints(b.context.connection);}this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Us(f)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Us(f)),this.executed("connection.reconnect",Us(function(b){var w=b.context,T=w.connection,O=w.oldSource,V=w.newSource,j=qe(T),L=qe(O),A=qe(V);j.conditionExpression&&!en(A,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(w.oldConditionExpression=j.conditionExpression,delete j.conditionExpression),O!==V&&L.default===j&&(w.oldDefault=L.default,delete L.default);})),this.reverted("connection.reconnect",Us(function(b){var w=b.context,T=w.connection,O=w.oldSource,V=w.newSource,j=qe(T),L=qe(O),A=qe(V);w.oldConditionExpression&&(j.conditionExpression=w.oldConditionExpression),w.oldDefault&&(L.default=w.oldDefault,delete A.default);}));function h(b){i.updateAttachment(b.context);}this.executed(["element.updateAttachment"],Us(h)),this.reverted(["element.updateAttachment"],Us(h)),this.executed("element.updateLabel",Us(g)),this.reverted("element.updateLabel",Us(g));function g(b){let{element:w}=b.context,T=za(w),O=In(w),V=O&&O.get("label");tl(w)||Ch(w)||(T&&!V?O.set("label",t.create("bpmndi:BPMNLabel")):!T&&V&&O.set("label",void 0));}}Fe(rs,Re);rs.$inject=["eventBus","bpmnFactory","connectionDocking"];rs.prototype.updateAttachment=function(n){var t=n.shape,e=t.businessObject,i=t.host;e.attachedToRef=i&&i.businessObject;};rs.prototype.updateParent=function(n,t){if(!Ut(n)&&!(z(n,"bpmn:DataStoreReference")&&n.parent&&z(n.parent,"bpmn:Collaboration"))){var e=n.parent,i=n.businessObject,o=In(n),a=e&&e.businessObject,r=In(e);z(n,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,a,t&&t.businessObject),z(n,"bpmn:DataOutputAssociation")&&(n.source?a=n.source.businessObject:a=null),z(n,"bpmn:DataInputAssociation")&&(n.target?a=n.target.businessObject:a=null),this.updateSemanticParent(i,a),z(n,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,a),this.updateDiParent(o,r);}};rs.prototype.updateBounds=function(n){var t=In(n),e=mde(n);if(e){var i=Sr(e,t.get("bounds"));me(e,{x:n.x+i.x,y:n.y+i.y});}var o=Ut(n)?this._getLabel(t):t,a=o.bounds;a||(a=this._bpmnFactory.createDiBounds(),o.set("bounds",a)),me(a,{x:n.x,y:n.y,width:n.width,height:n.height});};rs.prototype.updateFlowNodeRefs=function(n,t,e){if(e!==t){var i,o;
948z(e,"bpmn:Lane")&&(i=e.get("flowNodeRef"),Ui(i,n)),z(t,"bpmn:Lane")&&(o=t.get("flowNodeRef"),Ni(o,n));}};rs.prototype.updateDiConnection=function(n,t,e){var i=In(n),o=In(t),a=In(e);i.sourceElement&&i.sourceElement.bpmnElement!==qe(t)&&(i.sourceElement=t&&o),i.targetElement&&i.targetElement.bpmnElement!==qe(e)&&(i.targetElement=e&&a);};rs.prototype.updateDiParent=function(n,t){if(t&&!z(t,"bpmndi:BPMNPlane")&&(t=t.$parent),n.$parent!==t){var e=(t||n.$parent).get("planeElement");t?(e.push(n),n.$parent=t):(Ui(e,n),n.$parent=null);}};function dde(n){for(;n&&!z(n,"bpmn:Definitions");)n=n.$parent;return n;}rs.prototype.getLaneSet=function(n){var t,e;return z(n,"bpmn:Lane")?(t=n.childLaneSet,t||(t=this._bpmnFactory.create("bpmn:LaneSet"),n.childLaneSet=t,t.$parent=n),t):(z(n,"bpmn:Participant")&&(n=n.processRef),e=n.get("laneSets"),t=e[0],t||(t=this._bpmnFactory.create("bpmn:LaneSet"),t.$parent=n,e.push(t)),t);};rs.prototype.updateSemanticParent=function(n,t,e){var i;if(n.$parent!==t&&!((z(n,"bpmn:DataInput")||z(n,"bpmn:DataOutput"))&&(z(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),"ioSpecification"in t&&t.ioSpecification===n.$parent))){if(z(n,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(z(n,"bpmn:FlowElement")){if(t){if(z(t,"bpmn:Participant"))t=t.processRef;else if(z(t,"bpmn:Lane"))do t=t.$parent.$parent;while(z(t,"bpmn:Lane"));}i="flowElements";}else if(z(n,"bpmn:Artifact")){for(;t&&!z(t,"bpmn:Process")&&!z(t,"bpmn:SubProcess")&&!z(t,"bpmn:Collaboration");)if(z(t,"bpmn:Participant")){t=t.processRef;break;}else t=t.$parent;i="artifacts";}else if(z(n,"bpmn:MessageFlow"))i="messageFlows";else if(z(n,"bpmn:Participant")){i="participants";var o=n.processRef,a;o&&(a=dde(n.$parent||t),n.$parent&&(Ui(a.get("rootElements"),o),o.$parent=null),t&&(Ni(a.get("rootElements"),o),o.$parent=a));}else z(n,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":z(n,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(`no parent for <${n.id}> in <${t.id}>`);var r;if(n.$parent&&(r=n.$parent.get(i),Ui(r,n)),t?(r=t.get(i),r.push(n),n.$parent=t):n.$parent=null,e){var l=e.get(i);Ui(r,n),t&&(l||(l=[],t.set(i,l)),l.push(n));}}};rs.prototype.updateConnectionWaypoints=function(n){var t=In(n);t.set("waypoint",this._bpmnFactory.createDiWaypoints(n.waypoints));};rs.prototype.updateConnection=function(n){var t=n.connection,e=qe(t),i=t.source,o=qe(i),a=t.target,r=qe(t.target),l;if(z(e,"bpmn:DataAssociation"))z(e,"bpmn:DataInputAssociation")?(e.get("sourceRef")[0]=o,l=n.parent||n.newParent||r,this.updateSemanticParent(e,r,l)):z(e,"bpmn:DataOutputAssociation")&&(l=n.parent||n.newParent||o,this.updateSemanticParent(e,o,l),e.targetRef=r);else{var p=z(e,"bpmn:SequenceFlow");e.sourceRef!==o&&(p&&(Ui(e.sourceRef&&e.sourceRef.get("outgoing"),e),o&&o.get("outgoing")&&o.get("outgoing").push(e)),e.sourceRef=o),e.targetRef!==r&&(p&&(Ui(e.targetRef&&e.targetRef.get("incoming"),e),r&&r.get("incoming")&&r.get("incoming").push(e)),e.targetRef=r);}this.updateConnectionWaypoints(t),this.updateDiConnection(t,i,a);};rs.prototype._getLabel=function(n){return n.label||(n.label=this._bpmnFactory.createDiLabel()),n.label;};function Us(n){return function(t){var e=t.context,i=e.shape||e.connection||e.element;z(i,"bpmn:BaseElement")&&n(t);};}function mde(n){if(z(n,"bpmn:Activity")){var t=In(n);if(t){var e=t.get("label");if(e)return e.get("bounds");}}}var ude={width:100,height:80},fde={width:100,height:80},hde={width:50,height:50},_de={width:36,height:36},gde={width:350,height:200},xde={width:100,height:80},Cde={width:600,height:250},vde={width:250,height:600},bde={width:400,height:60},yde={width:60,height:400},Pde={width:400,height:100},wde={width:36,height:50},Sde={width:50,height:50},Mde={width:100,height:40},Ode={width:300,height:300};function B6(n,t){let e=qe(n);if(t=t||In(n),z(e,"bpmn:SubProcess"))return mn(e,t)?X({},gde):X({},xde);if(z(e,"bpmn:Task"))return X({},fde);if(z(e,"bpmn:Gateway"))return X({},hde);if(z(e,"bpmn:Event"))return X({},_de);if(z(e,"bpmn:Participant")){let i=!t||t.isHorizontal===void 0||t.isHorizontal===!0;return mn(e,t)?i?X({},Cde):X({},vde):i?X({},bde):X({},yde);}
948return z(e,"bpmn:Lane")?X({},Pde):z(e,"bpmn:DataObjectReference")?X({},wde):z(e,"bpmn:DataStoreReference")?X({},Sde):z(e,"bpmn:TextAnnotation")?X({},Mde):z(e,"bpmn:Group")?X({},Ode):X({},ude);}function Qc(n,t){$l.call(this),this._bpmnFactory=n,this._moddle=t;}Fe(Qc,$l);Qc.$inject=["bpmnFactory","moddle"];Qc.prototype._baseCreate=$l.prototype.create;Qc.prototype.create=function(n,t){if(n==="label"){var e=t.di||this._bpmnFactory.createDiLabel();return this._baseCreate(n,me({type:"label",di:e},Wc,t));}return this.createElement(n,t);};Qc.prototype.createElement=function(n,t){t=me({},t||{});var e,i=t.businessObject,o=t.di;if(!i){if(!t.type)throw new Error("no shape type specified");i=this._bpmnFactory.create(t.type);}if(!Tde(o)){var a=me({},o||{},{id:i.id+"_di"});n==="root"?o=this._bpmnFactory.createDiPlane(i,a):n==="connection"?o=this._bpmnFactory.createDiEdge(i,a):o=this._bpmnFactory.createDiShape(i,a);}z(i,"bpmn:Group")&&(t=me({isFrame:!0},t)),t=Ede(i,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&(t=J2(o,t,"isExpanded")),en(i,["bpmn:Lane","bpmn:Participant"])&&(t=J2(o,t,"isHorizontal")),z(i,"bpmn:SubProcess")&&(t.collapsed=!mn(i,o)),z(i,"bpmn:ExclusiveGateway")&&(Ka(o,"isMarkerVisible")?o.isMarkerVisible===void 0&&(o.isMarkerVisible=!1):o.isMarkerVisible=!0),Ko(t.triggeredByEvent)&&(i.triggeredByEvent=t.triggeredByEvent,delete t.triggeredByEvent),Ko(t.cancelActivity)&&(i.cancelActivity=t.cancelActivity,delete t.cancelActivity);var r,l;return t.eventDefinitionType&&(r=i.get("eventDefinitions")||[],l=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),t.eventDefinitionType==="bpmn:ConditionalEventDefinition"&&(l.condition=this._bpmnFactory.create("bpmn:FormalExpression")),r.push(l),l.$parent=i,i.eventDefinitions=r,delete t.eventDefinitionType),e=this.getDefaultSize(i,o),t=me({id:i.id},e,t,{businessObject:i,di:o}),this._baseCreate(n,t);};Qc.prototype.getDefaultSize=function(n,t){return B6(n,t);};Qc.prototype.createParticipantShape=function(n){return eo(n)||(n={isExpanded:n}),n=me({type:"bpmn:Participant"},n||{}),n.isExpanded!==!1&&(n.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(n);};function Ede(n,t,e){return ne(e,function(i){t=J2(n,t,i);}),t;}function J2(n,t,e){return t[e]===void 0?t:(n[e]=t[e],ns(t,[e]));}function Tde(n){return en(n,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"]);}function Wh(n,t){this._modeling=n,this._canvas=t;}Wh.$inject=["modeling","canvas"];Wh.prototype.preExecute=function(n){var t=this._modeling,e=n.elements,i=n.alignment;ne(e,function(o){var a={x:0,y:0};Ko(i.left)?a.x=i.left-o.x:Ko(i.right)?a.x=i.right-o.width-o.x:Ko(i.center)?a.x=i.center-Math.round(o.width/2)-o.x:Ko(i.top)?a.y=i.top-o.y:Ko(i.bottom)?a.y=i.bottom-o.height-o.y:Ko(i.middle)&&(a.y=i.middle-Math.round(o.height/2)-o.y),t.moveElements([o],a,o.parent);});};Wh.prototype.postExecute=function(n){};function Xh(n){this._modeling=n;}Xh.$inject=["modeling"];Xh.prototype.preExecute=function(n){var t=n.source;if(!t)throw new Error("source required");var e=n.target||t.parent,i=n.shape,o=n.hints||{};i=n.shape=this._modeling.createShape(i,n.position,e,{attach:o.attach}),n.shape=i;};Xh.prototype.postExecute=function(n){var t=n.hints||{};Ide(n.source,n.shape)||(t.connectionTarget===n.source?this._modeling.connect(n.shape,n.source,n.connection):this._modeling.connect(n.source,n.shape,n.connection));};function Ide(n,t){return xs(n.outgoing,function(e){return e.target===t;});}function Yh(n,t){this._canvas=n,this._layouter=t;}Yh.$inject=["canvas","layouter"];Yh.prototype.execute=function(n){var t=n.connection,e=n.source,i=n.target,o=n.parent,a=n.parentIndex,r=n.hints;if(!e||!i)throw new Error("source and target required");if(!o)throw new Error("parent required");return t.source=e,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,r)),this._canvas.addConnection(t,o,a),t;};Yh.prototype.revert=function(n){var t=n.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t;};var Ky=Math.round;function tx(n){this._modeling=n;}tx.$inject=["modeling"];tx.prototype.preExecute=function(n){var t=n.elements,e=n.parent,i=n.parentIndex,o=n.position,a=n.hints,r=this._modeling;ne(t,function(h){nn(h.x)||(h.x=0),nn(h.y)||(h.y=0);});var l=Yt(t,function(h){return!h.hidden;}),p=Pi(l);
948ne(t,function(h){zn(h)&&(h.waypoints=sa(h.waypoints,function(g){return{x:Ky(g.x-p.x-p.width/2+o.x),y:Ky(g.y-p.y-p.height/2+o.y)};})),me(h,{x:Ky(h.x-p.x-p.width/2+o.x),y:Ky(h.y-p.y-p.height/2+o.y)});});var d=new Set(Ud(t)),f={};ne(t,function(h){if(zn(h)){f[h.id]=nn(i)?r.createConnection(f[h.source.id],f[h.target.id],i,h,h.parent||e,a):r.createConnection(f[h.source.id],f[h.target.id],h,h.parent||e,a);return;}var g=me({},a);d.has(h)||(g.autoResize=!1),Ut(h)&&(g=ns(g,["attach"])),f[h.id]=nn(i)?r.createShape(h,Za(h,["x","y","width","height"]),h.parent||e,i,g):r.createShape(h,Za(h,["x","y","width","height"]),h.parent||e,g);}),n.elements=mc(f);};var $6=Math.round;function wc(n){this._canvas=n;}wc.$inject=["canvas"];wc.prototype.execute=function(n){var t=n.shape,e=n.position,i=n.parent,o=n.parentIndex;if(!i)throw new Error("parent required");if(!e)throw new Error("position required");return e.width!==void 0?me(t,e):me(t,{x:e.x-$6(t.width/2),y:e.y-$6(t.height/2)}),this._canvas.addShape(t,i,o),t;};wc.prototype.revert=function(n){var t=n.shape;return this._canvas.removeShape(t),t;};function Tu(n){wc.call(this,n);}Fe(Tu,wc);Tu.$inject=["canvas"];var kde=wc.prototype.execute;Tu.prototype.execute=function(n){var t=n.shape;return Nde(t),t.labelTarget=n.labelTarget,kde.call(this,n);};var Rde=wc.prototype.revert;Tu.prototype.revert=function(n){return n.shape.labelTarget=null,Rde.call(this,n);};function Nde(n){["width","height"].forEach(function(t){typeof n[t]>"u"&&(n[t]=0);});}function Iu(n,t){this._canvas=n,this._modeling=t;}Iu.$inject=["canvas","modeling"];Iu.prototype.preExecute=function(n){var t=this._modeling,e=n.connection;Ul(e.incoming,function(i){t.removeConnection(i,{nested:!0});}),Ul(e.outgoing,function(i){t.removeConnection(i,{nested:!0});});};Iu.prototype.execute=function(n){var t=n.connection,e=t.parent;return n.parent=e,n.parentIndex=sh(e.children,t),n.source=t.source,n.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t;};Iu.prototype.revert=function(n){var t=n.connection,e=n.parent,i=n.parentIndex;return t.source=n.source,t.target=n.target,Ni(e.children,t,i),this._canvas.addConnection(t,e),t;};function nx(n,t){this._modeling=n,this._elementRegistry=t;}nx.$inject=["modeling","elementRegistry"];nx.prototype.postExecute=function(n){var t=this._modeling,e=this._elementRegistry,i=n.elements;ne(i,function(o){e.get(o.id)&&(o.waypoints?t.removeConnection(o):t.removeShape(o));});};function ku(n,t){this._canvas=n,this._modeling=t;}ku.$inject=["canvas","modeling"];ku.prototype.preExecute=function(n){var t=this._modeling,e=n.shape;Ul(e.incoming,function(i){t.removeConnection(i,{nested:!0});}),Ul(e.outgoing,function(i){t.removeConnection(i,{nested:!0});}),Ul(e.children,function(i){zn(i)?t.removeConnection(i,{nested:!0}):t.removeShape(i,{nested:!0});});};ku.prototype.execute=function(n){var t=this._canvas,e=n.shape,i=e.parent;return n.oldParent=i,n.oldParentIndex=sh(i.children,e),t.removeShape(e),e;};ku.prototype.revert=function(n){var t=this._canvas,e=n.shape,i=n.oldParent,o=n.oldParentIndex;return Ni(i.children,e,o),t.addShape(e,i),e;};function Kh(n){this._modeling=n;}Kh.$inject=["modeling"];var V6={x:"y",y:"x"};Kh.prototype.preExecute=function(n){var t=this._modeling,e=n.groups,i=n.axis,o=n.dimension;function a(O,V){O.range.min=Math.min(V[i],O.range.min),O.range.max=Math.max(V[i]+V[o],O.range.max);}function r(O){return O[i]+O[o]/2;}function l(O){return O.length-1;}function p(O){return O.max-O.min;}function d(O,V){var j={y:0};j[i]=O-r(V),j[i]&&(j[V6[i]]=0,t.moveElements([V],j,V.parent));}var f=e[0],h=l(e),g=e[h],b,w,T=0;ne(e,function(O,V){var j,L,A;if(O.elements.length<2){V&&V!==e.length-1&&(a(O,O.elements[0]),T+=p(O.range));return;}j=jr(O.elements,i),L=j[0],V===h&&(L=j[l(j)]),A=r(L),O.range=null,ne(j,function(J){if(d(A,J),O.range===null){O.range={min:J[i],max:J[i]+J[o]};return;}a(O,J);}),V&&V!==e.length-1&&(T+=p(O.range));}),w=Math.abs(g.range.min-f.range.max),b=Math.round((w-T)/(e.length-1)),!(b<e.length-1)&&ne(e,function(O,V){var j={},L;O===f||O===g||(L=e[V-1],O.range.max=0,ne(O.elements,function(A,J){j[V6[i]]=0,j[i]=L.range.max-A[i]+b,O.range.min!==A[i]&&(j[i]+=A[i]-O.range.min),j[i]&&t.moveElements([A],j,A.parent),O.range.max=Math.max(A[i]+A[o],J?O.range.max:0);}));});};Kh.prototype.postExecute=function(n){};function Zh(n,t){this._layouter=n,this._canvas=t;}Zh.$inject=["layouter","canvas"];Zh.prototype.execute=function(n){var t=n.connection,e=t.waypoints;return me(n,{oldWaypoints:e}),t.waypoints=this._layouter.layoutConnection(t,n.hints),t;};Zh.prototype.revert=function(n){var t=n.connection;return t.waypoints=n.oldWaypoints,t;};function ix(){}ix.prototype.execute=function(n){var t=n.connection,e=n.delta,i=n.newParent||t.parent,o=n.newParentIndex,a=t.parent;return n.oldParent=a,n.oldParentIndex=Ui(a.children,t),Ni(i.children,t,o),t.parent=i,ne(t.waypoints,function(r){r.x+=e.x,r.y+=e.y,r.original&&(r.original.x+=e.x,r.original.y+=e.y);}),t;};ix.prototype.revert=function(n){var t=n.connection,e=t.parent,i=n.oldParent,o=n.oldParentIndex,a=n.delta;return Ui(e.children,t),Ni(i.children,t,o),t.parent=i,ne(t.waypoints,function(r){r.x-=a.x,r.y-=a.y,r.original&&(r.original.x-=a.x,r.original.y-=a.y);}),t;};function ox(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={};}ox.prototype.add=function(n,t){return this.addAll([n],t);};ox.prototype.addAll=function(n,t){var e=SN(n,!!t,this);return me(this,e),this;};function ym(n){this._modeling=n;}ym.prototype.moveRecursive=function(n,t,e){return n?this.moveClosure(this.getClosure(n),t,e):[];};ym.prototype.moveClosure=function(n,t,e,i,o){var a=this._modeling,r=n.allShapes,l=n.allConnections,p=n.enclosedConnections,d=n.topLevel,f=!1;o&&o.parent===e&&(f=!0),ne(r,function(h){a.moveShape(h,t,d[h.id]&&!f&&e,{recurse:!1,layout:!1});}),ne(l,function(h){var g=!!r[h.source.id],b=!!r[h.target.id];p[h.id]&&g&&b?a.moveConnection(h,t,d[h.id]&&!f&&e):a.layoutConnection(h,{connectionStart:g&&Fh(h,h.source,t),connectionEnd:b&&Bh(h,h.target,t)});});};ym.prototype.getClosure=function(n){return new ox().addAll(n,!0);};function Qh(n){this._helper=new ym(n);}Qh.$inject=["modeling"];Qh.prototype.preExecute=function(n){n.closure=this._helper.getClosure(n.shapes);};Qh.prototype.postExecute=function(n){var t=n.hints,e;t&&t.primaryShape&&(e=t.primaryShape,t.oldParent=e.parent),this._helper.moveClosure(n.closure,n.delta,n.newParent,n.newHost,e);};function Hp(n){this._modeling=n,this._helper=new ym(n);}Hp.$inject=["modeling"];Hp.prototype.execute=function(n){var t=n.shape,e=n.delta,i=n.newParent||t.parent,o=n.newParentIndex,a=t.parent;return n.oldBounds=Za(t,["x","y","width","height"]),n.oldParent=a,n.oldParentIndex=Ui(a.children,t),Ni(i.children,t,o),me(t,{parent:i,x:t.x+e.x,y:t.y+e.y}),t;};Hp.prototype.postExecute=function(n){var t=n.shape,e=n.delta,i=n.hints,o=this._modeling;i.layout!==!1&&(ne(t.incoming,function(a){o.layoutConnection(a,{connectionEnd:Bh(a,t,e)});}),ne(t.outgoing,function(a){o.layoutConnection(a,{connectionStart:Fh(a,t,e)});})),i.recurse!==!1&&this.moveChildren(n);};Hp.prototype.revert=function(n){var t=n.shape,e=n.oldParent,i=n.oldParentIndex,o=n.delta;return Ni(e.children,t,i),me(t,{parent:e,x:t.x-o.x,y:t.y-o.y}),t;};Hp.prototype.moveChildren=function(n){var t=n.delta,e=n.shape;this._helper.moveRecursive(e.children,t,null);};Hp.prototype.getNewParent=function(n){return n.newParent||n.shape.parent;};function Ru(n){this._modeling=n;}Ru.$inject=["modeling"];Ru.prototype.execute=function(n){var t=n.newSource,e=n.newTarget,i=n.connection,o=n.dockingOrPoints;if(!t&&!e)throw new Error("newSource or newTarget required");return gt(o)&&(n.oldWaypoints=i.waypoints,i.waypoints=o),t&&(n.oldSource=i.source,i.source=t),e&&(n.oldTarget=i.target,i.target=e),i;};Ru.prototype.postExecute=function(n){var t=n.connection,e=n.newSource,i=n.newTarget,o=n.dockingOrPoints,a=n.hints||{},r={};a.connectionStart&&(r.connectionStart=a.connectionStart),a.connectionEnd&&(r.connectionEnd=a.connectionEnd),a.layoutConnection!==!1&&(e&&(!i||a.docking==="source")&&(r.connectionStart=r.connectionStart||G6(gt(o)?o[0]:o)),i&&(!e||a.docking==="target")&&(r.connectionEnd=r.connectionEnd||G6(gt(o)?o[o.length-1]:o)),a.newWaypoints&&(r.waypoints=a.newWaypoints),this._modeling.layoutConnection(t,r));};Ru.prototype.revert=function(n){var t=n.oldSource,e=n.oldTarget,i=n.oldWaypoints,o=n.connection;return t&&(o.source=t),e&&(o.target=e),i&&(o.waypoints=i),o;};function G6(n){return n.original||n;}function Sc(n,t){this._modeling=n,this._rules=t;}Sc.$inject=["modeling","rules"];Sc.prototype.preExecute=function(n){var t=this,e=this._modeling,i=this._rules,o=n.oldShape,a=n.newData,r=n.hints||{},l;function p(w,T,O){return i.allowed("connection.reconnect",{connection:O,source:w,target:T});}var d={x:a.x,y:a.y},f={x:o.x,y:o.y,width:o.width,height:o.height};l=n.newShape=n.newShape||t.createShape(a,d,o.parent,r),o.host&&e.updateAttachment(l,o.host);var h;r.moveChildren!==!1&&(h=o.children.slice(),e.moveElements(h,{x:0,y:0},l,r));var g=o.incoming.slice(),b=o.outgoing.slice();ne(g,function(w){var T=w.source,O=p(T,l,w);O&&t.reconnectEnd(w,l,gm(w,l,f),r);}
948),ne(b,function(w){var T=w.target,O=p(l,T,w);O&&t.reconnectStart(w,l,_m(w,l,f),r);});};Sc.prototype.postExecute=function(n){var t=n.oldShape;this._modeling.removeShape(t);};Sc.prototype.execute=function(n){};Sc.prototype.revert=function(n){};Sc.prototype.createShape=function(n,t,e,i){return this._modeling.createShape(n,t,e,i);};Sc.prototype.reconnectStart=function(n,t,e,i){this._modeling.reconnectStart(n,t,e,i);};Sc.prototype.reconnectEnd=function(n,t,e,i){this._modeling.reconnectEnd(n,t,e,i);};function Nu(n){this._modeling=n;}Nu.$inject=["modeling"];Nu.prototype.execute=function(n){var t=n.shape,e=n.newBounds,i=n.minBounds;if(e.x===void 0||e.y===void 0||e.width===void 0||e.height===void 0)throw new Error("newBounds must have {x, y, width, height} properties");if(i&&(e.width<i.width||e.height<i.height))throw new Error("width and height cannot be less than minimum height and width");if(!i&&e.width<10||e.height<10)throw new Error("width and height cannot be less than 10px");return n.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},me(t,{width:e.width,height:e.height,x:e.x,y:e.y}),t;};Nu.prototype.postExecute=function(n){var t=this._modeling,e=n.shape,i=n.oldBounds,o=n.hints||{};o.layout!==!1&&(ne(e.incoming,function(a){t.layoutConnection(a,{connectionEnd:gm(a,e,i)});}),ne(e.outgoing,function(a){t.layoutConnection(a,{connectionStart:_m(a,e,i)});}));};Nu.prototype.revert=function(n){var t=n.shape,e=n.oldBounds;return me(t,{width:e.width,height:e.height,x:e.x,y:e.y}),t;};function ep(n){this._modeling=n;}ep.$inject=["modeling"];ep.prototype.preExecute=function(n){var t=n.delta,e=n.direction,i=n.movingShapes,o=n.resizingShapes,a=n.start,r={};this.moveShapes(i,t),ne(o,function(l){r[l.id]=Dde(l);}),this.resizeShapes(o,t,e),this.updateConnectionWaypoints(M6(i,o),t,e,a,i,o,r);};ep.prototype.execute=function(){};ep.prototype.revert=function(){};ep.prototype.moveShapes=function(n,t){var e=this;ne(n,function(i){e._modeling.moveShape(i,t,null,{autoResize:!1,layout:!1,recurse:!1});});};ep.prototype.resizeShapes=function(n,t,e){var i=this;ne(n,function(o){var a=O6(o,e,t);i._modeling.resizeShape(o,a,null,{attachSupport:!1,autoResize:!1,layout:!1});});};ep.prototype.updateConnectionWaypoints=function(n,t,e,i,o,a,r){var l=this,p=new Set(o),d=new Set(a);ne(n,function(f){var h=f.source,g=f.target,b=Ade(f),w=H6(e),T={},O=p.has(h)||d.has(h),V=p.has(g)||d.has(g);O&&V?(b=sa(b,function(j){return J6(j,i,e)&&(j[w]=j[w]+t[w]),j.original&&J6(j.original,i,e)&&(j.original[w]=j.original[w]+t[w]),j;}),l._modeling.updateWaypoints(f,b,{labelBehavior:!1})):(O||V)&&(p.has(h)?T.connectionStart=Fh(f,h,t):p.has(g)?T.connectionEnd=Bh(f,g,t):d.has(h)?T.connectionStart=_m(f,h,r[h.id]):d.has(g)&&(T.connectionEnd=gm(f,g,r[g.id])),l._modeling.layoutConnection(f,T));});};function q6(n){return me({},n);}function Ade(n){return sa(n.waypoints,function(t){return t=q6(t),t.original&&(t.original=q6(t.original)),t;});}function H6(n){switch(n){case"n":return"y";case"w":return"x";case"s":return"y";case"e":return"x";}}function J6(n,t,e){var i=H6(e);if(/e|s/.test(e))return n[i]>t;if(/n|w/.test(e))return n[i]<t;}function Dde(n){return{x:n.x,y:n.y,height:n.height,width:n.width};}function e_(n){this._modeling=n;}e_.$inject=["modeling"];e_.prototype.execute=function(n){var t=n.shape,e=t.children;n.oldChildrenVisibility=U6(e),t.collapsed=!t.collapsed;var i=W6(e,t.collapsed);return[t].concat(i);};e_.prototype.revert=function(n){var t=n.shape,e=n.oldChildrenVisibility,i=t.children,o=X6(i,e);return t.collapsed=!t.collapsed,[t].concat(o);};function U6(n){var t={};return ne(n,function(e){t[e.id]=e.hidden,e.children&&(t=me({},t,U6(e.children)));}),t;}function W6(n,t){var e=[];return ne(n,function(i){i.hidden=t,e=e.concat(i),i.children&&(e=e.concat(W6(i.children,i.collapsed||t)));}),e;}function X6(n,t){var e=[];return ne(n,function(i){i.hidden=t[i.id],e=e.concat(i),i.children&&(e=e.concat(X6(i.children,t)));}),e;}function t_(n){this._modeling=n;}t_.$inject=["modeling"];t_.prototype.execute=function(n){var t=n.shape,e=n.newHost,i=t.host;return n.oldHost=i,n.attacherIdx=Y6(i,t),K6(e,t),t.host=e,t;};t_.prototype.revert=function(n){var t=n.shape,e=n.newHost,i=n.oldHost,o=n.attacherIdx;return t.host=i,Y6(e,t),K6(i,t,o),t;};function Y6(n,t){return Ui(n&&n.attachers,t);}function K6(n,t,e){if(n){var i=n.attachers;i||(n.attachers=i=[]),Ni(i,t,e);}}function ax(){}ax.prototype.execute=function(n){var t=n.connection,e=n.newWaypoints;
948return n.oldWaypoints=t.waypoints,t.waypoints=e,t;};ax.prototype.revert=function(n){var t=n.connection,e=n.oldWaypoints;return t.waypoints=e,t;};function ro(n,t,e){this._eventBus=n,this._elementFactory=t,this._commandStack=e;var i=this;n.on("diagram.init",function(){i.registerHandlers(e);});}ro.$inject=["eventBus","elementFactory","commandStack"];ro.prototype.getHandlers=function(){return{"shape.append":Xh,"shape.create":wc,"shape.delete":ku,"shape.move":Hp,"shape.resize":Nu,"shape.replace":Sc,"shape.toggleCollapse":e_,spaceTool:ep,"label.create":Tu,"connection.create":Yh,"connection.delete":Iu,"connection.move":ix,"connection.layout":Zh,"connection.updateWaypoints":ax,"connection.reconnect":Ru,"elements.create":tx,"elements.move":Qh,"elements.delete":nx,"elements.distribute":Kh,"elements.align":Wh,"element.updateAttachment":t_};};ro.prototype.registerHandlers=function(n){ne(this.getHandlers(),function(t,e){n.registerHandler(e,t);});};ro.prototype.moveShape=function(n,t,e,i,o){typeof i=="object"&&(o=i,i=null);var a={shape:n,delta:t,newParent:e,newParentIndex:i,hints:o||{}};this._commandStack.execute("shape.move",a);};ro.prototype.updateAttachment=function(n,t){var e={shape:n,newHost:t};this._commandStack.execute("element.updateAttachment",e);};ro.prototype.moveElements=function(n,t,e,i){i=i||{};var o=i.attach,a=e,r;o===!0?(r=e,a=e.parent):o===!1&&(r=null);var l={shapes:n,delta:t,newParent:a,newHost:r,hints:i};this._commandStack.execute("elements.move",l);};ro.prototype.moveConnection=function(n,t,e,i,o){typeof i=="object"&&(o=i,i=void 0);var a={connection:n,delta:t,newParent:e,newParentIndex:i,hints:o||{}};this._commandStack.execute("connection.move",a);};ro.prototype.layoutConnection=function(n,t){var e={connection:n,hints:t||{}};this._commandStack.execute("connection.layout",e);};ro.prototype.createConnection=function(n,t,e,i,o,a){typeof e=="object"&&(a=o,o=i,i=e,e=void 0),i=this._create("connection",i);var r={source:n,target:t,parent:o,parentIndex:e,connection:i,hints:a};return this._commandStack.execute("connection.create",r),r.connection;};ro.prototype.createShape=function(n,t,e,i,o){typeof i!="number"&&(o=i,i=void 0),o=o||{};var a=o.attach,r,l;n=this._create("shape",n),a?(r=e.parent,l=e):r=e;var p={position:t,shape:n,parent:r,parentIndex:i,host:l,hints:o};return this._commandStack.execute("shape.create",p),p.shape;};ro.prototype.createElements=function(n,t,e,i,o){gt(n)||(n=[n]),typeof i!="number"&&(o=i,i=void 0),o=o||{};var a={position:t,elements:n,parent:e,parentIndex:i,hints:o};return this._commandStack.execute("elements.create",a),a.elements;};ro.prototype.createLabel=function(n,t,e,i){e=this._create("label",e);var o={labelTarget:n,position:t,parent:i||n.parent,shape:e};return this._commandStack.execute("label.create",o),o.shape;};ro.prototype.appendShape=function(n,t,e,i,o){o=o||{},t=this._create("shape",t);var a={source:n,position:e,target:i,shape:t,connection:o.connection,connectionParent:o.connectionParent,hints:o};return this._commandStack.execute("shape.append",a),a.shape;};ro.prototype.removeElements=function(n){var t={elements:n};this._commandStack.execute("elements.delete",t);};ro.prototype.distributeElements=function(n,t,e){var i={groups:n,axis:t,dimension:e};this._commandStack.execute("elements.distribute",i);};ro.prototype.removeShape=function(n,t){var e={shape:n,hints:t||{}};this._commandStack.execute("shape.delete",e);};ro.prototype.removeConnection=function(n,t){var e={connection:n,hints:t||{}};this._commandStack.execute("connection.delete",e);};ro.prototype.replaceShape=function(n,t,e){var i={oldShape:n,newData:t,hints:e||{}};return this._commandStack.execute("shape.replace",i),i.newShape;};ro.prototype.alignElements=function(n,t){var e={elements:n,alignment:t};this._commandStack.execute("elements.align",e);};ro.prototype.resizeShape=function(n,t,e,i){var o={shape:n,newBounds:t,minBounds:e,hints:i};this._commandStack.execute("shape.resize",o);};ro.prototype.createSpace=function(n,t,e,i,o){var a={delta:e,direction:i,movingShapes:n,resizingShapes:t,start:o};this._commandStack.execute("spaceTool",a);};ro.prototype.updateWaypoints=function(n,t,e){var i={connection:n,newWaypoints:t,hints:e||{}};this._commandStack.execute("connection.updateWaypoints",i);};ro.prototype.reconnect=function(n,t,e,i,o){var a={connection:n,newSource:t,newTarget:e,dockingOrPoints:i,hints:o||{}};this._commandStack.execute("connection.reconnect",a);};ro.prototype.reconnectStart=function(n,t,e,i){i||(i={}),this.reconnect(n,t,n.target,e,me(i,{docking:"source"}));};ro.prototype.reconnectEnd=function(n,t,e,i){i||(i={}),this.reconnect(n,n.source,t,e,me(i,{docking:"target"}));};ro.prototype.connect=function(n,t,e,i){return this.createConnection(n,t,e||{},n.parent,i);};ro.prototype._create=function(n,t){return QN(t)?t:this._elementFactory.create(n,t);};ro.prototype.toggleCollapse=function(n,t){var e={shape:n,hints:t||{}};this._commandStack.execute("shape.toggleCollapse",e);};function Au(n){this._elementRegistry=n;}Au.$inject=["elementRegistry"];Au.prototype.execute=function(n){var t=n.element,e=n.moddleElement,i=n.properties;if(!e)throw new Error("<moddleElement> required");var o=n.changed||this._getVisualReferences(e).concat(t),a=n.oldProperties||jde(e,ah(i));return Z6(e,i),n.oldProperties=a,n.changed=o,o;};Au.prototype.revert=function(n){var t=n.oldProperties,e=n.moddleElement,i=n.changed;return Z6(e,t),i;};Au.prototype._getVisualReferences=function(n){var t=this._elementRegistry;return z(n,"bpmn:DataObject")?Lde(n,t):[];};
948function jde(n,t){return _a(t,function(e,i){return e[i]=n.get(i),e;},{});}function Z6(n,t){ne(t,function(e,i){n.set(i,e);});}function Lde(n,t){return t.filter(function(e){return z(e,"bpmn:DataObjectReference")&&qe(e).dataObjectRef===n;});}var rx="default",Up="id",Q6="di",zde={width:0,height:0};function Du(n,t,e,i){this._elementRegistry=n,this._moddle=t,this._modeling=e,this._textRenderer=i;}Du.$inject=["elementRegistry","moddle","modeling","textRenderer"];Du.prototype.execute=function(n){var t=n.element,e=[t];if(!t)throw new Error("element required");var i=this._elementRegistry,o=this._moddle.ids,a=t.businessObject,r=Gde(n.properties),l=n.oldProperties||Fde(t,r);return eD(r,a)&&(o.unclaim(a[Up]),i.updateId(t,r[Up]),o.claim(r[Up],a)),rx in r&&(r[rx]&&e.push(i.get(r[rx].id)),a[rx]&&e.push(i.get(a[rx].id))),tD(t,r),n.oldProperties=l,n.changed=e,e;};Du.prototype.postExecute=function(n){var t=n.element,e=t.label,i=e&&qe(e).name;if(i){var o=this._textRenderer.getExternalLabelBounds(e,i);this._modeling.resizeShape(e,o,zde);}};Du.prototype.revert=function(n){var t=n.element,e=n.properties,i=n.oldProperties,o=t.businessObject,a=this._elementRegistry,r=this._moddle.ids;return tD(t,i),eD(e,o)&&(r.unclaim(e[Up]),a.updateId(t,i[Up]),r.claim(i[Up],o)),n.changed;};function eD(n,t){return Up in n&&n[Up]!==t[Up];}function Fde(n,t){var e=ah(t),i=n.businessObject,o=In(n);return _a(e,function(a,r){return r!==Q6?a[r]=i.get(r):a[r]=Bde(o,ah(t.di)),a;},{});}function Bde(n,t){return _a(t,function(e,i){return e[i]=n&&n.get(i),e;},{});}function tD(n,t){var e=n.businessObject,i=In(n);ne(t,function(o,a){a!==Q6?e.set(a,o):i&&$de(i,o);});}function $de(n,t){ne(t,function(e,i){n.set(i,e);});}var Vde=["default"];function Gde(n){var t=me({},n);return Vde.forEach(function(e){e in n&&(t[e]=qe(t[e]));}),t;}function n_(n,t){this._canvas=n,this._modeling=t;}n_.$inject=["canvas","modeling"];n_.prototype.execute=function(n){var t=this._canvas,e=n.newRoot,i=e.businessObject,o=t.getRootElement(),a=o.businessObject,r=a.$parent,l=In(o);return t.setRootElement(e),t.removeRootElement(o),Ni(r.rootElements,i),i.$parent=r,Ui(r.rootElements,a),a.$parent=null,o.di=null,l.bpmnElement=i,e.di=l,n.oldRoot=o,[];};n_.prototype.revert=function(n){var t=this._canvas,e=n.newRoot,i=e.businessObject,o=n.oldRoot,a=o.businessObject,r=i.$parent,l=In(e);return t.setRootElement(o),t.removeRootElement(e),Ui(r.rootElements,i),i.$parent=null,Ni(r.rootElements,a),a.$parent=r,e.di=null,l.bpmnElement=a,o.di=l,[];};function sx(n,t){this._modeling=n,this._spaceTool=t;}sx.$inject=["modeling","spaceTool"];sx.prototype.preExecute=function(n){var t=this._spaceTool,e=this._modeling,i=n.shape,o=n.location,a=zr(i),r=a===i,l=r?i:i.parent,p=rl(l),d=ao(i);if(d?o==="left"?o="top":o==="right"&&(o="bottom"):o==="top"?o="left":o==="bottom"&&(o="right"),!p.length){var f=d?{x:i.x+Js,y:i.y,width:i.width-Js,height:i.height}:{x:i.x,y:i.y+Js,width:i.width,height:i.height-Js};e.createShape({type:"bpmn:Lane",isHorizontal:d},f,l);}var h=[];hc(a,function(A){return h.push(A),A.label&&h.push(A.label),A===i?[]:Yt(A.children,function(J){return J!==i;});});var g,b,w,T,O;o==="top"?(g=-120,b=i.y,w=b+10,T="n",O="y"):o==="left"?(g=-120,b=i.x,w=b+10,T="w",O="x"):o==="bottom"?(g=120,b=i.y+i.height,w=b-10,T="s",O="y"):o==="right"&&(g=120,b=i.x+i.width,w=b-10,T="e",O="x");var V=t.calculateAdjustments(h,O,g,w),j=d?{x:0,y:g}:{x:g,y:0};t.makeSpace(V.movingShapes,V.resizingShapes,j,T,w);var L=d?{x:i.x+(r?Js:0),y:b-(o==="top"?120:0),width:i.width-(r?Js:0),height:120}:{x:b-(o==="left"?120:0),y:i.y+(r?Js:0),width:120,height:i.height-(r?Js:0)};n.newLane=e.createShape({type:"bpmn:Lane",isHorizontal:d},L,l);};function lx(n){this._modeling=n;}lx.$inject=["modeling"];lx.prototype.preExecute=function(n){var t=this._modeling,e=n.shape,i=n.count,o=rl(e),a=o.length;if(a>i)throw new Error(`more than <${i}> child lanes`);var r=ao(e),l=r?e.height:e.width,p=Math.round(l/i),d,f,h,g;for(g=0;g<i;g++)g===i-1?d=l-p*g:d=p,f=r?{x:e.x+Js,y:e.y+g*p,width:e.width-Js,height:d}:{x:e.x+g*p,y:e.y+Js,width:d,height:e.height-Js},g<a?t.resizeShape(o[g],f):(h={type:"bpmn:Lane",isHorizontal:r},t.createShape(h,f,e));};function ju(n,t){this._modeling=n,this._spaceTool=t;}ju.$inject=["modeling","spaceTool"];ju.prototype.preExecute=function(n){var t=n.shape,e=n.newBounds,i=n.balanced;i!==!1?this.resizeBalanced(t,e):this.resizeSpace(t,e);};ju.prototype.resizeBalanced=function(n,t){var e=this._modeling,i=iA(n,t);
948e.resizeShape(n,t),i.forEach(function(o){e.resizeShape(o.shape,o.newBounds);});};ju.prototype.resizeSpace=function(n,t){var e=this._spaceTool,i=Ot(n),o=Ot(t),a=_y(o,i),r=zr(n),l=[],p=[];hc(r,function(w){return l.push(w),(z(w,"bpmn:Lane")||z(w,"bpmn:Participant"))&&p.push(w),w.children;});var d,f,h,g,b;(a.bottom||a.top)&&(d=a.bottom||a.top,f=n.y+(a.bottom?n.height:0)+(a.bottom?-10:10),h=a.bottom?"s":"n",g=a.top>0||a.bottom<0?-d:d,b=e.calculateAdjustments(l,"y",g,f),e.makeSpace(b.movingShapes,b.resizingShapes,{x:0,y:d},h)),(a.left||a.right)&&(d=a.right||a.left,f=n.x+(a.right?n.width:0)+(a.right?-10:100),h=a.right?"e":"w",g=a.left>0||a.right<0?-d:d,b=e.calculateAdjustments(p,"x",g,f),e.makeSpace(b.movingShapes,b.resizingShapes,{x:d,y:0},h));};var cx="flowNodeRef",H2="lanes";function i_(){}i_.prototype._computeUpdates=function(n,t){var e=[],i=[],o={},a=[];function r(f,h){var g=Ot(h),b={x:f.x+f.width/2,y:f.y+f.height/2};return b.x>g.left&&b.x<g.right&&b.y>g.top&&b.y<g.bottom;}function l(f){e.indexOf(f)===-1&&(a.push(f),e.push(f));}function p(f){var h=zr(f);return o[h.id]||(o[h.id]=Dh(h)),o[h.id];}function d(f){if(!f.parent)return[];var h=p(f);return h.filter(function(g){return r(f,g);}).map(function(g){return g.businessObject;});}return t.forEach(function(f){var h=zr(f);if(!(!h||e.indexOf(h)!==-1)){var g=h.children.filter(function(b){return z(b,"bpmn:FlowNode");});g.forEach(l),e.push(h);}}),n.forEach(l),a.forEach(function(f){var h=f.businessObject,g=h.get(H2),b=g.slice(),w=d(f);i.push({flowNode:h,remove:b,add:w});}),t.forEach(function(f){var h=f.businessObject;f.parent||h.get(cx).forEach(function(g){i.push({flowNode:g,remove:[h],add:[]});});}),i;};i_.prototype.execute=function(n){var t=n.updates;return t||(t=n.updates=this._computeUpdates(n.flowNodeShapes,n.laneShapes)),t.forEach(function(e){var i=e.flowNode,o=i.get(H2);e.remove.forEach(function(a){Ui(o,a),Ui(a.get(cx),i);}),e.add.forEach(function(a){Ni(o,a),Ni(a.get(cx),i);});}),[];};i_.prototype.revert=function(n){var t=n.updates;return t.forEach(function(e){var i=e.flowNode,o=i.get(H2);e.add.forEach(function(a){Ui(o,a),Ui(a.get(cx),i);}),e.remove.forEach(function(a){Ni(o,a),Ni(a.get(cx),i);});}),[];};var W2="categoryValueRef";function Lu(n,t){this._bpmnFactory=n,this._elementRegistry=t;}Lu.$inject=["bpmnFactory","elementRegistry"];Lu.prototype._computeUpdates=function(n,t){var e=this._elementRegistry,i=this._bpmnFactory,o=new Map(),a=[],r=new Map();function l(j,L,A){if(L){var J=r.get(j);J||(J={},r.set(j,J)),!(A&&J.present)&&(!A&&J.past||(A?J.present={categoryValue:L,root:U2(j)}:J.past={categoryValue:L}));}}function p(j){o.set(j,qe(j));}function d(){e.filter(function(j){return z(j,"bpmn:FlowElement")&&!Ut(j)&&j.parent;}).forEach(p);}function f(j){var L=qe(j),A=L.get("categoryValueRef");return A||(A=py(i,L),a.push(qde(j,A))),A;}function h(j){return j.reduce(function(L,A){var J=U2(A),Q=L.get(J);return Q||(Q=[],L.set(J,Q)),Q.push(A),L;},new Map());}n=Array.from(n||[]);var g=h(n);t.length&&d(),n.forEach(p),e.filter(function(j){return z(j,"bpmn:Group")&&!Ut(j)&&j.parent;}).forEach(function(j){var L=qe(j).get("categoryValueRef");if(!L){var A=U2(j),J=g.get(A)||[],Q=Vc(J,j),te=Object.keys(Q).length>0;te&&(L=f(j));}l(j,L,!0);}),t.forEach(function(j){l(j.groupShape,j.categoryValue,!1);}),a.length&&d();var b=Array.from(o.keys()),w=Array.from(r.values()).reduce(function(j,L){return L.present&&j.add(L.present.categoryValue),L.past&&j.add(L.past.categoryValue),j;},new Set()),T=new Map(),O=h(b);r.forEach(function(j,L){var A=j.present;if(A){var J=O.get(A.root)||[],Q=Vc(J,L);J.forEach(function(te){if(Q[te.id]){var U=T.get(te);U||(U=new Set(),T.set(te,U)),U.add(A.categoryValue);}});}});var V=b.reduce(function(j,L){var A=o.get(L),J=A.get(W2),Q=new Set(J),te=T.get(L)||new Set(),U=Array.from(te).filter(function(W){return!Q.has(W);}),ce=J.filter(function(W){return w.has(W)&&!te.has(W);});return(U.length||ce.length)&&j.push({businessObject:A,categoryValuesToAdd:U,categoryValuesToRemove:ce}),j;},[]);return{flowElements:V,groups:a};};Lu.prototype.execute=function(n){var t=n.updates;return t||(t=n.updates=this._computeUpdates(n.affectedFlowElements,n.affectedGroupEntries)),Jde(t.groups),Ude(t.flowElements),[];};Lu.prototype.revert=function(n){var t=n.updates;return Wde(t.flowElements),Hde(t.groups),[];};function qde(n,t){return{groupShape:n,categoryValue:t,category:t.$parent};}
948function Jde(n){n.forEach(function(t){qe(t.groupShape).categoryValueRef=t.categoryValue,t.categoryValue.$parent=t.category;});}function Hde(n){n.forEach(function(t){qe(t.groupShape).categoryValueRef=null;});}function Ude(n){n.forEach(function(t){var e=t.businessObject,i=e.get(W2);t.categoryValuesToRemove.forEach(function(o){Ui(i,o);}),t.categoryValuesToAdd.forEach(function(o){Ni(i,o,!0);});});}function Wde(n){n.forEach(function(t){var e=t.businessObject,i=e.get(W2);t.categoryValuesToAdd.forEach(function(o){Ui(i,o);}),t.categoryValuesToRemove.forEach(function(o){Ni(i,o,!0);});});}function U2(n){for(;n.parent;)n=n.parent;return n;}function o_(n){this._moddle=n;}o_.$inject=["moddle"];o_.prototype.execute=function(n){var t=this._moddle.ids,e=n.id,i=n.element,o=n.claiming;return o?t.claim(e,i):t.unclaim(e),[];};o_.prototype.revert=function(n){var t=this._moddle.ids,e=n.id,i=n.element,o=n.claiming;return o?t.unclaim(e):t.claim(e,i),[];};var Xde={fill:void 0,stroke:void 0};function px(n){this._commandStack=n,this._normalizeColor=function(t){if(t){if(ka(t)){var e=Yde(t);if(e)return e;}throw new Error(`invalid color value: ${t}`);}};}px.$inject=["commandStack"];px.prototype.postExecute=function(n){var t=n.elements,e=n.colors||Xde,i=this,o={};"fill"in e&&me(o,{"background-color":this._normalizeColor(e.fill)}),"stroke"in e&&me(o,{"border-color":this._normalizeColor(e.stroke)}),ne(t,function(a){var r=zn(a)?Za(o,["border-color"]):o,l=In(a);if(Kde(r),Ut(a)){if(!l||!z(l.label,"bpmndi:BPMNLabel"))return;i._commandStack.execute("element.updateModdleProperties",{element:a,moddleElement:l.label,properties:{color:o["border-color"]}});}else{if(!en(l,["bpmndi:BPMNEdge","bpmndi:BPMNShape"]))return;i._commandStack.execute("element.updateProperties",{element:a,properties:{di:r}});}});};function Yde(n){var t=document.createElement("canvas").getContext("2d");return t.fillStyle="transparent",t.fillStyle=n,/^#[0-9a-fA-F]{6}$/.test(t.fillStyle)?t.fillStyle:null;}function Kde(n){"border-color"in n&&(n.stroke=n["border-color"]),"background-color"in n&&(n.fill=n["background-color"]);}var Zde={width:0,height:0};function Zy(n,t,e){function i(p,d){var f=p.label||p,h=p.labelTarget||p;return R4(f,d,h!==f),[f,h];}function o(p){var d=p.element,f=d.businessObject,h=p.newLabel;if(!Ut(d)&&tl(d)&&!nm(d)&&!nD(h)){var g=7,b=U0(d);b={x:b.x,y:b.y+g},n.createLabel(d,b,{id:f.id+"_label",businessObject:f,di:d.di});}}function a(p){return p.oldLabel=za(p.element),i(p.element,p.newLabel);}function r(p){return i(p.element,p.oldLabel);}function l(p){var d=p.element,f=d.label||d,h=p.newLabel,g=p.newBounds,b=p.hints||{};if(!(!Ut(f)&&!z(f,"bpmn:TextAnnotation"))){if(Ut(f)&&nD(h)){b.removeShape!==!1&&n.removeShape(f,{unsetLabel:!1});return;}var w=za(d);typeof g>"u"&&(g=t.getExternalLabelBounds(f,w)),g&&n.resizeShape(f,g,Zde);}}this.preExecute=o,this.execute=a,this.revert=r,this.postExecute=l;}Zy.$inject=["modeling","textRenderer","bpmnFactory"];function nD(n){return!n||!n.trim();}function nr(n,t,e,i){ro.call(this,n,t,e),this._bpmnRules=i;}Fe(nr,ro);nr.$inject=["eventBus","elementFactory","commandStack","bpmnRules"];nr.prototype.getHandlers=function(){var n=ro.prototype.getHandlers.call(this);return n["element.updateModdleProperties"]=Au,n["element.updateProperties"]=Du,n["canvas.updateRoot"]=n_,n["lane.add"]=sx,n["lane.resize"]=ju,n["lane.split"]=lx,n["lane.updateRefs"]=i_,n["group.updateRefs"]=Lu,n["id.updateClaim"]=o_,n["element.setColor"]=px,n["element.updateLabel"]=Zy,n;};nr.prototype.updateLabel=function(n,t,e,i){this._commandStack.execute("element.updateLabel",{element:n,newLabel:t,newBounds:e,hints:i||{}});};nr.prototype.connect=function(n,t,e,i){var o=this._bpmnRules;if(e||(e=o.canConnect(n,t)),!!e)return this.createConnection(n,t,e,n.parent,i);};nr.prototype.updateModdleProperties=function(n,t,e){this._commandStack.execute("element.updateModdleProperties",{element:n,moddleElement:t,properties:e});};nr.prototype.updateProperties=function(n,t){this._commandStack.execute("element.updateProperties",{element:n,properties:t});};nr.prototype.resizeLane=function(n,t,e){this._commandStack.execute("lane.resize",{shape:n,newBounds:t,balanced:e});};nr.prototype.addLane=function(n,t){var e={shape:n,location:t};return this._commandStack.execute("lane.add",e),e.newLane;};
948nr.prototype.splitLane=function(n,t){this._commandStack.execute("lane.split",{shape:n,count:t});};nr.prototype.makeCollaboration=function(){var n=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:n};return this._commandStack.execute("canvas.updateRoot",t),n;};nr.prototype.makeProcess=function(){var n=this._create("root",{type:"bpmn:Process"}),t={newRoot:n};return this._commandStack.execute("canvas.updateRoot",t),n;};nr.prototype.updateLaneRefs=function(n,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:n,laneShapes:t});};nr.prototype.updateCategoryValueRefs=function(n,t){this._commandStack.execute("group.updateRefs",{affectedFlowElements:n,affectedGroupEntries:t});};nr.prototype.claimId=function(n,t){this._commandStack.execute("id.updateClaim",{id:n,element:t,claiming:!0});};nr.prototype.unclaimId=function(n,t){this._commandStack.execute("id.updateClaim",{id:n,element:t});};nr.prototype.setColor=function(n,t){n.length||(n=[n]),this._commandStack.execute("element.setColor",{elements:n,colors:t});};function Qy(){}Qy.prototype.layoutConnection=function(n,t){return t=t||{},[t.connectionStart||Rt(t.source||n.source),t.connectionEnd||Rt(t.target||n.target)];};var eP=20,Qde=5,tP=Math.round,iD=20,eme={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function tme(n,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(n);}function nme(n,t){return{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[n].test(t);}function sD(n,t,e){var i=Jo(t,n,Qde),o=e.split(":")[0],a=tP((t.x-n.x)/2+n.x),r=tP((t.y-n.y)/2+n.y),l,p,d=nme(o,i),f=/h|r|l/.test(o),h=!1,g=!1;return d?(l=f?{x:a,y:n.y}:{x:n.x,y:r},p=f?"h:h":"v:v"):(h=tme(i,o),p=f?"h:v":"v:h",h?f?(g=r===n.y,l={x:n.x+eP*(/l/.test(o)?-1:1),y:g?r+eP:r}):(g=a===n.x,l={x:g?a+eP:a,y:n.y+eP*(/t/.test(o)?-1:1)}):l={x:a,y:r}),{waypoints:X2(n,l,p).concat(l),directions:p,turnNextDirections:g};}function ime(n,t,e){return sD(n,t,e);}function ome(n,t,e){var i=sD(t,n,oD(e));return{waypoints:i.waypoints.slice().reverse(),directions:oD(i.directions),turnNextDirections:i.turnNextDirections};}function ame(n,t){var e=n.directions.split(":")[1],i=t.directions.split(":")[0];n.turnNextDirections&&(e=e=="h"?"v":"h"),t.turnNextDirections&&(i=i=="h"?"v":"h");var o=e+":"+i,a=X2(n.waypoints[n.waypoints.length-1],t.waypoints[0],o);return{waypoints:a,directions:o};}function oD(n){return n.split(":").reverse().join(":");}function rme(n,t,e){var i=tP((t.x-n.x)/2+n.x),o=tP((t.y-n.y)/2+n.y);if(e==="h:v")return[{x:t.x,y:n.y}];if(e==="v:h")return[{x:n.x,y:t.y}];if(e==="h:h")return[{x:i,y:n.y},{x:i,y:t.y}];if(e==="v:v")return[{x:n.x,y:o},{x:t.x,y:o}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]");}function X2(n,t,e){if(e=e||"h:h",!fme(e))throw new Error("unknown directions: <"+e+">: must be specified as <start>:<end> with start/end in { h,v,t,r,b,l }");if(cD(e)){var i=ime(n,t,e),o=ome(n,t,e),a=ame(i,o);return[].concat(i.waypoints,a.waypoints,o.waypoints);}return rme(n,t,e);}function sme(n,t,e){var i=X2(n,t,e);return i.unshift(n),i.push(t),K2(i);}function lme(n,t,e,i,o){var a=o&&o.preferredLayouts||[],r=cN(a,"straight")[0]||"h:h",l=eme[r]||0,p=Jo(n,t,l),d=ume(p,r);e=e||Rt(n),i=i||Rt(t);var f=d.split(":"),h=rD(e,n,f[0],hme(p)),g=rD(i,t,f[1],p);return sme(h,g,d);}function lD(n,t,e,i,o,a){gt(e)&&(o=e,a=i,e=Rt(n),i=Rt(t)),a=me({preferredLayouts:[]},a),o=o||[];var r=a.preferredLayouts,l=r.indexOf("straight")!==-1,p;return p=l&&pme(n,t,e,i,a),p||(p=a.connectionEnd&&mme(t,n,i,o),p)||(p=a.connectionStart&&dme(n,t,e,o),p)?p:!a.connectionStart&&!a.connectionEnd&&o&&o.length?o:lme(n,t,e,i,a);}function cme(n,t,e){return n>=t&&n<=e;}function aD(n,t,e){var i={x:"width",y:"height"};return cme(t[n],e[n],e[n]+e[i[n]]);}function pme(n,t,e,i,o){var a={},r,l;return l=Jo(n,t),/^(top|bottom|left|right)$/.test(l)?(/top|bottom/.test(l)&&(r="x"),/left|right/.test(l)&&(r="y"),o.preserveDocking==="target"?aD(r,i,n)?(a[r]=i[r],[{x:a.x!==void 0?a.x:e.x,y:a.y!==void 0?a.y:e.y,original:{x:a.x!==void 0?a.x:e.x,y:a.y!==void 0?a.y:e.y}},{x:i.x,y:i.y}]):null:aD(r,e,t)?(a[r]=e[r],[{x:e.x,y:e.y},{x:a.x!==void 0?a.x:i.x,y:a.y!==void 0?a.y:i.y,original:{x:a.x!==void 0?a.x:i.x,y:a.y!==void 0?a.y:i.y}}]):null):null;}function dme(n,t,e,i){return Y2(n,t,e,i);}function mme(n,t,e,i){var o=i.slice().reverse();return o=Y2(n,t,e,o),o?o.reverse():null;}function Y2(n,t,e,i){function o(f){return f.length<3?!0:f.length>4?!1:!!$n(f,function(h,g){var b=f[g-1];return b&&Wd(h,b)<3;});}function a(f,h,g){var b=$s(h,f);switch(b){case"v":return{x:g.x,y:f.y};case"h":return{x:f.x,y:g.y};}return{x:f.x,y:f.y};}function r(f,h,g){var b;for(b=f.length-2;b!==0;b--)if(SM(f[b],h,iD)||SM(f[b],g,iD))return f.slice(b);return f;}if(o(i))return null;var l=i[0],p=i.slice(),d;return p[0]=e,p[1]=a(p[1],l,e),d=r(p,n,t),d!==p&&(p=Y2(n,t,e,d)),p&&$s(p)?null:p;}function ume(n,t){if(cD(t))return t;switch(n){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t;}}function fme(n){return n&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(n);}function cD(n){return n&&/t|r|b|l/.test(n);}
948function hme(n){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[n];}function rD(n,t,e,i){if(e==="h"&&(e=/left/.test(i)?"l":"r"),e==="v"&&(e=/top/.test(i)?"t":"b"),e==="t")return{original:n,x:n.x,y:t.y};if(e==="r")return{original:n,x:t.x+t.width,y:n.y};if(e==="b")return{original:n,x:n.x,y:t.y+t.height};if(e==="l")return{original:n,x:t.x,y:n.y};throw new Error("unexpected dockingDirection: <"+e+">");}function K2(n){return n.reduce(function(t,e,i){var o=t[t.length-1],a=n[i+1];return lh(o,a,e,0)||t.push(e),t;},[]);}var _me=-10,gme=40,xme={default:["h:h"],fromGateway:["v:h"],toGateway:["h:v"],loop:{fromTop:["t:r"],fromRight:["r:b"],fromLeft:["l:t"],fromBottom:["b:l"]},boundaryLoop:{alternateHorizontalSide:"b",alternateVerticalSide:"l",default:"v"},messageFlow:["straight","v:v"],subProcess:["straight","h:h"],isHorizontal:!0},Cme={default:["v:v"],fromGateway:["h:v"],toGateway:["v:h"],loop:{fromTop:["t:l"],fromRight:["r:t"],fromLeft:["l:b"],fromBottom:["b:r"]},boundaryLoop:{alternateHorizontalSide:"t",alternateVerticalSide:"r",default:"h"},messageFlow:["straight","h:h"],subProcess:["straight","v:v"],isHorizontal:!1},Q2={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},dx={top:"t",right:"r",bottom:"b",left:"l"};function s_(n){this._elementRegistry=n;}Fe(s_,Qy);s_.prototype.layoutConnection=function(n,t){t||(t={});var e=t.source||n.source,i=t.target||n.target,o=t.waypoints||n.waypoints,a=t.connectionStart,r=t.connectionEnd,l=this._elementRegistry,p,d;if(a||(a=pD(o&&o[0],e)),r||(r=pD(o&&o[o.length-1],i)),(z(n,"bpmn:Association")||z(n,"bpmn:DataAssociation"))&&o&&!dD(e,i))return[].concat([a],o.slice(1,-1),[r]);var f=Gb(e,l)?xme:Cme;return z(n,"bpmn:MessageFlow")?p=bme(e,i,f):(z(n,"bpmn:SequenceFlow")||dD(e,i))&&(e===i?p={preferredLayouts:Ome(e,n,f)}:z(e,"bpmn:BoundaryEvent")?p={preferredLayouts:Eme(e,i,r,f)}:mx(e)||mx(i)?p={preferredLayouts:f.subProcess,preserveDocking:Pme(e)}:z(e,"bpmn:Gateway")?p={preferredLayouts:f.fromGateway}:z(i,"bpmn:Gateway")?p={preferredLayouts:f.toGateway}:p={preferredLayouts:f.default}),p&&(p=me(p,t),d=K2(lD(e,i,a,r,o,p))),d||[a,r];};function vme(n){var t=n.host;return Jo(Rt(n),t,_me);}function bme(n,t,e){return{preferredLayouts:e.messageFlow,preserveDocking:yme(n,t)};}function yme(n,t){return z(t,"bpmn:Participant")?"source":z(n,"bpmn:Participant")?"target":mx(t)?"source":mx(n)||z(t,"bpmn:Event")?"target":z(n,"bpmn:Event")?"source":null;}function Pme(n){return mx(n)?"target":"source";}function pD(n,t){return n?n.original||n:Rt(t);}function dD(n,t){return z(t,"bpmn:Activity")&&z(n,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation;}function mx(n){return z(n,"bpmn:SubProcess")&&mn(n);}function zu(n,t){return n===t;}function wme(n,t){return t.indexOf(n)!==-1;}function a_(n){var t=/right|left/.exec(n);return t&&t[0];}function r_(n){var t=/top|bottom/.exec(n);return t&&t[0];}function mD(n,t){return Q2[n]===t;}function Sme(n,t){var e=a_(n),i=Q2[e];return t.indexOf(i)!==-1;}function Mme(n,t){var e=r_(n),i=Q2[e];return t.indexOf(i)!==-1;}function fD(n){return n==="right"||n==="left";}function Ome(n,t,e){var i=t.waypoints,o=i&&i.length&&Jo(i[0],n);return o==="top"?e.loop.fromTop:o==="right"?e.loop.fromRight:o==="left"?e.loop.fromLeft:e.loop.fromBottom;}function Eme(n,t,e,i){var o=Rt(n),a=Rt(t),r=vme(n),l,p,d=zu(n.host,t),f=wme(r,["top","right","bottom","left"]),h=Jo(a,o,{x:n.width/2+t.width/2,y:n.height/2+t.height/2});return d?Tme(r,f,n,t,e,i):(l=Ime(r,h,f,i.isHorizontal),p=kme(r,h,f,i.isHorizontal),[l+":"+p]);}function Tme(n,t,e,i,o,a){var r=t?n:a.isHorizontal?r_(n):a_(n),l=dx[r],p;return t?fD(n)?p=uD("y",e,i,o)?"h":a.boundaryLoop.alternateHorizontalSide:p=uD("x",e,i,o)?"v":a.boundaryLoop.alternateVerticalSide:p=a.boundaryLoop.default,[l+":"+p];}function uD(n,t,e,i){var o=gme;return!(Z2(n,i,e,o)||Z2(n,i,{x:e.x+e.width,y:e.y+e.height},o)||Z2(n,i,Rt(t),o));}function Z2(n,t,e,i){return Math.abs(t[n]-e[n])<i;}function Ime(n,t,e,i){if(e)return dx[n];var o=r_(n),a=a_(n),r=r_(t),l=a_(t);if(i){if(zu(o,r)||mD(a,l))return dx[o];}else if(zu(a,l)||mD(o,r))return dx[a];return dx[i?a:o];}function kme(n,t,e,i){if(e)return fD(n)?Sme(n,t)||zu(n,t)?"h":"v":Mme(n,t)||zu(n,t)?"v":"h";var o=r_(n),a=a_(n),r=r_(t),l=a_(t);return r&&!l?"v":l&&!r?"h":i?zu(o,r)?"h":"v":zu(a,l)?"v":"h";}s_.$inject=["elementRegistry"];function hD(n){return me({original:n.point.original||n.point},n.actual);}function tp(n,t){this._elementRegistry=n,this._graphicsFactory=t;}tp.$inject=["elementRegistry","graphicsFactory"];tp.prototype.getCroppedWaypoints=function(n,t,e){t=t||n.source,e=e||n.target;var i=this.getDockingPoint(n,t,!0),o=this.getDockingPoint(n,e),a=n.waypoints.slice(i.idx+1,o.idx);return a.unshift(hD(i)),a.push(hD(o)),a;};tp.prototype.getDockingPoint=function(n,t,e){var i=n.waypoints,o,a,r;return o=e?0:i.length-1,a=i[o],r=this._getIntersection(t,n,e),{point:a,actual:r||a,idx:o};};tp.prototype._getIntersection=function(n,t,e){var i=this._getShapePath(n),o=this._getConnectionPath(t);return Zd(i,o,e);};tp.prototype._getConnectionPath=function(n){return this._graphicsFactory.getConnectionPath(n);};tp.prototype._getShapePath=function(n){return this._graphicsFactory.getShapePath(n);};tp.prototype._getGfx=function(n){return this._elementRegistry.getGraphics(n);};
948var nP={__init__:["modeling","bpmnUpdater"],__depends__:[$A,l6,c6,p6,Jy,N6,j6,F6,la,xh,Yy],bpmnFactory:["type",Hs],bpmnUpdater:["type",rs],elementFactory:["type",Qc],modeling:["type",nr],layouter:["type",s_],connectionDocking:["type",tp]};var _D=Math.round;function l_(n,t,e,i,o,a){this._complexPreview=n,this._connectionDocking=t,this._elementFactory=e,this._eventBus=i,this._layouter=o,this._rules=a;}l_.prototype.create=function(n,t,e){let i=this._complexPreview,o=this._connectionDocking,a=this._elementFactory,r=this._eventBus,l=this._layouter,p=this._rules,d=a.createShape(me({type:t},e)),f=r.fire("autoPlace",{source:n,shape:d});if(!f)return;me(d,{x:f.x-_D(d.width/2),y:f.y-_D(d.height/2)});let h=p.allowed("connection.create",{source:n,target:d,hints:{targetParent:n.parent}}),g=null;h&&(g=a.createConnection(h),g.waypoints=l.layoutConnection(g,{source:n,target:d}),g.waypoints=o.getCroppedWaypoints(g,n,d)),i.create({created:[d,g].filter(b=>!Ep(b))});};l_.prototype.cleanUp=function(){this._complexPreview.cleanUp();};l_.$inject=["complexPreview","connectionDocking","elementFactory","eventBus","layouter","rules"];var gD={__depends__:[Oh,V5,nP],__init__:["appendPreview"],appendPreview:["type",l_]};var xD=Math.min,CD=Math.max;function eO(n){n.preventDefault();}function ux(n){n.stopPropagation();}function Rme(n){return n.nodeType===Node.TEXT_NODE;}function Nme(n){return[].slice.call(n);}function sl(n){this.container=n.container,this.parent=ri('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),this.content=si("[contenteditable]",this.parent),this.keyHandler=n.keyHandler||function(){},this.resizeHandler=n.resizeHandler||function(){},this.focusoutHandler=n.focusoutHandler||function(){},this.autoResize=Ra(this.autoResize,this),this.handlePaste=Ra(this.handlePaste,this);}sl.prototype.create=function(n,t,e,i){var o=this,a=this.parent,r=this.content,l=this.container;i=this.options=i||{},t=this.style=t||{};var p=Za(t,["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);me(a.style,{width:n.width+"px",height:n.height+"px",maxWidth:n.maxWidth+"px",maxHeight:n.maxHeight+"px",minWidth:n.minWidth+"px",minHeight:n.minHeight+"px",left:n.x+"px",top:n.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},p);var d=Za(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return me(r.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},d),i.centerVertically&&me(r.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},d),r.innerText=e,Cn.bind(r,"keydown",this.keyHandler),Cn.bind(r,"mousedown",ux),Cn.bind(r,"paste",o.handlePaste),Cn.bind(r,"focusout",this.focusoutHandler),i.autoResize&&Cn.bind(r,"input",this.autoResize),i.resizable&&this.resizable(t),l.appendChild(a),this.setSelection(r.lastChild,r.lastChild&&r.lastChild.length),a;};sl.prototype.handlePaste=function(n){var t=this.options,e=this.style;n.preventDefault();var i;if(n.clipboardData?i=n.clipboardData.getData("text/plain"):i=window.clipboardData.getData("Text"),this.insertText(i),t.autoResize){var o=this.autoResize(e);o&&this.resizeHandler(o);}};sl.prototype.insertText=function(n){n=Ame(n);var t=document.execCommand("insertText",!1,n);t||this._insertTextIE(n);};sl.prototype._insertTextIE=function(n){var t=this.getSelection(),e=t.startContainer,i=t.endContainer,o=t.startOffset,a=t.endOffset,r=t.commonAncestorContainer,l=Nme(r.childNodes),p,d;if(Rme(r)){var f=e.textContent;e.textContent=f.substring(0,o)+n+f.substring(a),p=e,d=o+n.length;}else if(e===this.content&&i===this.content){var h=document.createTextNode(n);this.content.insertBefore(h,l[o]),p=h,d=h.textContent.length;}else{var g=l.indexOf(e),b=l.indexOf(i);l.forEach(function(w,T){T===g?w.textContent=e.textContent.substring(0,o)+n+i.textContent.substring(a):T>g&&T<=b&&Cs(w);}),p=e,d=o+n.length;}p&&d!==void 0&&setTimeout(function(){self.setSelection(p,d);});};sl.prototype.autoResize=function(){var n=this.parent,t=this.content,e=parseInt(this.style.fontSize)||12;if(t.scrollHeight>n.offsetHeight||t.scrollHeight<n.offsetHeight-e){var i=n.getBoundingClientRect(),o=t.scrollHeight;n.style.height=o+"px",this.resizeHandler({width:i.width,height:i.height,dx:0,dy:o-i.height});}};sl.prototype.resizable=function(){var n=this,t=this.parent,e=this.resizeHandle,i=parseInt(this.style.minWidth)||0,o=parseInt(this.style.minHeight)||0,a=parseInt(this.style.maxWidth)||1/0,r=parseInt(this.style.maxHeight)||1/0;if(!e){e=this.resizeHandle=ri('<div class="djs-direct-editing-resize-handle"></div>');var l,p,d,f,h=function(w){eO(w),ux(w),l=w.clientX,p=w.clientY;var T=t.getBoundingClientRect();d=T.width,f=T.height,Cn.bind(document,"mousemove",g),Cn.bind(document,"mouseup",b);},g=function(w){eO(w),ux(w);var T=xD(CD(d+w.clientX-l,i),a),O=xD(CD(f+w.clientY-p,o),r);t.style.width=T+"px",t.style.height=O+"px",n.resizeHandler({width:d,height:f,dx:w.clientX-l,dy:w.clientY-p});},b=function(w){eO(w),ux(w),Cn.unbind(document,"mousemove",g,!1),Cn.unbind(document,"mouseup",b,!1);};Cn.bind(e,"mousedown",h);}me(e.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(e);};sl.prototype.destroy=function(){var n=this.parent,t=this.content,e=this.resizeHandle;t.innerText="",n.removeAttribute("style"),t.removeAttribute("style"),Cn.unbind(t,"keydown",this.keyHandler),Cn.unbind(t,"mousedown",ux),Cn.unbind(t,"input",this.autoResize),Cn.unbind(t,"paste",this.handlePaste),Cn.unbind(t,"focusout",this.focusoutHandler),e&&(e.removeAttribute("style"),Cs(e)),Cs(n);};sl.prototype.getValue=function(){return this.content.innerText.trim();};sl.prototype.getSelection=function(){var n=window.getSelection(),t=n.getRangeAt(0);return t;};sl.prototype.setSelection=function(n,t){var e=document.createRange();n===null?e.selectNodeContents(this.content):(e.setStart(n,t),e.setEnd(n,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(e);};function Ame(n){return n.replace(/\r\n|\r|\n/g,` 949`);}function ss(n,t){this._eventBus=n,this._canvas=t,this._providers=[],this._textbox=new sl({container:t.getContainer(),keyHandler:Ra(this._handleKey,this),resizeHandler:Ra(this._handleResize,this),focusoutHandler:Ra(this._handleFocusout,this)}),n.on(["diagram.clear","diagram.destroy"],()=>this._cleanup());}ss.$inject=["eventBus","canvas"];ss.prototype.registerProvider=function(n){this._providers.push(n);};ss.prototype.isActive=function(n){return!!(this._active&&(!n||this._active.element===n));};ss.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close());};ss.prototype._fire=function(n,t){this._eventBus.fire("directEditing."+n,t||{active:this._active});};ss.prototype.close=function(){this._fire("deactivate"),this._cleanup(),this._canvas.restoreFocus&&this._canvas.restoreFocus();};ss.prototype._cleanup=function(){this._active&&(this._textbox.destroy(),this._active=null,this.resizable=void 0);};ss.prototype.complete=function(){var n=this._active;if(n){var t,e=n.context.bounds,i=this.$textbox.getBoundingClientRect(),o=this.getValue(),a=n.context.text;
949(o!==a||i.height!==e.height||i.width!==e.width)&&(t=this._textbox.container.getBoundingClientRect(),n.provider.update(n.element,o,n.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close();}};ss.prototype.getValue=function(){return this._textbox.getValue();};ss.prototype._handleKey=function(n){n.stopPropagation();var t=n.keyCode||n.charCode;if(t===27)return n.preventDefault(),this.cancel();if(t===13&&!n.shiftKey)return n.preventDefault(),this.complete();};ss.prototype._handleResize=function(n){this._fire("resize",n);};ss.prototype._handleFocusout=function(n){n.relatedTarget&&this._textbox.parent.contains(n.relatedTarget)||this.complete();};ss.prototype.activate=function(n){if(this.isActive()&&this.cancel(),this._eventBus.fire("directEditing.activate.allowed",{element:n})===!1)return!1;var t,e=$n(this._providers,function(i){return(t=i.activate(n))?i:null;});return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:n,context:t,provider:e},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t;};var iP={__depends__:[rm],__init__:["directEditing"],directEditing:["type",ss]};function vD(n){return function(t){var e=t.target,i=qe(n),o=i.eventDefinitions&&i.eventDefinitions[0],a=i.$type===e.type,r=(o&&o.$type)===e.eventDefinitionType,l=!!e.triggeredByEvent==!!i.triggeredByEvent,p=e.isExpanded===void 0||e.isExpanded===mn(n);return!a||!r||!l||!p;};}var bD
vendor: 12,464 bytes, line 949
949={task:{label:"Task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},"user-task":{label:"User task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},"service-task":{label:"Service task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},"send-task":{label:"Send task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},"receive-task":{label:"Receive task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},"manual-task":{label:"Manual task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},"rule-task":{label:"Business rule task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},"script-task":{label:"Script task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},"call-activity":{label:"Call activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},transaction:{label:"Transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},"event-subprocess":{label:"Event sub-process",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},"collapsed-subprocess":{label:"Sub-process (collapsed)",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},"expanded-subprocess":{label:"Sub-process (expanded)",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},"collapsed-ad-hoc-subprocess":{label:"Ad-hoc sub-process (collapsed)",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:AdHocSubProcess",isExpanded:!1}},"expanded-ad-hoc-subprocess":{label:"Ad-hoc sub-process (expanded)",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:AdHocSubProcess",isExpanded:!0}},"exclusive-gateway":{label:"Exclusive gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},"parallel-gateway":{label:"Parallel gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},"inclusive-gateway":{label:"Inclusive gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},"complex-gateway":{label:"Complex gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},"event-based-gateway":{label:"Event-based gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}},"data-store-reference":{label:"Data store reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}},"data-object-reference":{label:"Data object reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}},"expanded-pool":{label:"Expanded pool/participant",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},"collapsed-pool":{label:"Empty pool/participant",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}},"none-start-event":{label:"Start event",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},"none-intermediate-throwing":{label:"Intermediate throw event",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},"none-boundary-event":{label:"Boundary event",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:BoundaryEvent"}},"none-end-event":{label:"End event",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},"message-start":{label:"Message start event",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},"timer-start":{label:"Timer start event",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},"conditional-start":{label:"Conditional start event",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},"signal-start":{label:"Signal start event",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},"error-start":{label:"Error start event",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},"escalation-start":{label:"Escalation start event",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},"compensation-start":{label:"Compensation start event",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},"non-interrupting-message-start":{label:"Message start event (non-interrupting)",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},"non-interrupting-timer-start":{label:"Timer start event (non-interrupting)",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},"non-interrupting-conditional-start":{label:"Conditional start event (non-interrupting)",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},"non-interrupting-signal-start":{label:"Signal start event (non-interrupting)",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},"non-interrupting-escalation-start":{label:"Escalation start event (non-interrupting)",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}},"message-intermediate-catch":{label:"Message intermediate catch event",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},"message-intermediate-throw":{label:"Message intermediate throw event",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},"timer-intermediate-catch":{label:"Timer intermediate catch event",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},"escalation-intermediate-throw":{label:"Escalation intermediate throw event",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},"conditional-intermediate-catch":{label:"Conditional intermediate catch event",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},"link-intermediate-catch":{label:"Link intermediate catch event",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},"link-intermediate-throw":{label:"Link intermediate throw event",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},"compensation-intermediate-throw":{label:"Compensation intermediate throw event",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},"signal-intermediate-catch":{label:"Signal intermediate catch event",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},"signal-intermediate-throw":{label:"Signal intermediate throw event",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},"message-boundary":{label:"Message boundary event",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},"timer-boundary":{label:"Timer boundary event",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},"escalation-boundary":{label:"Escalation boundary event",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},"conditional-boundary":{label:"Conditional boundary event",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},"error-boundary":{label:"Error boundary event",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},"cancel-boundary":{label:"Cancel boundary event",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},"signal-boundary":{label:"Signal boundary event",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},"compensation-boundary":{label:"Compensation boundary event",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},"non-interrupting-message-boundary":{label:"Message boundary event (non-interrupting)",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},"non-interrupting-timer-boundary":{label:"Timer boundary event (non-interrupting)",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},"non-interrupting-escalation-boundary":{label:"Escalation boundary event (non-interrupting)",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},"non-interrupting-conditional-boundary":{label:"Conditional boundary event (non-interrupting)",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},"non-interrupting-signal-boundary":{label:"Signal boundary event (non-interrupting)",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}},"message-end":{label:"Message end event",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},"escalation-end":{label:"Escalation end event",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},"error-end":{label:"Error end event",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},"cancel-end":{label:"Cancel end event",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},"compensation-end":{label:"Compensation end event",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},"signal-end":{label:"Signal end event",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},"terminate-end":{label:"Terminate end event",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}};function
949it(n,t={}){var e=bD[n];if(!e)throw new Error("unknown popup entry <"+n+">");return X(Ve(X({},e),{actionName:"replace-with-"+n}),t);}var yD=[it("none-start-event",{actionName:"replace-with-none-start"}),it("none-intermediate-throwing"),it("none-end-event",{actionName:"replace-with-none-end"}),it("message-start"),it("timer-start"),it("conditional-start"),it("signal-start")],PD=[it("none-start-event",{actionName:"replace-with-none-start"}),it("none-intermediate-throwing"),it("none-end-event",{actionName:"replace-with-none-end"})],wD=[it("none-start-event",{actionName:"replace-with-none-start"}),it("none-intermediate-throwing",{actionName:"replace-with-none-intermediate-throw"}),it("none-end-event",{actionName:"replace-with-none-end"}),it("message-intermediate-catch"),it("message-intermediate-throw"),it("timer-intermediate-catch"),it("escalation-intermediate-throw"),it("conditional-intermediate-catch"),it("link-intermediate-catch"),it("link-intermediate-throw"),it("compensation-intermediate-throw"),it("signal-intermediate-catch"),it("signal-intermediate-throw")],SD=[it("none-start-event",{actionName:"replace-with-none-start"}),it("none-intermediate-throwing",{actionName:"replace-with-none-intermediate-throw"}),it("none-end-event",{actionName:"replace-with-none-end"}),it("message-end"),it("escalation-end"),it("error-end"),it("cancel-end"),it("compensation-end"),it("signal-end"),it("terminate-end")],MD=[it("exclusive-gateway"),it("parallel-gateway"),it("inclusive-gateway"),it("complex-gateway"),it("event-based-gateway")],OD=[it("transaction"),it("event-subprocess"),it("expanded-ad-hoc-subprocess",{actionName:"replace-with-ad-hoc-subprocess",label:"Ad-hoc sub-process"}),it("collapsed-subprocess")],ED=[it("expanded-subprocess",{actionName:"replace-with-subprocess",label:"Sub-process"}),it("transaction"),it("event-subprocess"),it("collapsed-ad-hoc-subprocess")],tO=[it("transaction"),it("expanded-subprocess",{actionName:"replace-with-subprocess",label:"Sub-process"}),it("expanded-ad-hoc-subprocess",{actionName:"replace-with-ad-hoc-subprocess",label:"Ad-hoc sub-process"}),it("event-subprocess")],TD=tO,nO=[it("task"),it("user-task"),it("service-task"),it("send-task"),it("receive-task"),it("manual-task"),it("rule-task"),it("script-task"),it("call-activity"),it("collapsed-subprocess"),it("expanded-subprocess"),it("collapsed-ad-hoc-subprocess"),it("expanded-ad-hoc-subprocess",{actionName:"replace-with-ad-hoc-subprocess"})],ID=[it("data-store-reference")],kD=[it("data-object-reference")],RD=[it("message-boundary"),it("timer-boundary"),it("escalation-boundary"),it("conditional-boundary"),it("error-boundary"),it("cancel-boundary"),it("signal-boundary"),it("compensation-boundary"),it("non-interrupting-message-boundary"),it("non-interrupting-timer-boundary"),it("non-interrupting-escalation-boundary"),it("non-interrupting-conditional-boundary"),it("non-interrupting-signal-boundary")],ND=[it("message-start"),it("timer-start"),it("conditional-start"),it("signal-start"),it("error-start"),it("escalation-start"),it("compensation-start"),it("non-interrupting-message-start"),it("non-interrupting-timer-start"),it("non-interrupting-conditional-start"),it("non-interrupting-signal-start"),it("non-interrupting-escalation-start")],AD=[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],DD=[it("expanded-pool"),it("collapsed-pool",{label:function(n){var t="Empty pool/participant";return n.children&&n.children.length&&(t+=" (removes content)"),t;}})],jD={"bpmn:MessageEventDefinition":[it("message-start"),it("message-intermediate-catch"),it("message-intermediate-throw"),it("message-end")],"bpmn:TimerEventDefinition":[it("timer-start"),it("timer-intermediate-catch")],"bpmn:ConditionalEventDefinition":[it("conditional-start"),it("conditional-intermediate-catch")],"bpmn:SignalEventDefinition":[it("signal-start"),it("signal-intermediate-catch"),it("signal-intermediate-throw"),it("signal-end")],"bpmn:ErrorEventDefinition":[it("error-start"),it("error-end")],"bpmn:EscalationEventDefinition":[it("escalation-start"),it("escalation-intermediate-throw"),it("escalation-end")],"bpmn:CompensateEventDefinition":[it("compensation-start"),it("compensation-intermediate-throw"),it("compensation-end")]};var iO={"start-event-non-interrupting":` 950 <svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg"> 951 <g transform="translate(0 995.64)"> 952 <path d="m1899 28.357c21.545 567.43-598.38 1023.5-1133.6 835.92-548.09-147.21-801.57-873.95-463.59-1330 302.62-480.3 1071.7-507.54 1407.6-49.847 122.14 153.12 190.07 348.07 189.59 543.91z" fill="none" stroke="currentColor" stroke-dasharray="418.310422, 361.2328165" stroke-linecap="round" stroke-width="100"/> 953 </g> 954 </svg>`,"intermediate-event-non-interrupting":` 955 <svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg"> 956 <g transform="translate(0 995.64)" fill="none" stroke="currentColor" stroke-linecap="round">
957 <circle cx="1024" cy="28.357" r="875" stroke-dasharray="418.310422, 361.2328165" stroke-width="100"/> 958 <circle cx="1024" cy="28.357" r="685" stroke-dasharray="348.31044857,261.23283643" stroke-dashoffset="500" stroke-width="100"/> 959 </g> 960 </svg>`};function Ws(n,t,e,i,o,a,r,l){this._bpmnFactory=n,this._popupMenu=t,this._modeling=e,this._moddle=i,this._bpmnReplace=o,this._rules=a,this._translate=r,this._moddleCopy=l,this._register();}Ws.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate","moddleCopy"];Ws.prototype._register=function(){this._popupMenu.registerProvider("bpmn-replace",this);};Ws.prototype.getPopupMenuEntries=function(n){var t=n.businessObject,e=this._rules,i=[],o,a=[];if(gt(n)||!e.allowed("shape.replace",{element:n}))return{};var r=vD(n);return z(t,"bpmn:DataObjectReference")?this._createEntries(n,ID):z(t,"bpmn:DataStoreReference")&&!z(n.parent,"bpmn:Collaboration")?this._createEntries(n,kD):(z(t,"bpmn:Event")&&!z(t,"bpmn:BoundaryEvent")&&(o=t.get("eventDefinitions")[0]?.$type,i=jD[o]||[],!ua(t.$parent)&&z(t.$parent,"bpmn:SubProcess")&&(i=Yt(i,function(l){return l.target.type!=="bpmn:StartEvent";}))),z(t,"bpmn:StartEvent")&&!z(t.$parent,"bpmn:SubProcess")?(a=Yt(yD.concat(i),r),this._createEntries(n,a)):z(t,"bpmn:Participant")?(a=Yt(DD,function(l){return mn(n)!==l.target.isExpanded;}),this._createEntries(n,a)):z(t,"bpmn:StartEvent")&&ua(t.$parent)?(a=Yt(ND.concat(i),function(l){var p=l.target,d=p.isInterrupting!==!1,f=t.isInterrupting===d;return r(l)||!r(l)&&!f;}),this._createEntries(n,a)):z(t,"bpmn:StartEvent")&&!ua(t.$parent)&&z(t.$parent,"bpmn:SubProcess")?(a=Yt(PD.concat(i),r),this._createEntries(n,a)):z(t,"bpmn:EndEvent")?(a=Yt(SD.concat(i),function(l){var p=l.target;return p.eventDefinitionType=="bpmn:CancelEventDefinition"&&!z(t.$parent,"bpmn:Transaction")?!1:r(l);}),this._createEntries(n,a)):z(t,"bpmn:BoundaryEvent")?(a=Yt(RD,function(l){var p=l.target;if(p.eventDefinitionType=="bpmn:CancelEventDefinition"&&!z(t.attachedToRef,"bpmn:Transaction"))return!1;var d=p.cancelActivity!==!1,f=t.cancelActivity==d;return r(l)||!r(l)&&!f;}),this._createEntries(n,a)):z(t,"bpmn:IntermediateCatchEvent")||z(t,"bpmn:IntermediateThrowEvent")?(a=Yt(wD.concat(i),r),this._createEntries(n,a)):z(t,"bpmn:Gateway")?(a=Yt(MD,r),this._createEntries(n,a)):z(t,"bpmn:Transaction")?(a=Yt(tO,r),this._createEntries(n,a)):ua(t)&&mn(n)?(a=Yt(TD,r),this._createEntries(n,a)):z(t,"bpmn:AdHocSubProcess")&&mn(n)?(a=Yt(ED,r),this._createEntries(n,a)):z(t,"bpmn:SubProcess")&&mn(n)?(a=Yt(OD,r),this._createEntries(n,a)):z(t,"bpmn:SubProcess")&&!mn(n)?(a=Yt(nO,function(l){var p=l.target.type===n.type,d=l.target.isExpanded===!0;return p===d;}),this._createEntries(n,a)):z(t,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(n,AD):z(t,"bpmn:FlowNode")?(a=Yt(nO,r),this._createEntries(n,a)):{});};Ws.prototype.getPopupMenuHeaderEntries=function(n){var t={};return z(n,"bpmn:Activity")&&!ua(n)&&(t=X(X({},t),this._getLoopCharacteristicsHeaderEntries(n))),z(n,"bpmn:DataObjectReference")&&(t=X(X({},t),this._getCollectionHeaderEntries(n))),z(n,"bpmn:Participant")&&(t=X(X({},t),this._getParticipantMultiplicityHeaderEntries(n))),Sy(n)&&(t=X(X({},t),this._getNonInterruptingHeaderEntries(n))),t;};Ws.prototype._createEntries=function(n,t){var e={},i=this;return ne(t,function(o){e[o.actionName]=i._createEntry(o,n);}),e;};Ws.prototype._createSequenceFlowEntries=function(n,t){var e=qe(n),i={},o=this._modeling,a=this._moddle,r=this;return ne(t,function(l){switch(l.actionName){case"replace-with-default-flow":e.sourceRef.default!==e&&(z(e.sourceRef,"bpmn:ExclusiveGateway")||z(e.sourceRef,"bpmn:InclusiveGateway")||z(e.sourceRef,"bpmn:ComplexGateway")||z(e.sourceRef,"bpmn:Activity"))&&(i=Ve(X({},i),{[l.actionName]:r._createEntry(l,n,function(){o.updateProperties(n.source,{default:e});})}));break;case"replace-with-conditional-flow":!e.conditionExpression&&z(e.sourceRef,"bpmn:Activity")&&(i=Ve(X({},i),{[l.actionName]:r._createEntry(l,n,function(){var p=a.create("bpmn:FormalExpression",{body:""});o.updateProperties(n,{conditionExpression:p});})}));break;default:z(e.sourceRef,"bpmn:Activity")&&e.conditionExpression&&(i=Ve(X({},i),{[l.actionName]:r._createEntry(l,n,function(){o.updateProperties(n,{conditionExpression:void 0});})})),(z(e.sourceRef,"bpmn:ExclusiveGateway")||z(e.sourceRef,"bpmn:InclusiveGateway")||z(e.sourceRef,"bpmn:ComplexGateway")||z(e.sourceRef,"bpmn:Activity"))&&e.sourceRef.default===e&&(i=Ve(X({},i),{[l.actionName]:r._createEntry(l,n,function(){o.updateProperties(n.source,{default:void 0});})}));}}),i;};Ws.prototype._createEntry=function(n,t,e){var i=this._translate,o=this._bpmnReplace.replaceElement,a=function(){return o(t,n.target);},r=n.label;return r&&typeof r=="function"&&(r=r(t)),e=e||a,{label:i(r),className:n.className,action:e};};Ws.prototype._getLoopCharacteristicsHeaderEntries=function(n){var t=this,e=this._translate;function i(d,f){if(f.active){t._modeling.updateProperties(n,{loopCharacteristics:void 0});return;}var h=n.businessObject.get("loopCharacteristics");h&&z(h,f.options.loopCharacteristics)?t._modeling.updateModdleProperties(n,h,{isSequential:f.options.isSequential}):(h=t._moddle.create(f.options.loopCharacteristics,{isSequential:f.options.isSequential}),t._modeling.updateProperties(n,{loopCharacteristics:h}));}var o=qe(n),a=o.loopCharacteristics,r,l,p;return a&&(r=a.isSequential,l=a.isSequential===void 0,p=a.isSequential!==void 0&&!a.isSequential),{"toggle-parallel-mi":{className:"bpmn-icon-parallel-mi-marker",title:e("Parallel multi-instance"),active:p,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},"toggle-sequential-mi":{className:"bpmn-icon-sequential-mi-marker",title:e("Sequential multi-instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}}
960,"toggle-loop":{className:"bpmn-icon-loop-marker",title:e("Loop"),active:l,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}};};Ws.prototype._getCollectionHeaderEntries=function(n){var t=this,e=this._translate,i=n.businessObject.dataObjectRef;if(!i)return{};function o(r,l){t._modeling.updateModdleProperties(n,i,{isCollection:!l.active});}var a=i.isCollection;return{"toggle-is-collection":{className:"bpmn-icon-parallel-mi-marker",title:e("Collection"),active:a,action:o}};};Ws.prototype._getParticipantMultiplicityHeaderEntries=function(n){var t=this,e=this._bpmnFactory,i=this._translate;function o(r,l){var p=l.active,d;p||(d=e.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(n,{participantMultiplicity:d});}var a=n.businessObject.participantMultiplicity;return{"toggle-participant-multiplicity":{className:"bpmn-icon-parallel-mi-marker",title:i("Participant multiplicity"),active:!!a,action:o}};};Ws.prototype._getNonInterruptingHeaderEntries=function(n){let t=this._translate,e=qe(n),i=this,o=My(n),a=z(n,"bpmn:BoundaryEvent")?iO["intermediate-event-non-interrupting"]:iO["start-event-non-interrupting"],r=!e[o];return{"toggle-non-interrupting":{imageHtml:a,title:t("Toggle non-interrupting"),active:r,action:function(){i._modeling.updateProperties(n,{[o]:!!r});}}};};var LD={__depends__:[Sh,Jy,Oh],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",Ws]};function Fu(n,t,e,i,o,a,r,l,p,d,f,h,g){n=n||{},i.registerProvider(this),this._contextPad=i,this._modeling=o,this._elementFactory=a,this._connect=r,this._create=l,this._popupMenu=p,this._canvas=d,this._rules=f,this._translate=h,this._eventBus=e,this._appendPreview=g,n.autoPlace!==!1&&(this._autoPlace=t.get("autoPlace",!1)),e.on("create.end",250,function(b){var w=b.context,T=w.shape;if(!(!Fp(b)||!i.isOpen(T))){var O=i.getEntries(T);O.replace&&O.replace.action.click(b,T);}}),e.on("contextPad.close",function(){g.cleanUp();});}Fu.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate","appendPreview"];Fu.prototype.getMultiElementContextPadEntries=function(n){var t=this._modeling,e={};return this._isDeleteAllowed(n)&&me(e,{delete:{group:"edit",className:"bpmn-icon-trash",title:this._translate("Delete"),action:{click:function(i,o){t.removeElements(o.slice());}}}}),e;};Fu.prototype._isDeleteAllowed=function(n){var t=this._rules.allowed("elements.delete",{elements:n});return gt(t)?zl(n,e=>t.includes(e)):t;};Fu.prototype.getContextPadEntries=function(n){var t=this._contextPad,e=this._modeling,i=this._elementFactory,o=this._connect,a=this._create,r=this._popupMenu,l=this._autoPlace,p=this._translate,d=this._appendPreview,f={};if(n.type==="label")return this._isDeleteAllowed([n])&&me(f,w()),f;var h=n.businessObject;function g(L,A){o.start(L,A);}function b(L,A){e.removeElements([A]);}function w(){return{delete:{group:"edit",className:"bpmn-icon-trash",title:p("Delete"),action:{click:b}}};}function T(L){var A=5,J=t.getPad(L).html,Q=J.getBoundingClientRect(),te={x:Q.left,y:Q.bottom+A};return te;}function O(L,A,J,Q){function te(W,Y){var se=i.createShape(me({type:L},Q));a.start(W,se,{source:Y});}var U=l?function(W,Y){var se=i.createShape(me({type:L},Q));l.append(Y,se);}:te,ce=l?function(W,Y){return d.create(Y,L,Q),()=>{d.cleanUp();};}:null;return{group:"model",className:A,title:J,action:{dragstart:te,click:U,hover:ce}};}function V(L){return function(A,J){e.splitLane(J,L),t.open(J,!0);};}if(en(h,["bpmn:Lane","bpmn:Participant"])&&mn(n)){var j=rl(n);me(f,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:p("Add lane above"),action:{click:function(L,A){e.addLane(A,"top");}}}}),j.length<2&&((ao(n)?n.height>=120:n.width>=120)&&me(f,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:p("Divide into two lanes"),action:{click:V(2)}}}),(ao(n)?n.height>=180:n.width>=180)&&me(f,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:p("Divide into three lanes"),action:{click:V(3)}}})),me(f,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:p("Add lane below"),action:{click:function(L,A){e.addLane(A,"bottom");}}}});}return z(h,"bpmn:FlowNode")&&(z(h,"bpmn:EventBasedGateway")?me(f,{"append.receive-task":O("bpmn:ReceiveTask","bpmn-icon-receive-task",p("Append receive task")),"append.message-intermediate-event":O("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",p("Append message intermediate catch event"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":O("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",p("Append timer intermediate catch event"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":O("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",p("Append conditional intermediate catch event"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":O("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",p("Append signal intermediate catch event"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):zD(h,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?me(f,{"append.compensation-activity":O("bpmn:Task","bpmn-icon-task",p("Append compensation activity"),{isForCompensation:!0}
960)}):!z(h,"bpmn:EndEvent")&&!h.isForCompensation&&!zD(h,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")&&!ua(h)&&me(f,{"append.end-event":O("bpmn:EndEvent","bpmn-icon-end-event-none",p("Append end event")),"append.gateway":O("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",p("Append gateway")),"append.append-task":O("bpmn:Task","bpmn-icon-task",p("Append task")),"append.intermediate-event":O("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",p("Append intermediate/boundary event"))})),r.isEmpty(n,"bpmn-replace")||me(f,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:p("Change element"),action:{click:function(L,A){var J=me(T(A),{cursor:{x:L.x,y:L.y}});r.open(A,"bpmn-replace",J,{title:p("Change element"),width:"var(--bpmn-replace-popup-width, 300px)",search:!0});}}}}),z(h,"bpmn:SequenceFlow")&&me(f,{"append.text-annotation":O("bpmn:TextAnnotation","bpmn-icon-text-annotation",p("Add text annotation"))}),z(h,"bpmn:MessageFlow")&&me(f,{"append.text-annotation":O("bpmn:TextAnnotation","bpmn-icon-text-annotation",p("Add text annotation"))}),en(h,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&me(f,{"append.text-annotation":O("bpmn:TextAnnotation","bpmn-icon-text-annotation",p("Add text annotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:p("Connect to other element"),action:{click:g,dragstart:g}}}),z(h,"bpmn:TextAnnotation")&&me(f,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:p("Connect using association"),action:{click:g,dragstart:g}}}),en(h,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&me(f,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:p("Connect using data input association"),action:{click:g,dragstart:g}}}),z(h,"bpmn:Group")&&me(f,{"append.text-annotation":O("bpmn:TextAnnotation","bpmn-icon-text-annotation",p("Add text annotation"))}),this._isDeleteAllowed([n])&&me(f,w()),f;};function zD(n,t,e){var i=n.$instanceOf(t),o=!1,a=n.eventDefinitions||[];return ne(a,function(r){r.$type===e&&(o=!0);}),i&&o;}var FD={__depends__:[gD,iP,wb,la,kh,Cm,LD],__init__:["contextPadProvider"],contextPadProvider:["type",Fu]};var jme={horizontal:["x","width"],vertical:["y","height"]}
960,BD=5;function Mc(n,t){this._modeling=n,this._filters=[],this.registerFilter(function(e){var i=t.allowed("elements.distribute",{elements:e});return gt(i)?i:i?e:[];});}Mc.$inject=["modeling","rules"];Mc.prototype.registerFilter=function(n){if(typeof n!="function")throw new Error("the filter has to be a function");this._filters.push(n);};Mc.prototype.trigger=function(n,t){var e=this._modeling,i,o;if(!(n.length<3)&&(this._setOrientation(t),o=this._filterElements(n),i=this._createGroups(o),!(i.length<=2)))return e.distributeElements(i,this._axis,this._dimension),i;};Mc.prototype._filterElements=function(n){var t=this._filters,e=this._axis,i=this._dimension,o=[].concat(n);return t.length?(ne(t,function(a){o=a(o,e,i);}),o):n;};Mc.prototype._createGroups=function(n){var t=[],e=this,i=this._axis,o=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');var a=jr(n,i);return ne(a,function(r,l){var p=e._findRange(r,i,o),d,f=t[t.length-1];f&&e._hasIntersection(f.range,p)?t[t.length-1].elements.push(r):(d={range:p,elements:[r]},t.push(d));}),t;};Mc.prototype._setOrientation=function(n){var t=jme[n];this._axis=t[0],this._dimension=t[1];};Mc.prototype._hasIntersection=function(n,t){return Math.max(n.min,n.max)>=Math.min(t.min,t.max)&&Math.min(n.min,n.max)<=Math.max(t.min,t.max);};Mc.prototype._findRange=function(n){var t=n[this._axis],e=n[this._dimension];return{min:t+BD,max:t+e-BD};};var $D={__init__:["distributeElements"],distributeElements:["type",Mc]};function c_(n){Lr.call(this,n);}c_.$inject=["eventBus"];Fe(c_,Lr);c_.prototype.init=function(){this.addRule("elements.distribute",function(n){var t=n.elements;return t=Yt(t,function(e){var i=en(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||i);}),t=Ud(t),t.length<3?!1:t;});};var Lme={horizontal:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 961 <polyline points="450 400 450 150 1350 150 1350 400" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/> 962 <rect x="150" y="450" width="600" height="1200" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 963 <rect x="1050" y="450" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 964 </svg>`,vertical:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"> 965 <polyline points="400 1350 150 1350 150 450 400 450" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/> 966 <rect x="450" y="150" width="1200" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect> 967 <rect x="450" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect> 968 </svg>`},oO=Lme;var zme=900;function Bu(n,t,e,i){this._distributeElements=t,this._translate=e,this._popupMenu=n,this._rules=i,n.registerProvider("align-elements",zme,this);}Bu.$inject=["popupMenu","distributeElements","translate","rules"];Bu.prototype.getPopupMenuEntries=function(n){var t={};return this._isAllowed(n)&&me(t,this._getEntries(n)),t;};Bu.prototype._isAllowed=function(n){return this._rules.allowed("elements.distribute",{elements:n});};Bu.prototype._getEntries=function(n){var t=this._distributeElements,e=this._translate,i=this._popupMenu,o={"distribute-elements-horizontal":{group:"distribute",title:e("Distribute elements horizontally"),className:"bjs-align-elements-menu-entry",imageHtml:oO.horizontal,action:function(a,r){t.trigger(n,"horizontal"),i.close();}},"distribute-elements-vertical":{group:"distribute",title:e("Distribute elements vertically"),imageHtml:oO.vertical,action:function(a,r){t.trigger(n,"vertical"),i.close();}}};return o;};var VD={__depends__:[Sh,$D],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",c_],distributeElementsMenuProvider:["type",Bu]}
968;var GD="is not a registered action",Fme="is already registered";function Ss(n,t){this._eventBus=n,this._actions={};var e=this;n.on("diagram.init",function(){e._registerDefaultActions(t),n.fire("editorActions.init",{editorActions:e});});}Ss.$inject=["eventBus","injector"];Ss.prototype._registerDefaultActions=function(n){var t=n.get("commandStack",!1),e=n.get("modeling",!1),i=n.get("selection",!1),o=n.get("zoomScroll",!1),a=n.get("copyPaste",!1),r=n.get("canvas",!1),l=n.get("rules",!1),p=n.get("keyboardMove",!1),d=n.get("keyboardMoveSelection",!1);t&&(this.register("undo",function(){t.undo();}),this.register("redo",function(){t.redo();})),a&&i&&this.register("copy",function(){var f=i.get();if(f.length)return a.copy(f);}),a&&i&&this.register("duplicate",function(){var f=i.get();if(f.length)return a.duplicate(f);}),a&&this.register("paste",function(){a.paste();}),a&&i&&l&&this.register("cut",function(){var f=i.get();if(f.length){var h=l.allowed("elements.delete",{elements:f});if(h!==!1){var g=gt(h)?h:f;return a.cut(g.slice());}}}),o&&this.register("stepZoom",function(f){o.stepZoom(f.value);}),r&&this.register("zoom",function(f){r.zoom(f.value);}),e&&i&&l&&this.register("removeSelection",function(){var f=i.get();if(f.length){var h=l.allowed("elements.delete",{elements:f}),g;h!==!1&&(gt(h)?g=h:g=f,g.length&&e.removeElements(g.slice()));}}),p&&this.register("moveCanvas",function(f){p.moveCanvas(f);}),d&&this.register("moveSelection",function(f){d.moveSelection(f.direction,f.accelerated);});};Ss.prototype.trigger=function(n,t){if(!this._actions[n])throw aO(n,GD);var e=this._eventBus.fire("editorActions.allowed",{action:n,opts:t});if(e!==!1)return this._actions[n](t);};Ss.prototype.register=function(n,t){var e=this;if(typeof n=="string")return this._registerAction(n,t);ne(n,function(i,o){e._registerAction(o,i);});};Ss.prototype._registerAction=function(n,t){if(this.isRegistered(n))throw aO(n,Fme);this._actions[n]=t;};Ss.prototype.unregister=function(n){if(!this.isRegistered(n))throw aO(n,GD);this._actions[n]=void 0;};Ss.prototype.getActions=function(){return Object.keys(this._actions);};Ss.prototype.isRegistered=function(n){return!!this._actions[n];};function aO(n,t){return new Error(n+" "+t);}var qD={__init__:["editorActions"],editorActions:["type",Ss]};function p_(n){n.invoke(Ss,this);}Fe(p_,Ss);p_.$inject=["injector"];p_.prototype._registerDefaultActions=function(n){Ss.prototype._registerDefaultActions.call(this,n);var t=n.get("canvas",!1),e=n.get("elementRegistry",!1),i=n.get("selection",!1),o=n.get("spaceTool",!1),a=n.get("lassoTool",!1),r=n.get("handTool",!1),l=n.get("globalConnect",!1),p=n.get("distributeElements",!1),d=n.get("alignElements",!1),f=n.get("directEditing",!1),h=n.get("searchPad",!1),g=n.get("modeling",!1),b=n.get("contextPad",!1);t&&e&&i&&this._registerAction("selectElements",function(){var w=t.getRootElement(),T=e.filter(function(O){return O!==w;});return i.select(T),T;}),o&&this._registerAction("spaceTool",function(){o.toggle();}),a&&this._registerAction("lassoTool",function(){a.toggle();}),r&&this._registerAction("handTool",function(){r.toggle();}),l&&this._registerAction("globalConnectTool",function(){l.toggle();}),i&&p&&this._registerAction("distributeElements",function(w){var T=i.get(),O=w.type;T.length&&p.trigger(T,O);}),i&&d&&this._registerAction("alignElements",function(w){var T=i.get(),O=[],V=w.type;T.length&&(O=Yt(T,function(j){return!z(j,"bpmn:Lane");}),d.trigger(O,V));}),i&&g&&this._registerAction("setColor",function(w){var T=i.get();T.length&&g.setColor(T,w);}),i&&f&&this._registerAction("directEditing",function(){var w=i.get();w.length&&f.activate(w[0]);}),h&&this._registerAction("find",function(){h.toggle();}),t&&g&&this._registerAction("moveToOrigin",function(){var w=t.getRootElement(),T,O;z(w,"bpmn:Collaboration")?O=e.filter(function(V){return z(V.parent,"bpmn:Collaboration");}):O=e.filter(function(V){return V!==w&&!z(V.parent,"bpmn:SubProcess");}),T=Pi(O),g.moveElements(O,{x:-T.x,y:-T.y},w);}),i&&b&&this._registerAction("replaceElement",function(w){b.triggerEntry("replace","click",w);});};var JD={__depends__:[qD],editorActions:["type",p_]};function oP(n){n.on(["create.init","shape.move.init"],function(t){var e=t.context,i=t.shape;
968en(i,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(e.gridSnappingContext||(e.gridSnappingContext={}),e.gridSnappingContext.snapLocation="top-left");});}oP.$inject=["eventBus"];function Wp(n,t){Re.call(this,n),this._gridSnapping=t;var e=this;this.preExecute("shape.resize",function(i){var o=i.context,a=o.hints||{},r=a.autoResize;if(r){var l=o.shape,p=o.newBounds;ka(r)?o.newBounds=e.snapComplex(p,r):o.newBounds=e.snapSimple(l,p);}});}Wp.$inject=["eventBus","gridSnapping","modeling"];Fe(Wp,Re);Wp.prototype.snapSimple=function(n,t){var e=this._gridSnapping;return t.width=e.snapValue(t.width,{min:t.width}),t.height=e.snapValue(t.height,{min:t.height}),t.x=n.x+n.width/2-t.width/2,t.y=n.y+n.height/2-t.height/2,t;};Wp.prototype.snapComplex=function(n,t){return /w|e/.test(t)&&(n=this.snapHorizontally(n,t)),/n|s/.test(t)&&(n=this.snapVertically(n,t)),n;};Wp.prototype.snapHorizontally=function(n,t){var e=this._gridSnapping,i=/w/.test(t),o=/e/.test(t),a={};return a.width=e.snapValue(n.width,{min:n.width}),o&&(i?(a.x=e.snapValue(n.x,{max:n.x}),a.width+=e.snapValue(n.x-a.x,{min:n.x-a.x})):n.x=n.x+n.width-a.width),me(n,a),n;};Wp.prototype.snapVertically=function(n,t){var e=this._gridSnapping,i=/n/.test(t),o=/s/.test(t),a={};return a.height=e.snapValue(n.height,{min:n.height}),i&&(o?(a.y=e.snapValue(n.y,{max:n.y}),a.height+=e.snapValue(n.y-a.y,{min:n.y-a.y})):n.y=n.y+n.height-a.height),me(n,a),n;};var Bme=2e3;function aP(n,t){n.on(["spaceTool.move","spaceTool.end"],Bme,function(e){var i=e.context;if(i.initialized){var o=i.axis,a;o==="x"?(a=t.snapValue(e.dx),e.x=e.x+a-e.dx,e.dx=a):(a=t.snapValue(e.dy),e.y=e.y+a-e.dy,e.dy=a);}});}aP.$inject=["eventBus","gridSnapping"];var HD={__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Wp],gridSnappingSpaceToolBehavior:["type",aP]};var fx=10;function rP(n,t,e){return e||(e="round"),Math[e](n/t)*t;}var $me=1200,Vme=800;function np(n,t,e){var i=!e||e.active!==!1;this._eventBus=t;var o=this;t.on("diagram.init",Vme,function(){o.setActive(i);}),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],$me,function(a){var r=a.originalEvent;if(!(!o.active||r&&Qa(r))){var l=a.context,p=l.gridSnappingContext;p||(p=l.gridSnappingContext={}),["x","y"].forEach(function(d){var f={},h=qme(a,d,n);h&&(f.offset=h);var g=Gme(a,d);g&&me(f,g),bc(a,d)||o.snapEvent(a,d,f);});}});}np.prototype.snapEvent=function(n,t,e){var i=this.snapValue(n[t],e);Uo(n,t,i);};np.prototype.getGridSpacing=function(){return fx;};np.prototype.snapValue=function(n,t){var e=0;t&&t.offset&&(e=t.offset),n+=e,n=rP(n,fx);var i,o;return t&&t.min&&(i=t.min,nn(i)&&(i=rP(i+e,fx,"ceil"),n=Math.max(n,i))),t&&t.max&&(o=t.max,nn(o)&&(o=rP(o+e,fx,"floor"),n=Math.min(n,o))),n-=e,n;};np.prototype.isActive=function(){return this.active;};np.prototype.setActive=function(n){this.active=n,this._eventBus.fire("gridSnapping.toggle",{active:n});};np.prototype.toggleActive=function(){this.setActive(!this.active);};np.$inject=["elementRegistry","eventBus","config.gridSnapping"];function Gme(n,t){var e=n.context,i=e.createConstraints,o=e.resizeConstraints||{},a=e.gridSnappingContext,r=a.snapConstraints;if(r&&r[t])return r[t];r||(r=a.snapConstraints={}),r[t]||(r[t]={});var l=e.direction;i&&(sP(t)?(r.x.min=i.left,r.x.max=i.right):(r.y.min=i.top,r.y.max=i.bottom));var p=o.min,d=o.max;return p&&(sP(t)?WD(l)?r.x.max=p.left:r.x.min=p.right:UD(l)?r.y.max=p.top:r.y.min=p.bottom),d&&(sP(t)?WD(l)?r.x.min=d.left:r.x.max=d.right:UD(l)?r.y.min=d.top:r.y.max=d.bottom),r[t];}function qme(n,t,e){var i=n.context,o=n.shape,a=i.gridSnappingContext,r=a.snapLocation,l=a.snapOffset;return l&&nn(l[t])||(l||(l=a.snapOffset={}),nn(l[t])||(l[t]=0),!o)||(e.get(o.id)||(sP(t)?l[t]+=o[t]+o.width/2:l[t]+=o[t]+o.height/2),!r)||(t==="x"?/left/.test(r)?l[t]-=o.width/2:/right/.test(r)&&(l[t]+=o.width/2):/top/.test(r)?l[t]-=o.height/2:/bottom/.test(r)&&(l[t]+=o.height/2)),l[t];}function sP(n){return n==="x";}function UD(n){return n.indexOf("n")!==-1;}function WD(n){return n.indexOf("w")!==-1;}var XD={__depends__:[HD],__init__:["gridSnapping"],gridSnapping:["type",np]};var Jme=2e3;function lP(n,t,e){n.on("autoPlace",Jme,function(i){var o=i.source,a=Rt(o),r=i.shape,l=qb(o,r,e);return["x","y"].forEach(function(p){var d={};l[p]!==a[p]&&(l[p]>a[p]?d.min=l[p]:d.max=l[p],z(r,"bpmn:TextAnnotation")&&(Hme(p)?d.offset=-r.width/2:d.offset=-r.height/2),l[p]=t.snapValue(l[p],d));}),l;});}lP.$inject=["eventBus","gridSnapping","elementRegistry"];function Hme(n){return n==="x";}var Ume=1750;function cP(n,t,e){t.on(["create.start","shape.move.start"],Ume,function(i){var o=i.context,a=o.shape,r=n.getRootElement();if(!(!z(a,"bpmn:Participant")||!z(r,"bpmn:Process")||!r.children.length)){var l=o.createConstraints;l&&(a.width=e.snapValue(a.width,{min:a.width}),a.height=e.snapValue(a.height,{min:a.height}));}});}
968cP.$inject=["canvas","eventBus","gridSnapping"];var Wme=3e3;function d_(n,t,e){Re.call(this,n),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],Wme,function(o){var a=o.context,r=a.connection,l=a.hints||{},p=r.waypoints;l.connectionStart||l.connectionEnd||l.createElementsBehavior===!1||Xme(p)&&e.updateWaypoints(r,i.snapMiddleSegments(p));});}d_.$inject=["eventBus","gridSnapping","modeling"];Fe(d_,Re);d_.prototype.snapMiddleSegments=function(n){var t=this._gridSnapping,e;n=n.slice();for(var i=1;i<n.length-2;i++)e=Zme(t,n[i],n[i+1]),n[i]=e[0],n[i+1]=e[1];return n;};function Xme(n){return n.length>3;}function Yme(n){return n==="h";}function Kme(n){return n==="v";}function Zme(n,t,e){var i=$s(t,e),o={};return Yme(i)&&(o.y=n.snapValue(t.y)),Kme(i)&&(o.x=n.snapValue(t.x)),("x"in o||"y"in o)&&(t=me({},t,o),e=me({},e,o)),[t,e];}var YD={__init__:["gridSnappingAutoPlaceBehavior","gridSnappingParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",lP],gridSnappingParticipantBehavior:["type",cP],gridSnappingLayoutConnectionBehavior:["type",d_]};var KD={__depends__:[XD,YD],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",oP]};var Qme=30,ZD=30;function $u(n,t){this._interactionEvents=t;var e=this;n.on(["interactionEvents.createHit","interactionEvents.updateHit"],function(i){var o=i.element,a=i.gfx;if(z(o,"bpmn:Lane"))return e._createParticipantHit(o,a);if(z(o,"bpmn:Participant"))return mn(o)?e._createParticipantHit(o,a):e._createDefaultHit(o,a);if(z(o,"bpmn:SubProcess"))return mn(o)?e._createSubProcessHit(o,a):e._createDefaultHit(o,a);});}$u.$inject=["eventBus","interactionEvents"];$u.prototype._createDefaultHit=function(n,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(n,t),!0;};$u.prototype._createParticipantHit=function(n,t){this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"no-move",{width:n.width,height:n.height}),this._interactionEvents.createBoxHit(t,"click-stroke",{width:n.width,height:n.height});var e=ao(n)?{width:Qme,height:n.height}:{width:n.width,height:ZD};return this._interactionEvents.createBoxHit(t,"all",e),!0;};$u.prototype._createSubProcessHit=function(n,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"no-move",{width:n.width,height:n.height}),this._interactionEvents.createBoxHit(t,"click-stroke",{width:n.width,height:n.height}),this._interactionEvents.createBoxHit(t,"all",{width:n.width,height:ZD}),!0;};var QD={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",$u]};function m_(n){n.invoke(Bp,this);}Fe(m_,Bp);m_.$inject=["injector"];var u_={selectElements:{key:"A",modifier:"cmd"},find:{key:"F",modifier:"cmd"},spaceTool:{key:"S"},lassoTool:{key:"L"},handTool:{key:"H"},globalConnectTool:{key:"C"},directEditing:{key:"E"},replaceElement:{key:"R"}};m_.prototype.registerBindings=function(n,t){Bp.prototype.registerBindings.call(this,n,t),ne(u_,function(e,i){if(t.isRegistered(i)){var o=[e.key.toLowerCase(),e.key.toUpperCase()],a=e.modifier==="cmd";n.addListener(function(r){var l=r.keyEvent;if(n.isKey(o,l)){if(a){if(!n.isCmd(l))return;}else if(n.hasModifier(l))return;return t.trigger(i,l),!0;}});}});};var ej={__depends__:[vh],__init__:["keyboardBindings"],keyboardBindings:["type",m_]};var eue={moveSpeed:1,moveSpeedAccelerated:10},tue=1500,tj="left",nj="up",ij="right",oj="down",nue={ArrowLeft:tj,Left:tj,ArrowUp:nj,Up:nj,ArrowRight:ij,Right:ij,ArrowDown:oj,Down:oj},iue={left:function(n){return{x:-n,y:0};},up:function(n){return{x:0,y:-n};},right:function(n){return{x:n,y:0};},down:function(n){return{x:0,y:n};}};function pP(n,t,e,i,o){var a=this;this._config=me({},eue,n||{}),t.addListener(tue,function(r){var l=r.keyEvent,p=nue[l.key];if(p&&!t.isCmd(l)){var d=t.isShift(l);return a.moveSelection(p,d),!0;}}),this.moveSelection=function(r,l){var p=o.get();if(p.length){var d=this._config[l?"moveSpeedAccelerated":"moveSpeed"],f=iue[r](d),h=i.allowed("elements.move",{shapes:p,hints:{keyboardMove:!0}});h&&e.moveElements(p,f);}};}pP.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];var aj={__depends__:[vh,la],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",pP]};
968var rj=10;function Vu(n,t,e,i){this._dragging=i,this._rules=t;var o=this;function a(p,d){var f=p.shape,h=p.direction,g=p.resizeConstraints,b;p.delta=d,b=Q5(f,h,d),p.newBounds=tA(b,g),p.canExecute=o.canResize(p);}function r(p){var d=p.resizeConstraints,f=p.minBounds;d===void 0&&(f===void 0&&(f=o.computeMinResizeBox(p)),p.resizeConstraints={min:Ot(f)});}function l(p){var d=p.shape,f=p.canExecute,h=p.newBounds;if(f){if(h=jv(h),!oue(d,h))return;e.resizeShape(d,h);}}n.on("resize.start",function(p){r(p.context);}),n.on("resize.move",function(p){var d={x:p.dx,y:p.dy};a(p.context,d);}),n.on("resize.end",function(p){l(p.context);});}Vu.prototype.canResize=function(n){var t=this._rules,e=Za(n,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",e);};Vu.prototype.activate=function(n,t,e){var i=this._dragging,o,a;if(typeof e=="string"&&(e={direction:e}),o=me({shape:t},e),a=o.direction,!a)throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");i.init(n,rO(t,a),"resize",{autoActivate:!0,cursor:aue(a),data:{shape:t,context:o}});};Vu.prototype.computeMinResizeBox=function(n){var t=n.shape,e=n.direction,i,o;return i=n.minDimensions||{width:rj,height:rj},o=gy(t,n.childrenBoxPadding),nA(e,t,i,o);};Vu.$inject=["eventBus","rules","modeling","dragging"];function oue(n,t){return n.x!==t.x||n.y!==t.y||n.width!==t.width||n.height!==t.height;}function rO(n,t){var e=Rt(n),i=Ot(n),o={x:e.x,y:e.y};return t.indexOf("n")!==-1?o.y=i.top:t.indexOf("s")!==-1&&(o.y=i.bottom),t.indexOf("e")!==-1?o.x=i.right:t.indexOf("w")!==-1&&(o.x=i.left),o;}function aue(n){var t="resize-";return n==="n"||n==="s"?t+"ns":n==="e"||n==="w"?t+"ew":n==="nw"||n==="se"?t+"nwse":t+"nesw";}var sj="djs-resizing",lj="resize-not-ok",rue=500;function dP(n,t,e){function i(a){var r=a.shape,l=a.newBounds,p=a.frame;p||(p=a.frame=e.addFrame(r,t.getActiveLayer()),t.addMarker(r,sj)),l.width>5&<(p,{x:l.x,width:l.width}),l.height>5&<(p,{y:l.y,height:l.height}),a.canExecute?En(p).remove(lj):En(p).add(lj);}function o(a){var r=a.shape,l=a.frame;l&&Hi(a.frame),t.removeMarker(r,sj);}n.on("resize.move",rue,function(a){i(a.context);}),n.on("resize.cleanup",function(a){o(a.context);});}dP.$inject=["eventBus","canvas","previewSupport"];var mP=-6,uP=8,fP=20,hx="djs-resizer",sue=["n","w","s","e","nw","ne","se","sw"];function ip(n,t,e,i){this._resize=i,this._canvas=t;var o=this;n.on("selection.changed",function(a){var r=a.newSelection;o.removeResizers(),r.length===1&&ne(r,Ra(o.addResizer,o));}),n.on("shape.changed",function(a){var r=a.element;e.isSelected(r)&&(o.removeResizers(),o.addResizer(r));});}ip.prototype.makeDraggable=function(n,t,e){var i=this._resize;function o(a){ol(a)&&i.activate(a,n,e);}Cn.bind(t,"mousedown",o),Cn.bind(t,"touchstart",o);};ip.prototype._createResizer=function(n,t,e,i){var o=this._getResizersParent(),a=lue(i),r=xt("g");En(r).add(hx),En(r).add(hx+"-"+n.id),En(r).add(hx+"-"+i),Kt(o,r);var l=xt("rect");lt(l,{x:-uP/2+a.x,y:-uP/2+a.y,rx:2,width:uP,height:uP}),En(l).add(hx+"-visual"),Kt(r,l);var p=xt("rect");return lt(p,{x:-fP/2+a.x,y:-fP/2+a.y,width:fP,height:fP}),En(p).add(hx+"-hit"),Kt(r,p),dh(r,t,e),r;};ip.prototype.createResizer=function(n,t){var e=rO(n,t),i=this._createResizer(n,e.x,e.y,t);this.makeDraggable(n,i,t);};ip.prototype.addResizer=function(n){var t=this;zn(n)||ne(sue,function(e){t._resize.canResize({shape:n,direction:e})&&t.createResizer(n,e);});};ip.prototype.removeResizers=function(){var n=this._getResizersParent();Tp(n);};ip.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers");};ip.$inject=["eventBus","canvas","selection","resize"];function lue(n){var t={x:0,y:0};return n.indexOf("e")!==-1?t.x=-mP:n.indexOf("w")!==-1&&(t.x=mP),n.indexOf("s")!==-1?t.y=-mP:n.indexOf("n")!==-1&&(t.y=mP),t;}var hP={__depends__:[er,Mr,Hl],__init__:["resize","resizePreview","resizeHandles"],resize:["type",Vu],resizePreview:["type",dP],resizeHandles:["type",ip]};var cue=2e3;function Gu(n,t,e,i,o,a,r){this._bpmnFactory=t,this._canvas=e,this._modeling=o,this._textRenderer=r,i.registerProvider(this),n.on("element.dblclick",function(p){l(p.element,!0);}),n.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open","root.set","selection.changed"],function(){i.isActive()&&i.complete();}),n.on(["shape.remove","connection.remove"],cue,function(p){i.isActive(p.element)&&i.cancel();}),n.on(["commandStack.changed"],function(p){i.isActive()&&i.cancel();}),n.on("directEditing.activate",function(p){a.removeResizers();}
968),n.on("create.end",500,function(p){var d=p.context,f=d.shape,h=p.context.canExecute,g=p.isTouch;g||h&&(d.hints&&d.hints.createElementsBehavior===!1||l(f));}),n.on("autoPlace.end",500,function(p){l(p.shape);});function l(p,d){(d||en(p,["bpmn:Activity","bpmn:Event","bpmn:TextAnnotation","bpmn:Participant"]))&&i.activate(p);}}Gu.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"];Gu.prototype.activate=function(n){var t=za(n);if(t!==void 0){var e={text:t},i=this.getEditingBBox(n);me(e,i);var o={},a=e.style||{};return me(a,{backgroundColor:null,border:null}),(en(n,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||cj(n))&&me(o,{centerVertically:!0}),tl(n)&&(me(o,{resizable:!0,autoResize:!0}),me(a,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),z(n,"bpmn:TextAnnotation")&&(me(o,{resizable:!0,autoResize:!0}),me(a,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),me(e,{options:o,style:a}),e;}};Gu.prototype.getEditingBBox=function(n){var t=this._canvas,e=n.label||n,i=t.getAbsoluteBBox(e),o={x:i.x+i.width/2,y:i.y+i.height/2},a={x:i.x,y:i.y},r=t.zoom(),l=this._textRenderer.getDefaultStyle(),p=this._textRenderer.getExternalStyle(),d=p.fontSize*r,f=p.lineHeight,h=l.fontSize*r,g=l.lineHeight,b={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};if(z(n,"bpmn:Lane")||mue(n)){var w=ao(n),T=w?{width:i.height,height:30*r,x:i.x-i.height/2+15*r,y:o.y-30*r/2}:{width:i.width,height:30*r};me(a,T),me(b,{fontSize:h+"px",lineHeight:g,paddingTop:7*r+"px",paddingBottom:7*r+"px",paddingLeft:5*r+"px",paddingRight:5*r+"px",transform:w?"rotate(-90deg)":null});}if(due(n)){var O=ao(n),V=O?{width:i.width,height:i.height}:{width:i.height,height:i.width,x:o.x-i.height/2,y:o.y-i.width/2};me(a,V),me(b,{fontSize:h+"px",lineHeight:g,paddingTop:7*r+"px",paddingBottom:7*r+"px",paddingLeft:5*r+"px",paddingRight:5*r+"px",transform:O?null:"rotate(-90deg)"});}(en(n,["bpmn:Task","bpmn:CallActivity"])||cj(n))&&(me(a,{width:i.width,height:i.height}),me(b,{fontSize:h+"px",lineHeight:g,paddingTop:7*r+"px",paddingBottom:7*r+"px",paddingLeft:5*r+"px",paddingRight:5*r+"px"})),pue(n)&&(me(a,{width:i.width,x:i.x}),me(b,{fontSize:h+"px",lineHeight:g,paddingTop:7*r+"px",paddingBottom:7*r+"px",paddingLeft:5*r+"px",paddingRight:5*r+"px"}));var j=1,L=i.width+2*j;if(e.labelTarget&&(me(a,{width:L,height:i.height+2*j,x:i.x-j,y:i.y-j}),me(b,{fontSize:d+"px",lineHeight:f})),tl(e)&&!nm(e)&&!Ut(e)){var A=U0(n),J=t.getAbsoluteBBox({x:A.x,y:A.y,width:0,height:0}),Q=d,te=Wc.width*r+2*j;me(a,{width:te,height:Q+2*j,x:J.x-te/2,y:J.y-Q/2-j}),me(b,{fontSize:d+"px",lineHeight:f});}return z(n,"bpmn:TextAnnotation")&&(me(a,{width:i.width+2*j,height:i.height+2*j,x:i.x-j,y:i.y-j,minWidth:30*r,minHeight:10*r}),me(b,{textAlign:"left",paddingTop:Np*r+"px",paddingBottom:Np*r+"px",paddingLeft:Np*r+"px",paddingRight:Np*r+"px",fontSize:h+"px",lineHeight:g})),{bounds:a,style:b};};Gu.prototype.update=function(n,t,e,i){var o,a;z(n,"bpmn:TextAnnotation")&&(a=this._canvas.getAbsoluteBBox(n),o={x:n.x,y:n.y,width:n.width/a.width*i.width,height:n.height/a.height*i.height}),uue(t)&&(t=null),this._modeling.updateLabel(n,t,o);};function cj(n){return z(n,"bpmn:SubProcess")&&!mn(n);}function pue(n){return z(n,"bpmn:SubProcess")&&mn(n);}function due(n){return z(n,"bpmn:Participant")&&!mn(n);}function mue(n){return z(n,"bpmn:Participant")&&mn(n);}function uue(n){return!n||!n.trim();}var pj="djs-element-hidden",dj="djs-label-hidden";function _P(n,t,e){var i=this,o=t.getDefaultLayer(),a,r,l;n.on("directEditing.activate",function(p){var d=p.active;if(a=d.element.label||d.element,z(a,"bpmn:TextAnnotation")){r=t.getAbsoluteBBox(a),l=xt("g");var f=e.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:a.width,containerHeight:a.height,position:{mx:0,my:0}}),h=i.path=xt("path");lt(h,{d:f,strokeWidth:2,stroke:fue(a)}),Kt(l,h),Kt(o,l),Ao(l,a.x,a.y);}z(a,"bpmn:TextAnnotation")||a.labelTarget?t.addMarker(a,pj):(z(a,"bpmn:Task")||z(a,"bpmn:CallActivity")||z(a,"bpmn:SubProcess")||z(a,"bpmn:Participant")||z(a,"bpmn:Lane"))&&t.addMarker(a,dj);}),n.on("directEditing.resize",function(p){if(z(a,"bpmn:TextAnnotation")){var d=p.height,f=p.dy,h=Math.max(a.height/r.height*(d+f),0),g=e.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:a.width,containerHeight:h,position:{mx:0,my:0}});lt(i.path,{d:g});}}),n.on(["directEditing.complete","directEditing.cancel"],function(p){var d=p.active;d&&(t.removeMarker(d.element.label||d.element,pj),t.removeMarker(a,dj)),a=void 0,r=void 0,l&&(Hi(l),l=void 0);});}_P.$inject=["eventBus","canvas","pathMap"];function fue(n,t){var e=In(n);return e.get("stroke")||t||"black";}var mj={__depends__:[xh,hP,iP],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",Gu],labelEditingPreview:["type",_P]};var hue=500,_ue=1e3;function Wl(n,t,e){this._eventBus=n,this._elementRegistry=e,this._outlineOffset=5,this._outlineStyle=t.cls("djs-outline",["no-fill"]);var i=this;function o(a){zN(a)||i.createOutline(a);}n.on("element.hover",function(a){o(a.element);}),n.on("selection.changed",function(a){ne(a.newSelection,o);}),n.on(["shape.changed","connection.changed"],hue,function(a){var r=a.element,l=a.gfx,p=si(".djs-outline",l);p&&i.updateOutline(r,p);});}Wl.prototype.createOutline=function(n){var t=this._elementRegistry.getGraphics(n);if(!t)throw new Error("cannot create outline for non-rendered element");var e=si(".djs-outline",t);return e||(e=this.getOutline(n)||this._createOutlineGfx(),Kt(t,e),this.updateOutline(n,e)),e;};Wl.prototype._createOutlineGfx=function(){var n=xt("rect");return lt(n,me({x:0,y:0,rx:4,width:100,height:100},this._outlineStyle)),n;};Wl.prototype.updateOutline=function(n,t){n.waypoints?this.updateConnectionOutline(t,n):this.updateShapeOutline(t,n);};Wl.prototype.updateShapeOutline=function(n,t){var e=!1,i=this._getProviders();i.length&&ne(i,function(o){e=e||o.updateOutline(t,n);}),e||lt(n,{x:-this._outlineOffset,y:-this._outlineOffset,width:t.width+this._outlineOffset*2,height:t.height+this._outlineOffset*2});};Wl.prototype.updateConnectionOutline=function(n,t){var e=Pi(t);lt(n,{x:e.x-this._outlineOffset,y:e.y-this._outlineOffset,width:e.width+this._outlineOffset*2,height:e.height+this._outlineOffset*2});};Wl.prototype.registerProvider=function(n,t){t||(t=n,n=_ue),this._eventBus.on("outline.getProviders",n,function(e){e.providers.push(t);});};Wl.prototype._getProviders=function(){var n=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(n),n.providers;};Wl.prototype.getOutline=function(n){var t,e=this._getProviders();return ne(e,function(i){qo(i.getOutline)&&(t=t||i.getOutline(n));}),t;};Wl.$inject=["eventBus","styles","elementRegistry"];var gP=6;function _x(n,t,e){this._canvas=t;var i=this;n.on("element.changed",function(o){e.isSelected(o.element)&&i._updateMultiSelectionOutline(e.get());}),n.on("selection.changed",function(o){var a=o.newSelection;i._updateMultiSelectionOutline(a);});}_x.prototype._updateMultiSelectionOutline=function(n){var t=this._canvas.getLayer("selectionOutline");Tp(t);var e=n.length>1,i=this._canvas.getContainer();if(En(i)[e?"add":"remove"]("djs-multi-select"),!!e){var o=gue(Pi(n)),a=xt("rect");lt(a,me({rx:3},o)),En(a).add("djs-selection-outline"),Kt(t,a);}};_x.$inject=["eventBus","canvas","selection"];function gue(n){return{x:n.x-gP,y:n.y-gP,width:n.width+gP*2,height:n.height+gP*2};}var f_={__depends__:[la],__init__:["outline","multiSelectionOutline"],outline:["type",Wl],multiSelectionOutline:["type",_x]};var uj=["bpmn:Event","bpmn:SequenceFlow","bpmn:Gateway"],fj={class:"bjs-label-link",stroke:"var(--element-selected-outline-secondary-stroke-color)",strokeDasharray:"5, 5"},xue=15,xP=2;function CP(n,t,e,i,o){let a=t.getLayer("overlays");n.on(["selection.changed","shape.changed"],function(){l();}),n.on("selection.changed",function({newSelection:h}){let g=h.filter(b=>en(b,uj));if(g.length===1){let b=g[0];Ut(b)?r(b,b.labelTarget):b.labels?.length&&r(b.labels[0],b);}if(g.length===2){let b=g.find(Ut),w=g.find(T=>T.labels?.includes(b));b&&w&&r(b,w);}}),n.on("shape.changed",function({element:h}){!en(h,uj)||!f(h)||(Ut(h)?r(h,h.labelTarget):h.labels?.length&&r(h.labels[0],h));});function r(h,g){let b=Rt(h),w=zn(g)?Py(b,PA(g.waypoints)):Rt(g),T=Bc([w,b],fj),O=T.getAttribute("d"),j=o.isSelected(h)?p(h):d(h),L=Zd(j,O);if(!L)return;let A;if(zn(g))A=w;else{let te=o.isSelected(g)?p(g):d(g);A=Zd(te,O)||Rt(g);}Gp(A,L)<xue||(L0(T,[A,L]),Kt(a,T));}function l(){ru(`.${fj.class}
968`,a).forEach(Hi);}function p(h){let g=i.getOutline(h);if(!g)return d(h);if(g.x){let b={x:h.x+Pm(g,"x")-xP,y:h.y+Pm(g,"y")-xP,width:Pm(g,"width")+xP*2,height:Pm(g,"height")+xP*2};return W0(b,Pm(g,"rx"));}if(g.cx){let b=Pm(g,"r"),w={x:h.x+Pm(g,"cx")-b,y:h.y+Pm(g,"cy")-b,width:b*2,height:b*2};return Yv(w);}}function d(h){return e.getShapePath(h);}function f(h){return o.isSelected(h);}}CP.$inject=["eventBus","canvas","graphicsFactory","outline","selection"];function Pm(n,t){return parseFloat(lt(n,t)||0);}var hj={__depends__:[la,f_],__init__:["labelLink"],labelLink:["type",CP]};var Cue=new Gl("tt");function vue(n){var t=ri('<div class="djs-tooltip-container" />');return La(t,{position:"absolute",width:"0",height:"0"}),n.insertBefore(t,n.firstChild),t;}function bue(n,t,e){La(n,{left:t+"px",top:e+"px"});}function lO(n,t){n.style.display=t===!1?"none":"";}var _j="djs-tooltip",sO="."+_j;function Fr(n,t){this._eventBus=n,this._canvas=t,this._ids=Cue,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=vue(t.getContainer());var e=this;wa.bind(this._tooltipRoot,sO,"mousedown",function(i){i.stopPropagation();}),wa.bind(this._tooltipRoot,sO,"mouseover",function(i){e.trigger("mouseover",i);}),wa.bind(this._tooltipRoot,sO,"mouseout",function(i){e.trigger("mouseout",i);}),this._init();}Fr.$inject=["eventBus","canvas"];Fr.prototype.add=function(n){if(!n.position)throw new Error("must specifiy tooltip position");if(!n.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return n=me({},this._tooltipDefaults,n,{id:t}),this._addTooltip(n),n.timeout&&this.setTimeout(n),t;};Fr.prototype.trigger=function(n,t){var e=t.delegateTarget||t.target,i=this.get(Zo(e,"data-tooltip-id"));i&&(n==="mouseover"&&i.timeout&&this.clearTimeout(i),n==="mouseout"&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)));};Fr.prototype.get=function(n){return typeof n!="string"&&(n=n.id),this._tooltips[n];};Fr.prototype.clearTimeout=function(n){if(n=this.get(n),!!n){var t=n.removeTimer;t&&(clearTimeout(t),n.removeTimer=null);}};Fr.prototype.setTimeout=function(n){if(n=this.get(n),!!n){this.clearTimeout(n);var t=this;n.removeTimer=setTimeout(function(){t.remove(n);},n.timeout);}};Fr.prototype.remove=function(n){var t=this.get(n);t&&(Cs(t.html),Cs(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id]);};Fr.prototype.show=function(){lO(this._tooltipRoot);};Fr.prototype.hide=function(){lO(this._tooltipRoot,!1);};Fr.prototype._updateRoot=function(n){var t=n.scale||1,e=n.scale||1,i="matrix("+t+",0,0,"+e+","+-1*n.x*t+","+-1*n.y*e+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i;};Fr.prototype._addTooltip=function(n){var t=n.id,e=n.html,i,o=this._tooltipRoot;e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),ka(e)&&(e=ri(e)),i=ri('<div data-tooltip-id="'+t+'" class="'+_j+'">'),La(i,{position:"absolute"}),i.appendChild(e),n.type&&Ji(i).add("djs-tooltip-"+n.type),n.className&&Ji(i).add(n.className),n.htmlContainer=i,o.appendChild(i),this._tooltips[t]=n,this._updateTooltip(n);};Fr.prototype._updateTooltip=function(n){var t=n.position,e=n.htmlContainer;bue(e,t.x,t.y);};Fr.prototype._updateTooltipVisibilty=function(n){ne(this._tooltips,function(t){var e=t.show,i=t.htmlContainer,o=!0;e&&((e.minZoom>n.scale||e.maxZoom<n.scale)&&(o=!1),lO(i,o));});};Fr.prototype._init=function(){var n=this;function t(e){n._updateRoot(e),n._updateTooltipVisibilty(e),n.show();}this._eventBus.on("canvas.viewbox.changing",function(e){n.hide();}),this._eventBus.on("canvas.viewbox.changed",function(e){t(e.viewbox);});};var gj={__init__:["tooltips"],tooltips:["type",Fr]};var yue="flow elements must be children of pools/participants",Pue="Data object must be placed within a pool/participant.";function vP(n,t,e){function i(o,a,r){t.add({position:{x:o.x+5,y:o.y+5},type:"error",timeout:r||2e3,html:"<div>"+a+"</div>"});}n.on(["shape.move.rejected","create.rejected"],function(o){var a=o.context,r=a.shape,l=a.target;z(l,"bpmn:Collaboration")&&(z(r,"bpmn:FlowNode")?i(o,e(yue)):z(r,"bpmn:DataObjectReference")&&i(o,e(Pue)));});}vP.$inject=["eventBus","tooltips","translate"];var xj={__depends__:[gj],__init__:["modelingFeedback"],modelingFeedback:["type",vP]};var wue=500,Sue=1250,Mue=1500,bP=Math.round;function Oue(n){return{x:n.x+bP(n.width/2),y:n.y+bP(n.height/2)};}function yP(n,t,e,i,o){function a(l,p,d,f){return o.allowed("elements.move",{shapes:l,delta:p,position:d,target:f});}n.on("shape.move.start",Mue,function(l){var p=l.context,d=l.shape,f=i.get().slice();f.indexOf(d)===-1&&(f=[d]),f=Eue(f),me(p,{shapes:f,validatedShapes:f,
968shape:d});}),n.on("shape.move.start",Sue,function(l){var p=l.context,d=p.validatedShapes,f;if(f=p.canExecute=a(d),!f)return!1;}),n.on("shape.move.move",wue,function(l){var p=l.context,d=p.validatedShapes,f=l.hover,h={x:l.dx,y:l.dy},g={x:l.x,y:l.y},b;if(b=a(d,h,g,f),p.delta=h,p.canExecute=b,b===null){p.target=null;return;}p.target=f;}),n.on("shape.move.end",function(l){var p=l.context,d=p.delta,f=p.canExecute,h=f==="attach",g=p.shapes;if(f===!1)return!1;d.x=bP(d.x),d.y=bP(d.y),!(d.x===0&&d.y===0)&&e.moveElements(g,d,p.target,{primaryShape:p.shape,attach:h});}),n.on("element.mousedown",function(l){if(ol(l)){var p=zp(l);if(!p)throw new Error("must supply DOM mousedown event");return r(p,l.element);}});function r(l,p,d,f){if(eo(d)&&(f=d,d=!1),!(p.waypoints||!p.parent)&&!En(l.target).has("djs-hit-no-move")){var h=Oue(p),g=t.init(l,h,"shape.move",{cursor:"grabbing",autoActivate:d,data:{shape:p,context:f||{}}});if(g!==!1)return!0;}}this.start=r;}yP.$inject=["eventBus","dragging","modeling","selection","rules"];function Eue(n){var t=uc(n,"id");return Yt(n,function(e){for(;e=e.parent;)if(t[e.id])return!1;return!0;});}var Cj=499,cO="djs-dragging",vj="drop-ok",bj="drop-not-ok",yj="new-parent",Pj="attach-ok";function PP(n,t,e,i){function o(p){var d=a(p),f=Tue(d);return f;}function a(p){var d=$c(p),f=d.flatMap(b=>(b.incoming||[]).concat(b.outgoing||[])),h=d.concat(f),g=[...new Set(h)];return g;}function r(p,d){[Pj,vj,bj,yj].forEach(function(f){f===d?t.addMarker(p,f):t.removeMarker(p,f);});}function l(p,d,f){i.addDragger(d,p.dragGroup),f&&t.addMarker(d,cO),p.allDraggedElements?p.allDraggedElements.push(d):p.allDraggedElements=[d];}n.on("shape.move.start",Cj,function(p){var d=p.context,f=d.shapes,h=d.allDraggedElements,g=o(f);if(!d.dragGroup){var b=xt("g");lt(b,e.cls("djs-drag-group",["no-events"]));var w=t.getActiveLayer();Kt(w,b),d.dragGroup=b;}g.forEach(function(T){i.addDragger(T,d.dragGroup);}),h?h=oh([h,a(f)]):h=a(f),ne(h,function(T){t.addMarker(T,cO);}),d.allDraggedElements=h,d.differentParents=Iue(f);}),n.on("shape.move.move",Cj,function(p){var d=p.context,f=d.dragGroup,h=d.target,g=d.shape.parent,b=d.canExecute;h&&(b==="attach"?r(h,Pj):d.canExecute&&g&&h.id!==g.id?r(h,yj):r(h,d.canExecute?vj:bj)),Ao(f,p.dx,p.dy);}),n.on(["shape.move.out","shape.move.cleanup"],function(p){var d=p.context,f=d.target;f&&r(f,null);}),n.on("shape.move.cleanup",function(p){var d=p.context,f=d.allDraggedElements,h=d.dragGroup;ne(f,function(g){t.removeMarker(g,cO);}),h&&Hi(h);}),this.makeDraggable=l;}PP.$inject=["eventBus","canvas","styles","previewSupport"];function Tue(n){var t=new Set();n.forEach(function(i){t.add(i.id);});var e=Yt(n,function(i){return zn(i)?t.has(i.source.id)&&t.has(i.target.id):!0;});return e;}function Iue(n){return pN(uc(n,function(t){return t.parent&&t.parent.id;}))!==1;}var wj={__depends__:[rm,la,f_,er,Mr,Hl],__init__:["move","movePreview"],move:["type",yP],movePreview:["type",PP]};var kue=300;function Xp(n){this._canvas=n,this._mount=null,this._current=null,this._showTimer=null;}Xp.$inject=["canvas"];Xp.prototype.add=function(n){let{container:t,selector:e,showDelay:i=kue}=n;wa.bind(t,e,"mouseover",o=>this._show(o.delegateTarget,n,i)),wa.bind(t,e,"mouseout",o=>{let{delegateTarget:a,relatedTarget:r}=o;r&&a.contains(r)||this._hide();});};Xp.prototype._show=function(n,t,e){let i=t.getContent(n);i&&(this._current={target:n,content:i,getPosition:t.getPosition},clearTimeout(this._showTimer),this._showTimer=setTimeout(()=>this._render(),e));};Xp.prototype._hide=function(){clearTimeout(this._showTimer),this._current=null,this._render();};Xp.prototype._render=function(){let n=this._getMount();if(!this._current){xu(null,n);return;}let{target:t,content:e,getPosition:i}=this._current,{x:o,y:a,placement:r="right"}=i(t),l={left:`${o}px`,top:`${a}px`};xu(Yn`<div 969 class="djs-hover-tooltip djs-hover-tooltip--${r}" 970 style=${l} 971 >${e}</div>`,n);};Xp.prototype._getMount=function(){return this._mount||(this._mount=ri('<div class="djs-hover-tooltip-container"></div>'),this._canvas.getContainer().appendChild(this._mount)),this._mount;};var Sj={__init__:["hoverTooltip"],hoverTooltip:["type",Xp]};var Oj=".djs-palette-toggle",Ej=".entry",Rue=Oj+", "+Ej,pO="djs-palette-",Nue="shown",dO="open",Mj="two-column",Aue=1e3;function xa(n,t){this._eventBus=n,this._canvas=t;var e=this;n.on("tool-manager.update",function(i){var o=i.tool;e.updateToolHighlight(o);}),n.on("i18n.changed",function(){e._update();}),n.on("diagram.init",function(){e._diagramInitialized=!0,e._rebuild();});}xa.$inject=["eventBus","canvas"];xa.prototype.registerProvider=function(n,t){t||(t=n,n=Aue),this._eventBus.on("palette.getProviders",n,function(e){e.providers.push(t);}),this._rebuild();};xa.prototype.getEntries=function(){var n=this._getProviders();return n.reduce(jue,{});};xa.prototype._rebuild=function(){if(this._diagramInitialized){var n=this._getProviders();n.length&&(this._container||this._init(),this._update());}};xa.prototype._init=function(){var n=this,t=this._eventBus,e=this._getParentContainer(),i=this._container=ri(xa.HTML_MARKUP);e.appendChild(i),Ji(e).add(pO+Nue),wa.bind(i,Rue,"click",function(o){var a=o.delegateTarget;if(j0(a,Oj))return n.toggle();n.trigger("click",o);}),Cn.bind(i,"mousedown",function(o){o.stopPropagation();}),wa.bind(i,Ej,"dragstart",function(o){n.trigger("dragstart",o);}),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i});};xa.prototype._getProviders=function(n){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers;};xa.prototype._toggleState=function(n){n=n||{};var t=this._getParentContainer(),e=this._container,i=this._eventBus,o,a=Ji(e),r=Ji(t);"twoColumn"in n?o=n.twoColumn:o=this._needsCollapse(t.clientHeight,this._entries||{}
971),a.toggle(Mj,o),r.toggle(pO+Mj,o),"open"in n&&(a.toggle(dO,n.open),r.toggle(pO+dO,n.open)),i.fire("palette.changed",{twoColumn:o,open:this.isOpen()});};xa.prototype._update=function(){var n=si(".djs-palette-entries",this._container),t=this._entries=this.getEntries();Jd(n),ne(t,function(e,i){var o=e.group||"default",a=si("[data-group="+jp(o)+"]",n);a||(a=ri('<div class="group"></div>'),Zo(a,"data-group",o),n.appendChild(a));var r=e.html||(e.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),l=ri(r);if(a.appendChild(l),!e.separator&&(Zo(l,"data-action",i),e.title&&(Zo(l,"aria-label",e.title),Zo(l,"role","button")),e.className&&Due(l,e.className),e.imageUrl)){var p=ri("<img>");Zo(p,"src",e.imageUrl),l.appendChild(p);}}),this.open();};xa.prototype.trigger=function(n,t,e){var i,o,a=t.delegateTarget||t.target;return a?(i=Zo(a,"data-action"),o=t.originalEvent||t,this.triggerEntry(i,n,o,e)):t.preventDefault();};xa.prototype.triggerEntry=function(n,t,e,i){var o=this._entries,a,r;if(a=o[n],!!a&&(r=a.action,this._eventBus.fire("palette.trigger",{entry:a,event:e})!==!1)){if(qo(r)){if(t==="click")return r(e,i);}else if(r[t])return r[t](e,i);e.preventDefault();}};xa.prototype._layoutChanged=function(){this._toggleState({});};xa.prototype._needsCollapse=function(n,t){var e=50,i=Object.keys(t).length*46;return n<i+e;};xa.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1});};xa.prototype.open=function(){this._toggleState({open:!0});};xa.prototype.toggle=function(){this.isOpen()?this.close():this.open();};xa.prototype.isActiveTool=function(n){return n&&this._activeTool===n;};xa.prototype.updateToolHighlight=function(n){var t,e;this._toolsContainer||(t=si(".djs-palette-entries",this._container),this._toolsContainer=si("[data-group=tools]",t)),e=this._toolsContainer,ne(e.children,function(i){var o=i.getAttribute("data-action");if(o){var a=Ji(i);o=o.replace("-tool",""),a.contains("entry")&&o===n?a.add("highlighted-entry"):a.remove("highlighted-entry");}});};xa.prototype.isOpen=function(){return Ji(this._container).has(dO);};xa.prototype._getParentContainer=function(){return this._canvas.getContainer();};xa.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>';function Due(n,t){var e=Ji(n),i=gt(t)?t:t.split(/\s+/g);i.forEach(function(o){e.add(o);});}function jue(n,t){var e=t.getPaletteEntries();return qo(e)?e(n):(ne(e,function(i,o){n[o]=i;}),n);}function mO(n){let{title:t,shortcut:e}=n,i=e?Yn`<kbd class="djs-palette-tooltip-shortcut">${e}</kbd>`:null;return Yn` 972 <span class="djs-palette-tooltip-label">${t}</span> 973 ${i} 974 `;}var Lue=".djs-palette-entries .entry",zue=8;function h_(n,t,e){this._palette=t,this._hoverTooltip=e,this._entries={},n.on("palette.create",i=>this._init(i.container)),n.on("palette.changed",()=>this._updateEntries());}h_.$inject=["eventBus","palette","hoverTooltip"];h_.prototype._init=function(n){this._updateEntries(),this._hoverTooltip.add({container:n,selector:Lue,getContent:t=>{let e=this._entries[Zo(t,"data-action")];return!e||!e.title?null:Yn`<${mO} 975 title=${e.title} 976 shortcut=${e.shortcut} 977 />`;},getPosition:t=>{let e=t.getBoundingClientRect();return{x:e.right+zue,y:e.top+e.height/2,placement:"right"};}});};h_.prototype._updateEntries=function(){this._entries=this._palette.getEntries();};var Tj={__depends__:[Sj],__init__:["palette","paletteTooltip"],palette:["type",xa],paletteTooltip:["type",h_]};var Rj="crosshair",Ij="selected",Fue="djs-dragging-active-lasso";function op(n,t,e,i,o,a,r){this._selection=o,this._dragging=e,this._mouse=r;var l=this,p={create:function(h){var g=t.getActiveLayer(),b=h.frame=xt("rect");lt(b,{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),Kt(g,b),d(!0),this.update(h);},update:function(h){var g=h.frame,b=h.bbox;g&&b&<(g,{x:b.x,y:b.y,width:b.width,height:b.height});var w=h.marked,T=h.lastMarked;if(w&&T){for(let O of T)w.has(O)||t.removeMarker(O,Ij);for(let O of w)T.has(O)||t.addMarker(O,Ij);}},remove:function(h){this.update(h),h.frame&&Hi(h.frame),d(!1);}};function d(h){En(t.getContainer()).toggle(Fue,h);}function f(h){var g=i.getAll();return new Set(mc(Vc(g,h)));}a.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),n.on("lasso.selection.end",function(h){var g=h.originalEvent.target;!h.hover&&!(g instanceof SVGElement)||n.once("lasso.selection.ended",function(){l.activateLasso(h.originalEvent,!0);});}),n.on("lasso.end",0,function(h){var g=h.context;l._select(Array.from(g.marked));}),n.on("lasso.start",function(h){var g=h.context;g.bbox=kj(h),g.add=fu(h),g.lastMarked=new Set(o.get()),g.add?g.marked=g.lastMarked:g.marked=new Set(),g.initialMarked=g.marked,p.create(g);}),n.on("lasso.move",function(h){var g=h.context,b=g.bbox=kj(h),w=f(b),T=g.initialMarked.union(w);g.lastMarked=g.marked,g.marked=T,p.update(g);}),n.on("lasso.cleanup",function(h){var g=h.context;g.lastMarked=g.marked,g.marked=new Set(o.get()),p.remove(h.context);}),n.on("element.mousedown",1500,function(h){if(fu(h))return l.activateLasso(h.originalEvent),!0;});}op.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"];op.prototype.activateLasso=function(n,t){this._dragging.init(n,"lasso",{autoActivate:t,cursor:Rj,data:{context:{}},keepSelection:!0}
977);};op.prototype.activateSelection=function(n,t){this._dragging.init(n,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:Rj,data:{context:{}},keepSelection:!0});};op.prototype._select=function(n){this._selection.select(n);};op.prototype.select=function(n,t,e=[]){var i=mc(Vc(n,t));this._select([...e,...i]);};op.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var n=this._mouse.getLastMoveEvent();this.activateSelection(n,!!n);};op.prototype.isActive=function(){var n=this._dragging.context();return n&&/^lasso/.test(n.prefix);};function kj(n){var t={x:n.x-n.dx,y:n.y-n.dy},e={x:n.x,y:n.y},i;return t.x<=e.x&&t.y<e.y||t.x<e.x&&t.y<=e.y?i={x:t.x,y:t.y,width:e.x-t.x,height:e.y-t.y}:t.x>=e.x&&t.y<e.y||t.x>e.x&&t.y<=e.y?i={x:e.x,y:t.y,width:t.x-e.x,height:e.y-t.y}:t.x<=e.x&&t.y>e.y||t.x<e.x&&t.y>=e.y?i={x:t.x,y:e.y,width:e.x-t.x,height:t.y-e.y}:t.x>=e.x&&t.y>e.y||t.x>e.x&&t.y>=e.y?i={x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}:i={x:e.x,y:e.y,width:0,height:0},i;}var Nj={__depends__:[vm,Zc],__init__:["lassoTool"],lassoTool:["type",op]};var uO=1500,Dj="grab";function wm(n,t,e,i,o,a){this._dragging=e,this._mouse=a;var r=this,l=i.get("keyboard",!1);o.registerTool("hand",{tool:"hand",dragging:"hand.move"}),n.on("element.mousedown",uO,function(p){if(Fp(p))return r.activateMove(p.originalEvent,!0),!1;}),l&&l.addListener(uO,function(p){if(!(!Aj(p.keyEvent)||r.isActive())){var d=r._mouse.getLastMoveEvent();r.activateMove(d,!!d);}},"keyboard.keydown"),l&&l.addListener(uO,function(p){!Aj(p.keyEvent)||!r.isActive()||r.toggle();},"keyboard.keyup"),n.on("hand.end",function(p){var d=p.originalEvent.target;if(!p.hover&&!(d instanceof SVGElement))return!1;n.once("hand.ended",function(){r.activateMove(p.originalEvent,{reactivate:!0});});}),n.on("hand.move.move",function(p){var d=t.viewbox().scale;t.scroll({dx:p.dx*d,dy:p.dy*d});}),n.on("hand.move.end",function(p){var d=p.context,f=d.reactivate;return!Fp(p)&&f&&n.once("hand.move.ended",function(h){r.activateHand(h.originalEvent,!0,!0);}),!1;});}wm.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"];wm.prototype.activateMove=function(n,t,e){typeof t=="object"&&(e=t,t=!1),this._dragging.init(n,"hand.move",{autoActivate:t,cursor:Dj,data:{context:e||{}}});};wm.prototype.activateHand=function(n,t,e){this._dragging.init(n,"hand",{trapClick:!1,autoActivate:t,cursor:Dj,data:{context:{reactivate:e}}});};wm.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var n=this._mouse.getLastMoveEvent();this.activateHand(n,!!n);};wm.prototype.isActive=function(){var n=this._dragging.context();return n?/^(hand|hand\.move)$/.test(n.prefix):!1;};function Aj(n){return ca("Space",n);}var jj={__depends__:[vm,Zc],__init__:["handTool"],handTool:["type",wm]};var Lj="connect-ok",zj="connect-not-ok";function Sm(n,t,e,i,o,a,r){var l=this;this._dragging=t,this._rules=a,this._mouse=r,o.registerTool("global-connect",{tool:"global-connect",dragging:"global-connect.drag"}),n.on("global-connect.hover",function(p){var d=p.context,f=p.hover,h=d.canStartConnect=l.canStartConnect(f);h!==null&&(d.startTarget=f,i.addMarker(f,h?Lj:zj));}),n.on(["global-connect.out","global-connect.cleanup"],function(p){var d=p.context.startTarget,f=p.context.canStartConnect;d&&i.removeMarker(d,f?Lj:zj);}),n.on(["global-connect.ended"],function(p){var d=p.context,f=d.startTarget,h={x:p.x,y:p.y},g=l.canStartConnect(f);if(g)return n.once("element.out",function(){n.once(["connect.ended","connect.canceled"],function(){n.fire("global-connect.drag.ended");}),e.start(null,f,h);}),!1;});}Sm.$inject=["eventBus","dragging","connect","canvas","toolManager","rules","mouse"];Sm.prototype.start=function(n,t){this._dragging.init(n,"global-connect",{autoActivate:t,trapClick:!1,data:{context:{}}});};Sm.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var n=this._mouse.getLastMoveEvent();return this.start(n,!!n);};Sm.prototype.isActive=function(){var n=this._dragging.context();return n&&/^global-connect/.test(n.prefix);};Sm.prototype.canStartConnect=function(n){return this._rules.allowed("connection.start",{source:n});};var Fj={__depends__:[kh,er,Mr,vm,Zc],globalConnect:["type",Sm]};function gx(n,t,e,i,o,a,r,l){this._palette=n,this._create=t,this._elementFactory=e,this._spaceTool=i,this._lassoTool=
977o,this._handTool=a,this._globalConnect=r,this._translate=l,n.registerProvider(this);}gx.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"];gx.prototype.getPaletteEntries=function(){var n={},t=this._create,e=this._elementFactory,i=this._spaceTool,o=this._lassoTool,a=this._handTool,r=this._globalConnect,l=this._translate;function p(h,g,b,w,T){function O(V){var j=e.createShape(me({type:h},T));t.start(V,j);}return{group:g,className:b,title:w,action:{dragstart:O,click:O}};}function d(h){var g=e.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),b=e.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:g});t.start(h,[g,b],{hints:{autoSelect:[g]}});}function f(h){t.start(h,e.createParticipantShape());}return me(n,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:l("Activate hand tool"),shortcut:u_.handTool.key,action:{click:function(h){a.activateHand(h);}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:l("Activate lasso tool"),shortcut:u_.lassoTool.key,action:{click:function(h){o.activateSelection(h);}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:l("Activate create/remove space tool"),shortcut:u_.spaceTool.key,action:{click:function(h){i.activateSelection(h);}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:l("Activate global connect tool"),shortcut:u_.globalConnectTool.key,action:{click:function(h){r.start(h);}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":p("bpmn:StartEvent","event","bpmn-icon-start-event-none",l("Create start event")),"create.intermediate-event":p("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",l("Create intermediate/boundary event")),"create.end-event":p("bpmn:EndEvent","event","bpmn-icon-end-event-none",l("Create end event")),"create.exclusive-gateway":p("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",l("Create gateway")),"create.task":p("bpmn:Task","activity","bpmn-icon-task",l("Create task")),"create.data-object":p("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",l("Create data object reference")),"create.data-store":p("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",l("Create data store reference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:l("Create expanded sub-process"),action:{dragstart:d,click:d}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:l("Create pool/participant"),action:{dragstart:f,click:f}},"create.group":p("bpmn:Group","artifact","bpmn-icon-group",l("Create group"))}),n;};var Bj={__depends__:[Tj,Cm,Yy,Nj,jj,Fj,im],__init__:["paletteProvider"],paletteProvider:["type",gx]};var Bue=250;function xx(n,t,e,i,o){Re.call(this,n);function a(l){var p=l.canExecute.replacements;ne(p,function(d){var f=d.oldElementId,h={type:d.newElementType};if(!l.visualReplacements[f]){var g=t.get(f);me(h,{x:g.x,y:g.y});var b=e.createShape(h);i.addShape(b,g.parent);var w=si('[data-element-id="'+jp(g.id)+'"]',l.dragGroup);w&<(w,{display:"none"});var T=o.addDragger(b,l.dragGroup);l.visualReplacements[f]=T,i.removeShape(b);}});}function r(l){var p=l.visualReplacements;ne(p,function(d,f){var h=si('[data-element-id="'+jp(f)+'"]',l.dragGroup);h&<(h,{display:"inline"}),d.remove(),p[f]&&delete p[f];});}n.on("shape.move.move",Bue,function(l){var p=l.context,d=p.canExecute;p.visualReplacements||(p.visualReplacements={}),d&&d.replacements?a(p):r(p);});}xx.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"];Fe(xx,Re);var $j={__depends__:[Hl],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",xx]};var $ue=1250,fO=40,Vue=20,Gue=10,Vj=20,qj=["x","y"],que=Math.abs;function wP(n){n.on(["connect.hover","connect.move","connect.end"],$ue,function(t){var e=t.context,i=e.canExecute,o=e.start,a=e.hover,r=e.source,l=e.target;t.originalEvent&&Qa(t.originalEvent)||(e.initialConnectionStart||(e.initialConnectionStart=e.connectionStart),i&&a&&Jue(t,a,Xue(a)),a&&Wue(i,["bpm
977n:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(e.connectionStart=qs(o),en(a,["bpmn:Event","bpmn:Gateway"])&&Gj(t,qs(a)),en(a,["bpmn:Task","bpmn:SubProcess"])&&Hue(t,a),z(r,"bpmn:BoundaryEvent")&&l===r.host&&Uue(t)):Jj(i,"bpmn:MessageFlow")?(z(o,"bpmn:Event")&&(e.connectionStart=qs(o)),z(a,"bpmn:Event")&&Gj(t,qs(a))):e.connectionStart=e.initialConnectionStart);});}wP.$inject=["eventBus"];function Jue(n,t,e){qj.forEach(function(i){var o=Hj(i,t);n[i]<t[i]+e?Uo(n,i,t[i]+e):n[i]>t[i]+o-e&&Uo(n,i,t[i]+o-e);});}function Hue(n,t){var e=qs(t);qj.forEach(function(i){Yue(n,t,i)&&Uo(n,i,e[i]);});}function Uue(n){var t=n.context,e=t.source,i=t.target;if(!Kue(t)){var o=qs(e),a=Jo(o,i,-10),r=[];/top|bottom/.test(a)&&r.push("x"),/left|right/.test(a)&&r.push("y"),r.forEach(function(l){var p=n[l],d;que(p-o[l])<fO&&(p>o[l]?d=o[l]+fO:d=o[l]-fO,Uo(n,l,d));});}}function Gj(n,t){Uo(n,"x",t.x),Uo(n,"y",t.y);}function Jj(n,t){return n&&n.type===t;}function Wue(n,t){return xs(t,function(e){return Jj(n,e);});}function Hj(n,t){return n==="x"?t.width:t.height;}function Xue(n){return z(n,"bpmn:Task")?Gue:Vue;}function Yue(n,t,e){return n[e]>t[e]+Vj&&n[e]<t[e]+Hj(e,t)-Vj;}function Kue(n){var t=n.hover,e=n.source;return t&&e&&t===e;}function Oc(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={};}Oc.prototype.getSnapOrigin=function(n){return this._snapOrigins[n];};Oc.prototype.setSnapOrigin=function(n,t){this._snapOrigins[n]=t,this._snapLocations.indexOf(n)===-1&&this._snapLocations.push(n);};Oc.prototype.addDefaultSnap=function(n,t){var e=this._defaultSnaps[n];e||(e=this._defaultSnaps[n]=[]),e.push(t);};Oc.prototype.getSnapLocations=function(){return this._snapLocations;};Oc.prototype.setSnapLocations=function(n){this._snapLocations=n;};Oc.prototype.pointsForTarget=function(n){var t=n.id||n,e=this._targets[t];return e||(e=this._targets[t]=new SP(),e.initDefaults(this._defaultSnaps)),e;};function SP(){this._snapValues={};}SP.prototype.add=function(n,t){var e=this._snapValues[n];e||(e=this._snapValues[n]={x:[],y:[]}),e.x.indexOf(t.x)===-1&&e.x.push(t.x),e.y.indexOf(t.y)===-1&&e.y.push(t.y);};SP.prototype.snap=function(n,t,e,i){var o=this._snapValues[t];return o&&D5(n[e],o[e],i);};SP.prototype.initDefaults=function(n){var t=this;ne(n||{},function(e,i){ne(e,function(o){t.add(i,o);});});};var Zue=1250;function ll(n,t,e){var i=this;this._elementRegistry=n,t.on(["create.start","shape.move.start"],function(o){i.initSnap(o);}),t.on(["create.move","create.end","shape.move.move","shape.move.end"],Zue,function(o){var a=o.context,r=a.shape,l=a.snapContext,p=a.target;if(!(o.originalEvent&&Qa(o.originalEvent))&&!(bc(o)||!p)){var d=l.pointsForTarget(p);d.initialized||(d=i.addSnapTargetPoints(d,r,p),d.initialized=!0),e.snap(o,d);}}),t.on(["create.cleanup","shape.move.cleanup"],function(){e.hide();});}ll.$inject=["elementRegistry","eventBus","snapping"];ll.prototype.initSnap=function(n){var t=this._elementRegistry,e=n.context,i=e.shape,o=e.snapContext;o||(o=e.snapContext=new Oc());var a;t.get(i.id)?a=qs(i,n):a={x:n.x+qs(i).x,y:n.y+qs(i).y};var r={x:a.x-i.width/2,y:a.y-i.height/2},l={x:a.x+i.width/2,y:a.y+i.height/2};return o.setSnapOrigin("mid",{x:a.x-n.x,y:a.y-n.y}),Ut(i)||(o.setSnapOrigin("top-left",{x:r.x-n.x,y:r.y-n.y}),o.setSnapOrigin("bottom-right",{x:l.x-n.x,y:l.y-n.y})),o;};ll.prototype.addSnapTargetPoints=function(n,t,e){var i=this.getSnapTargets(t,e);return ne(i,function(o){if(Ut(o)){Ut(t)&&n.add("mid",qs(o));return;}if(zn(o)){if(o.waypoints.length<3)return;var a=o.waypoints.slice(1,-1);ne(a,function(r){n.add("mid",r);});return;}n.add("mid",qs(o));}),!nn(t.x)||!nn(t.y)||this._elementRegistry.get(t.id)&&n.add("mid",qs(t)),n;};ll.prototype.getSnapTargets=function(n,t){return iy(t).filter(function(e){return!Que(e);});};function Que(n){return!!n.hidden;}var Uj=1500;function Mm(n,t){t.invoke(ll,this),n.on(["create.move","create.end"],Uj,ife),n.on(["create.move","create.end","shape.move.move","shape.move.end"],Uj,function(e){var i=e.context,o=i.canExecute,a=i.target,r=o&&(o==="attach"||o.attach);r&&!bc(e)&&efe(e,a);});}Fe(Mm,ll);Mm.$inject=["eventBus","injector"];Mm.prototype.initSnap=function(n){var t=ll.prototype.initSnap.call(this,n),e=n.shape,i=!!this._elementRegistry.get(e.id);return ne(e.outgoing,function(o){var a=o.waypoints[0];a=a.original||a,t.setSnapOrigin(o.id+"-docking",Xj(a,i,n));}),ne(e.incoming,function(o){var a=o.waypoints[o.waypoints.length-1];a=a.original||a,t.setSnapOrigin(o.id+"-docking",Xj(a,i,n));}
977),z(e,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t;};Mm.prototype.addSnapTargetPoints=function(n,t,e){ll.prototype.addSnapTargetPoints.call(this,n,t,e);var i=this.getSnapTargets(t,e);ne(i,function(a){(nfe(a)||tfe([t,a],"bpmn:TextAnnotation"))&&(n.add("top-left",ty(a)),n.add("bottom-right",ny(a)));});var o=this._elementRegistry;return ne(t.incoming,function(a){if(o.get(t.id)){Wj(i,a.source)||n.add("mid",Rt(a.source));var r=a.waypoints[0];n.add(a.id+"-docking",r.original||r);}}),ne(t.outgoing,function(a){if(o.get(t.id)){Wj(i,a.target)||n.add("mid",Rt(a.target));var r=a.waypoints[a.waypoints.length-1];n.add(a.id+"-docking",r.original||r);}}),z(e,"bpmn:SequenceFlow")&&(n=this.addSnapTargetPoints(n,t,e.parent)),n;};Mm.prototype.getSnapTargets=function(n,t){return ll.prototype.getSnapTargets.call(this,n,t).filter(function(e){return!z(e,"bpmn:Lane");});};function efe(n,t){var e=Ot(t),i=Ry(n,t),o=n.context,a=o.shape,r;a.parent?r={x:0,y:0}:r=Rt(a),/top/.test(i)?Uo(n,"y",e.top-r.y):/bottom/.test(i)&&Uo(n,"y",e.bottom-r.y),/left/.test(i)?Uo(n,"x",e.left-r.x):/right/.test(i)&&Uo(n,"x",e.right-r.x);}function tfe(n,t){return n.every(function(e){return z(e,t);});}function nfe(n){return z(n,"bpmn:SubProcess")&&mn(n)?!0:z(n,"bpmn:Participant");}function ife(n){var t=n.context,e=t.createConstraints;if(e){var i=e.top,o=e.right,a=e.bottom,r=e.left;(r&&r>=n.x||o&&o<=n.x)&&Uo(n,"x",n.x),(i&&i>=n.y||a&&a<=n.y)&&Uo(n,"y",n.y);}}function Wj(n,t){return n.indexOf(t)!==-1;}function Xj(n,t,e){return t?{x:n.x-e.x,y:n.y-e.y}:{x:n.x,y:n.y};}var ofe=1250;function qu(n,t){var e=this;n.on(["resize.start"],function(i){e.initSnap(i);}),n.on(["resize.move","resize.end"],ofe,function(i){var o=i.context,a=o.shape,r=a.parent,l=o.direction,p=o.snapContext;if(!(i.originalEvent&&Qa(i.originalEvent))&&!bc(i)){var d=p.pointsForTarget(r);d.initialized||(d=e.addSnapTargetPoints(d,a,r,l),d.initialized=!0),sfe(l)&&Uo(i,"x",i.x),lfe(l)&&Uo(i,"y",i.y),t.snap(i,d);}}),n.on(["resize.cleanup"],function(){t.hide();});}qu.prototype.initSnap=function(n){var t=n.context,e=t.shape,i=t.direction,o=t.snapContext;o||(o=t.snapContext=new Oc());var a=Yj(e,i);return o.setSnapOrigin("corner",{x:a.x-n.x,y:a.y-n.y}),o;};qu.prototype.addSnapTargetPoints=function(n,t,e,i){var o=this.getSnapTargets(t,e);return ne(o,function(a){n.add("corner",ny(a)),n.add("corner",ty(a));}),n.add("corner",Yj(t,i)),n;};qu.$inject=["eventBus","snapping"];qu.prototype.getSnapTargets=function(n,t){return iy(t).filter(function(e){return!afe(e,n)&&!zn(e)&&!rfe(e)&&!Ut(e);});};function Yj(n,t){var e=Rt(n),i=Ot(n),o={x:e.x,y:e.y};return t.indexOf("n")!==-1?o.y=i.top:t.indexOf("s")!==-1&&(o.y=i.bottom),t.indexOf("e")!==-1?o.x=i.right:t.indexOf("w")!==-1&&(o.x=i.left),o;}function afe(n,t){return n.host===t;}function rfe(n){return!!n.hidden;}function sfe(n){return n==="n"||n==="s";}function lfe(n){return n==="e"||n==="w";}var cfe=7,pfe=1e3;function ap(n){this._canvas=n,this._asyncHide=au(Ra(this.hide,this),pfe);}ap.$inject=["canvas"];ap.prototype.snap=function(n,t){var e=n.context,i=e.snapContext,o=i.getSnapLocations(),a={x:bc(n,"x"),y:bc(n,"y")};ne(o,function(r){var l=i.getSnapOrigin(r),p={x:n.x+l.x,y:n.y+l.y};if(ne(["x","y"],function(d){var f;a[d]||(f=t.snap(p,r,d,cfe),f!==void 0&&(a[d]={value:f,originValue:f-l[d]}));}),a.x&&a.y)return!1;}),this.showSnapLine("vertical",a.x&&a.x.value),this.showSnapLine("horizontal",a.y&&a.y.value),ne(["x","y"],function(r){var l=a[r];eo(l)&&Uo(n,r,l.originValue);});};ap.prototype._createLine=function(n){var t=this._canvas.getLayer("snap"),e=xt("path");return lt(e,{d:"M0,0 L0,0"}),En(e).add("djs-snap-line"),Kt(t,e),{update:function(i){nn(i)?n==="horizontal"?lt(e,{d:"M-100000,"+i+" L+100000,"+i,display:""}):lt(e,{d:"M "+i+",-100000 L "+i+", +100000",display:""}):lt(e,{display:"none"});}};};ap.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")};};ap.prototype.showSnapLine=function(n,t){var e=this.getSnapLine(n);e&&e.update(t),this._asyncHide();};ap.prototype.getSnapLine=function(n){return this._snapLines||this._createSnapLines(),this._snapLines[n];};ap.prototype.hide=function(){ne(this._snapLines,function(n){n.update();});};var Kj={__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",ll],resizeSnapping:["type",qu],snapping:["type",ap]};var Zj={__depends__:[Kj],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",wP],createMoveSnapping:["type",Mm]};var e7=300;function Fn(n,t,e,i){this._open=!1,this._results={},this._eventMaps=[],this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._canvas=n,this._eventBus=t,this._selection=e,this._translate=i,this._container=this._getBoxHtml(),this._searchInput=si(Fn.INPUT_SELECTOR,this._container),this._resultsContainer=si(Fn.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy","drag.init","elements.changed"],this.close,this);}Fn.$inject=["canvas","eventBus","selection","translate"];Fn.prototype._bindEvents=function(){var n=this;function t(e,i,o,a){n._eventMaps.push({el:e,type:o,listener:wa.bind(e,i,o,a)});}t(document,"html","click",function(e){n.close(!1);}),t(this._container,Fn.INPUT_SELECTOR,"click",function(e){e.stopPropagation(),e.delegateTarget.focu
977s();}),t(this._container,Fn.RESULT_SELECTOR,"mouseover",function(e){e.stopPropagation(),n._scrollToNode(e.delegateTarget),n._preselect(e.delegateTarget);}),t(this._container,Fn.RESULT_SELECTOR,"click",function(e){e.stopPropagation(),n._select(e.delegateTarget);}),t(this._container,Fn.INPUT_SELECTOR,"keydown",function(e){ca("ArrowUp",e)&&e.preventDefault(),ca("ArrowDown",e)&&e.preventDefault();}),t(this._container,Fn.INPUT_SELECTOR,"keyup",function(e){if(ca("Escape",e))return n.close();if(ca("Enter",e)){var i=n._getCurrentResult();return i?n._select(i):n.close(!1);}if(ca("ArrowUp",e))return n._scrollToDirection(!0);if(ca("ArrowDown",e))return n._scrollToDirection();ca(["ArrowLeft","ArrowRight"],e)||n._search(e.delegateTarget.value);});};Fn.prototype._unbindEvents=function(){this._eventMaps.forEach(function(n){wa.unbind(n.el,n.type,n.listener);});};Fn.prototype._search=function(n){var t=this;if(this._clearResults(),!!n.trim()){var e=this._searchProvider.find(n);if(e=e.filter(function(o){return!t._canvas.getRootElements().includes(o.element);}),!e.length){this._selection.select(null);return;}e.forEach(function(o){var a=o.element.id,r=t._createResultNode(o,a);t._results[a]={element:o.element,node:r};});var i=si(Fn.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i);}};Fn.prototype._scrollToDirection=function(n){var t=this._getCurrentResult();if(t){var e=n?t.previousElementSibling:t.nextElementSibling;e&&(this._scrollToNode(e),this._preselect(e));}};Fn.prototype._scrollToNode=function(n){if(!(!n||n===this._getCurrentResult())){var t=n.offsetTop,e=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+n.clientHeight;t<e?this._resultsContainer.scrollTop=t:e<i&&(this._resultsContainer.scrollTop=i);}};Fn.prototype._clearResults=function(){Jd(this._resultsContainer),this._results={},this._eventBus.fire("searchPad.cleared");};Fn.prototype._getCurrentResult=function(){return si(Fn.RESULT_SELECTED_SELECTOR,this._resultsContainer);};Fn.prototype._createResultNode=function(n,t){var e=ri(Fn.RESULT_HTML);return n.primaryTokens.length>0&&Qj(e,n.primaryTokens,Fn.RESULT_PRIMARY_HTML),Qj(e,n.secondaryTokens,Fn.RESULT_SECONDARY_HTML),Zo(e,Fn.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(e),e;};Fn.prototype.registerProvider=function(n){this._searchProvider=n;};Fn.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._cachedRootElement=this._canvas.getRootElement(),this._cachedSelection=this._selection.get(),this._cachedViewbox=this._canvas.viewbox(),this._selection.select(null),this._bindEvents(),this._open=!0,Ji(this._canvas.getContainer()).add("djs-search-open"),Ji(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"));};Fn.prototype.close=function(n=!0){this.isOpen()&&(n&&(this._cachedRootElement&&this._canvas.setRootElement(this._cachedRootElement),this._cachedSelection&&this._selection.select(this._cachedSelection),this._cachedViewbox&&this._canvas.viewbox(this._cachedViewbox),this._eventBus.fire("searchPad.restored")),this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._unbindEvents(),this._open=!1,Ji(this._canvas.getContainer()).remove("djs-search-open"),Ji(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._eventBus.fire("searchPad.closed"),this._canvas.restoreFocus());};Fn.prototype.toggle=function(){this.isOpen()?this.close():this.open();};Fn.prototype.isOpen=function(){return this._open;};Fn.prototype._preselect=function(n){var t=this._getCurrentResult();if(n!==t){t&&Ji(t).remove(Fn.RESULT_SELECTED_CLASS);var e=Zo(n,Fn.RESULT_ID_ATTRIBUTE),i=this._results[e].element;Ji(n).add(Fn.RESULT_SELECTED_CLASS),this._canvas.scrollToElement(i,{top:e7}),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i);}};Fn.prototype._select=function(n){var t=Zo(n,Fn.RESULT_ID_ATTRIBUTE),e=this._results[t].element;this._cachedSelection=null,this._cachedViewbox=null,this.close(!1),this._canvas.scrollToElement(e,{top:e7}),this._selection.select(e),this._eventBus.fire("searchPad.selected",e);};Fn.prototype._getBoxHtml=function(){let n=ri(Fn.BOX_HTML),t=si(Fn.INPUT_SELECTOR,n);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),n;};function Qj(n,t,e){var i=dfe(t),o=ri(e);o.innerHTML=i,n.appendChild(o);}function dfe(n){var t="";
977return n.forEach(function(e){var i=Y0(e.value||e.matched||e.normal),o=e.match||e.matched;o?t+='<b class="'+Fn.RESULT_HIGHLIGHT_CLASS+'">'+i+"</b>":t+=i;}),t!==""?t:null;}Fn.CONTAINER_SELECTOR=".djs-search-container";Fn.INPUT_SELECTOR=".djs-search-input input";Fn.RESULTS_CONTAINER_SELECTOR=".djs-search-results";Fn.RESULT_SELECTOR=".djs-search-result";Fn.RESULT_SELECTED_CLASS="djs-search-result-selected";Fn.RESULT_SELECTED_SELECTOR="."+Fn.RESULT_SELECTED_CLASS;Fn.RESULT_ID_ATTRIBUTE="data-result-id";Fn.RESULT_HIGHLIGHT_CLASS="djs-search-highlight";Fn.BOX_HTML=`<div class="djs-search-container djs-scrollable"> 978 <div class="djs-search-input"> 979 <svg class="djs-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"> 980 <path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/> 981 </svg> 982 <input type="text" spellcheck="false" /> 983 </div> 984 <div class="djs-search-results" /> 985</div>`;Fn.RESULT_HTML='<div class="djs-search-result"></div>';Fn.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>';Fn.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';var t7={__depends__:[im,om,la],searchPad:["type",Fn]};function Cx(n,t,e,i){this._elementRegistry=n,this._canvas=e,this._search=i,t.registerProvider(this);}Cx.$inject=["elementRegistry","searchPad","canvas","search"];Cx.prototype.find=function(n){var t=this._canvas.getRootElements(),e=this._elementRegistry.filter(function(i){return!Ut(i)&&!t.includes(i);});return this._search(e.map(i=>({element:i,label:za(i),id:i.id})),n,{keys:["label","id"]}).map(mfe);};function mfe(n){let{item:{element:t},tokens:e}=n;return{element:t,primaryTokens:e.label,secondaryTokens:e.id};}var n7={__depends__:[t7,Lb],__init__:["bpmnSearch"],bpmnSearch:["type",Cx]};var i7="M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",o7="M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",a7={width:36,height:50},r7={width:50,height:50};function hO(n,t,e){return xt("path",X({d:n,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`},e));}var Xl=5;function __(n,t){this._styles=t,n.registerProvider(this);}__.$inject=["outline","styles"];__.prototype.getOutline=function(n){let t=this._styles.cls("djs-outline",["no-fill"]);var e;if(N4(n))return e=xt("rect"),lt(e,me({x:-Xl,y:-Xl,rx:4,width:n.width+Xl*2,height:n.height+Xl*2},t)),e;if(!Ut(n))return z(n,"bpmn:Gateway")?(e=xt("rect"),me(e.style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),lt(e,me({x:2,y:2,rx:4,width:n.width-4,height:n.height-4},t))):en(n,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?(e=xt("rect"),lt(e,me({x:-Xl,y:-Xl,rx:14,width:n.width+Xl*2,height:n.height+Xl*2},t))):z(n,"bpmn:EndEvent")?(e=xt("circle"),lt(e,me({cx:n.width/2,cy:n.height/2,r:n.width/2+Xl+1},t))):z(n,"bpmn:Event")?(e=xt("circle"),lt(e,me({cx:n.width/2,cy:n.height/2,r:n.width/2+Xl},t))):z(n,"bpmn:DataObjectReference")&&s7(n,"bpmn:DataObjectReference")?e=hO(i7,{x:-6,y:-6},t):z(n,"bpmn:DataStoreReference")&&s7(n,"bpmn:DataStoreReference")&&(e=hO(o7,{x:-6,y:-6},t)),e;};__.prototype.updateOutline=function(n,t){if(!Ut(n))return en(n,["bpmn:SubProcess","bpmn:Group"])?(lt(t,{width:n.width+Xl*2,height:n.height+Xl*2}),!0):!!en(n,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"]);};function s7(n,t){var e;return t==="bpmn:DataObjectReference"?e=a7:t==="bpmn:DataStoreReference"&&(e=r7),n.width===e.width&&n.height===e.height;}var l7={__depends__:[f_],__init__:["outlineProvider"],outlineProvider:["type",__]};var ufe='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape>
985</bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>';function Yl(n){mu.call(this,n);}Fe(Yl,mu);Yl.Viewer=Cc;Yl.NavigatedViewer=_u;Yl.prototype.createDiagram=function(){return this.importXML(ufe);};Yl.prototype._interactionModules=[ub,gb,bb,yb];Yl.prototype._modelingModules=[c5,Oh,g5,u5,L5,kh,B5,FD,$y,Cm,VD,JD,KD,QD,ej,aj,mj,hj,nP,xj,wj,Bj,$j,hP,Zj,n7,l7];Yl.prototype._modules=[].concat(Cc.prototype._modules,Yl.prototype._interactionModules,Yl.prototype._modelingModules);var ffe=["bpmnContainer"],hfe=[[["","bpmn-toolbar-actions",""]]],_fe=["[bpmn-toolbar-actions]"],gfe=`<?xml version="1.0" encoding="UTF-8"?> 986<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" 987 xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" 988 xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" 989 id="Definitions_1" 990 targetNamespace="http://bpmn.io/schema/bpmn"> 991 <bpmn:process id="Process_1" isExecutable="false"> 992 <bpmn:startEvent id="StartEvent_1" name="Start" /> 993 </bpmn:process> 994 <bpmndi:BPMNDiagram id="BPMNDiagram_1"> 995 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"> 996 <bpmndi:BPMNShape id="_BPMNShape_StartEvent_1" bpmnElement="StartEvent_1"> 997 <dc:Bounds x="180" y="240" width="36" height="36" /> 998 <bpmndi:BPMNLabel> 999 <dc:Bounds x="186" y="283" width="24" height="14" /> 1000 </bpmndi:BPMNLabel> 1001 </bpmndi:BPMNShape> 1002 </bpmndi:BPMNPlane> 1003 </bpmndi:BPMNDiagram> 1004</bpmn:definitions>`,MP=class n{bpmnContainerRef;additionalModules=[];defaultXml=gfe;selectionChanged=new At();shapeAdded=new At();shapeRemoved=new At();elementChanged=new At();processStepsExtracted=new At();rootChanged=new At();modeler;_isImporting=!1;_isChangingRoot=!1;get isImporting(){return this._isImporting;}setImporting(t){this._isImporting=t;}ngAfterViewInit(){let t={container:this.bpmnContainerRef.nativeElement};this.additionalModules&&this.additionalModules.length>0&&(t.additionalModules=this.additionalModules),this.modeler=new Yl(t);}ngOnDestroy(){this.modeler&&this.modeler.destroy();}importXml(t){return $(this,null,function*(){if(!this.modeler)return;this._isImporting=!0;try{yield this.modeler.importXML(t);}finally{this._isImporting=!1;}let e=this.extractProcessSteps();this.processStepsExtracted.emit(e);try{let i=this.modeler.get("canvas");i.zoom("fit-viewport"),setTimeout(()=>{try{i.resized(),i.zoom("fit-viewport");}catch(o){}},200);}catch(i){}this.registerEventListeners();});}saveXml(){return $(this,null,function*(){return this.modeler&&(yield this.modeler.saveXML({format:!0})).xml||"";});}newDiagram(){return $(this,null,function*(){yield this.importXml(this.defaultXml);});}zoomFit(){if(!this.modeler)return;this.modeler.get("canvas").zoom("fit-viewport");}zoomIn(){if(!this.modeler)return;let t=this.modeler.get("canvas");t.zoom(t.zoom()+.1);}zoomOut(){if(!this.modeler)return;let t=this.modeler.get("canvas");t.zoom(t.zoom()-.1);}extractProcessSteps(){if(!this.modeler)return[];let e=this.modeler.get("elementRegistry").getAll(),i=["bpmn:Task","bpmn:UserTask","bpmn:ServiceTask","bpmn:ManualTask","bpmn:ScriptTask","bpmn:SendTask","bpmn:ReceiveTask","bpmn:BusinessRuleTask","bpmn:SubProcess","bpmn:CallActivity"];return e.filter(o=>i.includes(o.type)).map(o=>({id:o.id,name:o.businessObject?.name||"(unnamed)",type:o.type,typeLabel:o.type.replace("bpmn:","")}));}getModeler(){return this.modeler;}setProcessName(t){if(!(!this.modeler||!t))try{let o=this.modeler.get("elementRegistry").getAll().find(a=>a.type==="bpmn:Process");o&&this.modeler.get("modeling").updateProperties(o,{name:t});}catch(e){}}drillDownToElement(t){if(!this.modeler||!t)return!1;try{let e=this.modeler.get("canvas"),i=t+"_plane",a=(e.getRootElements?e.getRootElements():[]).find(r=>r.id===i);return a?(this._isChangingRoot=!0,e.setRootElement(a),setTimeout(()=>{this._isChangingRoot=!1;},0),!0):!1;}catch(e){return!1;}}drillUpToRoot(){if(!this.modeler)return!1;try{let t=this.modeler.get("canvas"),i=(t.getRootElements?t.getRootElements():[]).find(o=>o.type!=="bpmn:SubProcess");return i?(this._isChangingRoot=!0,t.setRootElement(i),setTimeout(()=>{this._isChangingRoot=!1;},0),!0):!1;}catch(t){return!1;}}refreshCanvas(){this.modeler&&setTimeout(()=>
1004{try{let t=this.modeler.get("canvas");t.resized(),t.zoom("fit-viewport");}catch(t){}},200);}registerEventListeners(){let t=this.modeler.get("eventBus");t.on("selection.changed",e=>{let i=e.newSelection;if(i.length===1){let o=i[0];this.selectionChanged.emit({id:o.id,type:o.type,typeLabel:o.type.replace("bpmn:",""),name:o.businessObject?.name||""});}else this.selectionChanged.emit(null);}),t.on("shape.removed",e=>{this._isImporting||this._isChangingRoot||e.element&&this.shapeRemoved.emit(e.element);}),t.on("element.changed",e=>{this._isImporting||this._isChangingRoot||e.element&&this.elementChanged.emit(e.element);}),t.on("shape.added",e=>{this._isImporting||this._isChangingRoot||e.element&&this.shapeAdded.emit(e.element);}),t.on("root.set",e=>{if(!this._isImporting&&(this._isChangingRoot=!0,setTimeout(()=>{this._isChangingRoot=!1;},0),e.element)){let i=e.element,o=i.type==="bpmn:SubProcess",a=i.businessObject?.id||i.id||"";this.rootChanged.emit({element:i,isSubProcess:o,elementId:a});}});}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-bpmn-modeler-wrapper"]],viewQuery:function(e,i){if(e&1&&go(ffe,7),e&2){let o;qn(o=Jn())&&(i.bpmnContainerRef=o.first);}},inputs:{additionalModules:"additionalModules",defaultXml:"defaultXml"},outputs:{selectionChanged:"selectionChanged",shapeAdded:"shapeAdded",shapeRemoved:"shapeRemoved",elementChanged:"elementChanged",processStepsExtracted:"processStepsExtracted",rootChanged:"rootChanged"},ngContentSelectors:_fe,decls:19,vars:0,consts:[["bpmnContainer",""],[1,"bpmn-wrapper"],[1,"bpmn-toolbar"],["mat-icon-button","","matTooltip","New diagram",3,"click"],["mat-icon-button","","matTooltip","Zoom to fit",3,"click"],["mat-icon-button","","matTooltip","Zoom in",3,"click"],["mat-icon-button","","matTooltip","Zoom out",3,"click"],[1,"bpmn-toolbar-spacer"],[1,"bpmn-canvas-wrapper"],[1,"bpmn-container"]],template:function(e,i){e&1&&(vl(hfe),s(0,"div",1)(1,"div",2)(2,"button",3),E("click",function(){return i.newDiagram();}),s(3,"mat-icon"),u(4,"note_add"),c()(),s(5,"button",4),E("click",function(){return i.zoomFit();}),s(6,"mat-icon"),u(7,"fit_screen"),c()(),s(8,"button",5),E("click",function(){return i.zoomIn();}),s(9,"mat-icon"),u(10,"zoom_in"),c()(),s(11,"button",6),E("click",function(){return i.zoomOut();}),s(12,"mat-icon"),u(13,"zoom_out"),c()(),ee(14,"span",7),As(15),c(),s(16,"div",8),ee(17,"div",9,0),c()());},dependencies:[ut,$e,Qt,We,Xe,$t,_n],styles:[".bpmn-wrapper[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:10px}.bpmn-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:4px 10px;background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.1);gap:4px}.bpmn-toolbar-spacer[_ngcontent-%COMP%]{flex:1}.bpmn-toolbar[_ngcontent-%COMP%] button.mat-mdc-icon-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#000000b3;filter:none;text-shadow:none}.bpmn-canvas-wrapper[_ngcontent-%COMP%]{flex:1;background-color:#fff;border-radius:0 0 10px 10px;overflow:hidden;position:relative}.bpmn-container[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] .djs-palette{border-radius:10px;top:10px!important;left:10px!important}[_nghost-%COMP%] .djs-context-pad{border-radius:6px}"]});};var vx=class{constructor(t,e,i,o,a){this.config=t;this.firebase=e;this.messagingService=i;this.loggingService=o;this.dialog=a;}config;firebase;messagingService;loggingService;dialog;items=[];selectedElement=null;selectedItem=null;selectedItemIdToLink="";linkSpinner=!1;cleanNumbersSpinner=!1;parentDocPath="";bpmnModeler;init(t,e){this.parentDocPath=t,this.bpmnModeler=e;}getCollectionPath(){return this.parentDocPath+"/"+this.config.collectionSuffix;}loadItems(){return $(this,null,function*(){try{let t=this.getCollectionPath(),e=mt(we(this.firebase.firestore,t),Jt("number","asc")),i=yield at(e);this.items=[],i.forEach(o=>{this.items.push(X({id:o.id},o.data()));}),this.sortItems();}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading "+this.config.itemLabelPlural,"",{duration:3e3});}});}onSelectionChanged(t){this.selectedElement=t,t?(this.loggingService.debug("BPMN selection: "+t.typeLabel+" | id="+t.id+" | name="+(t.name||"(unnamed)")),this.selectedItem=this.items.find(e=>e.bpmnElementId===t.id)||null,this.selectedItemIdToLink=""):(this.selectedItem=null,this.loggingService.debug("BPMN selection: cleared"));}onShapeRemoved(t){if(!t||t.type!==this.config.bpmnElementType)return;let e=this.items.find(o=>o.bpmnElementId===t.id);if(!e)return;this.loggingService.debug("Linked "+this.config.itemLabel+' shape deleted: "'+e.number+". "+e.name+'" \u2014 opening confirmation dialog'),this.dialog.open(this.config.deleteDialogComponent,{width:"480px",disableClose:!0,data:{title:this.config.deleteDialogTitle,message:this.config.deleteDialogMessage,subProcessName:e.number+". "+e.name}}).afterClosed().subscribe(o=>{let a=this.bpmnModeler.getModeler().get("commandStack"),r=this.getCollectionPath(),l=ge(this.firebase.firestore,r,e.id);if(o==="delete-all"){this.loggingService.debug('User chose: delete shape & data for "'+e.number+'"');let p=this.items.indexOf(e);p>
1004-1&&this.items.splice(p,1),this.selectedItem?.id===e.id&&(this.selectedItem=null),no(l).then(()=>{this.messagingService.open(this.config.itemLabel+' "'+e.number+". "+e.name+'" deleted',"",{duration:3e3});}).catch(d=>{this.loggingService.error(d),this.messagingService.open("Error deleting "+this.config.itemLabel.toLowerCase()+" data","",{duration:3e3});});}else o==="delete-shape"?(this.loggingService.debug('User chose: delete shape only (unlink) for "'+e.number+'"'),e.bpmnElementId="",this.selectedItem?.id===e.id&&(this.selectedItem=null),hn(l,{bpmnElementId:""}).then(()=>{this.messagingService.open(this.config.itemLabel+' "'+e.number+'" unlinked',"",{duration:3e3});}).catch(p=>{this.loggingService.error(p),this.messagingService.open("Error unlinking "+this.config.itemLabel.toLowerCase(),"",{duration:3e3});})):(this.loggingService.debug('User cancelled deletion \u2014 restoring shape for "'+e.number+'"'),a.undo());});}onElementChanged(t){if(!t||t.type!==this.config.bpmnElementType)return;let e=this.items.find(f=>f.bpmnElementId===t.id);if(!e)return;let i=t.businessObject?.name||"",o=i.match(/^(\d+(?:\.\d+)*)/),a="",r=i.trim();if(o&&(a=o[1],r=i.substring(a.length).replace(/^[\.\s\-]+/,"").trim()),r===e.name&&a===e.number)return;this.loggingService.debug(this.config.itemLabel+' changed: number "'+e.number+'" \u2192 "'+a+'", name "'+e.name+'" \u2192 "'+r+'"');let l={};r!==e.name&&(e.name=r,l.name=r),a!==e.number&&(e.number=a,l.number=a);let p=this.getCollectionPath(),d=ge(this.firebase.firestore,p,e.id);hn(d,l).then(()=>{this.messagingService.open(this.config.itemLabel+" updated: "+a+(a?". ":"")+r,"",{duration:3e3});}).catch(f=>{this.loggingService.error(f),this.messagingService.open("Error updating "+this.config.itemLabel.toLowerCase(),"",{duration:3e3});});}onShapeAdded(t){!t||t.type!==this.config.bpmnElementType||setTimeout(()=>{let e=t.businessObject?.id||t.id;if(this.items.some(h=>h.bpmnElementId===e))return;this.loggingService.debug("New "+this.config.itemLabel+" shape added: finalId="+e);let o=t.businessObject?.name||"",a=o.match(/^(\d+(?:\.\d+)*)/),r="",l=o.trim()||this.config.defaultItemName;if(a&&(r=a[1],l=o.substring(r.length).replace(/^[\.\s\-]+/,"").trim()||this.config.defaultItemName),!r){let h=this.items.reduce((g,b)=>{let w=parseFloat(b.number);return isNaN(w)?g:Math.max(g,w);},0);r=String(Math.floor(h)+1);}if(!e)return;let p=this.getCollectionPath(),d=we(this.firebase.firestore,p),f={creationDate:new Date(),active:!0,name:l,number:r,description:"",bpmnElementId:e};Ht(d,f).then(h=>{let g=X({id:h.id},f);this.items.push(g),this.sortItems(),this.selectedItem=g;let b=this.bpmnModeler.getModeler(),w=b.get("modeling"),O=b.get("elementRegistry").get(e);O&&w.updateProperties(O,{name:r+". "+l}),this.loggingService.debug("Created Firestore "+this.config.itemLabel.toLowerCase()+' "'+r+". "+l+'" linked to shape '+e),this.messagingService.open(this.config.itemLabel+' "'+r+". "+l+'" created and linked',"",{duration:3e3});}).catch(h=>{this.loggingService.error(h),this.messagingService.open("Error creating "+this.config.itemLabel.toLowerCase()+" in Firestore","",{duration:3e3});});},0);}get isMatchingElementType(){return this.selectedElement?.type===this.config.bpmnElementType;}getUnlinkedItems(){return this.items.filter(t=>!t.bpmnElementId);}linkItemById(t){return $(this,null,function*(){return this.selectedItemIdToLink=t,this.linkItem();});}linkItem(){return $(this,null,function*(){if(!(!this.selectedElement||!this.selectedItemIdToLink)){this.linkSpinner=!0;try{let t=this.getCollectionPath(),e=ge(this.firebase.firestore,t,this.selectedItemIdToLink);yield hn(e,{bpmnElementId:this.selectedElement.id});let i=this.items.find(o=>o.id===this.selectedItemIdToLink);i&&(i.bpmnElementId=this.selectedElement.id,this.selectedItem=i),this.selectedItemIdToLink="",this.messagingService.open(this.config.itemLabel+" linked to element","",{duration:3e3});}catch(t){this.loggingService.error(t),this.messagingService.open("Error linking "+this.config.itemLabel.toLowerCase(),"",{duration:3e3});}finally{this.linkSpinner=!1;}}});}createAndLinkItem(t){return $(this,null,function*(){if(!(!this.bpmnModeler||!t)){this.linkSpinner=!0;try{let e=this.bpmnModeler.getModeler(),i=e.get("modeling"),o=e.get("elementFactory"),a=e.get("
1004canvas"),r=e.get("selection"),l=a.getRootElement(),d=e.get("elementRegistry").getAll().filter(j=>j.type===this.config.bpmnElementType&&typeof j.x=="number"&&typeof j.y=="number"),f=300,h=250;if(d.length>0){let j=d[d.length-1],L=typeof j.width=="number"&&isFinite(j.width)?j.width:100,A=typeof j.height=="number"&&isFinite(j.height)?j.height:80;f=j.x+L+80,h=j.y+Math.round(A/2);}this.bpmnModeler.setImporting(!0);let g={type:this.config.bpmnElementType};this.config.createShapeOptions&&Object.assign(g,this.config.createShapeOptions);let b=o.createShape(g),w=i.createShape(b,{x:Math.round(f),y:Math.round(h)},l);this.bpmnModeler.setImporting(!1);let T=t.number+". "+t.name;i.updateProperties(w,{name:T});let O=this.getCollectionPath(),V=ge(this.firebase.firestore,O,t.id);yield hn(V,{bpmnElementId:w.id}),t.bpmnElementId=w.id,this.selectedItem=t,r.select(w),a.scrollToElement(w),this.messagingService.open(this.config.itemLabel+" shape created and linked","",{duration:3e3});}catch(e){this.loggingService.error(e),this.messagingService.open("Error creating "+this.config.itemLabel.toLowerCase()+" shape","",{duration:3e3});}finally{this.linkSpinner=!1;}}});}unlinkItem(){return $(this,null,function*(){if(this.selectedItem){this.linkSpinner=!0;try{let t=this.getCollectionPath(),e=ge(this.firebase.firestore,t,this.selectedItem.id);yield hn(e,{bpmnElementId:""});let i=this.items.find(o=>o.id===this.selectedItem.id);i&&(i.bpmnElementId=""),this.selectedItem=null,this.messagingService.open(this.config.itemLabel+" unlinked from element","",{duration:3e3});}catch(t){this.loggingService.error(t),this.messagingService.open("Error unlinking "+this.config.itemLabel.toLowerCase(),"",{duration:3e3});}finally{this.linkSpinner=!1;}}});}deleteItem(){let t=this.selectedItem;if(!t)return;this.dialog.open(this.config.deleteDialogComponent,{width:"480px",disableClose:!0,data:{title:this.config.deleteDialogTitle,message:this.config.deleteDialogMessage,subProcessName:t.number+". "+t.name}}).afterClosed().subscribe(i=>{let o=this.getCollectionPath(),a=ge(this.firebase.firestore,o,t.id);if(i==="delete-all"){if(this.loggingService.debug('deleteItem: delete-all for "'+t.number+'"'),t.bpmnElementId&&this.bpmnModeler)try{let l=this.bpmnModeler.getModeler(),p=l.get("modeling"),f=l.get("elementRegistry").get(t.bpmnElementId);f&&(this.bpmnModeler.setImporting(!0),p.removeShape(f),this.bpmnModeler.setImporting(!1));}catch(l){this.loggingService.error(l);}let r=this.items.indexOf(t);r>-1&&this.items.splice(r,1),this.selectedItem?.id===t.id&&(this.selectedItem=null),no(a).then(()=>{this.messagingService.open(this.config.itemLabel+' "'+t.number+". "+t.name+'" deleted',"",{duration:3e3});}).catch(l=>{this.loggingService.error(l),this.messagingService.open("Error deleting "+this.config.itemLabel.toLowerCase(),"",{duration:3e3});});}else if(i==="delete-shape"){if(this.loggingService.debug('deleteItem: delete-shape (unlink) for "'+t.number+'"'),t.bpmnElementId&&this.bpmnModeler)try{let r=this.bpmnModeler.getModeler(),l=r.get("modeling"),d=r.get("elementRegistry").get(t.bpmnElementId);d&&(this.bpmnModeler.setImporting(!0),l.removeShape(d),this.bpmnModeler.setImporting(!1));}catch(r){this.loggingService.error(r);}t.bpmnElementId="",this.selectedItem?.id===t.id&&(this.selectedItem=null),hn(a,{bpmnElementId:""}).then(()=>{this.messagingService.open(this.config.itemLabel+' "'+t.number+'" unlinked',"",{duration:3e3});}).catch(r=>{this.loggingService.error(r),this.messagingService.open("Error unlinking "+this.config.itemLabel.toLowerCase(),"",{duration:3e3});});}});}updateItemField(t){return $(this,null,function*(){if(!this.selectedItem)return;let{field:e,value:i}=t,o=i.trim();if(this.selectedItem[e]===o)return;this.selectedItem[e]=o;let a=this.getCollectionPath(),r=ge(this.firebase.firestore,a,this.selectedItem.id),l={[e]:o};try{if(yield hn(r,l),this.selectedItem.bpmnElementId&&this.bpmnModeler){let p=this.bpmnModeler.getModeler(),d=p.get("modeling"),h=p.get("elementRegistry").get(this.selectedItem.bpmnElementId);h&&d.updateProperties(h,{name:this.selectedItem.number+". "+this.selectedItem.name});}this.messagingService.open(this.config.itemLabel+" "+e+" updated","",{duration:3e3});}catch(p){this.loggingService.error(p),this.messagingService.open("Error updating "+this.config.itemLabel.toLowerCase()+" "+e,"",{duration:3e3});}});}sortItems(){this.items.sort((t,e)=>{let i=t.number.split(".").map(Number),o=e.number.split(".").map(Number);for(let a=0;a<Math.max(i.length,o.length);a++){let r=i[a]??0,l=o[a]??0;if(r!==l)return r-l;}return 0;});}cleanNumbers(){return $(this,null,function*(){if(this.items.length!==0){this.cleanNumbersSpinner=!0;try{this.sortItems();let t=this.getCollectionPath(),e=this.bpmnModeler?.getModeler(),i=e?e.get("modeling"):null,o=e?e.get("elementRegistry"):null,a=0;for(let r=0;r<this.items.length;r++){let l=this.items[r],p=String(r+1);if(l.number===p)continue;let d=l.number;l.number=p,a++;let f=ge(this.firebase.firestore,t,l.id);if(yield hn(f,{number:p}),l.bpmnElementId&&i&&o){let h=o.get(l.bpmnElementId);h&&i.updateProperties(h,{name:p+". "+l.name});}this.loggingService.debug('Clean numbers: "'+d+'" \u2192 "'+p+'" for "'+l.name+'"');}a>0?this.messagingService.open("Numbers cleaned: "+a+" "+this.config.itemLabelPlural+" renumbered","",{duration:3e3}):this.messagingService.open("Numbers already clean \u2014 no changes needed","",{duration:3e3});}catch(t){this.loggingService.error(t),this.messagingService.open("Error cleaning numbers","",{duration:3e3});}finally{this.cleanNumbersSpinner=!1;}}});}selectItemInDiagram(t){if(!this.bpmnModeler)return;let e=this.bpmnModeler.getModeler(),i=e.get("selection"),o=e.get("elementRegistry"),a=e.get("
1004canvas");if(t.bpmnElementId){let r=o.get(t.bpmnElementId);if(r){i.select(r),a.scrollToElement(r);return;}this.loggingService.debug('Stale bpmnElementId "'+t.bpmnElementId+'" for '+this.config.itemLabel.toLowerCase()+' "'+t.number+'" \u2014 auto-cleaning'),t.bpmnElementId="";let l=this.getCollectionPath(),p=ge(this.firebase.firestore,l,t.id);hn(p,{bpmnElementId:""}).catch(d=>this.loggingService.error(d)),this.messagingService.open('Stale link cleaned for "'+t.number+'"',"",{duration:3e3});}i.select([]),this.selectedItem=t;}deselectItem(){if(this.selectedItem=null,this.selectedElement=null,this.bpmnModeler)try{this.bpmnModeler.getModeler().get("selection").select([]);}catch(t){}}isItemSelected(t){return this.selectedItem?.id===t.id;}};var c7=n=>({$implicit:n}),xfe=(n,t)=>t.id;function Cfe(n,t){if(n&1&&(s(0,"div",7)(1,"span",8),u(2,"Description:"),c(),s(3,"span",9),u(4),c()()),n&2){let e=x(3);m(4),G(e.linkedItem.description);}}function vfe(n,t){n&1&&Ma(0);}function bfe(n,t){if(n&1&&Zt(0,vfe,1,0,"ng-container",14),n&2){let e=x(3);N("ngTemplateOutlet",e.extraDetailTemplate)("ngTemplateOutletContext",Ds(2,c7,e.linkedItem));}}function yfe(n,t){n&1&&(s(0,"mat-icon"),u(1,"link_off"),c());}function Pfe(n,t){n&1&&(s(0,"mat-icon",13),u(1,"autorenew"),c());}function wfe(n,t){if(n&1){let e=oe();s(0,"div",5)(1,"div",6),u(2),c(),s(3,"div",7)(4,"span",8),u(5,"Number:"),c(),s(6,"input",10),E("blur",function(o){k(e);let a=x(2);return R(a.onFieldEdit("number",o.target.value));})("keydown.enter",function(o){return o.target.blur();}),c()(),s(7,"div",7)(8,"span",8),u(9,"Name:"),c(),s(10,"input",10),E("blur",function(o){k(e);let a=x(2);return R(a.onFieldEdit("name",o.target.value));})("keydown.enter",function(o){return o.target.blur();}),c()(),S(11,Cfe,5,1,"div",7),S(12,bfe,1,4,"ng-container"),s(13,"div",11)(14,"button",12),E("click",function(){k(e);let o=x(2);return R(o.onUnlinkClick());}),S(15,yfe,2,0,"mat-icon"),S(16,Pfe,2,0,"mat-icon",13),s(17,"span"),u(18,"Unlink"),c()()()();}if(n&2){let e=x(2);m(2),_e("Linked ",e.itemLabel),m(4),N("value",e.linkedItem.number),m(4),N("value",e.linkedItem.name),m(),M(e.linkedItem.description?11:-1),m(),M(e.extraDetailTemplate?12:-1),m(2),N("disabled",e.linkSpinner),m(),M(e.linkSpinner?-1:15),m(),M(e.linkSpinner?16:-1);}}function Sfe(n,t){if(n&1&&(s(0,"mat-option",18),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),Hn(" ",e.number,". ",e.name," ");}}function Mfe(n,t){n&1&&(s(0,"mat-icon"),u(1,"link"),c());}function Ofe(n,t){n&1&&(s(0,"mat-icon",13),u(1,"autorenew"),c());}function Efe(n,t){if(n&1){let e=oe();s(0,"div",11)(1,"mat-form-field",16)(2,"mat-label"),u(3),c(),s(4,"mat-select",17),Mt("ngModelChange",function(o){k(e);let a=x(3);return St(a.selectedItemIdToLink,o)||(a.selectedItemIdToLink=o),R(o);}),be(5,Sfe,2,3,"mat-option",18,xfe),c()(),s(7,"button",19),E("click",function(){k(e);let o=x(3);return R(o.onLinkClick());}),S(8,Mfe,2,0,"mat-icon"),S(9,Ofe,2,0,"mat-icon",13),s(10,"span"),u(11,"Link"),c()()();}if(n&2){let e=x(3);m(3),_e("Select a ",e.itemLabel),m(),wt("ngModel",e.selectedItemIdToLink),m(),ye(e.unlinkedItems),m(2),N("disabled",!e.selectedItemIdToLink||e.linkSpinner),m(),M(e.linkSpinner?-1:8),m(),M(e.linkSpinner?9:-1);}}function Tfe(n,t){if(n&1&&(s(0,"span",15),u(1),c()),n&2){let e=x(3);m(),_e(" No unlinked ",e.itemLabel,"s available. ");}}function Ife(n,t){if(n&1&&(s(0,"div",5)(1,"div",6),u(2),c(),S(3,Efe,12,5,"div",11),S(4,Tfe,2,1,"span",15),c()),n&2){let e=x(2);m(2),_e("Link ",e.itemLabel),m(),M(e.unlinkedItems.length>0?3:-1),m(),M(e.unlinkedItems.length===0?4:-1);}}function kfe(n,t){if(n&1&&(s(0,"div",5)(1,"span",15),u(2),c()()),n&2){let e=x(2);m(2),_e(" Select a matching shape to link it to a ",e.itemLabel,". ");}}function Rfe(n,t){if(n&1&&(s(0,"div",5)(1,"div",6),u(2,"BPMN Element"),c(),s(3,"div",7)(4,"span",8),u(5,"Type:"),c(),s(6,"span",9),u(7),c()(),s(8,"div",7)(9,"span",8),u(10,"ID:"),c(),s(11,"span",9),u(12),c()(),s(13,"div",7)(14,"span",8),u(15,"Name:"),c(),s(16,"span",9),u(17),c()()(),S(18,wfe,19,8,"div",5),S(19,Ife,5,3,"div",5),S(20,kfe,3,1,"div",5)),n&2){let e=x();m(7),G(e.selectedElement.typeLabel),m(5),G(e.selectedElement.id),m(5),G(e.selectedElement.name||"(unnamed)"),m(),M(e.isMatchingElementType&&e.linkedItem?18:-1),m(),M(e.isMatchingElementType&&!e.linkedItem?19:-1),m(),M(e.isMatchingElementType?-1:20);}}function Nfe(n,t){if(n&1&&(s(0,"div",7)(1,"span",8),u(2,"Description:"),c(),s(3,"span",9),u(4),c()()),n&2){let e=x(2);m(4),G(e.linkedItem.description);}}function Afe(n,t){n&1&&Ma(0);}function Dfe(n,t){if(n&1&&Zt(0,Afe,1,0,"ng-container",14),n&2){let e=x(2);N("ngTemplateOutlet",e.extraDetailTemplate)("ngTemplateOutletContext",Ds(2,c7,e.linkedItem));}}function jfe(n,t){n&1&&(s(0,"mat-icon"),u(1,"add_box"),c());}function Lfe(n,t){n&1&&(s(0,"mat-icon",13),u(1,"autorenew"),c());}function zfe(n,t){if(n&1){let e=oe();s(0,"div",5)(1,"div",6),u(2),c(),s(3,"div",7)(4,"span",8),u(5,"Number:"),c(),s(6,"input",10),E("blur",function(o){k(e);let a=x();return R(a.onFieldEdit("number",o.target.value));})("keydown.enter",function(o){return o.target.blur();}),c()(),s(7,"div",7)(8,"span",8),u(9,"Name:"),c(),s(10,"input",10),E("blur",function(o){k(e);let a=x();return R(a.onFieldEdit("name",o.target.value));})("keydown.enter",function(o){return o.target.blur();}),c()(),S(11,Nfe,5,1,"div",7),S(12,Dfe,1,4,"ng-container"),s(13,"div",11)(14,"button",19),E("click",function(){k(e);let o=x();return R(o.onCreateInDiagramClick(o.linkedItem));}
1004),S(15,jfe,2,0,"mat-icon"),S(16,Lfe,2,0,"mat-icon",13),s(17,"span"),u(18,"Create in Diagram"),c()(),s(19,"button",12),E("click",function(){k(e);let o=x();return R(o.onDeleteClick());}),s(20,"mat-icon"),u(21,"delete"),c(),s(22,"span"),u(23,"Delete"),c()()()();}if(n&2){let e=x();m(2),_e("Unlinked ",e.itemLabel),m(4),N("value",e.linkedItem.number),m(4),N("value",e.linkedItem.name),m(),M(e.linkedItem.description?11:-1),m(),M(e.extraDetailTemplate?12:-1),m(2),N("disabled",e.linkSpinner),m(),M(e.linkSpinner?-1:15),m(),M(e.linkSpinner?16:-1),m(3),N("disabled",e.linkSpinner);}}function Ffe(n,t){n&1&&(s(0,"div",5)(1,"span",15),u(2," Select an element on the BPMN diagram to see its details. "),c()());}var OP=class n{selectedElement=null;linkedItem=null;unlinkedItems=[];targetBpmnType="";linkSpinner=!1;panelTitle="Item Detail";itemLabel="item";extraDetailTemplate;linkItem=new At();unlinkItem=new At();createInDiagram=new At();itemChanged=new At();deleteItem=new At();selectedItemIdToLink="";get isMatchingElementType(){return this.selectedElement?.type===this.targetBpmnType;}onLinkClick(){this.selectedItemIdToLink&&(this.linkItem.emit(this.selectedItemIdToLink),this.selectedItemIdToLink="");}onUnlinkClick(){this.unlinkItem.emit();}onCreateInDiagramClick(t){this.createInDiagram.emit(t);}onFieldEdit(t,e){this.itemChanged.emit({field:t,value:e});}onDeleteClick(){this.deleteItem.emit();}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-item-detail-panel"]],inputs:{selectedElement:"selectedElement",linkedItem:"linkedItem",unlinkedItems:"unlinkedItems",targetBpmnType:"targetBpmnType",linkSpinner:"linkSpinner",panelTitle:"panelTitle",itemLabel:"itemLabel",extraDetailTemplate:"extraDetailTemplate"},outputs:{linkItem:"linkItem",unlinkItem:"unlinkItem",createInDiagram:"createInDiagram",itemChanged:"itemChanged",deleteItem:"deleteItem"},decls:10,vars:4,consts:[[1,"container-right-panel"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],[1,"container-tile-body-strong"],[1,"detail-section"],[1,"detail-label"],[1,"detail-row"],[1,"detail-key"],[1,"detail-value"],[1,"detail-value-editable",3,"blur","keydown.enter","value"],[1,"link-controls"],["mat-stroked-button","","color","warn",3,"click","disabled"],[1,"icon-loading"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"div-insight-disabled"],["appearance","outline",1,"link-select"],[3,"ngModelChange","ngModel"],[3,"value"],["mat-stroked-button","","color","primary",3,"click","disabled"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-icon",2),u(3,"info"),c(),s(4,"span",3),u(5),c()(),s(6,"div",4),S(7,Rfe,21,6),S(8,zfe,24,9,"div",5),S(9,Ffe,3,0,"div",5),c()()),e&2&&(m(5),G(i.panelTitle),m(2),M(i.selectedElement?7:-1),m(),M(!i.selectedElement&&i.linkedItem&&!i.linkedItem.bpmnElementId?8:-1),m(),M(!i.selectedElement&&!i.linkedItem?9:-1));},dependencies:[ut,ad,gn,Tt,Po,$e,Qe,We,Xe,bi,Vt,Wt,So,Ei,Gt,jt],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1004.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background-color:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:20px;max-height:20px}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;padding-left:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.detail-section[_ngcontent-%COMP%]{padding:10px 0;border-bottom:1px solid rgba(0,0,0,.08)}.detail-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.detail-label[_ngcontent-%COMP%]{font-weight:700;font-size:.85em;text-transform:uppercase;color:#465d91;margin-bottom:8px;letter-spacing:.5px}.detail-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding:4px 0;font-size:.9em}.detail-key[_ngcontent-%COMP%]{font-weight:500;color:#0009;min-width:80px;flex-shrink:0}.detail-value[_ngcontent-%COMP%]{color:#000000de;word-break:break-word}.detail-value-editable[_ngcontent-%COMP%]{color:#000000de;word-break:break-word;flex:1;min-width:0;border:none;border-bottom:1px solid transparent;background:transparent;font:inherit;font-size:inherit;padding:2px 4px;outline:none;transition:border-color .2s,background-color .2s}.detail-value-editable[_ngcontent-%COMP%]:hover{border-bottom-color:#00000040}.detail-value-editable[_ngcontent-%COMP%]:focus{border-bottom-color:#465d91;background-color:#00000008}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em}.link-controls[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:10px}.link-controls[_ngcontent-%COMP%] .link-select[_ngcontent-%COMP%]{flex:1;font-size:.9em}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-shrink:0}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit!important;filter:none!important;text-shadow:none!important}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}"]});};var EP=class n{constructor(t,e){this.messagingService=t;this.loggingService=e;}messagingService;loggingService;objectRef;object;form=new Ri({description:new st(""),keySteps:new st(""),actors:new st(""),io:new st(""),kpi:new st("")});saveSpinner=!1;ngOnChanges(t){t.object&&this.object&&this.form.patchValue({description:this.object.description||"",keySteps:this.object.keySteps||"",actors:this.object.actors||"",io:this.object.io||"",kpi:this.object.kpi||""});}clickSave(){return $(this,null,function*(){if(this.objectRef){this.saveSpinner=!0;try{yield Dt(this.objectRef,this.form.value,{merge:!0}),this.object&&Object.assign(this.object,this.form.value),this.messagingService.open("Process fields saved","",{duration:3e3});}catch(t){this.loggingService.error(t),this.messagingService.open("Error saving process fields","",{duration:3e3});}finally{this.saveSpinner=!1;}}});}static ɵfac=function(e){return new(e||n)(le(Bt),le(Mo));};static ɵcmp=Te({type:n,selectors:[["app-business-process-fields-panel"]],inputs:{objectRef:"objectRef",object:"object"}
1004,features:[ki],decls:12,vars:11,consts:[[1,"process-fields-body"],[3,"formGroup"],[1,"div-form-element"],["objectType","businessProcess","field","businessprocess_description","controlName","description",3,"onSave","object","form"],["objectType","businessProcess","field","businessprocess_keysteps","controlName","keySteps",3,"onSave","object","form"],["objectType","businessProcess","field","businessprocess_actors","controlName","actors",3,"onSave","object","form"],["objectType","businessProcess","field","businessprocess_io","controlName","io",3,"onSave","object","form"],["objectType","businessProcess","field","businessprocess_kpi","controlName","kpi",3,"onSave","object","form"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"form",1)(2,"div",2)(3,"app-intelligent-field",3),E("onSave",function(){return i.clickSave();}),c()(),s(4,"div",2)(5,"app-intelligent-field",4),E("onSave",function(){return i.clickSave();}),c()(),s(6,"div",2)(7,"app-intelligent-field",5),E("onSave",function(){return i.clickSave();}),c()(),s(8,"div",2)(9,"app-intelligent-field",6),E("onSave",function(){return i.clickSave();}),c()(),s(10,"div",2)(11,"app-intelligent-field",7),E("onSave",function(){return i.clickSave();}),c()()()()),e&2&&(m(),N("formGroup",i.form),m(2),N("object",i.object)("form",i.form),m(2),N("object",i.object)("form",i.form),m(2),N("object",i.object)("form",i.form),m(2),N("object",i.object)("form",i.form),m(2),N("object",i.object)("form",i.form));},dependencies:[ut,tn,Nn,Mn,An,br],styles:[".process-fields-body[_ngcontent-%COMP%]{padding:8px 12px;overflow-y:auto;height:100%}.div-form-element[_ngcontent-%COMP%]{margin-bottom:4px}"]});};var TP=class n{constructor(t,e){this.messagingService=t;this.loggingService=e;}messagingService;loggingService;subProcessRef;subProcess;form=new Ri({description:new st(""),keyActivities:new st("")});saveSpinner=!1;ngOnChanges(t){t.subProcess&&this.subProcess&&this.form.patchValue({description:this.subProcess.description||"",keyActivities:this.subProcess.keyActivities||""});}clickSave(){return $(this,null,function*(){if(this.subProcessRef){this.saveSpinner=!0;try{yield Dt(this.subProcessRef,this.form.value,{merge:!0}),this.subProcess&&Object.assign(this.subProcess,this.form.value),this.messagingService.open("Sub-process fields saved","",{duration:3e3});}catch(t){this.loggingService.error(t),this.messagingService.open("Error saving sub-process fields","",{duration:3e3});}finally{this.saveSpinner=!1;}}});}static ɵfac=function(e){return new(e||n)(le(Bt),le(Mo));};static ɵcmp=Te({type:n,selectors:[["app-subprocess-fields-panel"]],inputs:{subProcessRef:"subProcessRef",subProcess:"subProcess"},features:[ki],decls:6,vars:5,consts:[[1,"process-fields-body"],[3,"formGroup"],[1,"div-form-element"],["objectType","subProcess","field","subprocess_description","controlName","description",3,"onSave","object","form"],["objectType","subProcess","field","subprocess_keyactivities","controlName","keyActivities",3,"onSave","object","form"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"form",1)(2,"div",2)(3,"app-intelligent-field",3),E("onSave",function(){return i.clickSave();}),c()(),s(4,"div",2)(5,"app-intelligent-field",4),E("onSave",function(){return i.clickSave();}),c()()()()),e&2&&(m(),N("formGroup",i.form),m(2),N("object",i.subProcess)("form",i.form),m(2),N("object",i.subProcess)("form",i.form));},dependencies:[ut,tn,Nn,Mn,An,br],styles:[".process-fields-body[_ngcontent-%COMP%]{padding:8px 12px;overflow-y:auto;height:100%}.div-form-element[_ngcontent-%COMP%]{margin-bottom:4px}"]});};var IP=class n{constructor(t,e){this.messagingService=t;this.loggingService=e;}messagingService;loggingService;processTaskRef;processTask;form=new Ri({name:new st(""),description:new st("")});saveSpinner=!1;ngOnChanges(t){t.processTask&&this.processTask&&this.form.patchValue({name:this.processTask.name||"",description:this.processTask.description||""});}clickSave(){return $(this,null,function*(){if(this.processTaskRef){this.saveSpinner=!0;try{yield Dt(this.processTaskRef,this.form.value,{merge:!0}),this.processTask&&Object.assign(this.processTask,this.form.value),this.messagingService.open("Task fields saved","",{duration:3e3});}catch(t){this.loggingService.error(t),this.messagingService.open("Error saving task fields","",{duration:3e3});}finally{this.saveSpinner=!1;}}});}static ɵfac=function(e){return new(e||n)(le(Bt),le(Mo));};static ɵcmp=Te({type:n,selectors:[["app-process-task-fields-panel"]],inputs:{processTaskRef:"processTaskRef",processTask:"processTask"}
1004,features:[ki],decls:6,vars:5,consts:[[1,"process-fields-body"],[3,"formGroup"],[1,"div-form-element"],["objectType","processTask","field","processtask_name","controlName","name",3,"onSave","object","form"],["objectType","processTask","field","processtask_description","controlName","description",3,"onSave","object","form"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"form",1)(2,"div",2)(3,"app-intelligent-field",3),E("onSave",function(){return i.clickSave();}),c()(),s(4,"div",2)(5,"app-intelligent-field",4),E("onSave",function(){return i.clickSave();}),c()()()()),e&2&&(m(),N("formGroup",i.form),m(2),N("object",i.processTask)("form",i.form),m(2),N("object",i.processTask)("form",i.form));},dependencies:[ut,tn,Nn,Mn,An,br],styles:[".process-fields-body[_ngcontent-%COMP%]{padding:8px 12px;overflow-y:auto;height:100%}.div-form-element[_ngcontent-%COMP%]{margin-bottom:4px}"]});};var bx=class{static $inject=["palette","create","elementFactory","translate"];_create;_elementFactory;_translate;constructor(t,e,i,o){this._create=e,this._elementFactory=i,this._translate=o,t.registerProvider(this);}getPaletteEntries(){let t=this._create,e=this._elementFactory,i=this._translate;function o(a){let r=e.createShape({type:"bpmn:SubProcess",isExpanded:!1});t.start(a,r);}return{"create.subprocess-collapsed":{group:"activity",className:"bpmn-icon-subprocess-collapsed",title:i("Create Sub-Process (collapsed)"),action:{dragstart:o,click:o}}};}};var Bfe=["bpmnModeler"],$fe=["versionModeler"],yx=(n,t)=>t.id;function Vfe(n,t){if(n&1){let e=oe();s(0,"mat-icon",26),u(1,"chevron_right"),c(),s(2,"a",40),E("click",function(){k(e);let o=x();return R(o.navigateToSubProcessView());}),s(3,"mat-icon",24),u(4,"category"),c(),s(5,"span",25),u(6),c()();}if(n&2){let e=x();m(2),Ue("breadcrumb-active",!e.selectedProcessTask),m(4),Hn("",e.drillDownSubProcess.number,". ",e.drillDownSubProcess.name);}}function Gfe(n,t){if(n&1&&(s(0,"mat-icon",26),u(1,"chevron_right"),c(),s(2,"span",41)(3,"mat-icon",24),u(4,"assignment"),c(),s(5,"span",25),u(6),c()()),n&2){let e=x();m(6),Hn("",e.selectedProcessTask.number,". ",e.selectedProcessTask.name);}}function qfe(n,t){n&1&&(s(0,"mat-icon",42),u(1,"schema"),c(),s(2,"span"),u(3,"Working BPMN"),c());}function Jfe(n,t){if(n&1&&(s(0,"mat-icon",43),u(1,"auto_awesome"),c(),s(2,"span"),u(3),c()),n&2){let e=x().$implicit,i=x();m(3),G(i.formatVersionDate(e.generatedAt));}}function Hfe(n,t){n&1&&(s(0,"mat-tab"),Zt(1,Jfe,4,1,"ng-template",29),c());}function Ufe(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function Wfe(n,t){n&1&&(s(0,"mat-icon",45),u(1,"autorenew"),c());}function Xfe(n,t){n&1&&(s(0,"span"),u(1,"AI Generate"),c());}function Yfe(n,t){n&1&&(s(0,"span"),u(1,"Generating..."),c());}function Kfe(n,t){n&1&&(s(0,"mat-icon"),u(1,"format_list_numbered"),c());}function Zfe(n,t){n&1&&(s(0,"mat-icon",45),u(1,"autorenew"),c());}function Qfe(n,t){n&1&&(s(0,"span"),u(1,"Clean Numbers"),c());}function ehe(n,t){n&1&&(s(0,"span"),u(1,"Cleaning..."),c());}function the(n,t){n&1&&(s(0,"mat-icon"),u(1,"save"),c());}function nhe(n,t){n&1&&(s(0,"mat-icon",45),u(1,"autorenew"),c());}function ihe(n,t){n&1&&(s(0,"span"),u(1,"Save"),c());}function ohe(n,t){n&1&&(s(0,"span"),u(1,"Saving..."),c());}function ahe(n,t){if(n&1){let e=oe();s(0,"div",31)(1,"button",44),E("click",function(){k(e);let o=x();return R(o.clickGenerateBpmn());}),S(2,Ufe,2,0,"mat-icon"),S(3,Wfe,2,0,"mat-icon",45),S(4,Xfe,2,0,"span"),S(5,Yfe,2,0,"span"),c(),s(6,"button",46),E("click",function(){k(e);let o=x();return R(o.sync.cleanNumbers());}),S(7,Kfe,2,0,"mat-icon"),S(8,Zfe,2,0,"mat-icon",45),S(9,Qfe,2,0,"span"),S(10,ehe,2,0,"span"),c(),s(11,"button",47),E("click",function(){k(e);let o=x();return R(o.clickSave());}),S(12,the,2,0,"mat-icon"),S(13,nhe,2,0,"mat-icon",45),S(14,ihe,2,0,"span"),S(15,ohe,2,0,"span"),c()();}if(n&2){let e=x();m(),N("disabled",e.generateSpinner),m(),M(e.generateSpinner?-1:2),m(),M(e.generateSpinner?3:-1),m(),M(e.generateSpinner?-1:4),m(),M(e.generateSpinner?5:-1),m(),N("disabled",e.sync.cleanNumbersSpinner),m(),M(e.sync.cleanNumbersSpinner?-1:7),m(),M(e.sync.cleanNumbersSpinner?8:-1),m(),M(e.sync.cleanNumbersSpinner?-1:9),m(),M(e.sync.cleanNumbersSpinner?10:-1),m(),N("disabled",e.saveSpinner),m(),M(e.saveSpinner?-1:12),m(),M(e.saveSpinner?13:-1),m(),M(e.saveSpinner?-1:14),m(),M(e.saveSpinner?15:-1);}}function rhe(n,t){if(n&1&&u(0),n&2){let e=x(2).$implicit;_e(" \xB7 ",e.subProcessCount," sub-processes ");}}function she(n,t){if(n&1&&u(0),n&2){let e=x(2).$implicit;_e(" \xB7 ",e.model," ");}}function lhe(n,t){n&1&&(fi(0),s(1,"mat-icon",45),u(2,"autorenew"),c(),s(3,"span"),u(4,"Saving..."),c(),hi());}function che(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"check"),c(),s(3,"span"),u(4,"Accept & Replace Working BPMN"),c(),hi());}function phe(n,t){if(n&1){let e=oe();s(0,"div",48)(1,"mat-icon",49),u(2,"auto_awesome"),c(),s(3,"span"),u(4),S(5,rhe,1,1),S(6,she,1,1),c()(),s(7,"div",31)(8,"button",50),E("click",function(){k(e);let o=x().$index,a=x(2);return R(a.clickDeleteVersion(o));}),s(9,"mat-icon"),u(10,"delete"),c(),s(11,"span"),u(12,"Delete"),c()(),s(13,"button",51),E("click",function(){k(e);let o=x().$index,a=x(2);return R(a.clickAcceptVersion(o));}),S(14,lhe,5,0,"ng-container")(15,che,5,0,"ng-container"),c()();}if(n&2){let e=x().$implicit,i=x(2);m(4),_e(" AI version \u2014 ",i.formatVersionDate(e.generatedAt)," "),m(),M(e.subProcessCount?5:-1),m(),M(e.model?6:-1),m(2),N("disabled",i.versionActionSpinner),m(5),N("disabled",i.versionActionSpinner),m(),M(i.versionActionSpinner?14:15);}}function dhe(n,t){if(n&1&&S(0,phe,16,6),n&2){let e=t.$index,i=x(2);M(i.activeTabIndex===e+1?0:-1);}}function mhe(n,t){if(n&1&&be(0,dhe,1,1,null,null,yx),n&2){let e=x();ye(e.bpmnVersions);}}function uhe(n,t){if(n&1&&ee(0,"app-business-process-fields-panel",53),n&2){let e=x(2);N("objectRef",e.objectRef)("object",e.object);}}function fhe(n,t){if(n&1&&ee(0,"app-subprocess-fields-panel",54),n&2){let e=x(2);N("subProcessRef",e.selectedSubProcessRef||e.drillDownSubProcessRef)("subProcess",e.selectedSubProcess||e.drillDownSubProcess||void 0);}}function hhe(n,t){if(n&1&&ee(0,"app-process-task-fields-panel",55),n&2){let e=x(2);N("processTaskRef",e.selectedProcessTaskRef)("processTask",e.selectedProcessTask||void 0);}}function _he(n,t){if(n&1&&(s(0,"as-split-area",34)(1,"div",52),S(2,uhe,1,2,"app-business-process-fields-panel",53),S(3,fhe,1,2,"app-subprocess-fields-panel",54),S(4,hhe,1,2,"app-process-task-fields-panel",55),c()()),n&2){let e=x();N("size",e.visibleLeftPanelKeys.length>
10041?e.layout.splitSizesLeft.processFields:100),m(2),M(e.activeFieldsPanel==="businessProcess"?2:-1),m(),M(e.activeFieldsPanel==="subProcess"?3:-1),m(),M(e.activeFieldsPanel==="processTask"?4:-1);}}function ghe(n,t){if(n&1&&(s(0,"as-split-area",34),ee(1,"app-gap-analysis-panel",56),c()),n&2){let e=x();N("size",e.visibleLeftPanelKeys.length>1?e.layout.splitSizesLeft.gapAnalysis:100),m(),N("projectId",e.pid)("businessProcessId",e.id)("businessProcess",e.object)("drillDownSubProcess",e.drillDownSubProcess)("selectedSubProcess",e.selectedSubProcess)("selectedProcessTask",e.selectedProcessTask);}}function xhe(n,t){n&1&&(s(0,"div",37)(1,"mat-icon",57),u(2,"link_off"),c(),s(3,"div",58),u(4,"No diagram linked"),c(),s(5,"div",59),u(6," This subprocess is not linked to a BPMN diagram shape. You can manage tasks from the list, or link it to a diagram shape later. "),c()());}function Che(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function vhe(n,t){n&1&&(s(0,"mat-icon",45),u(1,"autorenew"),c());}function bhe(n,t){n&1&&(s(0,"mat-icon",74),u(1,"link"),c());}function yhe(n,t){if(n&1){let e=oe();s(0,"tr",72),E("click",function(){let o=k(e).$implicit,a=x(6);return R(a.onSubProcessListClick(o));})("dblclick",function(){let o=k(e).$implicit,a=x(6);return R(a.clickDrillDown(o));}),s(1,"td",68),u(2),c(),s(3,"td",69),u(4),c(),s(5,"td",70)(6,"mat-icon",73),E("click",function(o){let a=k(e).$implicit;return x(6).clickDrillDown(a),R(o.stopPropagation());}),u(7," unfold_more "),c(),S(8,bhe,2,0,"mat-icon",74),c()();}if(n&2){let e=t.$implicit,i=x(6);Ue("sp-list-row-selected",i.sync.isItemSelected(e)),m(2),G(e.number),m(2),G(e.name),m(4),M(e.bpmnElementId?8:-1);}}function Phe(n,t){if(n&1&&(s(0,"table",66)(1,"thead")(2,"tr")(3,"th",68),u(4,"Nb."),c(),s(5,"th",69),u(6,"Name"),c(),ee(7,"th",70),c()(),s(8,"tbody"),be(9,yhe,9,5,"tr",71,yx),c()()),n&2){let e=x(5);m(9),ye(e.sync.items);}}function whe(n,t){n&1&&(s(0,"span",67),u(1," No sub-processes found. "),c());}function She(n,t){if(n&1&&(S(0,Phe,11,0,"table",66),S(1,whe,2,0,"span",67)),n&2){let e=x(4);M(e.sync.items.length>0?0:-1),m(),M(e.sync.items.length===0?1:-1);}}function Mhe(n,t){if(n&1){let e=oe();s(0,"div",60)(1,"mat-icon",61),u(2,"list"),c(),s(3,"span",62),u(4,"Sub-Processes"),c(),s(5,"div",20)(6,"button",63),E("click",function(){k(e);let o=x(3);return R(o.clickAddSubProcess());}),s(7,"mat-icon"),u(8,"add"),c()(),s(9,"button",64),E("click",function(){k(e);let o=x(3);return R(o.clickGenerateSubProcesses());}),S(10,Che,2,0,"mat-icon"),S(11,vhe,2,0,"mat-icon",45),c()()(),s(12,"div",65),S(13,She,2,2),c();}if(n&2){let e=x(3);m(9),N("disabled",e.generateSubProcessSpinner),m(),M(e.generateSubProcessSpinner?-1:10),m(),M(e.generateSubProcessSpinner?11:-1),m(2),M(e.pid&&e.id?13:-1);}}function Ohe(n,t){n&1&&(s(0,"mat-icon"),u(1,"auto_awesome"),c());}function Ehe(n,t){n&1&&(s(0,"mat-icon",45),u(1,"autorenew"),c());}function The(n,t){n&1&&(s(0,"mat-icon",74),u(1,"link"),c());}function Ihe(n,t){if(n&1){let e=oe();s(0,"tr",77),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.onTaskListClick(o));}),s(1,"td",68),u(2),c(),s(3,"td",69),u(4),c(),s(5,"td",70),S(6,The,2,0,"mat-icon",74),c()();}if(n&2){let e=t.$implicit,i=x(5);Ue("sp-list-row-selected",i.taskSync.isItemSelected(e)),m(2),G(e.number),m(2),G(e.name),m(2),M(e.bpmnElementId?6:-1);}}function khe(n,t){if(n&1&&(s(0,"table",66)(1,"thead")(2,"tr")(3,"th",68),u(4,"Nb."),c(),s(5,"th",69),u(6,"Name"),c(),ee(7,"th",70),c()(),s(8,"tbody"),be(9,Ihe,7,5,"tr",71,yx),c()()),n&2){let e=x(4);m(9),ye(e.taskSync.items);}}function Rhe(n,t){n&1&&(s(0,"span",67),u(1," No tasks found for this sub-process. "),c());}function Nhe(n,t){if(n&1){let e=oe();s(0,"div",60)(1,"mat-icon",61),u(2,"assignment"),c(),s(3,"span",62),u(4),c(),s(5,"div",20)(6,"button",75),E("click",function(){k(e);let o=x(3);return R(o.clickAddTask());}),s(7,"mat-icon"),u(8,"add"),c()(),s(9,"button",76),E("click",function(){k(e);let o=x(3);return R(o.clickGenerateTasks());}),S(10,Ohe,2,0,"mat-icon"),S(11,Ehe,2,0,"mat-icon",45),c()()(),s(12,"div",65),S(13,khe,11,0,"table",66),S(14,Rhe,2,0,"span",67),c();}if(n&2){let e=x(3);m(4),Hn("Tasks \u2014 ",e.drillDownSubProcess.number,". ",e.drillDownSubProcess.name),m(5),N("disabled",e.generateTaskSpinner),m(),M(e.generateTaskSpinner?-1:10),m(),M(e.generateTaskSpinner?11:-1),m(2),M(e.taskSync.items.length>0?13:-1),m(),M(e.taskSync.items.length===0?14:-1);}}function Ahe(n,t){if(n&1&&(s(0,"as-split-area",34)(1,"div",52),S(2,Mhe,14,4),S(3,Nhe,15,7),c()()),n&2){let e=x(2);N("size",e.layout.splitSizesRight.processList),m(2),M(e.drillDownSubProcess?-1:2),m(),M(e.drillDownSubProcess?3:-1);}}function Dhe(n,t){if(n&1){let e=oe();s(0,"app-item-detail-panel",80),E("linkItem",function(o){k(e);let a=x(3);return R(a.sync.linkItemById(o));})("unlinkItem",function(){k(e);let o=x(3);return R(o.sync.unlinkItem());})("createInDiagram",function(o){k(e);let a=x(3);return R(a.sync.createAndLinkItem(o));})("itemChanged",function(o){k(e);let a=x(3);return R(a.sync.updateItemField(o));})("deleteItem",function(){k(e);let o=x(3);return R(o.sync.deleteItem());}),c();}if(n&2){let e=x(3),i=bn(85);N("selectedElement",e.sync.selectedElement)("linkedItem",e.sync.selectedItem)("unlinkedItems",e.sync.getUnlinkedItems())("targetBpmnType","bpmn:SubProcess")("linkSpinner",e.sync.linkSpinner)("extraDetailTemplate",i
1004);}}function jhe(n,t){if(n&1){let e=oe();s(0,"app-item-detail-panel",81),E("linkItem",function(o){k(e);let a=x(3);return R(a.taskSync.linkItemById(o));})("unlinkItem",function(){k(e);let o=x(3);return R(o.taskSync.unlinkItem());})("createInDiagram",function(o){k(e);let a=x(3);return R(a.taskSync.createAndLinkItem(o));})("itemChanged",function(o){k(e);let a=x(3);return R(a.taskSync.updateItemField(o));})("deleteItem",function(){k(e);let o=x(3);return R(o.taskSync.deleteItem());}),c();}if(n&2){let e=x(3),i=bn(87);N("selectedElement",e.taskSync.selectedElement)("linkedItem",e.taskSync.selectedItem)("unlinkedItems",e.taskSync.getUnlinkedItems())("targetBpmnType","bpmn:Task")("linkSpinner",e.taskSync.linkSpinner)("extraDetailTemplate",i);}}function Lhe(n,t){if(n&1&&(s(0,"as-split-area",34)(1,"div",52),S(2,Dhe,1,6,"app-item-detail-panel",78),S(3,jhe,1,6,"app-item-detail-panel",79),c()()),n&2){let e=x(2);N("size",e.layout.splitSizesRight.processDetail),m(2),M(e.drillDownSubProcess?-1:2),m(),M(e.drillDownSubProcess?3:-1);}}function zhe(n,t){if(n&1&&(s(0,"as-split-area",34),ee(1,"app-context-notes-panel",82),c()),n&2){let e=x(2);N("size",e.layout.splitSizesRight.contextNotes),m(),N("objectRef",e.objectRef)("notesPath",e.getNotesPath())("showContexts",!0)("showNotes",!0);}}function Fhe(n,t){if(n&1&&(s(0,"as-split-area",34)(1,"div",83)(2,"div",60)(3,"mat-icon",61),u(4,"chat"),c(),s(5,"span",62),u(6,"Chat with the architect"),c()(),s(7,"div",84),ee(8,"app-ask-architect",85),c()()()),n&2){let e=x(2);N("size",e.layout.splitSizesRight.chat),m(8),N("objectTypeId","businessProcess")("object",e.object);}}function Bhe(n,t){if(n&1){let e=oe();s(0,"as-split-area",34)(1,"as-split",35),E("dragEnd",function(o){k(e);let a=x();return R(a.layout.onVerticalRightDragEnd(o,a.rightPanelOrder));}),S(2,Ahe,4,3,"as-split-area",34),S(3,Lhe,4,3,"as-split-area",34),S(4,zhe,2,5,"as-split-area",34),S(5,Fhe,9,3,"as-split-area",34),c()();}if(n&2){let e=x();N("size",e.layout.splitSizes.right),m(),N("gutterSize",20),m(),M(e.layout.panelVisibility.processList?2:-1),m(),M(e.layout.panelVisibility.processDetail?3:-1),m(),M(e.layout.panelVisibility.contextNotes?4:-1),m(),M(e.layout.panelVisibility.chat?5:-1);}}function $he(n,t){if(n&1&&(s(0,"div",86)(1,"div",87),ee(2,"app-bpmn-modeler-wrapper",null,3),c()()),n&2){let e=t.$index,i=x();Ci("display",i.activeTabIndex===e+1?"flex":"none");}}function Vhe(n,t){if(n&1&&(s(0,"div",88)(1,"span",91),u(2,"Key Activities:"),c(),s(3,"span",92),u(4),c()()),n&2){let e=x().$implicit;m(4),G(e.keyActivities);}}function Ghe(n,t){if(n&1){let e=oe();S(0,Vhe,5,1,"div",88),s(1,"div",89)(2,"button",90),E("click",function(){let o=k(e).$implicit,a=x();return R(a.clickDrillDown(o));}),s(3,"mat-icon"),u(4,"unfold_more"),c(),s(5,"span"),u(6,"Expand Subprocess"),c()()();}if(n&2){let e=t.$implicit;M(e.keyActivities?0:-1);}}function qhe(n,t){if(n&1&&(s(0,"div",88)(1,"span",91),u(2,"Actor:"),c(),s(3,"span",92),u(4),c()()),n&2){let e=x().$implicit;m(4),G(e.actor);}}function Jhe(n,t){if(n&1&&(s(0,"div",88)(1,"span",91),u(2,"Complexity:"),c(),s(3,"span",92),u(4),c()()),n&2){let e=x().$implicit;m(4),G(e.complexity);}}function Hhe(n,t){if(n&1&&(S(0,qhe,5,1,"div",88),S(1,Jhe,5,1,"div",88)),n&2){let e=t.$implicit;M(e.actor?0:-1),m(),M(e.complexity?1:-1);}}var g_=class n{constructor(t,e,i,o,a,r,l){this.firebase=t;this.router=e;this.route=i;this.messagingService=o;this.loggingService=a;this.dialog=r;this.localeService=l;this.sync=new vx({bpmnElementType:"bpmn:SubProcess",collectionSuffix:"subprocesses",defaultItemName:"New Sub-Process",itemLabel:"Sub-process",itemLabelPlural:"sub-process(es)",deleteDialogComponent:A0,deleteDialogTitle:"Delete Sub-Process Shape",deleteDialogMessage:"This shape is linked to a sub-process. What would you like to do?",createShapeOptions:{isExpanded:!1}},t,o,a,r),this.taskSync=new vx({bpmnElementType:"bpmn:Task",collectionSuffix:"processtasks",defaultItemName:"New Task",itemLabel:"Task",itemLabelPlural:"task(s)",deleteDialogComponent:A0,deleteDialogTitle:"Delete Task Shape",deleteDialogMessage:"This shape is linked to a task. What would you like to do?"},t,o,a,r);}firebase;router;route;messagingService;loggingService;dialog;localeService;bpmnModeler;versionModelers;subscriptions=new jo();pid;id;objectLabel="BPMN Designer";processName="";projectName="";routeSpId=null;routeTaskId=null;isInitialDrillDown=!1;collectionPath="";objectRef;object;activeTabIndex=0;bpmnVersions=[];versionLoadedFlags=[];versionActionSpinner=!1;saveSpinner=!1;generateSpinner=!1;generateSubProcessSpinner=!1;generateTaskSpinner=!1;processSteps=[];dataLoaded;bpmnAdditionalModules=[{__init__:["customPaletteProvider"],customPaletteProvider:["type",bx]}];sync;taskSync;drillDownSubProcess=null;isFirestoreOnlyDrillDown=!1;_isDrillingDown=!1;layout=new Yf({prefix:"bpmn",horizontalDefaults:{left:70,right:30},verticalRightDefaults:{processList:25,processDetail:25,contextNotes:30,chat:20}
1004,verticalLeftDefaults:{processFields:30,gapAnalysis:30,modeler:40},panelVisibilityDefaults:{modeler:!0,processFields:!0,gapAnalysis:!1,processList:!0,processDetail:!0,contextNotes:!1,chat:!1}});rightPanelOrder=["processList","processDetail","contextNotes","chat"];drillDownSubProcessRef;activeFieldsPanel="businessProcess";selectedSubProcess=null;selectedSubProcessRef;selectedProcessTask=null;selectedProcessTaskRef;ngOnInit(){this.dataLoaded=this.loadData(),this.subscriptions.add(this.router.events.subscribe(t=>{t instanceof KT&&t.navigationTrigger==="popstate"&&this.drillDownSubProcess&&(this.router.navigate([this.router.url],{replaceUrl:!0}),this.navigateToBusinessProcessRoot());}));}loadData(){return $(this,null,function*(){try{let t=this.route.snapshot.paramMap.get("pid");t&&(this.pid=t);let e=this.route.snapshot.paramMap.get("bpid");if(e&&(this.id=e),this.routeSpId=this.route.snapshot.paramMap.get("spid"),this.routeTaskId=this.route.snapshot.paramMap.get("taskid"),!this.pid||!this.id)return;this.collectionPath="/projects/"+this.pid+"/businessprocesses/",this.objectRef=ge(this.firebase.firestore,this.collectionPath,this.id);try{let a=ge(this.firebase.firestore,"/projects/",this.pid),r=yield yt(a);if(r.exists()){let l=r.data();this.projectName=l.name||"Project";}}catch(a){this.loggingService.error(a),this.projectName="Project";}let i=yield yt(this.objectRef);i.exists()&&(this.object=X({id:i.id},i.data()),this.processName=this.object.number+". "+this.object.name),this.setupBpmnVersionsListener();let o=this.collectionPath+this.id;this.sync.init(o,this.bpmnModeler),yield this.sync.loadItems(),setTimeout(()=>$(this,null,function*(){if(this.bpmnModeler){this.sync.init(o,this.bpmnModeler);let a=this.object?.bpmnXml||"";try{yield this.bpmnModeler.importXml(a||this.bpmnModeler.defaultXml),this.bpmnModeler.setProcessName(this.processName),this.routeSpId&&(yield this.handleDeepLinkDrillDown());}catch(r){this.loggingService.error(r),this.messagingService.open("Error loading BPMN diagram","",{duration:3e3});}}}));}catch(t){this.loggingService.error(t),this.messagingService.open("Error loading business process","",{duration:3e3});}});}handleDeepLinkDrillDown(){return $(this,null,function*(){if(!this.routeSpId)return;let t=this.sync.items.find(i=>i.id===this.routeSpId);if(!t){this.loggingService.debug("Deep-link subprocess not found: "+this.routeSpId);return;}this.isInitialDrillDown=!0;let e=!1;if(t.bpmnElementId&&this.bpmnModeler&&(e=this.bpmnModeler.drillDownToElement(t.bpmnElementId)),e)this.routeTaskId?setTimeout(()=>{let i=this.taskSync.items.find(o=>o.id===this.routeTaskId);i&&this.taskSync.selectItemInDiagram(i),this.isInitialDrillDown=!1;},500):setTimeout(()=>{this.isInitialDrillDown=!1;},200);else{if(yield this.firestoreOnlyDrillDown(t),this.routeTaskId){let i=this.taskSync.items.find(o=>o.id===this.routeTaskId);i&&this.taskSync.selectItemInDiagram(i);}this.isInitialDrillDown=!1;}});}ngOnDestroy(){this.subscriptions.unsubscribe();}onProcessStepsExtracted(t){this.processSteps=t,this.loggingService.debug("Extracted process steps: "+JSON.stringify(t));}getSubProcessRoute(){return"/dashboard/project/"+this.pid+"/businessprocess/"+this.id+"/subprocess";}clickSave(){return $(this,null,function*(){if(!(!this.objectRef||!this.bpmnModeler)){this.saveSpinner=!0;try{let t=yield this.bpmnModeler.saveXml();yield Dt(this.objectRef,{bpmnXml:t},{merge:!0}),this.messagingService.open("BPMN diagram saved","",{duration:3e3});}catch(t){this.loggingService.error(t),this.messagingService.open("Error saving BPMN diagram","",{duration:3e3});}finally{this.saveSpinner=!1;}}});}togglePanelVisibility(t){let e=this.layout.togglePanel(t);t==="modeler"&&e&&this.bpmnModeler?.refreshCanvas();}getNotesPath(){return`${this.collectionPath}${this.id}/notes`;}navigateToSubProcess(t){this.router.navigate([this.getSubProcessRoute()+"/"+t.id]);}getBpmnVersionsPath(){return this.collectionPath+this.id+"/bpmnVersions";}setupBpmnVersionsListener(){if(!this.pid||!this.id)return;let t=this.getBpmnVersionsPath(),e=mt(we(this.firebase.firestore,t),Jt("generatedAt","desc")),i=Bn(e,o=>{let a=o.docs.map(d=>X({id:d.id},d.data())),r=new Map();this.bpmnVersions.forEach((d,f)=>r.set(d.id,this.versionLoadedFlags[f]??!1));let l=this.bpmnVersions.length,p=this.generateSpinner;this.bpmnVersions=a,this.versionLoadedFlags=a.map(d=>r.get(d.id)??!1),p&&a.length>l&&(this.generateSpinner=!1,this.activeTabIndex=1,this.messagingService.open("AI BPMN generated ("+(a[0]?.subProcessCount??0)+" sub-processes). Review in the Version tab.","",{duration:5e3})),this.activeTabIndex>0&&this.onTabChange(this.activeTabIndex);},o=>{this.loggingService.error(o.message);});this.subscriptions.add(i);}
1004clickGenerateBpmn(){if(!this.pid||!this.id||!this.bpmnModeler)return;this.generateSpinner=!0,ei(this.firebase.functions,"functionGenerateBpmnXml")({projectId:this.pid,businessProcessId:this.id}).catch(e=>{e?.code!=="functions/deadline-exceeded"&&(this.loggingService.error(e),this.messagingService.open("Error generating BPMN diagram: "+(e.message||"Unknown error"),"",{duration:5e3}),this.generateSpinner=!1);}),this.messagingService.open("AI BPMN generation started. This may take a minute\u2026","",{duration:6e3});}onTabChange(t){if(this.activeTabIndex=t,t===0){setTimeout(()=>this.bpmnModeler?.refreshCanvas(),150);return;}let e=t-1;e<0||e>=this.bpmnVersions.length||(this.versionLoadedFlags[e]?setTimeout(()=>{this.versionModelers.toArray()[e]?.refreshCanvas();},150):setTimeout(()=>$(this,null,function*(){let o=this.versionModelers.toArray()[e];if(o&&this.bpmnVersions[e]?.bpmnXml)try{yield o.importXml(this.bpmnVersions[e].bpmnXml),o.setProcessName(this.processName+" \u2014 Version "+(e+1));}catch(a){this.loggingService.error(a);}this.versionLoadedFlags[e]=!0;}),150));}clickAcceptVersion(t){return $(this,null,function*(){if(!this.objectRef)return;let e=this.bpmnVersions[t];if(e){this.versionActionSpinner=!0;try{let o=this.versionModelers.toArray()[t],a=(o?yield o.saveXml():"")||e.bpmnXml;yield Dt(this.objectRef,{bpmnXml:a},{merge:!0}),yield this.bpmnModeler.importXml(a),this.bpmnModeler.setProcessName(this.processName),this.activeTabIndex=0,this.messagingService.open("Version accepted and saved as working BPMN.","",{duration:4e3});}catch(i){this.loggingService.error(i),this.messagingService.open("Error accepting version: "+(i.message||"Unknown error"),"",{duration:4e3});}finally{this.versionActionSpinner=!1;}}});}clickDeleteVersion(t){return $(this,null,function*(){let e=this.bpmnVersions[t];if(!(!e||!this.pid||!this.id)){this.versionActionSpinner=!0;try{let i=ge(this.firebase.firestore,this.getBpmnVersionsPath(),e.id);yield no(i),this.bpmnVersions.splice(t,1),this.versionLoadedFlags.splice(t,1),this.activeTabIndex>this.bpmnVersions.length&&(this.activeTabIndex=0),this.messagingService.open("Version deleted.","",{duration:3e3});}catch(i){this.loggingService.error(i),this.messagingService.open("Error deleting version: "+(i.message||"Unknown error"),"",{duration:3e3});}finally{this.versionActionSpinner=!1;}}});}formatVersionDate(t){if(!t)return"";let e=t?.toDate?t.toDate():new Date(t);return e.toLocaleDateString(void 0,{month:"short",day:"numeric"})+" "+e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});}clickAddTask(){return $(this,null,function*(){if(!this.pid||!this.id||!this.drillDownSubProcess)return;let e=this.taskSync.items.reduce((a,r)=>{let l=parseInt(r.number);return isNaN(l)?a:Math.max(a,l);},0)+1,i=this.taskSync.getCollectionPath(),o=we(this.firebase.firestore,i);yield Ht(o,{number:e+"",name:"New Task",description:"",projectId:this.pid,businessProcessId:this.id,subProcessId:this.drillDownSubProcess.id,creationDate:Rn.fromDate(new Date())}),yield this.taskSync.loadItems(),this.messagingService.open("Task created.","",{duration:3e3});});}clickAddSubProcess(){return $(this,null,function*(){if(!this.pid||!this.id)return;let t=yield this.getNextSubProcessNumber();yield this.addSubProcess(t,"New Sub-Process",""),yield this.sync.loadItems(),this.messagingService.open("Sub-process created.","",{duration:3e3});});}clickGenerateSubProcesses(){return $(this,null,function*(){if(!this.object)return;let t=yield this.generateSubProcessList(this.object);try{t?this.dialog.open(gs,{height:"50%",width:"1000px",data:{rawData:t}}).afterClosed().subscribe(i=>$(this,null,function*(){if(i){let o=yield this.getNextSubProcessNumber();for(let a of i)a.selected&&a.selected===!0&&(yield this.addSubProcess(o,a.title,a.description,a.main_actors),o++);yield this.sync.loadItems(),this.messagingService.open("Sub-processes added.","",{duration:3e3});}})):this.messagingService.open("No results.","",{duration:3e3});}catch(e){this.messagingService.open("An error has occurred, please try again later or contact the administrator.","",{duration:3e3});}});}generateSubProcessList(t){return $(this,null,function*(){let e=this.firebase.functions,i=ei(e,"functionCallFunctionStream"),o,a={functionName:"generate_subprocesses",version:"1.0",objectType:"businessProcess",locale:this.localeService.getSelectedLocaleShort(),object:{businessProcess:t},acceptsStreaming:!0};this.generateSubProcessSpinner=!0;try{let{stream:f,data:h}=yield i.stream(a);try{for(var r=Co(f),l,p,d;l=!(p=yield r.next()).done;l=!1){let g=p.value;g&&(o=g);}}catch(p){d=[p];}finally{try{l&&(p=r.return)&&(yield p.call(r));}finally{if(d)throw d[0];}}}catch(f){console.error("Error streaming subprocess generation:",f),this.generateSubProcessSpinner=!1;return;}finally{this.generateSubProcessSpinner=!1;}return o;});}clickGenerateTasks(){return $(this,null,function*(){if(!this.drillDownSubProcess||!this.pid||
1004!this.id)return;let t=yield this.generateTaskList(this.drillDownSubProcess);try{t?this.dialog.open(gs,{height:"50%",width:"1000px",data:{rawData:t}}).afterClosed().subscribe(i=>$(this,null,function*(){if(i){let a=this.taskSync.items.reduce((p,d)=>{let f=parseInt(d.number);return isNaN(f)?p:Math.max(p,f);},0)+1,r=this.taskSync.getCollectionPath(),l=we(this.firebase.firestore,r);for(let p of i)p.selected&&p.selected===!0&&(yield Ht(l,{number:a+"",name:p.title,description:p.description||"",projectId:this.pid,businessProcessId:this.id,subProcessId:this.drillDownSubProcess.id,creationDate:Rn.fromDate(new Date())}),a++);yield this.taskSync.loadItems(),this.messagingService.open("Tasks added.","",{duration:3e3});}})):this.messagingService.open("No results.","",{duration:3e3});}catch(e){this.messagingService.open("An error has occurred, please try again later or contact the administrator.","",{duration:3e3});}});}generateTaskList(t){return $(this,null,function*(){let e=this.firebase.functions,i=ei(e,"functionCallFunctionStream"),o,a={functionName:"generate_tasks",version:"1.0",objectType:"subProcess",locale:this.localeService.getSelectedLocaleShort(),object:{subProcess:t},acceptsStreaming:!0};this.generateTaskSpinner=!0;try{let{stream:f,data:h}=yield i.stream(a);try{for(var r=Co(f),l,p,d;l=!(p=yield r.next()).done;l=!1){let g=p.value;g&&(o=g);}}catch(p){d=[p];}finally{try{l&&(p=r.return)&&(yield p.call(r));}finally{if(d)throw d[0];}}}catch(f){console.error("Error streaming task generation:",f),this.generateTaskSpinner=!1;return;}finally{this.generateTaskSpinner=!1;}return o;});}getNextSubProcessNumber(){return $(this,null,function*(){let t=1,e=this.sync.getCollectionPath(),i=mt(we(this.firebase.firestore,e),Jt("number","desc")),o=yield at(i);for(let a of o.docs){let r=X({id:a.id},a.data()),l=parseInt(r.number);l>t&&(t=l);break;}return t+1;});}addSubProcess(t,e,i,o){return $(this,null,function*(){let a=this.sync.getCollectionPath(),r=we(this.firebase.firestore,a),l={number:t+"",name:e,description:i||"",projectId:this.pid,businessProcessId:this.id,creationDate:Rn.fromDate(new Date())};o&&(l.actors=o),yield Ht(r,l);});}clickModeBpmn(){this.layout.setMode({modeler:!0,processFields:!1,gapAnalysis:!1,processList:!0,processDetail:!0,contextNotes:!1,chat:!1}),this.bpmnModeler?.refreshCanvas();}clickModeProcess(){this.layout.setMode({modeler:!1,processFields:!0,gapAnalysis:!1,processList:!0,processDetail:!1,contextNotes:!0,chat:!0});}clickGapAnalysis(){this.layout.setMode({modeler:!1,processFields:!1,gapAnalysis:!0,processList:!0,processDetail:!0,contextNotes:!1,chat:!1}),this.bpmnModeler?.refreshCanvas();}get visibleLeftPanelKeys(){return["processFields","gapAnalysis","modeler"].filter(t=>this.layout.panelVisibility[t]);}onSubProcessListClick(t){if(this.sync.isItemSelected(t)){this.sync.deselectItem(),this.resetFieldsPanelToBase();return;}if(this.sync.selectItemInDiagram(t),!t.bpmnElementId||!this.sync.selectedElement){this.selectedSubProcess=t;let e=this.collectionPath+this.id+"/subprocesses/"+t.id;this.selectedSubProcessRef=ge(this.firebase.firestore,e),this.selectedProcessTask=null,this.selectedProcessTaskRef=void 0,this.activeFieldsPanel="subProcess";}}onTaskListClick(t){if(this.taskSync.isItemSelected(t)){this.taskSync.deselectItem(),this.resetFieldsPanelToBase();return;}if(this.taskSync.selectItemInDiagram(t),(!t.bpmnElementId||!this.taskSync.selectedElement)&&this.drillDownSubProcess){this.selectedProcessTask=t;let e=this.collectionPath+this.id+"/subprocesses/"+this.drillDownSubProcess.id+"/processtasks/"+t.id;this.selectedProcessTaskRef=ge(this.firebase.firestore,e),this.selectedSubProcess=null,this.selectedSubProcessRef=void 0,this.activeFieldsPanel="processTask";}}clickDrillDown(t){this._isDrillingDown=!0,!(t.bpmnElementId&&this.bpmnModeler&&this.layout.panelVisibility.modeler&&this.bpmnModeler.drillDownToElement(t.bpmnElementId))&&this.firestoreOnlyDrillDown(t);}firestoreOnlyDrillDown(t){return $(this,null,function*(){this.drillDownSubProcess=t,this.isFirestoreOnlyDrillDown=!0;let e=this.collectionPath+this.id+"/subprocesses/"+t.id;this.drillDownSubProcessRef=this.selectedSubProcessRef||ge(this.firebase.firestore,e),this.activeFieldsPanel!=="subProcess"?this.resetFieldsPanelToBase():(this.selectedSubProcess=null,this.selectedSubProcessRef=void 0,this.selectedProcessTask=null,this.selectedProcessTaskRef=void 0),this.loggingService.debug('Firestore-only drill-down into subprocess: "'+t.number+". "+t.name+'"'),this.taskSync.init(e,this.bpmnModeler),yield this.taskSync.loadItems(),this.syncUrlToState(),this._isDrillingDown=!1;});}onRootChanged(t){return $(this,null,function*(){if(this._isDrillingDown=!0,this.isFirestoreOnlyDrillDown=!1,t.isSubProcess){let e=this.sync.items.find(i=>i.bpmnElementId===t.elementId);if(e){this.drillDownSubProcess=e;let i=this.collectionPath+this.id+"/subprocesses/"+e.id;this.loggingService.debug('Drilled into subprocess: "'+e.number+". "+e.name+'"'),this.drillDownSubProcessRef=this.selectedSubProcessRef||ge(this.firebase.firestore,i),this.activeFieldsPanel!=="subProcess"?this.resetFieldsPanelToBase():(this.selectedSubProcess=null,this.selectedSubProcessRef=void 0,this.selectedProcessTask=null,this.selectedProcessTaskRef=void 0),this.taskSync.init(i,this.bpmnModeler),yield this.taskSync.loadItems(),this.isInitialDrillDown||this.syncUrlToState();}else this.drillDownSubProcess=null,this.drillDownSubProcessRef=void 0,this.resetFieldsPanelToBase(),this.loggingService.debug("Drilled into unlinked subprocess shape: "+t.elementId);}else this.drillDownSubProcess=null,this.drillDownSubProcessRef=void 0,this.taskSync.items=[],this.taskSync.selectedElement=null,this.taskSync.selectedItem=null,this.resetFieldsPanelToBase(),this.loggingService.debug("Returned to root process"),this.isInitialDrillDown||this.syncUrlToState();this._isDrillingDown=!1;});}onSelectionChanged(t){this._isDrillingDown||(this.drillDownSubProcess?(this.taskSync.onSelectionChanged(t),this.updateFieldsPanelFromSelection(t,this.taskSync,"processTask")):(this.sync.onSelectionChanged(t),this.updateFieldsPanelFromSelection(t,this.sync,"subProcess")));}resetFieldsPanelToBase(){this.selectedSubProcess=null,this.selectedSubProcessRef=void 0,this.selectedProcessTask=null,this.selectedProcessTaskRef=void 0,this.activeFieldsPanel=this.drillDownSubProcess?"subProcess":"businessProcess";}
1004updateFieldsPanelFromSelection(t,e,i){if(!t||!e.selectedItem){this.resetFieldsPanelToBase();return;}let o=e.selectedItem;if(i==="subProcess"&&o.id){this.selectedSubProcess=o;let a=this.collectionPath+this.id+"/subprocesses/"+o.id;this.selectedSubProcessRef=ge(this.firebase.firestore,a),this.selectedProcessTask=null,this.selectedProcessTaskRef=void 0,this.activeFieldsPanel="subProcess";}else if(i==="processTask"&&o.id&&this.drillDownSubProcess){this.selectedProcessTask=o;let a=this.collectionPath+this.id+"/subprocesses/"+this.drillDownSubProcess.id+"/processtasks/"+o.id;this.selectedProcessTaskRef=ge(this.firebase.firestore,a),this.selectedSubProcess=null,this.selectedSubProcessRef=void 0,this.activeFieldsPanel="processTask";}else this.resetFieldsPanelToBase();}onShapeAdded(t){this.drillDownSubProcess?this.taskSync.onShapeAdded(t):this.sync.onShapeAdded(t);}onShapeRemoved(t){this.drillDownSubProcess?this.taskSync.onShapeRemoved(t):this.sync.onShapeRemoved(t);}onElementChanged(t){this.drillDownSubProcess?this.taskSync.onElementChanged(t):this.sync.onElementChanged(t);}getDesignerBaseRoute(){return"/dashboard/project/"+this.pid+"/businessprocess/"+this.id;}syncUrlToState(){if(!this.pid||!this.id)return;let t;this.drillDownSubProcess?(t=this.getDesignerBaseRoute()+"/designer/subprocess/"+this.drillDownSubProcess.id,this.selectedProcessTask&&(t+="/task/"+this.selectedProcessTask.id)):t=this.getDesignerBaseRoute(),this.router.navigate([t],{replaceUrl:!0,skipLocationChange:!1});}navigateToProject(){this.router.navigate(["/dashboard/project/"+this.pid]);}navigateToBusinessProcessRoot(){this.drillDownSubProcess&&(this.isFirestoreOnlyDrillDown?(this.drillDownSubProcess=null,this.drillDownSubProcessRef=void 0,this.isFirestoreOnlyDrillDown=!1,this.taskSync.items=[],this.taskSync.selectedElement=null,this.taskSync.selectedItem=null,this.resetFieldsPanelToBase(),this.syncUrlToState()):this.bpmnModeler?.drillUpToRoot());}navigateToSubProcessView(){this.selectedProcessTask=null,this.selectedProcessTaskRef=void 0,this.drillDownSubProcess&&(this.activeFieldsPanel="subProcess"),this.syncUrlToState();}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Bt),le(Mo),le(Ti),le(To));};static ɵcmp=Te({type:n,selectors:[["app-business-process-designer"]],viewQuery:function(e,i){if(e&1&&go(Bfe,5)($fe,5),e&2){let o;qn(o=Jn())&&(i.bpmnModeler=o.first),qn(o=Jn())&&(i.versionModelers=o);}},decls:88,vars:53,consts:[["bpmnModeler",""],["subProcessExtraDetails",""],["taskExtraDetails",""],["versionModeler",""],[1,"designer-layout"],[1,"designer-main"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-panel-toggles"],["mat-icon-button","","matTooltip","Show/hide BPMN modeler",3,"click"],["mat-icon-button","","matTooltip","Show/hide process fields panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide sub-processes panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide sub-process detail panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide contexts & notes panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide gap analysis panel",3,"click"],["mat-icon-button","","matTooltip","Show/hide chat panel",3,"click"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"breadcrumb-bar"],["matTooltip","Go to project",1,"breadcrumb-link",3,"click"],[1,"breadcrumb-icon"],[1,"breadcrumb-text"],[1,"breadcrumb-separator"],["matTooltip","Business Process",1,"breadcrumb-link",3,"click"],["animationDuration","200ms",1,"designer-tab-group",3,"selectedIndexChange","selectedIndex"],["mat-tab-label",""],[1,"tab-action-bar"],[1,"tab-action-bar-buttons"],[1,"tab-content-wrapper"],["direction","horizontal",3,"dragEnd","gutterSize"],[3,"size"],["direction","vertical",3,"dragEnd","gutterSize"],[3,"size","visible"],[1,"firestore-only-empty-state"],[3,"selectionChanged","shapeAdded","shapeRemoved","elementChanged","processStepsExtracted","rootChanged","additionalModules"],[1,"preview-tab-content",3,"display"],["matTooltip","Sub-Process",1,"breadcrumb-link",3,"click"],[1,"breadcrumb-link","breadcrumb-active"],[1,"tab-icon"],[1,"tab-icon","tab-icon-pending"],["mat-raised-button","","color","accent","matTooltip","AI-generate BPMN from process data",3,"click","disabled"],[1,"icon-loading"],["mat-raised-button","","matTooltip","Re-number sub-processes sequentially (1, 2, 3, \u2026)",3,"click","disabled"],["mat-raised-button","","color","primary","matTooltip","Save BPMN diagram",3,"click","disabled"],[1,"tab-action-bar-info"],[1,"preview-info-icon"],["mat-stroked-button","","color","warn",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click","disabled"],[1,"container-right-panel"],[3,"objectRef","object"],[3,"subProcessRef","subProcess"],[3,"processTaskRef","processTask"],[3,"projectId","businessProcessId","businessProcess","drillDownSubProcess","
1004selectedSubProcess","selectedProcessTask"],[1,"empty-state-icon"],[1,"empty-state-title"],[1,"empty-state-subtitle"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],["mat-icon-button","","color","primary","matTooltip","Add a new sub-process",3,"click"],["mat-icon-button","","color","primary","matTooltip","Generate sub-processes",3,"click","disabled"],[1,"container-tile-body-strong","sp-list-body"],[1,"sp-list-table"],[1,"div-insight-disabled"],[1,"sp-col-number"],[1,"sp-col-name"],[1,"sp-col-link"],[1,"sp-list-row",3,"sp-list-row-selected"],[1,"sp-list-row",3,"click","dblclick"],["matTooltip","Drill down into subprocess",1,"sp-link-icon","sp-drilldown-icon",3,"click"],["matTooltip","Linked to diagram shape",1,"sp-link-icon"],["mat-icon-button","","color","primary","matTooltip","Add a new task",3,"click"],["mat-icon-button","","color","primary","matTooltip","Generate tasks",3,"click","disabled"],[1,"sp-list-row",3,"click"],["panelTitle","Sub-Process Detail","itemLabel","sub-process",3,"selectedElement","linkedItem","unlinkedItems","targetBpmnType","linkSpinner","extraDetailTemplate"],["panelTitle","Task Detail","itemLabel","task",3,"selectedElement","linkedItem","unlinkedItems","targetBpmnType","linkSpinner","extraDetailTemplate"],["panelTitle","Sub-Process Detail","itemLabel","sub-process",3,"linkItem","unlinkItem","createInDiagram","itemChanged","deleteItem","selectedElement","linkedItem","unlinkedItems","targetBpmnType","linkSpinner","extraDetailTemplate"],["panelTitle","Task Detail","itemLabel","task",3,"linkItem","unlinkItem","createInDiagram","itemChanged","deleteItem","selectedElement","linkedItem","unlinkedItems","targetBpmnType","linkSpinner","extraDetailTemplate"],[3,"objectRef","notesPath","showContexts","showNotes"],[1,"container-right-panel","container-right-chat"],[1,"container-tile-body-strong","chat-body"],[3,"objectTypeId","object"],[1,"preview-tab-content"],[1,"preview-modeler-container"],[1,"detail-row"],[1,"link-controls",2,"margin-top","8px"],["mat-stroked-button","","color","primary","matTooltip","Expand and drill into this subprocess view",3,"click"],[1,"detail-key"],[1,"detail-value"]],template:function(e,i){e&1&&(s(0,"div",4)(1,"div",5)(2,"div",6)(3,"mat-toolbar",7)(4,"div",8)(5,"div")(6,"mat-icon",9),u(7,"schema"),c()(),s(8,"div")(9,"div",10),u(10,"BPMN Designer"),c(),s(11,"div",11),u(12),c()()(),s(13,"div",12)(14,"button",13),E("click",function(){return i.togglePanelVisibility("modeler");}),s(15,"mat-icon"),u(16,"schema"),c()(),s(17,"button",14),E("click",function(){return i.togglePanelVisibility("processFields");}),s(18,"mat-icon"),u(19,"category"),c()(),s(20,"button",15),E("click",function(){return i.togglePanelVisibility("processList");}),s(21,"mat-icon"),u(22,"list"),c()(),s(23,"button",16),E("click",function(){return i.togglePanelVisibility("processDetail");}),s(24,"mat-icon"),u(25,"info"),c()(),s(26,"button",17),E("click",function(){return i.togglePanelVisibility("contextNotes");}),s(27,"mat-icon"),u(28,"library_books"),c()(),s(29,"button",18),E("click",function(){return i.togglePanelVisibility("gapAnalysis");}),s(30,"mat-icon"),u(31,"tune"),c()(),s(32,"button",19),E("click",function(){return i.togglePanelVisibility("chat");}),s(33,"mat-icon"),u(34,"chat"),c()()(),s(35,"div",20)(36,"button",21),E("click",function(){return i.clickModeBpmn();}),u(37," Modelize BPMN "),s(38,"mat-icon"),u(39,"schema"),c()(),s(40,"button",21),E("click",function(){return i.clickModeProcess();}),u(41," Process Details "),s(42,"mat-icon"),u(43,"category"),c()(),s(44,"button",21),E("click",function(){return i.clickGapAnalysis();}),u(45," Gap Analysis "),s(46,"mat-icon"),u(47,"tune"),c()()()(),s(48,"nav",22)(49,"a",23),E("click",function(){return i.navigateToProject();}),s(50,"mat-icon",24),u(51,"folder"),c(),s(52,"span",25),u(53),c()(),s(54,"mat-icon",26),u(55,"chevron_right"),c(),s(56,"a",27),E("click",function(){return i.navigateToBusinessProcessRoot();}),s(57,"mat-icon",24),u(58,"schema"),c(),s(59,"span",25),u(60),c()(),S(61,Vfe,7,4),S(62,Gfe,7,2),c()(),s(63,"mat-tab-group",28),E("selectedIndexChange",function(a){return i.onTabChange(a);}),s(64,"mat-tab"),Zt(65,qfe,4,0,"ng-template",29),c(),be(66,Hfe,2,0,"mat-tab",null,yx),c(),s(68,"div",30),S(69,ahe,16,15,"div",31)(70,mhe,2,0),c(),s(71,"div",32)(72,"as-split",33),E("dragEnd",function(a){return i.layout.onHorizontalDragEnd(a);}),s(73,"as-split-area",34)(74,"as-split",35),E("dragEnd",function(a){return i.layout.onVerticalLeftDragEnd(a,i.visibleLeftPanelKeys);}),S(75,_he,5,4,"as-split-area",34),S(76,ghe,2,7,"as-split-area",34),s(77,"as-split-area",36),S(78,xhe,7,0,"div",37),s(79,"a
1004pp-bpmn-modeler-wrapper",38,0),E("selectionChanged",function(a){return i.onSelectionChanged(a);})("shapeAdded",function(a){return i.onShapeAdded(a);})("shapeRemoved",function(a){return i.onShapeRemoved(a);})("elementChanged",function(a){return i.onElementChanged(a);})("processStepsExtracted",function(a){return i.onProcessStepsExtracted(a);})("rootChanged",function(a){return i.onRootChanged(a);}),c()()()(),S(81,Bhe,6,6,"as-split-area",34),c()(),be(82,$he,4,2,"div",39,yx),Zt(84,Ghe,7,1,"ng-template",null,1,od)(86,Hhe,2,2,"ng-template",null,2,od),c()()),e&2&&(m(12),G(i.processName),m(2),Ue("toggle-active",i.layout.panelVisibility.modeler)("toggle-inactive",!i.layout.panelVisibility.modeler),m(3),Ue("toggle-active",i.layout.panelVisibility.processFields)("toggle-inactive",!i.layout.panelVisibility.processFields),m(3),Ue("toggle-active",i.layout.panelVisibility.processList)("toggle-inactive",!i.layout.panelVisibility.processList),m(3),Ue("toggle-active",i.layout.panelVisibility.processDetail)("toggle-inactive",!i.layout.panelVisibility.processDetail),m(3),Ue("toggle-active",i.layout.panelVisibility.contextNotes)("toggle-inactive",!i.layout.panelVisibility.contextNotes),m(3),Ue("toggle-active",i.layout.panelVisibility.gapAnalysis)("toggle-inactive",!i.layout.panelVisibility.gapAnalysis),m(3),Ue("toggle-active",i.layout.panelVisibility.chat)("toggle-inactive",!i.layout.panelVisibility.chat),m(21),G(i.projectName),m(3),Ue("breadcrumb-active",!i.drillDownSubProcess),m(4),G(i.processName),m(),M(i.drillDownSubProcess?61:-1),m(),M(i.drillDownSubProcess&&i.selectedProcessTask?62:-1),m(),N("selectedIndex",i.activeTabIndex),m(3),ye(i.bpmnVersions),m(3),M(i.activeTabIndex===0?69:70),m(2),Ci("display",i.activeTabIndex===0?"flex":"none"),m(),N("gutterSize",20),m(),N("size",i.layout.splitSizes.left),m(),N("gutterSize",20),m(),M(i.layout.panelVisibility.processFields?75:-1),m(),M(i.layout.panelVisibility.gapAnalysis?76:-1),m(),N("size",i.visibleLeftPanelKeys.length>1?i.layout.splitSizesLeft.modeler:100)("visible",i.layout.panelVisibility.modeler),m(),M(i.isFirestoreOnlyDrillDown?78:-1),m(),Ci("display",i.isFirestoreOnlyDrillDown?"none":"block")("height",i.isFirestoreOnlyDrillDown?"0":"100%"),N("additionalModules",i.bpmnAdditionalModules),m(2),M(i.layout.panelVisibility.processList||i.layout.panelVisibility.processDetail||i.layout.panelVisibility.contextNotes||i.layout.panelVisibility.chat?81:-1),m(),ye(i.bpmnVersions));},dependencies:[ut,gn,Tl,vd,Ol,El,ln,yn,$e,Qe,Qt,We,Xe,$t,_n,bi,Gt,jt,vr,cr,Cr,jd,zs,MP,OP,EP,TP,IP,Kf],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1004.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.designer-layout[_ngcontent-%COMP%]{display:flex;flex-direction:row;height:100%;overflow:hidden}.designer-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;overflow:hidden}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin-left:10px;margin-right:10px;margin-bottom:20px;padding-bottom:0;background-color:transparent;min-height:0}.div-toolbar[_ngcontent-%COMP%]{height:100px;margin-bottom:0;background-color:transparent}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 20px}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{padding-right:30px;font-size:50px;width:50px;height:100%}.title[_ngcontent-%COMP%]{padding-left:10px}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;width:100%;gap:8px}.breadcrumb-bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:6px 12px;margin-bottom:8px;background-color:#00000008;border-radius:8px;overflow:hidden;flex-shrink:0;min-height:32px}.breadcrumb-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;cursor:pointer;color:#0000008c;font-size:.85em;font-weight:500;text-decoration:none;padding:4px 8px;border-radius:6px;transition:background-color .15s ease,color .15s ease;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:280px}.breadcrumb-link[_ngcontent-%COMP%]:hover{background-color:#0000000f;color:#000c}.breadcrumb-link.breadcrumb-active[_ngcontent-%COMP%]{color:#465d91;font-weight:600;cursor:default}.breadcrumb-link.breadcrumb-active[_ngcontent-%COMP%]:hover{background-color:transparent}.breadcrumb-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:inherit!important;opacity:.7;filter:none!important;text-shadow:none!important}
1004.breadcrumb-separator[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:#00000040!important;flex-shrink:0;filter:none!important;text-shadow:none!important}.breadcrumb-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.div-panel-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:4px;padding:0 16px}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important;filter:none;text-shadow:none}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-inactive[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important;filter:none;text-shadow:none}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:20px;max-height:20px}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.container-process-fields[_ngcontent-%COMP%]{border-radius:10px}.container-process-fields[_ngcontent-%COMP%] .process-fields-body[_ngcontent-%COMP%]{overflow-y:auto;padding:10px 16px;flex:1}.container-process-fields[_ngcontent-%COMP%] .div-form-element[_ngcontent-%COMP%]{margin-bottom:4px}.detail-section[_ngcontent-%COMP%]{padding:10px 0;border-bottom:1px solid rgba(0,0,0,.08)}.detail-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.detail-label[_ngcontent-%COMP%]{font-weight:700;font-size:.85em;text-transform:uppercase;color:#465d91;margin-bottom:8px;letter-spacing:.5px}.detail-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding:4px 0;font-size:.9em}.detail-key[_ngcontent-%COMP%]{font-weight:500;color:#0009;min-width:80px;flex-shrink:0}.detail-value[_ngcontent-%COMP%]{color:#000000de;word-break:break-word}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em}.sp-list-body[_ngcontent-%COMP%]{padding:0!important}.sp-list-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:.9em}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;background-color:#fafafa}.sp-list-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:8px 10px;font-weight:600;color:#0009;font-size:.85em;text-transform:uppercase;letter-spacing:.3px;border-bottom:2px solid rgba(0,0,0,.08)}.sp-list-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.05)}.sp-list-row[_ngcontent-%COMP%]{cursor:pointer;transition:background-color .15s ease,border-left .15s ease;border-left:3px solid transparent}.sp-list-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:8px 10px;vertical-align:middle}.sp-list-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%]{background-color:#465d9114;border-left:3px solid #465d91}.sp-list-row.sp-list-row-selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-weight:500}.sp-col-number[_ngcontent-%COMP%]{width:40px;text-align:center;color:#0009;font-weight:500}.sp-col-name[_ngcontent-%COMP%]{word-break:break-word}.sp-col-link[_ngcontent-%COMP%]{width:50px;text-align:center;padding-right:6px!important;white-space:nowrap}.sp-link-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#465d91;opacity:.7}.sp-drilldown-icon[_ngcontent-%COMP%]{cursor:pointer;border-radius:4px;transition:background-color .15s ease,opacity .15s ease;opacity:.5}.sp-drilldown-icon[_ngcontent-%COMP%]:hover{opacity:1;background-color:#465d911f}.link-controls[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:10px}.link-controls[_ngcontent-%COMP%] .link-select[_ngcontent-%COMP%]{flex:1;font-size:.9em}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-shrink:0}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit!important;filter:none!important;text-shadow:none!important}.firestore-only-empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;width:100%;background-color:#fafafa;border-radius:10px;color:#0006;text-align:center;padding:40px}.firestore-only-empty-state[_ngcontent-%COMP%] .empty-state-icon[_ngcontent-%COMP%]{font-size:64px;width:64px;
1004height:64px;color:#00000026;margin-bottom:16px;filter:none!important;text-shadow:none!important}.firestore-only-empty-state[_ngcontent-%COMP%] .empty-state-title[_ngcontent-%COMP%]{font-size:1.2em;font-weight:600;color:#00000073;margin-bottom:8px}.firestore-only-empty-state[_ngcontent-%COMP%] .empty-state-subtitle[_ngcontent-%COMP%]{font-size:.9em;color:#00000059;max-width:360px;line-height:1.5}.drilldown-nav[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-around;align-items:center;width:50px;flex-shrink:0;height:100%;padding:24px 0;background:transparent}.drilldown-nav-icon[_ngcontent-%COMP%]{font-size:26px!important;width:26px!important;height:26px!important;color:#0000002e;transition:color .25s ease,filter .25s ease;cursor:default;filter:none!important;text-shadow:none!important}.drilldown-nav-icon.drilldown-nav-icon-active[_ngcontent-%COMP%]{color:#465d91;filter:drop-shadow(0 0 5px rgba(70,93,145,.55))!important;text-shadow:none!important}.designer-tab-group[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:10px 10px 0 0;margin-right:10px;margin-left:10px}.designer-tab-group[_ngcontent-%COMP%] .mat-mdc-tab-body-wrapper{display:none}.designer-tab-group[_ngcontent-%COMP%] .mat-mdc-tab-header{background-color:#fff;border-radius:10px 10px 0 0}.designer-tab-group[_ngcontent-%COMP%] .mat-mdc-tab-labels{background-color:#fff;border-radius:10px 10px 0 0}.tab-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;margin-right:6px;color:#0000008c!important;filter:none!important;text-shadow:none!important;opacity:1!important}.tab-icon.tab-icon-pending[_ngcontent-%COMP%]{color:#465d91!important}.tab-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;background-color:#465d91;color:#fff;font-size:.7em;font-weight:700;margin-left:6px}.tab-content-wrapper[_ngcontent-%COMP%]{flex:1;min-height:0;flex-direction:column;overflow:hidden;margin-left:10px;margin-right:10px;margin-bottom:10px}.tab-action-bar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:10px 16px;background-color:#fff;border-bottom-left-radius:10px;border-bottom-right-radius:10px;margin-bottom:20px;margin-left:10px;margin-right:10px;flex-shrink:0;box-shadow:0 1px 4px #00000014;gap:16px}.tab-action-bar-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:#0009;font-size:.9em}.tab-action-bar-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:10px;flex-shrink:0;margin-left:auto}.preview-info-icon[_ngcontent-%COMP%]{color:#465d91!important;filter:none!important;text-shadow:none!important;opacity:1!important}.preview-tab-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;overflow:hidden;min-height:0;margin-left:10px;margin-right:10px;margin-bottom:10px}.preview-modeler-container[_ngcontent-%COMP%]{flex:1;min-height:0;border-radius:10px;overflow:hidden;background-color:#fff}.preview-modeler-container[_ngcontent-%COMP%] app-bpmn-modeler-wrapper[_ngcontent-%COMP%]{display:block;height:100%} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}.icon-loading[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_icon-loading 2s infinite linear;animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@-webkit-keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_icon-loading{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}"]});};var kP=class n{constructor(t,e){this.authService=t;this.router=e;}authService;router;canActivate(t,e){return this.authService.isLoggedIn();}static ɵfac=function(e){return new(e||n)(rr(Oo),rr(Et));};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var Ju=class n{constructor(t,e){this.authService=t;this.router=e;}authService;router;environment=qm;canActivate(t,e){return this.environment.production==!0&&this.environment.localhost==!1&&window.location.hostname!=this.environment.domain?(window.location.href="https://"+this.environment.domain,!1):!0;}static ɵfac=function(e){return new(e||n)(rr(Oo),rr(Et));};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var x_=class n extends Wa{firestore=re(ai);collectionName="evaluationscales";constructor(){super();}createScale(t){return $(this,null,function*(){let e=Ve(X({},t),{creationDate:xo(),updatedAt:xo()}),i=we(this.firestore,this.collectionName);return(yield Ht(i,e)).id;});}getScale(t){return $(this,null,function*(){let e=ge(this.firestore,this.collectionName,t),i=yield yt(e);return i.exists()?X({id:i.id},i.data()):null;});}getScales(){return new Lo(t=>{let e=we(this.firestore,this.collectionName),i=mt(e,Jt("name","asc"));return Bn(i,a=>{let r=a.docs.map(l=>X({id:l.id},l.data()));t.next(r);},a=>{console.error("Error getting evaluation scales:",a),t.error(a);});});}getScalesOnce(){return $(this,null,function*(){let t=we(this.firestore,this.collectionName),e=mt(t,Jt("name","asc"));return(yield at(e)).docs.map(o=>X({id:o.id},o.data()));});}updateScale(t,e){return $(this,null,function*(){let i=ge(this.firestore,this.collectionName,t);yield hn(i,Ve(X({},e),{updatedAt:xo()}));});}deleteScale(t){return $(this,null,function*(){let e=ge(this.firestore,this.collectionName,t);yield no(e);});}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var RP=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="evaluationscales";documentRoute="dashboard/evaluation-scale";displayedColumns=["creationDate","name","target","description"];displayedColumnsHeaders=["Date","Name","Target","Description"];
1004ngOnInit(){}clickNewEvaluationScale(){this.router.navigate(["/dashboard/evaluation-scale"]);}static ɵfac=function(e){return new(e||n)(le(x_),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-evaluation-scale-list"]],decls:18,vars:6,consts:()=>{let t;t="Evaluation Scales";let e;return e="New Scale",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],[3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"straighten"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewEvaluationScale();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10),ee(17,"app-object-list",11),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,ho,ln,yn,We,Xe],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1004.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var Whe=(n,t)=>t.value,Xhe=(n,t)=>t.key;function Yhe(n,t){n&1&&u(0," New Evaluation Scale ");}function Khe(n,t){if(n&1&&u(0),n&2){let e=x();_e(" ",e.scale.name," ");}}function Zhe(n,t){n&1&&u(0," Scale ");}function Qhe(n,t){n&1&&(s(0,"div",19),ee(1,"mat-spinner",22),s(2,"span"),u(3,"Loading scale..."),c()());}function e_e(n,t){if(n&1&&(s(0,"div",20)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function t_e(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("name"));}}function n_e(n,t){if(n&1&&(s(0,"mat-option",30),u(1),c()),n&2){let e=t.$implicit;N("value",e.value),m(),G(e.label);}}function i_e(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x(2);m(),G(e.getFieldError("target"));}}function o_e(n,t){if(n&1&&(s(0,"mat-error"),u(1),c()),n&2){let e=x().$implicit,i=x(2);m(),G(i.getFieldError(e.key));}}function a_e(n,t){if(n&1&&(s(0,"mat-form-field",37)(1,"mat-label"),u(2),c(),ee(3,"input",42),S(4,o_e,2,1,"mat-error"),c()),n&2){let e=t.$implicit,i=x(2);m(2),G(e.label),m(),N("formControlName",e.key),m(),M(i.isFieldInvalid(e.ke
1004y)?4:-1);}}function r_e(n,t){n&1&&ee(0,"mat-spinner",40);}function s_e(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"save"),c(),s(3,"span"),q(4,6),c(),hi());}function l_e(n,t){if(n&1){let e=oe();s(0,"button",43),E("click",function(){k(e);let o=x(2);return R(o.deleteScale());}),s(1,"mat-icon"),u(2,"delete"),c(),s(3,"span"),q(4,7),c()();}}function c_e(n,t){if(n&1){let e=oe();s(0,"div",21)(1,"div",23)(2,"form",24),E("ngSubmit",function(){k(e);let o=x();return R(o.saveScale());}),s(3,"div",25)(4,"mat-form-field",26)(5,"mat-label"),q(6,0),c(),ee(7,"input",27),S(8,t_e,2,1,"mat-error"),c()(),s(9,"div",25)(10,"mat-form-field",26)(11,"mat-label"),q(12,1),c(),ee(13,"textarea",28),c()(),s(14,"div",25)(15,"mat-form-field",26)(16,"mat-label"),q(17,2),c(),s(18,"mat-select",29),be(19,n_e,2,2,"mat-option",30,Whe),c(),s(21,"mat-hint"),u(22,"What this scale is used to evaluate"),c(),S(23,i_e,2,1,"mat-error"),c()(),s(24,"div",31)(25,"mat-checkbox",32)(26,"span"),q(27,3),c()(),s(28,"span",33),q(29,4),c()(),ee(30,"mat-divider",34),s(31,"h3"),q(32,5),c(),s(33,"p",35),u(34,"Define the number of effort days corresponding to each complexity size."),c(),s(35,"div",36),be(36,a_e,5,3,"mat-form-field",37,Xhe),c(),s(38,"div",38)(39,"button",39),S(40,r_e,1,0,"mat-spinner",40)(41,s_e,5,0,"ng-container"),c(),S(42,l_e,5,0,"button",41),c()()()();}if(n&2){let e=x();m(2),N("formGroup",e.scaleForm),m(6),M(e.isFieldInvalid("name")?8:-1),m(11),ye(e.targetOptions),m(4),M(e.isFieldInvalid("target")?23:-1),m(13),ye(e.tshirtSizes),m(3),N("disabled",e.isSaving),m(),M(e.isSaving?40:41),m(2),M(e.isCreationMode?-1:42);}}var Px=class n{auth=re(Il);route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);scaleService=re(x_);scale=null;isLoading=!0;error=null;scaleId=null;isCreationMode=!1;isSaving=!1;targetOptions=[{value:"solution-requirement",label:"Solution Requirement"},{value:"project",label:"Project"}];tshirtSizes=[{key:"N",label:"N \u2014 Not estimated"},{key:"E",label:"E \u2014 Existing"},{key:"XS",label:"XS \u2014 Extra Small"},{key:"S",label:"S \u2014 Small"},{key:"M",label:"M \u2014 Medium"},{key:"L",label:"L \u2014 Large"},{key:"XL",label:"XL \u2014 Extra Large"}];scaleForm;constructor(){this.scaleForm=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:[""],target:["solution-requirement",[Ye.required]],isDefault:[!1],N:[0,[Ye.required,Ye.min(0)]],E:[0,[Ye.required,Ye.min(0)]],XS:[0,[Ye.required,Ye.min(0)]],S:[0,[Ye.required,Ye.min(0)]],M:[0,[Ye.required,Ye.min(0)]],L:[0,[Ye.required,Ye.min(0)]],XL:[0,[Ye.required,Ye.min(0)]]});}ngOnInit(){this.route.params.subscribe(t=>{this.scaleId=t.id,this.scaleId?(this.isCreationMode=!1,this.loadScale()):(this.isCreationMode=!0,this.isLoading=!1);});}loadScale(){return $(this,null,function*(){try{if(this.isLoading=!0,this.error=null,!this.scaleId){this.error="No scale ID provided",this.isLoading=!1;return;}let t=yield this.scaleService.getScale(this.scaleId);if(!t){this.error="Evaluation scale not found",this.isLoading=!1;return;}this.scale=t,this.patchForm(t),this.isLoading=!1;}catch(t){console.error("Error loading evaluation scale:",t),this.error=`Failed to load evaluation scale: ${t}`,this.isLoading=!1;}});}patchForm(t){this.scaleForm.patchValue({name:t.name,description:t.description||"",target:t.target||"solution-requirement",isDefault:t.isDefault??!1,N:t.N??0,E:t.E??0,XS:t.XS??0,S:t.S??0,M:t.M??0,L:t.L??0,XL:t.XL??0});}saveScale(){return $(this,null,function*(){if(this.scaleForm.invalid){this.scaleForm.markAllAsTouched();return;}try{this.isSaving=!0;let t=this.auth.currentUser;if(!t){this.snackBar.open("You must be logged in to save a scale","Close",{duration:3e3});return;}let e=this.scaleForm.value,i={name:e.name,description:e.description,target:e.target,isDefault:!!e.isDefault,N:+e.N,E:+e.E,XS:+e.XS,S:+e.S,M:+e.M,L:+e.L,XL:+e.XL,userId:t.uid,active:!0};if(this.isCreationMode){let o=yield this.scaleService.createScale(i);this.snackBar.open("Evaluation scale created successfully!","Close",{duration:3e3}),this.router.navigate(["/dashboard/evaluation-scale",o]);}else yield this.scaleService.updateScale(this.scaleId,i),this.snackBar.open("Evaluation scale updated successfully!","Close",{duration:3e3}),this.loadScale();}catch(t){console.error("Error saving evaluation scale:",t),this.snackBar.open("Failed to save evaluation scale. Please try again.","Close",{duration:3e3});}finally{this.isSaving=!1;}});}deleteScale(){return $(this,null,function*(){if(!(!this.scale||!this.scaleId)&&confirm(`Are you sure you want to delete "${this.scale.name}"?`))try{yield this.scaleService.deleteScale(this.scaleId),this.snackBar.open("Evaluation scale deleted successfully!","Close",{duration:3e3}),this.router.navigate(["/dashboard/evaluation-scales"]);}catch(t){console.error("Error deleting evaluation scale:",t),this.snackBar.open("Failed to delete evaluation scale. Please try again.","Close",{duration:3e3});}});}goBack(){this.router.navigate(["/dashboard/evaluation-scales"]);}getTargetLabel(t){return this.targetOptions.find(e=>e.value===t)?.label||t||"\u2014";}getFieldError(t){let e=this.scaleForm.get(t);return e?.hasError("required")?`${t} is required`:e?.hasError("minlength")?`Minimum ${e.errors?.minlength?.requiredLength} characters`:e?.hasError("min")?`Value must be at least ${e.errors?.min?.min}`:"";}isFieldInvalid(t){let e=this.scaleForm.get(t);
1004return!!(e?.invalid&&(e?.dirty||e?.touched));}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-evaluation-scale"]],decls:23,vars:6,consts:()=>{let t;t="Scale Name";let e;e="Description";let i;i="Target";let o;o="Default scale for this target";let a;a="When checked, this scale will be used automatically for charts and cost estimations.";let r;r="T-Shirt Size Effort Values (days)";let l;l="Save";let p;return p="Delete",[t,e,i,o,a,r,l,p,[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"spacer"],[1,"div-button-right"],["mat-icon-button","","matTooltip","Back to evaluation scales",3,"click"],[1,"div-content"],[1,"div-insight-disabled",2,"padding","40px","text-align","center"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","color","#f44336"],[1,"container-right-panel"],["diameter","40"],[1,"container-tile-body-strong"],[3,"ngSubmit","formGroup"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","name"],["matInput","","formControlName","description","rows","2"],["formControlName","target"],[3,"value"],[1,"checkbox-row"],["formControlName","isDefault"],[1,"checkbox-hint"],[1,"section-divider"],[1,"section-hint"],[1,"tshirt-grid"],["appearance","fill",1,"tshirt-field"],[1,"form-actions"],["mat-flat-button","","color","primary","type","submit",3,"disabled"],["diameter","20"],["mat-flat-button","","color","warn","type","button"],["matInput","","type","number","min","0",3,"formControlName"],["mat-flat-button","","color","warn","type","button",3,"click"]];},template:function(e,i){e&1&&(s(0,"div",8)(1,"div",9)(2,"mat-toolbar",10)(3,"div",11)(4,"div")(5,"mat-icon",12),u(6,"tune"),c()(),s(7,"div")(8,"div",13),u(9,"Evaluation Scale"),c(),s(10,"div",14),S(11,Yhe,1,0),S(12,Khe,1,1),S(13,Zhe,1,0),c()()(),ee(14,"span",15),s(15,"div",16)(16,"button",17),E("click",function(){return i.goBack();}),s(17,"mat-icon"),u(18,"arrow_back"),c()()()()(),s(19,"div",18),S(20,Qhe,4,0,"div",19),S(21,e_e,5,1,"div",20),S(22,c_e,43,6,"div",21),c()()),e&2&&(m(11),M(i.isCreationMode?11:-1),m(),M(!i.isCreationMode&&i.scale?12:-1),m(),M(!i.isCreationMode&&!i.scale&&!i.isLoading?13:-1),m(7),M(i.isLoading?20:-1),m(),M(i.error&&!i.isLoading?21:-1),m(),M(!i.isLoading&&!i.error?22:-1));},dependencies:[ut,gn,Nn,Ft,Ea,Tt,Mn,Qr,tn,An,Wn,ha,$e,Qe,Qt,We,Xe,Fi,zi,Ua,Ml,Gt,Vt,Wt,Ki,ti,jt,Xt,bi,So,Ei,ra,xr,$t,_n,ln,yn],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1004.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0;overflow:auto}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.spacer[_ngcontent-%COMP%]{flex:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:16px 20px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:56px;max-height:56px;flex-shrink:0}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding-left:10px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px;display:flex;flex-direction:column;align-items:center;gap:12px}.div-form-element[_ngcontent-%COMP%]{margin:0;width:100%;overflow-x:hidden;padding-bottom:2px}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.checkbox-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-bottom:16px}.checkbox-hint[_ngcontent-%COMP%]{font-size:.8rem;color:#888;margin-left:28px}.section-divider[_ngcontent-%COMP%]{margin:20px 0 16px}h3[_ngcontent-%COMP%]{font-size:1rem;font-weight:500;margin:0 0 4px;color:#444}.section-hint[_ngcontent-%COMP%]{font-size:.85rem;
1004color:#777;margin:0 0 16px}.tshirt-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px 16px;margin-bottom:16px}.tshirt-field[_ngcontent-%COMP%]{width:100%}.form-actions[_ngcontent-%COMP%]{display:flex;gap:12px;margin-top:16px;align-items:center}.div-button-right[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var p_e=["messageList"],d_e=(n,t)=>t.timestamp,m_e=(n,t)=>t.key;function u_e(n,t){n&1&&(s(0,"div",22)(1,"mat-icon"),u(2,"smart_toy"),c()());}function f_e(n,t){n&1&&(s(0,"div",25)(1,"mat-icon"),u(2,"person"),c()());}function h_e(n,t){if(n&1&&(s(0,"div",21),S(1,u_e,3,0,"div",22),s(2,"div",23)(3,"p",24),u(4),c()(),S(5,f_e,3,0,"div",25),c()),n&2){let e=t.$implicit,i=t.$index,o=x();Ue("message-row--user",e.role==="user"),m(),M(e.role==="agent"?1:-1),m(),Ue("bubble--agent",e.role==="agent")("bubble--user",e.role==="user")("bubble--streaming",i===o.streamingMessageIndex),m(2),G(e.content),m(),M(e.role==="user"?5:-1);}}function __e(n,t){n&1&&(s(0,"div",10)(1,"div",22)(2,"mat-icon"),u(3,"smart_toy"),c()(),s(4,"div",26),ee(5,"span")(6,"span")(7,"span"),c()());}function g_e(n,t){if(n&1&&(s(0,"span",16),u(1),c()),n&2){let e=x();m(),Hn("",e.populatedFieldCount," / ",e.extractFieldKeys.length);}}function x_e(n,t){n&1&&(s(0,"p",27),q(1,2),c());}function C_e(n,t){if(n&1&&(s(0,"div",29)(1,"span",30),u(2),c(),s(3,"p",31),u(4),Zn(5,"slice"),c()()),n&2){let e=t.$implicit;m(2),G(e.label),m(2),Hn("",cf(5,3,e.value,0,180),"",e.value.length>180?"\u2026":"");}}function v_e(n,t){if(n&1&&(s(0,"div",28),be(1,C_e,6,7,"div",29,m_e),c()),n&2){let e=x(2);m(),ye(e.populatedFields);}}function b_e(n,t){if(n&1&&(s(0,"div",18),S(1,x_e,2,0,"p",27)(2,v_e,3,0,"div",28),c()),n&2){let e=x();m(),M(e.populatedFields.length===0?1:2);}}function y_e(n,t){if(n&1){let e=oe();s(0,"div",19)(1,"mat-icon",32),u(2,"check_circle"),c(),s(3,"div",33)(4,"strong"),q(5,3),c(),s(6,"span"),q(7,4),c()(),s(8,"button",34),E("click",function(){k(e);let o=x();return R(o.onConfirmComplete());}),s(9,"span"),q(10,5),c(),s(11,"mat-icon"),u(12,"arrow_forward"),c()()();}if(n&2){let e=x();m(7),us(e.populatedFieldCount),fs(7);}}function P_e(n,t){if(n&1){let e=oe();s(0,"button",41),E("click",function(){k(e);let o=x(2);return R(o.onStartOver());}),s(1,"mat-icon"),u(2,"restart_alt"),c()();}}function w_e(n,t){n&1&&ee(0,"mat-spinner",40);}function S_e(n,t){n&1&&(s(0,"mat-icon"),u(1,"send"),c());}function M_e(n,t){if(n&1){let e=oe();s(0,"div",20)(1,"textarea",35),Mt("ngModelChange",function(o){k(e);let a=x();return St(a.userInput,o)||(a.userInput=o),R(o);}),E("keydown",function(o){k(e);let a=x();return R(a.onKeyDown(o));}),u(2," "),c(),s(3,"div",36),S(4,P_e,3,0,"button",37),s(5,"button",38),E("click",function(){k(e);let o=x();return R(o.onSkip());}),s(6,"span"),q(7,6),c()(),s(8,"button",39),E("click",function(){k(e);let o=x();return R(o.onSend());}),S(9,w_e,1,0,"mat-spinner",40)(10,S_e,2,0,"mat-icon"),c()()();}if(n&2){let e=x();m(),wt("ngModel",e.userInput),N("disabled",e.loading),m(3),M(e.messages.length>0&&!e.loading?4:-1),m(4),N("disabled",!e.canSend),m(),M(e.loading?9:10);}}var C_={description:{label:"Description",title:"Description",subtitle:"Let AI draft a high-level overview of your project, then make it yours.",icon:"auto_awesome",altitudeLabel:"Climbing!",controlName:"description",fieldId:"project_description",instructionField:!0,extractField:!0},context:{label:"Context",title:"Context",subtitle:"Set the scene \u2014 what broader situation surrounds this project?",icon:"travel_explore",altitudeLabel:"Rising through the clouds\u2026",controlName:"context",fieldId:"project_context",instructionField:!0,extractField:!0},current_situation:{label:"Current Situation",title:"Current Situation",subtitle:"Where are things at today? What's the starting point before this project begins?",icon:"location_on",altitudeLabel:"Above the water!",controlName:"currentSituation",fieldId:"project_current_situation",instructionField:!0,extractField:!0},future_situation:{label:"Future Situation",title:"Future Situation",subtitle:"Where will things stand when this project succeeds? Paint the picture.",icon:"visibility",altitudeLabel:"Cruising altitude!",controlName:"futureSituation",fieldId:"project_future_situation",instructionField:!0,extractField:!0},goals:{label:"Goals",title:"Goals",subtitle:"What is this project trying to achieve?",icon:"track_changes",altitudeLabel:"Clear skies!",controlName:"goals",fieldId:"project_business_goals",instructionField:!0,extractField:!0},scope:{label:"Scope",title:"Scope",subtitle:"What's in and what's out? Define the boundaries of this project clearly.",icon:"map",altitudeLabel:"In the stratosphere! Almost.",controlName:"scope",fieldId:"project_scope",instructionField:!0,extractField:!0}
1004,benefits:{label:"Benefits",title:"Benefits",subtitle:"What value will this project deliver? Who gains and how?",icon:"emoji_events",altitudeLabel:"Summit reached!",controlName:"benefits",fieldId:"project_benefits",instructionField:!0,extractField:!0},strategic_context:{label:"Strategic Context",instructionField:!1,localInstructions:"Describe the context driving this transformation initiative: growth ambitions, competitive pressures, market forces, ongoing initiatives already underway, and any triggering events (merger, regulation change, technology shift, etc.).",extractField:!1},org_structure:{label:"Organizational Structure",instructionField:!1,localInstructions:"Describe the internal organization: main business functions, headcount per function, key roles, and the challenges and opportunities specific to each unit. Reference any org chart or context document that was shared.",extractField:!1},employee_experience:{label:"Employee Experience",instructionField:!1,localInstructions:"Describe the employee reality: level of expertise, turnover rate, engagement and mobilization levels, day-to-day pain points, and opportunities to improve the employee experience.",extractField:!1},products_services:{label:"Products & Services",instructionField:!1,localInstructions:"List the main products and services offered: client expectations, current challenges, differentiation opportunities, and the growth strategy (service levels, quality, positioning).",extractField:!1},client_segments:{label:"Client Segments",instructionField:!1,localInstructions:"Describe the client segments served and associated volumes: number of active clients, prospects, sales volume, and revenue per segment if known.",extractField:!1},delivery_process:{label:"Delivery Process",instructionField:!1,localInstructions:"Walk through the story of a typical service or product delivery: from client request to delivery, including quality assurance, complexity management, expertise handling and escalation paths. Highlight friction points, overhead, and cost drivers.",extractField:!1},operational_volumes:{label:"Operational Volumes",instructionField:!1,extractField:!1,localInstructions:"Provide the key annual operational volumes: number of deliveries, transactions, tickets, orders, or any other volume metric relevant to the operation."},partners:{label:"Delivery Partners",instructionField:!1,localInstructions:"Describe the partners involved in service delivery (if applicable): their role, dependency risks, collaboration opportunities, and threats (supplier risk, quality issues, delays).",extractField:!1},process_documentation:{label:"Process Documentation",instructionField:!1,localInstructions:"Does documentation exist for current processes? In what form (procedures, diagrams, manuals)? How complete and up-to-date is it?",extractField:!1},it_systems:{label:"IT Systems",instructionField:!1,localInstructions:"List the main IT systems in place (ERP, CRM, line-of-business tools, etc.): known issues for each (performance, integration gaps, technical debt, obsolescence) and their operational criticality.",extractField:!1},it_projects:{label:"IT Projects & Initiatives",instructionField:!1,localInstructions:"Describe current or planned IT projects: objectives, current status, priorities, blockers, and how each connects to the business strategy.",extractField:!1},it_budget:{label:"Annual IT Budget",instructionField:!1,localInstructions:"What is the approximate annual IT budget (operations + projects)? How is it split between keeping the lights on and innovation / new initiatives?",extractField:!1}},gO=Object.keys(C_),_O=gO.filter(n=>C_[n].extractField!==!1),p7=Object.fromEntries(Object.entries(C_).map(([n,t])=>[n,t.label])),O_e=Object.entries(C_).map(([n,t])=>({key:n,instructionField:t.instructionField??!1,localInstructions:t.localInstructions,extractField:t.extractField??!0})),NP=class n{constructor(t,e,i){this.firebase=t;this.logging=e;this.cdr=i;}firebase;logging;cdr;projectId;projectDocPath;currentProject={};locale="en";completed=new At();skipped=new At();messageListRef;messages=[];extractedFields={};
1004userInput="";loading=!1;readyToExtract=!1;previewExpanded=!1;errorMessage="";streamingMessageIndex=-1;_shouldScrollToBottom=!1;fieldLabels=p7;allFieldKeys=gO;extractFieldKeys=_O;ngOnInit(){this._loadInterviewState();}_loadInterviewState(){return $(this,null,function*(){if(!this.projectDocPath){this._callAgent("");return;}try{let t=yield yt(ge(this.firebase.firestore,`${this.projectDocPath}/agentInterview/fields`));if(t.exists()){let e=t.data();for(let o of gO)e[o]&&(this.extractedFields[o]=e[o]);let i=e.agentConversation;if(Array.isArray(i)&&i.length>0){this.messages=i.map(o=>({role:o.role,content:o.content,timestamp:new Date(o.timestamp)})),this._shouldScrollToBottom=!0,this.cdr.detectChanges();return;}}}catch(t){this.logging.error(t);}this._callAgent("");});}ngAfterViewChecked(){this._shouldScrollToBottom&&(this._scrollToBottom(),this._shouldScrollToBottom=!1);}get populatedFieldCount(){return _O.filter(t=>M0(this.extractedFields[t]??"").length>0).length;}get populatedFields(){return _O.map(t=>({key:t,label:p7[t],value:M0(this.extractedFields[t]??"")})).filter(t=>t.value.length>0);}get canSend(){return!this.loading&&!this.readyToExtract&&this.userInput.trim().length>0;}onSend(){let t=this.userInput.trim();!t||this.loading||this.readyToExtract||(this.userInput="",this._addMessage("user",t),this._callAgent(t));}onKeyDown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.onSend());}onSkip(){this.skipped.emit();}onConfirmComplete(){this.completed.emit({extractedFields:this.extractedFields});}togglePreview(){this.previewExpanded=!this.previewExpanded;}_addMessage(t,e){this.messages.push({role:t,content:e,timestamp:new Date()}),this._shouldScrollToBottom=!0,this.cdr.detectChanges();}_callAgent(t){return $(this,null,function*(){this.loading=!0,this.errorMessage="";let e=this.messages.filter(l=>!(l.role==="user"&&l.content===t&&l===this.messages[this.messages.length-1])).map(l=>({role:l.role,content:l.content}));try{let l=ei(this.firebase.functions,"functionProjectInterviewStream"),{stream:p}=yield l.stream({projectId:this.projectId,projectDocPath:this.projectDocPath,userMessage:t,conversationHistory:e,currentProject:this.currentProject,locale:this.locale,targetFields:O_e}),d={},f=!1;this.messages.push({role:"agent",content:"",timestamp:new Date()});let h=this.messages.length-1;this.streamingMessageIndex=h,this._shouldScrollToBottom=!0,this.cdr.detectChanges();try{for(var i=Co(p),o,a,r;o=!(a=yield i.next()).done;o=!1){let g=a.value;let b=g;if(b){if(b.message&&(this.messages[h].content=b.message,this._shouldScrollToBottom=!0,this.cdr.detectChanges()),b.ready_to_extract&&(f=b.ready_to_extract),b.extracted_fields){for(let[w,T]of Object.entries(b.extracted_fields))T&&typeof T=="string"&&T.trim()&&(d[w]=T);this.extractedFields=X(X({},this.extractedFields),d),this.cdr.detectChanges();}if(b._streamDone)break;}}}catch(a){r=[a];}finally{try{o&&(a=i.return)&&(yield a.call(i));}finally{if(r)throw r[0];}}this.messages[h].content||this.messages.splice(h,1),this._saveConversation(),f&&(this.readyToExtract=!0,this.previewExpanded=!0);}catch(l){this.logging.error(l),this.errorMessage="Something went wrong. Please try again.",this._addMessage("agent","I apologize \u2014 I encountered an error. Please try sending your message again.");}finally{this.streamingMessageIndex=-1,this.loading=!1,this._shouldScrollToBottom=!0,this.cdr.detectChanges();}});}_scrollToBottom(){try{let t=this.messageListRef?.nativeElement;t&&(t.scrollTop=t.scrollHeight);}catch(t){}}_saveConversation(){if(!this.projectDocPath)return;let t=this.messages.map(i=>({role:i.role,content:i.content,timestamp:i.timestamp.toISOString()})),e={};for(let[i,o]of Object.entries(this.extractedFields))o?.trim()&&(e[i]=o);Dt(ge(this.firebase.firestore,`${this.projectDocPath}/agentInterview/fields`),X({agentConversation:t},e),{merge:!0}).catch(()=>{});}onStartOver(){this.loading||(this.messages=[],this.extractedFields={},this.readyToExtract=!1,this.previewExpanded=!1,this.projectDocPath&&Dt(ge(this.firebase.firestore,`${this.projectDocPath}/agentInterview/fields`),{}).catch(()=>{}),this._callAgent(""));}static ɵfac=function(e){return new(e||n)(le(On),le(Mo),le(Pa));};static ɵcmp=Te({type:n,selectors:[["app-project-agent"]],viewQuery:function(e,i){if(e&1&&go(p_e,5),e&2){let o;qn(o=Jn())&&(i.messageListRef=o.first);}},inputs:{projectId:"projectId",projectDocPath:"projectDocPath",currentProject:"currentProject",locale:"locale"},outputs:{completed:"completed",skipped:"skipped"},decls:19,vars:8,consts:()=>{let t;t=" Extracted fields ";let e;e="Fields will appear here as the interview progresses.";let i;i="Interview complete!";let o;o=""+"\uFFFD0\uFFFD"+" fields have been populated and saved to your project.";let a;a="Continue";let r;r="Type your answer\u2026 (Enter to send, Shift+Enter for new line)";let l;l="Start the interview over";let p;p="Skip the interview and fill fields manually";let d;return d="Skip",[["messageList",""],t,e,i,o,a,d,[1,"agent-shell"],[1,"message-list"],[1,"message-row",3,"message-row--user"],[1,"agent-typing"],[1,"preview-drawer"],["type","button",1,"preview-toggle",3,"click"],[1,"preview-toggle-left"],[1,"preview-toggle-icon"],[1,"preview-toggle-label"],[1,"preview-badge"],[1,"preview-chevron"],[1,"preview-body"],[1,"complete-banner"],[1,"input-row"],[1,"message-row"],[1,"agent-avatar"],[1,"bubble"],[1,"bubble-text"],[1,"user-avatar"],[1,"typing-dots"],[1,"preview-empty"],[1,"preview-grid"],[1,"preview-field"],[1,"preview-field-label"],[1,"preview-field-value"],[1,"complete-icon"],[1,"complete-text"],["mat-flat-button","","color","primary",1,"btn-confirm",3,"click"],["placeholder",r,"rows","2",1,"chat-input",3,"ngModelChange","keydown","ngModel","disabled"],[1,"input-actions"],["mat-icon-button","","matTooltip",l,1,"btn-restart"],["mat-button","","matTooltip",p,1,"btn-skip",3,"click"],["mat-flat-button","","color","primary",1,"btn-send",3,"click","disabled"],["diameter","18","color","accent"],["mat-icon-button","","matTooltip",l,1,"btn-restart",3,"click"]];},template:function(e,i){e&1&&(s(0,"div",7)(1,"div",8,0),be(3,h_e,6,11,"div",9,d_e),S(5,__e,8,0,"div",10),c(),s(6,"div",11)(7,"button",12),E("click",function(){return i.togglePreview();}),s(8,"div",13)(9,"mat-icon",14),u(10,"auto_awesome"),c(),s(11,"span",15),q(12,1),c(),S(13,g_e,2,2,"span",16),c(),s(14,"mat-icon",17),u(15),c()(),S(16,b_e,3,1,"div",18),c(),S(17,y_e,13,1,"div",19),S(18,M_e,11,5,"div",20),c()),e&2&&(m(3),ye(i.messages),m(2),M(i.loading&&(i.messages.length===0||i.messages[i.messages.length-1].content==="")?5:-1),m(),Ue("preview-drawer--open",i.previewExpanded),m(7),M(i.populatedFieldCount>
10040?13:-1),m(2),_e(" ",i.previewExpanded?"expand_more":"expand_less"," "),m(),M(i.previewExpanded?16:-1),m(),M(i.readyToExtract?17:-1),m(),M(i.readyToExtract?-1:18));},dependencies:[ut,gn,Ft,Tt,Po,$e,Qe,Qt,We,Xe,Fi,zi,$t,_n,pf],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.agent-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;gap:0}.message-list[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:16px 4px;display:flex;flex-direction:column;gap:14px}.message-list[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.message-list[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.message-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#00000024;border-radius:2px}.message-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:10px}.message-row.message-row--user[_ngcontent-%COMP%]{flex-direction:row-reverse}.agent-avatar[_ngcontent-%COMP%], .user-avatar[_ngcontent-%COMP%]{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}.agent-avatar[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .user-avatar[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.agent-avatar[_ngcontent-%COMP%]{background:var(--mdc-theme-primary, #1565c0);color:#fff}.user-avatar[_ngcontent-%COMP%]{background:#00000014;color:#0000008c}.bubble[_ngcontent-%COMP%]{max-width:82%;padding:11px 16px;border-radius:18px;line-height:1.55;font-size:.93rem}.bubble[_ngcontent-%COMP%] .bubble-text[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.bubble--agent[_ngcontent-%COMP%]{background:#fff;color:#000000d9;border-bottom-left-radius:4px;box-shadow:0 1px 4px #00000014}.bubble--streaming[_ngcontent-%COMP%] .bubble-text[_ngcontent-%COMP%]:after{content:"\\258d";display:inline-block;color:var(--mdc-theme-primary, #1565c0);opacity:1;margin-left:2px;animation:_ngcontent-%COMP%_streamCursor .7s step-end infinite}@keyframes _ngcontent-%COMP%_streamCursor{0%,to{opacity:1}50%{opacity:0}}.bubble--user[_ngcontent-%COMP%]{background:var(--mdc-theme-primary, #1565c0);color:#fff;border-bottom-right-radius:4px;box-shadow:0 2px 8px #1565c04d}.agent-typing[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:10px}.typing-dots[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;background:#fff;padding:12px 16px;border-radius:18px 18px 18px 4px;box-shadow:0 1px 4px #00000014}.typing-dots[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:#1565c08c;display:block;animation:_ngcontent-%COMP%_typingBounce 1.2s ease-in-out infinite}.typing-dots[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.typing-dots[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_typingBounce{0%,60%,to{transform:translateY(0);opacity:.5}30%{transform:translateY(-6px);opacity:1}}.preview-drawer[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.09);border-radius:14px;background:#fff;flex-shrink:0;margin:6px 4px 2px;transition:max-height .28s ease;max-height:48px;overflow:hidden;box-shadow:0 1px 4px #0000000f}.preview-drawer.preview-drawer--open[_ngcontent-%COMP%]{max-height:260px}.preview-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 16px;background:transparent;border:none;border-radius:14px;cursor:pointer;font-family:inherit;gap:8px}.preview-toggle[_ngcontent-%COMP%]:hover{background:#00000008}.preview-toggle-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.preview-toggle-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:var(--mdc-theme-primary, #1565c0)!important}.preview-toggle-label[_ngcontent-%COMP%]{font-size:.83rem;font-weight:600;color:#000000a6;letter-spacing:.1px}.preview-badge[_ngcontent-%COMP%]{font-size:.72rem;font-weight:700;background:var(--mdc-theme-primary, #1565c0);color:#fff;padding:2px 8px;border-radius:10px;line-height:1.5}.preview-chevron[_ngcontent-%COMP%]{font-size:20px!important;width:20px!important;height:20px!important;color:#00000059!important}.preview-body[_ngcontent-%COMP%]{padding:8px 16px 14px;overflow-y:auto;max-height:210px}.preview-body[_ngcontent-%COMP%]::-webkit-scrollbar{width:3px}.preview-body[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.preview-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000001a;border-radius:2px}.preview-empty[_ngcontent-%COMP%]{font-size:.82rem;color:#00000061;margin:4px 0;font-style:italic}.preview-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.preview-field[_ngcontent-%COMP%]{background:#1565c00a;border:1px solid rgba(21,101,192,.12);border-radius:8px;padding:8px 10px}.preview-field-label[_ngcontent-%COMP%]{display:block;font-size:.7rem;font-weight:700;color:var(--mdc-theme-primary, #1565c0);text-transform:uppercase;letter-spacing:.5px;margin-bottom:4px}.preview-field-value[_ngcontent-%COMP%]{font-size:.8rem;color:#000000b8;margin:0;line-height:1.45;word-break:break-word}.complete-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:14px 16px;background:#43a04714;border-top:1px solid rgba(67,160,71,.25);flex-shrink:0}.complete-icon[_ngcontent-%COMP%]{font-size:28px!important;width:28px!important;height:28px!important;color:#43a047!important;flex-shrink:0}.complete-text[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:2px}.complete-text[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:.9rem;font-weight:700;color:#000000d9}.complete-text[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.8rem;color:#0000008c}.btn-confirm[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;border-radius:20px!important;height:38px;padding:0 18px;font-size:.88rem;font-weight:600;flex-shrink:0}.btn-confirm[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:17px;width:17px;height:17px}.input-row[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:flex-end;flex-shrink:0;padding:12px 4px 0}.chat-input[_ngcontent-%COMP%]{flex:1;resize:none;border:1.5px solid rgba(0,0,0,.16);border-radius:14px;padding:10px 14px;font-family:inherit;font-size:.92rem;line-height:1.5;outline:none;background:#fff;color:#000000d9;transition:border-color .18s ease}.chat-input[_ngcontent-%COMP%]:focus{border-color:var(--mdc-theme-primary, #1565c0);box-shadow:0 0 0 3px #1565c01a}.chat-input[_ngcontent-%COMP%]:disabled{background:#0000000a;color:#00000059}.chat-input[_ngcontent-%COMP%]::placeholder{color:#00000059;font-size:.85rem}
1004.chat-input[_ngcontent-%COMP%]::-webkit-scrollbar{width:3px}.chat-input[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.chat-input[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000001a;border-radius:2px}.input-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px}.btn-restart[_ngcontent-%COMP%]{color:#0000004d!important;width:28px;height:28px;line-height:28px}.btn-restart[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:inherit}.btn-restart[_ngcontent-%COMP%]:hover{color:#d32f2fbf!important}.btn-skip[_ngcontent-%COMP%]{font-size:.72rem;color:#00000059!important;min-width:0;height:24px;padding:0 8px;line-height:24px}.btn-send[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%!important;min-width:0!important;padding:0!important;display:flex;align-items:center;justify-content:center;flex-shrink:0}.btn-send[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;margin:0}.btn-send[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-send[disabled][_ngcontent-%COMP%]{background:#0000001a!important}']});};var Tc=JE(XL());var fw=class n{http=re(Zr);cachedTemplate=null;generateBusinessCaseHtml(t){return $(this,null,function*(){return this.registerHandlebarsHelpers(),(yield this.getTemplate())(t);});}generateEffortBarSvg(t){if(!t.length)return"";let e=28,i=200,o=330,a=16,r=i+o+a*2+60,l=t.length*e+a*2,p=Math.max(...t.map(f=>f.effortDays),1),d=t.map((f,h)=>{let g=a+h*e,b=Math.round(f.effortDays/p*o),w=i+a,T=g+e/2,O=f.name.length>26?f.name.slice(0,24)+"\u2026":f.name,V=this.svgEsc(O);return[`<text x="${i-6}" y="${T+4}" text-anchor="end" font-size="12" fill="#374151">${V}</text>`,`<rect x="${w}" y="${g+4}" width="${b}" height="${e-10}" rx="3" fill="#2563eb" opacity="0.82"/>`,`<text x="${w+b+6}" y="${T+4}" font-size="11" fill="#6b7280">${f.effortDays.toFixed(1)} d</text>`].join(` 1005 `);}).join(` 1006 `);return`<svg xmlns="http://www.w3.org/2000/svg" width="${r}" height="${l}" viewBox="0 0 ${r} ${l}"> 1007 <rect width="${r}" height="${l}" fill="#f8fafc" rx="6"/> 1008 ${d} 1009</svg>`;}generateCashFlowSvg(t,e,i,o){if(!t.length)return"";let a=660,r=280,l=68,p=20,d=20,f=56,h=a-l-p,g=r-d-f,b=[...e,...i,...o],{min:w,max:T,step:O}=this.niceRange(Math.min(...b),Math.max(...b)),V=T-w||1,j=h/Math.max(t.length-1,1),L=se=>(l+se*j).toFixed(1),A=se=>(d+g-(se-w)/V*g).toFixed(1),J=[];for(let se=w;se<=T+O*.01;se+=O){let de=A(se);J.push(`<line x1="${l}" y1="${de}" x2="${a-p}" y2="${de}" stroke="#e2e8f0" stroke-width="1"/>`),J.push(`<text x="${l-6}" y="${(+de+4).toFixed(1)}" text-anchor="end" font-size="10" fill="#9ca3af">${this.fmtKM(se)}</text>`);}let Q=t.map((se,de)=>`<text x="${L(de)}" y="${r-f+16}" text-anchor="middle" font-size="10" fill="#9ca3af">${this.svgEsc(se)}</text>`).join(""),te=se=>se.map((de,Ae)=>`${L(Ae)},${A(de)}`).join(" "),U=(se,de)=>se.map((Ae,rt)=>`<circle cx="${L(rt)}" cy="${A(Ae)}" r="3" fill="${de}"/>`).join(""),ce=A(0),Y=[["#E53935","Cumulative Costs",l],["#43A047","Cumulative Benefits",l+180],["#1E88E5","Net Cash Flow",l+360]].map(([se,de,Ae])=>`<rect x="${Ae}" y="${r-12}" width="12" height="8" rx="2" fill="${se}"/><text x="${Ae+16}" y="${r-4}" font-size="10" fill="#374151">${de}</text>`).join("");return[`<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${r}" viewBox="0 0 ${a} ${r}">`,` <rect width="${a}" height="${r}" fill="#f8fafc" rx="6"/>`,` ${J.join(` 1010 `)}`,` <line x1="${l}" y1="${ce}" x2="${a-p}" y2="${ce}" stroke="#94a3b8" stroke-width="1" stroke-dasharray="4 3"/>`,` ${Q}`,` <polyline points="${te(e)}" fill="none" stroke="#E53935" stroke-width="2" stroke-linejoin="round"/>`,` <polyline points="${te(i)}" fill="none" stroke="#43A047" stroke-width="2" stroke-linejoin="round"/>`,` <polyline points="${te(o)}" fill="none" stroke="#1E88E5" stroke-width="2" stroke-dasharray="6 3" stroke-linejoin="round"/>`,` ${U(e,"#E53935")}${U(i,"#43A047")}${U(o,"#1E88E5")}`,` ${Y}`,"</svg>"].join(` 1011`);}getTemplate(){return $(this,null,function*(){if(this.cachedTemplate)return this.cachedTemplate;let t=yield WE(this.http.get("assets/objects/business-case-preview.hbs",{responseType:"text"}));return this.cachedTemplate=Tc.default.compile(t),this.cachedTemplate;});}registerHandlebarsHelpers(){Tc.default.helpers.bcStripHtml||(Tc.default.registerHelper("bcStripHtml",t=>(t??"").replace(/<[^>]*>/g,"").trim()),Tc.default.registerHelper("bcFmtCurrency",t=>
1011new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(t??0)),Tc.default.registerHelper("bcFmtNum",(t,e)=>(t??0).toFixed(typeof e=="number"?e:1)),Tc.default.registerHelper("bcFmtPayback",t=>t==null?"N/A":t.toFixed(1)+" yr"),Tc.default.registerHelper("bcFmtIrr",t=>t==null?"N/A":t.toFixed(1)+"%"),Tc.default.registerHelper("bcGt",(t,e)=>(t??0)>(e??0)),Tc.default.registerHelper("bcLinkTypeBadge",t=>{let e={auto:{bg:"#dcfce7",color:"#166534",label:"Auto"},manual:{bg:"#dbeafe",color:"#1e40af",label:"Manual"},both:{bg:"#ede9fe",color:"#5b21b6",label:"Both"}},i=e[t]??e.manual;return new Tc.default.SafeString(`<span style="display:inline-block;padding:2px 7px;border-radius:10px;font-size:10px;font-weight:700;letter-spacing:.4px;background:${i.bg};color:${i.color}">${i.label}</span>`);}));}niceRange(t,e){t===e&&(t-=1,e+=1);let i=(e-t)/4,o=Math.pow(10,Math.floor(Math.log10(Math.abs(i)||1))),a=Math.ceil(i/o)*o||1;return{min:Math.floor(t/a)*a,max:Math.ceil(e/a)*a,step:a};}fmtKM(t){return Math.abs(t)>=1e6?(t/1e6).toFixed(1)+"M":Math.abs(t)>=1e3?(t/1e3).toFixed(0)+"K":t.toFixed(0);}svgEsc(t){return(t??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var _xe=()=>({}),gxe=(n,t)=>t.id,xxe=(n,t)=>t.controlName,YL=(n,t)=>t.title;function Cxe(n,t){if(n&1){let e=oe();s(0,"button",90),E("click",function(){k(e);let o=x();return R(o.skipToFullProject());}),s(1,"span"),q(2,4),c(),s(3,"mat-icon"),u(4,"open_in_new"),c()();}}function vxe(n,t){n&1&&(s(0,"mat-icon"),u(1,"lock"),c());}function bxe(n,t){if(n&1&&(s(0,"mat-icon"),u(1),c()),n&2){let e=x().$implicit;m(),G(e.icon);}}function yxe(n,t){if(n&1&&(s(0,"div",95),ee(1,"div",96),c()),n&2){let e=x().$implicit,i=x();m(),Ue("stepper-connector-fill--on",i.isStepComplete(e));}}function Pxe(n,t){if(n&1){let e=oe();s(0,"div",91),E("click",function(){let o=k(e).$implicit,a=x();return R(a.goToStep(o.id));}),s(1,"div",92)(2,"div",93),S(3,vxe,2,0,"mat-icon")(4,bxe,2,1,"mat-icon"),c(),s(5,"span",94),u(6),c()(),S(7,yxe,2,2,"div",95),c();}if(n&2){let e=t.$implicit,i=t.$index,o=t.$count,a=x();Ue("stepper-step--active",a.currentStep===e.id)("stepper-step--done",a.isStepComplete(e))("stepper-step--locked",e.id>3&&!a.workspaceCreated),m(3),M(e.id>3&&!a.workspaceCreated?3:4),m(3),G(e.title),m(),M(i!==o-1?7:-1);}}function wxe(n,t){if(n&1&&(s(0,"div",67)(1,"mat-icon",97),u(2),c(),s(3,"h1",98),u(4),c(),s(5,"p",99),u(6),c()()),n&2){let e=x();m(2),G(e.currentStepDef.icon),m(2),G(e.currentStepDef.title),m(2),G(e.currentStepDef.subtitle);}}function Sxe(n,t){if(n&1&&(s(0,"form",68)(1,"mat-form-field",100)(2,"mat-label"),q(3,5),c(),ee(4,"input",101),s(5,"mat-hint"),q(6,6),c(),s(7,"mat-error"),q(8,7),c()()()),n&2){let e=x();N("formGroup",e.nameForm);}}function Mxe(n,t){if(n&1&&ee(0,"lib-attachment-list",102),n&2){let e=x(2);N("referenceCollection","projects")("referenceId",e.projectId);}}function Oxe(n,t){if(n&1&&(s(0,"div",69),S(1,Mxe,1,2,"lib-attachment-list",102),c()),n&2){let e=x();m(),M(e.projectId?1:-1);}}function Exe(n,t){n&1&&(s(0,"li",106)(1,"mat-icon"),u(2,"check_circle"),c(),s(3,"span"),q(4,11),c()());}function Txe(n,t){if(n&1&&(s(0,"ul",103)(1,"li",106)(2,"mat-icon"),u(3,"check_circle"),c(),s(4,"span"),q(5,8),c()(),S(6,Exe,5,0,"li",106),s(7,"li",107)(8,"mat-icon"),u(9,"radio_button_unchecked"),c(),s(10,"span"),q(11,9),c()(),s(12,"li",107)(13,"mat-icon"),u(14,"radio_button_unchecked"),c(),s(15,"span"),q(16,10),c()()()),n&2){let e=x(2);m(6),M(e.noteId?6:-1);}}function Ixe(n,t){n&1&&(s(0,"div",104),ee(1,"mat-spinner",108),s(2,"p",109),q(3,12),c(),s(4,"p",110),q(5,13),c()());}function kxe(n,t){if(n&1){let e=oe();s(0,"div",104)(1,"mat-icon",111),u(2,"error_outline"),c(),s(3,"p",109),q(4,14),c(),s(5,"p",110),q(6,15),c(),s(7,"button",112),E("click",function(){k(e);let o=x(2);return R(o.onCreateWorkspace());}),s(8,"mat-icon"),u(9,"refresh"),c(),s(10,"span"),q(11,16),c()()();}}function Rxe(n,t){n&1&&(s(0,"div",105)(1,"mat-icon",113),u(2,"check_circle"),c(),s(3,"p",109),q(4,17),c(),s(5,"p",110),q(6,18),c()());}function Nxe(n,t){if(n&1&&(s(0,"div",69),S(1,Txe,17,1,"ul",103),S(2,Ixe,6,0,"div",104),S(3,kxe,12,0,"div",104),S(4,Rxe,7,0,"div",105),c()),n&2){let e=x();m(),M(!e.workspaceCreating&&!e.workspaceCreated&&!e.workspaceError?1:-1),m(),M(e.workspaceCreating?2:-1),m(),M(e.workspaceError&&!e.workspaceCreating?3:-1),m(),M(e.workspaceCreated&&!e.workspaceCreating&&!e.workspaceError?4:-1);}}function Axe(n,t){if(n&1){let e=oe();s(0,"app-project-agent",115),E("completed",function(o){k(e);let a=x(2);return R(a.onAgentCompleted(o));})("skipped",function(){k(e);let o=x(2);return R(o.onAgentSkipped());}),c();}if(n&2){let e=x(2);N("projectId",e.projectId)("projectDocPath",e.collectionPath+"/"+e.projectId)("currentProject",e.projectObject??Oa(4,_xe))("locale",e.agentLocale);}}function Dxe(n,t){if(n&1&&(s(0,"div",70),S(1,Axe,1,5,"app-project-agent",114),c()),n&2){let e=x();m(),M(e.projectId?1:-1);}}function jxe(n,t){n&1&&(s(0,"mat-icon",124),u(1,"check_circle"),c());}function Lxe(n,t){if(n&1){let e=oe();s(0,"button",121),E("click",function(){let o=k(e).$index,a=x(2);return R(a.setReviewSection(o));}),s(1,"mat-icon",122),u(2),c(),s(3,"span",123),u(4),c(),S(5,jxe,2,0,"mat-icon",124),c();}if(n&2){let e=t.$implicit,i=t.$index,o=x(2);Ue("review-sidenav-item--active",o.reviewSectionIndex===i)("review-sidenav-item--done",!o.isReviewSectionEmpty(e.controlName)),m(2),G(e.icon),m(2),G(e.label),m(),M(o.isReviewSectionEmpty(e.controlName)?-1:5);}}function zxe(n,t){if(n&1){let e=oe();s(0,"app-intelligent-field",125),E("onSave",function(){k(e);let o=x(2);return R(o.saveCurrentField());}),c();}if(n&2){let e=x(2);N("field",e.currentReviewSection.fieldId)("object",e.projectObject)("form",e.fieldsForm)("controlName",e.currentReviewSection.controlName)("version",e.AI_VERSION)("agentContext",e.agentContext)("objectRef",e.projectObjectRef)("notesPath",e.projectId?"projects/"+e.projectId:void 0);}}function Fxe(n,t){if(n&1&&(s(0,"div",71)(1,"nav",116),be(2,Lxe,6,7,"button",117,xxe),c(),s(4,"div",118)(5,"p",119),u(6),c(),S(7,zxe,1,8,"app-intelligent-field",120),c()()),n&2){let e=x();m(2),ye(e.reviewSections),m(4),G(e.currentReviewSection.subtitle),m(),M(e.showReviewField?7:-1);}}function Bxe(n,t){if(n&1&&(s(0,"div",136),u(1),c()),n&2){let e=x().$implicit,i=x(3);m(),G(i.stripHtml(e.description));}}function $xe(n,t){if(n&1&&(s(0,"div",132)(1,"div",133),u(2),c(),s(3,"div",134)(4,"div",135),u(5),c(),S(6,Bxe,2,1,"div",136),c()()),n&2){let e=t.$implicit,i=t.$index;m(2),G(e.number||i+1),m(3),G(e.title),m(),M(e.description?6:-1);}}function Vxe(n,t){if(n&1){let e=oe();s(0,"div",126)(1,"div",128)(2,"span",129),q(3,19),c(),s(4,"button",130),E("click",function(){k(e);let o=x(2);return R(o.generateBusinessProcesses());}),s(5,"mat-icon"),u(6,"refresh"),c(),s(7,"span"),q(8,20),c()()(),s(9,"div",131),be(10,$xe,7,3,"div",132,YL),c()();}if(n&2){let e=x(2);m(3),us(e.existingBPs.length),fs(3),m(7),ye(e.existingBPs);}}function Gxe(n,t){if(n&1){let e=oe();s(0,"div",127)(1,"p",137),q(2,21),c(),s(3,"button",138),E("click",function(){k(e);let o=x(2);return R(o.generateBusinessProcesses());}),s(4,"mat-icon"),u(5,"auto_awesome"),c(),s(6,"span"),q(7,22),c()()();}}function qxe(n,t){n&1&&(s(0,"div",104),ee(1,"mat-spinner",139),s(2,"p",109),q(3,23),c(),s(4,"p",110),q(5,24),c()());}function Jxe(n,t){n&1&&(s(0,"mat-icon"),u(1,"check"),c());}function Hxe(n,t){if(n&1&&(s(0,"div",136),u(1),c()),n&2){let e=x().$implicit,i=x(3);m(),G(i.stripHtml(e.description));}}function Uxe(n,t){if(n&1){let e=oe();s(0,"div",141),E("click",function(){let o=k(e).$implicit,a=x(3);return R(a.toggleBP(o));}),s(1,"div",142),S(2,Jxe,2,0,"mat-icon"),c(),s(3,"div",133),u(4),c(),s(5,"div",134)(6,"div",135),u(7),c(),S(8,Hxe,2,1,"div",136),c()();}if(n&2){let e=t.$implicit,i=t.$index;Ue("bp-card--selected",e.selected),m(),Ue("bp-card-check--on",e.selected),m(),M(e.selected?2:-1),m(2),G(i+1),m(3),G(e.title),m(),M(e.description?8:-1);}}function Wxe(n,t){if(n&1){let e=oe();s(0,"div",126)(1,"div",128)(2,"span",129),q(3,25),c(),s(4,"button",130),E("click",function(){k(e);let o=x(2);return R(o.generateBusinessProcesses());}),s(5,"mat-icon"),u(6,"refresh"),c(),s(7,"span"),q(8,26),c()()(),s(9,"div",131),be(10,Uxe,9,8,"div",140,YL),c()();}if(n&2){let e=x(2);m(3),us(e.generatedBPs.length),fs(3),m(7),ye(e.generatedBPs);}}function Xxe(n,t){if(n&1&&(s(0,"div",69),S(1,Vxe,12,1,"div",126),S(2,Gxe,8,0,"div",127),S(3,qxe,6,0,"div",104),S(4,Wxe,12,1,"div",126),c()),n&2){let e=x();m(),M(e.existingBPs.length>0&&e.generatedBPs.length===0&&!e.bpGenerating?1:-1),m(),M(e.generatedBPs.length===0&&!e.bpGenerating&&e.existingBPs.length===0?2:-1),m(),M(e.bpGenerating?3:-1),m(),M(e.generatedBPs.length>0&&!e.bpGenerating?4:-1);}}function Yxe(n,t){if(n&1){let e=oe();s(0,"div",72)(1,"app-project-positioning",143),E("totalCostChange",function(o){k(e);let a=x();return R(a.positioningTotalCost=o);}),c()();}if(n&2){let e=x();m(),N("projectId",e.projectId??void 0)("object",e.projectObject)("businessProcesses",e.businessProcessesForPositioning);}}function Kxe(n,t){if(n&1&&(s(0,"div",72),ee(1,"app-project-roi",144),c()),n&2){let e=x();m(),N("projectId",e.projectId??void 0)("statusIndex",0)("positioningCost",e.positioningTotalCost)("project",e.projectObject??null)("lockEffortSource",!0);}}function Zxe(n,t){n&1&&ee(0,"mat-spinner",149);}function Qxe(n,t){n&1&&(fi(0),s(1,"mat-icon"),u(2,"picture_as_pdf"),c(),s(3,"span"),q(4,31),c(),hi());}function e1e(n,t){if(n&1){let e=oe();s(0,"div",73)(1,"div",145)(2,"div",146)(3,"mat-icon"),u(4,"check_circle"),c(),s(5,"span"),q(6,27),c()(),s(7,"div",146)(8,"mat-icon"),u(9,"check_circle"),c(),s(10,"span"),q(11,28),c()(),s(12,"div",146)(13,"mat-icon"),u(14,"check_circle"),c(),s(15,"span"),q(16,29),c()()(),s(17,"p",147),q(18,30),c(),s(19,"button",148),E("click",function(){k(e);let o=x();return R(o.onShowBusinessCasePreview());}),S(20,Zxe,1,0,"mat-spinner",149)(21,Qxe,5,0,"ng-container"),c()();}if(n&2){let e=x();m(19),N("disabled",e.previewGenerating),m(),M(e.previewGenerating?20:21);}}function t1e(n,t){n&1&&ee(0,"mat-spinner",151);}function n1e(n,t){n&1&&(fi(0),s(1,"span"),q(2,32),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function i1e(n,t){if(n&1){let e=oe();s(0,"div",74),ee(1,"div"),s(2,"button",150),E("click",function(){k(e);let o=x();return R(o.onNextStep1());}),S(3,t1e,1,0,"mat-spinner",151)(4,n1e,5,0,"ng-container"),c()();}if(n&2){let e=x();
1011m(2),N("disabled",e.nameForm.invalid||e.saving),m(),M(e.saving?3:4);}}function o1e(n,t){n&1&&ee(0,"mat-spinner",151);}function a1e(n,t){n&1&&(fi(0),s(1,"span"),q(2,34),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function r1e(n,t){if(n&1){let e=oe();s(0,"div",74)(1,"button",152),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,33),c()(),s(6,"button",150),E("click",function(){k(e);let o=x();return R(o.onNextStep3());}),S(7,o1e,1,0,"mat-spinner",151)(8,a1e,5,0,"ng-container"),c()();}if(n&2){let e=x();m(6),N("disabled",e.saving),m(),M(e.saving?7:8);}}function s1e(n,t){if(n&1){let e=oe();s(0,"div",74)(1,"button",152),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,35),c()(),s(6,"button",153),E("click",function(){k(e);let o=x();return R(o.onCreateWorkspace());}),s(7,"mat-icon"),u(8,"rocket_launch"),c(),s(9,"span"),q(10,36),c()()();}}function l1e(n,t){if(n&1){let e=oe();s(0,"div",74)(1,"button",152),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,37),c()()();}}function c1e(n,t){n&1&&ee(0,"mat-spinner",151);}function p1e(n,t){n&1&&(fi(0),s(1,"span"),q(2,39),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function d1e(n,t){if(n&1){let e=oe();s(0,"div",74)(1,"button",154),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,38),c()(),s(6,"button",150),E("click",function(){k(e);let o=x();return R(o.saveReviewAndNext());}),S(7,c1e,1,0,"mat-spinner",151)(8,p1e,5,0,"ng-container"),c()();}if(n&2){let e=x();m(),N("disabled",e.saving),m(5),N("disabled",e.saving),m(),M(e.saving?7:8);}}function m1e(n,t){if(n&1){let e=oe();s(0,"button",150),E("click",function(){k(e);let o=x(2);return R(o.goToStep(o.positioningStepId));}),s(1,"span"),q(2,41),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c()();}if(n&2){let e=x(2);N("disabled",e.saving);}}function u1e(n,t){n&1&&ee(0,"mat-spinner",151);}function f1e(n,t){n&1&&(fi(0),s(1,"span"),q(2,42),c(),s(3,"mat-icon"),u(4,"arrow_forward"),c(),hi());}function h1e(n,t){if(n&1){let e=oe();s(0,"button",150),E("click",function(){k(e);let o=x(2);return R(o.saveBusinessProcesses());}),S(1,u1e,1,0,"mat-spinner",151)(2,f1e,5,0,"ng-container"),c();}if(n&2){let e=x(2);N("disabled",e.saving),m(),M(e.saving?1:2);}}function _1e(n,t){if(n&1){let e=oe();s(0,"div",74)(1,"button",154),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,40),c()(),S(6,m1e,5,1,"button",155),S(7,h1e,3,2,"button",155),c();}if(n&2){let e=x();m(),N("disabled",e.saving),m(5),M(e.existingBPs.length>0&&e.generatedBPs.length===0?6:-1),m(),M(e.generatedBPs.length>0?7:-1);}}function g1e(n,t){if(n&1){let e=oe();s(0,"div",74)(1,"button",152),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,43),c()(),s(6,"button",138),E("click",function(){k(e);let o=x();return R(o.goToStep(o.roiStepId));}),s(7,"span"),q(8,44),c(),s(9,"mat-icon"),u(10,"arrow_forward"),c()()();}}function x1e(n,t){if(n&1){let e=oe();s(0,"div",74)(1,"button",152),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,45),c()(),s(6,"button",138),E("click",function(){k(e);let o=x();return R(o.goToStep(o.TOTAL_STEPS));}),s(7,"span"),q(8,46),c(),s(9,"mat-icon"),u(10,"arrow_forward"),c()()();}}function C1e(n,t){if(n&1){let e=oe();s(0,"div",75)(1,"button",152),E("click",function(){k(e);let o=x();return R(o.prevStep());}),s(2,"mat-icon"),u(3,"arrow_back"),c(),s(4,"span"),q(5,47),c()(),s(6,"button",156),E("click",function(){k(e);let o=x();return R(o.openFullProject());}),s(7,"mat-icon"),u(8,"open_in_new"),c(),s(9,"span"),q(10,48),c()()();}}var hw=Object.entries(C_).filter(([,n])=>n.instructionField===!0&&n.extractField!==!1),v1e=hw.filter(([,n])=>!!n.controlName).map(([,n])=>({controlName:n.controlName,fieldId:n.fieldId??"",label:n.label,subtitle:n.subtitle??n.label,icon:n.icon??"auto_awesome"})),KL={},ZL={};for(let[,n]of hw)n.controlName&&(KL[n.controlName]=n.label,ZL[n.controlName]=n.subtitle??n.label);var zx=class n{constructor(t,e,i,o,a,r,l,p){this.firebase=t;this.router=e;this.route=i;this.snackBar=o;this.logging=a;this.localeService=r;this.dialog=l;this.businessCaseReport=p;}firebase;router;route;snackBar;logging;localeService;dialog;businessCaseReport;subscriptions=new jo();projectId=null;projectObject=null;collectionPath="projects";currentStep=1;AI_VERSION="2.0";saving=!1;workspaceCreating=!1;workspaceCreated=!1;workspaceError=!1;bpGenerating=!1;aiGenerating={};reviewSectionIndex=0;showReviewField=!0;reviewSections=v1e;reviewStepId=5;get currentReviewSection(){return this.reviewSections[this.reviewSectionIndex];}setReviewSection(t){this.reviewSectionIndex=t,this.showReviewField=!1,setTimeout(()=>{this.showReviewField=!0;let e=this.reviewSections[t];e&&this._isFieldEmpty(e.controlName)&&!this.isAiGenerating(e.controlName)&&this.generateField(e.controlName,e.fieldId);},0);}isReviewSectionEmpty(t){return this._isFieldEmpty(t);}agentExtractedFields={};generatedBPs=[];existingBPs=[];businessProcessesForPositioning=[];noteId=null;positioningTotalCost=0;nameForm=new Ri({name:new st("",Ye.required)});noteForm=new Ri({title:new st("Initial Project Context"),content:new st("")});fieldsForm=new Ri(Object.fromEntries(hw.filter(([,t])=>!!t.controlName).map(([,t])=>
1011[t.controlName,new st("")])));FIELD_LABELS=KL;FIELD_HINTS=ZL;STEPS=[{id:1,icon:"sell",title:"Name your project",subtitle:"Every great journey starts with a name. What are you building?",phase:"linear",altitudeLabel:"On the ground..."},{id:2,icon:"attach_file",title:"Got documents?",subtitle:"Upload any relevant files. You can always add more later \u2014 this step is optional.",phase:"linear",altitudeLabel:"Loading cargo..."},{id:3,icon:"rocket_launch",title:"Power it up",subtitle:"Initialize your AI workspace \u2014 your personal project intelligence assistant.",phase:"linear",altitudeLabel:"Ready for takeoff!"},{id:4,icon:"menu_book",title:"Tell the story",subtitle:"Share what you know \u2014 notes, emails, a brief, a transcript. Anything goes.",phase:"linear",altitudeLabel:"Engines warming up..."},{id:5,icon:"rate_review",title:"Review",subtitle:"Review and refine each AI-generated section before moving on.",phase:"freeNav",altitudeLabel:"Cruising at full speed!"},{id:6,icon:"schema",title:"Business Processes",subtitle:"Let AI identify the business processes your project will involve.",phase:"freeNav",altitudeLabel:"Destination in sight!"}
1011,{id:7,icon:"my_location",title:"Positioning",subtitle:"Map your project changes to business capabilities and estimate the effort required.",phase:"freeNav",altitudeLabel:"Almost there!"},{id:8,icon:"trending_up",title:"Return on Investment",subtitle:"Estimate the financial return and payback period for your project.",phase:"freeNav",altitudeLabel:"Sky high returns!"},{id:9,icon:"celebration",title:"You're all set!",subtitle:"Your project is fully configured. Open the full interface whenever you're ready to dive deeper.",phase:"freeNav",altitudeLabel:"Sky's the limit!"}];previewGenerating=!1;ngOnInit(){return $(this,null,function*(){let t=this.route.snapshot.paramMap.get("id");if(t){this.projectId=t;try{let e=yield yt(ge(this.firebase.firestore,this.collectionPath,this.projectId));if(!e.exists())return;this.projectObject=X({id:e.id},e.data()),this.nameForm.patchValue({name:this.projectObject.name||""});let i={};for(let[,a]of hw)a.controlName&&(i[a.controlName]=this.projectObject[a.controlName]||"");this.fieldsForm.patchValue(i),this.projectObject.wizardCompleted===!0&&(this.workspaceCreated=!0),this.projectObject.agentInterviewCompleted===!0&&(this.noteId="agent-completed");try{let a=yield at(we(this.firebase.firestore,`${this.collectionPath}/${this.projectId}/businessprocesses`));if(!a.empty){let r=a.docs.map(l=>({id:l.id,title:l.data().name||"",description:l.data().description||"",number:l.data().number||"",data:l.data()})).sort((l,p)=>Number(l.number)-Number(p.number));this.existingBPs=r.map(l=>({title:l.title,description:l.description,number:l.number})),this.businessProcessesForPositioning=r.map(l=>X({id:l.id,name:l.title,description:l.description,number:l.number},l.data));}}catch(a){}let o=this.projectObject.journeyStep??1;this.currentStep=Math.min(Math.max(o,1),this.TOTAL_STEPS),this.workspaceCreated&&this.currentStep<=3&&(this.currentStep=4);try{let a=yield yt(ge(this.firebase.firestore,this.collectionPath,this.projectId,"agentInterview","fields"));if(a.exists()){let r=a.data(),l={};for(let[p,d]of Object.entries(r))p!=="agentConversation"&&typeof d=="string"&&d.trim()&&(l[p]=d);this.agentExtractedFields=l;}}catch(a){}}catch(e){this.logging.error(e);}}});}ngOnDestroy(){this.subscriptions.unsubscribe();}get currentStepDef(){return this.STEPS[this.currentStep-1]??this.STEPS[0];}get freeNavSteps(){return this.STEPS.filter(t=>t.phase==="freeNav");}get TOTAL_STEPS(){return this.STEPS.length;}get bpStepId(){return this.TOTAL_STEPS-3;}get positioningStepId(){return this.TOTAL_STEPS-2;}get roiStepId(){return this.TOTAL_STEPS-1;}get contentSteps(){return this.STEPS.filter(t=>t.phase==="freeNav"&&t.id<this.TOTAL_STEPS);}get completedContentStepCount(){return this.contentSteps.filter(t=>this.isFreeNavStepComplete(t)).length;}get altitudePercent(){return(this.currentStep-1)/(this.TOTAL_STEPS-1)*72;}get altitudeDisplayPercent(){return(this.currentStep-1)/(this.TOTAL_STEPS-1)*100;}get altitudeLabel(){return this.currentStepDef.altitudeLabel;}isFreeNavStepComplete(t){return this.isStepComplete(t);}isStepComplete(t){return t.id===1?!!this.nameForm.value.name?.trim():t.id===2?this.currentStep>2:t.id===3?this.workspaceCreated:t.id===4?!!this.noteId||this.currentStep>4:t.id===this.reviewStepId?this.reviewSections.some(e=>!this._isFieldEmpty(e.controlName)):t.id===this.bpStepId?this.generatedBPs.some(e=>e.selected)||this.existingBPs.length>0:t.id===this.positioningStepId?this.currentStep>this.positioningStepId:t.id===this.roiStepId?this.currentStep>this.roiStepId:(t.id===this.TOTAL_STEPS,!1);}getFieldControl(t){return this.fieldsForm.get(t);}get projectObjectRef(){if(this.projectId)return ge(this.firebase.firestore,this.collectionPath,this.projectId);}get agentContext(){return this.agentExtractedFields;}saveCurrentField(){return $(this,null,function*(){if(!this.projectId)return;let t={};for(let e of this.reviewSections)t[e.controlName]=this.fieldsForm.get(e.controlName)?.value??"";try{yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),t,{merge:!0});}catch(e){this.logging.error(e);}});}isAiGenerating(t){return!!this.aiGenerating[t];}goToStep(t){return $(this,null,function*(){t!==this.currentStep&&(t>3&&!this.workspaceCreated||(yield this._saveCurrentFields(),this.currentStep=t,this._persistStep(),this._autoGenerateStepFields()));});}prevStep(){return $(this,null,function*(){yield this._saveCurrentFields(),this.currentStep>1&&(this.currentStep--,this._autoGenerateStepFields());});}_saveCurrentFields(){return $(this,null,function*(){if(!this.projectId||this.currentStep!==this.reviewStepId)return;let t={};for(let e of this.reviewSections)t[e.controlName]=this.fieldsForm.get(e.controlName)?.value??"";try{yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),t,{merge:!0});}catch(e){this.logging.error(e);}});}_persistStep(){this.projectId&&Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{journeyStep:this.currentStep},{merge:!0}
1011).catch(()=>{});}onNextStep1(){return $(this,null,function*(){if(!(this.nameForm.invalid||this.saving)){this.saving=!0;try{if(this.projectId)yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),Ve(X({},this.nameForm.value),{wizardStep:1}),{merge:!0});else{let t=yield Ht(we(this.firebase.firestore,this.collectionPath),Ve(X({},this.nameForm.value),{creationDate:Rn.now(),selectedContextIds:[],wizardCompleted:!1,wizardStep:1,journeyStep:2}));this.projectId=t.id,this.router.navigate([`/dashboard/project/${this.projectId}/journey`],{replaceUrl:!0});}this.currentStep=2,this._persistStep();}catch(t){this.logging.error(t),this.snackBar.open("Error saving the project name","",{duration:3e3});}finally{this.saving=!1;}}});}get agentLocale(){return this.localeService.getSelectedLocaleShort();}onAgentCompleted(t){this.agentExtractedFields=t.extractedFields,this.noteId="agent-completed",Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{wizardStep:4,agentInterviewCompleted:!0},{merge:!0}).catch(()=>{}),this.currentStep=5,this._persistStep(),this._autoGenerateStepFields();}onAgentSkipped(){this.noteId="agent-skipped",this.currentStep=5,this._persistStep(),this._autoGenerateStepFields();}onNextStep2(){return $(this,null,function*(){if(!(!this.projectId||this.saving)){this.saving=!0;try{let t=(this.noteForm.value.title??"").trim()||"Initial Project Context",e=(this.noteForm.value.content??"").trim(),i=yield Ht(we(this.firebase.firestore,`${this.collectionPath}/${this.projectId}/notes`),{title:t,content:e,date:Rn.now(),useForGenAI:!0});if(this.noteId=i.id,yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{wizardStep:2},{merge:!0}),e){let o=this.localeService.getSelectedLocaleShort(),a=`${this.collectionPath}/${this.projectId}/notes/${this.noteId}`;ei(this.firebase.functions,"functionReviewNoteStream").stream({noteDocPath:a,content:e,title:t,locale:o}).catch(()=>{});}this.currentStep=3,this._persistStep();}catch(t){this.logging.error(t);}finally{this.saving=!1;}}});}onNextStep3(){return $(this,null,function*(){if(!(!this.projectId||this.saving)){this.saving=!0;try{yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{wizardStep:2},{merge:!0}),this.currentStep=3,this._persistStep();}catch(t){this.logging.error(t);}finally{this.saving=!1;}}});}onCreateWorkspace(){return $(this,null,function*(){if(!(!this.projectId||this.workspaceCreating)){this.workspaceCreating=!0,this.workspaceError=!1;try{yield ei(this.firebase.functions,"functionCreateProjectWorkspace")({projectId:this.projectId}),yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{wizardCompleted:!0,wizardStep:3},{merge:!0}),this.workspaceCreated=!0,this._prefillDescription(),setTimeout(()=>{this.currentStep=4,this._persistStep();},1800);}catch(t){this.logging.error(t),this.workspaceError=!0;}finally{this.workspaceCreating=!1;}}});}_prefillDescription(){return $(this,null,function*(){try{if(!this.projectId)return;let a=this.localeService.getSelectedLocaleShort(),r=ei(this.firebase.functions,"functionGeneratePromptStream"),{stream:l}=yield r.stream({objectType:"project",fieldId:"project_description",version:this.AI_VERSION,locale:a,objectDocPath:`${this.collectionPath}/${this.projectId}`,object:{name:this.nameForm.value.name}}),p="";try{for(var t=Co(l),e,i,o;e=!(i=yield t.next()).done;e=!1){let d=i.value;let f=d[0];f?.description&&(p=f.description);}}catch(i){o=[i];}finally{try{e&&(i=t.return)&&(yield i.call(t));}finally{if(o)throw o[0];}}p&&this.projectId&&(this.fieldsForm.patchValue({description:p}),yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),{description:p},{merge:!0}));}catch(a){}});}generateField(t,e){return $(this,null,function*(){if(this.projectId){this.aiGenerating=Ve(X({},this.aiGenerating),{[t]:!0});try{let l=this.localeService.getSelectedLocaleShort(),p=Ve(X({},this.fieldsForm.value),{name:this.nameForm.value.name,agentContext:this.agentExtractedFields}),d=ei(this.firebase.functions,"functionGeneratePromptStream"),{stream:f}=yield d.stream({objectType:"project",fieldId:e,version:this.AI_VERSION,locale:l,objectDocPath:`${this.collectionPath}/${this.projectId}`,object:p});try{for(var i=Co(f),o,a,r;o=!(a=yield i.next()).done;o=!1){let h=a.value;let g=h[0];g?.description&&this.fieldsForm.patchValue({[t]:g.description});}}catch(a){r=[a];}finally{try{o&&(a=i.return)&&(yield a.call(i));}finally{if(r)throw r[0];}}}catch(l){this.logging.error(l),this.snackBar.open("AI generation failed. Please try again.","",{duration:3e3});}finally{this.aiGenerating=Ve(X({},this.aiGenerating),{[t]:!1});}}});}stripHtml(t){return(t??"").replace(/<[^>]*>/g,"").trim();}_isFieldEmpty(t){let e=this.fieldsForm.get(t)?.value??"";return(typeof e=="string"?e:"").replace(/<[^>]*>/g,"").trim().length===0;}_autoGenerateStepFields(){if(this.currentStep!==this.reviewStepId)return;let t=this.currentReviewSection;t&&this._isFieldEmpty(t.controlName)&&!this.isAiGenerating(t.controlName)&&this.generateField(t.controlName,t.fieldId);}saveReviewAndNext(){return $(this,null,function*(){if(!(!this.projectId||this.saving)){this.saving=!0;try{let t={};for(let e of this.reviewSections)t[e.controlName]=this.fieldsForm.get(e.controlName)?.value??"";yield Dt(ge(this.firebase.firestore,this.collectionPath,this.projectId),t,{merge:!0}),this.currentStep=this.bpStepId,this._persistStep();}catch(t){this.logging.error(t);}finally{this.saving=!1;}}});}generateBusinessProcesses(){return $(this,null,function*(){if(!(!this.projectId||this.bpGenerating)){this.bpGenerating=!0,this.generatedBPs=[];try{let a=this.localeService.getSelectedLocaleShort(),r=Ve(X({},this.fieldsForm.value),{name:this.nameForm.value.name,id:this.projectId}),l=ei(this.firebase.functions,"functionCallFunctionStream"),{stream:p}=yield l.stream({functionName:"generate_businessprocesses",version:this.AI_VERSION,objectType:"project",locale:a,object:{project:r}}),d;try{for(var t=Co(p),e,i,o;e=!(i=yield t.next()).done;e=!1){let h=i.value;h&&(d=h);}}catch(i){o=[i];}finally{try{e&&(i=t.return)&&(yield i.call(t));}finally{if(o)throw o[0];}}let f=Array.isArray(d)?d:d?.businessProcesses??d?.processes??[];this.generatedBPs=f.map(h=>({title:h.title||h.name||"Untitled",description:h.description||"",selected:!0}));}catch(a){this.logging.error(a),this.snackBar.open("Failed to generate business processes. Please try again.","",{duration:3e3});}finally{this.bpGenerating=!1;}}});}toggleBP(t){t.selected=!t.selected;}saveBusinessProcesses(){return $(this,null,function*(){if(!(!this.projectId||this.saving)){this.saving=!0;try{let t=this.generatedBPs.filter(o=>o.selected),e=1,i=[];for(let o of t){let a=yield Ht(we(this.firebase.firestore,`${this.collectionPath}/${this.projectId}
1011/businessprocesses`),{number:String(e),name:o.title,description:o.description||"",projectId:this.projectId,creationDate:Rn.fromDate(new Date())});i.push({id:a.id,name:o.title,description:o.description||"",number:String(e)}),e++;}this.businessProcessesForPositioning=i,this.currentStep=this.positioningStepId,this._persistStep();}catch(t){this.logging.error(t),this.snackBar.open("Error saving business processes.","",{duration:3e3});}finally{this.saving=!1;}}});}onShowBusinessCasePreview(){return $(this,null,function*(){if(!(this.previewGenerating||!this.projectId)){this.previewGenerating=!0,this.snackBar.open("Generating business case preview\u2026","",{duration:3500});try{let t=this.nameForm.value.name?.trim()||"Project",e=this.fieldsForm.value,i=new Date().toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"}),[o,a,r]=yield Promise.all([this._loadPositioningReportData(),this._loadComponentImpactReportData(),this._loadRoiReportData()]),l=yield this.businessCaseReport.generateBusinessCaseHtml({projectName:t,date:i,description:e.description||"",context:e.context||"",currentSituation:e.currentSituation||"",futureSituation:e.futureSituation||"",goals:e.goals||"",scope:e.scope||"",benefits:e.benefits||"",positioning:o??void 0,componentImpact:a??void 0,roi:r??void 0});this.dialog.open(fI,{data:{html:l,title:"Business Case \u2014 "+t+""},width:"80vw",maxWidth:"900px",height:"95vh"});}catch(t){this.logging.error(t),this.snackBar.open("Failed to generate the preview. Please try again.","",{duration:4e3});}finally{this.previewGenerating=!1;}}});}_loadPositioningReportData(){return $(this,null,function*(){if(!this.projectId)return null;try{let t={XS:.5,S:1,M:3,L:5,XL:10},e=yield yt(ge(this.firebase.firestore,"projects",this.projectId,"positioningAnalysis","latest")),i=e.exists()?e.data():null,o=i?.positioningParams?.dailyRate??800,a=i?.positioningParams?.selectedScaleId??"",r=X({},t);if(a){let h=yield yt(ge(this.firebase.firestore,"evaluationscales",a));if(h.exists()){let g=h.data();r={XS:g.XS??.5,S:g.S??1,M:g.M??3,L:g.L??5,XL:g.XL??10};}}let l=yield at(we(this.firebase.firestore,`projects/${this.projectId}/businessprocesses`)),p=[],d=0,f=0;for(let h of l.docs){let g=h.data(),b=g.positioningChanges??[],w=0;for(let O of b)for(let V of O.capabilityImpacts??[])w+=r[V.complexity]??0;if(!b.length&&!w)continue;let T=w*o;d+=w,f+=T,p.push({number:g.number??"",name:g.name??h.id,changeCount:b.length,effortDays:w,cost:T});}return p.sort((h,g)=>Number(h.number)-Number(g.number)),p.length?{totalEffortDays:d,totalCost:f,dailyRate:o,processes:p,svgEffortChart:this.businessCaseReport.generateEffortBarSvg(p)}:null;}catch(t){return this.logging.error(t),null;}});}_loadComponentImpactReportData(){return $(this,null,function*(){if(!this.projectId)return null;try{let t={XS:.5,S:1,M:3,L:5,XL:10},e=yield yt(ge(this.firebase.firestore,"projects",this.projectId,"positioningAnalysis","latest")),i=e.exists()?e.data():null,o=i?.positioningParams?.dailyRate??800,a=i?.positioningParams?.selectedScaleId??"",r=X({},t);if(a){let Y=yield yt(ge(this.firebase.firestore,"evaluationscales",a));if(Y.exists()){let se=Y.data();r={XS:se.XS??.5,S:se.S??1,M:se.M??3,L:se.L??5,XL:se.XL??10};}}let l=yield at(we(this.firebase.firestore,`projects/${this.projectId}/businessprocesses`));if(l.empty)return null;let p=[],d=new Set();for(let Y of l.docs){let se=Y.data(),de=se.positioningChanges??[];if(de.length){p.push({bpId:Y.id,bpName:se.name??Y.id,changes:de});for(let Ae of de)for(let rt of Ae.capabilityImpacts??[])rt.capabilityId&&d.add(rt.capabilityId);}}if(!p.length||!d.size)return null;let f=p.map(({bpId:Y})=>yt(ge(this.firebase.firestore,`projects/${this.projectId}/businessprocesses/${Y}/positioning/annotations`)).then(se=>({bpId:Y,data:se.exists()?se.data():{}}))),h=Array.from(d),g=[];for(let Y=0;Y<h.length;Y+=10){let se=h.slice(Y,Y+10);g.push(at(mt(we(this.firebase.firestore,"functionalities"),Ro("implementsBusinessCapabilitiesIds","array-contains-any",se))).then(de=>de.docs.map(Ae=>X({id:Ae.id},Ae.data()))));}let[b,...w]=yield Promise.all([Promise.all(f),...g]),T=w.flat(),O=new Map();for(let Y of T){let se=Y.implementedBySystemComponentId;if(se)for(let de of Y.implementsBusinessCapabilitiesIds??[])O.has(de)||O.set(de,new Set()),O.get(de).add(se);}let V=new Map();for(let{bpId:Y,data:se}of b)for(let[de,Ae]of Object.entries(se)){let rt=Ae?.selectedComponentIds??[];
1011if(!rt.length)continue;let et=`${Y}__${de}`;V.has(et)||V.set(et,new Set());for(let pt of rt)V.get(et).add(pt);}let j=new Set();for(let Y of O.values())Y.forEach(se=>j.add(se));for(let Y of V.values())Y.forEach(se=>j.add(se));if(!j.size)return null;let L=yield at(we(this.firebase.firestore,"systemComponents")),A=new Map();for(let Y of L.docs)A.set(Y.id,X({id:Y.id},Y.data()));let J=new Map(),Q=Y=>{if(J.has(Y))return J.get(Y);let se=A.get(Y);if(!se)return null;let de=se.isSubComponent&&se.parentSystemComponentId?A.get(se.parentSystemComponentId):null,Ae={componentId:Y,componentName:se.name??Y,editor:se.editor??"",isSubComponent:se.isSubComponent??!1,parentName:de?.name??null,componentPath:`/dashboard/component/${Y}`,totalEffortDays:0,totalCost:0,impactCount:0,impacts:[]};return J.set(Y,Ae),Ae;};for(let{bpId:Y,bpName:se,changes:de}of p)for(let Ae of de){let rt=Ae.changeId??"",et=Ae.changeDescription??"";for(let pt of Ae.capabilityImpacts??[]){let ft=pt.capabilityId??"",je=pt.capabilityName??"",ke=pt.complexity??"M",Ke=r[ke]??3,ve=O.get(ft)??new Set(),Se=V.get(`${Y}__${rt}_${ft}`)??new Set(),Be=new Set([...ve,...Se]);for(let Ze of Be){let kt=Q(Ze);if(!kt)continue;let Z=ve.has(Ze),D=Se.has(Ze),F=Z&&D?"both":Z?"auto":"manual";kt.impacts.push({bpName:se,changeDescription:et,capabilityName:je,complexity:ke,effortDays:Ke,linkType:F}),kt.totalEffortDays+=Ke,kt.totalCost+=Ke*o,kt.impactCount+=1;}}}if(!J.size)return null;let te=[...J.values()].filter(Y=>!Y.isSubComponent).sort((Y,se)=>se.totalEffortDays-Y.totalEffortDays),U=[...J.values()].filter(Y=>Y.isSubComponent).sort((Y,se)=>se.totalEffortDays-Y.totalEffortDays),ce=[];for(let Y of te)ce.push(Y),U.filter(se=>se.parentName===Y.componentName).forEach(se=>ce.push(se));let W=new Set(te.map(Y=>Y.componentName));return U.filter(Y=>!W.has(Y.parentName??"")).forEach(Y=>ce.push(Y)),{components:ce,totalEffortDays:ce.reduce((Y,se)=>Y+se.totalEffortDays,0),totalCost:ce.reduce((Y,se)=>Y+se.totalCost,0),dailyRate:o};}catch(t){return this.logging.error(t),null;}});}_loadRoiReportData(){return $(this,null,function*(){if(!this.projectId)return null;try{let t=yield yt(ge(this.firebase.firestore,"projects",this.projectId,"roi","latest"));if(!t.exists())return null;let e=t.data(),i=e?.results;if(!i)return null;
1011let o=e?.data??null,a=i.yearlyData??[],r="";if(a.length){let p=[],d=[],f=[],h=[],g=0,b=0;for(let w of a)g+=w.costs,b+=w.year===0?0:w.benefits,p.push(`Y${w.year}`),d.push(g),f.push(b),h.push(w.cumulativeCashFlow);r=this.businessCaseReport.generateCashFlowSvg(p,d,f,h);}let l=p=>(p??[]).map(d=>({label:d.label??"",amount:d.amount??0}));return{simpleRoi:i.simpleRoi??0,npv:i.npv??0,paybackPeriod:i.paybackPeriod??null,irr:i.irr??null,totalInitialCosts:i.totalInitialCosts??0,totalBenefitsYear1:i.totalBenefitsYear1??0,analysisHorizon:o?.formulaParams?.analysisHorizon??5,initialCosts:l(o?.initialCosts),recurringCosts:l(o?.recurringCosts),benefits:l(o?.benefits),svgCashFlowChart:r};}catch(t){return this.logging.error(t),null;}});}openFullProject(){this.projectId&&(document.documentElement.classList.add("nav-to-expert"),this.router.navigate([`/dashboard/project/${this.projectId}`]));}skipToFullProject(){document.documentElement.classList.add("nav-to-expert"),this.projectId?this.router.navigate([`/dashboard/project/${this.projectId}`]):this.router.navigate(["/dashboard/projects"]);}static ɵfac=function(e){return new(e||n)(le(On),le(Et),le(vi),le(Bt),le(Mo),le(To),le(Ti),le(fw));};static ɵcmp=Te({type:n,selectors:[["app-project-journey"]],decls:67,vars:33,consts:()=>{let t;t="Dirigible airship";let e;e="Prepare for Takeoff";let i;i="Low ambitions";let o;o="Unreachable by pigeons";let a;a="It's on the "+"\uFFFD#62\uFFFD"+"roadmap"+"\uFFFD/#62\uFFFD"+" skymap!";let r;r="Switch to expert mode";let l;l="Project name";let p;p="Choose a clear, descriptive name for your project";let d;d="A project name is required to continue";let f;f="Project name saved";let h;h="Initialize AI workspace";let g;g="Generate first project description (background)";let b;b="Context note saved & queued for AI review";let w;w="Setting up your workspace\u2026";let T;T="Initializing your AI vector database. Hang tight!";let O;O="Something went wrong";let V;V="The workspace couldn't be initialized. Want to retry?";let j;j="Retry";let L;L="Workspace ready!";let A;A="Your AI assistant is live. Moving on to the interview\u2026";let J;J=" "+"\uFFFD0\uFFFD"+" business processes already defined for this project ";let Q;Q="Regenerate";let te;te=" Based on everything you've shared, your AI assistant can now identify the key business processes this project will involve. Ready? ";let U;U="Generate Business Processes";let ce;ce="Identifying business processes\u2026";let W;W="Your AI assistant is analyzing your project context.";let Y;Y=" "+"\uFFFD0\uFFFD"+" processes found \u2014 click to select the ones to include ";let se;se="Regenerate";let de;de="AI workspace initialized";let Ae;Ae="Project fields filled in";let rt;rt="Business processes defined";let et;et=" Your project is fully configured. Open the full interface to explore gap analyses, AI chat, detailed panels, and much more! ";let pt;pt="Preview Business Case";let ft;ft="Let's go";let je;je="Back";let ke;ke="Continue";let Ke;Ke="Back";let ve;ve="Launch!";let Se;Se="Back";let Be;Be="Back";let Ze;Ze="Save & go to Processes";let kt;kt="Back";let Z;Z="Continue";let D;D="Save selected & continue";let F;F="Back";let fe;fe="Continue to ROI";let he;he="Back";let xe;xe="Finish";let nt;nt="Back";let Je;return Je="Open full project",[e,i,o,a,r,l,p,d,f,h,g,b,w,T,O,V,j,L,A,J,Q,te,U,ce,W,Y,se,de,Ae,rt,et,pt,ft,je,ke,Ke,ve,Se,Be,Ze,kt,Z,D,F,fe,he,xe,nt,Je,[1,"journey-layout"],[1,"hud-panel"],[1,"cloud","cloud--hud-1"],[1,"cloud","cloud--hud-2"],[1,"altitude-hud"],[1,"altitude-info"],[1,"altitude-message"],[1,"altitude-pct"],[1,"altitude-track"],[1,"altitude-fill"],[1,"step-panel"],[1,"journey-header"],[1,"journey-brand"],[1,"journey-header-right"],["mat-button","",1,"skip-link"],[1,"stepper-bar"],[1,"stepper-step",3,"stepper-step--active","stepper-step--done","stepper-step--locked"],[1,"step-scroll"],[1,"step-hero"],[1,"step-body",3,"formGroup"],[1,"step-body"],[1,"step-body","agent-step-body"],[1,"step-body","review-step-body"],[1,"step-body","step-body--embedded"],[1,"step-body","done-body"],[1,"step-nav"],[1,"step-nav","done-nav"],[1,"sky-panel"],[1,"cloud","cloud--1"],[1,"cloud","cloud--2"],[1,"cloud","cloud--3"],[1,"cloud","cloud--4"],[1,"cloud","cloud--5"],[1,"alt-line","alt-line--low",2,"bottom","25%"],[1,"alt-line-label"],[1,"alt-line-dash"],[1,"alt-line","alt-line--mid",2,"bottom","50%"],[1,"alt-line",2,"bottom","75%"],[1,"airship-anchor"],[1,"airship-float"],["src","assets/dirigeable_clipart_green.svg","alt",t,1,"airship-img"],["mat-button","",1,"skip-link",3,"click"],[1,"stepper-step",3,"click"],[1,"stepper-node
1011-wrap"],[1,"stepper-node"],[1,"stepper-label"],[1,"stepper-connector"],[1,"stepper-connector-fill"],[1,"step-hero-icon"],[1,"step-hero-title"],[1,"step-hero-subtitle"],["appearance","outline",1,"big-field"],["matInput","","formControlName","name","cdkFocusInitial","","autocomplete","off"],[3,"referenceCollection","referenceId"],[1,"checklist"],[1,"workspace-state"],[1,"workspace-state","workspace-success"],[1,"checklist-item","checklist-done"],[1,"checklist-item","checklist-pending"],["diameter","72","color","primary"],[1,"ws-title"],[1,"ws-sub"],[1,"ws-error-icon"],["mat-flat-button","","color","warn",3,"click"],[1,"ws-success-icon"],[3,"projectId","projectDocPath","currentProject","locale"],[3,"completed","skipped","projectId","projectDocPath","currentProject","locale"],[1,"review-sidenav"],[1,"review-sidenav-item",3,"review-sidenav-item--active","review-sidenav-item--done"],[1,"review-main"],[1,"review-section-subtitle"],["objectType","project",3,"field","object","form","controlName","version","agentContext","objectRef","notesPath"],[1,"review-sidenav-item",3,"click"],[1,"review-sidenav-icon"],[1,"review-sidenav-label"],[1,"review-sidenav-check"],["objectType","project",3,"onSave","field","object","form","controlName","version","agentContext","objectRef","notesPath"],[1,"bp-results"],[1,"bp-prompt"],[1,"bp-results-header"],[1,"bp-results-label"],["mat-button","",1,"btn-regen",3,"click"],[1,"bp-list"],[1,"bp-card","bp-card--readonly"],[1,"bp-card-num"],[1,"bp-card-body"],[1,"bp-card-title"],[1,"bp-card-desc"],[1,"bp-prompt-text"],["mat-flat-button","","color","primary",1,"btn-next",3,"click"],["diameter","64","color","primary"],[1,"bp-card",3,"bp-card--selected"],[1,"bp-card",3,"click"],[1,"bp-card-check"],[3,"totalCostChange","projectId","object","businessProcesses"],[3,"projectId","statusIndex","positioningCost","project","lockEffortSource"],[1,"done-checks"],[1,"done-check"],[1,"done-message"],["mat-stroked-button","",1,"btn-preview-bc",3,"click","disabled"],["diameter","20"],["mat-flat-button","","color","primary",1,"btn-next",3,"click","disabled"],["diameter","20","color","accent"],["mat-button","",3,"click"],["mat-flat-button","","color","primary",1,"btn-next","btn-launch",3,"click"],["mat-button","",3,"click","disabled"],["mat-flat-button","","color","primary",1,"btn-next",3,"disabled"],["mat-flat-button","","color","primary",1,"btn-next","btn-done",3,"click"]];},template:function(e,i){e&1&&(s(0,"div",49)(1,"div",50),ee(2,"div",51)(3,"div",52),s(4,"div",53)(5,"div",54)(6,"div",55),u(7),c(),s(8,"div",56),u(9),Zn(10,"number"),c()(),s(11,"div",57),ee(12,"div",58),c()()(),s(13,"div",59)(14,"header",60)(15,"div",61)(16,"mat-icon"),u(17,"air"),c(),s(18,"span"),q(19,0),c()(),s(20,"div",62),S(21,Cxe,5,0,"button",63),c()(),s(22,"nav",64),be(23,Pxe,8,9,"div",65,gxe),c(),s(25,"div",66),S(26,wxe,7,3,"div",67),S(27,Sxe,9,1,"form",68),S(28,Oxe,2,1,"div",69),S(29,Nxe,5,4,"div",69),S(30,Dxe,2,1,"div",70),S(31,Fxe,8,2,"div",71),S(32,Xxe,5,4,"div",69),S(33,Yxe,2,3,"div",72),S(34,Kxe,2,5,"div",72),S(35,e1e,22,2,"div",73),c(),S(36,i1e,5,2,"div",74),S(37,r1e,9,2,"div",74),S(38,s1e,11,0,"div",74),S(39,l1e,6,0,"div",74),S(40,d1e,9,3,"div",74),S(41,_1e,8,3,"div",74),S(42,g1e,11,0,"div",74),S(43,x1e,11,0,"div",74),S(44,C1e,11,0,"div",75),c(),s(45,"aside",76),ee(46,"div",77)(47,"div",78)(48,"div",79)(49,"div",80)(50,"div",81),s(51,"div",82)(52,"span",83),q(53,1),c(),ee(54,"div",84),c(),s(55,"div",85)(56,"span",83),q(57,2),c(),ee(58,"div",84),c(),s(59,"div",86)(60,"span",83),Wr(61,3),ee(62,"s"),Xr(),c(),ee(63,"div",84),c(),s(64,"div",87)(65,"div",88),ee(66,"img",89),c()()()()),e&2&&(m(7),G(i.altitudeLabel),m(2),_e("",kr(10,30,i.altitudeDisplayPercent,"1.0-0"),"%"),m(3),Ci("height",i.altitudeDisplayPercent,"%"),m(9),M(i.projectId?21:-1),m(2),ye(i.STEPS),m(2),Ue("step-scroll--review",i.currentStep===i.reviewStepId)("step-scroll--embedded",i.currentStep===i.positioningStepId||i.currentStep===i.roiStepId),m(),M(i.currentStep!==i.reviewStepId&&i.currentStep!==i.positioningStepId&&i.currentStep!==i.roiStepId?26:-1),m(),M(i.currentStep===1?27:-1),m(),M(i.currentStep===2?28:-1),m(),M(i.currentStep===3?29:-1),m(),M(i.currentStep===4?30:-1),m(),M(i.currentStep===i.reviewStepId?31:-1),m(),M(i.currentStep===i.bpStepId?32:-1),m(),M(i.currentStep===i.positioningStepId?33:-1),m(),M(i.currentStep===i.roiStepId?34:-1),m(),M(i.currentStep===i.TOTAL_STEPS?35:-1),m(),M(i.currentStep===1?36:-1),m(),M(i.currentStep===2?37:-1),m(),M(i.currentStep===3&&!i.workspaceCreating&&!i.workspaceCreated&&!i.workspaceError?38:-1),m(),M(i.currentStep===4?39:-1),m(),M(i.currentStep===i.reviewStepId?40:-1),m(),M(i.currentStep===i.bpStepId?41:-1),m(),M(i.currentStep===i.positioningStepId?42:-1),m(),M(i.currentStep===i.roiStepId?43:-1),m(),M(i.currentStep===i.TOTAL_STEPS?44:-1),m(20),Ci("bottom",i.altitudePercent,"%"));},dependencies:[ut,tn,Nn,Ft,Tt,Mn,An,Wn,$e,Qe,Gt,Vt,Wt,Ki,ti,jt,Xt,We,Xe,Fi,zi,$t,js,Zi,vf,NP,th,Zf,br,a1],styles:['.mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1011.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:calc(100vh - 85px);overflow:hidden;position:relative;padding:20px 24px;box-sizing:border-box;background:linear-gradient(to right,#000028 0px 96px,#000028d9 180px,#00002866 320px,#00002800 480px),linear-gradient(to top,#d8e8f8,#a8c8e8 18%,#6ea4d4,#3a6aaa 58%,#102060 80%,#000028)}.journey-layout[_ngcontent-%COMP%]{display:grid;grid-template-columns:10% 65% 25%;height:100%;position:relative}.hud-panel[_ngcontent-%COMP%]{position:relative;background:transparent;overflow:hidden;height:100%}.step-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#ffffffd9;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);height:calc(100% - 200px);margin:100px 0;overflow:hidden;position:relative;z-index:1;border-radius:20px;box-shadow:0 20px 60px #00000073}.journey-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px 28px;background:linear-gradient(to left,#ffffffeb,#c8e6c9bf);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);flex-shrink:0;z-index:10}.journey-brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:1.25rem;font-weight:700;color:#142f60;letter-spacing:.3px}.journey-brand[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:26px;width:26px;height:26px}.skip-link[_ngcontent-%COMP%]{font-size:.78rem;color:#0006!important;display:flex;align-items:center;gap:4px}.skip-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:15px;width:15px;height:15px}.stepper-bar[_ngcontent-%COMP%]{display:flex;align-items:flex-start;padding:10px 20px;background:#fff;flex-shrink:0;overflow-x:auto;scrollbar-width:none}.stepper-bar[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.stepper-step[_ngcontent-%COMP%]{display:flex;align-items:flex-start;flex:1;min-width:0;cursor:pointer}.stepper-step[_ngcontent-%COMP%]:last-child{flex:0 0 auto}
1011.stepper-node-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;flex-shrink:0}.stepper-node[_ngcontent-%COMP%]{width:30px;height:30px;border-radius:50%;border:2px solid rgba(0,0,0,.15);background:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:#00000061;transition:border-color .2s ease,background .2s ease,color .2s ease,box-shadow .2s ease}.stepper-node[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:15px!important;width:15px!important;height:15px!important;line-height:1}.stepper-label[_ngcontent-%COMP%]{display:block;font-size:.6rem;line-height:1.25;text-align:center;max-width:58px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#00000061;transition:color .2s ease;pointer-events:none;-webkit-user-select:none;user-select:none}.stepper-step--active[_ngcontent-%COMP%] .stepper-label[_ngcontent-%COMP%]{color:var(--mdc-theme-primary, #1565c0);font-weight:600}.stepper-step--done[_ngcontent-%COMP%]:not(.stepper-step--active) .stepper-label[_ngcontent-%COMP%]{color:#0009}.stepper-connector[_ngcontent-%COMP%]{flex:1;height:2px;background:#0000001a;margin:14px 3px 0;border-radius:1px;overflow:hidden}.stepper-connector-fill[_ngcontent-%COMP%]{height:100%;width:0%;background:var(--mdc-theme-primary, #1565c0);border-radius:1px;transition:width .35s ease}.stepper-connector-fill--on[_ngcontent-%COMP%]{width:100%}.stepper-step--active[_ngcontent-%COMP%] .stepper-node[_ngcontent-%COMP%]{background:var(--mdc-theme-primary, #1565c0);border-color:var(--mdc-theme-primary, #1565c0);color:#fff;box-shadow:0 0 0 4px #1565c02e}.stepper-step--done[_ngcontent-%COMP%]:not(.stepper-step--active) .stepper-node[_ngcontent-%COMP%]{background:var(--mdc-theme-primary, #1565c0);border-color:var(--mdc-theme-primary, #1565c0);color:#fff}.stepper-step[_ngcontent-%COMP%]:not(.stepper-step--locked):hover .stepper-node[_ngcontent-%COMP%]{border-color:var(--mdc-theme-primary, #1565c0);color:var(--mdc-theme-primary, #1565c0)}.stepper-step--done[_ngcontent-%COMP%]:not(.stepper-step--active):not(.stepper-step--locked):hover .stepper-node[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #1565c026}.stepper-step--locked[_ngcontent-%COMP%]{cursor:not-allowed;pointer-events:none}.stepper-step--locked[_ngcontent-%COMP%] .stepper-node[_ngcontent-%COMP%], .stepper-step--locked[_ngcontent-%COMP%] .stepper-connector[_ngcontent-%COMP%]{opacity:.3}.step-scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:36px 44px;display:flex;flex-direction:column}.step-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.step-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.step-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#00000024;border-radius:2px}.step-scroll--review[_ngcontent-%COMP%], .step-scroll--embedded[_ngcontent-%COMP%]{padding:0;overflow-y:hidden}.step-hero[_ngcontent-%COMP%]{margin-bottom:36px}.step-hero-icon[_ngcontent-%COMP%]{font-size:2.8rem!important;width:2.8rem!important;height:2.8rem!important;line-height:1!important;margin-bottom:14px;display:block;color:#000028!important}.step-hero-title[_ngcontent-%COMP%]{font-size:2rem;font-weight:800;color:#142f60;margin:0 0 10px;line-height:1.15;letter-spacing:-.3px;view-transition-name:project-title;contain:layout}.step-hero-subtitle[_ngcontent-%COMP%]{font-size:1rem;color:#142f60;margin:0;line-height:1.55;max-width:520px}.step-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px;flex:1}.step-body--embedded[_ngcontent-%COMP%]{gap:0;padding:0;overflow:hidden;height:100%}.step-body--embedded[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto}.big-field[_ngcontent-%COMP%], .full-field[_ngcontent-%COMP%]{width:100%}.big-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:1.15rem}.step-nav[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:14px 28px 20px;background:#fff;border-top:1px solid rgba(0,0,0,.07)}.btn-next[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;padding:0 24px;height:44px;font-size:.92rem;font-weight:600;border-radius:22px!important;letter-spacing:.2px}.btn-next[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:19px;width:19px;height:19px}.btn-launch[_ngcontent-%COMP%]{height:50px;padding:0 30px;font-size:1rem}.btn-done[_ngcontent-%COMP%]{font-size:1rem;height:48px}.checklist[_ngcontent-%COMP%]{list-style:none;margin:0;display:flex;flex-direction:column;gap:14px;padding:20px 24px;background:#fff;border-radius:14px;box-shadow:0 1px 4px #00000012}.checklist-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;font-size:.97rem}
1011.checklist-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:22px;width:22px;height:22px;flex-shrink:0}.checklist-item.checklist-done[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#43a047!important}.checklist-item.checklist-pending[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important}.checklist-item.checklist-pending[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#00000073}.workspace-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:40px 0 20px;gap:14px}.workspace-success[_ngcontent-%COMP%] .ws-title[_ngcontent-%COMP%]{color:#43a047}.ws-title[_ngcontent-%COMP%]{font-size:1.3rem;font-weight:700;color:#000000de;margin:0}.ws-sub[_ngcontent-%COMP%]{font-size:.93rem;color:#00000080;margin:0}.ws-error-icon[_ngcontent-%COMP%]{font-size:60px!important;width:60px!important;height:60px!important;color:#e53935!important}.ws-success-icon[_ngcontent-%COMP%]{font-size:60px!important;width:60px!important;height:60px!important;color:#43a047!important}.fields-grid[_ngcontent-%COMP%]{display:grid!important;grid-template-columns:1fr 1fr;gap:16px}.field-card[_ngcontent-%COMP%]{background:#fff;border-radius:14px;padding:16px 18px;box-shadow:0 1px 5px #00000012;display:flex;flex-direction:column;gap:6px}.field-card-top[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:4px}.field-card-label[_ngcontent-%COMP%]{font-size:.88rem;font-weight:700;color:#000000b8;letter-spacing:.1px}.field-editor-wrapper[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.18);border-radius:8px;overflow:hidden}.field-editor-wrapper[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%]{display:block}.field-editor-wrapper[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.1);background:#00000008;padding:2px 4px}.field-editor-wrapper[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%]{border:none}.field-editor-wrapper[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%] .ql-editor[_ngcontent-%COMP%]{min-height:120px;font-size:.93rem;line-height:1.6;padding:10px 12px;background:#fff}.field-editor-wrapper[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%] .ql-editor[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 6px}.field-editor-wrapper[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%] .ql-editor[_ngcontent-%COMP%] b[_ngcontent-%COMP%], .field-editor-wrapper[_ngcontent-%COMP%] quill-editor[_ngcontent-%COMP%] .ql-container[_ngcontent-%COMP%] .ql-editor[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:700}.btn-generate[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:.78rem;height:30px;padding:0 12px;border-radius:15px!important;white-space:nowrap;flex-shrink:0}.btn-generate[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:15px;width:15px;height:15px;color:var(--mdc-theme-primary, #1565c0)!important}.btn-generate[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{display:inline-block;margin-right:2px}.bp-prompt[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:20px;padding:24px;background:#fff;border-radius:14px;box-shadow:0 1px 5px #00000012}.bp-prompt-text[_ngcontent-%COMP%]{font-size:1rem;line-height:1.65;color:#000000ad;margin:0}.bp-results[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.bp-results-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.bp-results-label[_ngcontent-%COMP%]{font-size:.82rem;color:#00000080}.btn-regen[_ngcontent-%COMP%]{font-size:.8rem;display:inline-flex;align-items:center;gap:4px}.btn-regen[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:15px;width:15px;height:15px}.bp-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.bp-card[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;background:#fff;border:2px solid rgba(0,0,0,.08);border-radius:12px;cursor:pointer;transition:border-color .16s ease,background .16s ease;-webkit-user-select:none;user-select:none}.bp-card[_ngcontent-%COMP%]:hover{border-color:#1565c066;background:#1565c008}.bp-card.bp-card--selected[_ngcontent-%COMP%]{border-color:var(--mdc-theme-primary, #1565c0);background:#1565c00d}.bp-card.bp-card--readonly[_ngcontent-%COMP%]{cursor:default;pointer-events:none}.bp-card.bp-card--readonly[_ngcontent-%COMP%]:hover{border-color:#00000014;background:#fff}.bp-card-check[_ngcontent-%COMP%]{width:22px;height:22px;border-radius:50%;border:2px solid rgba(0,0,0,.18);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px;transition:background .14s ease,border-color .14s ease}.bp-card-check[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:13px;width:13px;height:13px;color:#fff!important}.bp-card-check.bp-card-check--on[_ngcontent-%COMP%]{background:var(--mdc-theme-primary, #1565c0);border-color:var(--mdc-theme-primary, #1565c0)}
1011.bp-card-num[_ngcontent-%COMP%]{font-size:.72rem;font-weight:700;color:#00000047;min-width:20px;margin-top:4px}.bp-card-body[_ngcontent-%COMP%]{flex:1}.bp-card-title[_ngcontent-%COMP%]{font-size:.93rem;font-weight:600;color:#000000d9;margin-bottom:3px}.bp-card-desc[_ngcontent-%COMP%]{font-size:.8rem;color:#00000080;line-height:1.45}.agent-step-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}.agent-step-body[_ngcontent-%COMP%] app-project-agent[_ngcontent-%COMP%]{flex:1;min-height:0}.agent-step-nav[_ngcontent-%COMP%]{position:static;padding-bottom:12px;background:transparent;margin-top:6px}.done-body[_ngcontent-%COMP%]{gap:28px}.done-checks[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:24px;background:#fff;border-radius:14px;box-shadow:0 1px 5px #00000012}.done-check[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;font-size:1rem;font-weight:500;color:#000c}.done-check[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:26px;width:26px;height:26px;color:#43a047!important}.done-message[_ngcontent-%COMP%]{font-size:1rem;line-height:1.65;color:#0000008f;margin:0}.btn-preview-bc[_ngcontent-%COMP%]{align-self:flex-start;border-radius:10px!important;gap:8px}.btn-preview-bc[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.done-nav[_ngcontent-%COMP%]{margin-top:4px}.sky-panel[_ngcontent-%COMP%]{position:relative;background:transparent;overflow:hidden}.alt-line[_ngcontent-%COMP%]{position:absolute;left:0;right:0;display:flex;align-items:center;z-index:2;pointer-events:none}.alt-line-label[_ngcontent-%COMP%]{font-size:.6rem;color:#ffffff73;padding-left:12px;white-space:nowrap;text-transform:uppercase;letter-spacing:.8px;flex-shrink:0}.alt-line-dash[_ngcontent-%COMP%]{flex:1;height:1px;margin:0 12px;background:repeating-linear-gradient(to right,rgba(255,255,255,.2) 0px,rgba(255,255,255,.2) 6px,transparent 6px,transparent 12px)}.alt-line--low[_ngcontent-%COMP%] .alt-line-label[_ngcontent-%COMP%]{color:#143ca0bf}.alt-line--low[_ngcontent-%COMP%] .alt-line-dash[_ngcontent-%COMP%]{background:repeating-linear-gradient(to right,rgba(20,60,160,.45) 0px,rgba(20,60,160,.45) 6px,transparent 6px,transparent 12px)}.alt-line--mid[_ngcontent-%COMP%] .alt-line-label[_ngcontent-%COMP%]{color:#0a1e6ed9}.alt-line--mid[_ngcontent-%COMP%] .alt-line-dash[_ngcontent-%COMP%]{background:repeating-linear-gradient(to right,rgba(10,30,110,.55) 0px,rgba(10,30,110,.55) 6px,transparent 6px,transparent 12px)}.cloud[_ngcontent-%COMP%]{position:absolute;background:#ffffffe6;border-radius:60px;pointer-events:none;z-index:3}.cloud[_ngcontent-%COMP%]:before, .cloud[_ngcontent-%COMP%]:after{content:"";position:absolute;background:#ffffffe6;border-radius:50%}.cloud[_ngcontent-%COMP%]:before{width:55%;height:95%;top:-48%;left:13%}.cloud[_ngcontent-%COMP%]:after{width:40%;height:80%;top:-38%;right:12%}.cloud--1[_ngcontent-%COMP%]{width:120px;height:40px;bottom:15%;left:5%;animation:_ngcontent-%COMP%_cloudDrift 30s ease-in-out infinite;opacity:.95;filter:blur(4px)}.cloud--2[_ngcontent-%COMP%]{width:88px;height:30px;bottom:30%;right:10%;animation:_ngcontent-%COMP%_cloudDrift 22s ease-in-out infinite reverse;animation-delay:-9s;opacity:.8}.cloud--3[_ngcontent-%COMP%]{width:100px;height:34px;bottom:50%;left:30%;animation:_ngcontent-%COMP%_cloudDrift 26s ease-in-out infinite;animation-delay:-14s;opacity:.65;filter:blur(1px)}.cloud--4[_ngcontent-%COMP%]{width:72px;height:24px;bottom:66%;right:18%;animation:_ngcontent-%COMP%_cloudDrift 19s ease-in-out infinite reverse;animation-delay:-7s;opacity:.5;filter:blur(4px)}.cloud--5[_ngcontent-%COMP%]{width:55px;height:19px;bottom:82%;left:22%;animation:_ngcontent-%COMP%_cloudDrift 15s ease-in-out infinite;animation-delay:-4s;opacity:.35}.cloud--hud-1[_ngcontent-%COMP%]{width:64px;height:22px;bottom:30%;left:65%;animation:_ngcontent-%COMP%_cloudDrift 24s ease-in-out infinite;animation-delay:-6s;opacity:.55;filter:blur(2px)}.cloud--hud-2[_ngcontent-%COMP%]{width:44px;height:15px;bottom:90%;left:25%;animation:_ngcontent-%COMP%_cloudDrift 18s ease-in-out infinite reverse;animation-delay:-11s;opacity:.35;filter:blur(4px)}@keyframes _ngcontent-%COMP%_cloudDrift{0%{transform:translate(0)}50%{transform:translate(28px)}to{transform:translate(0)}}.airship-anchor[_ngcontent-%COMP%]{position:absolute;
1011left:50%;transform:translate(-50%);z-index:10;transition:bottom .9s cubic-bezier(.34,1.36,.64,1)}.airship-float[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_airshipFloat 12s ease-in-out infinite}.airship-img[_ngcontent-%COMP%]{width:400px;height:auto;filter:drop-shadow(0 6px 16px rgba(0,0,20,.3))}@keyframes _ngcontent-%COMP%_airshipFloat{0%{transform:translate(0)}12%{transform:translate(12px,-7px)}25%{transform:translate(-5px,-21px)}37%{transform:translate(18px,-18px)}50%{transform:translate(-3px,-25px)}63%{transform:translate(15px,-9px)}75%{transform:translate(-12px,-15px)}88%{transform:translate(6px,-4px)}to{transform:translate(0)}}.altitude-hud[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:12px;z-index:20}.altitude-track[_ngcontent-%COMP%]{width:28px;height:55vh;background:#fff3;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end}.altitude-fill[_ngcontent-%COMP%]{width:100%;min-height:4px;background:#ffffffd9;border-radius:6px;transition:height .9s cubic-bezier(.34,1.36,.64,1)}.altitude-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}.altitude-message[_ngcontent-%COMP%]{font-size:1.1rem;color:#ffffffb3;line-height:1.35}.altitude-pct[_ngcontent-%COMP%]{font-size:3.5rem;font-weight:800;color:#fffffff2;letter-spacing:-2px;line-height:1}.div-chat-container[_ngcontent-%COMP%]{border:2px solid #1565c0;border-radius:12px;padding:12px 16px 16px;background-color:#fff;box-shadow:0 4px 16px #00000026;min-width:340px;max-width:480px}.chat-input-form[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px}.chat-input[_ngcontent-%COMP%]{flex:1}.chat-input[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper[_ngcontent-%COMP%]{display:none}.chat-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:10px}.chat-header-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#1565c0}.chat-header-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#1565c0;letter-spacing:.02em}.chat-selection-preview[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:6px;background-color:#0000000a;border-left:3px solid #1565c0;border-radius:4px;padding:6px 10px;margin-bottom:10px}.chat-selection-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#1565c0;flex-shrink:0;margin-top:1px}.chat-selection-text[_ngcontent-%COMP%]{font-size:12px;color:#0009;font-style:italic;line-height:1.4;word-break:break-word}.chat-send-button[_ngcontent-%COMP%]{flex-shrink:0;width:40px;height:40px;box-shadow:none!important}.review-step-body[_ngcontent-%COMP%]{flex-direction:row!important;align-items:stretch!important;gap:0!important;padding:0;overflow:hidden}.review-sidenav[_ngcontent-%COMP%]{width:220px;flex-shrink:0;display:flex;flex-direction:column;gap:2px;padding:12px 10px;background:linear-gradient(to right,#eef2fb,#fff);overflow-y:auto;scrollbar-width:none}.review-sidenav[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.review-sidenav-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:none;border-radius:10px;background:transparent;cursor:pointer;text-align:left;font-size:.88rem;color:#000000a6;transition:background .15s ease,color .15s ease}.review-sidenav-item[_ngcontent-%COMP%]:hover{background:#1565c00f;color:#000000de}.review-sidenav-item--active[_ngcontent-%COMP%]{background:#1565c01a;color:var(--mdc-theme-primary, #1565c0);font-weight:600}.review-sidenav-item--done[_ngcontent-%COMP%]{color:#000000bf}.review-sidenav-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;flex-shrink:0;color:inherit}.review-sidenav-label[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.review-sidenav-check[_ngcontent-%COMP%]{font-size:16px!important;width:16px!important;height:16px!important;flex-shrink:0;color:#43a047!important;margin-left:auto}.review-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;overflow-y:auto;padding:20px 28px;background:#fff;scrollbar-width:thin}.review-main[_ngcontent-%COMP%]::-webkit-scrollbar{width:4px}.review-main[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.review-main[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#00000024;border-radius:2px}.review-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.review-section-subtitle[_ngcontent-%COMP%]{font-size:.88rem;color:#00000080;line-height:1.55;margin:0 0 14px}']});};var _w=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="ecosystems";documentRoute="dashboard/ecosystem";
1011displayedColumns=["name","generation","status","description"];displayedColumnsHeaders=["Name","Generation","Status","Description"];ngOnInit(){}clickNewEcosystem(){this.router.navigate(["/dashboard/ecosystem"]);}static ɵfac=function(e){return new(e||n)(le(W1),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-ecosystem-list"]],decls:18,vars:6,consts:[[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],["defaultSortField","name","defaultSortOrder","asc",3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-toolbar",2)(3,"div",3)(4,"div")(5,"mat-icon",4),u(6,"account_tree"),c()(),s(7,"div")(8,"div",5),u(9,"Ecosystems"),c()()(),s(10,"div",6)(11,"button",7),E("click",function(){return i.clickNewEcosystem();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),u(15,"New Ecosystem"),c()()()()(),s(16,"div",8),ee(17,"app-object-list",9),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,We,Xe,ln,yn,ho],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1011.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var dE=[{value:"draft",label:"Draft",icon:"edit_note",color:"#9e9e9e"},{value:"active",label:"Active",icon:"check_circle",color:"#4caf50"},{value:"phasing-out",label:"Phasing Out",icon:"schedule",color:"#ff9800"},{value:"deprecated",label:"Deprecated",icon:"cancel",color:"#f44336"}];var QL=(n,t)=>t.id;function b1e(n,t){n&1&&(s(0,"mat-icon",5),u(1,"hourglass_empty"),c());}function y1e(n,t){n&1&&(s(0,"span",13),u(1,"\u21B3\xA0"),c());}function P1e(n,t){if(n&1&&(s(0,"span",15),u(1),c()),n&2){let e=x().$implicit;m(),G(e.editor);}}function w1e(n,t){if(n&1&&(s(0,"div",16),u(1),c()),n&2){let e=x().$implicit,i=x();m(),G(i.getParentName(e));}}function S1e(n,t){if(n&1&&(s(0,"mat-option",7)(1,"div",11)(2,"div",12),S(3,y1e,2,0,"span",13),s(4,"span",14),u(5),c(),S(6,P1e,2,1,"span",15),c(),S(7,w1e,2,1,"div",16),c()()),n&2){let e=t.$implicit,i=x();N("value",e),m(3),M(e.isSubComponent?3:-1),m(2),G(e.name),m(),M(e.editor?6:-1),m(),M(e.isSubComponent&&i.getParentName(e)?7:-1);}}function M1e(n,t){n&1&&(s(0,"mat-option",8)(1,"span",17),u(2,"No components match your search"),c()());}function O1e(n,t){if(n&1&&(s(0,"span",23),u(1),c()),n&2){let e=x().$implicit,i=x(2);m(),G(i.getParentName(e));}}function E1e(n,t){if(n&1&&(s(0,"div",24),u(1),c()),n&2){let e=x().$implicit;m(),G(e.editor);}}function T1e(n,t){if(n&1&&(s(0,"div",25),u(1),c()),n&2){let e=x().$implicit;m(),G(e.description);}}function I1e(n,t){if(n&1){let e=oe();s(0,"div",18)(1,"div",19)(2,"mat-icon",20),u(3,"widgets"),c(),s(4,"div",21)(5,"div",22),u(6),S(7,O1e,2,1,"span",23),c(),S(8,E1e,2,1,"div",24),S(9,T1e,2,1,"div",25),c()(),s(10,"div",26)(11,"button",27),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.navigateToComponent(o.id));}),s(12,"mat-icon"),u(13,"open_in_new"),c()(),s(14,"button",28),E("click",function(){let o=k(e).$implicit,a=x(2);return R(a.removeSystem(o.id));}),s(15,"mat-icon"),u(16,"close"),c()()()();}if(n&2){let e=t.$implicit,i=x(2);m(6),_e(" ",e.name," "),m(),M(e.isSubComponent&&i.getParentName(e)?7:-1),m(),M(e.editor?8:-1),m(),M(e.description?9:-1);}}function k1e(n,t){if(n&1&&(s(0,"div",9),be(1,I1e,17,4,"div",18,QL),c()),n&2){let e=x();m(),ye(e.selectedComponents);}}function R1e(n,t){n&1&&(s(0,"div",10)(1,"mat-icon"),u(2,"widgets"),c(),s(3,"p"),u(4,"No system components added yet."),ee(5,"br"),u(6,"Use the search above to add components to this ecosystem."),c()());}var gw=class n{selectedIds=[];selectionChange=new At();firestore=re(ai);router=re(Et);allSystems=[];systemMap=new Map();selectedComponents=[];searchText="";isLoading=!1;displayFn=()=>"";ngOnInit(){this.loadAllSystemsOnce();}ngOnChanges(t){t.selectedIds&&this.resolveSelectedComponents();}loadAllSystemsOnce(){return $(this,null,function*(){if(!(this.allSystems.length>0)){this.isLoading=!0;try{let t=yield at(we(this.firestore,"systemComponents")),e=[],i=[];for(let r of t.docs){let l=X({id:r.id},r.data());this.systemMap.set(l.id,l),l.isSubComponent?i.push(l):e.push(l);}e.sort((r,l)=>r.name.localeCompare(l.name)),i.sort((r,l)=>r.name.localeCompare(l.name));let o=[];for(let r of e){o.push(r);for(let l of i.filter(p=>p.parentSystemComponentId===r.id))o.push(l);}let a=new Set(e.map(r=>r.id));for(let r of i.filter(l=>!a.has(l.parentSystemComponentId)))o.push(r);this.allSystems=o,this.resolveSelectedComponents();}catch(t){console.error("SystemComponentPicker: error loading systems",t);}finally{this.isLoading=!1;}}});}resolveSelectedComponents(){this.systemMap.size&&(this.selectedComponents=(this.selectedIds??[]).map(t=>this.systemMap.get(t)).filter(t=>!!t));}get filteredSystems(){let t=this.searchText.toLowerCase().trim(),e=new Set(this.selectedIds??[]);return this.allSystems.filter(i=>!e.has(i.id)&&(!t||i.name.toLowerCase().includes(t)||(i.editor??"").toLowerCase().includes(t)||(i.description??"").toLowerCase().includes(t)));}getParentName(t){return!t.isSubComponent||!t.parentSystemComponentId?null:this.systemMap.get(t.parentSystemComponentId)?.name??null;}selectSystem(t){let e=[...(this.selectedIds??[])];e.includes(t.id)||e.push(t.id),this.searchText="",this.selectionChange.emit(e);}removeSystem(t){let e=(this.selectedIds??[]).filter(i=>i!==t);this.selectionChange.emit(e);}navigateToComponent(t){this.router.navigate(["dashboard","component",t]);}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-system-component-picker"]],inputs:{selectedIds:"selectedIds"},outputs:{selectionChange:"selectionChange"}
1011,features:[ki],decls:15,vars:7,consts:[["systemAuto","matAutocomplete"],[1,"picker-container"],["appearance","outline",1,"picker-field"],["matPrefix",""],["matInput","","placeholder","Search by name, editor or description\u2026",3,"ngModelChange","ngModel","matAutocomplete","disabled"],["matSuffix",""],[3,"optionSelected","displayWith"],[3,"value"],["disabled",""],[1,"selected-list"],[1,"empty-state"],[1,"option-row"],[1,"option-main"],[1,"option-indent"],[1,"option-name"],[1,"option-editor"],[1,"option-parent"],[1,"option-empty"],[1,"component-chip"],[1,"chip-main"],[1,"chip-icon"],[1,"chip-content"],[1,"chip-name"],[1,"chip-parent-badge"],[1,"chip-editor"],[1,"chip-description"],[1,"chip-actions"],["mat-icon-button","","matTooltip","Open component","matTooltipPosition","left",1,"chip-btn-navigate",3,"click"],["mat-icon-button","","matTooltip","Remove from ecosystem","matTooltipPosition","left",1,"chip-btn-remove",3,"click"]],template:function(e,i){if(e&1){let o=oe();s(0,"div",1)(1,"mat-form-field",2)(2,"mat-label"),u(3,"Add system component"),c(),s(4,"mat-icon",3),u(5,"search"),c(),s(6,"input",4),Mt("ngModelChange",function(r){return k(o),St(i.searchText,r)||(i.searchText=r),R(r);}),c(),S(7,b1e,2,0,"mat-icon",5),s(8,"mat-autocomplete",6,0),E("optionSelected",function(r){return i.selectSystem(r.option.value);}),be(10,S1e,8,5,"mat-option",7,QL),S(12,M1e,3,0,"mat-option",8),c()(),S(13,k1e,3,0,"div",9)(14,R1e,7,0,"div",10),c();}if(e&2){let o=bn(9);m(6),wt("ngModel",i.searchText),N("matAutocomplete",o)("disabled",i.isLoading),m(),M(i.isLoading?7:-1),m(),N("displayWith",i.displayFn),m(2),ye(i.filteredSystems),m(2),M(i.filteredSystems.length===0&&!i.isLoading?12:-1),m(),M(i.selectedComponents.length>0?13:14);}},dependencies:[ut,gn,Ft,Tt,Po,$d,Bd,Ei,Op,$e,Qt,Gt,Vt,Wt,Pl,ur,We,Xe,jt,Xt,$t,_n],styles:[".picker-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;width:100%}.picker-field[_ngcontent-%COMP%]{width:100%}.option-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:2px 0}.option-main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.option-indent[_ngcontent-%COMP%]{color:var(--mat-sys-outline, #aaa);font-size:12px}.option-name[_ngcontent-%COMP%]{font-weight:500;font-size:14px}.option-editor[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-on-surface-variant, #666);background:var(--mat-sys-surface-variant, #f0f0f0);border-radius:4px;padding:1px 6px}.option-parent[_ngcontent-%COMP%]{font-size:11px;color:var(--mat-sys-on-surface-variant, #888);padding-left:16px}.option-empty[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant, #888);font-style:italic;font-size:13px}.selected-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.component-chip[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:10px 12px;border:1px solid var(--mat-sys-outline-variant, #e0e0e0);border-radius:8px;background:var(--mat-sys-surface-container-lowest, #fafafa);transition:box-shadow .15s ease}.component-chip[_ngcontent-%COMP%]:hover{box-shadow:0 2px 6px #00000014}.chip-main[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;flex:1;min-width:0}.chip-icon[_ngcontent-%COMP%]{color:var(--mat-sys-primary, #1976d2);font-size:20px;width:20px;height:20px;margin-top:2px;flex-shrink:0}.chip-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.chip-name[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-weight:500;font-size:14px;flex-wrap:wrap}.chip-parent-badge[_ngcontent-%COMP%]{font-size:11px;font-weight:400;color:var(--mat-sys-on-surface-variant, #666);background:var(--mat-sys-surface-variant, #eeeeee);border-radius:4px;padding:1px 6px}.chip-editor[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant, #666)}.chip-description[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant, #888);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.chip-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;flex-shrink:0}.chip-btn-navigate[_ngcontent-%COMP%]{color:var(--mat-sys-on-surface-variant, #666)}.chip-btn-remove[_ngcontent-%COMP%]{color:var(--mat-sys-error, #d32f2f)}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--mat-sys-on-surface-variant, #9e9e9e);text-align:center}.empty-state[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:40px;width:40px;height:40px;opacity:.4}.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.6}"]});};var N1e=(n,t)=>t.value,A1e=(n,t)=>t.id;function D1e(n,t){n&1&&u(0," New Ecosystem ");}function j1e(n,t){if(n&1&&u(0),n&2){let e=x();
1011_e(" ",(e.ecosystem==null?null:e.ecosystem.name)||"Ecosystem"," ");}}function L1e(n,t){if(n&1&&(s(0,"span",15)(1,"mat-icon",16),u(2),c(),u(3),c()),n&2){let e,i,o,a,r=x(2);Ci("background",((e=r.getStatusConfig(r.ecosystem.status))==null?null:e.color)+"22")("color",(i=r.getStatusConfig(r.ecosystem.status))==null?null:i.color),m(2),G((o=r.getStatusConfig(r.ecosystem.status))==null?null:o.icon),m(),_e(" ",(a=r.getStatusConfig(r.ecosystem.status))==null?null:a.label," ");}}function z1e(n,t){if(n&1&&(s(0,"div",6)(1,"span",13),u(2),c(),S(3,L1e,4,6,"span",14),c()),n&2){let e=x();m(2),G(e.ecosystem==null?null:e.ecosystem.generation),m(),M(e.ecosystem!=null&&e.ecosystem.status?3:-1);}}function F1e(n,t){if(n&1){let e=oe();s(0,"button",17),E("click",function(){k(e);let o=x();return R(o.deleteEcosystem());}),s(1,"mat-icon"),u(2,"delete"),c()();}}function B1e(n,t){n&1&&(s(0,"div",10)(1,"mat-icon",18),u(2,"sync"),c(),s(3,"p"),u(4,"Loading ecosystem\u2026"),c()());}function $1e(n,t){if(n&1&&(s(0,"div",11)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c()()),n&2){let e=x();m(4),G(e.error);}}function V1e(n,t){if(n&1&&(s(0,"mat-option",28)(1,"div",41)(2,"mat-icon"),u(3),c(),s(4,"span"),u(5),c()()()),n&2){let e=t.$implicit;N("value",e.value),m(2),Ci("color",e.color),m(),G(e.icon),m(2),G(e.label);}}function G1e(n,t){if(n&1&&(s(0,"mat-option",28),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function q1e(n,t){if(n&1&&u(0),n&2){let e=x(2);Hn(" ",e.componentCount," component",e.componentCount!==1?"s":""," in this ecosystem ");}}function J1e(n,t){n&1&&u(0," No components added yet ");}function H1e(n,t){if(n&1){let e=oe();s(0,"as-split",12)(1,"as-split-area",19)(2,"div",20)(3,"form",21)(4,"mat-form-field",22)(5,"mat-label"),u(6,"Name"),c(),ee(7,"input",23),s(8,"mat-icon",24),u(9,"label"),c()(),s(10,"mat-form-field",22)(11,"mat-label"),u(12,"Description"),c(),s(13,"textarea",25),u(14," "),c()(),s(15,"mat-form-field",22)(16,"mat-label"),u(17,"Generation"),c(),ee(18,"input",26),s(19,"mat-icon",24),u(20,"layers"),c(),s(21,"mat-hint"),u(22,"Free text \u2014 use any convention that fits your organisation"),c()(),s(23,"mat-form-field",22)(24,"mat-label"),u(25,"Status"),c(),s(26,"mat-select",27),be(27,V1e,6,5,"mat-option",28,N1e),c()(),s(29,"mat-form-field",22)(30,"mat-label"),u(31,"Owner"),c(),ee(32,"input",29),s(33,"mat-icon",24),u(34,"person"),c()(),s(35,"mat-form-field",22)(36,"mat-label"),u(37,"Business Capability Model"),c(),s(38,"mat-select",30),E("selectionChange",function(o){k(e);let a=x();return R(a.onBcmChange(o.value));}),s(39,"mat-option",31),u(40,"\u2014 None \u2014"),c(),be(41,G1e,2,2,"mat-option",28,A1e),c(),s(43,"mat-icon",24),u(44,"hub"),c(),s(45,"mat-hint"),u(46,"The Business Capability Model this ecosystem supports"),c()(),s(47,"mat-form-field",22)(48,"mat-label"),u(49,"Architecture Vision"),c(),s(50,"textarea",32),u(51," "),c(),s(52,"mat-hint"),u(53,"Strategic direction for this runway generation"),c()(),s(54,"mat-form-field",22)(55,"mat-label"),u(56,"Runway Horizon"),c(),ee(57,"input",33),s(58,"mat-icon",24),u(59,"schedule"),c(),s(60,"mat-hint"),u(61,"How long is this runway expected to remain sufficient?"),c()(),s(62,"mat-form-field",22)(63,"mat-label"),u(64,"Technical Debt"),c(),s(65,"textarea",34),u(66," "),c(),s(67,"mat-hint"),u(68,"Known debt that limits what can be delivered without redesign"),c()()()()(),s(69,"as-split-area",19)(70,"div",20)(71,"div",35)(72,"mat-icon",36),u(73,"widgets"),c(),s(74,"div")(75,"div",37),u(76,"Implemented System Components"),c(),s(77,"div",38),S(78,q1e,1,2)(79,J1e,1,0),c()()(),s(80,"div",39)(81,"app-system-component-picker",40),E("selectionChange",function(o){k(e);let a=x();return R(a.onComponentsChanged(o));}),c()()()()();}if(n&2){let e=x();m(),N("size",40)("minSize",28),m(2),N("formGroup",e.form),m(24),ye(e.statuses),m(14),ye(e.allModels),m(28),N("size",60)("minSize",30),m(9),M(e.componentCount>0?78:79),m(3),N("selectedIds",e.selectedComponentIds);}}var Fx=class n{route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);svc=re(W1);firestore=re(ai);ecosystemId=null;ecosystem=null;isCreationMode=!1;
1011isLoading=!0;isSaving=!1;error=null;selectedComponentIds=[];allModels=[];statuses=dE;form;subscriptions=[];constructor(){this.form=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:["",Ye.required],generation:["",Ye.required],status:["draft",Ye.required],owner:[""],businessCapabilityModelId:[""],businessCapabilityModelName:[""],architectureVision:[""],runwayHorizon:[""],technicalDebt:[""]});}ngOnInit(){this.loadBusinessCapabilityModels(),this.route.params.subscribe(t=>{this.ecosystemId=t.id??null,this.ecosystemId?(this.isCreationMode=!1,this.loadEcosystem()):(this.isCreationMode=!0,this.isLoading=!1);});}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe());}loadBusinessCapabilityModels(){return $(this,null,function*(){try{let t=yield at(we(this.firestore,"businessCapabilityModels"));this.allModels=t.docs.map(e=>X({id:e.id},e.data())),this.allModels.sort((e,i)=>e.name.localeCompare(i.name));}catch(t){console.error("Error loading BCMs:",t);}});}loadEcosystem(){return $(this,null,function*(){try{this.isLoading=!0,this.error=null;let t=yield this.svc.getEcosystem(this.ecosystemId);if(!t){this.error="Ecosystem not found",this.isLoading=!1;return;}this.ecosystem=t,this.selectedComponentIds=[...(t.systemComponentIds??[])],this.form.patchValue({name:t.name??"",description:t.description??"",generation:t.generation??"",status:t.status??"draft",owner:t.owner??"",businessCapabilityModelId:t.businessCapabilityModelId??"",businessCapabilityModelName:t.businessCapabilityModelName??"",architectureVision:t.architectureVision??"",runwayHorizon:t.runwayHorizon??"",technicalDebt:t.technicalDebt??""}),this.isLoading=!1;}catch(t){console.error("Error loading ecosystem:",t),this.error="Failed to load ecosystem",this.isLoading=!1;}});}onBcmChange(t){let e=this.allModels.find(i=>i.id===t);this.form.patchValue({businessCapabilityModelId:t,businessCapabilityModelName:e?.name??""});}onComponentsChanged(t){this.selectedComponentIds=t;}clickSave(){return $(this,null,function*(){if(!this.form.invalid)try{this.isSaving=!0;let t=this.form.value,e={name:t.name,description:t.description,generation:t.generation,status:t.status,owner:t.owner||void 0,businessCapabilityModelId:t.businessCapabilityModelId??"",businessCapabilityModelName:t.businessCapabilityModelName??"",architectureVision:t.architectureVision||void 0,runwayHorizon:t.runwayHorizon||void 0,technicalDebt:t.technicalDebt||void 0,systemComponentIds:this.selectedComponentIds,active:!0};if(this.isCreationMode){let i=yield this.svc.createEcosystem(e);this.snackBar.open("Ecosystem created","Close",{duration:2e3}),this.router.navigate(["/dashboard/ecosystem",i]);}else yield this.svc.updateEcosystem(this.ecosystemId,e),this.ecosystem&&(this.ecosystem=X(X({},this.ecosystem),e)),this.snackBar.open("Saved","Close",{duration:1500});}catch(t){console.error("Error saving ecosystem:",t),this.snackBar.open("Failed to save","Close",{duration:3e3});}finally{this.isSaving=!1;}});}deleteEcosystem(){return $(this,null,function*(){if(!(!this.ecosystem||!this.ecosystemId)&&confirm(`Delete "${this.ecosystem.name}"?`))try{yield this.svc.deleteEcosystem(this.ecosystemId),this.snackBar.open("Ecosystem deleted","Close",{duration:2e3}),this.router.navigate(["/dashboard/ecosystems"]);}catch(t){console.error("Error deleting ecosystem:",t),this.snackBar.open("Failed to delete","Close",{duration:3e3});}});}goBack(){this.router.navigate(["/dashboard/ecosystems"]);}getStatusConfig(t){return dE.find(e=>e.value===t);}get componentCount(){return this.selectedComponentIds.length;}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-ecosystem-detail"]],decls:22,vars:7,consts:[[1,"ecosystem-container"],[1,"div-toolbar"],["mat-icon-button","","matTooltip","Back to Ecosystems",3,"click"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"objectsubtitle"],[1,"toolbar-spacer"],["mat-icon-button","","color","warn","matTooltip","Delete ecosystem"],["mat-flat-button","","color","primary",3,"click","disabled"],[1,"state-center"],[1,"state-center","state-error"],["direction","horizontal",1,"split-container"],[1,"generation-badge"],[1,"status-badge",3,"background","color"],[1,"status-badge"],[1,"status-icon"],["mat-icon-button","","color","warn","matTooltip","Delete ecosystem",3,"click"],[1,"spin-icon"],[3,"size","minSize"],[1,"panel-scroll"],[1,"fields-form",3,"formGroup"],["appearance","outline",1,"full-width"],["matInput","","formControlName","name","placeholder","e.g. Digital Integration Platform"],["matSuffix",""],["matInput","","formControlName","description","rows","3","placeholder","Business-oriented description of this architecture runway\u2026"],["matInput","","formControlName","generation","placeholder","e.g. 1.0 \xB7 Gen 2 \xB7 2025 Baseline \xB7 Foundation"],["formControlName","status"],[3,"value"],["matInput","","formControlName","owner","placeholder","Team or architect responsible for this runway"],["formControlName","businessCapabilityModelId",3,"selectionChange"],["value",""],["matInput","","formControlName","architectureVision","rows","3","placeholder","Where is this generation heading? What does the next generation look like?"],["matInput","","formControlName","runwayHorizon","placeholder","e.g. 3 PIs \xB7 12 months \xB7 Q4 2026"],["matInput","","formControlName","technicalDebt","rows","3","placeholder","Known constraints, legacy limitations, or gaps that reduce the runway\u2026"],[1,"panel-header"],[1,"panel-header-icon"],[1,"panel-title"],[1,"panel-subtitle"],[1,"picker-wrapper"],[3,"selectionChange","selectedIds"],[1,"status-option"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"mat-toolbar",1)(2,"button",2),E("click",function(){return i.goBack();}),s(3,"mat-icon"),u(4,"arrow_back"),c()(),s(5,"div",3)(6,"mat-icon",4),u(7,"account_tree"),c(),s(8,"div")(9,"div",5),S(10,D1e,1,0)(11,j1e,1,1),c(),S(12,z1e,4,2,"div",6),c()(),ee(13,"span",7),S(14,F1e,3,0,"button",8),s(15,"button",9),E("click",function(){return i.clickSave();}),s(16,"mat-icon"),u(17),c(),u(18),c()(),S(19,B1e,5,0,"div",10)(20,$1e,5,1,"div",11)(21,H1e,82,7,"as-split",12),c()),e&2&&(m(10),M(i.isCreationMode?10:11),m(2),M(!i.isCreationMode&&i.ecosystem!=null&&i.ecosystem.generation?12:-1),m(2),M(i.isCreationMode?-1:14),m(),N("disabled",i.form.invali
1011d||i.isSaving),m(2),G(i.isSaving?"hourglass_empty":"save"),m(),_e(" ",i.isSaving?"Saving\u2026":i.isCreationMode?"Create":"Save"," "),m(),M(i.isLoading?19:i.error?20:21));},dependencies:[ut,gn,Nn,Ft,Tt,Mn,tn,An,Wn,vr,cr,Cr,$e,Qe,Qt,Gt,Vt,Wt,Ki,ur,We,Xe,jt,Xt,bi,So,Ei,js,ln,yn,$t,_n,gw],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}
1011.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.ecosystem-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent;flex-shrink:0}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:16px;font-size:40px;width:40px;height:40px;display:flex;align-items:center;color:#465d91}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.toolbar-spacer[_ngcontent-%COMP%]{flex:1}.objectsubtitle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:2px}.generation-badge[_ngcontent-%COMP%]{font-size:12px;font-weight:600;background:var(--mat-sys-surface-variant, #e8eaed);color:var(--mat-sys-on-surface-variant, #444);border-radius:4px;padding:2px 8px;letter-spacing:.02em}.status-badge[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:500;border-radius:4px;padding:2px 8px}.status-badge[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}.split-container[_ngcontent-%COMP%]{flex:1;overflow:hidden}.panel-scroll[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding:16px;box-sizing:border-box}.fields-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.full-width[_ngcontent-%COMP%]{width:100%}.status-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.status-option[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.panel-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid var(--mat-sys-outline-variant, #e0e0e0)}.panel-header-icon[_ngcontent-%COMP%]{font-size:28px;width:28px;height:28px;color:var(--mat-sys-primary, #1976d2);margin-top:2px;flex-shrink:0}.panel-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--mat-sys-on-surface, #1a1a1a)}.panel-subtitle[_ngcontent-%COMP%]{font-size:12px;color:var(--mat-sys-on-surface-variant, #666);margin-top:2px}.picker-wrapper[_ngcontent-%COMP%]{width:100%}.state-center[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;flex:1;padding:64px 16px;color:var(--mat-sys-on-surface-variant, #666);text-align:center}.state-center[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:48px;width:48px;height:48px;opacity:.5}.state-center[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:14px}.state-error[_ngcontent-%COMP%]{color:var(--mat-sys-error, #d32f2f)}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.spin-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1.2s linear infinite}"]});};var xw=class n{constructor(t,e){this.dataSource=t;this.router=e;}dataSource;router;showNewButton=!1;collectionPath="businessProcessFrameworks";documentRoute="dashboard/business-process-framework";displayedColumns=["name","description"];displayedColumnsHeaders=["Name","Description"];ngOnInit(){}clickNewFramework(){this.router.navigate(["/dashboard/business-process-framework"]);}static ɵfac=function(e){return new(e||n)(le(X1),le(Et));};static ɵcmp=Te({type:n,selectors:[["app-business-process-framework-list"]],decls:18,vars:6,consts:()=>{let t;t="Business Process Frameworks";let e;return e="New Framework",[t,e,[1,"container-right-panel"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"objecttitle"],[1,"div-button-right"],["mat-flat-button","","color","primary",3,"click"],[1,"container-tile-body-strong"],["defaultSortField","name","defaultSortOrder","asc",3,"showNewButton","displayedColumns","displayedColumnsHeaders","dataSource","collectionPath","documentRoute"]];},template:function(e,i){e&1&&(s(0,"div",2)(1,"div",3)(2,"mat-toolbar",4)(3,"div",5)(4,"div")(5,"mat-icon",6),u(6,"schema"),c()(),s(7,"div")(8,"div",7),q(9,0),c()()(),s(10,"div",8)(11,"button",9),E("click",function(){return i.clickNewFramework();}),s(12,"mat-icon"),u(13,"add"),c(),s(14,"span"),q(15,1),c()()()()(),s(16,"div",10),ee(17,"app-object-list",11),c()()),e&2&&(m(17),N("showNewButton",i.showNewButton)("displayedColumns",i.displayedColumns)("displayedColumnsHeaders",i.displayedColumnsHeaders)("dataSource",i.dataSource)("collectionPath",i.collectionPath)("documentRoute",i.documentRoute));},dependencies:[$e,Qe,ho,ln,yn,We,Xe],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1011.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%;padding:10px;box-sizing:border-box}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:10px;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{background-color:#fff;border-radius:10px 10px 0 0;border-bottom:1px solid rgba(0,0,0,.08)}.div-toolbar[_ngcontent-%COMP%]{height:80px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:100%}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.container-tile-body-strong[_ngcontent-%COMP%]{background-color:#fff;border-radius:0 0 10px 10px;padding:16px;overflow:auto}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}"]});};var Cw=class n{firestore=re(ai);collectionName="processFrameworkItems";getItemsByFramework(t){return new Lo(e=>{let i=we(this.firestore,this.collectionName),o=mt(i,Ro("businessProcessFrameworkId","==",t),Jt("level"),Jt("name"));return Bn(o,r=>{let l=r.docs.map(p=>X({id:p.id},p.data()));e.next(l);},r=>{console.error("Error getting process framework items:",r),e.error(r);});});}getItem(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t),i=yield yt(e);return i.exists()?X({id:i.id},i.data()):null;}catch(e){throw console.error("Error getting process framework item:",e),e;}});}createItem(t){return $(this,null,function*(){try{let e=we(this.firestore,this.collectionName);return(yield Ht(e,Ve(X({},t),{creationDate:xo(),active:!0}))).id;}catch(e){throw console.error("Error creating process framework item:",e),e;}});}updateItem(t,e){return $(this,null,function*(){try{let i=ge(this.firestore,this.collectionName,t);yield hn(i,X({},e));}catch(i){throw console.error("Error updating process framework item:",i),i;}});}deleteItem(t){return $(this,null,function*(){try{let e=ge(this.firestore,this.collectionName,t);yield no(e);}catch(e){throw console.error("Error deleting process framework item:",e),e;}});}static ɵfac=function(e){return new(e||n)();};static ɵprov=Sn({token:n,factory:n.ɵfac,providedIn:"root"});};var mE=(n,t)=>t.id;function U1e(n,t){if(n&1&&u(0),n&2){let e=x();_e(" ",e.framework.name," ");}}function W1e(n,t){n&1&&u(0," New Framework ");}function X1e(n,t){n&1&&u(0," Framework ");}function Y1e(n,t){if(n&1){let e=oe();s(0,"button",16),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(1,"mat-icon"),u(2,"arrow_back"),c()(),s(3,"button",17),E("click",function(){k(e);let o=x();return R(o.deleteFramework());}),s(4,"mat-icon"),u(5,"delete"),c()();}}function K1e(n,t){n&1&&(s(0,"div",13),u(1," Loading framework... "),c());}function Z1e(n,t){if(n&1){let e=oe();s(0,"div",14)(1,"mat-icon"),u(2,"error_outline"),c(),s(3,"p"),u(4),c(),s(5,"button",18),E("click",function(){k(e);let o=x();return R(o.goBack());}),s(6,"mat-icon"),u(7,"arrow_back"),c(),u(8," Back "),c()();}if(n&2){let e=x();m(4),G(e.error);}}function Q1e(n,t){n&1&&(s(0,"mat-icon"),u(1,"save"),c());}function eCe(n,t){n&1&&(s(0,"mat-icon",25),u(1,"autorenew"),c());}function tCe(n,t){n&1&&(s(0,"mat-icon"),u(1,"add"),c());}function nCe(n,t){n&1&&(s(0,"mat-icon",25),u(1,"autorenew"),c());}function iCe(n,t){if(n&1){let e=oe();s(0,"div",32)(1,"button",33),E("click",function(){k(e);let o=x(3);return R(o.clickSave());}),S(2,tCe,2,0,"mat-icon"),S(3,nCe,2,0,"mat-icon",25),u(4," Create Framework "),c()();}if(n&2){let e=x(3);
1011m(),N("disabled",e.form.invalid||e.isSaving),m(),M(e.isSaving?-1:2),m(),M(e.isSaving?3:-1);}}function oCe(n,t){if(n&1){let e=oe();s(0,"as-split-area",19)(1,"div",20)(2,"div",21)(3,"mat-icon",22),u(4,"category"),c(),s(5,"span",23),u(6,"Framework Details"),c(),s(7,"div",11)(8,"button",24),E("click",function(){k(e);let o=x(2);return R(o.clickSave());}),S(9,Q1e,2,0,"mat-icon"),S(10,eCe,2,0,"mat-icon",25),c()()(),s(11,"div",26)(12,"form",27)(13,"div",28)(14,"mat-form-field",29)(15,"mat-label"),u(16,"Framework Name"),c(),s(17,"input",30),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c(),s(18,"mat-error"),u(19,"Name is required"),c()()(),s(20,"div",28)(21,"mat-form-field",29)(22,"mat-label"),u(23,"Description"),c(),s(24,"textarea",31),E("change",function(){k(e);let o=x(2);return R(o.clickSave());}),c()()(),S(25,iCe,5,3,"div",32),c()()()();}if(n&2){let e=x(2);N("size",30),m(8),N("disabled",e.form.invalid||e.isSaving),m(),M(e.isSaving?-1:9),m(),M(e.isSaving?10:-1),m(2),N("formGroup",e.form),m(13),M(e.isCreationMode?25:-1);}}function aCe(n,t){if(n&1&&(s(0,"mat-icon",48),u(1," link "),c()),n&2){let e=x().$implicit;N("matTooltip",gp("",e.item.businessCapabilityIds.length," capability link(s)"));}}function rCe(n,t){if(n&1){let e=oe();s(0,"mat-tree-node")(1,"div",41),E("click",function(){let o=k(e).$implicit,a=x(5);return R(a.onItemClick(o.item));}),ee(2,"span",42),s(3,"span",43),u(4),c(),s(5,"mat-icon",44),u(6,"subdirectory_arrow_right"),c(),s(7,"div",45)(8,"code",46),u(9),c(),s(10,"span",47),u(11),c()(),S(12,aCe,2,2,"mat-icon",48),s(13,"mat-icon",49),E("click",function(o){let a=k(e).$implicit;return x(5).clickEditItem(a.item),R(o.stopPropagation());}),u(14," edit "),c()()();}if(n&2){let e=t.$implicit,i=x(5);m(),Ue("cap-tree-row-selected",i.isItemSelected(e.item)),m(2),ji("level-"+e.item.level),m(),_e(" ",e.item.level," "),m(5),G(e.item.identifier||e.item.id),m(2),G(e.item.name),m(),M(e.item.businessCapabilityIds!=null&&e.item.businessCapabilityIds.length?12:-1);}}function sCe(n,t){if(n&1&&(s(0,"mat-icon",48),u(1," link "),c()),n&2){let e=x().$implicit;N("matTooltip",gp("",e.item.businessCapabilityIds.length," capability link(s)"));}}function lCe(n,t){if(n&1){let e=oe();s(0,"mat-nested-tree-node")(1,"div",41),E("click",function(){let o=k(e).$implicit,a=x(5);return a.onItemClick(o.item),R(a.treeControl.toggle(o));}),s(2,"button",50),E("click",function(o){let a=k(e).$implicit,r=x(5);return o.stopPropagation(),R(r.treeControl.toggle(a));}),s(3,"mat-icon",51),u(4),c()(),s(5,"span",43),u(6),c(),s(7,"div",45)(8,"code",46),u(9),c(),s(10,"span",52),u(11),c()(),S(12,sCe,2,2,"mat-icon",48),s(13,"mat-icon",49),E("click",function(o){let a=k(e).$implicit;return x(5).clickEditItem(a.item),R(o.stopPropagation());}),u(14," edit "),c()(),s(15,"div",53),Ma(16,54),c()();}if(n&2){let e=t.$implicit,i=x(5);m(),Ue("cap-tree-row-selected",i.isItemSelected(e.item)),m(),Yo("aria-label","Toggle "+e.item.name),m(2),_e(" ",i.treeControl.isExpanded(e)?"expand_more":"chevron_right"," "),m(),ji("level-"+e.item.level),m(),_e(" ",e.item.level," "),m(3),G(e.item.identifier||e.item.id),m(2),G(e.item.name),m(),M(e.item.businessCapabilityIds!=null&&e.item.businessCapabilityIds.length?12:-1),m(3),Ue("cap-tree-hidden",!i.treeControl.isExpanded(e));}}function cCe(n,t){if(n&1&&(s(0,"mat-tree",37),Zt(1,rCe,15,8,"mat-tree-node",39)(2,lCe,17,12,"mat-nested-tree-node",40),c()),n&2){let e=x(4);N("dataSource",e.treeDataSource)("treeControl",e.treeControl),m(2),N("matTreeNodeDefWhen",e.hasChildren);}}function pCe(n,t){n&1&&(s(0,"span",38),u(1,"No items found. Click + to add one."),c());}function dCe(n,t){if(n&1){let e=oe();s(0,"as-split-area",19)(1,"div",20)(2,"div",21)(3,"mat-icon",22),u(4,"account_tree"),c(),s(5,"span",23),u(6,"Process Items"),c(),s(7,"div",11)(8,"button",35),E("click",function(){k(e);let o=x(3);return R(o.clickAddItem());}),s(9,"mat-icon"),u(10,"add"),c()()()(),s(11,"div",36),S(12,cCe,3,3,"mat-tree",37),S(13,pCe,2,0,"span",38),c()()();}if(n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?55:100),m(12),M(e.items.length>0?12:-1),m(),M(e.items.length===0?13:-1);}}function mCe(n,t){if(n&1&&(s(0,"mat-option",65),u(1),c()),n&2){let e=t.$implicit;N("value",e.id),m(),G(e.name);}}function uCe(n,t){if(n&1&&(s(0,"div",28)(1,"mat-form-field",29)(2,"mat-label"),u(3),c(),s(4,"mat-select",63)(5,"mat-option",64),u(6,"\u2014 None \u2014"),c(),be(7,mCe,2,2,"mat-option",65,mE),c()()()),n&2){let e=x(5);m(3),_e("Parent Item (Level ",e.itemForm.value.level-1,")"),m(4),ye(e.getParentCandidates(e.itemForm.value.level));}}function fCe(n,t){n&1&&u(0," Update ");}function hCe(n,t){n&1&&u(0," Create ");}function _Ce(n,t){if(n&1){let e=oe();s(0,"button",66),E("click",function(){k(e);let o=x(5);return R(o.deleteItem(o.selectedItem));}),s(1,"mat-icon"),u(2,"delete"),c()();}}function gCe(n,t){if(n&1){let e=oe();s(0,"form",55)(1,"div",28)(2,"mat-form-field",29)(3,"mat-label"),u(4,"Identifier"),c(),ee(5,"input",56),s(6,"mat-hint"),u(7,"Human-readable stable ID. Read-only when editing."),c()()(),s(8,"div",28)(9,"mat-form-field",29)(10,"mat-label"),u(11,"Name"),c(),ee(12,"input",57),s(13,"mat-error"),u(14,"Name is required"),
1011c()()(),s(15,"div",28)(16,"mat-form-field",29)(17,"mat-label"),u(18,"Description"),c(),ee(19,"textarea",58),c()(),s(20,"div",28)(21,"mat-form-field",29)(22,"mat-label"),u(23,"Level"),c(),ee(24,"input",59),s(25,"mat-hint"),u(26,"Level 1 = top-level domain"),c()()(),S(27,uCe,9,1,"div",28),s(28,"div",60)(29,"button",18),E("click",function(){k(e);let o=x(4);return R(o.cancelItemForm());}),u(30," Cancel "),c(),s(31,"button",61),E("click",function(){k(e);let o=x(4);return R(o.saveItem());}),s(32,"mat-icon"),u(33,"save"),c(),S(34,fCe,1,0)(35,hCe,1,0),c(),S(36,_Ce,3,0,"button",62),c()();}if(n&2){let e=x(4);N("formGroup",e.itemForm),m(5),N("readonly",!!(e.selectedItem!=null&&e.selectedItem.id)),m(22),M(e.itemForm.value.level>1?27:-1),m(4),N("disabled",e.itemForm.invalid),m(3),M(e.selectedItem!=null&&e.selectedItem.id?34:35),m(2),M(e.selectedItem!=null&&e.selectedItem.id?36:-1);}}function xCe(n,t){if(n&1&&(s(0,"div",68)(1,"span",69),u(2,"Identifier:"),c(),s(3,"span",70)(4,"code",46),u(5),c()()()),n&2){let e=x(5);m(5),G(e.selectedItem.identifier);}}function CCe(n,t){if(n&1&&(s(0,"div",68)(1,"span",69),u(2,"Parent:"),c(),s(3,"span",70),u(4),c()()),n&2){let e=x(5);m(4),G(e.getParentName(e.selectedItem));}}function vCe(n,t){if(n&1&&(s(0,"div",68)(1,"span",69),u(2,"Description:"),c(),s(3,"span",70),u(4),c()()),n&2){let e=x(5);m(4),G(e.selectedItem.description);}}function bCe(n,t){if(n&1&&(s(0,"span",43),u(1),c()),n&2){let e=x().$implicit;ji("level-"+e.level),m(),G(e.level);}}function yCe(n,t){if(n&1){let e=oe();s(0,"div",85),E("click",function(){let o=k(e).$implicit,a=x(6);return R(a.toggleCapabilitySelection(o.id));}),s(1,"mat-icon",86),u(2),c(),s(3,"span",87),u(4),c(),S(5,bCe,2,3,"span",88),c();}if(n&2){let e=t.$implicit,i=x(6);Ue("picker-row-selected",i.isCapabilitySelected(e.id)),m(2),_e(" ",i.isCapabilitySelected(e.id)?"check_box":"check_box_outline_blank"," "),m(2),G(e.name),m(),M(e.level?5:-1);}}function PCe(n,t){n&1&&(s(0,"span",38),u(1,"No business capabilities found."),c());}function wCe(n,t){if(n&1){let e=oe();s(0,"div",76)(1,"div",81),be(2,yCe,6,5,"div",82,mE),S(4,PCe,2,0,"span",38),c(),s(5,"div",83)(6,"button",18),E("click",function(){k(e);let o=x(5);return R(o.showCapabilityPicker=!1);}),u(7,"Cancel"),c(),s(8,"button",84),E("click",function(){k(e);let o=x(5);return R(o.saveCapabilityMapping());}),s(9,"mat-icon"),u(10,"save"),c(),u(11," Save "),c()()();}if(n&2){let e=x(5);m(2),ye(e.allCapabilities),m(2),M(e.allCapabilities.length===0?4:-1);}}function SCe(n,t){if(n&1){let e=oe();s(0,"mat-chip",90),E("removed",function(){let o=k(e).$implicit,a=x(6);return R(a.unlinkCapability(o));}),s(1,"mat-icon",91),u(2,"hub"),c(),u(3),s(4,"mat-icon",92),u(5,"cancel"),c()();}if(n&2){let e=t.$implicit;N("removable",!0),m(3),_e(" ",e.name," ");}}function MCe(n,t){n&1&&(s(0,"span",38),u(1,"No business capabilities linked."),c());}function OCe(n,t){if(n&1&&(s(0,"div",77),be(1,SCe,6,2,"mat-chip",89,mE),S(3,MCe,2,0,"span",38),c()),n&2){let e=x(5);m(),ye(e.getLinkedCapabilities(e.selectedItem)),m(2),M(e.getLinkedCapabilities(e.selectedItem).length?-1:3);}}function ECe(n,t){if(n&1){let e=oe();s(0,"div",67),S(1,xCe,6,1,"div",68),s(2,"div",68)(3,"span",69),u(4,"Name:"),c(),s(5,"span",70),u(6),c()(),s(7,"div",68)(8,"span",69),u(9,"Level:"),c(),s(10,"span",70)(11,"span",43),u(12),c()()(),S(13,CCe,5,1,"div",68),S(14,vCe,5,1,"div",68),c(),s(15,"div",71)(16,"div",72)(17,"mat-icon",73),u(18,"hub"),c(),s(19,"span",74),u(20,"Business Capabilities"),c(),s(21,"button",75),E("click",function(){k(e);let o=x(4);return R(o.openCapabilityPicker());}),s(22,"mat-icon"),u(23,"edit"),c()()(),S(24,wCe,12,1,"div",76),S(25,OCe,4,1,"div",77),c(),s(26,"div",78)(27,"button",79),E("click",function(){k(e);let o=x(4);return R(o.clickEditItem(o.selectedItem));}),s(28,"mat-icon"),u(29,"edit"),c(),u(30," Edit "),c(),s(31,"button",80),E("click",function(){k(e);let o=x(4);return R(o.deleteItem(o.selectedItem));}),s(32,"mat-icon"),u(33,"delete"),c(),u(34," Delete "),c()();}if(n&2){let e=x(4);m(),M(e.selectedItem.identifier?1:-1),m(5),G(e.selectedItem.name),m(5),ji("level-"+e.selectedItem.level),m(),_e(" ",e.selectedItem.level," "),m(),M(e.selectedItem.level>1&&e.getParentName(e.selectedItem)?13:-1),m(),M(e.selectedItem.description?14:-1),m(10),M(e.showCapabilityPicker?24:-1),m(),M(e.showCapabilityPicker?-1:25);}}function TCe(n,t){n&1&&(s(0,"span",38),u(1," Select an item from the list to see its details, or click + to add one. "),c());}function ICe(n,t){if(n&1&&(s(0,"as-split-area",19)(1,"div",20)(2,"div",21)(3,"mat-icon",22),u(4,"info"),
1011c(),s(5,"span",23),u(6,"Item Detail"),c()(),s(7,"div",26),S(8,gCe,37,6,"form",55),S(9,ECe,35,9),S(10,TCe,2,0,"span",38),c()()()),n&2){let e=x(3);N("size",e.visibleRightPanelKeys.length>1?45:100),m(8),M(e.showItemForm?8:-1),m(),M(!e.showItemForm&&e.selectedItem?9:-1),m(),M(!e.showItemForm&&!e.selectedItem?10:-1);}}function kCe(n,t){if(n&1&&(s(0,"as-split-area",19)(1,"as-split",34),S(2,dCe,14,3,"as-split-area",19),S(3,ICe,11,4,"as-split-area",19),c()()),n&2){let e=x(2);N("size",70),m(),N("gutterSize",20),m(),M(e.panelVisibility.items&&!e.isCreationMode?2:-1),m(),M(e.panelVisibility.itemDetail&&!e.isCreationMode?3:-1);}}function RCe(n,t){if(n&1&&(s(0,"as-split",15),S(1,oCe,26,6,"as-split-area",19),S(2,kCe,4,4,"as-split-area",19),c()),n&2){let e=x();N("gutterSize",20),m(),M(e.panelVisibility.fields?1:-1),m(),M(e.panelVisibility.items||e.panelVisibility.itemDetail?2:-1);}}var Bx=class n{route=re(vi);router=re(Et);fb=re(wo);snackBar=re(Bt);frameworkService=re(X1);itemService=re(Cw);firestore=re(ai);frameworkId=null;framework=null;isCreationMode=!1;isLoading=!0;isSaving=!1;error=null;items=[];selectedItem=null;showItemForm=!1;itemForm;pendingItemId=null;treeControl=new Td(t=>t.children);treeDataSource=new Rd();hasChildren=(t,e)=>e.children.length>0;allCapabilities=[];capabilityPickerSelectedIds=[];showCapabilityPicker=!1;panelVisibility={fields:!0,items:!0,itemDetail:!0};form;subscriptions=[];constructor(){this.form=this.fb.group({name:["",[Ye.required,Ye.minLength(2)]],description:[""]}),this.itemForm=this.fb.group({identifier:[""],name:["",Ye.required],description:[""],level:[1,[Ye.required,Ye.min(1)]],parentProcessFrameworkItemId:[""]});}ngOnInit(){this.route.params.subscribe(t=>{this.frameworkId=t.id??null,this.frameworkId?(this.isCreationMode=!1,this.loadFramework()):(this.isCreationMode=!0,this.isLoading=!1);}),this.route.queryParams.subscribe(t=>{this.pendingItemId=t.itemId??null,this.applyPendingSelection();}),this.loadAllCapabilities();}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe());}loadFramework(){return $(this,null,function*(){try{if(this.isLoading=!0,this.error=null,!this.frameworkId){this.error="No framework ID provided",this.isLoading=!1;return;}let t=yield this.frameworkService.getFramework(this.frameworkId);if(!t){this.error="Business process framework not found",this.isLoading=!1;return;}this.framework=t,this.form.patchValue({name:t.name??"",description:t.description??""});let e=this.itemService.getItemsByFramework(this.frameworkId).subscribe(i=>{this.items=i,this.buildItemTree();});this.subscriptions.push(e),this.isLoading=!1;}catch(t){console.error("Error loading framework:",t),this.error="Failed to load business process framework",this.isLoading=!1;}});}loadAllCapabilities(){return $(this,null,function*(){try{let t=we(this.firestore,"businessCapabilities"),e=mt(t,Jt("name")),i=yield at(e);this.allCapabilities=i.docs.map(o=>X({id:o.id},o.data()));}catch(t){console.error("Error loading capabilities:",t);}});}togglePanel(t){this.panelVisibility[t]=!this.panelVisibility[t];}get visibleRightPanelKeys(){return["items","itemDetail"].filter(t=>this.panelVisibility[t]);}clickSave(){return $(this,null,function*(){if(!this.form.invalid)try{this.isSaving=!0;let t=this.form.value;if(this.isCreationMode){let e=yield this.frameworkService.createFramework({name:t.name,description:t.description??"",organisationId:"",active:!0});this.snackBar.open("Framework created","Close",{duration:2e3}),this.router.navigate(["/dashboard/business-process-framework",e]);}else yield this.frameworkService.updateFramework(this.frameworkId,{name:t.name,description:t.description??""}),this.framework&&(this.framework=Ve(X({},this.framework),{name:t.name,description:t.description})),this.snackBar.open("Saved","Close",{duration:1500});}catch(t){console.error("Error saving framework:",t),this.snackBar.open("Failed to save","Close",{duration:3e3});}finally{this.isSaving=!1;}});}deleteFramework(){return $(this,null,function*(){if(!(!this.framework||!this.frameworkId)&&confirm(`Delete "${this.framework.name}"? This will not automatically delete its items.`))try{yield this.frameworkService.deleteFramework(this.frameworkId),this.snackBar.open("Framework deleted","Close",{duration:2e3}),this.router.navigate(["/dashboard/business-process-frameworks"]);}catch(t){console.error("Error deleting framework:",t),this.snackBar.open("Failed to delete","Close",{duration:3e3});}});}goBack(){this.router.navigate(["/dashboard/business-process-frameworks"]);}
1011buildItemTree(){let t=o=>this.items.filter(a=>a.parentProcessFrameworkItemId===o).map(a=>({item:a,children:t(a.id)})),e=new Set(this.items.map(o=>o.id)),i=this.items.filter(o=>!o.parentProcessFrameworkItemId||!e.has(o.parentProcessFrameworkItemId));this.treeDataSource.data=i.map(o=>({item:o,children:t(o.id)})),this.pendingItemId&&this.expandPathToItem(this.pendingItemId),this.applyPendingSelection();}expandPathToItem(t){let e=new Set(),i=this.items.find(o=>o.id===t);for(;i?.parentProcessFrameworkItemId;)e.add(i.parentProcessFrameworkItemId),i=this.items.find(o=>o.id===i.parentProcessFrameworkItemId);this.expandMatchingNodes(this.treeDataSource.data,e);}expandMatchingNodes(t,e){for(let i of t)e.has(i.item.id)&&this.treeControl.expand(i),i.children.length>0&&this.expandMatchingNodes(i.children,e);}applyPendingSelection(){if(!this.pendingItemId||!this.items.length)return;let t=this.items.find(e=>e.id===this.pendingItemId);t&&(this.selectedItem=t,this.expandPathToItem(this.pendingItemId),this.pendingItemId=null);}getParentCandidates(t){return t<=1?[]:this.items.filter(e=>e.level===t-1);}getParentName(t){return t.parentProcessFrameworkItemId?this.items.find(i=>i.id===t.parentProcessFrameworkItemId)?.name??"":"";}onItemClick(t){this.selectedItem=t,this.showItemForm=!1,this.showCapabilityPicker=!1;}isItemSelected(t){return this.selectedItem?.id===t.id;}clickAddItem(){this.selectedItem=null,this.itemForm.reset({level:1,parentProcessFrameworkItemId:""}),this.showItemForm=!0,this.showCapabilityPicker=!1;}clickEditItem(t){this.selectedItem=t,this.itemForm.patchValue({identifier:t.identifier??t.id??"",name:t.name,description:t.description??"",level:t.level??1,parentProcessFrameworkItemId:t.parentProcessFrameworkItemId??""}),this.showItemForm=!0,this.showCapabilityPicker=!1;}saveItem(){return $(this,null,function*(){if(!(this.itemForm.invalid||!this.frameworkId))try{let t=this.itemForm.value,e={identifier:t.identifier??"",name:t.name,description:t.description??"",level:t.level,businessProcessFrameworkId:this.frameworkId,businessProcessFrameworkName:this.framework?.name??"",parentProcessFrameworkItemId:t.parentProcessFrameworkItemId??"",businessCapabilityIds:this.selectedItem?.businessCapabilityIds??[]};this.selectedItem?.id?(yield this.itemService.updateItem(this.selectedItem.id,e),this.snackBar.open("Item updated","Close",{duration:1500})):(yield this.itemService.createItem(e),this.snackBar.open("Item created","Close",{duration:1500})),this.showItemForm=!1,this.selectedItem=null;}catch(t){console.error("Error saving item:",t),this.snackBar.open("Failed to save item","Close",{duration:3e3});}});}deleteItem(t){return $(this,null,function*(){if(t.id&&confirm(`Delete item "${t.name}"?`))try{yield this.itemService.deleteItem(t.id),this.selectedItem?.id===t.id&&(this.selectedItem=null,this.showItemForm=!1,this.showCapabilityPicker=!1),this.snackBar.open("Item deleted","Close",{duration:1500});}catch(e){this.snackBar.open("Failed to delete item","Close",{duration:3e3});}});}cancelItemForm(){this.showItemForm=!1;}getLinkedCapabilities(t){return t.businessCapabilityIds?.length?this.allCapabilities.filter(e=>t.businessCapabilityIds.includes(e.id)):[];}getUnlinkedCapabilities(t){return t.businessCapabilityIds?.length?this.allCapabilities.filter(e=>!t.businessCapabilityIds.includes(e.id)):this.allCapabilities;}openCapabilityPicker(){this.capabilityPickerSelectedIds=[...(this.selectedItem?.businessCapabilityIds??[])],this.showCapabilityPicker=!0;}toggleCapabilitySelection(t){let e=this.capabilityPickerSelectedIds.indexOf(t);e>=0?this.capabilityPickerSelectedIds.splice(e,1):this.capabilityPickerSelectedIds.push(t);}isCapabilitySelected(t){return this.capabilityPickerSelectedIds.includes(t);}saveCapabilityMapping(){return $(this,null,function*(){if(this.selectedItem?.id)try{yield this.itemService.updateItem(this.selectedItem.id,{businessCapabilityIds:[...this.capabilityPickerSelectedIds]}),this.selectedItem=Ve(X({},this.selectedItem),{businessCapabilityIds:[...this.capabilityPickerSelectedIds]}),this.showCapabilityPicker=!1,this.snackBar.open("Mappings saved","Close",{duration:1500});}catch(t){console.error("Error saving capability mapping:",t),this.snackBar.open("Failed to save mappings","Close",{duration:3e3});}});}unlinkCapability(t){return $(this,null,function*(){if(!this.selectedItem?.
1011id)return;let e=(this.selectedItem.businessCapabilityIds??[]).filter(i=>i!==t.id);try{yield this.itemService.updateItem(this.selectedItem.id,{businessCapabilityIds:e}),this.selectedItem=Ve(X({},this.selectedItem),{businessCapabilityIds:e}),this.snackBar.open("Capability unlinked","Close",{duration:1500});}catch(i){this.snackBar.open("Failed to unlink capability","Close",{duration:3e3});}});}static ɵfac=function(e){return new(e||n)();};static ɵcmp=Te({type:n,selectors:[["app-business-process-framework-detail"]],decls:30,vars:19,consts:[[1,"component-layout"],[1,"header-card"],[1,"div-toolbar"],[1,"div-icon-title-subtitle"],[1,"toolbar-icon"],[1,"subtitle"],[1,"objecttitle"],[1,"div-panel-toggles"],["mat-icon-button","","matTooltip","Show/hide framework fields",3,"click"],["mat-icon-button","","matTooltip","Show/hide process items",3,"click"],["mat-icon-button","","matTooltip","Show/hide item detail",3,"click"],[1,"div-button-right"],[1,"div-content"],[1,"div-insight-disabled",2,"padding","40px","text-align","center"],[1,"div-insight-disabled",2,"padding","40px","text-align","center","color","#f44336"],["direction","horizontal",3,"gutterSize"],["mat-icon-button","","matTooltip","Back to list",3,"click"],["mat-icon-button","","color","warn","matTooltip","Delete framework",3,"click"],["mat-stroked-button","",3,"click"],[3,"size"],[1,"container-right-panel"],[1,"container-tile-title-strong"],[1,"container-tile-icon-strong"],[1,"title"],["mat-icon-button","","matTooltip","Save changes",3,"click","disabled"],[1,"icon-loading"],[1,"container-tile-body-strong"],[3,"formGroup"],[1,"div-form-element"],["appearance","fill",1,"mat-form-field-form"],["matInput","","formControlName","name",3,"change"],["matInput","","formControlName","description","rows","5",3,"change"],[1,"div-form-element",2,"padding-top","16px"],["mat-flat-button","","color","primary",2,"width","100%",3,"click","disabled"],["direction","vertical",3,"gutterSize"],["mat-icon-button","","color","primary","matTooltip","Add a new process item",3,"click"],[1,"container-tile-body-strong","sp-list-body"],[1,"cap-tree",3,"dataSource","treeControl"],[1,"div-insight-disabled"],[4,"matTreeNodeDef"],[4,"matTreeNodeDef","matTreeNodeDefWhen"],[1,"cap-tree-row",3,"click"],[1,"cap-tree-toggle-spacer"],[1,"level-badge"],[1,"cap-child-icon"],[1,"cap-tree-content"],[1,"cap-identifier"],[1,"cap-name"],[1,"sp-link-icon",3,"matTooltip"],["matTooltip","Edit item",1,"sp-link-icon","sp-edit-icon",3,"click"],["mat-icon-button","",1,"cap-tree-toggle",3,"click"],[1,"cap-tree-toggle-icon"],[1,"cap-name","cap-name-strong"],["role","group",1,"cap-tree-children"],["matTreeNodeOutlet",""],[1,"capability-form",3,"formGroup"],["matInput","","formControlName","identifier","placeholder","e.g. 1.2.3",3,"readonly"],["matInput","","formControlName","name"],["matInput","","formControlName","description","rows","3"],["matInput","","type","number","formControlName","level","min","1"],[1,"form-actions"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-icon-button","","color","warn","matTooltip","Delete this item"],["formControlName","parentProcessFrameworkItemId"],["value",""],[3,"value"],["mat-icon-button","","color","warn","matTooltip","Delete this item",3,"click"],[1,"detail-section"],[1,"detail-row"],[1,"detail-key"],[1,"detail-value"],[1,"mapping-section"],[1,"mapping-header"],[1,"mapping-icon"],[1,"mapping-title"],["mat-icon-button","","color","primary","matTooltip","Manage linked capabilities",1,"mapping-add-btn",3,"click"],[1,"capability-picker"],[1,"linked-capabilities"],[1,"link-controls"],["mat-stroked-button","","color","primary",3,"click"],["mat-stroked-button","","color","warn",3,"click"],[1,"picker-list"],[1,"picker-row",3,"picker-row-selected"],[1,"picker-actions"],["mat-flat-button","","color","primary",3,"click"],[1,"picker-row",3,"click"],[1,"picker-check"],[1,"picker-cap-name"],[1,"level-badge",3,"class"],[1,"cap-chip",3,"removable"],[1,"cap-chip",3,"removed","removable"],["matChipAvatar",""],["matChipRemove",""]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"mat-toolbar",2)(3,"div",3)(4,"div")(5,"mat-icon",4),u(6,"schema"),c()(),s(7,"div")(8,"div",5),u(9,"Business Process Framework"),c(),s(10,"div",6),S(11,U1e,1,1),S(12,W1e,1,0),S(13,X1e,1,0),c()()(),s(14,"div",7)(1
10115,"button",8),E("click",function(){return i.togglePanel("fields");}),s(16,"mat-icon"),u(17,"category"),c()(),s(18,"button",9),E("click",function(){return i.togglePanel("items");}),s(19,"mat-icon"),u(20,"account_tree"),c()(),s(21,"button",10),E("click",function(){return i.togglePanel("itemDetail");}),s(22,"mat-icon"),u(23,"info"),c()()(),s(24,"div",11),S(25,Y1e,6,0),c()()(),s(26,"div",12),S(27,K1e,2,0,"div",13),S(28,Z1e,9,1,"div",14),S(29,RCe,3,3,"as-split",15),c()()),e&2&&(m(11),M(!i.isCreationMode&&i.framework?11:-1),m(),M(i.isCreationMode?12:-1),m(),M(!i.isCreationMode&&!i.framework&&!i.isLoading?13:-1),m(2),Ue("toggle-active",i.panelVisibility.fields)("toggle-inactive",!i.panelVisibility.fields),m(3),Ue("toggle-active",i.panelVisibility.items)("toggle-inactive",!i.panelVisibility.items),m(3),Ue("toggle-active",i.panelVisibility.itemDetail)("toggle-inactive",!i.panelVisibility.itemDetail),m(4),M(i.isCreationMode?-1:25),m(2),M(i.isLoading?27:-1),m(),M(i.error&&!i.isLoading?28:-1),m(),M(!i.isLoading&&!i.error?29:-1));},dependencies:[ut,gn,Nn,Ft,Ea,Tt,Mn,Qr,tn,An,Wn,ln,yn,$e,Qe,Qt,We,Xe,Gt,Vt,Wt,Ki,ti,jt,Xt,bi,So,Ei,$t,_n,Lf,Df,Af,jf,Nf,kd,yi,Ta,Cd,nI,vr,cr,Cr],styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}
1011.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_nghost-%COMP%]{display:block;height:100%}.component-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.header-card[_ngcontent-%COMP%]{flex-shrink:0;background-color:#fff;border-radius:12px;margin:8px 10px 0}.div-content[_ngcontent-%COMP%]{flex:1 1 auto;margin:20px 10px;background-color:transparent;min-height:0}.div-toolbar[_ngcontent-%COMP%]{height:120px;background-color:transparent}.div-icon-title-subtitle[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}.objecttitle[_ngcontent-%COMP%]{font-size:xx-large}.subtitle[_ngcontent-%COMP%]{font-size:small;color:gray}.toolbar-icon[_ngcontent-%COMP%]{margin-right:30px;font-size:50px;width:50px;height:50px;display:flex;align-items:center}.title[_ngcontent-%COMP%]{padding-left:10px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.div-button-right[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;width:auto;flex-shrink:0}.div-panel-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:4px;padding:0 16px}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-active[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#465d91!important;filter:none;text-shadow:none}.div-panel-toggles[_ngcontent-%COMP%] button.toggle-inactive[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00000040!important;filter:none;text-shadow:none}.container-right-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;border-radius:10px;height:100%;width:100%;overflow:hidden}.container-right-panel[_ngcontent-%COMP%] .container-tile-body-strong[_ngcontent-%COMP%]{flex:1;overflow:auto;padding:10px}.container-tile-icon-strong[_ngcontent-%COMP%]{color:#fff}.container-tile-title-strong[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;font-size:large;background-color:#465d91;color:#fff;border-radius:10px 10px 0 0;padding:0 20px;min-height:56px;max-height:56px;flex-shrink:0}.container-tile-title-strong[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container-tile-title-strong[_ngcontent-%COMP%] .div-button-right[_ngcontent-%COMP%]{width:auto;flex-shrink:0}.sp-list-body[_ngcontent-%COMP%]{padding:0!important}.sp-link-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#465d91;opacity:.7}.sp-edit-icon[_ngcontent-%COMP%]{cursor:pointer;border-radius:4px;transition:background-color .15s ease,opacity .15s ease;opacity:.5}.sp-edit-icon[_ngcontent-%COMP%]:hover{opacity:1;background-color:#465d911f} .cap-tree{background:transparent} .cap-tree mat-tree-node, .cap-tree mat-nested-tree-node{min-height:unset!important} .cap-tree .mat-tree-node{min-height:unset!important;padding-left:0!important}.cap-tree-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:6px;padding:6px 10px 6px 0;cursor:pointer;border-left:3px solid transparent;border-bottom:1px solid rgba(0,0,0,.04);transition:background-color .15s ease,border-left .15s ease}.cap-tree-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.cap-tree-row.cap-tree-row-selected[_ngcontent-%COMP%]{background-color:#465d9114;border-left:3px solid #465d91}.cap-tree-row.cap-tree-row-selected[_ngcontent-%COMP%] .cap-name[_ng
1011content-%COMP%]{font-weight:600}.cap-tree-toggle[_ngcontent-%COMP%]{width:32px!important;height:32px!important;line-height:32px!important;flex-shrink:0}.cap-tree-toggle-icon[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:#00000073!important}.cap-tree-toggle-spacer[_ngcontent-%COMP%]{display:inline-block;width:32px;flex-shrink:0}.cap-child-icon[_ngcontent-%COMP%]{font-size:14px!important;width:14px!important;height:14px!important;color:#0000004d!important;flex-shrink:0}.cap-tree-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:baseline;gap:8px;flex:1;min-width:0;overflow:hidden}.cap-name[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cap-name-strong[_ngcontent-%COMP%]{font-weight:600}.cap-tree-children[_ngcontent-%COMP%]{padding-left:20px;border-left:1px dashed rgba(0,0,0,.12);margin-left:22px}.cap-tree-hidden[_ngcontent-%COMP%]{display:none}.level-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;font-size:.75em;font-weight:700;color:#fff}.level-badge.level-1[_ngcontent-%COMP%]{background-color:#465d91}.level-badge.level-2[_ngcontent-%COMP%]{background-color:#465d91b3}.level-badge.level-3[_ngcontent-%COMP%]{background-color:#465d9180}.level-badge.level-4[_ngcontent-%COMP%], .level-badge.level-5[_ngcontent-%COMP%], .level-badge.level-6[_ngcontent-%COMP%]{background-color:#465d9159}.cap-identifier[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:.78em;background-color:#0000000f;border-radius:3px;padding:1px 4px;color:#000000a6;letter-spacing:.3px}.detail-section[_ngcontent-%COMP%]{padding:10px 0;border-bottom:1px solid rgba(0,0,0,.08)}.detail-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:8px;padding:4px 0;font-size:.9em}.detail-key[_ngcontent-%COMP%]{font-weight:500;color:#0009;min-width:80px;flex-shrink:0}.detail-value[_ngcontent-%COMP%]{color:#000000de;word-break:break-word}.mapping-section[_ngcontent-%COMP%]{margin-top:16px;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.mapping-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:6px;margin-bottom:8px}.mapping-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#465d91}.mapping-title[_ngcontent-%COMP%]{font-size:.9em;font-weight:600;color:#000000b3;flex:1}.mapping-add-btn[_ngcontent-%COMP%]{width:28px!important;height:28px!important;line-height:28px!important}.capability-picker[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12);border-radius:6px;overflow:hidden;margin-bottom:8px}.picker-list[_ngcontent-%COMP%]{max-height:200px;overflow-y:auto}.picker-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;padding:6px 10px;cursor:pointer;border-bottom:1px solid rgba(0,0,0,.04);transition:background-color .15s ease}.picker-row[_ngcontent-%COMP%]:hover{background-color:#0000000a}.picker-row.picker-row-selected[_ngcontent-%COMP%]{background-color:#465d9114}.picker-check[_ngcontent-%COMP%]{font-size:18px!important;width:18px!important;height:18px!important;color:#465d91!important;flex-shrink:0}.picker-cap-name[_ngcontent-%COMP%]{flex:1;font-size:.88em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.picker-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;padding:8px 10px;background-color:#00000005;border-top:1px solid rgba(0,0,0,.08)}.linked-capabilities[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;padding:4px 0}.cap-chip[_ngcontent-%COMP%]{font-size:.82em}.link-controls[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:12px}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex-shrink:0}.link-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit!important;filter:none!important;text-shadow:none!important}.capability-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap}.div-form-element[_ngcontent-%COMP%]{margin:0;width:100%;overflow-x:hidden;padding-bottom:2px}.mat-form-field-form[_ngcontent-%COMP%]{min-width:100%!important}.div-insight-disabled[_ngcontent-%COMP%]{overflow-wrap:break-word;text-wrap:wrap;max-width:100%;color:gray;font-size:.9em;padding:10px;display:block} as-split{--as-gutter-background-color: transparent} as-split .as-split-gutter{background-color:transparent} as-split .as-split-gutter:hover{background-color:#ffffff80;border-radius:10px} as-split .as-split-gutter-icon{background-image:none!important}[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}[_ngcontent-%COMP%]::-webkit-scrollbar{width:7px;height:7px;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#0000004d;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#000}button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff;opacity:1;filter:brightness(1.2);text-shadow:0 0 2px rgba(255,255,255,.5)}button[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.8;filter:brightness(1.1)}.icon-loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-loading 2s infinite linear}@keyframes _ngcontent-%COMP%_icon-loading{0%{transform:rotate(0)}to{transform:rotate(359deg)}}"]});};var e9=[{path:"dashboard",component:nv,canActivate:[kP,Ju],children:[{path:"",component:hC},{path:"askarchitect",component:zs},{path:"compliances",component:WC},{path:"compliance/:id",component:HC},{path:"compliance/:complianceId/item/:itemId",component:Qm},{path:"compliance/:complianceId/item",component:Qm},{path:"components",component:YC},{path:"component",component:y0},{path:"component/:id",component:y0},{path:"contexts",component:ev},{path:"context",component:S0},{path:"context/:id",component:S0},{path:"portfolios",component:dv},{path:"portfolio",component:O0},{path:"portfolio/:id",component:O0},{path:"portfolio/:portfolioId/compliance/:complianceId/project/:projectId",component:FC},{path:"gapanalysis/:id",component:_v},{path:"projects",component:E0},{path:"project/new",component:E0},{path:"project/journey",component:zx},{path:"project",component:R0},{path:"project/:id",component:R0},{path:"project/:id/journey",component:zx},{path:"project/:pid/businessprocesses",component:d0},{path:"project/:pid/businessprocess",component:Gf},{path:"project/:pid/businessprocess/:bpid",component:g_},{path:"project/:pid/businessprocess/:bpid/designer/subprocess/:spid",component:g_},{path:"project/:pid/businessprocess/:bpid/designer/subprocess/:spid/task/:taskid",component:g_},{path:"project/:pid/businessprocess/:bpid/subprocesses",component:Zm},{path:"project/:pid/businessprocess/:bpid/subprocess",component:ou},{path:"project/:pid/businessprocess/:bpid/subprocess/:id",component:ou},{path:"project/:pid/businessprocess/:bpid/subprocesses/:spid/processtasks",component:tu},{path:"project/:pid/businessprocess/:bpid/subprocess/:spid/processtask",component:nu},{path:"project/:pid/businessprocess/:bpid/subprocess/:spid/processtask/:id",component:nu},{path:"businessprocesses",component:d0},{path:"businessprocess",component:Gf},{path:"businessprocess/:id",component:Gf},{path:"businessprocess/:bpid/subprocesses",component:Zm},{path:"businessprocess/:bpid/subprocess",component:ou},{path:"businessprocess/:bpid/subprocess/:id",component:ou},{path:"businessprocess/:bpid/subprocesses/:spid/processtasks",component:tu},{path:"businessprocess/:bpid/subprocess/:spid/processtask",component:nu},{path:"businessprocess/:bpid/subprocess/:spid/processtask/:id",component:nu},{path:"roles",component:KC},{path:"role",component:P0},{path:"role/:id",component:P0},{path:"teams",component:ZC},{path:"team",component:w0},{path:"team/:id",component:w0}
1011,{path:"parameters",component:hI},{path:"parameter/:id",component:_I},{path:"parameter/:paramId/value/:valueId",component:gI},{path:"evaluation-scales",component:RP},{path:"evaluation-scale",component:Px},{path:"evaluation-scale/:id",component:Px},{path:"business-capability-models",component:yC},{path:"business-capability-model",component:p0},{path:"business-capability-model/:id",component:p0},{path:"ecosystems",component:_w},{path:"ecosystem",component:Fx},{path:"ecosystem/:id",component:Fx},{path:"business-process-frameworks",component:xw},{path:"business-process-framework",component:Bx},{path:"business-process-framework/:id",component:Bx},{path:"strategic-themes",loadComponent:()=>import("./chunk-KOOU6Q6W.js").then(n=>n.StrategicThemeListComponent)},{path:"organisation-journey",loadComponent:()=>import("./chunk-6BK4YXXZ.js").then(n=>n.OrganisationJourneyComponent)},{path:"organisation-journey/:id",loadComponent:()=>import("./chunk-6BK4YXXZ.js").then(n=>n.OrganisationJourneyComponent)},{path:"organisations/:id/journey",loadComponent:()=>import("./chunk-6BK4YXXZ.js").then(n=>n.OrganisationJourneyComponent)},{path:"organisation-setup/:id",loadComponent:()=>import("./chunk-IEYUIXZA.js").then(n=>n.OrganisationSetupComponent)},{path:"organisations/:id/setup",loadComponent:()=>import("./chunk-IEYUIXZA.js").then(n=>n.OrganisationSetupComponent)}]},{path:"",component:N0,canActivate:[Ju]},{path:"sign-in",component:ih,canActivate:[Ju]},{path:"test",component:N0,canActivate:[Ju]}];Hw();var i9=JE(n9());xI.register({"modules/table-better":i9.default},!0);var o9={providers:[{provide:mI,useValue:qm},vT({eventCoalescing:!0}),ZT(e9,QT({onViewTransitionCreated:({transition:n})=>{n.finished.finally(()=>{document.documentElement.classList.remove("nav-to-journey","nav-to-expert");});}})),TT(),ET(),MI(),OI(),HT(),nR(),LR(),{provide:ai,useFactory:n=>n.firestore,deps:[On]},{provide:Il,useFactory:n=>n.auth,deps:[On]},{provide:U1,useFactory:n=>n.storage,deps:[On]},IR({modules:{toolbar:[["bold","italic","underline","strike"],["blockquote","code-block"],[{list:"ordered"},{list:"bullet"}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{align:[]}],["link","image"],["clean"]],table:!1,"table-better":{language:"en_US",menus:["column","row","merge","table","cell","wrap","delete"],toolbarTable:!0}},theme:"snow",format:"html"})]};var bw=class n{constructor(t){this.firebase=t;}firebase;static ɵfac=function(e){return new(e||n)(le(On));};static ɵcmp=Te({type:n,selectors:[["app-root"]],decls:1,vars:0,consts:[[1,"mat-typography"]],template:function(e,i){e&1&&ee(0,"router-outlet",0);},dependencies:[m1],encapsulation:2});};function NCe(n){let t=n,e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return e===1&&i===0?1:5;}var a9=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",NCe];function ACe(n){let t=n,e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return e===1&&i===0?1:5;}var r9=["en-CA",[["am","pm"],["a.m.","p.m."]],void 0,[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],void 0,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["y-MM-dd","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}
1011, {0}",void 0,void 0,void 0],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"CAD","$","Canadian Dollar",{CAD:["$"],JPY:["JP\xA5","\xA5"],USD:["US$","$"]},"ltr",ACe];function DCe(n){let t=n,e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length,o=parseInt(n.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return e===0||e===1?1:o===0&&e!==0&&e%1e6===0&&i===0||!(o>=0&&o<=5)?4:5;}var s9=["fr-CA",[["a","p"],["a.m.","p.m."]],[["a.m.","p.m."]],[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juill.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],0,[6,0],["y-MM-dd","d MMM y","d MMMM y","EEEE d MMMM y"],["HH 'h' mm","HH 'h' mm 'min' ss 's'","HH 'h' mm 'min' ss 's' z","HH 'h' mm 'min' ss 's' zzzz"],["{1} {0}","{1}, {0}",void 0,void 0],[",","\xA0",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"CAD","$","dollar canadien",{AUD:["$\xA0AU","$"],BEF:["FB"],BYN:[void 0,"Br"],CAD:["$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FRF:["F"],GEL:[void 0,"GEL"],HKD:["$\xA0HK","$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ILS:[void 0,"\u20AA"],INR:[void 0,"\u20B9"],ITL:["\u20A4IT"],KRW:[void 0,"\u20A9"],LBP:[void 0,"\xA3L"],MTP:["\xA3MT"],MXN:[void 0,"$"],NZD:["$\xA0NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SGD:["$\xA0SG","$"],TOP:[void 0,"$T"],TWD:[void 0,"NT$"],USD:["$\xA0US","$"],VND:[void 0,"\u20AB"],XAF:[],XCD:[void 0,"$"],XOF:[],XPF:[]},"ltr",DCe];function jCe(n){let t=n,e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length,o=parseInt(n.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return e===0||e===1?1:o===0&&e!==0&&e%1e6===0&&i===0||!(o>=0&&o<=5)?4:5;}var l9=["fr",[["AM","PM"]],void 0,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd/MM/y","d MMM y","d MMMM y","EEEE d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1} {0}","{1}, {0}",void 0,void 0],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0\xA0%","#,##0.00\xA0\xA4","#E0"],"EUR","\u20AC","euro",{ARS:["$AR","$"],AUD:["$AU","$"],BEF:["FB"],BMD:["$BM","$"],BND:["$BN","$"],BYN:[void 0,"\u0440."],BZD:["$BZ","$"],CAD:["$CA","$"],CLP:["$CL","$"],CNY:[void 0,"\xA5"],COP:["$CO","$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FJD:["$FJ","$"],FKP:["\xA3FK","\xA3"],FRF:["F"],GBP:["\xA3GB","\xA3"],GIP:["\xA3GI","\xA3"],HKD:[void 0,"$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ITL:["\u20A4IT"],JPY:[void 0,"\xA5"],KMF:[void 0,"FC"],LBP:["\xA3LB","\xA3L"],MTP:["\xA3MT"],MXN:["$MX","$"],NAD:["$NA","$"],NIO:[void 0,"$C"],NZD:["$NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SBD:["$SB","$"],SGD:["$SG","$"],SRD:["$SR","$"],TOP:[void 0,"$T"],TTD:["$TT","$"],TWD:[void 0,"NT$"],USD:["$US","$"],UYU:["$UY","$"],WST:["$WS"],XCD:[void 0,"$"],XPF:["FCFP"],ZMW:[void 0,"Kw"]},"ltr",jCe];V_(a9,"en-US");V_(r9,"en-CA");V_(s9,"fr-CA");V_(l9,"fr");self.FIREBASE_APPCHECK_DEBUG_TOKEN=qm.production?!1:qm.appcheck.debugToken??!0;OT(bw,o9).catch(n=>console.error(n));/**i18n:10ac519643c979c452f5291a0f271118d0e36f1c1c3b21c5baa8a96441f7b4db*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.