spec-box-tms-sync 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-WKK6IBQU.js +436 -0
- package/package.json +1 -1
- package/dist/ui/main-RU6LWXOH.js +0 -116
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import{$ as Yn,$a as Le,$b as Oi,A as q0,Aa as jt,Ab as Q,Ac as fy,B as xt,Ba as _a,Bb as kt,Bc as hy,C as W0,Ca as ey,Cb as Qe,Cc as Ea,D as uo,Da as co,Db as lp,Dc as py,E as ap,Ea as At,Eb as bc,Ec as vy,F as $0,Fa as Jo,Fb as Cc,Fc as my,G as Gn,Ga as vc,Gb as ei,Gc as gy,H as xn,Ha as ty,Hb as Ci,Hc as yy,I as rr,Ia as es,Ib as Wt,J as dc,Ja as xa,Jb as pr,Jc as by,K as Ca,Ka as R,Kb as st,L as op,La as yr,Lb as Ze,M as wa,Ma as mc,Mb as rs,N as nn,Na as Ta,Nb as j,O as Zo,Oa as fo,Ob as Fr,P as fc,Pa as ho,Pb as xe,Q as Ht,Qa as qt,Qb as Xn,R as mt,Ra as Kn,Rb as sn,S as lr,Sa as qr,Sb as un,T as Eu,Ta as gc,Tb as ln,U as Nr,Ua as ry,Ub as _e,V as lo,Va as sp,Vb as Ii,W as G0,Wa as K,Wb as Ai,X as hr,Xa as Zn,Xb as oy,Y as Y0,Ya as te,Yb as Qn,Z as Ut,Za as up,Zb as Mu,_ as Xe,_a as iy,_b as wc,a as oc,aa as K0,ab as Ae,ac as sy,b as Du,ba as ee,bb as Me,bc as re,c as rp,ca as Xo,cb as ny,cc as nt,d as Ko,da as C,db as ay,dc as _c,e as It,ea as oi,eb as yc,ec as uy,f as tr,fa as hc,fb as Ve,fc as cp,g as xr,ga as Ui,gb as de,gc as qi,h as z0,ha as ji,hb as fe,hc as U,i as ip,ia as Nt,ib as on,ic as Wi,j as sc,ja as Ft,jb as gi,jc as wi,k as sr,ka as Z0,kb as dt,kc as Br,l as V0,la as si,lb as ft,lc as Sa,m as Jr,ma as Tt,mb as Z,mc as vr,n as je,na as Xt,nb as L,nc as Da,o as H0,oa as X0,ob as B,oc as xc,p as uc,pa as mi,pb as ye,pc as Tc,q as U0,qa as gr,qb as ui,qc as dp,r as Ie,ra as pc,rb as Tn,rc as ly,s as lc,sa as Q0,sb as ku,sc as Sc,t as ba,ta as ge,tb as yi,tc as is,u as np,ua as an,ub as bi,uc as Iu,v as cc,va as ot,vb as rt,vc as Dc,w as j0,wa as Qo,wb as Kt,wc as cy,x as ur,xa as jr,xb as Wr,xc as Sn,y as Mi,ya as Pe,yb as Ce,yc as Ec,z as nr,za as J0,zb as ts,zc as dy}from"./chunk-NYVIJIB3.js";import{a as ae,b as Ke,c as L0}from"./chunk-IFGU66OU.js";var ky=(()=>{class t{_renderer;_elementRef;onChange=r=>{};onTouched=()=>{};constructor(r,i){this._renderer=r,this._elementRef=i}setProperty(r,i){this._renderer.setProperty(this._elementRef.nativeElement,r,i)}registerOnTouched(r){this.onTouched=r}registerOnChange(r){this.onChange=r}setDisabledState(r){this.setProperty("disabled",r)}static \u0275fac=function(i){return new(i||t)(qt(Ta),qt(At))};static \u0275dir=te({type:t})}return t})(),nD=(()=>{class t extends ky{static \u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})();static \u0275dir=te({type:t,features:[Ae]})}return t})(),Rc=new ee("");var aD={provide:Rc,useExisting:Ut(()=>os),multi:!0};function oD(){let t=dp()?dp().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var sD=new ee(""),os=(()=>{class t extends ky{_compositionMode;_composing=!1;constructor(r,i,n){super(r,i),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!oD())}writeValue(r){let i=r??"";this.setProperty("value",i)}_handleInput(r){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(r)}_compositionStart(){this._composing=!0}_compositionEnd(r){this._composing=!1,this._compositionMode&&this.onChange(r)}static \u0275fac=function(i){return new(i||t)(qt(Ta),qt(At),qt(sD,8))};static \u0275dir=te({type:t,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(i,n){i&1&&Ce("input",function(o){return n._handleInput(o.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(o){return n._compositionEnd(o.target.value)})},standalone:!1,features:[_e([aD]),Ae]})}return t})();function yp(t){return t==null||bp(t)===0}function bp(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Pc=new ee(""),uD=new ee(""),lD=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[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])?)*$/,fp=class{static min(e){return cD(e)}static max(e){return dD(e)}static required(e){return My(e)}static requiredTrue(e){return fD(e)}static email(e){return hD(e)}static minLength(e){return pD(e)}static maxLength(e){return vD(e)}static pattern(e){return mD(e)}static nullValidator(e){return Mc()}static compose(e){return Ny(e)}static composeAsync(e){return By(e)}};function cD(t){return e=>{if(e.value==null||t==null)return null;let r=parseFloat(e.value);return!isNaN(r)&&r<t?{min:{min:t,actual:e.value}}:null}}function dD(t){return e=>{if(e.value==null||t==null)return null;let r=parseFloat(e.value);return!isNaN(r)&&r>t?{max:{max:t,actual:e.value}}:null}}function My(t){return yp(t.value)?{required:!0}:null}function fD(t){return t.value===!0?null:{required:!0}}function hD(t){return yp(t.value)||lD.test(t.value)?null:{email:!0}}function pD(t){return e=>{let r=e.value?.length??bp(e.value);return r===null||r===0?null:r<t?{minlength:{requiredLength:t,actualLength:r}}:null}}function vD(t){return e=>{let r=e.value?.length??bp(e.value);return r!==null&&r>t?{maxlength:{requiredLength:t,actualLength:r}}:null}}function mD(t){if(!t)return Mc;let e,r;return typeof t=="string"?(r="",t.charAt(0)!=="^"&&(r+="^"),r+=t,t.charAt(t.length-1)!=="$"&&(r+="$"),e=new RegExp(r)):(r=t.toString(),e=t),i=>{if(yp(i.value))return null;let n=i.value;return e.test(n)?null:{pattern:{requiredPattern:r,actualValue:n}}}}function Mc(t){return null}function Iy(t){return t!=null}function Ay(t){return gc(t)?Jr(t):t}function Oy(t){let e={};return t.forEach(r=>{e=r!=null?ae(ae({},e),r):e}),Object.keys(e).length===0?null:e}function Ry(t,e){return e.map(r=>r(t))}function gD(t){return!t.validate}function Py(t){return t.map(e=>gD(e)?e:r=>e.validate(r))}function Ny(t){if(!t)return null;let e=t.filter(Iy);return e.length==0?null:function(r){return Oy(Ry(r,e))}}function Fy(t){return t!=null?Ny(Py(t)):null}function By(t){if(!t)return null;let e=t.filter(Iy);return e.length==0?null:function(r){let i=Ry(r,e).map(Ay);return j0(i).pipe(Ie(Oy))}}function Ly(t){return t!=null?By(Py(t)):null}function Cy(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function yD(t){return t._rawValidators}function bD(t){return t._rawAsyncValidators}function hp(t){return t?Array.isArray(t)?t:[t]:[]}function Ic(t,e){return Array.isArray(t)?t.includes(e):t===e}function wy(t,e){let r=hp(e);return hp(t).forEach(n=>{Ic(r,n)||r.push(n)}),r}function _y(t,e){return hp(e).filter(r=>!Ic(t,r))}var Ac=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Fy(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Ly(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,r){return this.control?this.control.hasError(e,r):!1}getError(e,r){return this.control?this.control.getError(e,r):null}},pp=class extends Ac{name;get formDirective(){return null}get path(){return null}};var Au="VALID",kc="INVALID",ns="PENDING",Ou="DISABLED",po=class{},Oc=class extends po{value;source;constructor(e,r){super(),this.value=e,this.source=r}},Ru=class extends po{pristine;source;constructor(e,r){super(),this.pristine=e,this.source=r}},Pu=class extends po{touched;source;constructor(e,r){super(),this.touched=e,this.source=r}},as=class extends po{status;source;constructor(e,r){super(),this.status=e,this.source=r}};var Nu=class extends po{source;constructor(e){super(),this.source=e}};function CD(t){return(Nc(t)?t.validators:t)||null}function wD(t){return Array.isArray(t)?Fy(t):t||null}function _D(t,e){return(Nc(e)?e.asyncValidators:t)||null}function xD(t){return Array.isArray(t)?Ly(t):t||null}function Nc(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}var vp=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=ge(!1);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,r){this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e,this._updateHasRequiredValidator()}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return nt(this.statusReactive)}set status(e){nt(()=>this.statusReactive.set(e))}_status=re(()=>this.statusReactive());statusReactive=ge(void 0);get valid(){return this.status===Au}get invalid(){return this.status===kc}get pending(){return this.status===ns}get disabled(){return this.status===Ou}get enabled(){return this.status!==Ou}errors;get pristine(){return nt(this.pristineReactive)}set pristine(e){nt(()=>this.pristineReactive.set(e))}_pristine=re(()=>this.pristineReactive());pristineReactive=ge(!0);get dirty(){return!this.pristine}get touched(){return nt(this.touchedReactive)}set touched(e){nt(()=>this.touchedReactive.set(e))}_touched=re(()=>this.touchedReactive());touchedReactive=ge(!1);get untouched(){return!this.touched}_events=new tr;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(wy(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(wy(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(_y(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(_y(e,this._rawAsyncValidators))}hasValidator(e){return Ic(this._rawValidators,e)}hasAsyncValidator(e){return Ic(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let r=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(Ke(ae({},e),{sourceControl:i})),r&&e.emitEvent!==!1&&this._events.next(new Pu(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(r=>r.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(r=>r.markAllAsTouched(e))}markAsUntouched(e={}){let r=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),e.onlySelf||this._parent?._updateTouched(e,i),r&&e.emitEvent!==!1&&this._events.next(new Pu(!1,i))}markAsDirty(e={}){let r=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(Ke(ae({},e),{sourceControl:i})),r&&e.emitEvent!==!1&&this._events.next(new Ru(!1,i))}markAsPristine(e={}){let r=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(n=>{n.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,i),r&&e.emitEvent!==!1&&this._events.next(new Ru(!0,i))}markAsPending(e={}){this.status=ns;let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new as(this.status,r)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(Ke(ae({},e),{sourceControl:r}))}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Ou,this.errors=null,this._forEachChild(n=>{n.disable(Ke(ae({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Oc(this.value,i)),this._events.next(new as(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Ke(ae({},e),{skipPristineCheck:r}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Au,this._forEachChild(i=>{i.enable(Ke(ae({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Ke(ae({},e),{skipPristineCheck:r}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,r){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},r),this._parent?._updateTouched({},r))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Au||this.status===ns)&&this._runAsyncValidator(i,e.emitEvent)}let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Oc(this.value,r)),this._events.next(new as(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(Ke(ae({},e),{sourceControl:r}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ou:Au}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,r){if(this.asyncValidator){this.status=ns,this._hasOwnPendingAsyncValidator={emitEvent:r!==!1,shouldHaveEmitted:e!==!1};let i=Ay(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(n=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(n,{emitEvent:r,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(r.emitEvent!==!1,this,r.shouldHaveEmitted)}get(e){let r=e;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((i,n)=>i&&i._find(n),this)}getError(e,r){let i=r?this.get(r):this;return i?.errors?i.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,r,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new as(this.status,r)),this._parent&&this._parent._updateControlsErrors(e,r,i)}_initObservables(){this.valueChanges=new mi,this.statusChanges=new mi}_calculateStatus(){return this._allControlsDisabled()?Ou:this.errors?kc:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ns)?ns:this._anyControlsHaveStatus(kc)?kc:Au}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,r){let i=!this._anyControlsDirty(),n=this.pristine!==i;this.pristine=i,e.onlySelf||this._parent?._updatePristine(e,r),n&&this._events.next(new Ru(this.pristine,r))}_updateTouched(e={},r){this.touched=this._anyControlsTouched(),this._events.next(new Pu(this.touched,r)),e.onlySelf||this._parent?._updateTouched(e,r)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Nc(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=wD(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=xD(this._rawAsyncValidators)}_updateHasRequiredValidator(){nt(()=>this._hasRequired.set(this.hasValidator(fp.required)))}};function TD(t){return t.tagName==="INPUT"||t.tagName==="SELECT"||t.tagName==="TEXTAREA"}function SD(t,e,r,i){switch(r){case"name":t.setAttribute(e,r,i);break;case"disabled":case"readonly":case"required":i?t.setAttribute(e,r,""):t.removeAttribute(e,r);break;case"max":case"min":case"minLength":case"maxLength":i!==void 0?t.setAttribute(e,r,i.toString()):t.removeAttribute(e,r);break}}var mp=class{kind;context;control;message;constructor({kind:e,context:r,control:i}){this.kind=e,this.context=r,this.control=i}};var DD=(()=>{class t{_validator=Mc;_onChange;_enabled;ngOnChanges(r){if(this.inputName in r){let i=this.normalizeInput(r[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):Mc,this._onChange?.()}}validate(r){return this._validator(r)}registerOnValidatorChange(r){this._onChange=r}enabled(r){return r!=null}static \u0275fac=function(i){return new(i||t)};static \u0275dir=te({type:t,features:[jr]})}return t})();var ED={provide:Pc,useExisting:Ut(()=>zy),multi:!0};var zy=(()=>{class t extends DD{required;inputName="required";normalizeInput=Da;createValidator=r=>My;enabled(r){return r}static \u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})();static \u0275dir=te({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,n){i&2&&Ve("required",n._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[_e([ED]),Ae]})}return t})();var kD=new ee(""),Vy=new ee("",{factory:()=>Cp}),Cp="always";function MD(t,e){return[...e.path,t]}function xy(t,e,r=Cp){AD(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),OD(t,e),PD(t,e),RD(t,e),ID(t,e)}function Ty(t,e){t.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function ID(t,e){if(e.valueAccessor.setDisabledState){let r=i=>{e.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(r),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(r)})}}function AD(t,e){let r=yD(t);e.validator!==null?t.setValidators(Cy(r,e.validator)):typeof r=="function"&&t.setValidators([r]);let i=bD(t);e.asyncValidator!==null?t.setAsyncValidators(Cy(i,e.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let n=()=>t.updateValueAndValidity();Ty(e._rawValidators,n),Ty(e._rawAsyncValidators,n)}function OD(t,e){e.valueAccessor.registerOnChange(r=>{t._pendingValue=r,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&Hy(t,e)})}function RD(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&Hy(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function Hy(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function PD(t,e){let r=(i,n)=>{e.valueAccessor.writeValue(i),n&&e.viewToModelUpdate(i)};t.registerOnChange(r),e._registerOnDestroy(()=>{t._unregisterOnChange(r)})}function ND(t,e){if(!t.hasOwnProperty("model"))return!1;let r=t.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function FD(t){return Object.getPrototypeOf(t.constructor)===nD}function BD(t,e){if(!e)return null;Array.isArray(e);let r,i,n;return e.forEach(a=>{a.constructor===os?r=a:FD(a)?i=a:n=a}),n||i||r||null}var LD={provide:kD,useFactory:()=>{let t=C($r,{self:!0});return{setParseErrors:e=>{t.setParseErrorSource(e)},set onReset(e){t.onReset=e}}}},$r=class extends Ac{_parent=null;name=null;valueAccessor=null;isCustomControlBased=!1;userOnReset;resetSubscription;set onReset(e){this.userOnReset=e,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(r=>{r instanceof Nu&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=BD(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(e,r,i){super(),this.injector=e,this.renderer=r,this.rawValueAccessors=i,this.injector?.get(Xt)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe()})}setupCustomControl(){this.subscription?.unsubscribe();let e=this.injector?.get(vr);if(!this.control||!e)return;let r=e.markForCheck.bind(e);this.subscription=new Du,this.subscription.add(this.control.valueChanges.subscribe(r)),this.subscription.add(this.control.statusChanges.subscribe(r)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(i=>{i instanceof Nu&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator)}ngControlCreate(e){!e.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!e.customControl||(this.isCustomControlBased=!0,e.listenToCustomControlModel(n=>{this.control?.setValue(n,{emitModelToViewChange:!1}),this.control?.markAsDirty(),this.viewToModelUpdate(n)}),e.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched()}),this.customControlBindings={},this.isNativeFormElement=TD(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(n=>n instanceof zy))}ngControlUpdate(e,r){if(!this.isCustomControlBased)return;let i=this.control,n=this.customControlBindings;Object.is(n.value,i.value)||(n.value=i.value,e.setCustomControlModelInput(i.value)),this.bindControlProperty(e,n,"touched",i.touched),this.bindControlProperty(e,n,"dirty",i.dirty),this.bindControlProperty(e,n,"valid",i.valid),this.bindControlProperty(e,n,"invalid",i.invalid),this.bindControlProperty(e,n,"pending",i.pending),this.bindControlProperty(e,n,"disabled",i.disabled),this.shouldBindRequired&&this.bindControlProperty(e,n,"required",this.isRequired);let a=i.errors;if(n.errors!==a){n.errors=a;let o=this._convertErrors(a);e.setInputOnDirectives("errors",o)}}get isRequired(){return(this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??!1}get shouldBindRequired(){return!0}bindControlProperty(e,r,i,n){if(r[i]===n)return;r[i]=n;let a=e.setInputOnDirectives(i,n);this.isNativeFormElement&&!a&&(i==="disabled"||i==="required")&&this.renderer&&SD(this.renderer,e.nativeElement,i,n)}_convertErrors(e){if(e===null)return[];let r=this.control;return Object.entries(e).map(([i,n])=>new mp({context:n,kind:i,control:r}))}setParseErrorSource(e){if(e===void 0)return;let r=null,i=re(()=>{let n=e();return n.length===0?null:n.reduce((a,o)=>(a[o.kind]=o,a),{})});this.parseErrorsValidator=(()=>r).bind(this),ot(()=>{r=i(),this.control?.updateValueAndValidity({emitEvent:!1})},{injector:this.injector})}removeParseErrorsValidator(e){this.parseErrorsValidator&&(e?.removeValidators(this.parseErrorsValidator),e?.updateValueAndValidity({emitEvent:!1}))}},gp=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var ss=(()=>{class t extends gp{constructor(r){super(r)}static \u0275fac=function(i){return new(i||t)(qt($r,2))};static \u0275dir=te({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,n){i&2&&Ze("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},standalone:!1,features:[Ae]})}return t})();function Sy(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}function Dy(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var zD=class extends vp{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,r,i){super(CD(r),_D(i,r)),this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Nc(r)&&(r.nonNullable||r.initialValueIsDefault)&&(Dy(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){nt(()=>{this.value=this._pendingValue=e,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)})}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),r.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,r?.emitEvent!==!1&&this._events.next(new Nu(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Sy(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Sy(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){Dy(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var VD={provide:$r,useExisting:Ut(()=>cn)},Ey=Promise.resolve(),cn=(()=>{class t extends $r{_changeDetectorRef;callSetDisabledState;control=new zD;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new mi;constructor(r,i,n,a,o,s,u,l){super(u,l,a),this._changeDetectorRef=o,this.callSetDisabledState=s,this._parent=r,this._setValidators(i),this._setAsyncValidators(n)}ngOnChanges(r){if(this._checkForErrors(),!this._registered||"name"in r){if(this._registered&&(this._checkName(),this.formDirective)){let i=r.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in r&&this._updateDisabled(r),ND(r,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}\u0275ngControlCreate(r){super.ngControlCreate(r)}\u0275ngControlUpdate(r){super.ngControlUpdate(r,!1)}get shouldBindRequired(){return!1}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(r){this.viewModel=r,this.update.emit(r)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,xy(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:!1})}_setupWithForm(r){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,xy(this.control,this,r))}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(r){Ey.then(()=>{this.control.setValue(r,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(r){let i=r.isDisabled.currentValue,n=i!==0&&Da(i);Ey.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(r){return this._parent?MD(r,this._parent):[r]}static \u0275fac=function(i){return new(i||t)(qt(pp,9),qt(Pc,10),qt(uD,10),qt(Rc,10),qt(vr,8),qt(Vy,8),qt(si,8),qt(Ta,8))};static \u0275dir=te({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[_e([VD,LD]),Ae,jr,iy(null)]})}return t})();var HD=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Zn({type:t});static \u0275inj=Yn({})}return t})();var ka=(()=>{class t{static withConfig(r){return{ngModule:t,providers:[{provide:Vy,useValue:r.callSetDisabledState??Cp}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=Zn({type:t});static \u0275inj=Yn({imports:[HD]})}return t})();function Ma(t,e,r){let i=jD(e??t,t);return UD(r??i,i)}function UD(t,...e){return e.reduce((r,i)=>r<i?r:i,t)}function jD(t,...e){return e.reduce((r,i)=>r>i?r:i,t)}function _p(t,e){return t.slice(0,Math.max(e,0)).concat(t.slice(Math.max(e+1,0)))}function Uy(t,e,r){let i=r?t.findIndex(n=>r(n,e)):t.indexOf(e);return i===-1?[...t,e]:_p(t,i)}function Dn(t){return typeof t=="string"}function jy(t,e){return t===e?0:Dn(t)&&Dn(e)?t.localeCompare(e,void 0,{numeric:!0}):t>e?1:-1}var qD=0;function us(){return`tui_${qD++}${Date.now().toString(36)}`}function dn(t){return t!=null}function br(t){return`${t}px`}function vo(t,e){"set"in t?t.set(e):"applyValueToInputSignal"in t[oc]&&t[oc].applyValueToInputSignal(t[oc],e)}var WD=new ee("",{factory:()=>{let t=new Map;return C(Xt).onDestroy(()=>t.forEach(e=>e.destroy())),t}});function $t(t){let e=C(WD),r=C(Ui);e.has(t)||e.set(t,xc(t,{environmentInjector:r}))}function qy(t,e,r){return{provide:t,useFactory:()=>ae(ae({},C(t,{optional:!0,skipSelf:!0})||r),C(e,{optional:!0})||(typeof e=="function"?e():e))}}function ut(t){let e=new ee("",{factory:()=>t});return[e,r=>qy(e,r,t)]}function Ri(t,e,r,i={self:!0}){let n=Qo(r)?r:ge(r),a=C(t,i),o=a?.[`${e.toString()}Change`];if(!a)return n;let s;return ot(()=>{let u=n();s!==u&&(Qo(a[e])?vo(a[e],u):a[e]=u,a.ngOnChanges?.({}),o?.emit?.(u),s=u)}),n}function Ct(t,e,r=!1){return{provide:t,useExisting:e,multi:r}}function ls(t){return t instanceof At?t.nativeElement:t}function cs(t){return Array.isArray(t)?t:[t]}function Bt(t){t||(t=C(Xt));let e=new It(r=>{if(t.destroyed){r.next();return}return t.onDestroy(r.next.bind(r))});return r=>r.pipe(lr(e))}var xp=class{source;destroyed=!1;destroyRef=C(Xt);constructor(e){this.source=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}subscribe(e){if(this.destroyed)throw new hr(953,!1);let r=this.source.pipe(Bt(this.destroyRef)).subscribe({next:i=>e(i)});return{unsubscribe:()=>r.unsubscribe()}}};function En(t,e){return new xp(t)}function ds(t,e){let r=e?.injector??C(si),i=new z0(1),n=ot(()=>{let a;try{a=t()}catch(o){nt(()=>i.error(o));return}nt(()=>i.next(a))},{injector:r,manualCleanup:!0});return r.get(Xt).onDestroy(()=>{n.destroy(),i.complete()}),i.asObservable()}function $i(t,e){let i=!e?.manualCleanup?e?.injector?.get(Xt)??C(Xt):null,n=YD(e?.equal),a;e?.requireSync?a=ge({kind:0},{equal:n}):a=ge({kind:1,value:e?.initialValue},{equal:n});let o,s=t.subscribe({next:u=>a.set({kind:1,value:u}),error:u=>{a.set({kind:2,error:u}),o?.()},complete:()=>{o?.()}});if(e?.requireSync&&a().kind===0)throw new hr(601,!1);return o=i?.onDestroy(s.unsubscribe.bind(s)),re(()=>{let u=a();switch(u.kind){case 1:return u.value;case 2:throw u.error;case 0:throw new hr(601,!1)}},{equal:e?.equal})}function YD(t=Object.is){return(e,r)=>e.kind===1&&r.kind===1&&t(e.value,r.value)}var Fc=class{},Jn=class extends Fc{},kn=class extends Fc{};function Wy(t,e,r){return{provide:t,deps:[[new co,new _a,t],r],useFactory:fs(e)}}function fs(t){return(e,r)=>e?.find?.(i=>i!==r&&i.type===t)||Object.create(r,{type:{value:t}})}function Lc(t,e){return Wy(Jn,t,e)}function zc(t,e){return Wy(kn,t,e)}function Tp(t){return Ct(kn,t,!0)}var Bc=class{};function Vc(t){return Ct(Bc,t,!0)}var Ia=class extends It{};function hs(t){return Ct(Ia,t,!0)}var Hc=(()=>{class t{constructor(){this.destroyRef=C(Xt),this.drivers=cs(C(Ia,{self:!0,optional:!0})||[]),this.vehicles=cs(C(Bc,{self:!0,optional:!0})||[])}ngAfterViewInit(){let r=this.vehicles.find(({type:i})=>i===this.type);nr(...this.drivers.filter(({type:i})=>i===this.type)).pipe(rr(),Bt(this.destroyRef)).subscribe(i=>{r?.toggle(i)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t})}}return t})();var $y={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},Fu=()=>{},ea=Ke(ae({},$y),{toJSON:()=>$y}),ta=()=>!1,Bu=()=>!0;function KD(t,e){return Array.isArray(t)&&Array.isArray(e)&&!t.length&&!e.length}var Uc=(t,e,r=String)=>r(t).toLowerCase().includes(e.toLowerCase()),Gy=(t,e,r=String)=>r(t).toLowerCase()===e.toLowerCase(),Yy=(t,e)=>t===e||KD(t,e);var Ky={acceptNode(t){return"ownerSVGElement"in t?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},Sp="\xA0";var Zy="5.16.0";var Cr=new ee("",{factory:()=>{let{defaultView:t}=C(Tt);if(!t)throw new Error("Window is not available");return t}}),mo=new ee("",{factory:()=>{let{requestAnimationFrame:t,cancelAnimationFrame:e}=C(Cr);return new It(i=>{let n=Number.NaN,a=o=>{i.next(o),n=t(a)};return n=t(a),()=>{e(n)}}).pipe(nn())}});var Xy=new ee("",{factory:()=>C(Cr).localStorage});var Dp=new ee("",{factory:()=>C(Cr).navigator});var Qy=new ee("",{factory:()=>C(Dp).userAgent});function ZD(t){return t.matches("input")}function XD(t){return t.matches("textarea")}function Jy(t){return ZD(t)||XD(t)}function fn(t){return!!t&&"nodeType"in t&&t.nodeType===Node.ELEMENT_NODE}function go(t){let e=t?.ownerDocument.defaultView;return!!t&&!!e&&t instanceof e.HTMLElement}function yo(t){return t.composedPath()[0]}function jc(t){return"getRootNode"in t&&t.isConnected?t.getRootNode():t.ownerDocument}function qc(t){if(!t.getBoundingClientRect)return null;let{left:e,right:r,top:i,bottom:n,width:a,height:o}=t.getBoundingClientRect();if(a===0&&o===0)return null;let s=jc(t),u=Math.round(e+a/2),l=Math.round(i+o/2),c=[s.elementFromPoint(u,Math.round(i)+2),s.elementFromPoint(u,Math.round(n)-2),s.elementFromPoint(Math.round(e)+2,l),s.elementFromPoint(Math.round(r)-2,l)].filter(dn);if(!c.length)return[];let d=c.filter(f=>!t.contains(f)&&!f.contains(t));return d.length===4?d:null}function eb(t,e){let{offsetTop:r,offsetLeft:i,offsetParent:n}=e;for(;go(n)&&n!==t;)r+=n.offsetTop,i+=n.offsetLeft,n=n.offsetParent;return{offsetTop:r,offsetLeft:i}}function Be(){return C(At).nativeElement}function kp(t){return Jy(t)&&!t.readOnly&&t.inputMode!=="none"||!!t.isContentEditable}function Mp(t=0,e=0){let r={x:t,y:e,left:t,right:t,top:e,bottom:e,width:0,height:0};return Ke(ae({},r),{toJSON:()=>r})}function Wc(t,e=C(oi)){let r=e.get(Cr);!r.tuiInputPatched&&Sn(e.get(an))&&(r.tuiInputPatched=!0,Ep(r.HTMLInputElement.prototype),Ep(r.HTMLTextAreaElement.prototype),Ep(r.HTMLSelectElement.prototype));let i=Qo(t)?void 0:ls(t),n=()=>{},a={injector:e},o=ge(i?.value||""),s=u=>{let l=()=>nt(()=>o.set(u.value));return u.addEventListener("input",l,{capture:!0}),u.addEventListener("tui-input",l,{capture:!0}),()=>{u.removeEventListener("input",l,{capture:!0}),u.removeEventListener("tui-input",l,{capture:!0})}};return e.get(Xt).onDestroy(()=>n()),Qo(t)?ot(()=>{i=ls(t()),n(),i&&!i.matches("select[multiple]")&&(o.set(i.value),n=s(i))},a):i&&!i.matches("select[multiple]")&&(n=s(i)),ot(()=>{let u=o();if(!i?.matches("select[multiple]"))if(i?.matches(":focus")&&"selectionStart"in i){let{selectionStart:l,selectionEnd:c}=i;i.value=u;try{i.setSelectionRange(l,c)}catch{}}else i&&(i.value=u)},a),o}function Ep(t){let{set:e}=Object.getOwnPropertyDescriptor(t,"value");Object.defineProperty(t,"value",{set(r){let i=this.value,n=new CustomEvent("tui-input",{detail:r,bubbles:!0});e.call(this,r),i!==r&&this.dispatchEvent(n)}})}function Ip(t){return $i(ur(t,"resize").pipe(Ht(null),Ie(()=>{let e=Math.max(t.document.documentElement.clientWidth||0,t.innerWidth||0,t.visualViewport?.width||0),r=Math.max(t.document.documentElement.clientHeight||0,t.innerHeight||0,t.visualViewport?.height||0),i={width:e,height:r,top:0,left:0,right:e,bottom:r,x:0,y:0};return Ke(ae({},i),{toJSON:()=>JSON.stringify(i)})})),{requireSync:!0})}var tb=(()=>{class t{constructor(){let r=Be();xa(()=>requestAnimationFrame(()=>r.style.setProperty("transition","")))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiTransitioned",""]],hostAttrs:[2,"transition","none"]})}}return t})();var JD={appearance:""},rb=new ee("",{factory:()=>JD});function Mn(t){return Ct(rb,t)}var eE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-appearance-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiAppearance]:where(*[data-tui-version="5.16.0"]){transition-property:all;transition-duration:calc(var(--tui-duration) / 2);transition-timing-function:var(--tui-curve-productive-standard);position:relative;-webkit-appearance:none;appearance:none;outline:.125rem solid transparent;outline-offset:-.125rem;transition-property:color,background-color,opacity,box-shadow,border-color,border-radius}[tuiAppearance]:where(*[data-tui-version="5.16.0"]):before,[tuiAppearance]:where(*[data-tui-version="5.16.0"]):after{transition-property:none;transition-duration:inherit;transition-timing-function:ease-in-out}[tuiAppearance]:where(*[data-tui-version="5.16.0"]):focus-visible:not([data-focus=false]){outline-color:var(--tui-border-focus)}[tuiAppearance]:where(*[data-tui-version="5.16.0"])[data-focus=true]{outline-color:var(--tui-border-focus)}[tuiAppearance]:where(*[data-tui-version="5.16.0"]):disabled:not([data-state]),[tuiAppearance]:where(*[data-tui-version="5.16.0"])[data-state=disabled]{cursor:initial;opacity:var(--tui-disabled-opacity)}[tuiAppearance]:where(*[data-tui-version="5.16.0"]):disabled:not([data-state]):before,[tuiAppearance]:where(*[data-tui-version="5.16.0"])[data-state=disabled]:before,[tuiAppearance]:where(*[data-tui-version="5.16.0"]):disabled:not([data-state]):after,[tuiAppearance]:where(*[data-tui-version="5.16.0"])[data-state=disabled]:after{cursor:initial}
|
|
2
|
+
`],encapsulation:2})}}return t})(),hn=(()=>{class t{constructor(){this.nothing=$t(eE),this.modes=re((r=this.tuiAppearanceMode())=>!r||Dn(r)?r:r.join(" ")),this.tuiAppearance=U(C(rb).appearance),this.tuiAppearanceState=U(null),this.tuiAppearanceFocus=U(null),this.tuiAppearanceMode=U(null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiAppearance",""]],hostAttrs:["data-tui-version","5.16.0","tuiAppearance",""],hostVars:4,hostBindings:function(i,n){i&2&&Ve("data-appearance",n.tuiAppearance())("data-focus",n.tuiAppearanceFocus())("data-mode",n.modes())("data-state",n.tuiAppearanceState())},inputs:{tuiAppearance:[1,"tuiAppearance"],tuiAppearanceState:[1,"tuiAppearanceState"],tuiAppearanceFocus:[1,"tuiAppearanceFocus"],tuiAppearanceMode:[1,"tuiAppearanceMode"]},features:[Le([tb])]})}}return t})();function ps(t,e={}){return Ri(hn,"tuiAppearance",t,e)}function ib(t,e={}){return Ri(hn,"tuiAppearanceState",t,e)}function nb(t,e={}){return Ri(hn,"tuiAppearanceFocus",t,e)}function ab(t,e={}){return Ri(hn,"tuiAppearanceMode",t,e)}var In=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,features:[Le([{directive:hn,inputs:["tuiAppearance","appearance","tuiAppearanceState","tuiAppearanceState","tuiAppearanceFocus","tuiAppearanceFocus","tuiAppearanceMode","tuiAppearanceMode"]}])]})}}return t})();var tE={cardNumber:["Number","Card number"],cardExpiry:["Expires","Valid through"]},rE={demoTexts:["Dark mode","Background","Value"],preview:"Preview",menuText:"Menu",searchText:"Search",seeAlsoText:"See also",tocText:"On this page",sourceCodeText:"Source code"},iE={colorSelectorModeNames:["Solid color","Gradient"],toolbarTools:{undo:"Undo",redo:"Redo",font:"Font",fontStyle:"Font style",fontSize:"Font size",bold:"Bold",italic:"Italic",underline:"Underline",strikeThrough:"Strike through",justify:"Justify",justifyLeft:"Justify left",justifyCenter:"Justify center",justifyRight:"Justify right",justifyFull:"Justify full",list:"List",indent:"Indent",outdent:"Outdent",unorderedList:"Unordered list",orderedList:"Ordered list",quote:"Quote",foreColor:"Color",backColor:"Background color",hiliteColor:"Highlight color",clear:"Clear",link:"Link",attach:"Attach file",tex:"Insert TeX",code:"Code",image:"Insert image",insertHorizontalRule:"Insert horizontal rule",superscript:"Superscript",subscript:"Subscript",insertTable:"Insert table",insertGroup:"Insert group",hiliteGroup:"Hilite group",removeGroup:"Remove group",insertAnchor:"Insert anchor",mergeCells:"Merge cells",splitCells:"Split cells",rowsColumnsManaging:"Managing rows and columns",cellColor:"Cell color",setDetails:"Details",removeDetails:"Remove details"},editorEditLink:{urlExample:"example.com",anchorExample:"anchor"},editorTableCommands:[["Insert column before","Insert column after"],["Insert row before","Insert row after"],["Delete column","Delete row"]],editorCodeOptions:["Code in the text","Code in block"],editorFontOptions:{small:"Small",large:"Large",normal:"Normal",title:"Title",subtitle:"Subtitle"}},nE={showHideText:"Show/Hide",paginationTexts:{pages:"Pages",linesPerPage:"Lines per page",of:"of"}},aE={AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua & Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AT:"Austria",AU:"Australia",AW:"Aruba",AZ:"Azerbaijan",BA:"Bosnia & Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"St. Barth\xE9lemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"Caribbean Netherlands",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"Congo - Kinshasa",CF:"Central African Republic",CG:"Congo - Brazzaville",CH:"Switzerland",CI:"C\xF4te d\u2019Ivoire",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Cura\xE7ao",CY:"Cyprus",CZ:"Czechia",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KM:"Comoros",KN:"St. Kitts & Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"St. Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"St. Martin",MG:"Madagascar",MK:"North Macedonia",ML:"Mali",MM:"Myanmar (Burma)",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"R\xE9union",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"St. Helena",SI:"Slovenia",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",ST:"S\xE3o Tom\xE9 & Pr\xEDncipe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Eswatini",TC:"Turks & Caicos Islands",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"T\xFCrkiye",TT:"Trinidad & Tobago",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VC:"St. Vincent & Grenadines",VE:"Venezuela",VG:"British Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",AC:"Ascension Island",AS:"American Samoa",AX:"\xC5land Islands",CC:"Cocos (Keeling) Islands",CK:"Cook Islands",CX:"Christmas Island",EH:"Western Sahara",FO:"Faroe Islands",GG:"Guernsey",GU:"Guam",IM:"Isle of Man",JE:"Jersey",IO:"British Indian Ocean Territory",KI:"Kiribati",MH:"Marshall Islands",MP:"Northern Mariana Islands",NF:"Norfolk Island",NR:"Nauru",NU:"Niue",PM:"Saint Pierre and Miquelon",PR:"Puerto Rico",PS:"Palestine",SJ:"Svalbard and Jan Mayen",SS:"South Sudan",TA:"Tristan da Cunha",TK:"Tokelau",TV:"Tuvalu",VA:"Holy See",VI:"Virgin Islands",WF:"Wallis and Futuna"},oE={months:["January","February","March","April","May","June","July","August","September","October","November","December"],close:"Close",back:"Back",clear:"Clear",nothingFoundMessage:"Nothing found",defaultErrorMessage:"Value is invalid",spinTexts:["Previous","Next"],shortWeekDays:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],countries:aE},sE={cancel:"Cancel",done:"Done",more:"More",otherDate:"Other date...",showAll:"Show all",hide:"Hide",mobileCalendarTexts:["Choose day","Choose range","Choose days"],range:["from","to"],countTexts:["Plus","Minus"],time:{"MM:SS":"MM:SS","HH:MM":"HH:MM","HH:MM AA":"HH:MM AA","HH:MM:SS":"HH:MM:SS","HH:MM:SS AA":"HH:MM:SS AA","HH:MM:SS.MSS":"HH:MM:SS.MSS","HH:MM:SS.MSS AA":"HH:MM:SS.MSS AA","HH AA":"HH AA",HH:"HH","MM:SS.MSS":"MM:SS.MSS","SS.MSS":"SS.MSS"},dateTexts:{"dd/mm/yyyy":"DD/MM/YYYY","mm/dd/yyyy":"MM/DD/YYYY","yyyy/mm/dd":"YYYY/MM/DD"},digitalInformationUnits:["B","KiB","MiB"],passwordTexts:["Show password","Hide password"],copyTexts:["Copy","Copied"],shortCalendarMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],pagination:["Previous page","Next page"],fileTexts:{loadingError:"Upload failed",preview:"Preview",remove:"Remove"},inputFileTexts:{defaultLabelSingle:"or drop\xA0it\xA0here",defaultLabelMultiple:"or drop\xA0them\xA0here",defaultLinkSingle:"Choose a file",defaultLinkMultiple:"Choose files",maxSizeRejectionReason:"File is larger than",formatRejectionReason:"Wrong file type",drop:"Drop file here",dropMultiple:"Drop files here"},multiSelectTexts:{all:"Select all",none:"Select none"},confirm:{yes:"Yes",no:"No"},previewTexts:{rotate:"Rotate"},zoomTexts:{zoomOut:"Zoom out",zoomIn:"Zoom in",reset:"Reset"},phoneSearch:"Type country or code",dayRangePeriods:["For all the time","Today","Yesterday","Current week","Current month","Previous month"]},uE={inputSearch:{popular:"Popular",history:"Recent",placeholder:"Type query",hotkey:"to search",all:"All",empty:"Nothing found"}},ob=ae(ae(ae(ae(ae(ae(ae({name:"english"},oE),sE),nE),tE),iE),rE),uE);var sb=new ee("",{factory:()=>ob}),ub=new ee("",{factory:()=>ge(C(sb))});function yt(t){return(e=C(ub))=>re(()=>e()[t])}function lb(){return new It(t=>{let e,r=()=>{e=cE(),e.onclose=()=>r(),e.oncancel=i=>{i.preventDefault(),t.next()}};return r(),()=>e.destroy()})}function cE(){try{return new CloseWatcher}catch{return{destroy:()=>{}}}}function $c(t){return new It(e=>t?.valueChanges?.pipe(Ht(t.value)).subscribe(e))}function Gt(t,e,r={}){return ur(t,e,r)}function cb(){return Nr(t=>t.preventDefault())}function db(){return Nr(t=>t.stopPropagation())}function Gc(t,e=Boolean){return Ko(mt(r=>e(r)?t(r):sr))}function fb(t){return Gt(t===t.ownerDocument.documentElement?t.ownerDocument:t,"scroll")}function Yc(t){return Ko(lr(q0.pipe(Bt(t),uo(()=>sr),$0(null))))}var hb={now:sc.now.bind(sc),schedule(t,e,r){return sc.schedule(function(i){return nt(()=>t.call(this,i))},e,r)}};function Op(t=C(vr)){return Nr(()=>t.markForCheck())}function dE(t=C(gr)){return e=>new It(r=>e.subscribe({next:i=>t.run(()=>r.next(i)),error:i=>t.run(()=>r.error(i)),complete:()=>t.run(()=>r.complete())}))}function Gi(t=C(gr)){return e=>new It(r=>t.runOutsideAngular(()=>e.subscribe(r)))}function ra(t=C(gr)){return Ko(Gi(t),dE(t))}var Ap=class{constructor(e,r=ip){this.zoneConditionFn=e,this.scheduler=r}now(){return this.scheduler.now()}schedule(...e){return this.zoneConditionFn(()=>this.scheduler.schedule(...e))}};function ia(t=C(gr),e=ip){return new Ap(t.runOutsideAngular.bind(t),e)}var Rp=new ee("",{factory:()=>C(Tt).defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}),pb=new ee("",{factory:()=>C(Rp)?0:1}),fE=new ee("",{factory:()=>"assets/taiga-ui/icons"});var Kc=new ee("",{factory:()=>null});function Zc(t){return Ct(Kc,t)}var hE=new ee("",{factory:()=>({mobile:768,desktopSmall:1280,desktopLarge:1/0})}),vb=new ee("",{factory:()=>{let t=Ip(C(Cr)),e=C(hE),r=Object.values(e).sort((n,a)=>n-a),i=Object.keys(e).reduce((n,a)=>Ke(ae({},n),{[e[a]]:a}),{});return re(()=>{let{width:n}=t(),o=r.find(s=>s>n)||r[r.length-1]||0;return i[o]??"desktopLarge"})}}),pE={check:"@tui.check",close:"@tui.x",error:"@tui.circle-alert",more:"@tui.chevron-right",search:"@tui.search",ellipsis:"@tui.ellipsis",decrement:"@tui.chevron-left",increment:"@tui.chevron-right"},[Xc,HV]=ut(pE),vE="tuiDark",mE=new ee("",{factory:()=>vE}),Qc=new ee("",{factory:()=>{let t=C(Xy),e=C(mE),r=t?.getItem(e),i=C(Cr).matchMedia("(prefers-color-scheme: dark)"),n=ge(r?r==="true":i.matches),a=n.set.bind(n),o=s=>{t?.setItem(e,String(s)),a(s)};return ur(i,"change").pipe(xt(()=>!t?.getItem(e)),Bt()).subscribe(()=>a(i.matches)),Object.assign(n,{set:o,update:s=>o(s(n())),reset:()=>{t?.removeItem(e),a(i.matches)}})}});var UV=new ee("",{factory:yt("months")}),mb=new ee("",{factory:yt("close")}),jV=new ee("",{factory:yt("back")}),gb=new ee("",{factory:yt("clear")}),yb=new ee("",{factory:yt("nothingFoundMessage")}),qV=new ee("",{factory:yt("defaultErrorMessage")}),WV=new ee("",{factory:yt("spinTexts")}),$V=new ee("",{factory:yt("shortWeekDays")}),Jc=new ee("",{factory:()=>""}),ed=new ee("",{factory:()=>""}),gE=new ee("",{factory:()=>({})});var yE=new ee("",{factory:()=>{let t=C(fE);return e=>`${t}/${e.replace(/@[a-z]+\./i,"").replaceAll(".","/")}.svg`}});function td(t){return t?.match(/@([^.]*)\./)?.[1]||t||void 0}function bb(){let t=C(gE),e=C(yE);return r=>!r||r.includes("/")?r.replace(/@[a-z]+\./i,""):r.startsWith("@font.")?r.replace("@font.",""):t[r]??e(r)}var GV={precision:Number.NaN,decimalSeparator:".",thousandSeparator:Sp,rounding:"truncate",decimalMode:"pad",negativePattern:"prefixFirst"};var Pp=new ee("");var vs=new ee("",{factory:()=>{let t=C(Cr);return{type:"viewport",getClientRect(){let{height:e=0,offsetTop:r=0}=t.visualViewport||{},i={top:0,left:0,right:t.innerWidth,bottom:t.innerHeight,width:t.innerWidth,height:e+r||t.innerHeight,x:0,y:0};return Ke(ae({},i),{toJSON:()=>JSON.stringify(i)})}}}});var Cb={self:!0,optional:!0},bE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-icons-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`:where([tuiIcons][data-tui-version="5.16.0"]){--t-icon-start: none;--t-icon-end: none;--t-zoom: clamp(0, var(--t-font-offset, 0) - 10, 1) }:where([tuiIcons][data-tui-version="5.16.0"]):before,:where([tuiIcons][data-tui-version="5.16.0"]):after{content:"";display:var(--t-icon-start);inline-size:1em;block-size:1em;line-height:1em;font-size:var(--tui-icon-size, 1.5rem);flex-shrink:0;box-sizing:content-box;background:currentColor;zoom:calc(100% + 25% * var(--t-zoom));-webkit-mask-image:var(--t-icon-start);mask-image:var(--t-icon-start);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:calc(min(1em,100%) + 10 * var(--tui-stroke-width)) min(1em,100%),100%;mask-size:calc(min(1em,100%) + 10 * var(--tui-stroke-width)) min(1em,100%),100%;mask-clip:padding-box}:where([tuiIcons][data-tui-version="5.16.0"]):after{display:var(--t-icon-end);-webkit-mask-image:var(--t-icon-end);mask-image:var(--t-icon-end)}:where([tuiIcons][data-tui-version="5.16.0"]):where([data-icon-start=img]):before{-webkit-mask-image:none;mask-image:none;background:var(--t-icon-start) no-repeat center / 1em padding-box}:where([tuiIcons][data-tui-version="5.16.0"]):where([data-icon-end=img]):after{-webkit-mask-image:none;mask-image:none;background:var(--t-icon-end) no-repeat center / 1em padding-box}:where([tuiIcons][data-tui-version="5.16.0"]):where([data-icon-start=font]):before,:where([tuiIcons][data-tui-version="5.16.0"]):where([data-icon-end=font]):after{display:grid;-webkit-mask-image:none;mask-image:none;background:none;font:1.5em / 1 var(--tui-font-icon, inherit);text-align:center;place-content:center;text-transform:none}:where([tuiIcons][data-tui-version="5.16.0"]):where([data-icon-start=font]):before{content:var(--t-icon-start)}:where([tuiIcons][data-tui-version="5.16.0"]):where([data-icon-end=font]):after{content:var(--t-icon-end)}
|
|
3
|
+
`],encapsulation:2})}}return t})(),Pi=(()=>{class t{constructor(){this.resolver=bb(),this.nothing=$t(bE),this.start=re(()=>this.resolve(this.iconStart())),this.end=re(()=>this.resolve(this.iconEnd())),this.startMode=re(()=>td(this.iconStart())),this.endMode=re(()=>td(this.iconEnd())),this.iconEnd=U(C(ed,Cb)),this.iconStart=U(C(Jc,Cb))}resolve(r){return r?td(r)==="font"?`'${this.resolver(r)}'`:`url(${this.resolver(r)})`:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,hostAttrs:["data-tui-version","5.16.0","tuiIcons",""],hostVars:6,hostBindings:function(i,n){i&2&&(Ve("data-icon-end",n.endMode())("data-icon-start",n.startMode()),st("--t-icon-end",n.end())("--t-icon-start",n.start()))},inputs:{iconEnd:[1,"iconEnd"],iconStart:[1,"iconStart"]}})}}return t})();function ms(t,e){return Ri(Pi,"iconStart",t,e)}function Np(t,e={}){return Ri(Pi,"iconEnd",t,e)}var Yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,features:[Le([{directive:Pi,inputs:["iconStart","iconStart","iconEnd","iconEnd"]}])]})}}return t})();var CE={appearance:"primary",size:"l"},[Lu,Gr]=ut(CE),wE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-button-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiButton]:where(*[data-tui-version="5.16.0"]),[tuiIconButton]:where(*[data-tui-version="5.16.0"]){--t-size: var(--tui-height-l);--t-radius: var(--tui-radius-l);--t-gap: .25rem;--t-padding: .5rem 1.25rem;--t-margin: -.25rem;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-inline-size:100%;gap:calc(var(--t-gap, 0rem) - 2 * var(--t-margin, 0rem));min-block-size:fit-content;block-size:var(--t-size);justify-content:center;border-radius:var(--t-radius);padding:var(--t-padding);-webkit-user-select:none;user-select:none;cursor:pointer;font:var(--tui-typography-body-m);font-weight:700}[tuiButton]:where(*[data-tui-version="5.16.0"])>img,[tuiIconButton]:where(*[data-tui-version="5.16.0"])>img,[tuiButton]:where(*[data-tui-version="5.16.0"])>tui-icon,[tuiIconButton]:where(*[data-tui-version="5.16.0"])>tui-icon,[tuiButton]:where(*[data-tui-version="5.16.0"])>[tuiAvatar],[tuiIconButton]:where(*[data-tui-version="5.16.0"])>[tuiAvatar],[tuiButton]:where(*[data-tui-version="5.16.0"])>tui-badge,[tuiIconButton]:where(*[data-tui-version="5.16.0"])>tui-badge,[tuiButton]:where(*[data-tui-version="5.16.0"])>[tuiBadge],[tuiIconButton]:where(*[data-tui-version="5.16.0"])>[tuiBadge],[tuiButton]:where(*[data-tui-version="5.16.0"])>[tuiRadio],[tuiIconButton]:where(*[data-tui-version="5.16.0"])>[tuiRadio],[tuiButton]:where(*[data-tui-version="5.16.0"])>[tuiSwitch],[tuiIconButton]:where(*[data-tui-version="5.16.0"])>[tuiSwitch],[tuiButton]:where(*[data-tui-version="5.16.0"])>[tuiCheckbox],[tuiIconButton]:where(*[data-tui-version="5.16.0"])>[tuiCheckbox],[tuiButton]:where(*[data-tui-version="5.16.0"])[tuiIcons]:before,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[tuiIcons]:before,[tuiButton]:where(*[data-tui-version="5.16.0"])[tuiIcons]:after,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[tuiIcons]:after{margin:var(--t-margin)}[tuiButton]:where(*[data-tui-version="5.16.0"])>.t-loader,[tuiIconButton]:where(*[data-tui-version="5.16.0"])>.t-loader{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%)}[tuiButton]:where(*[data-tui-version="5.16.0"])>.t-loader .t-text,[tuiIconButton]:where(*[data-tui-version="5.16.0"])>.t-loader .t-text{position:absolute}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-icon-start=font]:before,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-icon-start=font]:before,[tuiButton]:where(*[data-tui-version="5.16.0"])[data-icon-end=font]:after,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-icon-end=font]:after{font-size:1.5rem}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=xs],[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=xs]{--t-size: var(--tui-height-xs);--t-radius: var(--tui-radius-xs);--t-gap: .125rem;--t-padding: 0 .375rem;--t-margin: -.125rem;font:var(--tui-typography-body-s)}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=xs] tui-icon,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=xs] tui-icon,[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=xs]:before,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=xs]:before,[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=xs]:after,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=xs]:after{font-size:1rem}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=s],[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-size: var(--tui-height-s);--t-radius: var(--tui-radius-m);--t-gap: .125rem;--t-padding: .125rem .625rem;--t-margin: -.125rem;font:var(--tui-typography-body-s)}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=s] tui-icon,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=s] tui-icon,[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=s]:not([tuiIconButton][data-appearance=icon],[tuiIconButton][data-appearance^=action]):before,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=s]:not([tuiIconButton][data-appearance=icon],[tuiIconButton][data-appearance^=action]):before,[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=s]:not([tuiIconButton][data-appearance=icon],[tuiIconButton][data-appearance^=action]):after,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=s]:not([tuiIconButton][data-appearance=icon],[tuiIconButton][data-appearance^=action]):after{font-size:1rem}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-start=font]:before,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-start=font]:before,[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-end=font]:after,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-end=font]:after{font-size:1rem}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=m],[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=m]{--t-size: var(--tui-height-m);--t-radius: var(--tui-radius-m);--t-gap: .125rem;--t-padding: .375rem 1rem;--t-margin: -.375rem;font:var(--tui-typography-body-m);font-weight:700}[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-start=font]:before,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-start=font]:before,[tuiButton]:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-end=font]:after,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-end=font]:after{font-size:1.5rem}[tuiButton]:where(*[data-tui-version="5.16.0"])._loading,[tuiIconButton]:where(*[data-tui-version="5.16.0"])._loading{--tui-disabled-opacity: 1;-webkit-text-fill-color:transparent}[tuiButton]:where(*[data-tui-version="5.16.0"])._loading>*,[tuiIconButton]:where(*[data-tui-version="5.16.0"])._loading>*,[tuiButton]:where(*[data-tui-version="5.16.0"])._loading:before,[tuiIconButton]:where(*[data-tui-version="5.16.0"])._loading:before,[tuiButton]:where(*[data-tui-version="5.16.0"])._loading:after,[tuiIconButton]:where(*[data-tui-version="5.16.0"])._loading:after{opacity:0}[tuiButton]:where(*[data-tui-version="5.16.0"])._loading>.t-loader,[tuiIconButton]:where(*[data-tui-version="5.16.0"])._loading>.t-loader{opacity:1}[tuiButton]:where(*[data-tui-version="5.16.0"])[tuiButtonVertical],[tuiIconButton]:where(*[data-tui-version="5.16.0"])[tuiButtonVertical]{--t-margin: 0rem !important;flex-direction:column;flex-shrink:1;block-size:auto;padding:.75rem;gap:.375rem;min-inline-size:5rem;white-space:pre-line;font:var(--tui-typography-ui-s)}[tuiButton]:where(*[data-tui-version="5.16.0"])[tuiButtonVertical]>*,[tuiIconButton]:where(*[data-tui-version="5.16.0"])[tuiButtonVertical]>*{max-block-size:calc(var(--t-line-height) * 2);line-height:inherit!important;--t-line-height: var(--tui-lh) !important}[tuiButton]:where(*[data-tui-version="5.16.0"]):is(a):not([href]),[tuiIconButton]:where(*[data-tui-version="5.16.0"]):is(a):not([href]){opacity:var(--tui-disabled-opacity);pointer-events:none}[tuiIconButton]:where(*[data-tui-version="5.16.0"]){gap:0;inline-size:var(--t-size);min-inline-size:var(--t-size);font-size:0!important;font-variant-ligatures:none!important;padding:0}[tuiIconButton]:where(*[data-tui-version="5.16.0"])[tuiIconButton]:where(*[data-tui-version="5.16.0"])[data-icon-start]:after{display:none}
|
|
4
|
+
`],encapsulation:2})}}return t})(),_i=(()=>{class t{constructor(){this.nothing=$t(wE),this.size=U(C(Lu).size)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["a","tuiButton",""],["button","tuiButton",""],["a","tuiIconButton",""],["button","tuiIconButton",""]],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-size",n.size())},inputs:{size:[1,"size"]},features:[_e([Mn(Lu)]),Le([In,Yi])]})}}return t})();var rd={stringify:ge(String),identityMatcher:ge(Yy),disabledItemHandler:ge(ta)},xi=new ee("",{factory:()=>rd});function id(t){return{provide:xi,deps:[[new _a,new co,xi]],useFactory:e=>ae({stringify:ge(e?.stringify()??rd.stringify()),identityMatcher:ge(e?.identityMatcher()??rd.identityMatcher()),disabledItemHandler:ge(e?.disabledItemHandler()??rd.disabledItemHandler())},t)}}var _E=(()=>{class t{constructor(){this.handlers=C(xi,{skipSelf:!0}),this.stringify=U(this.handlers.stringify()),this.identityMatcher=U(this.handlers.identityMatcher()),this.disabledItemHandler=U(this.handlers.disabledItemHandler())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,inputs:{stringify:[1,"stringify"],identityMatcher:[1,"identityMatcher"],disabledItemHandler:[1,"disabledItemHandler"]},features:[_e([Ct(xi,t)])]})}}return t})(),_b=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,features:[Le([{directive:_E,inputs:["stringify","stringify","identityMatcher","identityMatcher","disabledItemHandler","disabledItemHandler"]}])]})}}return t})();var Fp;try{Fp=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Fp=!1}var xb=(()=>{class t{_platformId=C(an);isBrowser=this._platformId?Sn(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Fp)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})();var TE=new ee("cdk-dir-doc",{providedIn:"root",factory:()=>C(Tt)}),SE=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function DE(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?SE.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var Tb=(()=>{class t{get value(){return this.valueSignal()}valueSignal=ge("ltr");change=new mi;constructor(){let r=C(TE,{optional:!0});if(r){let i=r.body?r.body.dir:null,n=r.documentElement?r.documentElement.dir:null;this.valueSignal.set(DE(i||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})();var pn=(function(t){return t[t.NORMAL=0]="NORMAL",t[t.NEGATED=1]="NEGATED",t[t.INVERTED=2]="INVERTED",t})(pn||{}),nd,bo;function Sb(){if(bo==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return bo=!1,bo;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)bo=!0;else{let t=Element.prototype.scrollTo;t?bo=!/\{\s*\[native code\]\s*\}/.test(t.toString()):bo=!1}}return bo}function gs(){if(typeof document!="object"||!document)return pn.NORMAL;if(nd==null){let t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let r=document.createElement("div"),i=r.style;i.width="2px",i.height="1px",t.appendChild(r),document.body.appendChild(t),nd=pn.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,nd=t.scrollLeft===0?pn.NEGATED:pn.INVERTED),t.remove()}return nd}var EE=20,kE=(()=>{class t{_ngZone=C(gr);_platform=C(xb);_renderer=C(mc).createRenderer(null,null);_cleanupGlobalListener;_scrolled=new tr;_scrolledCount=0;scrollContainers=new Map;register(r){this.scrollContainers.has(r)||this.scrollContainers.set(r,r.elementScrolled().subscribe(()=>this._scrolled.next(r)))}deregister(r){let i=this.scrollContainers.get(r);i&&(i.unsubscribe(),this.scrollContainers.delete(r))}scrolled(r=EE){return this._platform.isBrowser?new It(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=r>0?this._scrolled.pipe(W0(r)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{n.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):je()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((r,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(r,i){let n=this.getAncestorScrollContainers(r);return this.scrolled(i).pipe(xt(a=>!a||n.indexOf(a)>-1))}getAncestorScrollContainers(r){let i=[];return this.scrollContainers.forEach((n,a)=>{this._targetContainsElement(a,r)&&i.push(a)}),i}_targetContainsElement(r,i){let n=ls(i),a=r.getElementRef().nativeElement;do if(n==a)return!0;while(n=n.parentElement);return!1}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})(),Db=(()=>{class t{elementRef=C(At);scrollDispatcher=C(kE);ngZone=C(gr);dir=C(Tb,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new tr;_renderer=C(Ta);_cleanupScroll;_elementScrolled=new tr;ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",r=>this._elementScrolled.next(r))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(r){let i=this.elementRef.nativeElement,n=this.dir&&this.dir.value=="rtl";r.left==null&&(r.left=n?r.end:r.start),r.right==null&&(r.right=n?r.start:r.end),r.bottom!=null&&(r.top=i.scrollHeight-i.clientHeight-r.bottom),n&&gs()!=pn.NORMAL?(r.left!=null&&(r.right=i.scrollWidth-i.clientWidth-r.left),gs()==pn.INVERTED?r.left=r.right:gs()==pn.NEGATED&&(r.left=r.right?-r.right:r.right)):r.right!=null&&(r.left=i.scrollWidth-i.clientWidth-r.right),this._applyScrollToOptions(r)}_applyScrollToOptions(r){let i=this.elementRef.nativeElement;Sb()?i.scrollTo(r):(r.top!=null&&(i.scrollTop=r.top),r.left!=null&&(i.scrollLeft=r.left))}measureScrollOffset(r){let i="left",n="right",a=this.elementRef.nativeElement;if(r=="top")return a.scrollTop;if(r=="bottom")return a.scrollHeight-a.clientHeight-a.scrollTop;let o=this.dir&&this.dir.value=="rtl";return r=="start"?r=o?n:i:r=="end"&&(r=o?i:n),o&&gs()==pn.INVERTED?r==i?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft:o&&gs()==pn.NEGATED?r==i?a.scrollLeft+a.scrollWidth-a.clientWidth:-a.scrollLeft:r==i?a.scrollLeft:a.scrollWidth-a.clientWidth-a.scrollLeft}static \u0275fac=function(i){return new(i||t)};static \u0275dir=te({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return t})();var kb="tui-enter",Mb="tui-leave",ME="tui-animated",Eb=`${Mb}_${Zy.split(".")[0]}`,An=(()=>{class t{constructor(){this.renderer=C(qr)._hostLView?.[11],this.el=Be(),xa(()=>this.remove()),this.renderer&&Sn(C(an))&&IE(this.renderer.delegate||this.renderer)}remove(){this.el.isConnected&&!this.el.getAnimations?.().length&&this.el.classList.remove(kb)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiAnimated",""]],hostAttrs:[1,"tui-enter","tui-animated"],hostBindings:function(i,n){i&1&&Ce("animationcancel.self",function(){return n.remove()})("animationend.self",function(){return n.remove()})}})}}return t})();function IE(t){if(t.data[Eb])return;let{removeChild:e}=t;t.data[Eb]=!0,t.removeChild=(r,i,n)=>{if(!fn(i)||!i.classList.contains(ME)){e.call(t,r,i,n);return}i.classList.remove(kb);let{length:a}=i.getAnimations?.()||[];i.classList.add(Mb);let o=i.getAnimations?.()??[],s=o[o.length-1],u=()=>{(!r||r.contains(i))&&e.call(t,r,i,n)};o.length>a&&s?(s.onfinish=u,s.oncancel=u):u()}}var AE=/(?:android|bb\d|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series([46])0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|^(?:1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br([ev])w|bumb|bw-([nu])|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do([cp])o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly([-_])|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-([mpt])|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c([- _agpst])|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac([ \-/])|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja([tv])a|jbro|jemu|jigs|kddi|keji|kgt([ /])|klon|kpt |kwc-|kyo([ck])|le(no|xi)|lg( g|\/([klu])|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t([- ov])|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[23]|n30([02])|n50([025])|n7(0([01])|10)|ne(([cm])-|on|tf|wf|wg|wt)|nok([6i])|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan([adt])|pdxg|pg(13|-([1-8c]))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c([-01])|47|mc|nd|ri)|sgh-|shar|sie([-m])|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel([im])|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c([- ])|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-)/i,OE=/^((?!chrome|android).)*safari/i,RE=/ipad|iphone|ipod/i;function PE({userAgent:t,maxTouchPoints:e}){return RE.test(t)||OE.test(t)&&e>1}var Co=new ee("",{factory:()=>PE(C(Dp))}),On=new ee("",{factory:()=>AE.test(C(Qy))}),od=new ee("",{factory:()=>C(On)&&!C(Co)});var Ib=new ee("",{factory:()=>!!C(Cr)?.webkitConvertPointFromNodeToPage});function Ab({ownerDocument:t}){let e=t?.defaultView,r=e.safari!==void 0&&e.safari?.pushNotification?.toString()==="[object SafariRemoteNotification]",i=!!e.navigator?.vendor?.includes("Apple")&&!e.navigator?.userAgent?.includes("CriOS")&&!e.navigator?.userAgent?.includes("FxiOS");return r||i}function NE(t,e){}function FE(t,e){if(t&1&&(L(0,"div",2),Ce("mousedown.capture.prevent",function(){return 0}),ye(1,"div",3),B()),t&2){let r=Q();Ze("t-bar_has-horizontal",r[1])}}function BE(t,e){if(t&1&&(L(0,"div",4),Ce("mousedown.capture.prevent",function(){return 0}),ye(1,"div",5),B()),t&2){let r=Q();Ze("t-bar_has-vertical",r[0])}}function LE(t,e){if(t&1&&(de(0,FE,2,2,"div",0),de(1,BE,2,2,"div",1)),t&2){let r=e;fe(r[0]?0:-1),R(),fe(r[1]?1:-1)}}function zE(t,e){if(t&1&&(de(0,LE,2,2),Qn(1,"async")),t&2){let r,i=Q();fe((r=Mu(1,1,i.refresh$))?0:-1,r)}}var VE=["*"];function HE(t,e){if(t&1&&ye(0,"tui-scroll-controls",2),t&2){let r=Q();Ze("t-hover-mode",r.options.mode==="hover")}}var ys=new ee("",{factory:()=>new At(C(Tt).documentElement)}),Bp=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiScrollRef",""]],features:[_e([Ct(ys,At)])]})}}return t})(),Ob=(()=>{class t extends It{constructor(){super(r=>this.stream$.subscribe(r)),this.scrollRef=C(ys),this.stream$=C(mo).pipe(lo(300,ia()),Ie(()=>this.scrollbars),Ht([!1,!1]),rr((r,i)=>r[0]===i[0]&&r[1]===i[1]),ra())}get scrollbars(){let{clientHeight:r,scrollHeight:i,clientWidth:n,scrollWidth:a}=this.scrollRef.nativeElement;return[Math.ceil(r/i*100)<100,Math.ceil(n/a*100)<100]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),Rb=(()=>{class t extends It{constructor(){super(r=>this.scroll$.subscribe(r)),this.el=Be(),this.element=C(ys).nativeElement,this.scroll$=nr(Gt(this.el.parentElement,"mousedown").pipe(xt(({target:r})=>r!==this.el),Ie(r=>this.getScrolled(r,.5,.5))),Gt(this.el,"mousedown").pipe(Gi(),mt(r=>{let{ownerDocument:i}=this.el,n=this.el.getBoundingClientRect(),a=UE(r,n),o=jE(r,n);return Gt(i,"mousemove").pipe(Ie(s=>this.getScrolled(s,a,o)),lr(Gt(i,"mouseup")))})))}getScrolled({clientY:r,clientX:i},n,a){let{offsetHeight:o,offsetWidth:s}=this.el,{top:u,left:l,right:c,width:d,height:f}=this.el.parentElement.getBoundingClientRect(),p=this.el.matches('[dir="rtl"] :scope'),h=p?c:l,g=p?-1:1,v=this.element.scrollHeight-f,m=this.element.scrollWidth-d,y=(r-u-o*n)/(f-o),b=(i-h-s*a*g)/(d-s);return[v*y,m*b]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})();function UE({clientY:t},{top:e,height:r}){return(t-e)/r}function jE({clientX:t},{left:e,width:r}){return(t-e)/r}var sd=24,Pb=(()=>{class t extends It{constructor(){super(r=>this.stream$.subscribe(r)),this.scrollRef=C(ys),this.stream$=nr(C(mo).pipe(lo(100,ia())),fb(this.el)).pipe(Gi(),Ie(()=>{let r={scrollTop:this.el.scrollTop,scrollHeight:this.el.scrollHeight,clientHeight:this.el.clientHeight,scrollLeft:this.el.scrollLeft,scrollWidth:this.el.scrollWidth,clientWidth:this.el.clientWidth},i=`${this.getThumb(r)*100}%`,n=`${this.getView(r)*100}%`;return this.tuiScrollbar()==="vertical"?{top:i,height:n}:{insetInlineStart:i,width:n}})),this.tuiScrollbar=U("vertical")}get el(){return this.scrollRef.nativeElement}getThumb(r){let i=this.getCompensation(r)||this.getView(r);return Math.abs(this.getScrolled(r)*(1-i))}getView(r){return this.tuiScrollbar()==="vertical"?Math.ceil(r.clientHeight/r.scrollHeight*100)/100:Math.ceil(r.clientWidth/r.scrollWidth*100)/100}getScrolled(r){return this.tuiScrollbar()==="vertical"?r.scrollTop/(r.scrollHeight-r.clientHeight):r.scrollLeft/(r.scrollWidth-r.clientWidth)}getCompensation(r){return r.clientHeight*r.clientHeight/r.scrollHeight>sd&&this.tuiScrollbar()==="vertical"||r.clientWidth*r.clientWidth/r.scrollWidth>sd&&this.tuiScrollbar()==="horizontal"?0:this.tuiScrollbar()==="vertical"?sd/r.clientHeight:sd/r.clientWidth}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,inputs:{tuiScrollbar:[1,"tuiScrollbar"]},features:[Ae]})}}return t})(),qE=(()=>{class t{constructor(){this.scrollRef=C(ys),this.style=Be().style,this.scrollSub=C(Rb).pipe(Bt()).subscribe(([r,i])=>{this.scrollRef.nativeElement.style.scrollBehavior="auto",this.tuiScrollbar()==="horizontal"?this.scrollRef.nativeElement.scrollLeft=i:this.scrollRef.nativeElement.scrollTop=r,this.scrollRef.nativeElement.style.scrollBehavior=""}),this.styleSub=C(Pb).pipe(Bt()).subscribe(r=>Object.assign(this.style,r)),this.tuiScrollbar=U("vertical")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiScrollbar",""]],inputs:{tuiScrollbar:[1,"tuiScrollbar"]},features:[_e([Rb]),Le([{directive:Pb,inputs:["tuiScrollbar","tuiScrollbar"]}])]})}}return t})(),WE={mode:"always"},[ud,mH]=ut(WE),zu=(()=>{class t{constructor(){this.scrollable=C(Db,{optional:!0,host:!0}),this.el=Be(),this.nativeScrollbar=C(ud).mode==="native",this.refresh$=C(Ob)}ngOnInit(){this.scrollable?.getElementRef().nativeElement.prepend(this.el)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-scroll-controls"]],features:[_e([Ob])],decls:2,vars:1,consts:[["tuiAnimated","",1,"t-bar","t-bar_vertical",3,"t-bar_has-horizontal"],["tuiAnimated","",1,"t-bar","t-bar_horizontal",3,"t-bar_has-vertical"],["tuiAnimated","",1,"t-bar","t-bar_vertical",3,"mousedown.capture.prevent"],["tuiScrollbar","vertical",1,"t-thumb"],["tuiAnimated","",1,"t-bar","t-bar_horizontal",3,"mousedown.capture.prevent"],["tuiScrollbar","horizontal",1,"t-thumb"]],template:function(i,n){i&1&&de(0,NE,0,0)(1,zE,2,3),i&2&&fe(n.nativeScrollbar?0:1)},dependencies:[Iu,An,qE],styles:["[_nghost-%COMP%]{position:sticky;z-index:1;display:block;inset-block-start:0;inset-inline-start:0;min-inline-size:calc(100% - 1px);min-block-size:calc(100% - 1px);max-inline-size:calc(100% - 1px);max-block-size:calc(100% - 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none;overflow:hidden;color:var(--tui-text-primary)} [tuiScrollable]{scrollbar-width:none;-ms-overflow-style:none} [tuiScrollable]::-webkit-scrollbar, [tuiScrollable]::-webkit-scrollbar-thumb{display:none}.t-bar[_ngcontent-%COMP%]{position:absolute;inset-inline-end:0;pointer-events:auto}.t-bar.tui-enter[_ngcontent-%COMP%], .t-bar.tui-leave[_ngcontent-%COMP%]{animation-name:tuiFade}.t-bar_vertical[_ngcontent-%COMP%]{inset-block:.25rem;inline-size:.875rem}.t-bar_horizontal[_ngcontent-%COMP%]{inset-block-end:0;inset-inline-start:0;block-size:.875rem}.t-bar_has-horizontal[_ngcontent-%COMP%]{inset-block-end:.5rem}.t-bar_has-vertical[_ngcontent-%COMP%]{inset-inline-end:.5rem}.t-thumb[_ngcontent-%COMP%]{transition-property:all;transition-duration:.15s;transition-timing-function:var(--tui-curve-productive-standard);position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;-webkit-user-select:none;user-select:none;background:currentColor;background-clip:content-box;box-sizing:border-box;transition-property:width,height,opacity;opacity:.2}.t-thumb[_ngcontent-%COMP%]:hover{opacity:.24}.t-thumb[_ngcontent-%COMP%]:active{opacity:.48}.t-bar_vertical[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]{inset-inline-end:0;inline-size:.75rem;min-block-size:1.25rem}.t-bar_vertical[_ngcontent-%COMP%]:hover .t-thumb[_ngcontent-%COMP%], .t-bar_vertical[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]:active{inline-size:.875rem}.t-bar_horizontal[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]{inset-block-end:0;block-size:.75rem;min-inline-size:1.25rem}.t-bar_horizontal[_ngcontent-%COMP%]:hover .t-thumb[_ngcontent-%COMP%], .t-bar_horizontal[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]:active{block-size:.875rem}"]})}}return t})(),$E="tui-scroll-into-view";var bs=(()=>{class t{constructor(){this.el=Be(),this.options=C(ud),this.isIOS=C(Co),this.browserScrollRef=new At(this.el)}get delegated(){return this.scrollRef!==this.el||this.options.mode==="native"}get scrollRef(){return this.browserScrollRef.nativeElement}set scrollRef(r){this.browserScrollRef.nativeElement=r}scrollIntoView(r){if(this.delegated)return;let{offsetHeight:i,offsetWidth:n}=r,{offsetTop:a,offsetLeft:o}=eb(this.scrollRef,r),s=a+i/2-this.scrollRef.clientHeight/2,u=o+n/2-this.scrollRef.clientWidth/2;this.scrollRef.scrollTo?.(u,s)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-scrollbar"]],hostVars:2,hostBindings:function(i,n){i&1&&Ce("tui-scrollable.stop",function(o){return n.scrollRef=o.detail})("tui-scroll-into-view.stop",function(o){return n.scrollIntoView(o.detail)}),i&2&&Ze("_native-hidden",n.options.mode!=="native"&&(!n.isIOS||n.options.mode==="hidden"))},features:[_e([{provide:ys,useFactory:()=>C(t).browserScrollRef}]),Le([Bp])],ngContentSelectors:VE,decls:3,vars:3,consts:[[1,"t-bars",3,"t-hover-mode"],[1,"t-content"],[1,"t-bars"]],template:function(i,n){i&1&&(kt(),de(0,HE,1,2,"tui-scroll-controls",0),L(1,"div",1),Qe(2),B()),i&2&&(fe(!n.isIOS&&n.options.mode!=="native"&&n.options.mode!=="hidden"?0:-1),R(),Ze("t-content_delegated",n.delegated))},dependencies:[zu],styles:["[_nghost-%COMP%]{position:relative;display:flex;max-block-size:100%;isolation:isolate;overflow:auto}._native-hidden[_nghost-%COMP%]{scrollbar-width:none;-ms-overflow-style:none}._native-hidden[_nghost-%COMP%]::-webkit-scrollbar, ._native-hidden[_nghost-%COMP%]::-webkit-scrollbar-thumb{display:none}[_nghost-%COMP%] .t-hover-mode[_ngcontent-%COMP%]:not(:active){transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);opacity:0}[_nghost-%COMP%]:hover > .t-hover-mode[_ngcontent-%COMP%]{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);opacity:1}.t-content[_ngcontent-%COMP%]{isolation:isolate;flex:1;flex-basis:auto;inline-size:100%;block-size:max-content}.t-content_delegated[_ngcontent-%COMP%]{block-size:100%}.t-bars[_ngcontent-%COMP%]{color:var(--tui-text-primary)}"]})}}return t})(),ld=(()=>{class t{constructor(){this.el=Be(),this.destroyRef=C(Xt),this.tuiScrollIntoView=U(),this.dispatchEvent=ot(()=>{this.tuiScrollIntoView()&&Mi(0).pipe(Bt(this.destroyRef)).subscribe(()=>{this.el.dispatchEvent(new CustomEvent($E,{bubbles:!0,detail:this.el}))})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiScrollIntoView",""]],inputs:{tuiScrollIntoView:[1,"tuiScrollIntoView"]}})}}return t})();function GE({currentTarget:t,relatedTarget:e}){return!fn(e)||!fn(t)||!t.contains(e)}var Vu=(()=>{class t extends It{constructor(){super(r=>this.stream$.subscribe(r)),this.el=Be(),this.zone=C(gr),this.stream$=nr(Gt(this.el,"mouseenter").pipe(Ie(Bu)),Gt(this.el,"mouseleave").pipe(Ie(ta)),Gt(this.el,"mouseout").pipe(xt(GE),Ie(ta))).pipe(rr(),ra(this.zone))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})();var[YE,Fb]=ut({appearance:"action"}),KE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-link-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiLink]:where(*[data-tui-version="5.16.0"]){transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:inherit;border-radius:.125rem;outline-width:1px;outline-offset:-1px;text-underline-offset:.2em;text-decoration:none dashed currentColor 1px;text-decoration-color:color-mix(in lch,currentColor,transparent)}[tuiLink]:where(*[data-tui-version="5.16.0"]):before{margin-inline-end:.25rem}[tuiLink]:where(*[data-tui-version="5.16.0"]):after{margin-inline-start:.25rem}[tuiLink]:where(*[data-tui-version="5.16.0"])[tuiIcons]:where(:not([data-icon-start=font])):before,[tuiLink]:where(*[data-tui-version="5.16.0"])[tuiIcons]:where(:not([data-icon-end=font])):after{content:"\\2060";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;transition:none}[tuiLink]:where(*[data-tui-version="5.16.0"])[data-icon-start=font]:before,[tuiLink]:where(*[data-tui-version="5.16.0"])[data-icon-end=font]:after{display:inline;font-size:var(--tui-icon-size, 1rem);vertical-align:sub}[tuiLink]:where(*[data-tui-version="5.16.0"])[tuiChevron]:after{display:inline-block;vertical-align:initial}@media(hover:hover)and (pointer:fine){[tuiLink]:where(*[data-tui-version="5.16.0"]):is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){text-decoration-color:currentColor}}[tuiLink]:where(*[data-tui-version="5.16.0"])[data-state=hover]{text-decoration-color:currentColor}[tuiLink]:where(*[data-tui-version="5.16.0"]):is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){text-decoration-color:currentColor}[tuiLink]:where(*[data-tui-version="5.16.0"])[data-state=active]{text-decoration-color:currentColor}[tuiLink]:where(*[data-tui-version="5.16.0"])[data-appearance=""]{text-decoration-line:underline;text-decoration-style:solid}
|
|
5
|
+
`],encapsulation:2})}}return t})(),cd=(()=>{class t{constructor(){this.nothing=$t(KE)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["a","tuiLink",""],["button","tuiLink",""]],hostAttrs:["tuiLink",""],features:[_e([Mn(YE)]),Le([In,Yi])]})}}return t})();var Oa=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiItem",""]]})}}return t})();var ZE=typeof IntersectionObserver>"u"?class{root=null;rootMargin="";thresholds=[];observe(){}unobserve(){}disconnect(){}takeRecords(){return[]}}:IntersectionObserver,XE=new ee(""),QE="0px 0px 0px 0px",dd=new ee("",{factory:()=>QE});var JE=0,Lp=new ee("",{factory:()=>JE});var zp=(()=>{class t extends It{nativeElement=C(At).nativeElement;rootMargin=C(dd);threshold=C(Lp);root=C(XE,{optional:!0})?.nativeElement??null;constructor(){super(r=>{let i=new ZE(n=>{r.next(n)},{root:this.root,rootMargin:this.rootMargin,threshold:this.threshold});return i.observe(this.nativeElement),()=>{i.disconnect()}})}static \u0275fac=function(i){return new(i||t)};static \u0275prov=Xe({token:t,factory:t.\u0275fac})}return t})();var ek={position:"fixed",visibility:"hidden",pointerEvents:"none"},tk={height:"fit-content",lineHeight:"1em",fontSize:"calc(env(preferred-text-scale) * 1em)"};function Bb(t,e=globalThis.document.createElement("iframe")){let r=()=>{let{innerWidth:a=0,outerWidth:o=0,devicePixelRatio:s=0}=e.ownerDocument.defaultView||{};e.width=`${a===o?a:a/s}`};e.ownerDocument.body.append(e),e.ownerDocument.defaultView?.addEventListener("resize",r);let i=e.contentDocument,n=new ResizeObserver(()=>t(i?.body.offsetHeight||0));return Object.assign(e.style,ek),Object.assign(i?.body.style||{},tk),i?.head.insertAdjacentHTML("beforeend",'<meta name="text-scale" content="scale">'),i?.documentElement.style.setProperty("font","-apple-system-body"),i?.body.insertAdjacentText("beforeend",".".repeat(1e3)),n.observe(i?.body||e),r(),()=>{n.disconnect(),e.ownerDocument.defaultView?.removeEventListener("resize",r),e.remove()}}var Vp=new ee(""),Lb=(()=>{class t{constructor(){this.handler=C(Vp,{optional:!0}),this.enabled=!C(t,{optional:!0,skipSelf:!0})&&Sn(C(an))&&typeof ResizeObserver<"u",this.nothing=C(Xt).onDestroy(this.enabled&&this.handler?Bb(this.handler,C(Tt).createElement("iframe")):Fu)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t})}}return t})();var Hp=class extends CustomEvent{constructor(e,a){var o=a,{clientX:r,clientY:i}=o,n=L0(o,["clientX","clientY"]);super(e,Ke(ae({},n),{detail:{clientX:r,clientY:i}}))}},ik=({userAgent:t,maxTouchPoints:e})=>/ipad|iphone|ipod/i.test(t)||/^((?!chrome|android).)*safari/i.test(t)&&e>1,nk=700,zb=typeof navigator>"u"?null:navigator,ak=15,Up=class extends Ec{constructor(){super(...arguments),this.isIOS=!!zb&&ik(zb)}addEventListener(e,r,i){let n=this.isIOS?this.listenTouchEvents(e):this.listenContextmenuEvent(e);return e.addEventListener("longtap",i),()=>{n(),e.removeEventListener("longtap",i)}}supports(e){return e==="longtap"}listenContextmenuEvent(e){return this.manager.addEventListener(e,"contextmenu.prevent.stop",({clientX:r,clientY:i})=>{this.dispatchLongtapEvent(e,r,i)})}listenTouchEvents(e){let r=null,i=null,n=()=>{clearTimeout(r),i=null,r=null},a=this.manager.addEventListener(e,"touchstart.zoneless.passive",({touches:l})=>{let c=l[0];if(!c)return;let{clientX:d,clientY:f}=c;i={clientX:d,clientY:f},r=setTimeout(()=>{this.dispatchLongtapEvent(e,d,f),n()},nk)}),o=this.manager.addEventListener(e,"touchmove.zoneless.passive",({touches:l})=>{let c=l[0];if(!c||!i)return;let{clientX:d,clientY:f}=c;Math.hypot(d-i.clientX,f-i.clientY)<=ak||n()}),s=this.manager.addEventListener(e,"touchcancel.zoneless.passive",n),u=this.manager.addEventListener(e,"touchend.zoneless.passive",n);return()=>{a(),o(),s(),u()}}dispatchLongtapEvent(e,r,i){e.dispatchEvent(new Hp("longtap",{clientX:r,clientY:i,bubbles:!1,cancelable:!1,composed:!1}))}},fd=class extends Ec{supports(e){return this.regExp.test(e)}getDelay(e){let r=this.regExp.exec(e);if(!r?.groups)throw new Error(`Invalid event: ${e}`);let{time:i,units:n}=r.groups;switch(n){case"ms":return Number(i);case"s":return Number(i)*1e3;default:throw new Error(`Invalid event: ${e}`)}}unwrap(e){return e.replace(this.regExp,"")}},jp=class extends fd{constructor(){super(...arguments),this.regExp=/\.debounce~(?<time>\d+)(?<units>ms|s)/}addEventListener(e,r,i){let n,a=this.manager.addEventListener(e,this.unwrap(r),o=>{clearTimeout(n),n=setTimeout(()=>{i(o)},this.getDelay(r))});return()=>{clearTimeout(n),a()}}},wo=(()=>{class t extends Ec{constructor(){super(C(Tt))}supports(r){return r.includes(this.modifier)}unwrap(r){return r.split(".").filter(i=>!this.modifier.includes(i)).join(".")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),ok=new ee("",{factory:()=>{let t=C(Tt);return e=>e.split(".").reduce((r,i)=>r?.[i],t.defaultView)}}),sk=(()=>{class t extends wo{constructor(){super(...arguments),this.handler=C(ok),this.modifier=">"}addEventListener(r,i,n){return this.manager.addEventListener(this.handler(i.split(">")[0]),i.split(">")?.[1]??"",n)}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),uk=(()=>{class t extends wo{constructor(){super(...arguments),this.modifier="capture.once.passive"}supports(r){return r.includes(".")&&!this.unwrap(r).includes(".")}addEventListener(r,i,n){let a=this.unwrap(i),o=i.includes(".capture");return r.addEventListener(a,n,{capture:o,once:i.includes(".once"),passive:i.includes(".passive")}),()=>r.removeEventListener(a,n,{capture:o})}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),lk=(()=>{class t extends wo{constructor(){super(...arguments),this.modifier=".prevent"}addEventListener(r,i,n){return this.manager.addEventListener(r,this.unwrap(i),a=>{a.preventDefault(),n(a)})}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),ck=(()=>{class t extends wo{constructor(){super(...arguments),this.modifier="resize"}supports(r){return r==="resize"}addEventListener(r,i,n){if(typeof ResizeObserver>"u"||!(r instanceof Element))return r.addEventListener(i,n),()=>r.removeEventListener(i,n);let a=new ResizeObserver(n);return a.observe(r),()=>a.disconnect()}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),dk=(()=>{class t extends wo{constructor(){super(...arguments),this.modifier=".self"}addEventListener(r,i,n){return this.manager.addEventListener(r,this.unwrap(i),a=>{a.target===a.currentTarget&&n(a)})}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),fk=(()=>{class t extends wo{constructor(){super(...arguments),this.modifier=".stop"}addEventListener(r,i,n){return this.manager.addEventListener(r,this.unwrap(i),a=>{a.stopPropagation(),n(a)})}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),qp=class extends fd{constructor(){super(...arguments),this.regExp=/\.throttle~(?<time>\d+)(?<units>ms|s)/}addEventListener(e,r,i){let n,a=this.manager.addEventListener(e,this.unwrap(r),o=>{n===void 0&&(i(o),n=setTimeout(()=>{n=void 0},this.getDelay(r)))});return()=>{clearTimeout(n),a()}}},hk=(()=>{class t extends wo{constructor(){super(...arguments),this.modifier=".zoneless"}addEventListener(r,i,n){return t.ngZone=this.manager.getZone(),t.ngZone?.runOutsideAngular(()=>this.manager.addEventListener(r,this.unwrap(i),n))}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),pk=[hk,dk,sk,uk,lk,ck,fk,Up,jp,qp],vk=pk.map(t=>({provide:dy,multi:!0,useClass:t}));function Vb(){return vk}var mk=new ee("",{factory:()=>ge(0)});function gk(){return{provide:Vp,useFactory:()=>{let t=C(mk),{documentElement:e}=C(Tt);return r=>{let i=Ma(r,17,28)-17;return t.set(i),e.style.setProperty("--t-font-offset",String(i))}}}}var yk=300;function Hb(t){return t&&yk/t}var bk=["Spacebar","Backspace","Delete","ArrowLeft","ArrowRight","Left","Right","End","Home"];function Ub(t=""){return t.length===1||bk.includes(t)}function Wp(t,e="tui-popups"){return!!qc(t)?.some(r=>!r.closest(e))}var Ck={apis:"stable",fontScaling:!0,scrollbars:"custom"},hd=new ee("");function jb(t={}){let e=ae(ae({},Ck),t),r=[{provide:fy,useValue:!1},{provide:hd,useValue:e},Vb(),up(()=>{let i=C(Tt),n=C(py),a=C(Qc);e.scrollbars==="custom"&&i.documentElement.classList.add("tui-zero-scrollbar"),dn(e.mode)&&a.set(e.mode==="dark"),e.fontScaling&&!n.getTag('name="text-scale"')&&n.addTag({name:"text-scale",content:"scale"}),ot(()=>{a()?i.body.setAttribute("tuiTheme","dark"):i.body.removeAttribute("tuiTheme")})})];return e.fontScaling&&r.push(gk()),r}var qb=new ee("",{factory:()=>{let{apis:t}=C(hd);return t!=="stable"&&(t.all||!!t.liquidGlass)}});function $p(t,e){return(r,i)=>{let n=r||ae({},i||e);return Object.keys(t).forEach(a=>{n[a]=t[a]}),n}}var[wk,Wb]=ut({height:"normal",size:"l"}),_k=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-cell-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiCell]:where(*[data-tui-version="5.16.0"]){--t-pad: .125rem 1rem;--t-radius: var(--tui-radius-s);transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;text-align:start;box-sizing:content-box;isolation:isolate;color:var(--tui-text-primary);padding:var(--t-pad);min-block-size:var(--t-block-size);border-radius:var(--t-radius)}[tuiCell]:where(*[data-tui-version="5.16.0"]):is(button,label):not(:disabled):active{background:var(--tui-background-neutral-1)}[tuiCell]:where(*[data-tui-version="5.16.0"]):disabled,[tuiCell]:where(*[data-tui-version="5.16.0"])[data-state=disabled]{opacity:initial;pointer-events:none}[tuiCell]:where(*[data-tui-version="5.16.0"]):disabled>*:not([tuiTooltip]),[tuiCell]:where(*[data-tui-version="5.16.0"])[data-state=disabled]>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell]:where(*[data-tui-version="5.16.0"]):is(label):has(input:disabled){opacity:initial;pointer-events:none}[tuiCell]:where(*[data-tui-version="5.16.0"]):is(label):has(input:disabled)>*:not([tuiTooltip]){opacity:var(--tui-disabled-opacity)}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiAccessories]{position:relative;display:flex;max-block-size:var(--t-block-size);align-items:center;align-self:stretch;margin-inline-start:auto}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiCellActions][tuiCellActions]{position:absolute;z-index:1;inset-inline-end:0;padding-inline-end:inherit;--t-group-mask: none;--t-group-mask-end: none;--t-group-mask-start: none}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiCellActions][tuiCellActions]~*{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard)}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiCellActions][tuiCellActions] button,[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiCellActions][tuiCellActions] a{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);opacity:0}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiCellActions][tuiCellActions] button:focus-visible,[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiCellActions][tuiCellActions] a:focus-visible{opacity:1}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiSubtitle]{display:flex;align-items:center;gap:.25rem;color:var(--tui-text-secondary)}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle]{flex:3 7 30%;align-items:normal;text-align:start;gap:.25rem .5rem}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]{flex-direction:row;justify-content:space-between}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]~[tuiSubtitle]>[tuiFade]:first-child,[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]>[tuiFade]:first-child,[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]~[tuiSubtitle]>[tuiFade]:last-child,[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]>[tuiFade]:last-child{flex:3 7 30%;max-inline-size:max-content;white-space:nowrap}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]~[tuiSubtitle]>[tuiFade]:last-child,[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]>[tuiFade]:last-child{flex:7 3 70%}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiTitle]~[tuiSubtitle]{justify-content:space-between}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle]~[tuiTitle]{flex:7 3 70%;max-inline-size:max-content;margin-inline-start:auto;text-align:end;align-items:flex-end}[tuiCell]:where(*[data-tui-version="5.16.0"]) [tuiTitle]~[tuiTitle][tuiFade]{align-items:flex-start}[tuiCell]:where(*[data-tui-version="5.16.0"]) tui-badge-notification[data-size=xs]{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:.375rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-block-size: calc(var(--tui-height-s) - .125rem);--t-pad: .1875rem 1rem;gap:.5rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=s][data-height=spacious]{--t-pad: .4375rem 1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=s][data-height=compact]{--t-block-size: calc(var(--tui-height-s) - .25rem);--t-pad: 0 1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiTitle]{max-block-size:100%;font:var(--tui-typography-ui-s);gap:0}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiSubtitle]{font:var(--tui-typography-ui-2xs)}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiAvatar]{--t-size: 1.5rem;--t-radius: var(--tui-radius-m);font:var(--tui-typography-body-m);font-size:.5625rem;margin:.1875rem 0}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=m]{--t-block-size: calc(var(--tui-height-m) - .75rem);--t-pad: .375rem 1rem;gap:.5rem .75rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=m][data-height=spacious]{--t-pad: 1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=m][data-height=compact]{--t-block-size: calc(var(--tui-height-m) - .5rem);--t-pad: 0 1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiTitle]{font:var(--tui-typography-ui-s);gap:.0625rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiSubtitle]{font:var(--tui-typography-ui-xs)}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiAvatar]{--t-size: 2rem;--t-radius: var(--tui-radius-m);align-self:flex-start}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=l]{--t-block-size: calc(var(--tui-height-l) - 1rem);--t-pad: .5rem 1rem;--t-radius: var(--tui-radius-l);gap:.5rem 1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=l][data-height=spacious]{--t-pad: 1.25rem 1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=l][data-height=compact]{--t-block-size: calc(var(--tui-height-l) - 1rem);--t-pad: 0 1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[data-size=l] [tuiAvatar]{--t-size: 2.5rem;font:var(--tui-typography-body-m);font-weight:700;align-self:flex-start}[tuiCell]:where(*[data-tui-version="5.16.0"]):hover [tuiCellActions]~*{opacity:0}[tuiCell]:where(*[data-tui-version="5.16.0"]):hover [tuiCellActions] button,[tuiCell]:where(*[data-tui-version="5.16.0"]):hover [tuiCellActions] a,[tuiCell]:where(*[data-tui-version="5.16.0"]):hover [tuiCellActions] label{opacity:1}[tuiCell]:where(*[data-tui-version="5.16.0"]):focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.125rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[tuiCellStretch]{inline-size:100%;margin-inline:-1rem}[tuiCell]:where(*[data-tui-version="5.16.0"])[tuiCellResponsive]{display:grid;grid-auto-flow:column;grid-auto-columns:fit-content(100%);grid-template-columns:auto 1fr}[tuiCell]:where(*[data-tui-version="5.16.0"])[tuiCellResponsive]:has(>[tuiTitle]:first-child){grid-template-columns:1fr}[tuiCell]:where(*[data-tui-version="5.16.0"])[tuiCellResponsive]>*{grid-row:1}[tuiCell]:where(*[data-tui-version="5.16.0"])[tuiCellResponsive]._rearranged [tuiAccessories]{grid-row:2}[tuiCell]:where(*[data-tui-version="5.16.0"])[tuiCellResponsive]._rearranged [tuiTitle] [tuiTitle],[tuiCell]:where(*[data-tui-version="5.16.0"])[tuiCellResponsive]._rearranged [tuiTitle] [tuiSubtitle]{display:grid}@media(hover:hover)and (pointer:fine){a[tuiCell]:where(*[data-tui-version="5.16.0"]):hover:not(:disabled,[data-state=disabled]),button[tuiCell]:where(*[data-tui-version="5.16.0"]):hover:not(:disabled,[data-state=disabled]),label[tuiCell]:where(*[data-tui-version="5.16.0"]):hover:not(:disabled,[data-state=disabled]){background:var(--tui-background-neutral-1);cursor:pointer}label[tuiCell]:where(*[data-tui-version="5.16.0"]):hover:not(:has(input:disabled)){background:var(--tui-background-neutral-1);cursor:pointer}}
|
|
6
|
+
`],encapsulation:2})}}return t})(),_o=(()=>{class t{constructor(){this.nothing=$t(_k),this.options=C(wk),this.size=U(this.options.size,{alias:"tuiCell"}),this.height=U(this.options.height,{alias:"tuiCellHeight"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiCell","",5,"ng-template"]],hostAttrs:["data-tui-version","5.16.0","tuiCell",""],hostVars:2,hostBindings:function(i,n){i&2&&Ve("data-height",n.height())("data-size",n.size()||n.options.size||"l")},inputs:{size:[1,"tuiCell","size"],height:[1,"tuiCellHeight","height"]},features:[_e([Gr({size:"s"})])]})}}return t})();var pd=(()=>{class t{constructor(){this.el=Be(),this.doc=C(Tt),this.control$=new xr(null),this.sub=this.control$.pipe(mt(r=>r?.events||je(null)),xn(0),Gi(),Yc()).subscribe(()=>this.handleValidation()),this.tuiNativeValidator=U("Invalid"),this.id=""}get control(){return this.control$.value}validate(r){return this.control$.next(r),null}handleValidation(){let r=!!this.control?.touched&&this.control?.invalid;this.el.closest("tui-textfield")?.classList.toggle("tui-invalid",r),this.el.setCustomValidity?.(r?this.tuiNativeValidator():""),this.el.setAttribute("aria-invalid",String(r)),!this.id&&r&&(this.doc.dispatchEvent(new CustomEvent("tui-validator",{detail:this})),this.el.setAttribute("aria-describedby",this.id))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiNativeValidator",""]],hostBindings:function(i,n){i&1&&Ce("focusout",function(){return n.handleValidation()})},inputs:{tuiNativeValidator:[1,"tuiNativeValidator"]},features:[_e([Ct(Pc,t,!0)])]})}}return t})();var[Gp,FU]=ut({size:"m",appearance:({checked:t})=>t?"primary":"outline-grayscale"}),Gb=(()=>{class t{constructor(){this.destroyRef=C(Xt),this.el=Be(),this.options=C(Gp),this.appearance=ps(this.options.appearance(this.el)),this.control=C($r,{self:!0,optional:!0}),this.size=U(this.options.size)}ngOnInit(){$c(this.control).pipe(rr(),Bt(this.destroyRef)).subscribe(r=>{let i=this.control instanceof cn&&r==null?this.control.model:r;this.el.indeterminate=i==null&&this.el.matches("[tuiCheckbox]"),this.ngDoCheck()})}ngDoCheck(){this.appearance.set(this.options.appearance(this.el))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["input","type","radio","tuiRadio",""]],hostVars:4,hostBindings:function(i,n){i&2&&(Wr("disabled",!n.control||n.control.disabled),Ve("data-size",n.size()),Ze("_readonly",!n.control))},inputs:{size:[1,"size"]},features:[Le([{directive:hn,inputs:["tuiAppearanceState","tuiAppearanceState","tuiAppearanceFocus","tuiAppearanceFocus","tuiAppearanceMode","tuiAppearanceMode"]},pd])],decls:0,vars:0,template:function(i,n){},styles:[`[tuiRadio]:where(*[data-tui-version="5.16.0"]){--t-size: 1.5rem;transition-property:background,box-shadow;transition-duration:calc(var(--tui-duration) / 2);transition-timing-function:var(--tui-curve-productive-standard);inline-size:var(--t-size);block-size:var(--t-size);cursor:pointer;margin:0;flex-shrink:0;border-radius:100%;color:var(--tui-text-primary-on-accent-1)}[tuiRadio]:where(*[data-tui-version="5.16.0"]):disabled._readonly._readonly{opacity:1}[tuiRadio]:where(*[data-tui-version="5.16.0"]):before{position:absolute;inset-block-start:0;inset-inline-start:0;inset-block-end:0;inset-inline-end:0;content:"";margin:auto;border-radius:100%;background:currentColor;transform:scale(0);transition-property:transform}[tuiRadio]:where(*[data-tui-version="5.16.0"]):checked:before{transform:scale(.5)}[tuiRadio]:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-size: 1rem}[tuiRadio]:where(*[data-tui-version="5.16.0"]):invalid:not([data-mode]),[tuiRadio]:where(*[data-tui-version="5.16.0"])[data-mode~=invalid]{color:#fff}
|
|
7
|
+
`],encapsulation:2})}}return t})();var[Tk,Yb]=ut({size:"m",appearance:t=>t.checked||t.indeterminate?"primary":"outline-grayscale",icons:{checked:()=>"@tui.check",indeterminate:()=>"@tui.minus"}}),Kb=(()=>{class t extends Gb{constructor(){super(...arguments),this.check=ms(re(()=>this.options.icons.checked(this.size()))),this.indeterminate=Np(re(()=>this.options.icons.indeterminate(this.size())))}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275cmp=K({type:t,selectors:[["input","type","checkbox","tuiCheckbox",""]],features:[_e([Ct(Gp,Tk)]),Le([Pi]),Ae],decls:0,vars:0,template:function(i,n){},styles:[`[tuiCheckbox]:where(*[data-tui-version="5.16.0"]){--t-size: 1.5rem;--t-radius: var(--tui-radius-s);inline-size:var(--t-size);block-size:var(--t-size);border-radius:var(--t-radius);cursor:pointer;margin:0;flex-shrink:0}[tuiCheckbox]:where(*[data-tui-version="5.16.0"]):before{position:absolute;block-size:100%;inline-size:100%;font-size:1rem;-webkit-mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"></svg>');mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"></svg>');transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out}[tuiCheckbox]:where(*[data-tui-version="5.16.0"]):after{display:none}[tuiCheckbox]:where(*[data-tui-version="5.16.0"]):disabled._readonly._readonly{opacity:1;pointer-events:none}[tuiCheckbox]:where(*[data-tui-version="5.16.0"]):checked:before,[tuiCheckbox]:where(*[data-tui-version="5.16.0"]):indeterminate:before{-webkit-mask-image:var(--t-icon-start);mask-image:var(--t-icon-start);transform:scale(1);transition:transform var(--tui-duration) ease-in-out,mask 0s ease-in-out;transition-duration:inherit}[tuiCheckbox]:where(*[data-tui-version="5.16.0"]):indeterminate:before{-webkit-mask-image:var(--t-icon-end);mask-image:var(--t-icon-end)}[tuiCheckbox]:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-size: 1rem;--t-radius: var(--tui-radius-xs)}[tuiCheckbox]:where(*[data-tui-version="5.16.0"])[data-size=s]:before{font-size:.875rem}[tuiCheckbox]:where(*[data-tui-version="5.16.0"]):invalid:not([data-mode]),[tuiCheckbox]:where(*[data-tui-version="5.16.0"])[data-mode~=invalid]{color:#fff}
|
|
8
|
+
`],encapsulation:2})}}return t})();function Zb(t){return $i(nr(ur(t,"focus",{capture:!0}).pipe(Ie(Bu)),ur(t,"blur",{capture:!0}).pipe(Ie(ta))).pipe(V0(hb)),{initialValue:!1})}function Hu(t){if(t.matches(":disabled")||t.getAttribute("tabIndex")==="-1")return!1;if(go(t)&&t.isContentEditable||t.getAttribute("tabIndex")==="0")return!0;switch(t.tagName){case"A":case"LINK":return t.hasAttribute("href");case"AUDIO":case"VIDEO":return t.hasAttribute("controls");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;case"INPUT":return t.getAttribute("type")!=="hidden";default:return!1}}function Yp({initial:t,root:e,previous:r=!1}){if(!e.ownerDocument)return null;let i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,Ky);i.currentNode=t;do if(go(i.currentNode)&&(t=i.currentNode),go(t)&&Hu(t))return t;while(r?i.previousNode():i.nextNode());return null}function Kp({activeElement:t}){if(!t?.shadowRoot)return t;let e=t.shadowRoot.activeElement;for(;e?.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Zp(t){return!!t?.ownerDocument&&Kp(t.ownerDocument)===t&&t.ownerDocument.hasFocus()}function Uu(t){let e=t?.ownerDocument&&Kp(t.ownerDocument);return!!e&&t.contains(e)&&t.ownerDocument?.hasFocus()}function Xb(t,e,r){for(t+=r;t>=0&&t<e.length;){if(e[t]?.focus(),Zp(e[t]))return;t+=r}}var md=new ee("");function Sk(t){return{provide:md,useValue:t}}function Cs(t={}){return C(md,t)}var Ti=class{constructor(e,r){this.component=e,this.i=r}createInjector(e,r){return si.create({parent:this.i||e,providers:r==null?[]:[Sk(r)]})}},ju=class{constructor(e){this.$implicit=e}get polymorpheusOutlet(){return this.$implicit}};function Dk(t){return Object(t)!==t}var gd=(()=>{class t{constructor(r=C(yr,{self:!0}),i=C(vr)){this.template=r,this.cdr=i,this.polymorpheus=""}static ngTemplateContextGuard(r,i){return!0}check(){this.cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)(qt(yr),qt(vr))}}static{this.\u0275dir=te({type:t,selectors:[["ng-template","polymorpheus",""]],inputs:{polymorpheus:"polymorpheus"},exportAs:["polymorpheus"]})}}return t})(),Er=(()=>{class t{constructor(){this.vcr=C(qr),this.i=C(oi),this.t=C(yr),this.content=""}static ngTemplateContextGuard(r,i){return!0}ngOnChanges({content:r}){let i=this.getContext(),n=vd(this.content);if(this.update(),this.c?.injector.get(vr).markForCheck(),!r)return;this.vcr.clear();let a=new Proxy(Qb(i),{get:(o,s)=>Qb(n?this.context:this.getContext())?.[s]});vd(this.content)?(this.process(this.content,i==null?void 0:a),this.update()):(i instanceof ju&&i.$implicit)!=null&&this.vcr.createEmbeddedView(this.template,a,{injector:this.i})}ngDoCheck(){Xp(this.content)&&this.content.check()}get template(){return Xp(this.content)?this.content.template:this.content instanceof yr?this.content:this.t}getContext(){return Ek(this.content)||vd(this.content)?this.context:new ju(typeof this.content=="function"?this.content(this.context??{}):this.content)}process(r,i){this.c=this.vcr.createComponent(r.component,{injector:r.createInjector(this.i,i)})}update(){if(typeof this.context!="object"||!vd(this.content))return;let{inputs:r=[]}=Tc(this.content.component)||{};for(let{templateName:i}of r)i in(this.context??{})&&this.c?.setInput(i,this.context?.[i])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","polymorpheusOutlet",""]],inputs:{content:[0,"polymorpheusOutlet","content"],context:[0,"polymorpheusOutletContext","context"]},features:[jr]})}}return t})();function Xp(t){return t instanceof gd}function vd(t){return t instanceof Ti}function Ek(t){return Xp(t)||t instanceof yr}function Qb(t){return Dk(t)?new ju(t):t}var qu=(()=>{class t{constructor(){this.vcr=C(qr)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiVCR",""]]})}}return t})();var Jb=(()=>{class t{constructor(r){this.service=r,this.injector=C(oi)}open(r,i={}){return new It(n=>this.add(new Ti(this.component,si.create({parent:this.injector,providers:[{provide:md,useValue:Ke(ae(ae({},this.options),i),{content:r,$implicit:n,createdAt:Date.now(),id:us(),completeWith:a=>{n.next(a),n.complete()}})}]}))))}add(r){let i=this.service.add(r);return()=>i.destroy()}static{this.\u0275fac=function(i){Kn()}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})();var yd=(()=>{class t{attach(r){this.host=r}add(r,i){if(!this.host)throw new Qp;return r instanceof Ti?this.host.addComponent(r):this.host.addTemplate(r,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),Qp=class extends Error{constructor(){super("")}},e1=(()=>{class t{constructor(){this.injector=C(oi),this.anchor=wi.required(qu),C(yd).attach(this)}addComponent(r){let i=r.createInjector(this.injector),n=this.anchor().vcr.createComponent(r.component,{injector:i});return n.changeDetectorRef.detectChanges(),n}addTemplate(r,i){return this.anchor().vcr.createEmbeddedView(r,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,viewQuery:function(i,n){i&1&&Ci(n.anchor,qu,5),i&2&&Wt()}})}}return t})();var kk=["*"],aa=(()=>{class t extends yd{static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Mk="_tuiCdr",t1=(()=>{class t extends e1{ngAfterViewChecked(){for(let r=0;r<this.anchor().vcr.length;r++){let i=this.anchor().vcr.get(r);Ik(i)&&i.context?.[Mk]?.markForCheck()}}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275cmp=K({type:t,selectors:[["tui-popups"]],features:[_e([Ct(yd,aa)]),Ae],ngContentSelectors:kk,decls:2,vars:0,consts:[["tuiVCR",""]],template:function(i,n){i&1&&(kt(),Qe(0),rt(1,0))},dependencies:[qu],styles:['[_nghost-%COMP%]{position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;display:grid;grid-template-rows:repeat(14,min-content) 1fr;pointer-events:none;overflow:hidden;overflow-wrap:break-word;box-sizing:border-box;padding:env(safe-area-inset-top) env(safe-area-inset-left) env(safe-area-inset-bottom) env(safe-area-inset-right)}[_nghost-%COMP%] >*{pointer-events:auto}[_nghost-%COMP%]:after{content:"";grid-row:15}'],changeDetection:1})}}return t})();function Ik(t){return!!t&&"context"in t}function Jp(t){return!!t&&(Ak(t)||Jp(t.parentElement))}function Ak(t){return t.ownerDocument.defaultView?.getComputedStyle(t).getPropertyValue("position")==="fixed"}var Ok=new ee("",{factory:()=>{let t=new tr,e=C(mc).createRenderer(null,null),r=Object.getPrototypeOf(e.delegate??e),{removeChild:i}=r;return r.removeChild=function(...n){t.next(n[1]),i.apply(this,n)},t.pipe(Ht(null),mt(n=>Mi(0).pipe(Ie(()=>null),Ht(n))),nn())}});function r1(t,e=null){return jc(t).activeElement!==t&&!t.matches(":disabled")&&!e?.contains(t)&&(t.getAttribute("tabIndex")==="-1"||Hu(t))}function Rk(t){return nr(Gt(t,"focusin").pipe(Ie(({target:e})=>e)),Gt(t,"focusout").pipe(xt(({target:e,relatedTarget:r})=>!!r&&r1(e)),Ie(({relatedTarget:e})=>e)))}var i1=new ee("",{factory:()=>{let t=C(Ok),e=C(Cr),r=C(Tt),i=C(gr),n=Gt(e,"focusout",{capture:!0}),a=Gt(e,"focusin",{capture:!0}),o=Gt(e,"blur"),s=Gt(e,"mousedown"),u=Gt(e,"mouseup"),l=Gt(e,"pointerdown"),c=Gt(e,"pointercancel");return nr(n.pipe(lr(l.pipe(xt(d=>!d.defaultPrevented))),wa({delay:()=>nr(u,c)}),G0(t),xt(([d,f])=>r1(yo(d),f)),Ie(([{relatedTarget:d}])=>d)),o.pipe(Ie(()=>r.activeElement),xt(d=>!!d?.matches("iframe"))),a.pipe(mt(d=>{let f=yo(d),p=jc(f)||r;return p===r?je(f):Rk(p).pipe(Ht(f))})),s.pipe(Ie(yo),mt(d=>!r.activeElement||r.activeElement===r.body?je(d):n.pipe(Gn(1),Ie(()=>d),lr(Mi(0,ia(i))))))).pipe(rr(),nn())}}),n1=new ee("",{factory:()=>null});var ev=new ee("",{factory:()=>C(Co)?"ios":C(od)?"android":"web"});var oa=(()=>{class t{constructor(){this.active$=C(i1),this.tuiActiveZoneParent=null,this.parent=C(t,{skipSelf:!0,optional:!0}),this.el=C(At,{optional:!0})?.nativeElement??C(Tt).documentElement,this.tuiActiveZoneChange=this.active$.pipe(Ie(r=>fn(r)&&this.contains(r)),Ht(!1),rr(),fc(1),ra(),nn()),this.children=[],this.parent?.addSubActiveZone(this)}set tuiActiveZoneParentSetter(r){this.tuiActiveZoneParent?.removeSubActiveZone(this),r?.addSubActiveZone(this),this.tuiActiveZoneParent=r}ngOnDestroy(){this.parent?.removeSubActiveZone(this),this.tuiActiveZoneParent?.removeSubActiveZone(this)}contains(r){return this.el.contains(r)||this.children.some(i=>i.contains(r))}addSubActiveZone(r){this.children=[...this.children,r]}removeSubActiveZone(r){this.children=_p(this.children,this.children.indexOf(r))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiActiveZone","",5,"ng-container"],["","tuiActiveZoneChange","",5,"ng-container"],["","tuiActiveZoneParent","",5,"ng-container"]],inputs:{tuiActiveZoneParentSetter:[0,"tuiActiveZoneParent","tuiActiveZoneParentSetter"]},outputs:{tuiActiveZoneChange:"tuiActiveZoneChange"},exportAs:["tuiActiveZone"]})}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ws=(()=>{class t extends It{constructor(){let r=C(mo),i=C(gr);super(n=>r.pipe(Ht(null),Ie(()=>{let a=this.el.getBoundingClientRect(),o=this.el.getAnimations?.()||[],s=o.length&&o.every(({effect:u})=>u?.getComputedTiming().progress!==null)&&o.some(u=>"animationName"in u&&u.animationName==="tuiScale");return this.rect=s&&this.rect||a,this.accessor.getPosition(this.rect)}),Gi(i),dc(()=>this.accessor.getPosition(ea))).subscribe(n)),this.el=Be(),this.accessor=C(Jn)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),bd=(()=>{class t{constructor(){this.isWebkit=C(Ib),this.win=C(Cr)}correct(r){return this.isWebkit?[r[0]+(this.win.visualViewport?.offsetLeft??0),r[1]+(this.win.visualViewport?.offsetTop??0)]:r}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var o1=(()=>{class t extends It{constructor(){super(r=>this.obscured$.subscribe(r)),this.el=Be(),this.obscured$=C(mo).pipe(lo(100,ia()),Ie(()=>qc(this.el)),Ht(null),rr(),ra())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),Wu=(()=>{class t{constructor(){this.activeZone=C(oa,{optional:!0}),this.obscured$=C(o1,{self:!0}).pipe(Ie(r=>!!r?.every(i=>!this.activeZone?.contains(i)))),this.tuiObscuredEnabled=U(),this.tuiObscured$=ds(this.tuiObscuredEnabled).pipe(Gc(()=>this.obscured$)),this.tuiObscured=En(this.tuiObscured$)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiObscured",""]],inputs:{tuiObscuredEnabled:[1,"tuiObscuredEnabled"]},outputs:{tuiObscured:"tuiObscured"},features:[_e([o1])]})}}return t})();var Nk=t=>({$implicit:t});function Fk(t,e){if(t&1&&(L(0,"div",2),j(1),B()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}var Bk=["tuiDropdownHost"],$u=(()=>{class t extends xr{constructor(){super(!1),this.type="dropdown"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})(),Lk=(()=>{class t extends Hc{constructor(){super(...arguments),this.type="dropdown"}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=te({type:t,features:[Ae]})}}return t})(),tv={align:"start",direction:null,limitWidth:"auto",maxHeight:400,minHeight:80,offset:4,appearance:""},Ra=new ee("",{factory:()=>tv}),zk=t=>({provide:Ra,deps:[[new _a,new ey,rv],[new _a,new co,Ra]],useFactory:$p(t,tv)}),rv=(()=>{class t{constructor(){this.options=C(Ra,{skipSelf:!0}),this.align=this.options.align,this.appearance=this.options.appearance,this.direction=this.options.direction,this.limitWidth=this.options.limitWidth,this.minHeight=this.options.minHeight,this.maxHeight=this.options.maxHeight,this.offset=this.options.offset}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiDropdownAlign",""],["","tuiDropdownAppearance",""],["","tuiDropdownDirection",""],["","tuiDropdownLimitWidth",""],["","tuiDropdownMinHeight",""],["","tuiDropdownMaxHeight",""],["","tuiDropdownOffset",""]],inputs:{align:[0,"tuiDropdownAlign","align"],appearance:[0,"tuiDropdownAppearance","appearance"],direction:[0,"tuiDropdownDirection","direction"],limitWidth:[0,"tuiDropdownLimitWidth","limitWidth"],minHeight:[0,"tuiDropdownMinHeight","minHeight"],maxHeight:[0,"tuiDropdownMaxHeight","maxHeight"],offset:[0,"tuiDropdownOffset","offset"]},features:[_e([Ct(Ra,t)])]})}}return t})(),s1=(()=>{class t extends Jn{constructor(){super(...arguments),this.el=Be(),this.options=C(Ra),this.viewport=C(vs),this.direction=new tr,this.type="dropdown",this.accessor=fs("dropdown")(C(kn,{self:!0,optional:!0}),{getClientRect:()=>this.el.getBoundingClientRect()}),this.tuiDropdownDirectionChange=En(this.direction.pipe(rr()))}getPosition({width:r,height:i}){!r&&!i&&(this.previous=void 0);let n=this.accessor.getClientRect(),a=this.viewport.getClientRect(),{minHeight:o,direction:s,offset:u,limitWidth:l}=this.options,c=this.getAlign(this.options.align),d={top:a.top-u,bottom:a.bottom+u,right:a.right-u,left:a.left+u},f=this.previous||s||"bottom",p={top:n.top-2*u-d.top,bottom:d.bottom-n.bottom-2*u},h=l==="fixed"?n.width:r,g=Math.max(n.right-h,u),v=n.left+r<d.right?n.left:g,m={top:n.top-u-i,bottom:n.bottom+u,right:Math.max(d.left,g),center:n.left+n.width/2+r/2<d.right?n.left+n.width/2-r/2:g,left:Math.max(d.left,v)},y=p.top>p.bottom?"top":"bottom";return p[f]>o&&s||p[f]>i?(this.direction.next(f),[m[c],m[f]]):(this.previous=y,this.direction.next(y),[m[c],m[y]])}getAlign(r){let i=this.el.matches('[dir="rtl"] :scope');return i&&r==="start"?"right":i&&r==="end"?"left":r==="center"?"center":r==="end"?"right":"left"}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=te({type:t,outputs:{tuiDropdownDirectionChange:"tuiDropdownDirectionChange"},features:[Ae]})}}return t})(),Vk=16,Hk=(()=>{class t{constructor(){this.el=Be(),this.directive=C(kr),this.accessor=this.directive.accessor,this.viewport=C(vs),this.vvs=C(bd),this.options=C(Ra),this.position=this.directive.position,this.styles$=C(ws).pipe(Eu(()=>this.directive.el.isConnected&&!!this.directive.el.getBoundingClientRect().height),Ie(r=>this.position==="fixed"?this.vvs.correct(r):r),Ie(r=>this.getStyles(...r)),Bt())}ngAfterViewInit(){this.styles$.subscribe({next:r=>Object.assign(this.el.style,r),complete:()=>this.directive.toggle(!1)})}getStyles(r,i){let{maxHeight:n,minHeight:a,offset:o,limitWidth:s}=this.options,u=this.el.offsetParent?.getBoundingClientRect()||ea,{left:l=0,top:c=0}=this.position==="fixed"?{}:u,d=this.accessor.getClientRect(),f=this.viewport.getClientRect(),p=this.directive.el.currentCSSZoom||1,h=d.top-f.top-2*o,g=f.top+f.height-i-o,v=i>d.bottom?g:h,m=this.el.getBoundingClientRect().right<=d.left||r>=d.right?n:Ma(v,a,n);return i-=c,r-=l,{position:this.position,top:br(Math.round(Math.max(i,o-c)/p)),left:br(Math.round(r/p)),maxHeight:br(Math.round(m/p)),width:s==="fixed"?br(Math.round(d.width/p)):"",minWidth:s==="min"?br(Math.round(d.width/p)):"",maxWidth:br(Math.round(f.width/p)-Vk)}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,features:[_e([ws,Lc("dropdown",s1),zc("dropdown",Ut(()=>kr))])]})}}return t})(),Uk=(()=>{class t{constructor(){this.options=C(Ra),this.directive=C(kr),this.context=C(qk,{optional:!0}),this.darkMode=C(Qc),this.theme=re((r=this.darkMode())=>this.directive.el.closest("[tuiTheme]")?.getAttribute("tuiTheme")),this.close=()=>this.directive.toggle(!1)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-dropdown"]],hostVars:2,hostBindings:function(i,n){i&2&&Ve("data-appearance",n.options.appearance)("tuiTheme",n.theme())},features:[Le([oa,An,Hk])],decls:2,vars:4,consts:[[1,"t-scroll"],["class","t-primitive",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-primitive"]],template:function(i,n){i&1&&(L(0,"tui-scrollbar",0),Me(1,Fk,2,1,"div",1),B()),i&2&&(R(),Z("polymorpheusOutlet",n.directive.content())("polymorpheusOutletContext",Ai(2,Nk,n.close)))},dependencies:[Er,bs],styles:["[_nghost-%COMP%]{position:absolute;display:flex;box-shadow:var(--tui-shadow-medium);color:var(--tui-text-primary);background:var(--tui-background-elevation-3);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-border-normal);box-sizing:border-box;isolation:isolate;pointer-events:auto;--tui-from: translateY(-1rem)}[_nghost-%COMP%]:has(tui-data-list[data-size=l]){border-radius:var(--tui-radius-l)}.tui-enter[_nghost-%COMP%], .tui-leave[_nghost-%COMP%]{animation-name:tuiFade,tuiSlide;animation-duration:calc(var(--tui-duration) / 2);pointer-events:none}[_nghost-%COMP%]:not([style*=top]){visibility:hidden}.t-scroll[_ngcontent-%COMP%]{flex-grow:1;max-inline-size:calc(100% + 2px);inline-size:max-content;overscroll-behavior:none;margin:-1px}.t-primitive[_ngcontent-%COMP%]{padding:1rem}"],changeDetection:1})}}return t})(),jk=new ee("",{factory:()=>Uk}),qk=new ee(""),iv=new ee(""),Wk=(()=>{class t{constructor(){this.id=us(),this.host=C(iv),this.dropdown=C(kr),this.tuiDropdownRole=U("listbox"),this.sync=ot(()=>{let r=this.dropdown.content(),i=this.dropdown.ref(),n=this.host.nativeElement;n.setAttribute("aria-expanded",String(!!i)),n.setAttribute("aria-controls",this.id),n.setAttribute("aria-haspopup",this.tuiDropdownRole()),i?.location.nativeElement.setAttribute("id",this.id),i?.location.nativeElement.setAttribute("role",this.tuiDropdownRole()),!r&&(n.removeAttribute("aria-expanded"),n.removeAttribute("aria-controls"),n.removeAttribute("aria-haspopup"))})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiDropdownA11y",""]],inputs:{tuiDropdownRole:[1,"tuiDropdownRole"]}})}}return t})(),kr=(()=>{class t{constructor(){this.injector=C(oi),this.refresh$=new tr,this.service=C(aa),this.cdr=C(vr),this.drivers=cs(C($u,{self:!0,optional:!0})),this.sub=this.refresh$.pipe(lo(0,ia()),Bt()).subscribe(()=>{this.ref()?.changeDetectorRef.detectChanges(),this.ref()?.changeDetectorRef.markForCheck()}),this.autoClose=ot(()=>{this.content()||this.toggle(!1)}),this.ref=ge(null),this.el=Be(),this.type="dropdown",this.component=new Ti(C(jk),C(oi)),this.content=U(null,{alias:"tuiDropdown",transform:r=>r instanceof yr?new gd(r,this.cdr):r})}get accessor(){let r=this.injector.get(kn,null,{self:!0});return fs("dropdown")(r,this)}get position(){return Jp(this.el)?"fixed":"absolute"}ngAfterViewChecked(){this.ref()&&this.refresh$.next()}ngOnDestroy(){this.toggle(!1)}getClientRect(){return this.el.getBoundingClientRect()}toggle(r){let i=this.ref();r&&this.content()&&!i?this.ref.set(this.service.add(this.component)):!r&&i&&(this.ref.set(null),i.destroy()),this.drivers.forEach(n=>n?.next(r))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiDropdown","",5,"ng-container",5,"ng-template"]],hostVars:2,hostBindings:function(i,n){i&2&&Ze("tui-dropdown-open",n.ref())},inputs:{content:[1,"tuiDropdown","content"]},exportAs:["tuiDropdown"],features:[_e([Vc(t),Ct(iv,At)]),Le([Lk,{directive:Wk,inputs:["tuiDropdownRole","tuiDropdownRole"]},{directive:s1,outputs:["tuiDropdownDirectionChange","tuiDropdownDirectionChange"]}])]})}}return t})(),$k=(()=>{class t{constructor(){this.el=Be(),this.ref=C(kr).ref,this.open=C(sa),this.obscured=C(Wu),this.activeZone=C(oa),this.tuiDropdownClose=En(nr(C($u).pipe(Gc(()=>nr(lb(),this.obscured.tuiObscured$.pipe(xt(Boolean)),this.activeZone.tuiActiveZoneChange.pipe(xt(r=>!r)),Gt(this.el,"focusin").pipe(xt(r=>!this.open.nativeElement.contains(yo(r))||!this.ref()))))),typeof CloseWatcher>"u"?Gt(C(Tt),"keydown",{capture:!0}).pipe(xt(({key:r})=>r==="Escape"&&this.open.open()&&!this.ref()?.location.nativeElement?.nextElementSibling),db()):sr))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,outputs:{tuiDropdownClose:"tuiDropdownClose"}})}}return t})(),sa=(()=>{class t{constructor(){this.dropdownHost=Br("tuiDropdownHost",{descendants:!0,read:At}),this.directive=C(kr),this.el=Be(),this.obscured=C(Wu),this.driver=C($u),this.dropdown=re(()=>this.directive.ref()?.location.nativeElement),this.enabled=U(!0,{alias:"tuiDropdownEnabled"}),this.open=Wi(!1,{alias:"tuiDropdownOpen"}),this.driveEffect=ot(()=>this.drive(this.open())),this.syncSub=this.driver.pipe(xt(r=>r!==this.open()),Bt()).subscribe(r=>this.update(r)),this.keydownSub=Gt(C(Tt),"keydown").pipe(Bt()).subscribe(r=>this.onKeydown(r))}get nativeElement(){let r=this.dropdownHost()?.nativeElement||this.el,i=Hu(r)?r:Yp({initial:r,root:this.el});return this.dropdownHost()?.nativeElement||i||this.el}toggle(r){this.focused&&!r&&this.nativeElement.focus({preventScroll:!0}),this.update(r)}onClick(r){!this.editable&&this.nativeElement.contains(r)&&this.update(!this.open())}onArrow(r,i){!fn(r.target)||!this.nativeElement.contains(r.target)||!this.enabled()||!this.directive.content()||(r.preventDefault(),this.focusDropdown(i))}get editable(){return kp(this.nativeElement)}get focused(){return Uu(this.nativeElement)||Uu(this.dropdown())}onKeydown(r){let i=yo(r);!r.defaultPrevented&&Ub(r.key)&&this.editable&&this.focused&&go(i)&&!kp(i)&&this.nativeElement.focus({preventScroll:!0})}update(r){if(r&&!this.enabled())return this.drive();this.open.set(r),this.drive()}drive(r=this.open()&&this.enabled()){vo(this.obscured.tuiObscuredEnabled,r),this.driver.next(r)}focusDropdown(r){let i=this.dropdown();if(!i){this.update(!0);return}let n=this.el.ownerDocument,a=i.appendChild(n.createElement("div")),s=Yp({initial:r?a:i,previous:r,root:i});a.remove(),s?.focus()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiDropdown","","tuiDropdownAuto",""],["","tuiDropdown","","tuiDropdownOpen",""],["","tuiDropdown","","tuiDropdownOpenChange",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.dropdownHost,Bk,5,At),i&2&&Wt()},hostBindings:function(i,n){i&1&&Ce("click",function(o){return n.onClick(o.target)})("keydown.arrowDown",function(o){return n.onArrow(o,!1)})("keydown.arrowUp",function(o){return n.onArrow(o,!0)})("tuiActiveZoneChange",function(){return 0})("tuiDropdownClose",function(){return n.toggle(!1)})},inputs:{enabled:[1,"tuiDropdownEnabled","enabled"],open:[1,"tuiDropdownOpen","open"]},outputs:{open:"tuiDropdownOpenChange"},features:[_e([$u,hs($u),Ct(iv,t)]),Le([Wu,{directive:$k,outputs:["tuiDropdownClose","tuiDropdownClose"]},{directive:oa,inputs:["tuiActiveZoneParent","tuiActiveZoneParent"],outputs:["tuiActiveZoneChange","tuiActiveZoneChange"]}])]})}}return t})();function u1(t){return Ri(sa,"enabled",t,{})}var xo=(()=>{class t{constructor(){this.directive=C(kr),vo(this.directive.content,C(yr)),Sn(C(an))&&this.directive.el.matches(":focus-within")&&this.directive.toggle(!0)}ngOnDestroy(){vo(this.directive.content,null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["ng-template","tuiDropdown",""]]})}}return t})();var Gk={showDelay:200,hideDelay:500},[Pq,Nq]=ut(Gk);var l1=(()=>{class t{constructor(){$p({limitWidth:"fixed"},tv)(C(Ra,{self:!0,optional:!0}),null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,features:[_e([zk({})])]})}}return t})();var c1=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,features:[Le([{directive:sa,inputs:["tuiDropdownOpen","open","tuiDropdownEnabled","tuiDropdownEnabled"],outputs:["tuiDropdownOpenChange","openChange"]}])]})}}return t})();var Yk=["*"];function Kk(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}function Zk(t,e){if(t&1&&(L(0,"span",0),Me(1,Kk,2,1,"ng-container",1),B()),t&2){let r=Q();R(),Z("polymorpheusOutlet",r.emptyContent()||r.fallback())}}var To=new ee("");function av(t){return Ct(To,t)}var Xk=new ee("");function ov(){let t=["s","m","l"],e=C(Xk,{optional:!0})||C(To,{optional:!0})?.size;return e&&t.includes(e)?e:"l"}var _s=new ee("");function d1(t){return{provide:_s,useValue:t}}var sv=(()=>{class t{constructor(){this.local=null,this.global=C(_s,{optional:!0})}get content(){return this.global??this.local}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,contentQueries:function(i,n,a){if(i&1&&lp(a,_s,5),i&2){let o;bc(o=Cc())&&(n.local=o.first)}}})}}return t})(),Qk=(()=>{class t{constructor(){this.vcr=C(qr),this.content=C(_s,{optional:!0}),this.ref=this.content&&xc(this.content,{environmentInjector:C(Ui),elementInjector:C(oi),hostElement:Be()}),this.ref&&(this.vcr.insert(this.ref.hostView),this.ref.changeDetectorRef.detectChanges())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t})}}return t})(),xs=(()=>{class t{constructor(){this.host=C(To,{optional:!0}),this.disabled=U(!1),this.value=U()}onClick(r=this.value()){r!==void 0&&this.host?.handleOption?.(r)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["button","tuiOption","","value",""],["a","tuiOption","","value",""],["label","tuiOption","","value",""]],hostBindings:function(i,n){i&1&&Ce("click",function(){return n.onClick()})},inputs:{disabled:[1,"disabled"],value:[1,"value"]},features:[Le([Qk])]})}}return t})(),Rn=(()=>{class t{constructor(){this.ngZone=C(gr),this.destroyRef=C(Xt),this.el=Be(),this.cdr=C(vr),this.optionsQuery=Sa(Ut(()=>xs),{descendants:!0}),this.fallback=C(yb),this.empty=ge(!1),this.emptyContent=U(),this.size=U(ov()),this.options=re(()=>this.optionsQuery().map(({value:r})=>r()).filter(dn))}onKeyDownArrow(r,i){let{elements:n}=this;Xb(n.indexOf(r),n,i)}handleFocusLossIfNecessary(r=this.el){Uu(r)&&this.origin?.focus({preventScroll:!0})}ngAfterContentChecked(){Mi(0).pipe(Gi(this.ngZone),Yc(this.destroyRef)).subscribe(()=>{this.empty.set(!this.elements.length),this.cdr.detectChanges()})}get role(){return this.el.parentElement?.closest('[role="menu"],[role="listbox"]')?null:this.el.role}onFocusIn(r,i){!i.contains(r)&&!this.origin&&(this.origin=r)}get elements(){return Array.from(this.el.querySelectorAll("[tuiOption]:not(.t-empty)"))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-data-list"]],contentQueries:function(i,n,a){i&1&&ei(a,n.optionsQuery,xs,5),i&2&&Wt()},hostAttrs:["data-tui-version","5.16.0","role","listbox"],hostVars:2,hostBindings:function(i,n){i&1&&Ce("focusin",function(o){return n.onFocusIn(o.relatedTarget,o.currentTarget)})("keydown.arrowDown.prevent",function(o){return n.onKeyDownArrow(o.target,1)})("keydown.arrowUp.prevent",function(o){return n.onKeyDownArrow(o.target,-1)})("keydown.shift.tab",function(){return n.handleFocusLossIfNecessary()})("keydown.tab",function(){return n.handleFocusLossIfNecessary()})("mousedown.prevent",function(){return 0})("mouseleave",function(o){return n.handleFocusLossIfNecessary(o.target)})("wheel.zoneless.passive",function(){return n.handleFocusLossIfNecessary()}),i&2&&Ve("data-size",n.size())("role",n.role)},inputs:{emptyContent:[1,"emptyContent"],size:[1,"size"]},features:[_e([Wb(()=>({size:C(t).size()})),Zc(t),{provide:_s,useFactory:()=>C(sv,{optional:!0})?.content??C(_s,{skipSelf:!0,optional:!0})}])],ngContentSelectors:Yk,decls:2,vars:1,consts:[["tuiCell","","tuiOption","",1,"t-empty"],[4,"polymorpheusOutlet"]],template:function(i,n){i&1&&(kt(),Qe(0),de(1,Zk,2,1,"span",0)),i&2&&(R(),fe(n.empty()?1:-1))},dependencies:[Er,_o],styles:[`tui-data-list:where(*[data-tui-version="5.16.0"]){display:flex;flex-direction:column;padding:.25rem}tui-data-list:where(*[data-tui-version="5.16.0"]):focus-within [tuiOption]._with-dropdown:not(:focus){background:transparent}tui-data-list:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiOption]{min-block-size:0;font:var(--tui-typography-ui-s);padding:.375rem}tui-data-list:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiOption]:before,tui-data-list:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiOption]:after{font-size:1rem}tui-data-list:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiOption]{min-block-size:2.25rem;font:var(--tui-typography-ui-s);padding:.5rem .375rem}tui-data-list:where(*[data-tui-version="5.16.0"])[data-size=l]{gap:.125rem;padding:.5rem}tui-data-list:where(*[data-tui-version="5.16.0"])[data-size=l] [tuiOption]{font:var(--tui-typography-ui-m);padding-inline:.5rem}tui-data-list:where(*[data-tui-version="5.16.0"])[data-size=l] hr{block-size:1rem;border-inline-width:.5rem}tui-data-list:where(*[data-tui-version="5.16.0"]) [tuiOption]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);box-sizing:border-box;border-radius:var(--tui-radius-s);outline:none!important;cursor:pointer;word-break:break-word;text-transform:inherit}tui-data-list:where(*[data-tui-version="5.16.0"]) [tuiOption]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}@media(hover:hover)and (pointer:fine){tui-data-list:where(*[data-tui-version="5.16.0"]) [tuiOption]:hover:not(:disabled){background:var(--tui-background-neutral-1)}}tui-data-list:where(*[data-tui-version="5.16.0"]) [tuiOption]:active:not(:disabled),tui-data-list:where(*[data-tui-version="5.16.0"]) [tuiOption]:focus-within,tui-data-list:where(*[data-tui-version="5.16.0"]) [tuiOption]._with-dropdown{background:var(--tui-background-neutral-1)}tui-data-list:where(*[data-tui-version="5.16.0"]) [tuiOption]:after{margin-inline-start:auto}tui-data-list:where(*[data-tui-version="5.16.0"])>.t-empty{pointer-events:none;color:var(--tui-text-tertiary)}tui-data-list:where(*[data-tui-version="5.16.0"]) hr{position:relative;margin:0;block-size:.75rem;border:.375rem solid transparent;border-block:0}tui-data-list:where(*[data-tui-version="5.16.0"]) hr+hr,tui-data-list:where(*[data-tui-version="5.16.0"]) hr:first-child,tui-data-list:where(*[data-tui-version="5.16.0"]) hr:last-child{display:none}tui-data-list:where(*[data-tui-version="5.16.0"]) hr:before{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);content:"";block-size:1px;inline-size:100%;background:var(--tui-border-normal)}tui-opt-group:where(*[data-tui-version="5.16.0"]){position:relative;display:flex;font-weight:700!important;gap:inherit;color:var(--tui-text-primary);flex-direction:column}tui-data-list[data-size=s] tui-opt-group:where(*[data-tui-version="5.16.0"]){font:var(--tui-typography-body-s)}tui-data-list[data-size=s] tui-opt-group:where(*[data-tui-version="5.16.0"]):before{padding:.1875rem .375rem}tui-data-list[data-size=m] tui-opt-group:where(*[data-tui-version="5.16.0"]){font:var(--tui-typography-ui-m)}tui-data-list[data-size=m] tui-opt-group:where(*[data-tui-version="5.16.0"]):before{padding:.375rem}tui-data-list[data-size=l] tui-opt-group:where(*[data-tui-version="5.16.0"]){font:var(--tui-typography-ui-l)}tui-data-list[data-size=l] tui-opt-group:where(*[data-tui-version="5.16.0"]):before{padding:.5rem}tui-opt-group:where(*[data-tui-version="5.16.0"]):empty:before,tui-opt-group:where(*[data-tui-version="5.16.0"])[data-label=""]:before{display:none}tui-opt-group:where(*[data-tui-version="5.16.0"]):before{content:attr(data-label);word-break:break-word}tui-sheet-dialog tui-opt-group:where(*[data-tui-version="5.16.0"]):before{font:var(--tui-typography-heading-h6);padding:.5rem 0!important}
|
|
9
|
+
`],encapsulation:2})}}return t})();var f1=(()=>{class t{constructor(){this.isMobile=C(On),this.el=Be(),this.datalist=C(Ut(()=>Rn),{optional:!0}),this.dropdown=C(kr,{self:!0,optional:!0})?.ref,this.disabled=U(!1)}ngOnDestroy(){this.datalist?.handleFocusLossIfNecessary(this.el)}onMouseMove(){!this.isMobile&&!Zp(this.el)&&this.datalist&&this.el.closest("[tuiDataListDropdownManager]")&&this.el.focus({preventScroll:!0})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["button","tuiOption",""],["a","tuiOption",""],["label","tuiOption",""]],hostAttrs:["role","option","type","button"],hostVars:3,hostBindings:function(i,n){i&1&&Ce("mousemove.zoneless",function(){return n.onMouseMove()}),i&2&&(Ve("disabled",n.disabled()||null),Ze("_with-dropdown",n.dropdown==null?null:n.dropdown()))},inputs:{disabled:[1,"disabled"]},features:[Le([Yi,_o])]})}}return t})();var uv=class{};var Jk={fromControlValue:rp,toControlValue:rp},p1={self:!0,optional:!0},vn=(()=>{class t{constructor(){this.fallback=C(n1,p1),this.refresh$=new tr,this.internal=ge(this.fallback),this.control=C($r,{self:!0}),this.cdr=C(vr),this.transformer=C(uv,p1)??Jk,this.value=re(()=>this.internal()??this.fallback),this.readOnly=U(!1),this.pseudoInvalid=U(void 0,{alias:"invalid"}),this.touched=ge(!1),this.status=ge(void 0),this.disabled=re(()=>this.status()==="DISABLED"),this.interactive=re(()=>!this.disabled()&&!this.readOnly()),this.invalid=re(()=>{let r=this.pseudoInvalid();return r==null?this.interactive()&&this.touched()&&this.status()==="INVALID":r&&this.interactive()}),this.mode=re(()=>this.readOnly()?"readonly":this.invalid()?"invalid":"valid"),this.onTouched=Fu,this.onChange=Fu,this.control.valueAccessor=this,this.refresh$.pipe(xn(0),Ht(null),Ie(()=>this.control.control),xt(Boolean),rr(),mt(r=>nr(r.valueChanges,r.statusChanges,r.events).pipe(Ht(null))),Bt()).subscribe(()=>this.update())}registerOnChange(r){this.refresh$.next(),this.onChange=i=>{let n=nt(this.internal);i!==n&&(r(this.transformer.toControlValue(i)),this.internal.set(i),this.update())}}registerOnTouched(r){this.onTouched=()=>{r(),this.update()}}setDisabledState(){this.update()}writeValue(r){let i=this.control instanceof cn?this.control.model:r;this.internal.set(this.transformer.fromControlValue(i)),this.update()}update(){this.status.set(this.control.control?.status),this.touched.set(!!this.control.control?.touched),this.cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,inputs:{readOnly:[1,"readOnly"],pseudoInvalid:[1,"invalid","pseudoInvalid"]}})}}return t})();function v1(t){return Ct(vn,t)}var m1=(()=>{class t{constructor(){this.el=Be(),this.autoId=us()}get id(){return this.el.id||this.autoId}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiId",""]],hostVars:1,hostBindings:function(i,n){i&2&&Wr("id",n.id)}})}}return t})();var tM=["*"];function rM(t,e){if(t&1&&rt(0,1),t&2){let r=Q();Z("ngTemplateOutlet",r.content()||null)}}var g1=(()=>{class t{constructor(){this.content=Br(Oa,{read:yr}),this.open=ge(!1),this.expanded=U(!1)}ngOnInit(){this.open.set(this.expanded())}onTransitionEnd({propertyName:r}){r==="grid-template-rows"&&this.open.set(this.expanded())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-expand"]],contentQueries:function(i,n,a){i&1&&ei(a,n.content,Oa,5,yr),i&2&&Wt()},hostVars:4,hostBindings:function(i,n){i&1&&Ce("transitionend.self",function(o){return n.onTransitionEnd(o)}),i&2&&Ze("_expanded",n.expanded())("_open",n.open())},inputs:{expanded:[1,"expanded"]},ngContentSelectors:tM,decls:3,vars:1,consts:[[1,"t-wrapper"],[3,"ngTemplateOutlet"]],template:function(i,n){i&1&&(kt(),L(0,"div",0),de(1,rM,1,1,"ng-container",1),Qe(2),B()),i&2&&(R(),fe(n.expanded()||n.open()?1:-1))},dependencies:[is],styles:["[_nghost-%COMP%]{transition-property:grid-template-rows,padding;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);position:relative;display:grid;grid-template-rows:0fr;transition-delay:1ms}[_nghost-%COMP%]:not(._expanded){padding-block:0}._expanded[_nghost-%COMP%]{visibility:visible;grid-template-rows:1fr}._expanded[_nghost-%COMP%] > .t-wrapper[_ngcontent-%COMP%]{opacity:1;visibility:visible}._expanded._open[_nghost-%COMP%] > .t-wrapper[_ngcontent-%COMP%]{overflow:visible}.t-wrapper[_ngcontent-%COMP%]{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);grid-row:1 / span 2;overflow:hidden;opacity:0;visibility:hidden}"]})}}return t})();var Ni=(()=>{class t{constructor(){this.icons=C(Pi),this.mask=re(()=>this.icons.resolve(this.background())),this.background=U("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-icon",3,"tuiBadge",""]],hostVars:2,hostBindings:function(i,n){i&2&&st("--t-icon-bg",n.mask())},inputs:{background:[1,"background"]},features:[Le([{directive:Pi,inputs:["iconStart","icon","iconEnd","badge"]}])],decls:0,vars:0,template:function(i,n){},styles:[`tui-icon:where(*[data-tui-version="5.16.0"]){--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;-webkit-mask-image:var(--t-icon-bg);mask-image:var(--t-icon-bg);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width)) 100%;zoom:calc(100%*clamp(0px,var(--tui-font-offset) - 10px,1px)/.8px)}@media(hover:hover)and (pointer:fine){tui-icon:where(*[data-tui-version="5.16.0"])[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon:where(*[data-tui-version="5.16.0"])[tuiIcons]:before,tui-icon:where(*[data-tui-version="5.16.0"])[tuiIcons]:after{zoom:1}tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-end][data-icon-start=img]:before,tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-end][data-icon-start=font]:before{-webkit-mask-image:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-end]:after{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%}tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-start]:before{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%}tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-start=font]:before,tui-icon:where(*[data-tui-version="5.16.0"])[data-icon-end=font]:after{zoom:.667}
|
|
10
|
+
`],encapsulation:2})}}return t})();var nM=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-label-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiLabel]:where(*[data-tui-version="5.16.0"]){display:flex;gap:.25rem;flex-direction:column;font:var(--tui-typography-body-s);color:var(--tui-text-primary)}[tuiLabel]:where(*[data-tui-version="5.16.0"]):not([data-orientation=vertical]){flex-direction:row;inline-size:fit-content;font:var(--tui-typography-body-m)}[tuiLabel]:where(*[data-tui-version="5.16.0"]) input[type=checkbox],[tuiLabel]:where(*[data-tui-version="5.16.0"]) input[type=radio]{font:inherit;inset-block-start:calc(var(--tui-lh) / 2);transform:translateY(-50%);margin-inline-end:.5rem}[tuiLabel]:where(*[data-tui-version="5.16.0"]) input[type=checkbox][data-size=s],[tuiLabel]:where(*[data-tui-version="5.16.0"]) input[type=radio][data-size=s]{line-height:1.3;margin-inline-end:.25rem}[tuiLabel]:where(*[data-tui-version="5.16.0"]) small{font:var(--tui-typography-body-s)}[tuiLabel]:where(*[data-tui-version="5.16.0"]) [tuiTitle]:where(:not([tuiCell] *)){margin-block-start:.125rem}[tuiLabel]:where(*[data-tui-version="5.16.0"]) [tuiSubtitle]{color:var(--tui-text-secondary)}
|
|
11
|
+
`],encapsulation:2})}}return t})(),lv=(()=>{class t{constructor(){this.textfield=Br(Ut(()=>To)),this.el=Be(),this.nothing=$t(nM),this.parent=C(Ut(()=>To),{optional:!0})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["label","tuiLabel",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.textfield,To,5),i&2&&Wt()},hostAttrs:["data-tui-version","5.16.0"],hostVars:2,hostBindings:function(i,n){i&2&&Ve("data-orientation",n.textfield()?"vertical":"horizontal")("for",n.el.htmlFor||(n.parent==null?null:n.parent.id))}})}}return t})();var[aM,cv]=ut({appearance:"neutral",size:"s"}),dv=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiButtonX",""]],hostAttrs:["tuiIconButton","","type","button"],hostVars:2,hostBindings:function(i,n){i&1&&Ce("pointerdown.prevent.zoneless",function(){return 0}),i&2&&st("--t-radius",100,"%")},features:[_e([Gr(()=>C(aM)),{provide:Jc,useFactory:()=>C(Xc).close}]),Le([{directive:_i,inputs:["size","size"]}])]})}}return t})();var oM={filter:(t,e,r)=>t.find(i=>Gy(i,e,r))?t:t.filter(i=>Uc(i,e,r))},[HW,y1]=ut(oM);var sM=["ghost"],uM=["vcr"],lM=[[["input"]],[["select"]],[["textarea"]],[["label","tuiLabel",""]],"*",[["tui-icon"]]],cM=["input","select","textarea","label[tuiLabel]","*","tui-icon"],fv=t=>({$implicit:t});function dM(t,e){}function fM(t,e){if(t&1){let r=Kt();L(0,"button",7),Ce("click",function(){let n;Nt(r);let a=Q();return Ft((n=a.accessor())==null?null:n.setValue(null))}),j(1),B()}if(t&2){let r=Q();R(),xe(" ",r.clear()," ")}}function hM(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}function pM(t,e){if(t&1&&(L(0,"span",5),Me(1,hM,2,1,"ng-container",8),B()),t&2){let r,i=Q();Z("tuiCell",i.options.size()),R(),Z("polymorpheusOutlet",i.content())("polymorpheusOutletContext",Ai(3,fv,(r=i.control())==null?null:r.value))}}function vM(t,e){if(t&1&&ye(0,"input",6,2),t&2){let r=Q();Z("value",r.computedFiller())}}function mM(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),Fr(r)}}var gM=[[["label","tuiLabel",""]],[["input"]],[["select"]],"*",[["tui-icon"]]],yM=["label[tuiLabel]","input","select","*","tui-icon"],bM=(t,e)=>({item:t,index:e});function CM(t,e){}function wM(t,e){t&1&&ye(0,"tui-scroll-controls",3)}function _M(t,e){}function xM(t,e){if(t&1&&Me(0,_M,0,0,"ng-template",5),t&2){let r=e.$implicit,i=e.$index,n=Q();Z("polymorpheusOutlet",n.component)("polymorpheusOutletContext",Ai(5,fv,oy(2,bM,r,i)))}}function TM(t,e){if(t&1&&(L(0,"span",7),j(1),B()),t&2){let r=Q();R(),Fr(r.placeholder)}}function SM(t,e){if(t&1){let r=Kt();L(0,"button",12),Ce("click",function(){let n;Nt(r);let a=Q();return Ft((n=a.accessor())==null?null:n.setValue([]))}),j(1),B()}if(t&2){let r=Q();R(),xe(" ",r.clear()," ")}}function DM(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}function EM(t,e){if(t&1&&(L(0,"span",11),Me(1,DM,2,1,"ng-container",13),B()),t&2){let r,i=Q();Z("tuiCell",i.options.size()),R(),Z("polymorpheusOutlet",i.content())("polymorpheusOutletContext",Ai(3,fv,(r=i.control())==null?null:r.value))}}var Cd={appearance:"textfield",size:"l",cleaner:!0},Pa=new ee("",{factory:()=>({appearance:ge(Cd.appearance),size:ge(Cd.size),cleaner:ge(Cd.cleaner)})});var Ts=(()=>{class t{constructor(){this.options=C(Pa,{skipSelf:!0}),this.appearance=U(this.options.appearance(),{alias:"tuiTextfieldAppearance"}),this.size=U(this.options.size(),{alias:"tuiTextfieldSize",transform:r=>r||Cd.size}),this.cleaner=U(this.options.cleaner(),{alias:"tuiTextfieldCleaner"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiTextfieldAppearance",""],["","tuiTextfieldSize",""],["","tuiTextfieldCleaner",""]],inputs:{appearance:[1,"tuiTextfieldAppearance","appearance"],size:[1,"tuiTextfieldSize","size"],cleaner:[1,"tuiTextfieldCleaner","cleaner"]},features:[_e([Ct(Pa,t)])]})}}return t})(),b1=(()=>{class t{constructor(){this.el=Be(),this.isAndroid=C(od),this.isMobile=C(On),this.options=C(Pa)}clear(){this.el.value=""}prevent(r){this.isAndroid&&(r.preventDefault(),this.el.focus())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiSelectLike",""]],hostAttrs:["autocomplete","off","inputmode","none","spellcheck","false","tuiSelectLike",""],hostBindings:function(i,n){i&1&&Ce("beforeinput",function(o){return n.isMobile&&o.inputType.includes("insertText")||n.options.cleaner()&&o.inputType.includes("delete")||o.preventDefault()})("input.capture",function(o){return(o.inputType==null?null:o.inputType.includes("delete"))&&n.clear()})("keydown.backspace",function(){return n.options.cleaner()&&n.clear()})("keydown.delete",function(){return n.options.cleaner()&&n.clear()})("mousedown",function(o){return n.prevent(o)})}})}}return t})(),Gu=new ee("");function wd(t){return Ct(Gu,t)}var li=(()=>{class t{constructor(){this.focusedIn=Zb(Be()),this.ghost=wi("ghost"),this.dropdown=C(kr),this.open=C(sa),this.clear=C(gb),this.label=Br(Ut(()=>lv),{read:At}),this.computedFiller=re((r=this.value())=>{let i=this.filler();return i.length<=r.length?"":this.input()?.nativeElement.matches('[dir="rtl"] :scope')?`${i.slice(0,i.length-r.length)}${r}`:`${r}${i.slice(r.length)}`}),this.showFiller=re(()=>this.focused()&&!!this.computedFiller()&&(!!this.value()||!this.input()?.nativeElement.placeholder)),this.accessor=Br(Gu),this.vcr=wi("vcr",{read:qr}),this.control=Br($r),this.child=Br(vn),this.auxiliaries=Sa(Kc,{descendants:!0}),this.focused=re(()=>this.open.open()||this.focusedIn()),this.options=C(Pa),this.el=Be(),this.input=Br(Gu,{read:At}),this.content=U(),this.filler=U(""),this.value=Wc(this.input)}get disabled(){return this.control()?.disabled??this.input()?.nativeElement?.disabled??!1}get size(){return this.options.size()}handleOption(r){this.accessor()?.setValue(r),this.open.open.set(!1)}get hasLabel(){return!!this.label()?.nativeElement?.childNodes.length}onResize({clientWidth:r}){this.el.style.setProperty("--t-side",br(r))}onIconClick(){if(this.input()?.nativeElement.focus(),!(!this.open.enabled()||this.input()?.nativeElement.matches("input:read-only,textarea:read-only"))){this.open.open.update(r=>!r);try{this.input()?.nativeElement.showPicker?.()}catch{}}}onScroll(r){let i=this.input();i?.nativeElement===r&&this.ghost()?.nativeElement.scrollTo({left:i?.nativeElement.scrollLeft})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-textfield",3,"multi",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.label,lv,5,At)(a,n.accessor,Gu,5)(a,n.control,$r,5)(a,n.child,vn,5)(a,n.auxiliaries,Kc,5)(a,n.input,Gu,5,At),i&2&&Wt(6)},viewQuery:function(i,n){i&1&&Ci(n.ghost,sM,5)(n.vcr,uM,5,qr),i&2&&Wt(2)},hostAttrs:[1,"tui-interactive"],hostVars:7,hostBindings:function(i,n){if(i&1&&Ce("animationcancel",function(){return 0})("animationstart",function(){return 0})("click.self.prevent",function(){return 0})("pointerdown.self.prevent",function(){return n.onIconClick()})("scroll.capture.zoneless",function(o){return n.onScroll(o.target)})("tuiActiveZoneChange",function(o){let s;return!o&&((s=n.control())==null||s.valueAccessor==null||s.valueAccessor.onTouched==null?null:s.valueAccessor.onTouched())}),i&2){let a;Ve("data-size",n.options.size()),Ze("_disabled",n.disabled)("_with-label",n.hasLabel)("_with-template",n.content()&&((a=n.control())==null?null:a.value)!=null)}},inputs:{content:[1,"content"],filler:[1,"filler"]},features:[_e([Gr({size:"xs",appearance:"icon"}),cv(()=>C(Lu)),av(t),{provide:Pp,useFactory:()=>C(t).value}]),Le([hn,kr,l1,c1,Yi,_b,sv])],ngContentSelectors:cM,decls:15,vars:6,consts:[["side",""],["vcr",""],["ghost",""],[1,"t-content",3,"pointerdown","resize"],["tabindex","-1","tuiButtonX",""],[1,"t-template",3,"tuiCell"],["aria-hidden","true","disabled","",1,"t-filler",3,"value"],["tabindex","-1","tuiButtonX","",3,"click"],[4,"polymorpheusOutlet","polymorpheusOutletContext"]],template:function(i,n){if(i&1){let a=Kt();kt(lM),de(0,dM,0,0),Qn(1,"async"),Qe(2),Qe(3,1),Qe(4,2),Qe(5,3),L(6,"span",3,0),Ce("pointerdown",function(){let s;return Nt(a),Ft((s=n.input())==null||s.nativeElement==null?null:s.nativeElement.focus())})("resize",function(){Nt(a);let s=pr(7);return Ft(n.onResize(s))}),Qe(8,4),rt(9,null,1),de(11,fM,2,1,"button",4),Qe(12,5),B(),de(13,pM,2,5,"span",5),de(14,vM,2,1,"input",6)}if(i&2){let a,o;fe(((a=n.child())==null?null:a.value())??Mu(1,4,(a=n.control())==null||a.control==null?null:a.control.valueChanges)?0:-1),R(11),fe(n.options.cleaner()?11:-1),R(2),fe(((o=n.control())==null?null:o.value)!=null?13:-1),R(),fe(n.showFiller()?14:-1)}},dependencies:[Iu,Er,dv,_o],styles:[`tui-textfield:where(*[data-tui-version="5.16.0"]){scrollbar-width:none;-ms-overflow-style:none;transition-property:color;transition-duration:calc(var(--tui-duration) / 2);transition-timing-function:var(--tui-curve-productive-standard);--t-height: calc(var(--tui-height-l) + 2.5 * var(--t-label) * var(--tui-font-offset));--t-padding: var(--tui-padding-l);--t-label: 0;--t-label-y: -.75rem;--t-label-font: var(--tui-typography-ui-s);--t-end: 0px;--t-start: 0px;--t-side: 0px;--t-max: .75rem;--t-space: clamp(0px, calc(var(--t-side) + var(--t-end)), var(--t-max));position:relative;display:flex;flex-wrap:wrap;align-items:flex-start;min-block-size:var(--t-height);padding:0 var(--t-padding);border-radius:var(--tui-radius-l);font:var(--tui-typography-ui-m);box-sizing:border-box;isolation:isolate}tui-textfield:where(*[data-tui-version="5.16.0"])::-webkit-scrollbar,tui-textfield:where(*[data-tui-version="5.16.0"])::-webkit-scrollbar-thumb{display:none}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance]{outline:none}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=""]{color:var(--tui-text-tertiary)}@media(hover:hover)and (pointer:fine){tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=""]:not([data-mode~=readonly]):is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){color:var(--tui-text-secondary)}}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=""]:not([data-mode~=readonly])[data-state=hover]{color:var(--tui-text-secondary)}tui-textfield:where(*[data-tui-version="5.16.0"])[data-icon-start]{--t-start: calc(2.5rem * (1 + .25 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])[data-icon-end]{--t-end: 1.75rem}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiIcons]:before{z-index:1;block-size:var(--t-height);inline-size:1.5rem;margin-inline-end:1rem;pointer-events:none;max-block-size:calc(var(--t-height) * (1 - .2 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiIcons]:after{position:relative;inline-size:calc(1.5rem + 2 * var(--t-padding));cursor:pointer;margin-inline-start:calc(.25rem - var(--t-padding));margin-inline-end:calc(-1 * var(--t-padding));block-size:var(--t-height);max-block-size:calc(var(--t-height) * (1 - .2 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])::-webkit-resizer{border:.25rem solid transparent;inline-size:.5rem;block-size:.5rem;box-sizing:content-box;color:var(--tui-text-tertiary);background:linear-gradient(-45deg,transparent,transparent .125rem,currentColor .125rem,currentColor .1875rem,transparent .1875rem,transparent .25rem,currentColor .25rem,currentColor .3125rem,transparent .35rem);background-clip:content-box}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"])>.t-content,tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template{pointer-events:none}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-height: var(--tui-height-s);--t-padding: var(--tui-padding-s);--t-max: 0px;border-radius:var(--tui-radius-m);font:var(--tui-typography-ui-s)}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-start]{--t-start: 1.5rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-end]{--t-end: 1.5rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]:before{font-size:1rem;margin-inline:-.25rem .25rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]:after{inline-size:calc(.75rem + 2 * var(--t-padding));margin-inline:0 -.5rem;font-size:1rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]>.t-content{gap:0}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]>.t-content>*:last-child{margin-inline-end:-.25rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]{--t-height: calc(var(--tui-height-m) + 2.5 * var(--t-label) * var(--tui-font-offset));--t-padding: var(--tui-padding-m);--t-label-font: var(--tui-typography-ui-xs);--t-label-y: -.5625rem;--t-max: .125rem;border-radius:var(--tui-radius-m);font:var(--tui-typography-ui-s)}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-start]{--t-start: calc(2.125rem * (1 + .25 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-end]{--t-end: 1.75rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]:before{margin-inline:-.125rem .75rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]:after{inline-size:calc(1.25rem + 2 * var(--t-padding));margin-inline-start:calc(.5rem - var(--t-padding))}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]>.t-content>*:last-child{margin-inline-end:-.125rem}tui-textfield:where(*[data-tui-version="5.16.0"]):is(._disabled,[data-state=disabled]){pointer-events:none;opacity:var(--tui-disabled-opacity)}tui-textfield:where(*[data-tui-version="5.16.0"]):is(._disabled,[data-state=disabled]) [tuiAppearance]:is(._disabled,:disabled,[data-state=disabled]){opacity:1}tui-textfield:where(*[data-tui-version="5.16.0"]):is(._disabled,[data-state=disabled])>.t-content>tui-icon{display:none}tui-textfield:where(*[data-tui-version="5.16.0"])._with-label{--t-label: 1}tui-textfield:where(*[data-tui-version="5.16.0"])._with-label>.t-template,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label .t-filler,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label [tuiInput]{inset-block-end:0;padding-block-start:calc(var(--t-height) / 3);padding-block-end:0}tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly])>.t-template::placeholder,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly]) [tuiInput]::placeholder,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly])>.t-template._empty,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly]) [tuiInput]._empty{color:transparent}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]{position:absolute;inset-inline:0;inline-size:auto;block-size:var(--t-height);-webkit-appearance:none;appearance:none;background:none;font:inherit;resize:none;outline:none;color:var(--tui-text-primary);box-sizing:border-box;border-radius:inherit;border-width:0;padding-inline-start:calc(var(--t-start) + var(--t-padding));padding-inline-end:calc(var(--t-end) + var(--t-side) + var(--t-padding) + var(--t-space));white-space:nowrap;overflow:hidden}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template:is(input,textarea):read-only~.t-filler,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler:is(input,textarea):read-only~.t-filler,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:is(input,textarea):read-only~.t-filler{display:none}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template:disabled,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler:disabled,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:disabled{animation:tuiPresent 1s infinite;opacity:1}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template[inputmode=none],tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler[inputmode=none],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput][inputmode=none]{caret-color:transparent}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template::-webkit-inner-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler::-webkit-inner-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]::-webkit-inner-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template::-webkit-outer-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler::-webkit-outer-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none}tui-textfield:where(*[data-tui-version="5.16.0"])._with-template [tuiInput]:first-of-type{color:transparent!important}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:-webkit-autofill [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput][chrome-autofilled] [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:not(._empty,:placeholder-shown) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"])[multi][multi]:not(._empty) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:-webkit-autofill:not(tui-textfield)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput][chrome-autofilled]:not(tui-textfield)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:not(._empty,:placeholder-shown):not(tui-textfield)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"])[multi][multi]:not(._empty):not(tui-textfield)~[tuiLabel]{font:var(--t-label-font);transform:translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2))}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel][tuiLabel][tuiLabel]{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:block;max-inline-size:calc(100% - var(--t-start));flex:1;align-self:flex-start;font:inherit;-webkit-user-select:none;user-select:none;padding:calc(var(--t-height) / 2 - .625em) 0;line-height:1.25!important;transition-duration:inherit}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel][tuiLabel][tuiLabel]+.t-content{margin-inline-start:0}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]::placeholder,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]._empty{color:var(--tui-text-secondary)}tui-textfield:where(*[data-tui-version="5.16.0"]) select option[value=""]:disabled{color:transparent}tui-textfield:where(*[data-tui-version="5.16.0"]) select optgroup,tui-textfield:where(*[data-tui-version="5.16.0"]) select option{background-color:var(--tui-background-elevation-3)}tui-textfield:where(*[data-tui-version="5.16.0"]) select optgroup,tui-textfield:where(*[data-tui-version="5.16.0"]) select option:not(:disabled){color:var(--tui-text-primary)}tui-textfield:where(*[data-tui-version="5.16.0"]) button,tui-textfield:where(*[data-tui-version="5.16.0"]) a,tui-textfield:where(*[data-tui-version="5.16.0"]) tui-icon{pointer-events:auto}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-content{z-index:1;display:flex;block-size:var(--t-height);align-items:center;gap:.25rem;margin-inline-start:auto;isolation:isolate;border-radius:inherit}tui-textfield:where(*[data-tui-version="5.16.0"]) textarea~.t-content{min-inline-size:.5rem}tui-textfield:where(*[data-tui-version="5.16.0"]):is([data-mode~=readonly],[data-state=disabled],._empty) [tuiButtonX],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]._empty~.t-content [tuiButtonX],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:disabled~.t-content [tuiButtonX]{display:none}tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler{pointer-events:none!important;color:var(--tui-text-tertiary)}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiFluidTypography]{font-weight:700}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiSelectLike]:not(:read-only){cursor:pointer}tui-textfield:where(*[data-tui-version="5.16.0"]):has(input[type=tel]){direction:ltr}tui-textfield:where(*[data-tui-version="5.16.0"]):is([data-mode~=invalid],.tui-invalid,:invalid):not([data-mode~=readonly],[data-mode~=valid],[data-state=disabled],:disabled,._disabled) [tuiInput]:not(._empty)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]):is([data-mode~=invalid],.tui-invalid,:invalid):not([data-mode~=readonly],[data-mode~=valid],[data-state=disabled],:disabled,._disabled)[multi]:not(._empty) [tuiLabel]{color:var(--tui-text-negative)}tui-textfield:where(*[data-tui-version="5.16.0"]):not([data-mode~=readonly]):focus-visible:not([data-focus=false]) [tuiLabel]{color:var(--tui-text-primary)!important;font:var(--t-label-font);transform:translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2))}tui-textfield:where(*[data-tui-version="5.16.0"]):not([data-mode~=readonly])[data-focus=true] [tuiLabel]{color:var(--tui-text-primary)!important;font:var(--t-label-font);transform:translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2))}
|
|
12
|
+
`],encapsulation:2})}}return t})(),kM=(()=>{class t{constructor(){this.el=Be(),this.handlers=C(xi),this.context=Cs(),this.textfield=C(IM),this.content=re(()=>this.textfield.item()??this.handlers.stringify()(this.context.$implicit.item))}prevent(r){this.textfield.focused()&&r.preventDefault()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-textfield-item"]],hostVars:4,hostBindings:function(i,n){i&1&&Ce("keydown.arrowLeft.prevent",function(){return n.el.previousElementSibling==null||n.el.previousElementSibling.firstChild==null?null:n.el.previousElementSibling.firstChild.focus()})("keydown.arrowRight.prevent",function(){return n.el.nextElementSibling==null||n.el.nextElementSibling.firstChild==null?null:n.el.nextElementSibling.firstChild.focus()})("pointerdown.self",function(o){return n.prevent(o)}),i&2&&Ze("_disabled",n.handlers.disabledItemHandler()(n.context.$implicit.item))("_string",!n.textfield.item())},decls:1,vars:2,consts:[[4,"polymorpheusOutlet","polymorpheusOutletContext"]],template:function(i,n){i&1&&Me(0,mM,2,1,"ng-container",0),i&2&&Z("polymorpheusOutlet",n.content())("polymorpheusOutletContext",n.context)},dependencies:[Er],styles:['[_nghost-%COMP%]{display:flex;max-inline-size:100%;flex-shrink:0;white-space:nowrap;text-overflow:ellipsis;color:var(--tui-text-primary)}._string[_nghost-%COMP%]{display:block;overflow:hidden;overflow:clip visible}._string._disabled[_nghost-%COMP%]{opacity:var(--tui-disabled-opacity)}._string[_nghost-%COMP%]:after{content:",\\a0"}[_nghost-%COMP%]:last-of-type{max-inline-size:80%}tui-textfield:not([data-focus="true"])[_nghost-%COMP%]:last-of-type:after, tui-textfield:not([data-focus="true"]) [_nghost-%COMP%]:last-of-type:after{display:none}tui-textfield:has([tuiSelectLike])[_nghost-%COMP%]:last-of-type:after, tui-textfield:has([tuiSelectLike]) [_nghost-%COMP%]:last-of-type:after, tui-textfield[data-mode~="readonly"][_nghost-%COMP%]:last-of-type:after, tui-textfield[data-mode~="readonly"] [_nghost-%COMP%]:last-of-type:after{content:"\\a0"}']})}}return t})(),MM=new Ti(kM),IM=(()=>{class t extends li{constructor(){super(...arguments),this.height=ge(null),this.win=C(Cr),this.handlers=C(xi),this.component=MM,this.items=re(()=>this.cva()?.value()??[]),this.sub=ur(this.el,"scroll").pipe(xt(()=>this.rows()===1),Gi(),Bt()).subscribe(()=>{this.el.style.setProperty("--t-scroll",br(-1*this.el.scrollLeft))}),this.cva=Br(vn),this.item=Br(Oa,{read:yr,descendants:!0}),this.rows=U(100)}handleOption(r){this.accessor()?.setValue(Uy(this.items(),r,this.handlers.identityMatcher()))}get placeholder(){let r=this.input()?.nativeElement,i=r?.matches("input")?r.placeholder:this.computedFiller(),n=this.computedFiller()||this.value(),a=n.length>i.length?n:i;return this.focused()?a:""}onItems(r){this.height.update(i=>r.querySelector("tui-textfield-item")?.clientHeight||i)}onLeft(r){this.value()||!fn(r.currentTarget)||(r.preventDefault(),r.currentTarget.previousElementSibling?.firstElementChild?.focus())}focusInput(){let r=this.win.getSelection();(!r?.rangeCount||r.getRangeAt(0)?.collapsed)&&this.input()?.nativeElement.focus()}onClick(r){if(!(r===this.el||!this.cva()?.interactive()||!this.el.matches("[tuiChevron]")&&!this.el.querySelector("select, [tuiInputDateMulti]")||r.matches('input:read-only,input[inputmode="none"]'))){this.open.open.update(i=>!i);try{this.input()?.nativeElement.showPicker?.()}catch{}}}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275cmp=K({type:t,selectors:[["tui-textfield","multi",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.cva,vn,5)(a,n.item,Oa,5,yr),i&2&&Wt(2)},hostVars:7,hostBindings:function(i,n){i&1&&Ce("click.prevent",function(o){return n.onClick(o.target)})("tuiActiveZoneChange",function(o){return!o&&n.el.scrollTo({left:0})}),i&2&&(Ve("data-state",n.disabled?"disabled":null),st("--t-item-height",n.height(),"px")("--t-rows",n.rows()),Ze("_empty",!n.items().length))},inputs:{rows:[1,"rows"]},features:[_e([Gr({size:"xs",appearance:"icon"}),cv(()=>C(Lu)),av(t),Ct(li,t),{provide:Pp,useFactory:()=>C(li).value},y1({filter:(r,i,n)=>r.filter(a=>Uc(a,i,n))})]),Le([Bp]),Ae],ngContentSelectors:yM,decls:21,vars:12,consts:[["wrapper",""],["side",""],["vcr",""],[1,"t-scrollbar"],[1,"t-items",3,"click","pointerdown.self.zoneless.prevent","resize"],[3,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-input",3,"keydown.arrowLeft"],[1,"t-ghost"],["aria-hidden","true","disabled","",1,"t-filler",3,"value"],[1,"t-content",3,"click.stop","pointerdown.zoneless.prevent","resize"],["tabindex","-1","tuiButtonX",""],[1,"t-template",3,"tuiCell"],["tabindex","-1","tuiButtonX","",3,"click"],[4,"polymorpheusOutlet","polymorpheusOutletContext"]],template:function(i,n){if(i&1){let a=Kt();kt(gM),de(0,CM,0,0),Qn(1,"async"),de(2,wM,1,0,"tui-scroll-controls",3),L(3,"div",4,0),Ce("click",function(){return n.focusInput()})("pointerdown.self.zoneless.prevent",function(){return 0})("resize",function(){Nt(a);let s=pr(4);return Ft(n.onItems(s))}),Qe(5),dt(6,xM,1,7,null,5,gi),L(8,"span",6),Ce("keydown.arrowLeft",function(s){return n.onLeft(s)}),Qe(9,1),Qe(10,2),de(11,TM,2,1,"span",7),ye(12,"input",8),B()(),L(13,"span",9,1),Ce("click.stop",function(){let s;return Nt(a),Ft((s=n.input())==null||s.nativeElement==null?null:s.nativeElement.focus())})("pointerdown.zoneless.prevent",function(){return 0})("resize",function(){Nt(a);let s=pr(14);return Ft(n.onResize(s))}),Qe(15,3),de(16,SM,2,1,"button",10),rt(17,null,2),Qe(19,4),B(),de(20,EM,2,5,"span",11)}if(i&2){let a,o;fe(((a=n.child())==null?null:a.value())??Mu(1,10,(a=n.control())==null||a.control==null?null:a.control.valueChanges)?0:-1),R(2),fe(n.rows()>1?2:-1),R(),Ze("t-items_horizontal",n.rows()===1),R(3),ft(n.items()),R(5),fe(n.placeholder?11:-1),R(),Ze("t-filler_hidden",!n.showFiller()),Z("value",n.computedFiller()),R(4),fe(n.options.cleaner()?16:-1),R(4),fe(((o=n.control())==null?null:o.value)!=null?20:-1)}},dependencies:[Iu,Er,dv,_o,zu],styles:[`tui-textfield:where(*[data-tui-version="5.16.0"]){scrollbar-width:none;-ms-overflow-style:none;transition-property:color;transition-duration:calc(var(--tui-duration) / 2);transition-timing-function:var(--tui-curve-productive-standard);--t-height: calc(var(--tui-height-l) + 2.5 * var(--t-label) * var(--tui-font-offset));--t-padding: var(--tui-padding-l);--t-label: 0;--t-label-y: -.75rem;--t-label-font: var(--tui-typography-ui-s);--t-end: 0px;--t-start: 0px;--t-side: 0px;--t-max: .75rem;--t-space: clamp(0px, calc(var(--t-side) + var(--t-end)), var(--t-max));position:relative;display:flex;flex-wrap:wrap;align-items:flex-start;min-block-size:var(--t-height);padding:0 var(--t-padding);border-radius:var(--tui-radius-l);font:var(--tui-typography-ui-m);box-sizing:border-box;isolation:isolate}tui-textfield:where(*[data-tui-version="5.16.0"])::-webkit-scrollbar,tui-textfield:where(*[data-tui-version="5.16.0"])::-webkit-scrollbar-thumb{display:none}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance]{outline:none}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=""]{color:var(--tui-text-tertiary)}@media(hover:hover)and (pointer:fine){tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=""]:not([data-mode~=readonly]):is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){color:var(--tui-text-secondary)}}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=""]:not([data-mode~=readonly])[data-state=hover]{color:var(--tui-text-secondary)}tui-textfield:where(*[data-tui-version="5.16.0"])[data-icon-start]{--t-start: calc(2.5rem * (1 + .25 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])[data-icon-end]{--t-end: 1.75rem}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiIcons]:before{z-index:1;block-size:var(--t-height);inline-size:1.5rem;margin-inline-end:1rem;pointer-events:none;max-block-size:calc(var(--t-height) * (1 - .2 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])[tuiIcons]:after{position:relative;inline-size:calc(1.5rem + 2 * var(--t-padding));cursor:pointer;margin-inline-start:calc(.25rem - var(--t-padding));margin-inline-end:calc(-1 * var(--t-padding));block-size:var(--t-height);max-block-size:calc(var(--t-height) * (1 - .2 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])::-webkit-resizer{border:.25rem solid transparent;inline-size:.5rem;block-size:.5rem;box-sizing:content-box;color:var(--tui-text-tertiary);background:linear-gradient(-45deg,transparent,transparent .125rem,currentColor .125rem,currentColor .1875rem,transparent .1875rem,transparent .25rem,currentColor .25rem,currentColor .3125rem,transparent .35rem);background-clip:content-box}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"])>.t-content,tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template{pointer-events:none}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-height: var(--tui-height-s);--t-padding: var(--tui-padding-s);--t-max: 0px;border-radius:var(--tui-radius-m);font:var(--tui-typography-ui-s)}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-start]{--t-start: 1.5rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-end]{--t-end: 1.5rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]:before{font-size:1rem;margin-inline:-.25rem .25rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]:after{inline-size:calc(.75rem + 2 * var(--t-padding));margin-inline:0 -.5rem;font-size:1rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]>.t-content{gap:0}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=s]>.t-content>*:last-child{margin-inline-end:-.25rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]{--t-height: calc(var(--tui-height-m) + 2.5 * var(--t-label) * var(--tui-font-offset));--t-padding: var(--tui-padding-m);--t-label-font: var(--tui-typography-ui-xs);--t-label-y: -.5625rem;--t-max: .125rem;border-radius:var(--tui-radius-m);font:var(--tui-typography-ui-s)}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-start]{--t-start: calc(2.125rem * (1 + .25 * var(--t-zoom)))}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-end]{--t-end: 1.75rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]:before{margin-inline:-.125rem .75rem}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]:after{inline-size:calc(1.25rem + 2 * var(--t-padding));margin-inline-start:calc(.5rem - var(--t-padding))}tui-textfield:where(*[data-tui-version="5.16.0"])[data-size=m]>.t-content>*:last-child{margin-inline-end:-.125rem}tui-textfield:where(*[data-tui-version="5.16.0"]):is(._disabled,[data-state=disabled]){pointer-events:none;opacity:var(--tui-disabled-opacity)}tui-textfield:where(*[data-tui-version="5.16.0"]):is(._disabled,[data-state=disabled]) [tuiAppearance]:is(._disabled,:disabled,[data-state=disabled]){opacity:1}tui-textfield:where(*[data-tui-version="5.16.0"]):is(._disabled,[data-state=disabled])>.t-content>tui-icon{display:none}tui-textfield:where(*[data-tui-version="5.16.0"])._with-label{--t-label: 1}tui-textfield:where(*[data-tui-version="5.16.0"])._with-label>.t-template,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label .t-filler,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label [tuiInput]{inset-block-end:0;padding-block-start:calc(var(--t-height) / 3);padding-block-end:0}tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly])>.t-template::placeholder,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly]) [tuiInput]::placeholder,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly])>.t-template._empty,tui-textfield:where(*[data-tui-version="5.16.0"])._with-label:is(:not([data-focus=true]),[data-mode~=readonly]) [tuiInput]._empty{color:transparent}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]{position:absolute;inset-inline:0;inline-size:auto;block-size:var(--t-height);-webkit-appearance:none;appearance:none;background:none;font:inherit;resize:none;outline:none;color:var(--tui-text-primary);box-sizing:border-box;border-radius:inherit;border-width:0;padding-inline-start:calc(var(--t-start) + var(--t-padding));padding-inline-end:calc(var(--t-end) + var(--t-side) + var(--t-padding) + var(--t-space));white-space:nowrap;overflow:hidden}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template:is(input,textarea):read-only~.t-filler,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler:is(input,textarea):read-only~.t-filler,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:is(input,textarea):read-only~.t-filler{display:none}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template:disabled,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler:disabled,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:disabled{animation:tuiPresent 1s infinite;opacity:1}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template[inputmode=none],tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler[inputmode=none],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput][inputmode=none]{caret-color:transparent}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template::-webkit-inner-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler::-webkit-inner-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]::-webkit-inner-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"])>.t-template::-webkit-outer-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler::-webkit-outer-spin-button,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none}tui-textfield:where(*[data-tui-version="5.16.0"])._with-template [tuiInput]:first-of-type{color:transparent!important}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:-webkit-autofill [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput][chrome-autofilled] [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:not(._empty,:placeholder-shown) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"])[multi][multi]:not(._empty) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:-webkit-autofill:not(tui-textfield)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput][chrome-autofilled]:not(tui-textfield)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:not(._empty,:placeholder-shown):not(tui-textfield)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"])[multi][multi]:not(._empty):not(tui-textfield)~[tuiLabel]{font:var(--t-label-font);transform:translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2))}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel][tuiLabel][tuiLabel]{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:block;max-inline-size:calc(100% - var(--t-start));flex:1;align-self:flex-start;font:inherit;-webkit-user-select:none;user-select:none;padding:calc(var(--t-height) / 2 - .625em) 0;line-height:1.25!important;transition-duration:inherit}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel][tuiLabel][tuiLabel]+.t-content{margin-inline-start:0}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]::placeholder,tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]._empty{color:var(--tui-text-secondary)}tui-textfield:where(*[data-tui-version="5.16.0"]) select option[value=""]:disabled{color:transparent}tui-textfield:where(*[data-tui-version="5.16.0"]) select optgroup,tui-textfield:where(*[data-tui-version="5.16.0"]) select option{background-color:var(--tui-background-elevation-3)}tui-textfield:where(*[data-tui-version="5.16.0"]) select optgroup,tui-textfield:where(*[data-tui-version="5.16.0"]) select option:not(:disabled){color:var(--tui-text-primary)}tui-textfield:where(*[data-tui-version="5.16.0"]) button,tui-textfield:where(*[data-tui-version="5.16.0"]) a,tui-textfield:where(*[data-tui-version="5.16.0"]) tui-icon{pointer-events:auto}tui-textfield:where(*[data-tui-version="5.16.0"])>.t-content{z-index:1;display:flex;block-size:var(--t-height);align-items:center;gap:.25rem;margin-inline-start:auto;isolation:isolate;border-radius:inherit}tui-textfield:where(*[data-tui-version="5.16.0"]) textarea~.t-content{min-inline-size:.5rem}tui-textfield:where(*[data-tui-version="5.16.0"]):is([data-mode~=readonly],[data-state=disabled],._empty) [tuiButtonX],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]._empty~.t-content [tuiButtonX],tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiInput]:disabled~.t-content [tuiButtonX]{display:none}tui-textfield:where(*[data-tui-version="5.16.0"]) .t-filler{pointer-events:none!important;color:var(--tui-text-tertiary)}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiFluidTypography]{font-weight:700}tui-textfield:where(*[data-tui-version="5.16.0"]) [tuiSelectLike]:not(:read-only){cursor:pointer}tui-textfield:where(*[data-tui-version="5.16.0"]):has(input[type=tel]){direction:ltr}tui-textfield:where(*[data-tui-version="5.16.0"]):is([data-mode~=invalid],.tui-invalid,:invalid):not([data-mode~=readonly],[data-mode~=valid],[data-state=disabled],:disabled,._disabled) [tuiInput]:not(._empty)~[tuiLabel],tui-textfield:where(*[data-tui-version="5.16.0"]):is([data-mode~=invalid],.tui-invalid,:invalid):not([data-mode~=readonly],[data-mode~=valid],[data-state=disabled],:disabled,._disabled)[multi]:not(._empty) [tuiLabel]{color:var(--tui-text-negative)}tui-textfield:where(*[data-tui-version="5.16.0"]):not([data-mode~=readonly]):focus-visible:not([data-focus=false]) [tuiLabel]{color:var(--tui-text-primary)!important;font:var(--t-label-font);transform:translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2))}tui-textfield:where(*[data-tui-version="5.16.0"]):not([data-mode~=readonly])[data-focus=true] [tuiLabel]{color:var(--tui-text-primary)!important;font:var(--t-label-font);transform:translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2))}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"]){flex-wrap:nowrap;overflow:scroll;align-items:stretch;cursor:text;max-block-size:calc(var(--t-vertical) * 2 + var(--t-item-height) * var(--t-rows));overscroll-behavior-x:none;scroll-behavior:var(--tui-scroll-behavior)}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"]):before,tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"]):after{position:sticky;inset-block-start:0;inset-inline-start:0;block-size:10rem;min-block-size:calc(var(--t-height) * (1 - .2 * var(--t-zoom)));max-block-size:calc((var(--t-item-height, calc(var(--t-height) - 2 * var(--t-vertical))) + 2 * var(--t-vertical)) * (1 - .2 * var(--t-zoom)))}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-scrollbar{transform:translate(calc(var(--t-padding) * var(--tui-inline)));margin-inline-start:calc(-1 * var(--t-start));margin-inline-end:calc(1px - 100% + var(--t-start))}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-scrollbar .t-bar_horizontal{display:none}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items{position:sticky;z-index:-1;display:flex;inset-inline-start:var(--t-start);min-inline-size:0;min-block-size:var(--t-height);block-size:fit-content;flex:1;align-items:center;flex-wrap:wrap;padding:var(--t-vertical) 0;transition-duration:inherit;box-sizing:border-box;view-timeline:--t-scrollbar-y y}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items:after{content:"";min-inline-size:1px;min-block-size:1px}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items_horizontal{clip-path:inset(0 0 0 calc(var(--t-start) / 2 - var(--t-padding) - .5rem));flex-wrap:nowrap}[dir=rtl] tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items_horizontal{clip-path:inset(0 calc(var(--t-start) / 2 - var(--t-padding) - .5rem) 0 0)}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items_horizontal>.t-input{padding-inline-end:calc(var(--t-side) + var(--t-end) + var(--t-padding) + .25rem)}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items>.t-input{position:relative;display:flex;align-items:center;flex:1;block-size:var(--t-item-height, 1.25em);max-block-size:calc(var(--t-height) - 2 * var(--t-vertical));max-inline-size:100%;pointer-events:none;transform:translate(var(--t-scroll))}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items>.t-input .t-filler,tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items>.t-input [tuiInput]{inset-block-start:-5%;block-size:110%;padding:0;pointer-events:auto}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items>.t-input .t-ghost{visibility:hidden;white-space:pre;text-overflow:clip;padding-inline-end:.125rem;block-size:100%}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items>.t-input .t-filler_hidden{display:none}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._with-label[data-size=l]{--t-vertical: .5625rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._with-label[data-size=l] tui-textfield-item:first-of-type{margin-block-start:1.125rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._with-label[data-size=m]{--t-vertical: .4375rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._with-label[data-size=m] tui-textfield-item:first-of-type{margin-block-start:.875rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._with-label>.t-items{align-items:flex-end}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._with-label>.t-items>label[tuiLabel]{min-inline-size:100%;margin:calc(var(--t-height) / 2 - var(--t-vertical) - .625em) 0;margin-inline-end:-100%;padding:0}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-content{position:sticky;min-block-size:var(--t-height);block-size:calc(var(--t-item-height) + 2 * var(--t-vertical));inset-block-start:0;inset-inline-start:calc(100% - var(--t-side) - var(--t-end))}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])>.t-items input:not(:focus)::placeholder,tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-mode~=readonly]>.t-items input::placeholder,tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-mode~=readonly]>.t-items label~.t-input input::placeholder{opacity:0}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._empty>.t-items input::placeholder,tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-focus=true]:not([data-mode~=readonly]):not(:focus-within)>.t-items input::placeholder{opacity:1}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-state=disabled],tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-mode~=readonly]{pointer-events:none}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-state=disabled] select,tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-mode~=readonly] select{display:none}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=l]{--t-vertical: .625rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=l]:after{inset-inline-start:calc(100% - var(--t-end) - var(--t-padding) + .25rem)}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=m]{--t-vertical: .5rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=m]:before{inset-inline-start:-.125rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=m]:after{inset-inline-start:calc(100% - var(--t-end) - .25rem)}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-vertical: .125rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=s]:before{inset-inline-start:-.25rem}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])[data-size=s]:after{inset-inline-start:calc(100% - var(--t-end))}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"]) tui-textfield-item{transform:translate(var(--t-scroll))}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"]) input::placeholder{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard)}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"]) select{opacity:0;pointer-events:none!important}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._empty>.t-items select~.t-filler{display:block}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"])._empty:not([data-focus=true])>.t-items select~.t-filler{color:var(--tui-text-secondary)}tui-textfield[multi][multi]:where(*[data-tui-version="5.16.0"]):has([tuiSelectLike]){cursor:pointer}
|
|
13
|
+
`],encapsulation:2})}}return t})();var Yu=(()=>{class t{constructor(){this.el=Be(),this.control=C($r,{optional:!0}),this.handlers=C(xi),this.textfield=C(li),this.dropdown=C(kr),this.a=ps(C(Pa).appearance),this.s=ib(re(()=>this.state())),this.m=ab(re(()=>this.mode())),this.f=nb(re(()=>this.focused()??this.textfield.focused())),this.readOnly=U(!1),this.invalid=U(null),this.focused=U(null),this.state=U(null),this.value=Wc(this.el),this.mode=re(()=>this.readOnly()?"readonly":this.invalid()===!1?"valid":this.invalid()?"invalid":null)}setValue(r){this.el.focus(),this.el.select(),r==null?(this.el.ownerDocument.execCommand("delete"),this.el.value=""):this.el.ownerDocument.execCommand("insertText",!1,this.handlers.stringify()(r))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["input","tuiInput",""]],hostAttrs:["tuiInput",""],hostVars:4,hostBindings:function(i,n){i&1&&Ce("focusin",function(){return 0})("focusout",function(){return 0})("input",function(){return 0}),i&2&&(Wr("readOnly",n.readOnly()),Ve("role",n.dropdown.content()&&!n.el.matches("select")?"combobox":null),Ze("_empty",n.value()===""))},inputs:{readOnly:[1,"readOnly"],invalid:[1,"invalid"],focused:[1,"focused"],state:[1,"state"]},features:[_e([wd(t)]),Le([pd,m1])]})}}return t})(),C1=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,features:[Le([{directive:Yu,inputs:["invalid","invalid","focused","focused","readOnly","readOnly","state","state"]}])]})}}return t})();var OM=["*"];function RM(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}function PM(t,e){if(t&1&&(L(0,"div",5),Me(1,RM,2,1,"ng-container",6),B()),t&2){let r=Q(2);R(),Z("polymorpheusOutlet",r.textContent())}}function NM(t,e){if(t&1&&(L(0,"div",2),Z0(),L(1,"svg",3),ye(2,"circle",4),B(),de(3,PM,2,1,"div",5),B()),t&2){let r=Q();Ze("t-loader_inherit-color",r.inheritColor()),R(3),fe(r.textContent()?3:-1)}}var FM={size:"m",inheritColor:!1,overlay:!1},[BM,V$]=ut(FM),_d=(()=>{class t{constructor(){this.options=C(BM),this.isApple=Ab(Be())||C(Co),this.size=U(this.options.size),this.inheritColor=U(this.options.inheritColor),this.overlay=U(this.options.overlay),this.textContent=U(),this.loading=U(!0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-loader"]],hostVars:3,hostBindings:function(i,n){i&2&&(Ve("data-size",n.size()),Ze("_loading",n.loading()))},inputs:{size:[1,"size"],inheritColor:[1,"inheritColor"],overlay:[1,"overlay"],textContent:[1,"textContent"],loading:[1,"loading"]},ngContentSelectors:OM,decls:3,vars:7,consts:[[1,"t-content",3,"disabled"],[1,"t-loader",3,"t-loader_inherit-color"],[1,"t-loader"],["height","100%","width","100%",1,"t-icon"],[1,"t-circle"],[1,"t-text"],[4,"polymorpheusOutlet"]],template:function(i,n){i&1&&(kt(),L(0,"fieldset",0),Qe(1),B(),de(2,NM,4,3,"div",1)),i&2&&(st("opacity",n.overlay()&&n.loading()?.3:null)("pointer-events",n.loading()?"none":null),Z("disabled",n.loading()&&!n.isApple),Ve("inert",n.loading()||null),R(2),fe(n.loading()?2:-1))},dependencies:[Er],styles:["[_nghost-%COMP%]{position:relative;display:grid;flex-shrink:0;--tui-thickness: calc(var(--t-diameter) / 12)}._loading[_nghost-%COMP%]{overflow:hidden}[data-size=xs][_nghost-%COMP%]{--t-diameter: .75em}[data-size=s][_nghost-%COMP%]{--t-diameter: 1em}[data-size=m][_nghost-%COMP%]{--t-diameter: 1.5em}[data-size=l][_nghost-%COMP%]{--t-diameter: 2.5em}[data-size=xl][_nghost-%COMP%]{--t-diameter: 3.5em}[data-size=xxl][_nghost-%COMP%]{--t-diameter: 5em}.t-content[_ngcontent-%COMP%]{grid-area:1 / 1;padding:0;margin:0;border:none;isolation:inherit;min-inline-size:0;min-block-size:0}.t-loader[_ngcontent-%COMP%]{position:relative;display:flex;grid-area:1 / 1;flex-direction:column;gap:1rem;align-items:center;justify-content:center;color:var(--tui-text-primary);stroke:var(--tui-background-accent-1);font-size:1rem}[data-size=xs][_nghost-%COMP%] .t-loader[_ngcontent-%COMP%], [data-size=s][_nghost-%COMP%] .t-loader[_ngcontent-%COMP%]{flex-direction:row}.t-loader.t-loader_inherit-color[_ngcontent-%COMP%]{color:inherit;stroke:currentColor}.t-text[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:var(--tui-typography-body-s);color:inherit;max-inline-size:100%;text-align:center}@keyframes _ngcontent-%COMP%_tuiLoaderRotate{0%{transform:rotate(-90deg)}50%{transform:rotate(-90deg) rotate(1turn)}to{transform:rotate(-90deg) rotate(3turn)}}.t-icon[_ngcontent-%COMP%]{inline-size:var(--t-diameter);block-size:var(--t-diameter);animation:_ngcontent-%COMP%_tuiLoaderRotate 4s linear infinite}@keyframes _ngcontent-%COMP%_tuiLoaderDashOffset{0%{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}50%{stroke-dashoffset:calc(.05 * calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness))))}to{stroke-dashoffset:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)))}}.t-circle[_ngcontent-%COMP%]{r:calc(var(--t-diameter) / 2 - var(--tui-thickness));cx:50%;cy:50%;stroke-dasharray:calc(2 * 3.14159265 * calc(var(--t-diameter) / 2 - var(--tui-thickness)));fill:none;stroke:inherit;stroke-width:max(var(--tui-thickness),1.5px);stroke-linecap:round;animation:_ngcontent-%COMP%_tuiLoaderDashOffset 4s linear infinite}"]})}}return t})();var LM=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-alert-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiAlert]:where(*[data-tui-version="5.16.0"]){position:relative;display:grid;grid-column:1;place-self:start start;isolation:isolate;--tui-from: translateX(-100%)}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-inline=end]{justify-self:end;--tui-from: translateX(100%)}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-inline=center]{justify-self:center;--tui-from: translateY(-100%)}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]{align-self:end}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end][data-inline=center]{--tui-from: translateY(100%)}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(1){grid-row:16}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(2){grid-row:17}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(3){grid-row:18}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(4){grid-row:19}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(5){grid-row:20}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(6){grid-row:21}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(7){grid-row:22}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(8){grid-row:23}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(9){grid-row:24}[tuiAlert]:where(*[data-tui-version="5.16.0"])[data-block=end]:nth-of-type(10){grid-row:25}[tuiAlert]:where(*[data-tui-version="5.16.0"]).tui-enter,[tuiAlert]:where(*[data-tui-version="5.16.0"]).tui-leave{animation-name:tuiFade,tuiSlide,tuiCollapse}[tuiAlert]:where(*[data-tui-version="5.16.0"]):not(:first-of-type){margin-block-start:0!important}[tuiAlert]:where(*[data-tui-version="5.16.0"]):not(:last-of-type){margin-block-end:0!important}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(1){grid-row:5}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(2){grid-row:6}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(3){grid-row:7}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(4){grid-row:8}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(5){grid-row:9}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(6){grid-row:10}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(7){grid-row:11}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(8){grid-row:12}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(9){grid-row:13}[tuiAlert]:where(*[data-tui-version="5.16.0"]):nth-of-type(10){grid-row:14}[tuiAlert]:where(*[data-tui-version="5.16.0"])>*{grid-row:1 / span 2}[tuiAlert]:where(*[data-tui-version="5.16.0"])>*:before,[tuiAlert]:where(*[data-tui-version="5.16.0"])>*:after{content:"";display:block;block-size:.375rem}
|
|
14
|
+
`],encapsulation:2})}}return t})(),w1=(()=>{class t{constructor(){this.nothing=$t(LM),this.context=Cs()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,hostAttrs:["data-tui-version","5.16.0","role","alert","tuiAlert",""],hostVars:2,hostBindings:function(i,n){i&2&&Ve("data-block",n.context.block)("data-inline",n.context.inline)}})}}return t})(),_1=(()=>{class t extends Jb{constructor(r,i=C(aa)){super(i),this.current=new Map,this.queue=new Set,this.concurrency=Math.min(r,5)}add(r){return this.current.size<this.concurrency?this.current.set(r,this.service.add(r)):this.queue.add(r),()=>{this.current.get(r)?.destroy(),this.current.delete(r),this.queue.delete(r);let[i]=this.queue;this.current.size<this.concurrency&&i&&(this.current.set(i,this.service.add(i)),this.queue.delete(i))}}static{this.\u0275fac=function(i){Kn()}}static{this.\u0275prov=Xe({token:t,factory:t.\u0275fac})}}return t})();var VM=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-title-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiTitle]:where(*[data-tui-version="5.16.0"]){position:relative;display:flex;min-inline-size:0;flex-direction:column;text-align:start;gap:.25rem;margin:0;font:var(--tui-typography-ui-m)}[tuiTitle]:where(*[data-tui-version="5.16.0"])[data-size=s]{gap:.125rem;font:var(--tui-typography-body-s)}[tuiTitle]:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiSubtitle]{font:var(--tui-typography-body-xs)}[tuiTitle]:where(*[data-tui-version="5.16.0"])[data-size=m]{gap:.125rem;font:var(--tui-typography-heading-h5)}[tuiTitle]:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiSubtitle]{font:var(--tui-typography-body-m)}[tuiTitle]:where(*[data-tui-version="5.16.0"])[data-size=l]{gap:.5rem;font:var(--tui-typography-heading-h3)}[tuiTitle]:where(*[data-tui-version="5.16.0"])[data-size=l] [tuiSubtitle]{font:var(--tui-typography-body-m)}[tuiTitle]:where(*[data-tui-version="5.16.0"]) h1,[tuiTitle]:where(*[data-tui-version="5.16.0"]) h2,[tuiTitle]:where(*[data-tui-version="5.16.0"]) h3,[tuiTitle]:where(*[data-tui-version="5.16.0"]) h4,[tuiTitle]:where(*[data-tui-version="5.16.0"]) h5,[tuiTitle]:where(*[data-tui-version="5.16.0"]) h6{margin:0;font:inherit}[tuiTitle]:where(*[data-tui-version="5.16.0"]) [tuiSubtitle]{font:var(--tui-typography-ui-s);margin:0}[tuiButton]:where(*[data-tui-version="5.16.0"]) [tuiTitle]{margin-inline-end:auto}[tuiButton]:where(*[data-tui-version="5.16.0"]) [tuiTitle] [tuiSubtitle]{color:var(--tui-text-secondary)}
|
|
15
|
+
`],encapsulation:2})}}return t})(),x1=(()=>{class t{constructor(){this.nothing=$t(VM),this.tuiTitle=U("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiTitle",""]],hostAttrs:["data-tui-version","5.16.0","tuiTitle",""],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-size",n.tuiTitle()||null)},inputs:{tuiTitle:[1,"tuiTitle"]}})}}return t})();function HM(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}function UM(t,e){if(t&1&&ye(0,"span",7),t&2){let r=e.polymorpheusOutlet;Z("innerHTML",r,Jo)}}function jM(t,e){if(t&1){let r=Kt();L(0,"button",8),Ce("click",function(){Nt(r);let n=Q();return Ft(n.item.$implicit.complete())}),j(1),B()}if(t&2){let r=Q();Z("iconStart",r.icons.close),R(),xe(" ",r.close()," ")}}var qM={info:"@tui.info",positive:"@tui.circle-check",negative:"@tui.circle-x",warning:"@tui.circle-alert",neutral:"@tui.info"},WM={appearance:"info",icon:t=>qM[t]??"",size:"l",data:void 0,autoClose:3e3,label:"",closable:!0,block:"start",inline:"end"},[Ss,kG]=ut(WM),$M=new ee("",{factory:()=>5}),GM=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-notification-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiNotification]:where(*[data-tui-version="5.16.0"]){-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;position:relative;display:flow-root;max-block-size:100%;color:var(--tui-text-primary);padding:var(--t-offset) var(--tui-padding-l);font:var(--tui-typography-body-m);border-radius:var(--tui-radius-l);box-sizing:border-box;text-align:start;text-decoration:none;border-inline-start:var(--t-start) solid transparent;border-inline-end:var(--t-end) solid transparent;--t-offset: calc((var(--t-height) - var(--tui-lh)) / 2);--t-height: var(--tui-height-l);--t-start: 0;--t-end: 0}[tuiNotification]:where(*[data-tui-version="5.16.0"]):is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-icon-start]{--t-start: 2rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-icon-end]{--t-end: 1.5rem}[tuiNotification]:where(*[data-tui-version="5.16.0"]):before{position:absolute;inset-inline-start:-1rem;inset-block-start:calc((var(--t-offset) + var(--tui-lh)) * (1 - .15 * var(--t-zoom)));transform:translateY(-100%)}[tuiNotification]:where(*[data-tui-version="5.16.0"]):after{position:absolute;top:50%;transform:translateY(-50%);inset-inline-end:-.5rem;font-size:1rem;margin:0;margin-inline-end:-.25rem;margin-inline-start:auto;color:var(--tui-text-tertiary)!important}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s]{padding:var(--t-offset) .5rem;font:var(--tui-typography-body-s);border-radius:var(--tui-radius-m);--t-height: var(--tui-height-s)}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s][data-icon-start]{--t-start: 1.5rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s]:before{inset-inline-start:calc(-1rem * (1 - .2 * var(--t-zoom)));inset-block-start:calc((var(--t-offset) + var(--tui-lh)) * (1 - .1 * var(--t-zoom)));font-size:1rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s]:after{inset-inline-end:-.875rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s] tui-icon{font-size:1rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiTitle]{font:var(--tui-typography-body-s);font-weight:700}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiSubtitle]{font:var(--tui-typography-body-s)}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s] [tuiSubtitle]+*{gap:1rem;margin:.375rem 0 .25rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=s]>[tuiIconButton]{inset-block-start:0;inset-inline-end:0}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m]{padding:var(--t-offset) var(--tui-padding-m);font:var(--tui-typography-body-s);border-radius:var(--tui-radius-m);--t-height: var(--tui-height-m)}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m][data-icon-start]{--t-start: 1.625rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m]:before{inset-inline-start:-.875rem;font-size:1.25rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m]:after{inset-inline-end:-.75rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m] tui-icon{font-size:1.25rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiTitle]{font:var(--tui-typography-ui-m);font-weight:700}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiSubtitle]{font:var(--tui-typography-body-s)}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m] [tuiSubtitle]+*{gap:1rem;margin:.625rem 0 .25rem}[tuiNotification]:where(*[data-tui-version="5.16.0"])[data-size=m]>[tuiIconButton]{inset-block-start:.375rem;inset-inline-end:.5rem}[tuiNotification]:where(*[data-tui-version="5.16.0"]) [tuiTitle]{gap:.125rem;font:var(--tui-typography-ui-l);font-weight:700}[tuiNotification]:where(*[data-tui-version="5.16.0"]) [tuiSubtitle]{font:var(--tui-typography-body-m)}[tuiNotification]:where(*[data-tui-version="5.16.0"]) [tuiSubtitle]+*{display:flex;align-items:center;gap:1.25rem;margin-block-start:.625rem;font:var(--tui-typography-body-s)}[tuiNotification]:where(*[data-tui-version="5.16.0"])>[tuiIconButton]{position:absolute;inset-block-start:.75rem;inset-inline-end:.75rem;box-shadow:none!important;background:transparent!important}
|
|
16
|
+
`],encapsulation:2})}}return t})(),Ku=(()=>{class t{constructor(){this.options=C(Ss),this.nothing=$t(GM),this.icons=ms(re((r=this.icon())=>Dn(r)?r:r(this.appearance()))),this.appearance=U(this.options.appearance),this.size=U(this.options.size),this.icon=U(this.options.icon)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiNotification","",5,"ng-template"]],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-size",n.size())},inputs:{appearance:[1,"appearance"],size:[1,"size"],icon:[1,"icon"]},features:[_e([Mn(Ss),Fb({appearance:""}),Gr({appearance:"outline-grayscale",size:"s"})]),Le([Yi,In])]})}}return t})(),YM=(()=>{class t{constructor(){this.el=Be(),this.icons=C(Xc),this.close=C(mb),this.item=Cs(),this.sub=je(typeof this.item.autoClose=="function"?this.item.autoClose(this.item.appearance):this.item.autoClose).pipe(mt(r=>r?Mi(r):sr),lr(ur(this.el,"mouseenter")),wa({delay:()=>ur(this.el,"mouseleave")}),Bt()).subscribe(()=>this.item.$implicit.complete())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-notification-alert"]],hostAttrs:["role","alert"],features:[Le([An,w1])],decls:8,vars:9,consts:[[1,"t-wrapper"],["size","m","tuiNotification","",3,"appearance","icon"],["tuiTitle",""],[4,"polymorpheusOutlet","polymorpheusOutletContext"],["tuiSubtitle",""],[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],["tuiIconButton","","type","button",3,"iconStart"],[3,"innerHTML"],["tuiIconButton","","type","button",3,"click","iconStart"]],template:function(i,n){i&1&&(L(0,"div")(1,"div",0)(2,"div",1)(3,"span",2),Me(4,HM,2,1,"ng-container",3),L(5,"span",4),Me(6,UM,1,1,"span",5),B()(),de(7,jM,2,2,"button",6),B()()()),i&2&&(R(2),Ze("t-closable",n.item.closable),Z("appearance",n.item.appearance)("icon",n.item.icon),R(2),Z("polymorpheusOutlet",n.item.label)("polymorpheusOutletContext",n.item),R(2),Z("polymorpheusOutlet",n.item.content)("polymorpheusOutletContext",n.item),R(),fe(n.item.closable?7:-1))},dependencies:[Er,_i,Ku,x1],styles:["[_nghost-%COMP%]{inline-size:18rem;margin:1.625rem 3rem;word-break:break-word;transform:translateZ(0)}[_nghost-%COMP%] tui-root._mobile[_nghost-%COMP%], tui-root._mobile [_nghost-%COMP%]{margin:.625rem 1rem}.t-wrapper[_ngcontent-%COMP%]{background:var(--tui-background-base);box-shadow:var(--tui-shadow-medium);border-radius:var(--tui-radius-m)}.t-closable[data-size][_ngcontent-%COMP%]{padding-inline-end:2.5rem}"]})}}return t})(),T1=(()=>{class t extends _1{constructor(r){super(C($M),r),this.options=C(Ss),this.component=YM}static{this.\u0275fac=function(i){Kn()}}static{this.\u0275prov=Xe({token:t,factory:function(i){let n=null;return i?n=new i:n=new t(Xo(aa)),n},providedIn:"root"})}}return t})();var S1=(()=>{class t{constructor(){this.tuiPlatform=U(C(ev,{skipSelf:!0}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiPlatform",""]],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-platform",n.tuiPlatform())},inputs:{tuiPlatform:[1,"tuiPlatform"]},features:[_e([{provide:ev,useFactory:()=>C(t).tuiPlatform()}])]})}}return t})();var D1=(()=>{class t extends It{visualViewport=C(Cr).visualViewport;stream$=this.visualViewport?nr(ur(this.visualViewport,"resize"),ur(this.visualViewport,"scroll"),ur(this.visualViewport,"scrollend")).pipe(Ht(null),Ie(()=>this.visualViewport),xt(Boolean),Zo({bufferSize:1,refCount:!0})):sr;constructor(){super(r=>this.stream$.subscribe(r))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var E1=(()=>{class t{constructor(){this.w=C(Cr),this.style=Be().style,this.minInnerHeight=1/0,this.$=C(D1).pipe(Bt()).subscribe(({offsetLeft:r,offsetTop:i,height:n,width:a,scale:o})=>{this.minInnerHeight=Math.min(this.minInnerHeight,this.w.innerHeight),this.style.setProperty("--tui-viewport-x",br(r)),this.style.setProperty("--tui-viewport-y",br(i)),this.style.setProperty("--tui-viewport-height",br(n)),this.style.setProperty("--tui-viewport-width",br(a)),this.style.setProperty("--tui-viewport-scale",String(o)),this.style.setProperty("--tui-viewport-vh",br(this.w.innerHeight/100)),this.style.setProperty("--tui-viewport-vw",br(this.w.innerWidth/100)),this.style.setProperty("--tui-viewport-svh",br(this.minInnerHeight/100))})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiVisualViewport",""]]})}}return t})();var XM=["*",[["tuiOverContent"]]],QM=["*","tuiOverContent"];function JM(t,e){t&1&&ye(0,"tui-scroll-controls",1)}function eI(t,e){if(t&1&&(de(0,JM,1,0,"tui-scroll-controls",1),L(1,"tui-popups"),Qe(2,1),B()),t&2){let r=Q();fe(r.scrollbars?0:-1)}}var k1=(()=>{class t{constructor(){this.doc=C(Tt),this.el=Be(),this.child=!!C(t,{optional:!0,skipSelf:!0}),this.reducedMotion=C(Rp),this.duration=Hb(C(pb)),this.top=ge(this.parent),this.breakpoint=C(vb),this.liquidGlass=C(qb),this.scrollbars=!C(On)&&!this.child&&C(ud).mode!=="native"&&C(hd).scrollbars!=="native"}get parent(){return this.doc.fullscreenElement?this.doc.fullscreenElement===this.el:!this.child}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-root"]],hostAttrs:["data-tui-version","5.16.0"],hostVars:8,hostBindings:function(i,n){i&1&&Ce("fullscreenchange",function(){return n.top.set(n.parent)},es)("touchstart.passive.zoneless",function(){return 0}),i&2&&(st("--tui-duration",n.duration,"ms")("--tui-scroll-behavior",n.reducedMotion?"auto":"smooth"),Ze("_mobile",n.breakpoint()==="mobile")("tui-liquid-glass",n.liquidGlass))},features:[Le([S1,E1,Lb])],ngContentSelectors:QM,decls:3,vars:1,consts:[[1,"t-root-content"],[1,"t-root-scrollbar"]],template:function(i,n){i&1&&(kt(XM),L(0,"div",0),Qe(1),B(),de(2,eI,3,1)),i&2&&(R(2),fe(n.top()?2:-1))},dependencies:[t1,zu],styles:[`@keyframes tuiPresent{to{content:""}}@keyframes tuiFade{0%{opacity:0}}@keyframes tuiSlide{0%{transform:var(--tui-from, translateY(100%))}}@keyframes tuiScale{0%{transform:scale(var(--tui-scale, 0))}}@keyframes tuiCollapse{0%{grid-template-rows:0fr}to{grid-template-rows:1fr}}@keyframes tuiBlur{0%{filter:blur(var(--tui-blur, .25rem))}}.tui-enter,.tui-leave{animation-duration:var(--tui-duration);animation-timing-function:var(--tui-curve-productive-entrance);pointer-events:none}.tui-leave{animation-direction:reverse;animation-timing-function:var(--tui-curve-productive-exit)}
|
|
17
|
+
`,`.tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.tui-zero-scrollbar::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body,input{margin:0}tui-root{position:relative;display:block;font:var(--tui-typography-body-s);color:var(--tui-text-primary);flex:1;border-image:conic-gradient(var(--tui-background-base) 0 0) fill 0/0/0 0 100vh 0;-webkit-tap-highlight-color:transparent}tui-root:has(>tui-popups tui-modal)>.t-root-content{interactivity:inert}tui-root>.t-root-scrollbar{position:fixed;inset:0;z-index:0}.t-root-content{position:relative;inset-block-start:var(--t-root-top);block-size:100%;isolation:isolate}.t-root-content>*{--t-root-top: 0}[tuiDropdownButton][tuiDropdownButton]{display:none}
|
|
18
|
+
`],encapsulation:2,changeDetection:1})}}return t})();function tI(t,e){t&1&&rt(0)}var rI=["*"];function iI(t,e){if(t&1&&ye(0,"span",1),t&2){let r=e.polymorpheusOutlet;Z("innerHTML",r,Jo)}}var nI=new ee("",{factory:()=>cI}),aI=(()=>{class t extends Hc{constructor(){super(...arguments),this.type="hint"}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=te({type:t,features:[Ae]})}}return t})(),M1=["bottom-start","bottom","bottom-end","top-start","top","top-end","start-top","start","start-bottom","end-top","end","end-bottom"],oI={direction:"bottom-start",centered:!0,showDelay:500,hideDelay:200,appearance:"",icon:"@tui.circle-help"},[pv,D7]=ut(oI),Dd=(()=>{class t extends Ia{constructor(){super(r=>this.stream$.subscribe(r)),this.isMobile=C(On),this.el=Be(),this.hovered$=C(Vu),this.options=C(pv),this.visible=!1,this.toggle$=new tr,this.stream$=nr(this.toggle$.pipe(mt(r=>this.isMobile?je(r).pipe(xn(0)):je(r).pipe(xn(r?0:this.hideDelay()))),lr(this.hovered$),wa()),this.hovered$.pipe(mt(r=>this.isMobile?je(r).pipe(xn(0)):je(r).pipe(xn(r?this.showDelay():this.hideDelay()))),lr(this.toggle$),wa())).pipe(xt(()=>this.enabled),Ie(r=>r&&(this.el.hasAttribute("tuiHintPointer")||!Wp(this.el))),Nr(r=>{this.visible=r})),this.parent=C(t,{optional:!0,skipSelf:!0}),this.showDelay=U(this.options.showDelay,{alias:"tuiHintShowDelay"}),this.hideDelay=U(this.options.hideDelay,{alias:"tuiHintHideDelay"}),this.type="hint",this.enabled=!0}toggle(r=!this.visible){this.toggle$.next(r),this.parent?.toggle(r)}close(){this.toggle$.next(!1)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,inputs:{showDelay:[1,"tuiHintShowDelay","showDelay"],hideDelay:[1,"tuiHintHideDelay","hideDelay"]},exportAs:["tuiHintHover"],features:[_e([hs(t),Vu]),Ae]})}}return t})(),xd=8,Ds=22,wr=1,Mr=0,A1=(()=>{class t extends Jn{constructor(){super(...arguments),this.el=Be(),this.viewport=C(vs),this.options=C(pv),this.directionChange=new tr,this.accessor=fs("hint")(C(kn,{optional:!0}),{getClientRect:()=>this.el.getBoundingClientRect()}),this.points=M1.reduce((r,i)=>Ke(ae({},r),{[i]:[0,0]}),{}),this.direction=U(this.options.direction,{alias:"tuiHintDirection"}),this.offset=U(C(On)?16:8,{alias:"tuiHintOffset"}),this.centered=U(this.options.centered,{alias:"tuiHintCentered"}),this.tuiHintDirectionChange=En(this.directionChange.pipe(rr())),this.type="hint"}getPosition({width:r,height:i}){let n=this.direction(),a=this.accessor.getClientRect(),o=a.left+a.width/2,s=a.top+a.height/2,u=this.el.matches('[dir="rtl"] :scope'),l=a.width<Ds*2||this.centered(),c=a.height<Ds*2||this.centered(),d=l?o-Ds:a.left,f=l?o-r+Ds:a.right-r,p=c?s-Ds:a.top,h=c?s-i+Ds:a.bottom-i;this.points["top-start"][wr]=a.top-i-this.offset(),this.points["top-start"][Mr]=this.centered()?f:d,this.points.top[wr]=this.points["top-start"][wr],this.points.top[Mr]=o-r/2,this.points["top-end"][wr]=this.points["top-start"][wr],this.points["top-end"][Mr]=this.centered()?d:f,this.points["bottom-start"][wr]=a.bottom+this.offset(),this.points["bottom-start"][Mr]=this.points["top-start"][Mr],this.points.bottom[wr]=this.points["bottom-start"][wr],this.points.bottom[Mr]=this.points.top[Mr],this.points["bottom-end"][wr]=this.points["bottom-start"][wr],this.points["bottom-end"][Mr]=this.points["top-end"][Mr],this.points["start-top"][wr]=this.centered()?h:p,this.points["start-top"][Mr]=a.left-r-this.offset(),this.points.start[wr]=s-i/2,this.points.start[Mr]=this.points["start-top"][Mr],this.points["start-bottom"][wr]=this.centered()?h:p,this.points["start-bottom"][Mr]=this.points["start-top"][Mr],this.points["end-top"][wr]=this.points["start-top"][wr],this.points["end-top"][Mr]=a.right+this.offset(),this.points.end[wr]=this.points.start[wr],this.points.end[Mr]=this.points["end-top"][Mr],this.points["end-bottom"][wr]=this.points["start-bottom"][wr],this.points["end-bottom"][Mr]=this.points["end-top"][Mr];let m=(Array.isArray(n)?n:[n]).map(y=>I1(y,u)).concat(M1).find(y=>this.checkPosition(this.points[y],r,i))||this.fallback;return this.directionChange.next(I1(m,u)),this.points[m]}get fallback(){return this.points.top[wr]>this.viewport.getClientRect().bottom-this.points.bottom[wr]?"top":"bottom"}checkPosition([r,i],n,a){let o=this.viewport.getClientRect();return i>o.top+xd&&r>o.left+xd&&i+a<o.bottom-xd&&r+n<o.right-xd}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=te({type:t,inputs:{direction:[1,"tuiHintDirection","direction"],offset:[1,"tuiHintOffset","offset"],centered:[1,"tuiHintCentered","centered"]},outputs:{tuiHintDirectionChange:"tuiHintDirectionChange"},features:[Ae]})}}return t})();function I1(t,e){return e&&t.includes("left")?t.replace("left","right"):e&&t.includes("right")?t.replace("right","left"):t}var ua=(()=>{class t{constructor(){this.service=C(aa),this.ref=ge(null),this.content=U(null,{alias:"tuiHint"}),this.context=U(void 0,{alias:"tuiHintContext"}),this.appearance=U(C(pv).appearance,{alias:"tuiHintAppearance"}),this.visible=En(ds(this.ref).pipe(Ie(Boolean),fc(1)),{alias:"tuiHintVisible"}),this.component=C(Ti),this.el=Be(),this.type="hint"}ngOnChanges(){this.content()||this.toggle(!1)}ngOnDestroy(){this.toggle(!1)}getClientRect(){return this.el.getBoundingClientRect()}toggle(r){r&&this.content()&&!this.ref()?this.ref.set(this.service.add(this.component)):r||(this.ref()?.destroy(),this.ref.set(null))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],inputs:{content:[1,"tuiHint","content"],context:[1,"tuiHintContext","context"],appearance:[1,"tuiHintAppearance","appearance"]},outputs:{visible:"tuiHintVisible"},features:[_e([Vc(t),{provide:Ti,deps:[nI,oi],useClass:Ti}]),Le([aI,{directive:Dd,inputs:["tuiHintHideDelay","tuiHintHideDelay","tuiHintShowDelay","tuiHintShowDelay"]},{directive:A1,inputs:["tuiHintDirection","tuiHintDirection","tuiHintCentered","tuiHintCentered","tuiHintOffset","tuiHintOffset"],outputs:["tuiHintDirectionChange","tuiHintDirectionChange"]}]),jr]})}}return t})(),sI=(()=>{class t extends Dd{constructor(){super(...arguments),this.currentRect=ea}getClientRect(){return this.currentRect}onMove({clientX:r,clientY:i}){this.currentRect=Mp(r,i)}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=te({type:t,selectors:[["","tuiHint","","tuiHintPointer",""]],hostBindings:function(i,n){i&1&&Ce("mousemove.zoneless",function(o){return n.onMove(o)})},features:[_e([Tp(t),hs(t)]),Ae]})}}return t})(),uI=(()=>{class t{constructor(){this.hint=C(ua)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],decls:1,vars:1,consts:[[4,"polymorpheusOutlet"]],template:function(i,n){i&1&&Me(0,tI,1,0,"ng-container",0),i&2&&Z("polymorpheusOutlet",n.hint.content())},dependencies:[Er],encapsulation:2})}}return t})();function lI(){return[ws,Vu,Lc("hint",A1),zc("hint",Ut(()=>ua))]}var Td=8,Sd=22,cI=(()=>{class t{constructor(){this.el=Be(),this.hover=C(Dd),this.vvs=C(bd),this.viewport=C(vs),this.pointer=C(sI,{optional:!0}),this.accessor=C(kn),this.hint=C(ua),this.content=this.hint.component.component===uI?ge(""):this.hint.content,this.theme=this.hint.el.closest("[tuiTheme]")?.getAttribute("tuiTheme"),this.appearance=ps(this.hint.appearance),C(ws).pipe(Eu(()=>this.hint.el.isConnected&&!!this.hint.el.getBoundingClientRect().height),Ie(r=>this.vvs.correct(r)),Bt()).subscribe({next:r=>this.update(...r),complete:()=>this.hint.toggle(!1)}),C(Vu).pipe(Bt()).subscribe(r=>this.hover.toggle(r))}onClick(r){(!r.closest(this.el.tagName)&&!this.hint.el.contains(r)||Wp(this.hint.el))&&this.hover.toggle(!1)}apply(r,i,n,a){this.el.style.setProperty("top",r),this.el.style.setProperty("left",i),this.el.style.setProperty("--t-top",`${n}%`),this.el.style.setProperty("--t-left",`${a}%`),this.el.style.setProperty("--t-rotate",!a||Math.ceil(a)===100?"90deg":"0deg")}update(r,i){let{clientHeight:n,clientWidth:a}=this.el,o=this.accessor.getClientRect();if(o===ea||!n||!a)return;let s=this.viewport.getClientRect(),u=Ma(Math.max(Td,r),s.left+Td,Math.max(Td,s.width+s.left-a-Td)),l=Math.round(u)===Math.round(o.left),c=Math.round(i)===Math.round(o.top),d=Math.round(u+a)===Math.round(o.right),f=Math.round(i+n)===Math.round(o.bottom),[p,h]=this.vvs.correct([o.left+o.width/2-u,o.top+o.height/2-i]),g=l?Sd:d?a-Sd:p,v=c?Sd:f?n-Sd:h;this.apply(br(Math.round(i)),br(Math.round(u)),Math.round(Ma(v,0,n)/n*100),Math.round(Ma(g,0,a)/a*100))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-hint"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(i,n){i&1&&Ce("click",function(o){return n.onClick(o.target)},es),i&2&&(Ve("tuiTheme",n.theme),Ze("_untouchable",n.pointer))},features:[_e([lI(),Gr({size:"s"})]),Le([hn,An,oa])],ngContentSelectors:rI,decls:2,vars:2,consts:[[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],[3,"innerHTML"]],template:function(i,n){i&1&&(kt(),Qe(0),Me(1,iI,1,1,"span",0)),i&2&&(R(),Z("polymorpheusOutlet",n.content())("polymorpheusOutletContext",n.hint.context()))},dependencies:[Er],styles:[`[_nghost-%COMP%]{position:absolute;max-inline-size:min(20rem,calc(100% - 1rem));padding:.75rem 1rem;background:var(--tui-background-accent-1);border-radius:var(--tui-radius-l);color:var(--tui-text-primary-on-accent-1);box-sizing:border-box;font:var(--tui-typography-body-s);white-space:pre-line;overflow-wrap:break-word;transform-origin:var(--t-left) var(--t-top);--tui-background-elevation-2: var(--tui-background-elevation-3);--tui-scale: .5}.tui-enter[_nghost-%COMP%]{animation:tuiFade var(--tui-duration) var(--tui-curve-expressive-standard),tuiScale var(--tui-duration) var(--tui-curve-expressive-standard) 10ms}.tui-leave[_nghost-%COMP%]{animation:tuiFade calc(var(--tui-duration) / 2) var(--tui-curve-expressive-standard) reverse,tuiScale calc(var(--tui-duration) / 2) var(--tui-curve-expressive-standard) reverse}[_nghost-%COMP%]:before{content:"";position:absolute;inset-block-start:var(--t-top);inset-inline-start:var(--t-left);inline-size:.75rem;block-size:.5rem;background:inherit;-webkit-mask-image:url('data:image/svg+xml,<svg viewBox="0 0 12 8" xmlns="http://www.w3.org/2000/svg"><path d="M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z" /></svg>');mask-image:url('data:image/svg+xml,<svg viewBox="0 0 12 8" xmlns="http://www.w3.org/2000/svg"><path d="M3.61336 1.69607L2.44882 2.96493C1.84795 3.61964 0.949361 3.99951 0.00053941 4C0.000359608 4 0.000179805 4 0 4C0.000179863 4 0.000359764 4 0.000539623 4C0.949362 4.00049 1.84795 4.38036 2.44882 5.03506L3.61336 6.30394C4.55981 7.33517 5.03303 7.85079 5.63254 7.96535C5.87433 8.01155 6.12436 8.01155 6.36616 7.96535C6.96567 7.85079 7.43889 7.33517 8.38534 6.30393L9.54988 5.03507C10.1511 4.37994 11.0505 4 12 4C11.0505 4 10.1511 3.62006 9.54988 2.96493L8.38534 1.69606C7.43889 0.664826 6.96567 0.149207 6.36616 0.0346517C6.12436 -0.0115506 5.87433 -0.0115506 5.63254 0.0346517C5.03303 0.149207 4.55981 0.664827 3.61336 1.69607Z" /></svg>');transition:none;transform:translate(-50%,-50%) rotate(var(--t-rotate))}[_nghost-%COMP%]:not([style*=top]){visibility:hidden}._untouchable[_nghost-%COMP%]{pointer-events:none}[_nghost-%COMP%] [tuiTitle]{margin-block-end:.75rem}[_nghost-%COMP%] [tuiTitle]+footer{margin-block-start:.75rem}[_nghost-%COMP%] [tuiIconButton][data-appearance=icon][data-size=xs]{float:right;margin-inline-end:-.25rem}@supports (float: inline-end){[_nghost-%COMP%] [tuiIconButton][data-appearance=icon][data-size=xs]{float:inline-end}}[_nghost-%COMP%] img{display:block;border-radius:var(--tui-radius-m)}[_nghost-%COMP%] footer{display:flex;justify-content:flex-end;gap:.5rem;inline-size:18rem;max-inline-size:100%;margin:1rem 0 .25rem}`]})}}return t})();var O1=(()=>{class t extends Ia{constructor(){super(r=>this.stream$.subscribe(r)),this.hover=C(Dd),this.stream$=new xr(!1),this.visible=U(!1,{alias:"tuiHintManual"}),this.type="hint",this.hover.enabled=!1}ngOnChanges(){this.stream$.next(!!this.visible()),this.hover.enabled=this.visible()===null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiHint","","tuiHintManual",""]],inputs:{visible:[1,"tuiHintManual","visible"]},features:[_e([hs(t)]),Ae,jr]})}}return t})();var it="primary",ll=Symbol("RouteTitle"),bv=class{params;constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r[0]:r}return null}getAll(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}};function Do(t){return new bv(t)}function vv(t,e,r){for(let i=0;i<t.length;i++){let n=t[i],a=e[i];if(n[0]===":")r[n.substring(1)]=a;else if(n!==a.path)return!1}return!0}function H1(t,e,r){let i=r.path.split("/"),n=i.indexOf("**");if(n===-1){if(i.length>t.length||r.pathMatch==="full"&&(e.hasChildren()||i.length<t.length))return null;let u={},l=t.slice(0,i.length);return vv(i,l,u)?{consumed:l,posParams:u}:null}if(n!==i.lastIndexOf("**"))return null;let a=i.slice(0,n),o=i.slice(n+1);if(a.length+o.length>t.length||r.pathMatch==="full"&&e.hasChildren()&&r.path!=="**")return null;let s={};return!vv(a,t.slice(0,a.length),s)||!vv(o,t.slice(t.length-o.length),s)?null:{consumed:t,posParams:s}}function Od(t){return new Promise((e,r)=>{t.pipe(Ca()).subscribe({next:i=>e(i),error:i=>r(i)})})}function fI(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Pn(t[r],e[r]))return!1;return!0}function Pn(t,e){let r=t?Cv(t):void 0,i=e?Cv(e):void 0;if(!r||!i||r.length!=i.length)return!1;let n;for(let a=0;a<r.length;a++)if(n=r[a],!U1(t[n],e[n]))return!1;return!0}function Cv(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function U1(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;let r=[...t].sort(),i=[...e].sort();return r.every((n,a)=>i[a]===n)}else return t===e}function hI(t){return t.length>0?t[t.length-1]:null}function Mo(t){return uc(t)?t:gc(t)?Jr(Promise.resolve(t)):je(t)}function j1(t){return uc(t)?Od(t):Promise.resolve(t)}var pI={exact:$1,subset:G1},q1={exact:vI,subset:mI,ignored:()=>!0},W1={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},wv={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function R1(t,e,r){return pI[r.paths](t.root,e.root,r.matrixParams)&&q1[r.queryParams](t.queryParams,e.queryParams)&&!(r.fragment==="exact"&&t.fragment!==e.fragment)}function vI(t,e){return Pn(t,e)}function $1(t,e,r){if(!So(t.segments,e.segments)||!Md(t.segments,e.segments,r)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let i in e.children)if(!t.children[i]||!$1(t.children[i],e.children[i],r))return!1;return!0}function mI(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(r=>U1(t[r],e[r]))}function G1(t,e,r){return Y1(t,e,e.segments,r)}function Y1(t,e,r,i){if(t.segments.length>r.length){let n=t.segments.slice(0,r.length);return!(!So(n,r)||e.hasChildren()||!Md(n,r,i))}else if(t.segments.length===r.length){if(!So(t.segments,r)||!Md(t.segments,r,i))return!1;for(let n in e.children)if(!t.children[n]||!G1(t.children[n],e.children[n],i))return!1;return!0}else{let n=r.slice(0,t.segments.length),a=r.slice(t.segments.length);return!So(t.segments,n)||!Md(t.segments,n,i)||!t.children[it]?!1:Y1(t.children[it],e,a,i)}}function Md(t,e,r){return e.every((i,n)=>q1[r](t[n].parameters,i.parameters))}var Bi=class{root;queryParams;fragment;_queryParamMap;constructor(e=new Ot([],{}),r={},i=null){this.root=e,this.queryParams=r,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Do(this.queryParams),this._queryParamMap}toString(){return bI.serialize(this)}},Ot=class{segments;children;parent=null;constructor(e,r){this.segments=e,this.children=r,Object.values(r).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Id(this)}},Na=class{path;parameters;_parameterMap;constructor(e,r){this.path=e,this.parameters=r}get parameterMap(){return this._parameterMap??=Do(this.parameters),this._parameterMap}toString(){return Z1(this)}};function gI(t,e){return So(t,e)&&t.every((r,i)=>Pn(r.parameters,e[i].parameters))}function So(t,e){return t.length!==e.length?!1:t.every((r,i)=>r.path===e[i].path)}function yI(t,e){let r=[];return Object.entries(t.children).forEach(([i,n])=>{i===it&&(r=r.concat(e(n,i)))}),Object.entries(t.children).forEach(([i,n])=>{i!==it&&(r=r.concat(e(n,i)))}),r}var Ns=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:()=>new Fa})}return t})(),Fa=class{parse(e){let r=new xv(e);return new Bi(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(e){let r=`/${Zu(e.root,!0)}`,i=_I(e.queryParams),n=typeof e.fragment=="string"?`#${CI(e.fragment)}`:"";return`${r}${i}${n}`}},bI=new Fa;function Id(t){return t.segments.map(e=>Z1(e)).join("/")}function Zu(t,e){if(!t.hasChildren())return Id(t);if(e){let r=t.children[it]?Zu(t.children[it],!1):"",i=[];return Object.entries(t.children).forEach(([n,a])=>{n!==it&&i.push(`${n}:${Zu(a,!1)}`)}),i.length>0?`${r}(${i.join("//")})`:r}else{let r=yI(t,(i,n)=>n===it?[Zu(t.children[it],!1)]:[`${n}:${Zu(i,!1)}`]);return Object.keys(t.children).length===1&&t.children[it]!=null?`${Id(t)}/${r[0]}`:`${Id(t)}/(${r.join("//")})`}}function K1(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ed(t){return K1(t).replace(/%3B/gi,";")}function CI(t){return encodeURI(t)}function _v(t){return K1(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ad(t){return decodeURIComponent(t)}function P1(t){return Ad(t.replace(/\+/g,"%20"))}function Z1(t){return`${_v(t.path)}${wI(t.parameters)}`}function wI(t){return Object.entries(t).map(([e,r])=>`;${_v(e)}=${_v(r)}`).join("")}function _I(t){let e=Object.entries(t).map(([r,i])=>Array.isArray(i)?i.map(n=>`${Ed(r)}=${Ed(n)}`).join("&"):`${Ed(r)}=${Ed(i)}`).filter(r=>r);return e.length?`?${e.join("&")}`:""}var xI=/^[^\/()?;#]+/;function mv(t){let e=t.match(xI);return e?e[0]:""}var TI=/^[^\/()?;=#]+/;function SI(t){let e=t.match(TI);return e?e[0]:""}var DI=/^[^=?&#]+/;function EI(t){let e=t.match(DI);return e?e[0]:""}var kI=/^[^&#]+/;function MI(t){let e=t.match(kI);return e?e[0]:""}var xv=class{url;remaining;constructor(e){this.url=e,this.remaining=e}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ot([],{}):new Ot([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(e=0){if(e>50)throw new hr(4010,!1);if(this.remaining==="")return{};this.consumeOptional("/");let r=[];for(this.peekStartsWith("(")||r.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),r.push(this.parseSegment());let i={};this.peekStartsWith("/(")&&(this.capture("/"),i=this.parseParens(!0,e));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1,e)),(r.length>0||Object.keys(i).length>0)&&(n[it]=new Ot(r,i)),n}parseSegment(){let e=mv(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new hr(4009,!1);return this.capture(e),new Na(Ad(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let r=SI(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){let n=mv(this.remaining);n&&(i=n,this.capture(i))}e[Ad(r)]=Ad(i)}parseQueryParam(e){let r=EI(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){let o=MI(this.remaining);o&&(i=o,this.capture(i))}let n=P1(r),a=P1(i);if(Object.hasOwn(e,n)){let o=e[n];Array.isArray(o)||(o=[o],e[n]=o),o.push(a)}else e[n]=a}parseParens(e,r){let i=Object.create(null);for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=mv(this.remaining),a=this.remaining[n.length];if(a!=="/"&&a!==")"&&a!==";")throw new hr(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=it);let s=this.parseChildren(r+1);i[o??it]=Object.keys(s).length===1&&s[it]?s[it]:new Ot([],s),this.consumeOptional("//")}return i}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new hr(4011,!1)}};function X1(t){return t.segments.length>0?new Ot([],{[it]:t}):t}function Q1(t){let e=Object.create(null);for(let[i,n]of Object.entries(t.children)){let a=Q1(n);if(i===it&&a.segments.length===0&&a.hasChildren())for(let[o,s]of Object.entries(a.children))e[o]=s;else(a.segments.length>0||a.hasChildren())&&(e[i]=a)}let r=new Ot(t.segments,e);return II(r)}function II(t){if(t.numberOfChildren===1&&t.children[it]){let e=t.children[it];return new Ot(t.segments.concat(e.segments),e.children)}return t}function Ba(t){return t instanceof Bi}function J1(t,e,r=null,i=null,n=new Fa){let a=eC(t);return tC(a,e,r,i,n)}function eC(t){let e;function r(a){let o={};for(let u of a.children){let l=r(u);o[u.outlet]=l}let s=new Ot(a.url,o);return a===t&&(e=s),s}let i=r(t.root),n=X1(i);return e??n}function tC(t,e,r,i,n){let a=t;for(;a.parent;)a=a.parent;if(e.length===0)return gv(a,a,a,r,i,n);let o=AI(e);if(o.toRoot())return gv(a,a,new Ot([],{}),r,i,n);let s=OI(o,a,t),u=s.processChildren?Qu(s.segmentGroup,s.index,o.commands):iC(s.segmentGroup,s.index,o.commands);return gv(a,s.segmentGroup,u,r,i,n)}function Rd(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function tl(t){return typeof t=="object"&&t!=null&&t.outlets}function N1(t,e,r){t||="\u0275";let i=new Bi;return i.queryParams={[t]:e},r.parse(r.serialize(i)).queryParams[t]}function gv(t,e,r,i,n,a){let o={};for(let[l,c]of Object.entries(i??{}))o[l]=Array.isArray(c)?c.map(d=>N1(l,d,a)):N1(l,c,a);let s;t===e?s=r:s=rC(t,e,r);let u=X1(Q1(s));return new Bi(u,o,n)}function rC(t,e,r){let i=Object.create(null);return Object.entries(t.children).forEach(([n,a])=>{a===e?i[n]=r:i[n]=rC(a,e,r)}),new Ot(t.segments,i)}var Pd=class{isAbsolute;numberOfDoubleDots;commands;constructor(e,r,i){if(this.isAbsolute=e,this.numberOfDoubleDots=r,this.commands=i,e&&i.length>0&&Rd(i[0]))throw new hr(4003,!1);let n=i.find(tl);if(n&&n!==hI(i))throw new hr(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function AI(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Pd(!0,0,t);let e=0,r=!1,i=t.reduce((n,a,o)=>{if(typeof a=="object"&&a!=null){if(a.outlets){let s={};return Object.entries(a.outlets).forEach(([u,l])=>{s[u]=typeof l=="string"?l.split("/"):l}),[...n,{outlets:s}]}if(a.segmentPath)return[...n,a.segmentPath]}return typeof a!="string"?[...n,a]:o===0?(a.split("/").forEach((s,u)=>{u==0&&s==="."||(u==0&&s===""?r=!0:s===".."?e++:s!=""&&n.push(s))}),n):[...n,a]},[]);return new Pd(r,e,i)}var ks=class{segmentGroup;processChildren;index;constructor(e,r,i){this.segmentGroup=e,this.processChildren=r,this.index=i}};function OI(t,e,r){if(t.isAbsolute)return new ks(e,!0,0);if(!r)return new ks(e,!1,NaN);if(r.parent===null)return new ks(r,!0,0);let i=Rd(t.commands[0])?0:1,n=r.segments.length-1+i;return RI(r,n,t.numberOfDoubleDots)}function RI(t,e,r){let i=t,n=e,a=r;for(;a>n;){if(a-=n,i=i.parent,!i)throw new hr(4005,!1);n=i.segments.length}return new ks(i,!1,n-a)}function PI(t){return tl(t[0])?t[0].outlets:{[it]:t}}function iC(t,e,r){if(t??=new Ot([],{}),t.segments.length===0&&t.hasChildren())return Qu(t,e,r);let i=NI(t,e,r),n=r.slice(i.commandIndex);if(i.match&&i.pathIndex<t.segments.length){let a=new Ot(t.segments.slice(0,i.pathIndex),{});return a.children[it]=new Ot(t.segments.slice(i.pathIndex),t.children),Qu(a,0,n)}else return i.match&&n.length===0?new Ot(t.segments,{}):i.match&&!t.hasChildren()?Tv(t,e,r):i.match?Qu(t,0,n):Tv(t,e,r)}function Qu(t,e,r){if(r.length===0)return new Ot(t.segments,{});{let i=PI(r),n=Object.create(null);if(Object.keys(i).some(a=>a!==it)&&t.children[it]&&t.numberOfChildren===1&&t.children[it].segments.length===0){let a=Qu(t.children[it],e,r);return new Ot(t.segments,a.children)}return Object.entries(i).forEach(([a,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(n[a]=iC(t.children[a],e,o))}),Object.entries(t.children).forEach(([a,o])=>{i[a]===void 0&&(n[a]=o)}),new Ot(t.segments,n)}}function NI(t,e,r){let i=0,n=e,a={match:!1,pathIndex:0,commandIndex:0};for(;n<t.segments.length;){if(i>=r.length)return a;let o=t.segments[n],s=r[i];if(tl(s))break;let u=`${s}`,l=i<r.length-1?r[i+1]:null;if(n>0&&u===void 0)break;if(u&&l&&typeof l=="object"&&l.outlets===void 0){if(!B1(u,l,o))return a;i+=2}else{if(!B1(u,{},o))return a;i++}n++}return{match:!0,pathIndex:n,commandIndex:i}}function Tv(t,e,r){let i=t.segments.slice(0,e),n=0;for(;n<r.length;){let a=r[n];if(tl(a)){let u=FI(a.outlets);return new Ot(i,u)}if(n===0&&Rd(r[0])){let u=t.segments[e];i.push(new Na(u.path,F1(r[0]))),n++;continue}let o=tl(a)?a.outlets[it]:`${a}`,s=n<r.length-1?r[n+1]:null;o&&s&&Rd(s)?(i.push(new Na(o,F1(s))),n+=2):(i.push(new Na(o,{})),n++)}return new Ot(i,{})}function FI(t){let e={};return Object.entries(t).forEach(([r,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(e[r]=Tv(new Ot([],{}),0,i))}),e}function F1(t){let e={};return Object.entries(t).forEach(([r,i])=>e[r]=`${i}`),e}function B1(t,e,r){return t==r.path&&Pn(e,r.parameters)}var Ju="imperative",Lr=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(Lr||{}),Li=class{id;url;constructor(e,r){this.id=e,this.url=r}},Eo=class extends Li{type=Lr.NavigationStart;navigationTrigger;restoredState;constructor(e,r,i="imperative",n=null){super(e,r),this.navigationTrigger=i,this.restoredState=n}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Nn=class extends Li{urlAfterRedirects;type=Lr.NavigationEnd;constructor(e,r,i){super(e,r),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ti=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(ti||{}),rl=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(rl||{}),Ki=class extends Li{reason;code;type=Lr.NavigationCancel;constructor(e,r,i,n){super(e,r),this.reason=i,this.code=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}};function nC(t){return t instanceof Ki&&(t.code===ti.Redirect||t.code===ti.SupersededByNewNavigation)}var ca=class extends Li{reason;code;type=Lr.NavigationSkipped;constructor(e,r,i,n){super(e,r),this.reason=i,this.code=n}},ko=class extends Li{error;target;type=Lr.NavigationError;constructor(e,r,i,n){super(e,r),this.error=i,this.target=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},il=class extends Li{urlAfterRedirects;state;type=Lr.RoutesRecognized;constructor(e,r,i,n){super(e,r),this.urlAfterRedirects=i,this.state=n}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Nd=class extends Li{urlAfterRedirects;state;type=Lr.GuardsCheckStart;constructor(e,r,i,n){super(e,r),this.urlAfterRedirects=i,this.state=n}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Fd=class extends Li{urlAfterRedirects;state;shouldActivate;type=Lr.GuardsCheckEnd;constructor(e,r,i,n,a){super(e,r),this.urlAfterRedirects=i,this.state=n,this.shouldActivate=a}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Bd=class extends Li{urlAfterRedirects;state;type=Lr.ResolveStart;constructor(e,r,i,n){super(e,r),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ld=class extends Li{urlAfterRedirects;state;type=Lr.ResolveEnd;constructor(e,r,i,n){super(e,r),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},zd=class{route;type=Lr.RouteConfigLoadStart;constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Vd=class{route;type=Lr.RouteConfigLoadEnd;constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Hd=class{snapshot;type=Lr.ChildActivationStart;constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ud=class{snapshot;type=Lr.ChildActivationEnd;constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},jd=class{snapshot;type=Lr.ActivationStart;constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},qd=class{snapshot;type=Lr.ActivationEnd;constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Is=class{},nl=class{},As=class{url;navigationBehaviorOptions;constructor(e,r){this.url=e,this.navigationBehaviorOptions=r}};function BI(t){return!(t instanceof Is)&&!(t instanceof As)&&!(t instanceof nl)}var Wd=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return this.route?.snapshot._environmentInjector??this.rootInjector}constructor(e){this.rootInjector=e,this.children=new Fs(this.rootInjector)}},Fs=(()=>{class t{rootInjector;contexts=new Map;constructor(r){this.rootInjector=r}onChildOutletCreated(r,i){let n=this.getOrCreateContext(r);n.outlet=i,this.contexts.set(r,n)}onChildOutletDestroyed(r){let i=this.getContext(r);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let r=this.contexts;return this.contexts=new Map,r}onOutletReAttached(r){this.contexts=r}getOrCreateContext(r){let i=this.getContext(r);return i||(i=new Wd(this.rootInjector),this.contexts.set(r,i)),i}getContext(r){return this.contexts.get(r)||null}static \u0275fac=function(i){return new(i||t)(Xo(Ui))};static \u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),$d=class{_root;constructor(e){this._root=e}get root(){return this._root.value}parent(e){let r=this.pathFromRoot(e);return r.length>1?r[r.length-2]:null}children(e){let r=Sv(e,this._root);return r?r.children.map(i=>i.value):[]}firstChild(e){let r=Sv(e,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(e){let r=Dv(e,this._root);return r.length<2?[]:r[r.length-2].children.map(n=>n.value).filter(n=>n!==e)}pathFromRoot(e){return Dv(e,this._root).map(r=>r.value)}};function Sv(t,e){if(t===e.value)return e;for(let r of e.children){let i=Sv(t,r);if(i)return i}return null}function Dv(t,e){if(t===e.value)return[e];for(let r of e.children){let i=Dv(t,r);if(i.length)return i.unshift(e),i}return[]}var Fi=class{value;children;constructor(e,r){this.value=e,this.children=r}toString(){return`TreeNode(${this.value})`}};function Es(t){let e={};return t&&t.children.forEach(r=>e[r.value.outlet]=r),e}var al=class extends $d{snapshot;constructor(e,r){super(e),this.snapshot=r,Nv(this,e)}toString(){return this.snapshot.toString()}};function aC(t,e){let r=LI(t,e),i=new xr([new Na("",{})]),n=new xr({}),a=new xr({}),o=new xr({}),s=new xr(""),u=new zi(i,n,o,s,a,it,t,r.root);return u.snapshot=r.root,new al(new Fi(u,[]),r)}function LI(t,e){let r={},i={},n={},o=new Os([],r,n,"",i,it,t,null,{},e);return new ol("",new Fi(o,[]))}var zi=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;_localInjector;constructor(e,r,i,n,a,o,s,u){this.urlSubject=e,this.paramsSubject=r,this.queryParamsSubject=i,this.fragmentSubject=n,this.dataSubject=a,this.outlet=o,this.component=s,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(Ie(l=>l[ll]))??je(void 0),this.url=e,this.params=r,this.queryParams=i,this.fragment=n,this.data=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Ie(e=>Do(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ie(e=>Do(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}},zI="always";function Pv(t,e,r){let i,{routeConfig:n}=t;return e!==null&&(r==="always"||n?.path===""||!e.component&&!e.routeConfig?.loadComponent)?i={params:ae(ae({},e.params),t.params),data:ae(ae({},e.data),t.data),resolve:ae(ae(ae(ae({},t.data),e.data),n?.data),t._resolvedData)}:i={params:ae({},t.params),data:ae({},t.data),resolve:ae(ae({},t.data),t._resolvedData??{})},n&&sC(n)&&(i.resolve[ll]=n.title),i}var Os=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[ll]}constructor(e,r,i,n,a,o,s,u,l,c){this.url=e,this.params=r,this.queryParams=i,this.fragment=n,this.data=a,this.outlet=o,this.component=s,this.routeConfig=u,this._resolve=l,this._environmentInjector=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Do(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Do(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(i=>i.toString()).join("/"),r=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${r}')`}},ol=class extends $d{url;constructor(e,r){super(r),this.url=e,Nv(this,r)}toString(){return oC(this._root)}};function Nv(t,e){e.value._routerState=t,e.children.forEach(r=>Nv(t,r))}function oC(t){let e=t.children.length>0?` { ${t.children.map(oC).join(", ")} } `:"";return`${t.value}${e}`}function yv(t){if(t.snapshot){let e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,Pn(e.queryParams,r.queryParams)||t.queryParamsSubject.next(r.queryParams),e.fragment!==r.fragment&&t.fragmentSubject.next(r.fragment),Pn(e.params,r.params)||t.paramsSubject.next(r.params),fI(e.url,r.url)||t.urlSubject.next(r.url),Pn(e.data,r.data)||t.dataSubject.next(r.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Ev(t,e){let r=Pn(t.params,e.params)&&gI(t.url,e.url),i=!t.parent!=!e.parent;return r&&!i&&(!t.parent||Ev(t.parent,e.parent))}function sC(t){return typeof t.title=="string"||t.title===null}var uC=new ee(""),cl=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=it;activateEvents=new mi;deactivateEvents=new mi;attachEvents=new mi;detachEvents=new mi;routerOutletData=U();parentContexts=C(Fs);location=C(qr);changeDetector=C(vr);inputBinder=C(dl,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(r){if(r.name){let{firstChange:i,previousValue:n}=r.name;if(i)return;this.isTrackedInParentContexts(n)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(n)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(r){return this.parentContexts.getContext(r)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let r=this.parentContexts.getContext(this.name);r?.route&&(r.attachRef?this.attach(r.attachRef,r.route):this.activateWith(r.route,r.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new hr(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new hr(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new hr(4012,!1);this.location.detach();let r=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(r.instance),r}attach(r,i){this.activated=r,this._activatedRoute=i,this.location.insert(r.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(r.instance)}deactivate(){if(this.activated){let r=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(r)}}activateWith(r,i){if(this.isActivated)throw new hr(4013,!1);this._activatedRoute=r;let n=this.location,o=r.snapshot.component,s=this.parentContexts.getOrCreateContext(this.name).children,u=new kv(r,s,n.injector,this.routerOutletData);this.activated=n.createComponent(o,{index:n.length,injector:u,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=te({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[jr]})}return t})(),kv=class{route;childContexts;parent;outletData;constructor(e,r,i,n){this.route=e,this.childContexts=r,this.parent=i,this.outletData=n}get(e,r){return e===zi?this.route:e===Fs?this.childContexts:e===uC?this.outletData:this.parent.get(e,r)}},dl=new ee(""),lC=(()=>{class t{options;outletDataSubscriptions=new Map;outletSeenKeys=new Map;constructor(r){this.options=r,this.options.queryParams??=!0}bindActivatedRouteToOutletComponent(r){this.unsubscribeFromRouteData(r),this.subscribeToRouteData(r)}unsubscribeFromRouteData(r){this.outletDataSubscriptions.get(r)?.unsubscribe(),this.outletDataSubscriptions.delete(r),this.outletSeenKeys.delete(r)}subscribeToRouteData(r){let{activatedRoute:i}=r,n=lc([this.options.queryParams?i.queryParams:je({}),i.params,i.data]).pipe(mt(([a,o,s],u)=>(s=ae(ae(ae({},a),o),s),u===0?je(s):Promise.resolve(s)))).subscribe(a=>{if(!r.isActivated||!r.activatedComponentRef||r.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(r);return}let o=Tc(i.component);if(!o){this.unsubscribeFromRouteData(r);return}let s=this.outletSeenKeys.get(r);s||(s=new Set,this.outletSeenKeys.set(r,s));for(let l of Object.keys(a))s.add(l);let u=this.options.unmatchedInputBehavior??"alwaysUndefined";for(let{templateName:l}of o.inputs){let c=a[l];(c!==void 0||u==="alwaysUndefined"||s.has(l))&&r.activatedComponentRef.setInput(l,c)}});this.outletDataSubscriptions.set(r,n)}static \u0275fac=function(i){Kn()};static \u0275prov=Xe({token:t,factory:t.\u0275fac})}return t})(),Fv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(i,n){i&1&&ye(0,"router-outlet")},dependencies:[cl],encapsulation:2,changeDetection:1})}return t})();function Bv(t){let e=t.children&&t.children.map(Bv),r=e?Ke(ae({},t),{children:e}):ae({},t);return!r.component&&!r.loadComponent&&(e||r.loadChildren)&&r.outlet&&r.outlet!==it&&(r.component=Fv),r}function VI(t,e,r){let i=new Set,n=sl(t,e._root,r?r._root:void 0,i);return{newlyCreatedRoutes:i,state:new al(n,e)}}function sl(t,e,r,i){if(r&&t.shouldReuseRoute(e.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=e.value;let a=HI(t,e,r,i);return new Fi(n,a)}else{if(t.shouldAttach(e.value)){let o=t.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(u=>sl(t,u,void 0,i)),s}}let n=UI(e.value);i.add(n);let a=e.children.map(o=>sl(t,o,void 0,i));return new Fi(n,a)}}function HI(t,e,r,i){return e.children.map(n=>{for(let a of r.children)if(t.shouldReuseRoute(n.value,a.value.snapshot))return sl(t,n,a,i);return sl(t,n,void 0,i)})}function UI(t){return new zi(new xr(t.url),new xr(t.params),new xr(t.queryParams),new xr(t.fragment),new xr(t.data),t.outlet,t.component,t)}var Rs=class{redirectTo;navigationBehaviorOptions;constructor(e,r){this.redirectTo=e,this.navigationBehaviorOptions=r}},cC="ngNavigationCancelingError";function Gd(t,e){let{redirectTo:r,navigationBehaviorOptions:i}=Ba(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,n=dC(!1,ti.Redirect);return n.url=r,n.navigationBehaviorOptions=i,n}function dC(t,e){let r=new Error(`NavigationCancelingError: ${t||""}`);return r[cC]=!0,r.cancellationCode=e,r}function jI(t){return fC(t)&&Ba(t.url)}function fC(t){return!!t&&t[cC]}var Mv=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(e,r,i,n,a){this.routeReuseStrategy=e,this.futureState=r,this.currState=i,this.forwardEvent=n,this.inputBindingEnabled=a}activate(e){let r=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,i,e),yv(this.futureState.root),this.activateChildRoutes(r,i,e)}deactivateChildRoutes(e,r,i){let n=Es(r);e.children.forEach(a=>{let o=a.value.outlet;this.deactivateRoutes(a,n[o],i),delete n[o]}),Object.values(n).forEach(a=>{this.deactivateRouteAndItsChildren(a,i)})}deactivateRoutes(e,r,i){let n=e.value,a=r?r.value:null;if(n===a)if(n.component){let o=i.getContext(n.outlet);o&&this.deactivateChildRoutes(e,r,o.children)}else this.deactivateChildRoutes(e,r,i);else a&&this.deactivateRouteAndItsChildren(r,i)}deactivateRouteAndItsChildren(e,r){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,r):this.deactivateRouteAndOutlet(e,r)}detachAndStoreRouteSubtree(e,r){let i=r.getContext(e.value.outlet),n=i&&e.value.component?i.children:r,a=Es(e);for(let o of Object.values(a))this.deactivateRouteAndItsChildren(o,n);if(i&&i.outlet){let o=i.outlet.detach(),s=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:o,route:e,contexts:s})}}deactivateRouteAndOutlet(e,r){let i=r.getContext(e.value.outlet),n=i&&e.value.component?i.children:r,a=Es(e);for(let o of Object.values(a))this.deactivateRouteAndItsChildren(o,n);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null),e.value._localInjector?.destroy()}activateChildRoutes(e,r,i){let n=Es(r);e.children.forEach(a=>{this.activateRoutes(a,n[a.value.outlet],i),this.forwardEvent(new qd(a.value.snapshot))}),e.children.length&&this.forwardEvent(new Ud(e.value.snapshot))}activateRoutes(e,r,i){let n=e.value,a=r?r.value:null;if(yv(n),n===a)if(n.component){let o=i.getOrCreateContext(n.outlet);this.activateChildRoutes(e,r,o.children)}else this.activateChildRoutes(e,r,i);else if(n.component){let o=i.getOrCreateContext(n.outlet);if(this.routeReuseStrategy.shouldAttach(n.snapshot)){let s=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),o.children.onOutletReAttached(s.contexts),o.attachRef=s.componentRef,o.route=s.route.value,o.outlet&&o.outlet.attach(s.componentRef,s.route.value),yv(s.route.value),this.activateChildRoutes(e,null,o.children)}else o.attachRef=null,o.route=n,o.outlet&&o.outlet.activateWith(n,o.injector),this.activateChildRoutes(e,null,o.children)}else this.activateChildRoutes(e,null,i)}},Yd=class{path;route;constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},Ms=class{component;route;constructor(e,r){this.component=e,this.route=r}};function qI(t,e,r){let i=t._root,n=e?e._root:null;return Xu(i,n,r,[i.value])}function WI(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function Bs(t,e){let r=Symbol(),i=e.get(t,r);return i===r?typeof t=="function"&&!K0(t)?t:e.get(t):i}function Xu(t,e,r,i,n={canDeactivateChecks:[],canActivateChecks:[]}){let a=Es(e);return t.children.forEach(o=>{$I(o,a[o.value.outlet],r,i.concat([o.value]),n),delete a[o.value.outlet]}),Object.entries(a).forEach(([o,s])=>el(s,r.getContext(o),n)),n}function $I(t,e,r,i,n={canDeactivateChecks:[],canActivateChecks:[]}){let a=t.value,o=e?e.value:null,s=r?r.getContext(t.value.outlet):null;if(o&&a.routeConfig===o.routeConfig){let u=GI(o,a,a.routeConfig.runGuardsAndResolvers);u?n.canActivateChecks.push(new Yd(i)):(a.data=o.data,a._resolvedData=o._resolvedData),a.component?Xu(t,e,s?s.children:null,i,n):Xu(t,e,r,i,n),u&&s&&s.outlet&&s.outlet.isActivated&&n.canDeactivateChecks.push(new Ms(s.outlet.component,o))}else o&&el(e,s,n),n.canActivateChecks.push(new Yd(i)),a.component?Xu(t,null,s?s.children:null,i,n):Xu(t,null,r,i,n);return n}function GI(t,e,r){if(typeof r=="function")return ji(e._environmentInjector,()=>r(t,e));switch(r){case"pathParamsChange":return!So(t.url,e.url);case"pathParamsOrQueryParamsChange":return!So(t.url,e.url)||!Pn(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Ev(t,e)||!Pn(t.queryParams,e.queryParams);default:return!Ev(t,e)}}function el(t,e,r){let i=Es(t),n=t.value;Object.entries(i).forEach(([a,o])=>{n.component?e?el(o,e.children.getContext(a),r):el(o,null,r):el(o,e,r)}),n.component?e&&e.outlet&&e.outlet.isActivated?r.canDeactivateChecks.push(new Ms(e.outlet.component,n)):r.canDeactivateChecks.push(new Ms(null,n)):r.canDeactivateChecks.push(new Ms(null,n))}function fl(t){return typeof t=="function"}function YI(t){return typeof t=="boolean"}function KI(t){return t&&fl(t.canLoad)}function ZI(t){return t&&fl(t.canActivate)}function XI(t){return t&&fl(t.canActivateChild)}function QI(t){return t&&fl(t.canDeactivate)}function JI(t){return t&&fl(t.canMatch)}function hC(t){return t instanceof U0||t?.name==="EmptyError"}var kd=Symbol("INITIAL_VALUE");function Ps(){return mt(t=>lc(t.map(e=>e.pipe(Gn(1),Ht(kd)))).pipe(Ie(e=>{for(let r of e)if(r!==!0){if(r===kd)return kd;if(r===!1||eA(r))return r}return!0}),xt(e=>e!==kd),Gn(1)))}function eA(t){return Ba(t)||t instanceof Rs}function pC(t){return t.aborted?je(void 0).pipe(Gn(1)):new It(e=>{let r=()=>{e.next(),e.complete()};return t.addEventListener("abort",r),()=>t.removeEventListener("abort",r)})}function vC(t){return lr(pC(t))}function tA(t){return ba(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:n,canDeactivateChecks:a}}=e;return a.length===0&&n.length===0?je(Ke(ae({},e),{guardsResult:!0})):rA(a,r,i).pipe(ba(o=>o&&YI(o)?iA(r,n,t):je(o)),Ie(o=>Ke(ae({},e),{guardsResult:o})))})}function rA(t,e,r){return Jr(t).pipe(ba(i=>uA(i.component,i.route,r,e)),Ca(i=>i!==!0,!0))}function iA(t,e,r){return Jr(e).pipe(ap(i=>np(aA(i.route.parent,r),nA(i.route,r),sA(t,i.path),oA(t,i.route))),Ca(i=>i!==!0,!0))}function nA(t,e){return t!==null&&e&&e(new jd(t)),je(!0)}function aA(t,e){return t!==null&&e&&e(new Hd(t)),je(!0)}function oA(t,e){let r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||r.length===0)return je(!0);let i=r.map(n=>cc(()=>{let a=e._environmentInjector,o=Bs(n,a),s=ZI(o)?o.canActivate(e,t):ji(a,()=>o(e,t));return Mo(s).pipe(Ca())}));return je(i).pipe(Ps())}function sA(t,e){let r=e[e.length-1],n=e.slice(0,e.length-1).reverse().map(a=>WI(a)).filter(a=>a!==null).map(a=>cc(()=>{let o=a.guards.map(s=>{let u=a.node._environmentInjector,l=Bs(s,u),c=XI(l)?l.canActivateChild(r,t):ji(u,()=>l(r,t));return Mo(c).pipe(Ca())});return je(o).pipe(Ps())}));return je(n).pipe(Ps())}function uA(t,e,r,i){let n=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!n||n.length===0)return je(!0);let a=n.map(o=>{let s=e._environmentInjector,u=Bs(o,s),l=QI(u)?u.canDeactivate(t,e,r,i):ji(s,()=>u(t,e,r,i));return Mo(l).pipe(Ca())});return je(a).pipe(Ps())}function lA(t,e,r,i,n){let a=e.canLoad;if(a===void 0||a.length===0)return je(!0);let o=a.map(s=>{let u=Bs(s,t),l=KI(u)?u.canLoad(e,r):ji(t,()=>u(e,r)),c=Mo(l);return n?c.pipe(vC(n)):c});return je(o).pipe(Ps(),mC(i))}function mC(t){return Ko(Nr(e=>{if(typeof e!="boolean")throw Gd(t,e)}),Ie(e=>e===!0))}function cA(t,e,r,i,n,a){let o=e.canMatch;if(!o||o.length===0)return je(!0);let s=o.map(u=>{let l=Bs(u,t),c=JI(l)?l.canMatch(e,r,n):ji(t,()=>l(e,r,n));return Mo(c).pipe(vC(a))});return je(s).pipe(Ps(),mC(i))}var la=class t extends Error{segmentGroup;constructor(e){super(),this.segmentGroup=e||null,Object.setPrototypeOf(this,t.prototype)}},ul=class t extends Error{urlTree;constructor(e){super(),this.urlTree=e,Object.setPrototypeOf(this,t.prototype)}};function dA(t){throw new hr(4e3,!1)}function fA(t){throw dC(!1,ti.GuardRejected)}var Iv=class{urlSerializer;urlTree;constructor(e,r){this.urlSerializer=e,this.urlTree=r}async lineralizeSegments(e,r){let i=[],n=r.root;for(;;){if(i=i.concat(n.segments),n.numberOfChildren===0)return i;if(n.numberOfChildren>1||!n.children[it])throw dA(`${e.redirectTo}`);n=n.children[it]}}async applyRedirectCommands(e,r,i,n,a){let o=await hA(r,n,a);if(o instanceof Bi)throw new ul(o);let s=this.applyRedirectCreateUrlTree(o,this.urlSerializer.parse(o),e,i);if(o[0]==="/")throw new ul(s);return s}applyRedirectCreateUrlTree(e,r,i,n){let a=this.createSegmentGroup(e,r.root,i,n);return new Bi(a,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(e,r){let i={};return Object.entries(e).forEach(([n,a])=>{if(typeof a=="string"&&a[0]===":"){let s=a.substring(1);i[n]=r[s]}else i[n]=a}),i}createSegmentGroup(e,r,i,n){let a=this.createSegments(e,r.segments,i,n),o=Object.create(null);return Object.entries(r.children).forEach(([s,u])=>{o[s]=this.createSegmentGroup(e,u,i,n)}),new Ot(a,o)}createSegments(e,r,i,n){return r.map(a=>a.path[0]===":"?this.findPosParam(e,a,n):this.findOrReturn(a,i))}findPosParam(e,r,i){let n=i[r.path.substring(1)];if(!n)throw new hr(4001,!1);return n}findOrReturn(e,r){let i=0;for(let n of r){if(n.path===e.path)return r.splice(i),n;i++}return e}};function hA(t,e,r){if(typeof t=="string")return Promise.resolve(t);let i=t;return Od(Mo(ji(r,()=>i(e))))}function pA(t,e){return t.providers&&!t._injector&&(t._injector=sp(t.providers,e,`Route: ${t.path}`)),t._injector??e}function mn(t){return t.outlet||it}function vA(t,e){let r=t.filter(i=>mn(i)===e);return r.push(...t.filter(i=>mn(i)!==e)),r}var Av={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function gC(t){return{routeConfig:t.routeConfig,url:t.url,params:t.params,queryParams:t.queryParams,fragment:t.fragment,data:t.data,outlet:t.outlet,title:t.title,paramMap:t.paramMap,queryParamMap:t.queryParamMap}}function mA(t,e,r,i,n,a,o){let s=yC(t,e,r);if(!s.matched)return je(s);let u=gC(a(s));return i=pA(e,i),cA(i,e,r,n,u,o).pipe(Ie(l=>l===!0?s:ae({},Av)))}function yC(t,e,r){if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||r.length>0)?ae({},Av):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let n=(e.matcher||H1)(r,t,e);if(!n)return ae({},Av);let a={};Object.entries(n.posParams??{}).forEach(([s,u])=>{a[s]=u.path});let o=n.consumed.length>0?ae(ae({},a),n.consumed[n.consumed.length-1].parameters):a;return{matched:!0,consumedSegments:n.consumed,remainingSegments:r.slice(n.consumed.length),parameters:o,positionalParamSegments:n.posParams??{}}}function L1(t,e,r,i,n){return r.length>0&&bA(t,r,i,n)?{segmentGroup:new Ot(e,yA(i,new Ot(r,t.children))),slicedSegments:[]}:r.length===0&&CA(t,r,i)?{segmentGroup:new Ot(t.segments,gA(t,r,i,t.children)),slicedSegments:r}:{segmentGroup:new Ot(t.segments,t.children),slicedSegments:r}}function gA(t,e,r,i){let n={};for(let a of r)if(Zd(t,e,a)&&!i[mn(a)]){let o=new Ot([],{});n[mn(a)]=o}return ae(ae({},i),n)}function yA(t,e){let r={};r[it]=e;for(let i of t)if(i.path===""&&mn(i)!==it){let n=new Ot([],{});r[mn(i)]=n}return r}function bA(t,e,r,i){return r.some(n=>!Zd(t,e,n)||!(mn(n)!==it)?!1:!(i!==void 0&&mn(n)===i))}function CA(t,e,r){return r.some(i=>Zd(t,e,i))}function Zd(t,e,r){return(t.hasChildren()||e.length>0)&&r.pathMatch==="full"?!1:r.path===""}function wA(t,e,r){return e.length===0&&!t.children[r]}var Ov=class{};async function _A(t,e,r,i,n,a,o,s){return new Rv(t,e,r,i,n,o,a,s).recognize()}var xA=31,Rv=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;abortSignal;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(e,r,i,n,a,o,s,u){this.injector=e,this.configLoader=r,this.rootComponentType=i,this.config=n,this.urlTree=a,this.paramsInheritanceStrategy=o,this.urlSerializer=s,this.abortSignal=u,this.applyRedirects=new Iv(this.urlSerializer,this.urlTree)}noMatchError(e){return new hr(4002,`'${e.segmentGroup}'`)}async recognize(){let e=L1(this.urlTree.root,[],[],this.config).segmentGroup,{children:r,rootSnapshot:i}=await this.match(e),n=new Fi(i,r),a=new ol("",n),o=J1(i,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,a.url=this.urlSerializer.serialize(o),{state:a,tree:o}}async match(e){let r=new Os([],Object.freeze({}),Object.freeze(ae({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),it,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,e,it,r),rootSnapshot:r}}catch(i){if(i instanceof ul)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof la?this.noMatchError(i):i}}async processSegmentGroup(e,r,i,n,a){if(i.segments.length===0&&i.hasChildren())return this.processChildren(e,r,i,a);let o=await this.processSegment(e,r,i,i.segments,n,!0,a);return o instanceof Fi?[o]:[]}async processChildren(e,r,i,n){let a=[];for(let u of Object.keys(i.children))u==="primary"?a.unshift(u):a.push(u);let o=[];for(let u of a){let l=i.children[u],c=vA(r,u),d=await this.processSegmentGroup(e,c,l,u,n);o.push(...d)}let s=bC(o);return TA(s),s}async processSegment(e,r,i,n,a,o,s){for(let u of r)try{return await this.processSegmentAgainstRoute(u._injector??e,r,u,i,n,a,o,s)}catch(l){if(l instanceof la||hC(l))continue;throw l}if(wA(i,n,a))return new Ov;throw new la(i)}async processSegmentAgainstRoute(e,r,i,n,a,o,s,u){if(mn(i)!==o&&(o===it||!Zd(n,a,i)))throw new la(n);if(i.redirectTo===void 0)return this.matchSegmentAgainstRoute(e,n,i,a,o,u);if(this.allowRedirects&&s)return this.expandSegmentAgainstRouteUsingRedirect(e,n,r,i,a,o,u);throw new la(n)}async expandSegmentAgainstRouteUsingRedirect(e,r,i,n,a,o,s){let{matched:u,parameters:l,consumedSegments:c,positionalParamSegments:d,remainingSegments:f}=yC(r,n,a);if(!u)throw new la(r);typeof n.redirectTo=="string"&&n.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>xA&&(this.allowRedirects=!1));let p=this.createSnapshot(e,n,a,l,s);if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let h=await this.applyRedirects.applyRedirectCommands(c,n.redirectTo,d,gC(p),e),g=await this.applyRedirects.lineralizeSegments(n,h);return this.processSegment(e,i,r,g.concat(f),o,!1,s)}createSnapshot(e,r,i,n,a){let o=new Os(i,n,Object.freeze(ae({},this.urlTree.queryParams)),this.urlTree.fragment,DA(r),mn(r),r.component??r._loadedComponent??null,r,EA(r),e),s=Pv(o,a,this.paramsInheritanceStrategy);return o.params=Object.freeze(s.params),o.data=Object.freeze(s.data),o}async matchSegmentAgainstRoute(e,r,i,n,a,o){if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);let s=b=>this.createSnapshot(e,i,b.consumedSegments,b.parameters,o),u=await Od(mA(r,i,n,e,this.urlSerializer,s,this.abortSignal));if(i.path==="**"&&(r.children={}),!u?.matched)throw new la(r);e=i._injector??e;let{routes:l}=await this.getChildConfig(e,i,n),c=i._loadedInjector??e,{parameters:d,consumedSegments:f,remainingSegments:p}=u,h=this.createSnapshot(e,i,f,d,o),{segmentGroup:g,slicedSegments:v}=L1(r,f,p,l,a);if(v.length===0&&g.hasChildren()){let b=await this.processChildren(c,l,g,h);return new Fi(h,b)}if(l.length===0&&v.length===0)return new Fi(h,[]);let m=mn(i)===a,y=await this.processSegment(c,l,g,v,m?it:a,!0,h);return new Fi(h,y instanceof Fi?[y]:[])}async getChildConfig(e,r,i){if(r.children)return{routes:r.children,injector:e};if(r.loadChildren){if(r._loadedRoutes!==void 0){let a=r._loadedNgModuleFactory;return a&&!r._loadedInjector&&(r._loadedInjector=a.create(e).injector),{routes:r._loadedRoutes,injector:r._loadedInjector}}if(this.abortSignal.aborted)throw new Error(this.abortSignal.reason);if(await Od(lA(e,r,i,this.urlSerializer,this.abortSignal))){let a=await this.configLoader.loadChildren(e,r);return r._loadedRoutes=a.routes,r._loadedInjector=a.injector,r._loadedNgModuleFactory=a.factory,a}throw fA(r)}return{routes:[],injector:e}}};function TA(t){t.sort((e,r)=>e.value.outlet===it?-1:r.value.outlet===it?1:e.value.outlet.localeCompare(r.value.outlet))}function SA(t){let e=t.value.routeConfig;return e&&e.path===""}function bC(t){let e=[],r=new Set;for(let i of t){if(!SA(i)){e.push(i);continue}let n=e.find(a=>i.value.routeConfig===a.value.routeConfig);n!==void 0?(n.children.push(...i.children),r.add(n)):e.push(i)}for(let i of r){let n=bC(i.children);e.push(new Fi(i.value,n))}return e.filter(i=>!r.has(i))}function DA(t){return t.data||{}}function EA(t){return t.resolve||{}}function kA(t,e,r,i,n,a,o){return ba(async s=>{let{state:u,tree:l}=await _A(t,e,r,i,s.extractedUrl,n,a,o);return Ke(ae({},s),{targetSnapshot:u,urlAfterRedirects:l})})}function MA(t){return ba(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return je(e);let n=new Set(i.map(s=>s.route)),a=new Set;for(let s of n)if(!a.has(s))for(let u of CC(s))a.add(u);let o=0;return Jr(a).pipe(ap(s=>n.has(s)?IA(s,r,t):(s.data=Pv(s,s.parent,t).resolve,je(void 0))),Nr(()=>o++),op(1),ba(s=>o===a.size?je(e):sr))})}function CC(t){let e=t.children.map(r=>CC(r)).flat();return[t,...e]}function IA(t,e,r){let i=t.routeConfig,n=t._resolve;return i?.title!==void 0&&!sC(i)&&(n[ll]=i.title),cc(()=>(t.data=Pv(t,t.parent,r).resolve,AA(n,t,e).pipe(Ie(a=>(t._resolvedData=a,t.data=ae(ae({},t.data),a),null)))))}function AA(t,e,r){let i=Cv(t);if(i.length===0)return je({});let n={};return Jr(i).pipe(ba(a=>OA(t[a],e,r).pipe(Ca(),Nr(o=>{if(o instanceof Rs)throw Gd(new Fa,o);n[a]=o}))),op(1),Ie(()=>n),uo(a=>hC(a)?sr:H0(a)))}function OA(t,e,r){let i=e._environmentInjector,n=Bs(t,i),a=n.resolve?n.resolve(e,r):ji(i,()=>n(e,r));return Mo(a)}function z1(t){return mt(e=>{let r=t(e);return r?Jr(r).pipe(Ie(()=>e)):je(e)})}var Lv=(()=>{class t{buildTitle(r){let i,n=r.root;for(;n!==void 0;)i=this.getResolvedTitleForRoute(n)??i,n=n.children.find(a=>a.outlet===it);return i}getResolvedTitleForRoute(r){return r.data[ll]}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:()=>C(wC)})}return t})(),wC=(()=>{class t extends Lv{title;constructor(r){super(),this.title=r}updateTitle(r){let i=this.buildTitle(r);i!==void 0&&this.title.setTitle(i)}static \u0275fac=function(i){return new(i||t)(Xo(vy))};static \u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Ls=new ee("",{factory:()=>({})}),hl=new ee(""),_C=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=C(sy);async loadComponent(r,i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return Promise.resolve(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let n=(async()=>{try{let a=await j1(ji(r,()=>i.loadComponent())),o=await TC(cp(a));return this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=o,o}finally{this.componentLoaders.delete(i)}})();return this.componentLoaders.set(i,n),n}loadChildren(r,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Promise.resolve({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let n=(async()=>{try{let a=await xC(i,this.compiler,r,this.onLoadEndListener);return i._loadedRoutes=a.routes,i._loadedInjector=a.injector,i._loadedNgModuleFactory=a.factory,a}finally{this.childrenLoaders.delete(i)}})();return this.childrenLoaders.set(i,n),n}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})();async function xC(t,e,r,i){let n=await j1(ji(r,()=>t.loadChildren())),a=await TC(cp(n)),o;a instanceof ry||Array.isArray(a)?o=a:o=await e.compileModuleAsync(a),i&&i(t);let s,u,l=!1,c;return Array.isArray(o)?(u=o,l=!0):(s=o.create(r).injector,c=o,u=s.get(hl,[],{optional:!0,self:!0}).flat()),{routes:u.map(Bv),injector:s,factory:c}}async function TC(t){return t}var Xd=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:()=>C(RA)})}return t})(),RA=(()=>{class t{shouldProcessUrl(r){return!0}extract(r){return r}merge(r,i){return r}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})(),SC=new ee("");var DC=new ee(""),PA=()=>{},EC=new ee(""),kC=(()=>{class t{currentNavigation=ge(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=ge(null);events=new tr;transitionAbortWithErrorSubject=new tr;configLoader=C(_C);environmentInjector=C(Ui);destroyRef=C(Xt);urlSerializer=C(Ns);rootContexts=C(Fs);location=C(Sc);inputBindingEnabled=C(dl,{optional:!0})!==null;titleStrategy=C(Lv);options=C(Ls,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||zI;urlHandlingStrategy=C(Xd);createViewTransition=C(SC,{optional:!0});navigationErrorHandler=C(EC,{optional:!0});activatedRouteInjectorFeature=C(DC,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>je(void 0);rootComponentType=null;destroyed=!1;constructor(){let r=n=>this.events.next(new zd(n)),i=n=>this.events.next(new Vd(n));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=r,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(r){let i=++this.navigationId;nt(()=>{this.transitions?.next(Ke(ae({},r),{extractedUrl:this.urlHandlingStrategy.extract(r.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,id:i,routesRecognizeHandler:{},beforeActivateHandler:{}}))})}setupNavigations(r){return this.transitions=new xr(null),this.transitions.pipe(xt(i=>i!==null),mt(i=>{let n=!0,a=!1,o=new AbortController,s=()=>!a&&this.currentTransition?.id===i.id;return je(i).pipe(mt(u=>{if(this.navigationId>i.id)return this.cancelNavigationTransition(i,"",ti.SupersededByNewNavigation),sr;this.currentTransition=i;let l=this.lastSuccessfulNavigation();this.currentNavigation.set({id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,targetBrowserUrl:typeof u.extras.browserUrl=="string"?this.urlSerializer.parse(u.extras.browserUrl):u.extras.browserUrl,trigger:u.source,extras:u.extras,previousNavigation:l?Ke(ae({},l),{previousNavigation:null}):null,abort:()=>o.abort(),routesRecognizeHandler:u.routesRecognizeHandler,beforeActivateHandler:u.beforeActivateHandler});let c=!r.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=u.extras.onSameUrlNavigation??r.onSameUrlNavigation;if(!c&&d!=="reload")return this.events.next(new ca(u.id,this.urlSerializer.serialize(u.rawUrl),"",rl.IgnoredSameUrlNavigation)),u.resolve(!1),sr;if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return je(u).pipe(mt(f=>(this.events.next(new Eo(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),f.id!==this.navigationId?sr:Promise.resolve(f))),kA(this.environmentInjector,this.configLoader,this.rootComponentType,r.config,this.urlSerializer,this.paramsInheritanceStrategy,o.signal),Nr(f=>{i.targetSnapshot=f.targetSnapshot,i.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation.update(p=>(p.finalUrl=f.urlAfterRedirects,p)),this.events.next(new nl)}),mt(f=>Jr(i.routesRecognizeHandler.deferredHandle??je(void 0)).pipe(Ie(()=>f))),Nr(()=>{let f=new il(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(f)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:f,extractedUrl:p,source:h,restoredState:g,extras:v}=u,m=new Eo(f,this.urlSerializer.serialize(p),h,g);this.events.next(m);let y=aC(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=i=Ke(ae({},u),{targetSnapshot:y,urlAfterRedirects:p,extras:Ke(ae({},v),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(b=>(b.finalUrl=p,b)),je(i)}else return this.events.next(new ca(u.id,this.urlSerializer.serialize(u.extractedUrl),"",rl.IgnoredByUrlHandlingStrategy)),u.resolve(!1),sr}),Ie(u=>{let l=new Nd(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);return this.events.next(l),this.currentTransition=i=Ke(ae({},u),{guards:qI(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),i}),tA(u=>this.events.next(u)),mt(u=>{if(i.guardsResult=u.guardsResult,u.guardsResult&&typeof u.guardsResult!="boolean")throw Gd(this.urlSerializer,u.guardsResult);let l=new Fd(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);if(this.events.next(l),!s())return sr;if(!u.guardsResult)return this.cancelNavigationTransition(u,"",ti.GuardRejected),sr;if(u.guards.canActivateChecks.length===0)return je(u);let c=new Bd(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);if(this.events.next(c),!s())return sr;let d=!1;return je(u).pipe(MA(this.paramsInheritanceStrategy),Nr({next:()=>{d=!0;let f=new Ld(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(f)},complete:()=>{d||this.cancelNavigationTransition(u,"",ti.NoDataFromResolver)}}))}),z1(u=>{let l=d=>{let f=[];if(d.routeConfig?._loadedComponent)d.component=d.routeConfig?._loadedComponent;else if(d.routeConfig?.loadComponent){let p=d._environmentInjector;f.push(this.configLoader.loadComponent(p,d.routeConfig).then(h=>{d.component=h}))}for(let p of d.children)f.push(...l(p));return f},c=l(u.targetSnapshot.root);return c.length===0?je(u):Jr(Promise.all(c).then(()=>u))}),mt(u=>{let{newlyCreatedRoutes:l,state:c}=VI(r.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=i=u=Ke(ae({},u),{targetRouterState:c,newlyCreatedRoutes:l}),this.currentNavigation.update(d=>(d.targetRouterState=c,d)),je(u)}),this.activatedRouteInjectorFeature?.operator()??(u=>u),z1(()=>this.afterPreactivation()),mt(()=>{let{currentSnapshot:u,targetSnapshot:l}=i,c=this.createViewTransition?.(this.environmentInjector,u.root,l.root);return c?Jr(c).pipe(Ie(()=>i)):je(i)}),Gn(1),mt(u=>{n=!1,this.events.next(new Is);let l=i.beforeActivateHandler.deferredHandle;return l?Jr(l.then(()=>u)):je(u)}),Nr(u=>{new Mv(r.routeReuseStrategy,i.targetRouterState,i.currentRouterState,l=>this.events.next(l),this.inputBindingEnabled).activate(this.rootContexts),u.newlyCreatedRoutes?.clear(),s()&&(a=!0,this.currentNavigation.update(l=>(l.abort=PA,l)),this.lastSuccessfulNavigation.set(nt(this.currentNavigation)),this.events.next(new Nn(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0))}),lr(pC(o.signal).pipe(xt(()=>!a&&n),Nr(()=>{this.cancelNavigationTransition(i,o.signal.reason+"",ti.Aborted)}))),Nr({complete:()=>{a=!0}}),lr(this.transitionAbortWithErrorSubject.pipe(Nr(u=>{throw u}))),dc(()=>{o.abort(),a||this.cancelNavigationTransition(i,"",ti.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),uo(u=>{if(a=!0,V1(i),this.destroyed)return i.resolve(!1),sr;if(fC(u))this.events.next(new Ki(i.id,this.urlSerializer.serialize(i.extractedUrl),u.message,u.cancellationCode)),jI(u)?this.events.next(new As(u.url,u.navigationBehaviorOptions)):i.resolve(!1);else{let l=new ko(i.id,this.urlSerializer.serialize(i.extractedUrl),u,i.targetSnapshot??void 0);try{let c=ji(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(c instanceof Rs){let{message:d,cancellationCode:f}=Gd(this.urlSerializer,c);this.events.next(new Ki(i.id,this.urlSerializer.serialize(i.extractedUrl),d,f)),this.events.next(new As(c.redirectTo,c.navigationBehaviorOptions))}else throw this.events.next(l),u}catch(c){this.options.resolveNavigationPromiseOnError?i.resolve(!1):i.reject(c)}}return sr}))}))}cancelNavigationTransition(r,i,n){V1(r);let a=new Ki(r.id,this.urlSerializer.serialize(r.extractedUrl),i,n);this.events.next(a),r.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let r=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=nt(this.currentNavigation),n=i?.targetBrowserUrl??i?.extractedUrl;return r.toString()!==n?.toString()&&!i?.extras.skipLocationChange}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})();function NA(t){return t!==Ju}function V1(t){if(t.newlyCreatedRoutes)for(let e of t.newlyCreatedRoutes)e._localInjector?.destroy()}var MC=new ee("");var IC=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:()=>C(FA)})}return t})(),Kd=class{shouldDetach(e){return!1}store(e,r){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,r){return e.routeConfig===r.routeConfig}shouldDestroyInjector(e){return!0}},FA=(()=>{class t extends Kd{static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})(),Qd=(()=>{class t{urlSerializer=C(Ns);options=C(Ls,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=C(Sc);urlHandlingStrategy=C(Xd);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Bi;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:r,initialUrl:i,targetBrowserUrl:n}){let a=r!==void 0?this.urlHandlingStrategy.merge(r,i):i,o=n??a;return o instanceof Bi?this.urlSerializer.serialize(o):o}routerUrlState(r){return r?.targetBrowserUrl===void 0||r?.finalUrl===void 0?{}:{\u0275routerUrl:this.urlSerializer.serialize(r.finalUrl)}}commitTransition({targetRouterState:r,finalUrl:i,initialUrl:n}){i&&r?(this.currentUrlTree=i,this.rawUrlTree=this.urlHandlingStrategy.merge(i,n),this.routerState=r):this.rawUrlTree=n}routerState=aC(null,C(Ui));getRouterState(){return this.routerState}_stateMemento=this.createStateMemento();get stateMemento(){return this._stateMemento}updateStateMemento(){this._stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}restoredState(){return this.location.getState()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:()=>C(BA)})}return t})(),BA=(()=>{class t extends Qd{currentPageId=0;lastSuccessfulId=-1;get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(r){return this.location.subscribe(i=>{i.type==="popstate"&&setTimeout(()=>{r(i.url,i.state,"popstate",{replaceUrl:!0})})})}handleRouterEvent(r,i){r instanceof Eo?this.updateStateMemento():r instanceof ca?this.commitTransition(i):r instanceof il?this.urlUpdateStrategy==="eager"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(i),i)):r instanceof Is?(this.commitTransition(i),this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(i),i)):r instanceof Ki&&!nC(r)?this.restoreHistory(i):r instanceof ko?this.restoreHistory(i,!0):r instanceof Nn&&(this.lastSuccessfulId=r.id,this.currentPageId=this.browserPageId)}setBrowserUrl(r,i){let{extras:n,id:a}=i,{replaceUrl:o,state:s}=n;if(this.location.isCurrentPathEqualTo(r)||o){let u=this.browserPageId,l=ae(ae({},s),this.generateNgRouterState(a,u,i));this.location.replaceState(r,"",l)}else{let u=ae(ae({},s),this.generateNgRouterState(a,this.browserPageId+1,i));this.location.go(r,"",u)}}restoreHistory(r,i=!1){if(this.canceledNavigationResolution==="computed"){let n=this.browserPageId,a=this.currentPageId-n;a!==0?this.location.historyGo(a):this.getCurrentUrlTree()===r.finalUrl&&a===0&&(this.resetInternalState(r),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetInternalState(r),this.resetUrlToCurrentUrlTree())}resetInternalState({finalUrl:r}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,r??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(r,i,n){return this.canceledNavigationResolution==="computed"?ae({navigationId:r,\u0275routerPageId:i},this.routerUrlState(n)):ae({navigationId:r},this.routerUrlState(n))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})();function zv(t,e){t.events.pipe(xt(r=>r instanceof Nn||r instanceof Ki||r instanceof ko||r instanceof ca),Ie(r=>r instanceof Nn||r instanceof ca?0:(r instanceof Ki?r.code===ti.Redirect||r.code===ti.SupersededByNewNavigation:!1)?2:1),xt(r=>r!==2),Gn(1)).subscribe(()=>{e()})}var Si=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=C(ny);stateManager=C(Qd);options=C(Ls,{optional:!0})||{};pendingTasks=C(X0);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=C(kC);urlSerializer=C(Ns);location=C(Sc);urlHandlingStrategy=C(Xd);injector=C(Ui);_events=new tr;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=C(IC);injectorCleanup=C(MC,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=C(hl,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!C(dl,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:r=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new Du;subscribeToNavigationEvents(){let r=this.navigationTransitions.events.subscribe(i=>{try{let n=this.navigationTransitions.currentTransition,a=nt(this.navigationTransitions.currentNavigation);if(n!==null&&a!==null){if(this.stateManager.handleRouterEvent(i,a),i instanceof Ki&&i.code!==ti.Redirect&&i.code!==ti.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Nn)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(i instanceof As){let o=i.navigationBehaviorOptions,s=this.urlHandlingStrategy.merge(i.url,n.currentRawUrl),u=ae({scroll:n.extras.scroll,browserUrl:n.extras.browserUrl,info:n.extras.info,skipLocationChange:n.extras.skipLocationChange,replaceUrl:n.extras.replaceUrl||this.urlUpdateStrategy==="eager"||NA(n.source)},o);this.scheduleNavigation(s,Ju,null,u,{resolve:n.resolve,reject:n.reject,promise:n.promise})}}BI(i)&&this._events.next(i)}catch(n){this.navigationTransitions.transitionAbortWithErrorSubject.next(n)}});this.eventsSubscription.add(r)}resetRootComponentType(r){this.routerState.root.component=r,this.navigationTransitions.rootComponentType=r}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ju,this.stateManager.restoredState(),{replaceUrl:!0})}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((r,i,n,a)=>{this.navigateToSyncWithBrowser(r,n,i,a)})}navigateToSyncWithBrowser(r,i,n,a){let o=n?.navigationId?n:null,s=n?.\u0275routerUrl??r;if(n?.\u0275routerUrl&&(a=Ke(ae({},a),{browserUrl:r})),n){let l=ae({},n);delete l.navigationId,delete l.\u0275routerPageId,delete l.\u0275routerUrl,Object.keys(l).length!==0&&(a.state=l)}let u=this.parseUrl(s);this.scheduleNavigation(u,i,o,a).catch(l=>{this.disposed||this.injector.get(pc)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return nt(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(r){this.config=r.map(Bv),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription?.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0,this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(r,i={}){let{relativeTo:n,queryParams:a,fragment:o,queryParamsHandling:s,preserveFragment:u}=i,l=u?this.currentUrlTree.fragment:o,c=null;switch(s??this.options.defaultQueryParamsHandling){case"merge":c=ae(ae({},this.currentUrlTree.queryParams),a);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=a||null}c!==null&&(c=this.removeEmptyProps(c));let d;try{let f=n?n.snapshot:this.routerState.snapshot.root;d=eC(f)}catch{(typeof r[0]!="string"||r[0][0]!=="/")&&(r=[]),d=this.currentUrlTree.root}return tC(d,r,c,l??null,this.urlSerializer)}navigateByUrl(r,i={skipLocationChange:!1}){let n=Ba(r)?r:this.parseUrl(r),a=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(a,Ju,null,i)}navigate(r,i={skipLocationChange:!1}){return LA(r),this.navigateByUrl(this.createUrlTree(r,i),i)}serializeUrl(r){return this.urlSerializer.serialize(r)}parseUrl(r){try{return this.urlSerializer.parse(r)}catch{return this.console.warn(Y0(4018,!1)),this.urlSerializer.parse("/")}}isActive(r,i){let n;if(i===!0?n=ae({},W1):i===!1?n=ae({},wv):n=ae(ae({},wv),i),Ba(r))return R1(this.currentUrlTree,r,n);let a=this.parseUrl(r);return R1(this.currentUrlTree,a,n)}removeEmptyProps(r){return Object.entries(r).reduce((i,[n,a])=>(a!=null&&(i[n]=a),i),{})}scheduleNavigation(r,i,n,a,o){if(this.disposed)return Promise.resolve(!1);let s,u,l;o?(s=o.resolve,u=o.reject,l=o.promise):l=new Promise((d,f)=>{s=d,u=f});let c=this.pendingTasks.add();return zv(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(c))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:r,extras:a,resolve:s,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(Promise.reject.bind(Promise))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})();function LA(t){for(let e=0;e<t.length;e++)if(t[e]==null)throw new hr(4008,!1)}var HA=(()=>{class t{router=C(Si);stateManager=C(Qd);fragment=ge("");queryParams=ge({});path=ge("");serializer=C(Ns);constructor(){this.updateState(),this.router.events?.subscribe(r=>{r instanceof Nn&&this.updateState()})}updateState(){let{fragment:r,root:i,queryParams:n}=this.stateManager.getCurrentUrlTree();this.fragment.set(r),this.queryParams.set(n),this.path.set(this.serializer.serialize(new Bi(i)))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})(),zs=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=C(new uy("href"),{optional:!0});reactiveHref=_c(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return nt(this.reactiveHref)}set href(r){this.reactiveHref.set(r)}set target(r){this._target.set(r)}get target(){return nt(this._target)}_target=ge(void 0);set queryParams(r){this._queryParams.set(r)}get queryParams(){return nt(this._queryParams)}_queryParams=ge(void 0,{equal:()=>!1});set fragment(r){this._fragment.set(r)}get fragment(){return nt(this._fragment)}_fragment=ge(void 0);set queryParamsHandling(r){this._queryParamsHandling.set(r)}get queryParamsHandling(){return nt(this._queryParamsHandling)}_queryParamsHandling=ge(void 0);set state(r){this._state.set(r)}get state(){return nt(this._state)}_state=ge(void 0,{equal:()=>!1});set info(r){this._info.set(r)}get info(){return nt(this._info)}_info=ge(void 0,{equal:()=>!1});set relativeTo(r){this._relativeTo.set(r)}get relativeTo(){return nt(this._relativeTo)}_relativeTo=ge(void 0);set preserveFragment(r){this._preserveFragment.set(r)}get preserveFragment(){return nt(this._preserveFragment)}_preserveFragment=ge(!1);set skipLocationChange(r){this._skipLocationChange.set(r)}get skipLocationChange(){return nt(this._skipLocationChange)}_skipLocationChange=ge(!1);set replaceUrl(r){this._replaceUrl.set(r)}get replaceUrl(){return nt(this._replaceUrl)}_replaceUrl=ge(!1);browserUrl=U(void 0);isAnchorElement;onChanges=new tr;applicationErrorHandler=C(pc);options=C(Ls,{optional:!0});reactiveRouterState=C(HA);constructor(r,i,n,a,o,s){this.router=r,this.route=i,this.tabIndexAttribute=n,this.renderer=a,this.el=o,this.locationStrategy=s;let u=o.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href"))}setTabIndexIfNotOnNativeEl(r){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",r)}ngOnChanges(r){this.onChanges.next(this)}routerLinkInput=ge(null);set routerLink(r){r==null?(this.routerLinkInput.set(null),this.setTabIndexIfNotOnNativeEl(null)):(Ba(r)?this.routerLinkInput.set(r):this.routerLinkInput.set(Array.isArray(r)?r:[r]),this.setTabIndexIfNotOnNativeEl("0"))}onClick(r,i,n,a,o){let s=this._urlTree();if(s===null||this.isAnchorElement&&(r!==0||i||n||a||o||typeof this.target=="string"&&this.target!="_self"))return!0;let u=this.browserUrl(),l=ae({skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info},u!==void 0&&{browserUrl:u});return this.router.navigateByUrl(s,l)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){}applyAttributeValue(r,i){let n=this.renderer,a=this.el.nativeElement;i!==null?n.setAttribute(a,r,i):n.removeAttribute(a,r)}_urlTree=re(()=>{this.reactiveRouterState.path(),this._preserveFragment()&&this.reactiveRouterState.fragment();let r=n=>n==="preserve"||n==="merge";(r(this._queryParamsHandling())||r(this.options?.defaultQueryParamsHandling))&&this.reactiveRouterState.queryParams();let i=this.routerLinkInput();return i===null||!this.router.createUrlTree?null:Ba(i)?i:this.router.createUrlTree(i,{relativeTo:this._relativeTo()!==void 0?this._relativeTo():this.route,queryParams:this._queryParams(),fragment:this._fragment(),queryParamsHandling:this._queryParamsHandling(),preserveFragment:this._preserveFragment()})},{equal:(r,i)=>this.computeHref(r)===this.computeHref(i)});get urlTree(){return nt(this._urlTree)}computeHref(r){return r!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(r))??"":null}static \u0275fac=function(i){return new(i||t)(qt(Si),qt(zi),J0("tabindex"),qt(Ta),qt(At),qt(ly))};static \u0275dir=te({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(i,n){i&1&&Ce("click",function(o){return n.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),i&2&&Ve("href",n.reactiveHref(),ty)("target",n._target())},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Da],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Da],replaceUrl:[2,"replaceUrl","replaceUrl",Da],browserUrl:[1,"browserUrl"],routerLink:"routerLink"},features:[jr]})}return t})();var UA=new ee("");function Vv(t,...e){return hc([{provide:hl,multi:!0,useValue:t},{provide:zi,useFactory:jA},{provide:ay,multi:!0,useFactory:WA},e.map(r=>r.\u0275providers)])}function jA(){return C(Si).routerState.root}function qA(t,e){return{\u0275kind:t,\u0275providers:e}}function WA(){let t=C(si);return e=>{let r=t.get(yc);if(e!==r.components[0])return;let i=t.get(Si),n=t.get($A);t.get(GA)===1&&i.initialNavigation(),t.get(YA,null,{optional:!0})?.setUpPreloading(),t.get(UA,null,{optional:!0})?.init(),i.resetRootComponentType(r.componentTypes[0]),n.closed||(n.next(),n.complete(),n.unsubscribe())}}var $A=new ee("",{factory:()=>new tr}),GA=new ee("",{factory:()=>1});var YA=new ee("");function Hv(t={}){return qA(8,[{provide:dl,useFactory:()=>new lC(t)}])}var Jd=new ee("API_URL");var Di=class t{apiUrl=C(Jd);events=new EventSource(`${this.apiUrl}/api/events`);projectResource=Ea(()=>`${this.apiUrl}/api/project`,{parse:e=>this.processTreeGitStatus(e)});constructor(){this.events.addEventListener("project-updated",()=>this.projectResource.reload())}processTreeGitStatus(e){let r=new Map(e.features.map(n=>[n.code,n])),i=n=>{let a=[...n.features.map(o=>r.get(o)?.gitStatus),...n.children.map(i)];return n.gitStatus=a.includes("untracked")?"untracked":a.includes("modified")?"modified":void 0,n.gitStatus};return e.trees.forEach(({root:n})=>i(n)),e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})};var da=class t{activeFeatureSignal=ge(null);activeFeature=this.activeFeatureSignal.asReadonly();activate(e){this.activeFeatureSignal.set(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Xe({token:t,factory:t.\u0275fac})};function KA(t,e){t&1&&j(0,` \u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435
|
|
19
|
+
`)}function ZA(t,e){t&1&&ye(0,"tui-icon",6),t&2&&st("font-size",16,"px")}function XA(t,e){t&1&&ye(0,"tui-icon",7),t&2&&st("font-size",16,"px")}function QA(t,e){if(t&1&&(L(0,"span",8),j(1),B()),t&2){let r=Q(3);Ze("zero",r.automatedCount()===0),R(),Xn(" ",r.automatedCount()," / ",r.totalCount()," ")}}function JA(t,e){if(t&1&&(L(0,"div",0),de(1,ZA,1,2,"tui-icon",1)(2,XA,1,2,"tui-icon",2),L(3,"span"),j(4),B()(),L(5,"div",3),de(6,QA,2,4,"span",4),L(7,"span",5),j(8),B()()),t&2){let r=e,i=Q(2);R(),fe(i.hasAsserts()?1:2),R(2),rs(r.gitStatus),R(),xe(" ",r.title," "),R(2),fe(i.totalCount()>0?6:-1),R(),rs(r.gitStatus),R(),xe(" ",i.gitStatusToLetter(r.gitStatus)," ")}}function e2(t,e){t&1&&j(0," \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430... ")}function t2(t,e){if(t&1&&de(0,JA,9,8)(1,e2,1,0),t&2){let r,i=Q();fe((r=i.feature())?0:1,r)}}var Vs=class t{projectSnapshotResource=C(Di).projectResource;activeFeatureService=C(da);router=C(Si);featureCode=U.required();isMissing=ge(!1);isActive=re(()=>{let e=this.activeFeatureService.activeFeature();return e?this.featureCode()===e.code:!1});hasAsserts=re(()=>{let e=this.feature();return e?e.groups.length>0:!1});feature=re(()=>{if(!this.projectSnapshotResource.hasValue())return null;let e=this.featureCode(),r=this.projectSnapshotResource.value().features.find(i=>i.code===e);return r||(this.isMissing.set(!0),null)});totalCount=re(()=>{let e=this.feature();return e?e.groups.flatMap(r=>r.assertions).length:0});automatedCount=re(()=>{let e=this.feature();return e?e.groups.flatMap(r=>r.assertions.filter(i=>i.isAutomated)).length:0});activate(){this.activeFeatureService.activate(this.feature()),this.router.navigate([],{queryParams:{feature:this.featureCode()},queryParamsHandling:"merge"})}gitStatusToLetter(e){return e==="untracked"?"U":e==="modified"?"M":" "}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-item"]],hostVars:2,hostBindings:function(r,i){r&1&&Ce("click",function(){return i.activate()}),r&2&&Ze("active",i.isActive())},inputs:{featureCode:[1,"featureCode"]},decls:2,vars:1,consts:[[1,"title"],["icon","@tui.table-of-contents",3,"font-size"],["icon","@tui.file-text",3,"font-size"],[1,"suffix"],[1,"counters",3,"zero"],[1,"status"],["icon","@tui.table-of-contents"],["icon","@tui.file-text"],[1,"counters"]],template:function(r,i){r&1&&de(0,KA,1,0)(1,t2,2,1),r&2&&fe(i.isMissing()?0:1)},dependencies:[Ni],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.4rem;padding:4px 12px;border-radius:4px;cursor:pointer}[_nghost-%COMP%]:hover{background:var(--tui-background-neutral-1-hover)}.active[_nghost-%COMP%]{color:var(--tui-text-primary-on-accent-1);background:var(--tui-background-accent-1)}.active[_nghost-%COMP%]:hover{background:var(--tui-background-accent-1-hover)}.title[_ngcontent-%COMP%], .suffix[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;align-items:center;gap:.2rem}.counters[_ngcontent-%COMP%]{white-space:nowrap;font:var(--tui-typography-body-xs);color:var(--tui-text-secondary)}.counters.zero[_ngcontent-%COMP%]{color:var(--tui-text-negative)}.status[_ngcontent-%COMP%]{font:var(--tui-typography-body-xs)}.modified[_ngcontent-%COMP%]{color:var(--tui-status-warning)}.untracked[_ngcontent-%COMP%]{color:var(--tui-text-positive)}"]})};function r2(t,e){if(t&1&&ye(0,"feature-item",0),t&2){let r=e.$implicit;Z("featureCode",r)}}function i2(t,e){t&1&&j(0,` \u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E
|
|
20
|
+
`)}var ef=class t{featureCodes=U.required();static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-list"]],inputs:{featureCodes:[1,"featureCodes"]},decls:3,vars:1,consts:[[3,"featureCode"]],template:function(r,i){r&1&&(dt(0,r2,1,1,"feature-item",0,gi),de(2,i2,1,0)),r&2&&(ft(i.featureCodes()),R(2),fe(i.featureCodes().length===0?2:-1))},dependencies:[Vs],encapsulation:2})};var[AC,w8]=ut({appearance:"",round:!0,size:"m"}),n2=class Uv{static{this.\u0275fac=function(i){return new(i||Uv)}}static{this.\u0275cmp=K({type:Uv,selectors:[["ng-component"]],exportAs:["tui-avatar-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiAvatar]:where(*[data-tui-version="5.16.0"]){--t-size: var(--tui-height-l);--t-radius: .75rem;--t-corner-offset: calc((var(--t-radius) * 1.4142 - var(--t-radius)) * 1 / 1.4142);position:relative;display:inline-flex;flex-shrink:0;inline-size:var(--t-size);min-inline-size:var(--t-size);block-size:var(--t-size);align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--t-radius);border:none;background:var(--tui-background-neutral-1);color:var(--tui-text-secondary);vertical-align:middle;box-sizing:border-box;padding:.25rem;font:var(--tui-typography-body-l);font-weight:700;aspect-ratio:1;opacity:.999}[tuiAvatar]:where(*[data-tui-version="5.16.0"]):is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled){cursor:pointer}[tuiAvatar]:where(*[data-tui-version="5.16.0"]):before{inline-size:auto;block-size:auto}[tuiAvatar]:where(*[data-tui-version="5.16.0"]):not(._initials):before{position:absolute;inset:0;font-size:calc(var(--t-size) * .6)}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xs]{--t-size: var(--tui-height-xs);--t-radius: .5rem;font:var(--tui-typography-ui-2xs);font-size:.5625rem}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xs]._initials:before{font:var(--tui-typography-ui-2xs);font-weight:700}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-size: var(--tui-height-s);--t-radius: .5rem;font:var(--tui-typography-ui-2xs);font-weight:700}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=s]._initials:before{font:var(--tui-typography-body-s);font-weight:700}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=m]{--t-size: calc(var(--tui-height-m) - .25rem);--t-radius: .75rem;font:var(--tui-typography-ui-m);font-weight:700}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=m]._initials:before{font:var(--tui-typography-body-m);font-weight:700}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xl]{--t-size: 5rem;--t-radius: .75rem;font:var(--tui-typography-heading-h4)}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xl]._initials:before{font:var(--tui-typography-heading-h3)}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xxl]{--t-size: 6rem;--t-radius: 1rem;font:var(--tui-typography-heading-h3)}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xxl]._initials:before{font:var(--tui-typography-heading-h3)}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xxxl]{--t-size: 8rem;--t-radius: 1.25rem;font:var(--tui-typography-heading-h3)}[tuiAvatar]:where(*[data-tui-version="5.16.0"])[data-size=xxxl]._initials:before{font:var(--tui-typography-heading-h2)}[tuiAvatar]:where(*[data-tui-version="5.16.0"]):not([data-shape=square]){--t-radius: calc(var(--t-size) / 2) !important}[tuiAvatar]:where(*[data-tui-version="5.16.0"])._initials:before{content:attr(data-icon-start);-webkit-mask-image:none;mask-image:none;background:none;font:var(--tui-typography-heading-h6)}[tuiAvatar]:where(*[data-tui-version="5.16.0"])._badge{-webkit-mask-image:radial-gradient(circle at calc(max(var(--tui-inline),0) * 100% - var(--tui-inline) * var(--t-corner-offset)) calc(100% - var(--t-corner-offset)),black .23rem,transparent .25rem,transparent .375rem,black .39rem);mask-image:radial-gradient(circle at calc(max(var(--tui-inline),0) * 100% - var(--tui-inline) * var(--t-corner-offset)) calc(100% - var(--t-corner-offset)),black .23rem,transparent .25rem,transparent .375rem,black .39rem);mask-clip:no-clip}[tuiAvatar]:where(*[data-tui-version="5.16.0"])._badge:after{content:"";position:absolute;display:block;inset-block-start:calc(100% - var(--t-corner-offset));inset-inline-start:calc(100% - var(--t-corner-offset));inline-size:.55rem;block-size:.55rem;border-radius:100%;background:var(--t-badge);transform:translate3d(calc(var(--tui-inline) * -50%),-50%,0);zoom:1}[tuiAvatar]:where(*[data-tui-version="5.16.0"])._fallback img,[tuiAvatar]:where(*[data-tui-version="5.16.0"])._fallback video{display:none}[tuiAvatar]:where(*[data-tui-version="5.16.0"]) img,[tuiAvatar]:where(*[data-tui-version="5.16.0"]) video,[tuiAvatar]:where(*[data-tui-version="5.16.0"]) picture{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;object-fit:cover;box-sizing:border-box;border-radius:inherit}[tuiAvatar]:where(*[data-tui-version="5.16.0"]):has(img,video):not(._fallback){background:none}
|
|
21
|
+
`],encapsulation:2})}},OC=(()=>{class t{constructor(){this.options=C(AC),this.nothing=$t(n2),this.icons=C(Pi),this.fallback=ge(!1),this.size=U(this.options.size),this.round=U(this.options.round),this.badge=U("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiAvatar",""]],hostAttrs:["tuiAvatar",""],hostVars:10,hostBindings:function(i,n){if(i&1&&Ce("error.capture",function(){return n.fallback.set(!0)})("load.capture",function(){return n.fallback.set(!1)}),i&2){let a;Ve("data-shape",n.round()?"round":"square")("data-size",n.size()),st("--t-badge",n.badge()),Ze("_badge",n.badge())("_fallback",n.fallback())("_initials",((a=n.icons.iconStart())==null?null:a.length)<3)}},inputs:{size:[1,"size"],round:[1,"round"],badge:[1,"badge"]},features:[_e([Mn(AC)]),Le([In,{directive:Pi,inputs:["iconStart","tuiAvatar"]}])]})}}return t})();var a2=new ee("",{factory:()=>"@tui.chevron-down"}),o2=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-chevron-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiChevron][tuiIcons]:where(*[data-tui-version="5.16.0"]):after,tui-icon[tuiChevron]:where(*[data-tui-version="5.16.0"]):before{transition-property:transform,color;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);cursor:pointer;font-size:1rem}[tuiButton][data-size=m][tuiChevron][tuiIcons]:where(*[data-tui-version="5.16.0"]):after{margin-inline-end:-.125rem}[tuiChevron][tuiIcons]:where(*[data-tui-version="5.16.0"])._chevron-rotated:after,tui-icon[tuiChevron]:where(*[data-tui-version="5.16.0"])._chevron-rotated:before{transform:rotate(180deg)}tui-textfield[tuiChevron][tuiIcons]:where(*[data-tui-version="5.16.0"]){--t-stroke: var(--tui-stroke-width)}tui-textfield[tuiChevron][tuiIcons]:where(*[data-tui-version="5.16.0"]):after{transform:rotate(0) scale(calc(2 / 3));font-size:1.5rem;--tui-stroke-width: calc(var(--t-stroke) / 2 * 3)}tui-textfield[tuiChevron][tuiIcons]:where(*[data-tui-version="5.16.0"])._chevron-rotated:after{transform:rotate(180deg) scale(calc(2 / 3))}tui-textfield[tuiChevron][tuiIcons]:where(*[data-tui-version="5.16.0"]):has(select[tuiSelect]:open):after{transform:rotate(180deg) scale(calc(2 / 3))}
|
|
22
|
+
`],encapsulation:2})}}return t})(),Hs=(()=>{class t{constructor(){this.el=Be(),this.dropdown=C(kr,{optional:!0}),this.nothing=$t(o2),this.toggle=ot(()=>this.el.classList.toggle("_chevron-rotated",this.rotated()||this.rotated()===""&&!!this.dropdown?.ref())),this.rotated=U("",{alias:"tuiChevron"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiChevron",""]],hostAttrs:["tuiChevron",""],inputs:{rotated:[1,"tuiChevron","rotated"]},features:[_e([Ct(ed,a2)])]})}}return t})();var s2={appearance:"",size:"l"},[RC,PC]=ut(s2),u2=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-badge-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiBadge]:where(*[data-tui-version="5.16.0"]){--t-scale: calc(1 + (var(--tui-font-scale) - 1) / 2);--t-icon-size: 1rem;--t-padding: calc(.5rem * var(--t-scale));--t-size: var(--tui-height-xs);--t-margin: -.25rem;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;position:relative;display:inline-flex;align-items:center;flex-shrink:0;box-sizing:border-box;white-space:nowrap;overflow:hidden;vertical-align:middle;max-inline-size:100%;gap:calc(var(--t-gap, 0rem) - 2 * var(--t-margin, 0rem));border-radius:6rem;justify-content:center;background:#959595;color:var(--tui-background-base);padding:.0625rem var(--t-padding);block-size:var(--t-size);min-block-size:calc(var(--tui-lh) + .125rem);min-inline-size:max(calc(var(--tui-lh) + .125rem),var(--t-size));inline-size:fit-content;font:var(--tui-typography-ui-s);zoom:1}[tuiBadge]:where(*[data-tui-version="5.16.0"])>img,[tuiBadge]:where(*[data-tui-version="5.16.0"])>tui-icon,[tuiBadge]:where(*[data-tui-version="5.16.0"])>[tuiAvatar],[tuiBadge]:where(*[data-tui-version="5.16.0"])>tui-badge,[tuiBadge]:where(*[data-tui-version="5.16.0"])>[tuiBadge],[tuiBadge]:where(*[data-tui-version="5.16.0"])>[tuiRadio],[tuiBadge]:where(*[data-tui-version="5.16.0"])>[tuiSwitch],[tuiBadge]:where(*[data-tui-version="5.16.0"])>[tuiCheckbox],[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiIcons]:before,[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiIcons]:after{margin:var(--t-margin)}@supports not (font-size: 1lh){[tuiBadge]:where(*[data-tui-version="5.16.0"]){--tui-lh: 1.2em}}[tuiBadge]:where(*[data-tui-version="5.16.0"])>tui-icon,[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiIcons]:before,[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiIcons]:after{font-size:calc(var(--t-icon-size) * var(--t-scale))!important;zoom:1}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-appearance=negative]{--t-status: var(--tui-status-negative)}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-appearance=positive]{--t-status: var(--tui-status-positive)}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-appearance=warning]{--t-status: var(--tui-status-warning)}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-appearance=info]{--t-status: var(--tui-status-info)}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-appearance=neutral]{--t-status: var(--tui-status-neutral)}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-size=s]{--t-padding: calc(.25rem * var(--tui-font-scale) * var(--t-scale));--t-size: 1rem;--t-icon-size: .625rem;--t-margin: -.0625rem;font:var(--tui-typography-ui-2xs);gap:.1875rem}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-size=s][tuiStatus]:before{inline-size:.25rem;block-size:.25rem;margin-inline:.0625rem -.125rem}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-size=m]{--t-padding: calc(.375rem * var(--tui-font-scale));--t-size: 1.25rem;--t-icon-size: .75rem;--t-margin: -.125rem}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-size=xl]{--t-margin: -.25rem;--t-padding: .75rem;--t-size: var(--tui-height-s);font:var(--tui-typography-ui-m)}[tuiBadge]:where(*[data-tui-version="5.16.0"])[data-size=xl][tuiStatus]:before{inline-size:.5rem;block-size:.5rem}[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=negative],[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=positive],[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=warning],[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=info],[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiAppearance][data-appearance=neutral]{color:var(--tui-text-primary)}[tuiBadge]:where(*[data-tui-version="5.16.0"])[tuiStatus]:before{inline-size:.375rem;block-size:.375rem;margin:0}img[tuiBadge]:where(*[data-tui-version="5.16.0"]),tui-icon[tuiBadge]:where(*[data-tui-version="5.16.0"]){padding:0;inline-size:var(--t-size)}img[tuiBadge]:where(*[data-tui-version="5.16.0"]):before,tui-icon[tuiBadge]:where(*[data-tui-version="5.16.0"]):before{position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;--t-margin: 0}
|
|
23
|
+
`],encapsulation:2})}}return t})(),Us=(()=>{class t{constructor(){this.nothing=$t(u2),this.size=U(C(RC).size)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiBadge",""],["tui-icon","tuiBadge",""]],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-size",n.size())},inputs:{size:[1,"size"]},features:[_e([Mn(RC)]),Le([In,Yi])]})}}return t})();var l2=["*"],c2={size:"m"},[d2,Y8]=ut(c2),NC=(()=>{class t{constructor(){this.size=U(C(d2).size)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-badge-notification"]],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-size",n.size())},inputs:{size:[1,"size"]},features:[Le([An])],ngContentSelectors:l2,decls:1,vars:0,template:function(i,n){i&1&&(kt(),Qe(0))},styles:["[_nghost-%COMP%]{--t-size: 1.5rem;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;color:#fff;border-radius:2rem;white-space:nowrap;overflow:hidden;vertical-align:middle;font:var(--tui-typography-ui-s);max-inline-size:100%;padding:.0625rem .3125rem;background:var(--tui-status-negative);block-size:var(--t-size);min-block-size:var(--tui-lh);min-inline-size:max(var(--t-size),var(--tui-lh))}.tui-enter[_nghost-%COMP%]{animation:tuiScale var(--tui-duration) cubic-bezier(.34,1.56,.64,1)}.tui-leave[_nghost-%COMP%]{animation:tuiScale var(--tui-duration) ease-in-out reverse}[data-size=m][_nghost-%COMP%]{--t-size: 1.25rem;padding:.0625rem .25rem}[data-size=s][_nghost-%COMP%]{--t-size: 1rem;padding:0 .125rem;font:var(--tui-typography-ui-xs)}[data-size=xs][_nghost-%COMP%]{--t-size: .375rem;padding:0;font-size:0}[_nghost-%COMP%] [tuiIconButton][_nghost-%COMP%], [tuiIconButton] [_nghost-%COMP%]{position:absolute;inset-inline-end:25%;inset-block-start:25%}"]})}}return t})();var f2=["*",[["tui-badge-notification","tuiSlot","top"],["img","tuiSlot","top"]],[["","tuiSlot","top"]],[["tui-badge-notification","tuiSlot","bottom"],["img","tuiSlot","bottom"]],[["","tuiSlot","bottom"]]],h2=["*","tui-badge-notification[tuiSlot='top'], img[tuiSlot='top']","[tuiSlot='top']","tui-badge-notification[tuiSlot='bottom'], img[tuiSlot='bottom']","[tuiSlot='bottom']"],FC=(()=>{class t{constructor(){this.cdr=C(vr),this.el=Be()}get imgTop(){return this.resolve(".t-badge_top img")}get imgBottom(){return this.resolve(".t-badge_bottom img")}onResize(){this.cdr.detectChanges()}resolve(r){return`url(${this.el.querySelector(r)?.getAttribute("src")||""})`}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-badged-content"]],ngContentSelectors:h2,decls:11,vars:8,consts:[["badgeTop",""],["badgeBottom",""],[1,"t-badge","t-badge_top",3,"resize"],[1,"t-border"],[1,"t-badge","t-badge_bottom",3,"resize"]],template:function(i,n){if(i&1&&(kt(f2),Qe(0),ui(1,"div",2,0),ts("resize",function(){return n.onResize()}),Qe(3,1),ui(4,"div",3),Qe(5,2),Tn()(),ui(6,"div",4,1),ts("resize",function(){return n.onResize()}),Qe(8,3),ui(9,"div",3),Qe(10,4),Tn()()),i&2){let a=pr(2),o=pr(7);R(),st("--t-badge-height",a.offsetHeight,"px")("--t-img",n.imgTop),R(5),st("--t-badge-height",o.offsetHeight,"px")("--t-img",n.imgBottom)}},styles:['[_nghost-%COMP%]{--tui-radius: var(--tui-radius-l);--t-badge-height: 0;--t-corner-offset: calc((var(--tui-radius) * 1.4142 - var(--tui-radius)) * 1 / 1.4142);position:relative;display:inline-block;block-size:fit-content;inline-size:max-content;color:var(--tui-background-base)}.t-badge[_ngcontent-%COMP%]{--t-offset: calc(var(--t-badge-height) * -.5 + var(--t-corner-offset));position:absolute;display:flex;isolation:isolate}.t-badge_top[_ngcontent-%COMP%]{inset-block-start:var(--t-offset);inset-inline-end:var(--t-offset)}.t-badge_bottom[_ngcontent-%COMP%]{inset-block-end:var(--t-offset);inset-inline-end:var(--t-offset)}.t-badge[_ngcontent-%COMP%]:before{inset:50% auto auto 50%;transform:translate(-50%,-50%);content:"";position:absolute;z-index:-1;inline-size:120%;block-size:120%;-webkit-mask-image:var(--t-img);mask-image:var(--t-img);-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;background-color:currentColor}.t-border[_ngcontent-%COMP%]:not(:empty){display:flex;border-radius:6rem;box-shadow:0 0 0 1px currentColor;background:currentColor}']})}}return t})(),BC=(()=>{class t{constructor(){this.tuiSlot=U("top")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiSlot",""]],inputs:{tuiSlot:[1,"tuiSlot"]}})}}return t})();var nY=new ee("",{factory:yt("confirm")}),aY=new ee("",{factory:yt("cancel")}),oY=new ee("",{factory:yt("done")}),sY=new ee("",{factory:yt("more")}),uY=new ee("",{factory:yt("hide")}),lY=new ee("",{factory:yt("showAll")}),cY=new ee("",{factory:yt("otherDate")}),dY=new ee("",{factory:yt("mobileCalendarTexts")}),fY=new ee("",{factory:yt("range")}),hY=new ee("",{factory:yt("countTexts")}),pY=new ee("",{factory:yt("time")}),vY=new ee("",{factory:yt("dateTexts")}),mY=new ee("",{factory:yt("digitalInformationUnits")}),jv=new ee("",{factory:yt("copyTexts")}),gY=new ee("",{factory:yt("passwordTexts")}),yY=new ee("",{factory:yt("shortCalendarMonths")}),bY=new ee("",{factory:yt("fileTexts")}),CY=new ee("",{factory:yt("pagination")}),wY=new ee("",{factory:yt("inputFileTexts")}),_Y=new ee("",{factory:yt("multiSelectTexts")}),xY=new ee("",{factory:yt("countries")}),TY=new ee("",{factory:yt("previewTexts")}),SY=new ee("",{factory:yt("zoomTexts")}),DY=new ee("",{factory:yt("phoneSearch")}),EY=new ee("",{factory:yt("dayRangePeriods")});var p2={appearance:"neutral",size:"s"},[IY,LC]=ut(p2);function zC(){let t=C(li,{optional:!0}),e=t?.control()||C($r,{optional:!0}),r=$i($c(e),{requireSync:!0});return re(()=>{let i=t?.child();return i?i.value():r()})}function v2(t,e){if(t&1&&ye(0,"input",0),t&2){let r=Q();Z("size",r.datalist.size()==="l"?"m":"s")}}var m2=(()=>{class t{constructor(){this.handlers=C(xi),this.value=zC(),this.datalist=C(Rn),this.option=C(xs),this.selected=re((r=this.value(),i=this.option.value())=>dn(i)&&dn(r)&&this.handlers.identityMatcher()(r,i)),this.scrolled=Ri(ld,"tuiScrollIntoView",this.selected)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],hostAttrs:["tuiSelectOption",""],hostVars:1,hostBindings:function(i,n){i&2&&Ve("aria-selected",n.selected())},features:[_e([Yb({appearance:()=>"action"})]),Le([ld])],decls:1,vars:1,consts:[["aria-hidden","true","checked","","tuiCheckbox","","type","checkbox",1,"t-check",3,"size"]],template:function(i,n){i&1&&de(0,v2,1,1,"input",0),i&2&&fe(n.selected()?0:-1)},dependencies:[Kb],styles:["[_nghost-%COMP%] > .t-check[_ngcontent-%COMP%]{order:100;margin-inline-start:auto;pointer-events:none}[data-size=m][_nghost-%COMP%] > .t-check[_ngcontent-%COMP%]{margin-inline-end:.25rem}tui-dropdown-mobile[_nghost-%COMP%] > .t-check[_ngcontent-%COMP%], tui-dropdown-mobile [_nghost-%COMP%] > .t-check[_ngcontent-%COMP%]{display:none}.t-check[_ngcontent-%COMP%]:before{font-size:var(--t-size)}"]})}}return t})(),tf=(()=>{class t extends vn{constructor(){super(...arguments),this.input=C(Yu),this.open=C(sa).open,this.itemsHandlers=C(xi),this.dropdownEnabled=u1(this.interactive),this.valueEffect=ot(()=>{let r=this.value(),i=dn(r)?this.itemsHandlers.stringify()(r):"";this.input.value.set(i)})}setValue(r){this.onChange(r),r||this.open.set(!0)}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=te({type:t,selectors:[["input","tuiSelect",""]],hostVars:1,hostBindings:function(i,n){i&1&&Ce("input",function(o){return(o.inputType==null?null:o.inputType.includes("delete"))&&n.setValue(null)}),i&2&&Wr("disabled",n.disabled())},features:[_e([d1(m2),wd(t),v1(t)]),Le([C1,b1]),Ae]})}}return t})();var qv=class{_document;_textarea;constructor(e,r){this._document=r;let i=this._textarea=this._document.createElement("textarea"),n=i.style;n.position="fixed",n.top=n.opacity="0",n.left="-999em",i.setAttribute("aria-hidden","true"),i.value=e,i.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(i)}copy(){let e=this._textarea,r=!1;try{if(e){let i=this._document.activeElement;e.select(),e.setSelectionRange(0,e.value.length),r=this._document.execCommand("copy"),i&&i.focus()}}catch{}return r}destroy(){let e=this._textarea;e&&(e.remove(),this._textarea=void 0)}},pl=(()=>{class t{_document=C(Tt);copy(r){let i=this.beginCopy(r),n=i.copy();return i.destroy(),n}beginCopy(r){return new qv(r,this._document)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})}return t})(),g2=new ee("CDK_COPY_TO_CLIPBOARD_CONFIG"),VC=(()=>{class t{_clipboard=C(pl);_ngZone=C(gr);text="";attempts=1;copied=new mi;_pending=new Set;_destroyed=!1;_currentTimeout;constructor(){let r=C(g2,{optional:!0});r&&r.attempts!=null&&(this.attempts=r.attempts)}copy(r=this.attempts){if(r=Math.min(r,50),r>1){let i=r,n=this._clipboard.beginCopy(this.text);this._pending.add(n);let a=()=>{let o=n.copy();!o&&--i&&!this._destroyed?this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(a,1)):(this._currentTimeout=null,this._pending.delete(n),n.destroy(),this.copied.emit(o))};a()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(r=>r.destroy()),this._pending.clear(),this._destroyed=!0}static \u0275fac=function(i){return new(i||t)};static \u0275dir=te({type:t,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(i,n){i&1&&Ce("click",function(){return n.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}})}return t})(),HC=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Zn({type:t});static \u0275inj=Yn({})}return t})();var UC=["*"];function b2(t,e){if(t&1&&j(0),t&2){let r=Q();xe(" ",r.copiedText()," ")}}function C2(t,e){t&1&&Qe(0)}function w2(t,e){if(t&1&&(ye(0,"tui-icon",4),j(1)),t&2){let r=Q();Z("icon",r.check),R(),xe(" ",r.texts()[1],`
|
|
24
|
+
`)}}var[jC,IK]=ut({icon:"@tui.copy"}),qC=(()=>{class t{constructor(){this.el=Be(),this.clipboard=C(pl),this.options=C(jC),this.copyTexts=C(jv),this.notification=C(Ss),this.check=Dn(this.notification.icon)?this.notification.icon:this.notification.icon("positive"),this.copied=ge(!1),this.copiedText=re(()=>this.copyTexts()[1]),this.icon=ms(re(()=>this.copied()?this.check:this.options.icon)),this.tuiButtonCopy=U("")}copy(r){let i=this.el===r;i&&this.clipboard.copy(this.tuiButtonCopy()),this.copied.set(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["","tuiButtonCopy",""]],hostAttrs:["tuiButton","","type","button"],hostBindings:function(i,n){i&1&&Ce("click.capture",function(o){return n.copy(o.target)},es)},inputs:{tuiButtonCopy:[1,"tuiButtonCopy"]},features:[_e([Gr({appearance:"flat-grayscale",size:"s"})]),Le([_i])],ngContentSelectors:UC,decls:2,vars:1,template:function(i,n){i&1&&(kt(),de(0,b2,1,1)(1,C2,1,0)),i&2&&fe(n.copied()?0:1)},styles:[`tui-hint:has([tuiButtonCopy]):where(*[data-tui-version="5.16.0"]){display:flex;padding:.375rem;max-inline-size:none}[tuiButtonCopy]:where(*[data-tui-version="5.16.0"]):not(:first-of-type){margin-inline-start:calc(.75rem - 1px);border-image:linear-gradient(transparent .375rem,var(--tui-border-normal) .375rem,var(--tui-border-normal) calc(100% - .375rem),transparent calc(100% - .375rem)) 0 0 0 1 / 0 1px / 0 .375rem}
|
|
25
|
+
`],encapsulation:2})}}return t})(),rf=(()=>{class t{constructor(){this.notification=C(Ss),this.options=C(jC),this.copied$=new xr(!1),this.texts=C(jv),this.hint=$i(this.copied$.pipe(mt(r=>Mi(2e3).pipe(Ie(ta),Ht(r))))),this.size=U("m")}get check(){return Dn(this.notification.icon)?this.notification.icon:this.notification.icon("positive")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-copy"]],hostVars:1,hostBindings:function(i,n){i&1&&Ce("pointerdown",function(){return n.copied$.next(!1)}),i&2&&Ve("data-size",n.size())},inputs:{size:[1,"size"]},ngContentSelectors:UC,decls:6,vars:6,consts:[["content",""],["template",""],["tuiHintAppearance","floating","tuiHintDirection","top",1,"t-content",3,"cdkCopyToClipboardCopied","cdkCopyToClipboard","tuiHint","tuiHintManual"],["appearance","icon","size","xs","tuiIconButton","","type","button",1,"t-button",3,"cdkCopyToClipboardCopied","cdkCopyToClipboard","iconStart"],[1,"t-icon",3,"icon"]],template:function(i,n){if(i&1&&(kt(),L(0,"span",2,0),Ce("cdkCopyToClipboardCopied",function(o){return n.copied$.next(o)}),Qe(2),B(),L(3,"button",3),Ce("cdkCopyToClipboardCopied",function(o){return n.copied$.next(o)}),B(),Me(4,w2,2,2,"ng-template",null,1,Oi)),i&2){let a=pr(1),o=pr(5);Z("cdkCopyToClipboard",a.textContent??"")("tuiHint",o)("tuiHintManual",!!n.hint()),R(3),Z("cdkCopyToClipboard",a.textContent??"")("iconStart",n.options.icon),Ve("aria-label",n.texts()[0])}},dependencies:[HC,VC,_i,ua,O1,Ni],styles:["[_nghost-%COMP%]{cursor:pointer}[data-size=m][_nghost-%COMP%]{--t-size: min( calc(1em + 1px) , 1rem)}[data-size=l][_nghost-%COMP%]{--t-size: max(calc(1em / 1.57), min(max(calc(1em / 1.18), 1.25rem), 1.5rem))}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%]:hover .t-content[_ngcontent-%COMP%]{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}[_nghost-%COMP%]:hover .t-button[_ngcontent-%COMP%]{opacity:1}}[_nghost-%COMP%]:has(.t-button:focus-visible) .t-content[_ngcontent-%COMP%]{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}.t-content[_ngcontent-%COMP%]{transition-property:opacity,mask;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);-webkit-mask-image:linear-gradient(to var(--tui-inline-start),transparent calc(1.25 * var(--t-size)),black calc(2 * var(--t-size))),linear-gradient(to var(--tui-inline-end),black,black calc(2 * var(--t-size)),transparent calc(2 * var(--t-size)));mask-image:linear-gradient(to var(--tui-inline-start),transparent calc(1.25 * var(--t-size)),black calc(2 * var(--t-size))),linear-gradient(to var(--tui-inline-end),black,black calc(2 * var(--t-size)),transparent calc(2 * var(--t-size)));-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0;mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0}.t-button[_ngcontent-%COMP%]{position:sticky;inset-inline-start:0;opacity:0;border-radius:0;font-size:inherit!important;margin-inline-start:calc(-1 * var(--t-size));--t-size: inherit}.t-button[_ngcontent-%COMP%]:before{font-size:var(--t-size)}.t-button[_ngcontent-%COMP%]:focus-visible{opacity:1}.t-icon[_ngcontent-%COMP%]{font-size:1rem;margin-inline-end:.25rem;vertical-align:sub;color:var(--tui-text-positive)}"]})}}return t})();var _2=t=>({$implicit:t});function x2(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}function T2(t,e){if(t&1){let r=Kt();L(0,"button",3),Ce("click.capture",function(){let n=Nt(r).$implicit,a=Q(2);return Ft(a.itemClick.emit(n))}),Me(1,x2,2,1,"ng-container",4),B()}if(t&2){let r=e.$implicit,i=Q(2);Z("disabled",i.handlers.disabledItemHandler()(r))("value",r),R(),Z("polymorpheusOutlet",i.content())("polymorpheusOutletContext",Ai(4,_2,r))}}function S2(t,e){if(t&1&&(L(0,"tui-data-list",0),dt(1,T2,2,6,"button",2,gi),B()),t&2){let r=Q();Z("emptyContent",r.emptyContent())("size",r.size()),R(),ft(r.$cast(r.items()))}}function D2(t,e){t&1&&ye(0,"tui-loader",1)}var nf=(()=>{class t{constructor(){this.handlers=C(xi),this.datalist=wi(Rn),this.content=re(()=>this.itemContent()??(({$implicit:r})=>this.handlers.stringify()(r))),this.options=re(()=>this.datalist()?.options()??[]),this.items=U([]),this.emptyContent=U(),this.size=U(ov()),this.itemContent=U(),this.itemClick=qi()}$cast(r){return r}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tui-data-list-wrapper",3,"labels",""]],viewQuery:function(i,n){i&1&&Ci(n.datalist,Rn,5),i&2&&Wt()},inputs:{items:[1,"items"],emptyContent:[1,"emptyContent"],size:[1,"size"],itemContent:[1,"itemContent"]},outputs:{itemClick:"itemClick"},features:[_e([Zc(t)])],decls:2,vars:1,consts:[[3,"emptyContent","size"],[1,"t-loader"],["tuiOption","","type","button",3,"disabled","value"],["tuiOption","","type","button",3,"click.capture","disabled","value"],[4,"polymorpheusOutlet","polymorpheusOutletContext"]],template:function(i,n){i&1&&de(0,S2,3,2,"tui-data-list",0)(1,D2,1,0,"tui-loader",1),i&2&&fe(n.items()?0:1)},dependencies:[Er,Rn,f1,xs,_d],styles:["[_nghost-%COMP%]{display:block}.t-content[_ngcontent-%COMP%]{flex:1;min-inline-size:0}.t-loader[_ngcontent-%COMP%]{margin:.75rem 0}"]})}}return t})();var E2={color:null,size:"m"},[qK,WC]=ut(E2);var k2=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-status-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`[tuiStatus]:where(*[data-tui-version="5.16.0"]){display:inline-flex;align-items:center;gap:.5rem}[tuiStatus]:where(*[data-tui-version="5.16.0"]):before{content:"";display:var(--t-status, none);inline-size:.5rem;block-size:.5rem;border-radius:100%;background:var(--t-status)}[tuiStatus]:where(*[data-tui-version="5.16.0"])[data-size=s],[tuiStatus]:where(*[data-tui-version="5.16.0"])[data-size=m],[tuiStatus]:where(*[data-tui-version="5.16.0"])[data-size=l]{gap:.25rem}[tuiStatus]:where(*[data-tui-version="5.16.0"])[data-size=xl]{gap:.375rem}
|
|
26
|
+
`],encapsulation:2})}}return t})(),$C=(()=>{class t{constructor(){this.nothing=$t(k2),this.tuiStatus=U("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiStatus",""]],hostAttrs:["data-tui-version","5.16.0","tuiStatus",""],hostVars:2,hostBindings:function(i,n){i&2&&st("--t-status",n.tuiStatus()||null)},inputs:{tuiStatus:[1,"tuiStatus"]}})}}return t})();function Yv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Oo=Yv();function ew(t){Oo=t}var Io={exec:()=>null};function js(t){let e=[];return r=>{let i=Math.max(0,Math.min(3,r-1)),n=e[i];return n||(n=t(i),e[i]=n),n}}function wt(t,e=""){let r=typeof t=="string"?t:t.source,i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(ri.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,e)};return i}var M2=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),ri={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:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:js(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:js(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:js(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:js(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:js(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:js(t=>new RegExp(`^ {0,${t}}>`))},I2=/^(?:[ \t]*(?:\n|$))+/,A2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,O2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,gl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,R2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Kv=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,tw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rw=wt(tw).replace(/bull/g,Kv).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),P2=wt(tw).replace(/bull/g,Kv).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Zv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,N2=/^[^\n]+/,Xv=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,F2=wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),B2=wt(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Kv).getRegex(),lf="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",Qv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,L2=wt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\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",Qv).replace("tag",lf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),iw=t=>wt(Zv).replace("hr",gl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",lf).getRegex(),z2=iw(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),V2=iw(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),H2=wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",V2).getRegex(),Jv={blockquote:H2,code:A2,def:F2,fences:O2,heading:R2,hr:gl,html:L2,lheading:rw,list:B2,newline:I2,paragraph:z2,table:Io,text:N2},GC=wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",lf).getRegex(),U2=Ke(ae({},Jv),{lheading:P2,table:GC,paragraph:wt(Zv).replace("hr",gl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",GC).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",lf).getRegex()}),j2=Ke(ae({},Jv),{html:wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qv).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:Io,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:wt(Zv).replace("hr",gl).replace("heading",` *#{1,6} *[^
|
|
27
|
+
]`).replace("lheading",rw).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),q2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,W2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,nw=/^( {2,}|\\)\n(?!\s*$)/,$2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,qs=/[\p{P}\p{S}]/u,cf=/[\s\p{P}\p{S}]/u,em=/[^\s\p{P}\p{S}]/u,G2=wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,cf).getRegex(),aw=/(?!~)[\p{P}\p{S}]/u,Y2=/(?!~)[\s\p{P}\p{S}]/u,K2=/(?:[^\s\p{P}\p{S}]|~)/u,Z2=wt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",M2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ow=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,X2=wt(ow,"u").replace(/punct/g,qs).getRegex(),Q2=wt(ow,"u").replace(/punct/g,aw).getRegex(),sw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",J2=wt(sw,"gu").replace(/notPunctSpace/g,em).replace(/punctSpace/g,cf).replace(/punct/g,qs).getRegex(),eO=wt(sw,"gu").replace(/notPunctSpace/g,K2).replace(/punctSpace/g,Y2).replace(/punct/g,aw).getRegex(),tO=wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,em).replace(/punctSpace/g,cf).replace(/punct/g,qs).getRegex(),rO=wt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,qs).getRegex(),iO="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",nO=wt(iO,"gu").replace(/notPunctSpace/g,em).replace(/punctSpace/g,cf).replace(/punct/g,qs).getRegex(),aO=wt(/\\(punct)/,"gu").replace(/punct/g,qs).getRegex(),oO=wt(/^<(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(),sO=wt(Qv).replace("(?:-->|$)","-->").getRegex(),uO=wt("^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",sO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),of=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,lO=wt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",of).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uw=wt(/^!?\[(label)\]\[(ref)\]/).replace("label",of).replace("ref",Xv).getRegex(),lw=wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xv).getRegex(),cO=wt("reflink|nolink(?!\\()","g").replace("reflink",uw).replace("nolink",lw).getRegex(),YC=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,tm={_backpedal:Io,anyPunctuation:aO,autolink:oO,blockSkip:Z2,br:nw,code:W2,del:Io,delLDelim:Io,delRDelim:Io,emStrongLDelim:X2,emStrongRDelimAst:J2,emStrongRDelimUnd:tO,escape:q2,link:lO,nolink:lw,punctuation:G2,reflink:uw,reflinkSearch:cO,tag:uO,text:$2,url:Io},dO=Ke(ae({},tm),{link:wt(/^!?\[(label)\]\((.*?)\)/).replace("label",of).getRegex(),reflink:wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",of).getRegex()}),Wv=Ke(ae({},tm),{emStrongRDelimAst:eO,emStrongLDelim:Q2,delLDelim:rO,delRDelim:nO,url:wt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",YC).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:wt(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",YC).getRegex()}),fO=Ke(ae({},Wv),{br:wt(nw).replace("{2,}","*").getRegex(),text:wt(Wv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),af={normal:Jv,gfm:U2,pedantic:j2},vl={normal:tm,gfm:Wv,breaks:fO,pedantic:dO},hO={"&":"&","<":"<",">":">",'"':""","'":"'"},KC=t=>hO[t];function Fn(t,e){if(e){if(ri.escapeTest.test(t))return t.replace(ri.escapeReplace,KC)}else if(ri.escapeTestNoEncode.test(t))return t.replace(ri.escapeReplaceNoEncode,KC);return t}function ZC(t){try{t=encodeURI(t).replace(ri.percentDecode,"%")}catch{return null}return t}function XC(t,e){let r=t.replace(ri.findPipe,(a,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),i=r.split(ri.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(ri.slashPipe,"|");return i}function La(t,e,r){let i=t.length;if(i===0)return"";let n=0;for(;n<i;){let a=t.charAt(i-n-1);if(a===e&&!r)n++;else if(a!==e&&r)n++;else break}return t.slice(0,i-n)}function QC(t){let e=t.split(`
|
|
28
|
+
`),r=e.length-1;for(;r>=0&&ri.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
29
|
+
`)}function pO(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}function vO(t,e=0){let r=e,i="";for(let n of t)if(n===" "){let a=4-r%4;i+=" ".repeat(a),r+=a}else i+=n,r++;return i}function JC(t,e,r,i,n){let a=e.href,o=e.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,u}function mO(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(i===null)return e;let n=i[1];return e.split(`
|
|
30
|
+
`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[s]=o;return s.length>=n.length?a.slice(n.length):a}).join(`
|
|
31
|
+
`)}var sf=class{options;rules;lexer;constructor(t){this.options=t||Oo}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=this.options.pedantic?e[0]:QC(e[0]),i=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:i}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],i=mO(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let i=La(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:La(e[0],`
|
|
32
|
+
`),depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:La(e[0],`
|
|
33
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=La(e[0],`
|
|
34
|
+
`).split(`
|
|
35
|
+
`),i="",n="",a=[];for(;r.length>0;){let o=!1,s=[],u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))s.push(r[u]),o=!0;else if(!o)s.push(r[u]);else break;r=r.slice(u);let l=s.join(`
|
|
36
|
+
`),c=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
37
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
38
|
+
${l}`:l,n=n?`${n}
|
|
39
|
+
${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=d,r.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,h=p.raw+`
|
|
40
|
+
`+r.join(`
|
|
41
|
+
`),g=this.blockquote(h);a[a.length-1]=g,i=i.substring(0,i.length-p.raw.length)+g.raw,n=n.substring(0,n.length-p.text.length)+g.text;break}else if(f?.type==="list"){let p=f,h=p.raw+`
|
|
42
|
+
`+r.join(`
|
|
43
|
+
`),g=this.list(h);a[a.length-1]=g,i=i.substring(0,i.length-f.raw.length)+g.raw,n=n.substring(0,n.length-p.raw.length)+g.raw,r=h.substring(a.at(-1).raw.length).split(`
|
|
44
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:a,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;t;){let u=!1,l="",c="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;l=e[0],t=t.substring(l.length);let d=vO(e[2].split(`
|
|
45
|
+
`,1)[0],e[1].length),f=t.split(`
|
|
46
|
+
`,1)[0],p=!d.trim(),h=0;if(this.options.pedantic?(h=2,c=d.trimStart()):p?h=e[1].length+1:(h=d.search(this.rules.other.nonSpaceChar),h=h>4?1:h,c=d.slice(h),h+=e[1].length),p&&this.rules.other.blankLine.test(f)&&(l+=f+`
|
|
47
|
+
`,t=t.substring(f.length+1),u=!0),!u){let g=this.rules.other.nextBulletRegex(h),v=this.rules.other.hrRegex(h),m=this.rules.other.fencesBeginRegex(h),y=this.rules.other.headingBeginRegex(h),b=this.rules.other.htmlBeginRegex(h),w=this.rules.other.blockquoteBeginRegex(h);for(;t;){let T=t.split(`
|
|
48
|
+
`,1)[0],x;if(f=T,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),x=f):x=f.replace(this.rules.other.tabCharGlobal," "),m.test(f)||y.test(f)||b.test(f)||w.test(f)||g.test(f)||v.test(f))break;if(x.search(this.rules.other.nonSpaceChar)>=h||!f.trim())c+=`
|
|
49
|
+
`+x.slice(h);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||m.test(d)||y.test(d)||v.test(d))break;c+=`
|
|
50
|
+
`+f}p=!f.trim(),l+=T+`
|
|
51
|
+
`,t=t.substring(T.length+1),d=x.slice(h)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0)),n.items.push({type:"list_item",raw:l,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=l}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let u of n.items){this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]);let l=u.tokens[0];if(u.task&&(l?.type==="text"||l?.type==="paragraph")){u.text=u.text.replace(this.rules.other.listReplaceTask,""),l.raw=l.raw.replace(this.rules.other.listReplaceTask,""),l.text=l.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let c=this.rules.other.listTaskCheckbox.exec(u.raw);if(c){let d={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};u.checked=d.checked,n.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=d.raw+u.tokens[0].raw,u.tokens[0].text=d.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(d)):u.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):u.tokens.unshift(d)}}else u.task&&(u.task=!1);if(!n.loose){let c=u.tokens.filter(f=>f.type==="space"),d=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.raw));n.loose=d}}if(n.loose)for(let u of n.items){u.loose=!0;for(let l of u.tokens)l.type==="text"&&(l.type="paragraph")}return n}}html(t){let e=this.rules.block.html.exec(t);if(e){let r=QC(e[0]);return{type:"html",block:!0,raw:r,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:r}}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:La(e[0],`
|
|
52
|
+
`),href:i,title:n}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=XC(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
53
|
+
`):[],a={type:"table",raw:La(e[0],`
|
|
54
|
+
`),header:[],align:[],rows:[]};if(r.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?a.align.push("right"):this.rules.other.tableAlignCenter.test(o)?a.align.push("center"):this.rules.other.tableAlignLeft.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o<r.length;o++)a.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:a.align[o]});for(let o of n)a.rows.push(XC(o,a.header.length).map((s,u)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[u]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let r=e[1].trim();return{type:"heading",raw:La(e[0],`
|
|
55
|
+
`),depth:e[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
|
|
56
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=La(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=pO(e[2],"()");if(a===-2)return;if(a>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let i=e[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),JC(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[i.toLowerCase()];if(!n){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return JC(r,n,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!r||this.rules.inline.punctuation.exec(r))){let n=[...i[0]].length-1,a,o,s=n,u=0,l=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+n);(i=l.exec(e))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(o=[...a].length,i[3]||i[4]){s+=o;continue}else if((i[5]||i[6])&&n%3&&!((n+o)%3)){u+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+u);let c=[...i[0]][0].length,d=t.slice(0,n+i.index+c+o);if(Math.min(n,o)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!r||this.rules.inline.punctuation.exec(r))){let n=[...i[0]].length-1,a,o,s=n,u=this.rules.inline.delRDelim;for(u.lastIndex=0,e=e.slice(-1*t.length+n);(i=u.exec(e))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a||(o=[...a].length,o!==n))continue;if(i[3]||i[4]){s+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s);let l=[...i[0]][0].length,c=t.slice(0,n+i.index+l+o),d=c.slice(n,-n);return{type:"del",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,i;return e[2]==="@"?(r=e[1],i="mailto:"+r):(r=e[1],i=r),{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,i;if(e[2]==="@")r=e[0],i="mailto:"+r;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);r=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},gn=class $v{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Oo,this.options.tokenizer=this.options.tokenizer||new sf,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 r={other:ri,block:af.normal,inline:vl.normal};this.options.pedantic?(r.block=af.pedantic,r.inline=vl.pedantic):this.options.gfm&&(r.block=af.gfm,this.options.breaks?r.inline=vl.breaks:r.inline=vl.gfm),this.tokenizer.rules=r}static get rules(){return{block:af,inline:vl}}static lex(e,r){return new $v(r).lex(e)}static lexInline(e,r){return new $v(r).inlineTokens(e)}lex(e){e=e.replace(ri.carriageReturn,`
|
|
57
|
+
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],i=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(ri.tabCharGlobal," ").replace(ri.spaceLine,""));let n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let a;if(this.options.extensions?.block?.some(s=>(a=s.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let s=r.at(-1);a.raw.length===1&&s!==void 0?s.raw+=`
|
|
58
|
+
`:r.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
59
|
+
`)?"":`
|
|
60
|
+
`)+a.raw,s.text+=`
|
|
61
|
+
`+a.text,this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
62
|
+
`)?"":`
|
|
63
|
+
`)+a.raw,s.text+=`
|
|
64
|
+
`+a.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},r.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),r.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),r.push(a);continue}let o=e;if(this.options.extensions?.startBlock){let s=1/0,u=e.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},u),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(o=e.substring(0,s+1))}if(this.state.top&&(a=this.tokenizer.paragraph(o))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
65
|
+
`)?"":`
|
|
66
|
+
`)+a.raw,s.text+=`
|
|
67
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a),i=o.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
68
|
+
`)?"":`
|
|
69
|
+
`)+a.raw,s.text+=`
|
|
70
|
+
`+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){this.tokenizer.lexer=this;let i=e;if(this.tokens.links){let s=Object.keys(this.tokens.links);s.length>0&&(i=i.replace(this.tokenizer.rules.inline.reflinkSearch,u=>s.includes(u.slice(u.lastIndexOf("[")+1,-1))?"["+"a".repeat(u.length-2)+"]":u))}i=i.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),i=i.replace(this.tokenizer.rules.inline.blockSkip,(s,u,l)=>{let c=l?l.length:0;return s.slice(0,c)+"["+"a".repeat(s.length-c-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,a="",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}n||(a=""),n=!1;let s;if(this.options.extensions?.inline?.some(l=>(s=l.call({lexer:this},e,r))?(e=e.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);let l=r.at(-1);s.type==="text"&&l?.type==="text"?(l.raw+=s.raw,l.text+=s.text):r.push(s);continue}if(s=this.tokenizer.emStrong(e,i,a)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.del(e,i,a)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),r.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),r.push(s);continue}let u=e;if(this.options.extensions?.startInline){let l=1/0,c=e.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(u=e.substring(0,l+1))}if(s=this.tokenizer.inlineText(u)){e=e.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(a=s.raw.slice(-1)),n=!0;let l=r.at(-1);l?.type==="text"?(l.raw+=s.raw,l.text+=s.text):r.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return r}infiniteLoopError(e){let r="Infinite loop on byte: "+e;if(this.options.silent)console.error(r);else throw new Error(r)}},uf=class{options;parser;constructor(t){this.options=t||Oo}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(ri.notSpaceStart)?.[0],n=t.replace(ri.endingNewline,"")+`
|
|
71
|
+
`;return i?'<pre><code class="language-'+Fn(i)+'">'+(r?n:Fn(n,!0))+`</code></pre>
|
|
72
|
+
`:"<pre><code>"+(r?n:Fn(n,!0))+`</code></pre>
|
|
73
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
74
|
+
${this.parser.parse(t)}</blockquote>
|
|
75
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
76
|
+
`}hr(t){return`<hr>
|
|
77
|
+
`}list(t){let e=t.ordered,r=t.start,i="";for(let o=0;o<t.items.length;o++){let s=t.items[o];i+=this.listitem(s)}let n=e?"ol":"ul",a=e&&r!==1?' start="'+r+'"':"";return"<"+n+a+`>
|
|
78
|
+
`+i+"</"+n+`>
|
|
79
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
80
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
81
|
+
`}table(t){let e="",r="";for(let n=0;n<t.header.length;n++)r+=this.tablecell(t.header[n]);e+=this.tablerow({text:r});let i="";for(let n=0;n<t.rows.length;n++){let a=t.rows[n];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
82
|
+
<thead>
|
|
83
|
+
`+e+`</thead>
|
|
84
|
+
`+i+`</table>
|
|
85
|
+
`}tablerow({text:t}){return`<tr>
|
|
86
|
+
${t}</tr>
|
|
87
|
+
`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
|
|
88
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Fn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),n=ZC(t);if(n===null)return i;t=n;let a='<a href="'+t+'"';return e&&(a+=' title="'+Fn(e)+'"'),a+=">"+i+"</a>",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=ZC(t);if(n===null)return Fn(r);t=n;let a=`<img src="${t}" alt="${Fn(r)}"`;return e&&(a+=` title="${Fn(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Fn(t.text)}},rm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},yn=class Gv{options;renderer;textRenderer;constructor(e){this.options=e||Oo,this.options.renderer=this.options.renderer||new uf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new rm}static parse(e,r){return new Gv(r).parse(e)}static parseInline(e,r){return new Gv(r).parseInline(e)}parse(e){this.renderer.parser=this;let r="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let o=n,s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){r+=s||"";continue}}let a=n;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(e,r=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<e.length;n++){let a=e[n];if(this.options.extensions?.renderers?.[a.type]){let s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=s||"";continue}}let o=a;switch(o.type){case"escape":{i+=r.text(o);break}case"html":{i+=r.html(o);break}case"link":{i+=r.link(o);break}case"image":{i+=r.image(o);break}case"checkbox":{i+=r.checkbox(o);break}case"strong":{i+=r.strong(o);break}case"em":{i+=r.em(o);break}case"codespan":{i+=r.codespan(o);break}case"br":{i+=r.br(o);break}case"del":{i+=r.del(o);break}case"text":{i+=r.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},ml=class{options;block;constructor(t){this.options=t||Oo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?gn.lex:gn.lexInline}provideParser(t=this.block){return t?yn.parse:yn.parseInline}},gO=class{defaults=Yv();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=yn;Renderer=uf;TextRenderer=rm;Lexer=gn;Tokenizer=sf;Hooks=ml;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let n=i;for(let a of n.header)r=r.concat(this.walkTokens(a.tokens,e));for(let a of n.rows)for(let o of a)r=r.concat(this.walkTokens(o.tokens,e));break}case"list":{let n=i;r=r.concat(this.walkTokens(n.items,e));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let o=n[a].flat(1/0);r=r.concat(this.walkTokens(o,e))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i=ae({},r);if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=e.renderers[n.name];a?e.renderers[n.name]=function(...o){let s=n.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[n.level];a?a.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),i.extensions=e),r.renderer){let n=this.defaults.renderer||new uf(this.defaults);for(let a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,s=r.renderer[o],u=n[o];n[o]=(...l)=>{let c=s.apply(n,l);return c===!1&&(c=u.apply(n,l)),c||""}}i.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new sf(this.defaults);for(let a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,s=r.tokenizer[o],u=n[o];n[o]=(...l)=>{let c=s.apply(n,l);return c===!1&&(c=u.apply(n,l)),c}}i.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new ml;for(let a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,s=r.hooks[o],u=n[o];ml.passThroughHooks.has(a)?n[o]=l=>{if(this.defaults.async&&ml.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await s.call(n,l);return u.call(n,d)})();let c=s.call(n,l);return u.call(n,c)}:n[o]=(...l)=>{if(this.defaults.async)return(async()=>{let d=await s.apply(n,l);return d===!1&&(d=await u.apply(n,l)),d})();let c=s.apply(n,l);return c===!1&&(c=u.apply(n,l)),c}}i.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),n&&(s=s.concat(n.call(this,o))),s}}this.defaults=ae(ae({},this.defaults),i)}),this}setOptions(t){return this.defaults=ae(ae({},this.defaults),t),this}lexer(t,e){return gn.lex(t,e??this.defaults)}parser(t,e){return yn.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i=ae({},r),n=ae(ae({},this.defaults),i),a=this.onError(!!n.silent,!!n.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 e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let o=n.hooks?await n.hooks.preprocess(e):e,s=await(n.hooks?await n.hooks.provideLexer(t):t?gn.lex:gn.lexInline)(o,n),u=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(u,n.walkTokens));let l=await(n.hooks?await n.hooks.provideParser(t):t?yn.parse:yn.parseInline)(u,n);return n.hooks?await n.hooks.postprocess(l):l})().catch(a);try{n.hooks&&(e=n.hooks.preprocess(e));let o=(n.hooks?n.hooks.provideLexer(t):t?gn.lex:gn.lexInline)(e,n);n.hooks&&(o=n.hooks.processAllTokens(o)),n.walkTokens&&this.walkTokens(o,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(t):t?yn.parse:yn.parseInline)(o,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(o){return a(o)}}}onError(t,e){return r=>{if(r.message+=`
|
|
89
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Fn(r.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(r);throw r}}},Ao=new gO;function Rt(t,e){return Ao.parse(t,e)}Rt.options=Rt.setOptions=function(t){return Ao.setOptions(t),Rt.defaults=Ao.defaults,ew(Rt.defaults),Rt};Rt.getDefaults=Yv;Rt.defaults=Oo;Rt.use=function(...t){return Ao.use(...t),Rt.defaults=Ao.defaults,ew(Rt.defaults),Rt};Rt.walkTokens=function(t,e){return Ao.walkTokens(t,e)};Rt.parseInline=Ao.parseInline;Rt.Parser=yn;Rt.parser=yn.parse;Rt.Renderer=uf;Rt.TextRenderer=rm;Rt.Lexer=gn;Rt.lexer=gn.lex;Rt.Tokenizer=sf;Rt.Hooks=ml;Rt.parse=Rt;var JK=Rt.options,eZ=Rt.setOptions,tZ=Rt.use,rZ=Rt.walkTokens,iZ=Rt.parseInline;var nZ=yn.parse,aZ=gn.lex;var cw={name:"internalLink",level:"inline",start(t){return t.match(/\$/)?.index},tokenizer(t){let e=/^(\$[A-Za-z][A-Za-z0-9-_]*)/g.exec(t);if(e)return{type:"internalLink",raw:e[0],identifier:e[1]}}};var Ws=class t{constructor(){Rt.use({extensions:[cw]})}parse(e){return Rt.lexer(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Xe({token:t,factory:t.\u0275fac})};var Lt=class t{token=U.required();static \u0275fac=function(r){return new(r||t)};static \u0275dir=te({type:t,inputs:{token:[1,"token"]}})};var df=class t extends Lt{sanitizer=C(my);get htmlContent(){return this.sanitizer.bypassSecurityTrustHtml(this.token().raw)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["md-generic-renderer"]],hostVars:1,hostBindings:function(r,i){r&2&&Wr("innerHTML",i.htmlContent,Jo)},features:[Ae],decls:0,vars:0,template:function(r,i){},styles:["[_nghost-%COMP%]{color:red}[_nghost-%COMP%] ul{list-style-type:disc;padding-left:1.5rem}[_nghost-%COMP%] ul ul{list-style-type:circle}[_nghost-%COMP%] ul ul ul{list-style-type:square}[_nghost-%COMP%] ul ul ul ul{list-style-type:disc}[_nghost-%COMP%] ul ul ul ul ul{list-style-type:circle}[_nghost-%COMP%] ul ul ul ul ul ul{list-style-type:square}[_nghost-%COMP%] ul ul ul ul ul ul ul{list-style-type:disc}[_nghost-%COMP%] ol{list-style-type:decimal;padding-left:1.5rem}"]})};var im=new ee("TOKEN_RENDERERS"),Qt=class t{constructor(e){this.viewContainerRef=e}viewContainerRef;injector=C(si);renderers=C(im);tokens;ngOnChanges(){this.viewContainerRef.clear(),this.tokens&&this.render(this.tokens)}render(e){if(this.viewContainerRef.clear(),e)for(let r of e)this.renderToken(r)}renderToken(e){let r=this.renderers[e.type]??df;if(this.isInlineText(e))this.viewContainerRef.element.nativeElement.before(e.raw);else{let i=this.viewContainerRef.createComponent(r,{injector:this.injector});i.setInput("token",e),i.changeDetectorRef.markForCheck()}}isInlineText(e){return e.type==="text"&&(!("tokens"in e)||e.tokens===void 0||e.tokens.length===0)}static \u0275fac=function(r){return new(r||t)(qt(qr))};static \u0275dir=te({type:t,selectors:[["","forToken",""]],inputs:{tokens:[0,"forToken","tokens"]},features:[jr]})};function yO(t,e){t&1&&rt(0)}var ff=class t extends Lt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["blockquote","mdBlockquote",""]],features:[Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,yO,1,0,"ng-container",0),r&2&&Z("forToken",i.token().tokens)},dependencies:[Qt],styles:["[_nghost-%COMP%]{border-left:.2rem solid var(--tui-text-action);padding-left:.5rem;margin-left:.8rem}"]})};var $s=class t{isLoaded=!1;mermaidLoader;loadMermaid(){return this.isLoaded?Promise.resolve():(this.mermaidLoader||(this.mermaidLoader=new Promise((e,r)=>{let i=document.createElement("script");i.src="/assets/mermaid/mermaid.min.js",i.async=!0,i.onload=()=>{this.isLoaded=!0,e()},i.onerror=n=>r(n),document.body.appendChild(i)})),this.mermaidLoader)}mermaid$=Jr(this.loadMermaid()).pipe(Ie(()=>(mermaid.initialize({startOnLoad:!1,theme:"neutral"}),mermaid)),Zo(1));runMermaid(e){this.mermaid$.subscribe(r=>{r.run({nodes:e})})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})};var hf=class t{constructor(e){this.elementRef=e}elementRef;mermaidService=C($s);code=U.required();ngAfterViewInit(){this.elementRef.nativeElement.querySelectorAll("code")&&this.mermaidService.runMermaid([this.elementRef.nativeElement])}static \u0275fac=function(r){return new(r||t)(qt(At))};static \u0275cmp=K({type:t,selectors:[["md-mermaid"]],inputs:{code:[1,"code"]},decls:1,vars:1,template:function(r,i){r&1&&j(0),r&2&&xe("",i.code(),`
|
|
90
|
+
`)},styles:['svg[_ngcontent-%COMP%] rect.note[_ngcontent-%COMP%]{fill:"red"}']})};function bO(t,e){if(t&1&&ye(0,"md-mermaid",0),t&2){let r=Q();Z("code",r.token().text)}}function CO(t,e){if(t&1&&(L(0,"pre"),j(1," "),L(2,"code",1),j(3,`
|
|
91
|
+
`),B(),j(4,`
|
|
92
|
+
`),L(5,"button",2),j(6,`
|
|
93
|
+
\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C
|
|
94
|
+
`),B(),j(7,`
|
|
95
|
+
`),B()),t&2){let r=Q();R(2),Z("highlight",r.token().text)("language",r.token().lang??"text"),R(3),Z("tuiButtonCopy",r.token().text)}}var pf=class t extends Lt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["md-code"]],features:[Ae],decls:2,vars:1,consts:[[3,"code"],["lineNumbers","",3,"highlight","language"],["appearance","secondary","iconStart","@tui.clipboard","size","s","type","button",1,"copy",3,"tuiButtonCopy"]],template:function(r,i){r&1&&de(0,bO,1,1,"md-mermaid",0)(1,CO,8,3,"pre"),r&2&&fe(i.token().lang==="mermaid"?0:1)},dependencies:[yy,hf,by,qC],styles:["[_nghost-%COMP%]{position:relative;margin:.6em 0}.copy[_ngcontent-%COMP%]{position:absolute;top:.4em;right:.4em}"]})};function wO(t,e){t&1&&rt(0)}function _O(t,e){if(t&1&&(L(0,"h1"),Me(1,wO,1,0,"ng-container",0),B()),t&2){let r=Q();R(),Z("forToken",r.token().tokens)}}function xO(t,e){t&1&&rt(0)}function TO(t,e){if(t&1&&(L(0,"h2"),Me(1,xO,1,0,"ng-container",0),B()),t&2){let r=Q();R(),Z("forToken",r.token().tokens)}}function SO(t,e){t&1&&rt(0)}function DO(t,e){if(t&1&&(L(0,"h3"),Me(1,SO,1,0,"ng-container",0),B()),t&2){let r=Q();R(),Z("forToken",r.token().tokens)}}function EO(t,e){t&1&&rt(0)}function kO(t,e){if(t&1&&(L(0,"h4"),Me(1,EO,1,0,"ng-container",0),B()),t&2){let r=Q();R(),Z("forToken",r.token().tokens)}}function MO(t,e){t&1&&rt(0)}function IO(t,e){if(t&1&&(L(0,"h5"),Me(1,MO,1,0,"ng-container",0),B()),t&2){let r=Q();R(),Z("forToken",r.token().tokens)}}function AO(t,e){t&1&&rt(0)}function OO(t,e){if(t&1&&(L(0,"h6"),Me(1,AO,1,0,"ng-container",0),B()),t&2){let r=Q();R(),Z("forToken",r.token().tokens)}}var vf=class t extends Lt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["md-heading"]],features:[Ae],decls:6,vars:1,consts:[[4,"forToken"]],template:function(r,i){if(r&1&&de(0,_O,2,1,"h1")(1,TO,2,1,"h2")(2,DO,2,1,"h3")(3,kO,2,1,"h4")(4,IO,2,1,"h5")(5,OO,2,1,"h6"),r&2){let n;fe((n=i.token().depth)===1?0:n===2?1:n===3?2:n===4?3:n===5?4:n===6?5:-1)}},dependencies:[Qt],encapsulation:2})};var mf=class t extends Lt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["hr","mdHr",""]],features:[Ae],decls:0,vars:0,template:function(r,i){},encapsulation:2})};var gf=class t extends Lt{get src(){return this.token().href}get text(){return this.token().text}get title(){return this.token().title??""}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["img","mdImage",""]],hostVars:3,hostBindings:function(r,i){r&2&&Wr("src",i.src,vc)("title",i.title)("alt",i.text)},features:[Ae],decls:0,vars:0,template:function(r,i){},styles:["[_nghost-%COMP%]{max-width:100%}"]})};var yf=class t extends Lt{clipboard=C(pl);text=re(()=>this.token().raw.slice(1,-1));copyToClipboard(){console.log("info","\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430"),this.clipboard.copy(this.text())}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["span","mdInlineCode",""]],hostBindings:function(r,i){r&1&&Ce("click",function(){return i.copyToClipboard()})},features:[Ae],decls:2,vars:1,template:function(r,i){r&1&&(L(0,"tui-copy"),j(1),B()),r&2&&(R(),Fr(i.text()))},dependencies:[rf],styles:["[_nghost-%COMP%]{background-color:var(--tui-background-neutral-2);padding:.1rem .2rem;border-radius:.4rem;font-family:Menlo,Monaco,Courier New,monospace;color:var(--tui-text-secondary);cursor:pointer;text-wrap:nowrap}"]})};var RO=()=>[],PO=t=>({feature:t}),Cf=class t extends Lt{featureCode=re(()=>this.token().identifier.slice(1));static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["md-internal-link"]],features:[Ae],decls:2,vars:6,consts:[["queryParamsHandling","merge","tuiLink","",3,"routerLink","queryParams"]],template:function(r,i){r&1&&(L(0,"a",0),j(1),B()),r&2&&(Z("routerLink",Ii(3,RO))("queryParams",Ai(4,PO,i.featureCode())),R(),xe(" ",i.token().identifier,`
|
|
96
|
+
`))},dependencies:[zs,cd],encapsulation:2})};function NO(t,e){t&1&&rt(0)}var wf=class t extends Lt{get href(){return this.token().href}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["a","mdLink",""]],hostVars:1,hostBindings:function(r,i){r&2&&Wr("href",i.href,vc)},features:[Le([cd]),Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,NO,1,0,"ng-container",0),r&2&&Z("forToken",i.token().tokens)},dependencies:[Qt],encapsulation:2})};function FO(t,e){t&1&&rt(0)}var xf=class t extends Lt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["li","mdListItem",""]],features:[Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,FO,1,0,"ng-container",0),r&2&&Z("forToken",i.token().tokens)},dependencies:[Qt],styles:["[_nghost-%COMP%]{margin:.4rem 0rem}"]})};function BO(t,e){t&1&&rt(0)}var Tf=class t extends Lt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["p","mdParagraph",""]],features:[Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,BO,1,0,"ng-container",0),r&2&&Z("forToken",i.token().tokens)},dependencies:[Qt],encapsulation:2})};var bl=["*"];function LO(t,e){if(t&1){let r=Kt();L(0,"button",4),Ce("click",function(){Nt(r);let n=Q();return Ft(n.updateSorterAndDirection())}),rt(1,2),ye(2,"tui-icon",5),B()}if(t&2){let r=Q(),i=pr(3);Ze("t-sort_sorted",r.isCurrent),R(),Z("ngTemplateOutlet",i),R(),Z("icon",r.icon)}}function zO(t,e){if(t&1&&rt(0,2),t&2){Q();let r=pr(3);Z("ngTemplateOutlet",r)}}function VO(t,e){t&1&&Qe(0)}function HO(t,e){if(t&1){let r=Kt();L(0,"div",6),Ce("tuiResized",function(n){Nt(r);let a=Q();return Ft(a.onResized(n))}),B()}}function UO(t,e){if(t&1&&(L(0,"td",2),j(1),B()),t&2){let r=Q().$implicit,i=Q(2);R(),xe(" ",i.item()[r]," ")}}function jO(t,e){if(t&1&&(rt(0,1),Me(1,UO,2,1,"ng-template",null,0,Oi)),t&2){let r=e.$implicit,i=pr(2),n=Q();Z("ngTemplateOutlet",n[r]&&n[r].template||i)}}function qO(t,e){if(t&1&&dt(0,jO,3,1,null,null,gi),t&2){let r=Q();ft(r.table.columns())}}function WO(t,e){t&1&&ye(0,"td")}function $O(t,e){if(t&1&&(yi(0),j(1),bi()),t&2){let r=e.polymorpheusOutlet;R(),xe(" ",r," ")}}function GO(t,e){if(t&1){let r=Kt();L(0,"tr")(1,"th",0)(2,"button",1),Ce("click",function(){Nt(r);let n=Q();return Ft(n.onClick())}),L(3,"span",2),Me(4,$O,2,1,"ng-container",3),B(),ye(5,"tui-icon",4),B()()()}if(t&2){let r=Q();R(),Z("colSpan",r.table.columns().length),R(3),Z("polymorpheusOutlet",r.heading()),R(),Z("tuiChevron",r.open())}}function YO(t,e){t&1&&Qe(0)}var KO=t=>({$implicit:t});function ZO(t,e){if(t&1&&rt(0,1),t&2){let r=e.$implicit,i=Q(),n=pr(3);Z("ngTemplateOutlet",(i==null||i[r]==null?null:i[r].template)||n)("ngTemplateOutletContext",Ai(2,KO,r))}}function XO(t,e){if(t&1&&(L(0,"th",2),j(1),B()),t&2){let r=Q().$implicit;R(),xe(" ",r.toString()," ")}}function QO(t,e){if(t&1&&de(0,XO,2,1,"th",2),t&2){let r=Q(2);fe(!r.th()&&!r.heads().length?0:-1)}}function JO(t,e){if(t&1&&(dt(0,ZO,1,4,"ng-container",1,gi),Me(2,QO,1,1,"ng-template",null,0,Oi)),t&2){let r=Q();ft(r.table.columns())}}var Sf=(()=>{class t{constructor(){this.tuiCell=U(""),this.template=C(yr)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["ng-template","tuiCell",""]],inputs:{tuiCell:[1,"tuiCell"]}})}}return t})(),nm=(()=>{class t{constructor(){this.tuiHead=U.required(),this.template=C(yr)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiHead",""]],inputs:{tuiHead:[1,"tuiHead"]}})}}return t})(),eR=(()=>{class t{constructor(){this.doc=C(Tt),this.el=Be(),this.tuiResized$=Gt(this.el,"mousedown").pipe(cb(),mt(()=>{let{width:r,right:i}=this.el.closest("th")?.getBoundingClientRect()||ea;return Gt(this.doc,"mousemove").pipe(rr(),Ie(({clientX:n})=>r+n-i),lr(Gt(this.doc,"mouseup")))})),this.tuiResized=En(this.tuiResized$)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["","tuiResized",""]],outputs:{tuiResized:"tuiResized"}})}}return t})(),Ro={Asc:1,Desc:-1},tR={sticky:!1,resizable:!1,open:!0,size:"m",direction:Ro.Asc,requiredSort:!1,sortIcons:{asc:"@tui.chevron-up",desc:"@tui.chevron-down",off:"@tui.chevrons-up-down"}},[om,aQ]=ut(tR),fw=(()=>{class t{constructor(){this.stuck=$i(C(zp).pipe(Ie(r=>(r[r.length-1]?.intersectionRatio??0)<1),rr(),Op(),uo(()=>sr)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,hostVars:2,hostBindings:function(i,n){i&2&&Ze("_stuck",n.stuck())},features:[_e([zp,{provide:Lp,useValue:[0,1]}])]})}}return t})(),dw=()=>0,rR=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],exportAs:["tui-table-5.16.0"],decls:0,vars:0,template:function(i,n){},styles:[`table[tuiTable]:where(*[data-tui-version="5.16.0"]){border-collapse:separate;border-spacing:0;isolation:isolate}table[tuiTable]:where(*[data-tui-version="5.16.0"]) [tuiCell]{padding:0}table[tuiTable]:where(*[data-tui-version="5.16.0"]) [tuiTitle]{white-space:nowrap}table[tuiTable]:where(*[data-tui-version="5.16.0"]) [tuiTitle] tui-icon{font-size:1rem}table[tuiTable]:where(*[data-tui-version="5.16.0"]) [tuiSubtitle]{color:var(--tui-text-secondary)}table[tuiTable]:where(*[data-tui-version="5.16.0"]) [tuiTh] [tuiCell],table[tuiTable]:where(*[data-tui-version="5.16.0"]) [tuiTh] [tuiTitle]{font:inherit;color:inherit}
|
|
97
|
+
`],encapsulation:2})}}return t})(),Gs=(()=>{class t{constructor(){this.options=C(om),this.nothing=$t(rR),this.computedSortChange=re(()=>({sortComparator:this.sorter(),sortDirection:this.direction()})),this.sortChangeOutput=ot(()=>this.sortChange.emit(this.computedSortChange())),this.columns=U([]),this.size=U(this.options.size),this.direction=Wi(this.options.direction),this.sorter=Wi(dw),this.sortChange=qi(),this.appearance=ge("table"),this.cleaner=ge(!1)}updateSorterAndDirection(r){this.sorter()===r?this.updateSorter(this.sorter(),this.direction()===Ro.Asc?Ro.Desc:Ro.Asc):this.updateSorter(r)}updateSorter(r,i=Ro.Asc){this.sorter.set(r||dw.bind({})),this.direction.set(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["table","tuiTable",""]],hostAttrs:["data-tui-version","5.16.0","tuiTable",""],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-size",n.size())},inputs:{columns:[1,"columns"],size:[1,"size"],direction:[1,"direction"],sorter:[1,"sorter"]},outputs:{direction:"directionChange",sorter:"sorterChange",sortChange:"sortChange"},features:[_e([{provide:dd,useValue:"10000px 10000px 10000px 0px"},Ct(Pa,t),Gr({size:"s"}),PC({size:"m",appearance:"neutral"}),LC({size:"xxs",appearance:"neutral"}),WC({size:"s",color:"var(--tui-text-action)"})]),Le([fw])]})}}return t})(),yl=(()=>{class t{constructor(){this.options=C(om),this.head=C(nm,{optional:!0}),this.width=ge(null),this.table=C(Ut(()=>Gs),{optional:!0}),this.minWidth=U(-1/0),this.maxWidth=U(1/0),this.sorter=Wi(this.head?(r,i)=>jy(r[this.key],i[this.key]):null),this.resizable=U(this.options.resizable),this.sticky=U(this.options.sticky),this.requiredSort=U(this.options.requiredSort)}get key(){if(!this.head)throw new am;return this.head.tuiHead()}get isCurrent(){return!!this.sorter()&&!!this.table&&this.sorter()===this.table.sorter()}get icon(){return this.isCurrent?this.table?.direction()===Ro.Asc?this.options.sortIcons.asc:this.options.sortIcons.desc:this.options.sortIcons.off}updateSorterAndDirection(){let r=this.requiredSort()?this.sorter():null;this.table?.updateSorterAndDirection(this.isCurrentAndDescDirection?r:this.sorter())}onResized(r){this.width.set(Math.min(Math.max(r,this.minWidth()),this.maxWidth()))}get isCurrentAndDescDirection(){return this.sorter()===this.table?.sorter()&&this.table?.direction()===Ro.Desc}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["th","tuiTh",""]],hostVars:8,hostBindings:function(i,n){i&2&&(st("max-width",n.width()||n.maxWidth(),"px")("min-width",n.width()||n.minWidth(),"px")("width",n.width()||n.minWidth(),"px"),Ze("_sticky",n.sticky()))},inputs:{minWidth:[1,"minWidth"],maxWidth:[1,"maxWidth"],sorter:[1,"sorter"],resizable:[1,"resizable"],sticky:[1,"sticky"],requiredSort:[1,"requiredSort"]},outputs:{sorter:"sorterChange"},ngContentSelectors:bl,decls:5,vars:2,consts:[["content",""],["type","button",1,"t-sort",3,"t-sort_sorted"],[3,"ngTemplateOutlet"],[1,"t-bar"],["type","button",1,"t-sort",3,"click"],[1,"t-icon",3,"icon"],[1,"t-bar",3,"tuiResized"]],template:function(i,n){i&1&&(kt(),de(0,LO,3,4,"button",1)(1,zO,1,1,"ng-container",2),Me(2,VO,1,0,"ng-template",null,0,Oi),de(4,HO,1,0,"div",3)),i&2&&(fe(n.sorter()&&n.table?0:1),R(4),fe(n.resizable()?4:-1))},dependencies:[is,Ni,eR],styles:['[_nghost-%COMP%]{transition-property:box-shadow;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);position:relative;inset-block-start:0;block-size:var(--tui-height-m);font:var(--tui-typography-body-s);text-align:start;font-weight:700;color:var(--tui-text-secondary);background:var(--tui-background-base);cursor:default;padding:0 .75rem;box-sizing:border-box;box-shadow:0 .3125rem #ededed00;border:1px solid var(--tui-border-normal)}[_nghost-%COMP%]:not(:first-child){border-inline-start:none}._sticky[_nghost-%COMP%], ._stuck ._sticky[_nghost-%COMP%]{position:sticky;z-index:3000}._sticky[_nghost-%COMP%]:first-child, ._stuck ._sticky[_nghost-%COMP%]:first-child{inset-inline-start:0}._sticky[_nghost-%COMP%]:after, ._stuck ._sticky[_nghost-%COMP%]:after{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);content:"";position:absolute;inset-block-start:0;inset-inline-start:100%;inset-block-end:0;inline-size:.3125rem;pointer-events:none;background:#edededb3;opacity:0}._stuck [_nghost-%COMP%]{z-index:2000}tr:not(:first-child)[_nghost-%COMP%], tr:not(:first-child) [_nghost-%COMP%]{border-block-start:none}table[data-size="l"][_nghost-%COMP%], table[data-size="l"] [_nghost-%COMP%]{block-size:var(--tui-height-l);font:var(--tui-typography-body-m);font-weight:700;padding:0 1rem}table[data-size="s"][_nghost-%COMP%], table[data-size="s"] [_nghost-%COMP%]{block-size:var(--tui-height-s);font:var(--tui-typography-body-s);font-weight:700;padding:0 .5rem}thead[tuiThead][_nghost-%COMP%], thead[tuiThead] [_nghost-%COMP%]{position:sticky}table._stuck._sticky[_nghost-%COMP%]:after, table._stuck ._sticky[_nghost-%COMP%]:after{opacity:1}thead[tuiThead]._stuck[_nghost-%COMP%], thead[tuiThead]._stuck [_nghost-%COMP%]{box-shadow:0 .3125rem #edededb3}[tuiTheme="dark"]._sticky[_nghost-%COMP%]:after, [tuiTheme="dark"] ._sticky[_nghost-%COMP%]:after{background:#3c3c3ce6}[tuiTheme="dark"] thead[tuiThead]._stuck[_nghost-%COMP%], [tuiTheme="dark"] thead[tuiThead]._stuck [_nghost-%COMP%]{box-shadow:0 .3125rem #3c3c3ce6}[tuiTheme="dark"] thead[tuiThead]._stuck[_nghost-%COMP%]:first-child, [tuiTheme="dark"] thead[tuiThead]._stuck [_nghost-%COMP%]:first-child{box-shadow:.0625rem .3125rem #3c3c3ce6}table[data-size="l"] thead[tuiThead] tr:nth-child(2)[_nghost-%COMP%], table[data-size="l"] thead[tuiThead] tr:nth-child(2) [_nghost-%COMP%]{inset-block-start:var(--tui-height-l)}table[data-size="m"] thead[tuiThead] tr:nth-child(2)[_nghost-%COMP%], table[data-size="m"] thead[tuiThead] tr:nth-child(2) [_nghost-%COMP%]{inset-block-start:var(--tui-height-m)}table[data-size="s"] thead[tuiThead] tr:nth-child(2)[_nghost-%COMP%], table[data-size="s"] thead[tuiThead] tr:nth-child(2) [_nghost-%COMP%]{inset-block-start:var(--tui-height-s)}.t-sort[_ngcontent-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;display:inline-flex;vertical-align:top;flex-direction:inherit;align-items:center;outline:none;font:inherit;text-transform:inherit;color:inherit;cursor:pointer}.t-sort_sorted[_ngcontent-%COMP%]{color:var(--tui-text-primary)}.t-sort[_ngcontent-%COMP%]:focus-visible{background:var(--tui-service-selection-background)}.t-sort[_ngcontent-%COMP%]:hover{color:var(--tui-text-primary)}.t-bar[_ngcontent-%COMP%]{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-end:-1px;inline-size:.1875rem;justify-self:flex-end;border-inline-start:2px solid transparent;background:var(--tui-status-warning);background-clip:content-box;cursor:ew-resize;opacity:0}.t-bar[_ngcontent-%COMP%]:hover, .t-bar[_ngcontent-%COMP%]:active{opacity:1}.t-icon[_ngcontent-%COMP%]:before{font-size:1rem}']})}}return t})(),am=class extends Error{constructor(){super("")}};var hw=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,selectors:[["thead","tuiThead",""]],features:[_e([{provide:dd,useValue:"0px 10000px 10000px 10000px"}]),Le([fw])]})}}return t})();var sm=(()=>{class t{constructor(){this.control=Br(vn),this.textfield=Br(li)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["th","tuiTd",""],["td","tuiTd",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.control,vn,5)(a,n.textfield,li,5),i&2&&Wt(2)},hostVars:2,hostBindings:function(i,n){i&2&&Ze("_editable",n.control()||n.textfield())},ngContentSelectors:bl,decls:1,vars:0,template:function(i,n){i&1&&(kt(),Qe(0))},styles:['[_nghost-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);position:relative;text-align:start;background:var(--tui-background-base);border:1px solid var(--tui-border-normal);border-block-start:none;box-sizing:border-box}[_nghost-%COMP%]:first-child{inset-inline-start:0}[_nghost-%COMP%]:not(:first-child){border-inline-start:none}._editable[_nghost-%COMP%]{padding:0!important;vertical-align:top}th[_nghost-%COMP%]{position:sticky;z-index:100}th[_nghost-%COMP%]:after{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);content:"";position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:100%;inline-size:.3125rem;pointer-events:none;background:#edededb3;opacity:0}th[_nghost-%COMP%]:focus-within:not(:disabled){z-index:1100}[tuiTheme="dark"][_nghost-%COMP%]:after, [tuiTheme="dark"] [_nghost-%COMP%]:after{background:#3c3c3ce6}table._stuck[_nghost-%COMP%], table._stuck [_nghost-%COMP%]{z-index:1000}table._stuck[_nghost-%COMP%]:last-of-type:after, table._stuck [_nghost-%COMP%]:last-of-type:after{opacity:1}table[data-size="l"][_nghost-%COMP%], table[data-size="l"] [_nghost-%COMP%]{block-size:var(--tui-height-l);font:var(--tui-typography-body-m);padding:calc(1rem - 1px) 1rem 1rem}table[data-size="m"][_nghost-%COMP%], table[data-size="m"] [_nghost-%COMP%]{block-size:var(--tui-height-m);font:var(--tui-typography-body-s);padding:calc(.625rem - 1px) .75rem .625rem}table[data-size="s"][_nghost-%COMP%], table[data-size="s"] [_nghost-%COMP%]{block-size:var(--tui-height-s);font:var(--tui-typography-body-s);padding:calc(.25rem - 1px) .5rem .25rem}td[_nghost-%COMP%]:focus-within{z-index:100!important}td[_nghost-%COMP%]:not(:focus-within){z-index:0}']})}}return t})(),Df=(()=>{class t{constructor(){this.cells=Sa(Ut(()=>Sf)),this.body=C(Ut(()=>pw)),this.table=C(Ut(()=>Gs)),this.items=re(()=>this.cells().reduce((r,i)=>Ke(ae({},r),{[i.tuiCell()]:i}),{})),this.item=re(()=>this.body.data()[this.body.rows().findIndex(r=>r===this)])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tr","tuiTr",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.cells,Sf,4),i&2&&Wt()},ngContentSelectors:bl,decls:3,vars:1,consts:[["plain",""],[3,"ngTemplateOutlet"],["tuiTd",""]],template:function(i,n){if(i&1&&(kt(),de(0,qO,2,0)(1,WO,1,0,"td"),Qe(2)),i&2){let a;fe((a=n.items())?0:1,a)}},dependencies:[is,sm],encapsulation:2})}}return t})(),pw=(()=>{class t{constructor(){this.rows=Sa(Ut(()=>Df)),this.data=U([])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=te({type:t,contentQueries:function(i,n,a){i&1&&ei(a,n.rows,Df,4),i&2&&Wt()},inputs:{data:[1,"data"]}})}}return t})(),vw=(()=>{class t{constructor(){this.options=C(om),this.table=C(Ut(()=>Gs)),this.heading=U(),this.open=Wi(this.options.open),this.onClick=()=>{this.open.set(!this.open())}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tbody","tuiTbody",""]],inputs:{heading:[1,"heading"],open:[1,"open"]},outputs:{open:"openChange"},features:[Le([{directive:pw,inputs:["data","data"]}])],ngContentSelectors:bl,decls:2,vars:2,consts:[[1,"t-heading",3,"colSpan"],["type","button",1,"t-expand",3,"click"],[1,"t-name"],[4,"polymorpheusOutlet"],[1,"t-chevron",3,"tuiChevron"]],template:function(i,n){i&1&&(kt(),de(0,GO,6,3,"tr"),de(1,YO,1,0)),i&2&&(fe(n.heading()?0:-1),R(),fe(n.open()?1:-1))},dependencies:[Er,Hs,Ni],styles:['[_nghost-%COMP%]{border-color:var(--tui-border-normal)}[_nghost-%COMP%] tr[_ngcontent-%COMP%]{border-color:inherit}.t-expand[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;font:inherit;line-height:inherit;text-decoration:none;display:flex;inline-size:100%;block-size:100%;align-items:center;box-sizing:border-box;outline:none;font-weight:700;cursor:pointer;border-color:inherit}.t-expand[_ngcontent-%COMP%]:focus-visible .t-name[_ngcontent-%COMP%]{background:var(--tui-service-selection-background)}.t-expand[_ngcontent-%COMP%]:before, .t-expand[_ngcontent-%COMP%]:after{content:"";position:sticky;block-size:100%;border-inline-start:1px solid;border-color:inherit}.t-expand[_ngcontent-%COMP%]:before{inset-inline-start:0}.t-expand[_ngcontent-%COMP%]:after{inset-inline-end:0}.t-heading[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:var(--tui-curve-productive-standard);block-size:var(--tui-height-m);font:var(--tui-typography-body-s);padding:0;background:var(--tui-background-neutral-1);border-block-end:1px solid var(--tui-border-normal);border-color:inherit}.t-heading[_ngcontent-%COMP%]:hover{background:var(--tui-background-neutral-1-hover)}table[data-size="l"][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%], table[data-size="l"] [_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{font:var(--tui-typography-body-m);block-size:var(--tui-height-l)}.t-name[_ngcontent-%COMP%]{position:sticky;display:inline-block;inset-inline-start:.75rem}table[data-size="l"][_nghost-%COMP%] .t-name[_ngcontent-%COMP%], table[data-size="l"] [_nghost-%COMP%] .t-name[_ngcontent-%COMP%]{inset-inline-start:1rem}.t-chevron[_ngcontent-%COMP%]{position:sticky;inset-inline-end:.75rem;margin:0 .6875rem 0 auto}']})}}return t})();var mw=(()=>{class t{constructor(){this.th=Br(Ut(()=>yl)),this.heads=Sa(Ut(()=>nm)),this.computedHeads=re(()=>this.heads().reduce((r,i)=>Ke(ae({},r),{[i.tuiHead()]:i}),{})),this.table=C(Ut(()=>Gs))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["tr","tuiThGroup",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.th,yl,5)(a,n.heads,nm,4),i&2&&Wt(2)},ngContentSelectors:bl,decls:2,vars:1,consts:[["plain",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["tuiTh",""]],template:function(i,n){if(i&1&&(kt(),Qe(0),de(1,JO,4,0)),i&2){let a;R(),fe((a=n.computedHeads())?1:-1,a)}},dependencies:[is,yl],encapsulation:2})}}return t})();function iR(t,e){t&1&&rt(0)}function nR(t,e){if(t&1&&(L(0,"th",3)(1,"span"),Me(2,iR,1,0,"ng-container",6),B()()),t&2){let r=e.$implicit;Z("resizable",!0)("sticky",!0),R(2),Z("forToken",r.tokens)}}function aR(t,e){t&1&&rt(0)}function oR(t,e){if(t&1&&(L(0,"td",7),Me(1,aR,1,0,"ng-container",6),B()),t&2){let r=Q().$implicit;R(),Z("forToken",r.tokens)}}function sR(t,e){if(t&1&&Me(0,oR,2,1,"td",8),t&2){let r=e.$index,i=Q(2);Z("tuiCell",i.columns()[r])}}function uR(t,e){if(t&1&&(L(0,"tr",5),dt(1,sR,1,1,"td",7,on),B()),t&2){let r=e.$implicit;R(),ft(r)}}var Ef=class t extends Lt{columns=re(()=>this.token().header.map(r=>r.text));columnTokens=re(()=>this.token().header);rows=re(()=>this.token().rows);static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["md-table"]],features:[Ae],decls:8,vars:2,consts:[["tuiTable","",3,"columns"],["tuiThead",""],["tuiThGroup",""],["tuiTh","",3,"resizable","sticky"],["tuiTbody","",3,"data"],["tuiTr",""],[4,"forToken"],["tuiTd",""],["tuiTd","",4,"tuiCell"]],template:function(r,i){r&1&&(L(0,"table",0)(1,"thead",1)(2,"tr",2),dt(3,nR,3,3,"th",3,on),B()(),L(5,"tbody",4),dt(6,uR,3,0,"tr",5,gi),B()()),r&2&&(Z("columns",i.columns()),R(3),ft(i.columnTokens()),R(2),Z("data",i.rows()),R(),ft(i.rows()))},dependencies:[Qt,Gs,vw,mw,yl,sm,Df,Sf,hw],encapsulation:2})};var Bn=class extends Lt{tokens=re(()=>{let e=this.token();if("tokens"in e)return e.tokens})};function lR(t,e){t&1&&rt(0)}function cR(t,e){if(t&1&&Me(0,lR,1,0,"ng-container",0),t&2){let r=Q();Z("forToken",r.tokens())}}function dR(t,e){if(t&1&&j(0),t&2){let r=Q();xe(`
|
|
98
|
+
`,r.token().text,`
|
|
99
|
+
`)}}var Cl=class t extends Bn{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["span","mdText",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&de(0,cR,1,1,"ng-container")(1,dR,1,1),r&2&&fe(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function fR(t,e){t&1&&rt(0)}var kf=class t extends Lt{get start(){return this.token().start}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["ol","mdList",""]],hostVars:1,hostBindings:function(r,i){r&2&&Ve("start",i.start)},features:[Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,fR,1,0,"ng-container",0),r&2&&Z("forToken",i.token().items)},dependencies:[Qt],styles:['[start=""][_nghost-%COMP%]{list-style-type:disc}[_nghost-%COMP%]{list-style-type:decimal;padding-left:1.5rem}[_nghost-%COMP%] ol[start=""]{list-style-type:circle}[_nghost-%COMP%] ol[start=""] ol[start=""]{list-style-type:square}[_nghost-%COMP%] ol[start=""] ol[start=""] ol[start=""]{list-style-type:disc}[_nghost-%COMP%] ol[start=""] ol[start=""] ol[start=""] ol[start=""]{list-style-type:circle}[_nghost-%COMP%] ol[start=""] ol[start=""] ol[start=""] ol[start=""] ol[start=""]{list-style-type:square}[_nghost-%COMP%] ol[start=""] ol[start=""] ol[start=""] ol[start=""] ol[start=""] ol[start=""]{list-style-type:disc}']})};function hR(t,e){t&1&&rt(0)}function pR(t,e){if(t&1&&Me(0,hR,1,0,"ng-container",0),t&2){let r=Q();Z("forToken",r.tokens())}}function vR(t,e){if(t&1&&j(0),t&2){let r=Q();xe(`
|
|
100
|
+
`,r.token().text,`
|
|
101
|
+
`)}}var Mf=class t extends Bn{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["i","mdItalic",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&de(0,pR,1,1,"ng-container")(1,vR,1,1),r&2&&fe(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function mR(t,e){t&1&&rt(0)}function gR(t,e){if(t&1&&Me(0,mR,1,0,"ng-container",0),t&2){let r=Q();Z("forToken",r.tokens())}}function yR(t,e){if(t&1&&j(0),t&2){let r=Q();xe(`
|
|
102
|
+
`,r.token().text,`
|
|
103
|
+
`)}}var If=class t extends Bn{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["del","mdDel",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&de(0,gR,1,1,"ng-container")(1,yR,1,1),r&2&&fe(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function bR(t,e){t&1&&rt(0)}function CR(t,e){if(t&1&&Me(0,bR,1,0,"ng-container",0),t&2){let r=Q();Z("forToken",r.tokens())}}function wR(t,e){if(t&1&&j(0),t&2){let r=Q();xe(`
|
|
104
|
+
`,r.token().text,`
|
|
105
|
+
`)}}var Af=class t extends Bn{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=K({type:t,selectors:[["strong","mdStrong",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&de(0,CR,1,1,"ng-container")(1,wR,1,1),r&2&&fe(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function gw(){return[{provide:im,useValue:{heading:vf,paragraph:Tf,blockquote:ff,table:Ef,code:pf,list:kf,list_item:xf,hr:mf,image:gf,link:wf,codespan:yf,text:Cl,escape:Cl,strong:Af,em:Mf,del:If,internalLink:Cf}},Ws,$s]}function _R(t,e){t&1&&rt(0)}var za=class t{myMarkdownService=C(Ws);value=U.required();tokens=re(()=>this.myMarkdownService.parse(this.value()));static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["markdown"]],inputs:{value:[1,"value"]},features:[_e([...gw()])],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,_R,1,0,"ng-container",0),r&2&&Z("forToken",i.tokens())},dependencies:[Qt],styles:["[_nghost-%COMP%] p{margin:0}"]})};var um=(t,e)=>e.code,lm=(t,e)=>e.groupTitle+e.assertion.title;function xR(t,e){if(t&1&&(L(0,"span",4),j(1),B()),t&2){let r=Q(2);R(),xe("\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 +",r.addedAssertions())}}function TR(t,e){if(t&1&&(L(0,"span",4),j(1),B()),t&2){let r=Q(2);R(),xe("\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B +",r.addedAttributes())}}function SR(t,e){if(t&1&&(L(0,"span",5),j(1),B()),t&2){let r=Q(2);R(),xe("\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u2212",r.removedAssertions())}}function DR(t,e){if(t&1&&(L(0,"span",5),j(1),B()),t&2){let r=Q(2);R(),xe("\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B \u2212",r.removedAttributes())}}function ER(t,e){if(t&1&&(L(0,"span",6),j(1),B()),t&2){let r=Q(2);R(),xe("\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B: ",r.changedAssertions())}}function kR(t,e){if(t&1&&(L(0,"span",6),j(1),B()),t&2){let r=Q(2);R(),xe("\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B: ",r.changedAttributes())}}function MR(t,e){t&1&&(L(0,"span",6),j(1,"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u0437\u043C\u0435\u043D\u0451\u043D"),B())}function IR(t,e){t&1&&(L(0,"span",6),j(1,"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E"),B())}function AR(t,e){if(t&1&&(L(0,"section",8)(1,"h3"),j(2,"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A"),B(),L(3,"div",9),j(4),B(),L(5,"div",10),j(6),B()()),t&2){let r=Q(),i=Q();R(4),Fr(r.title),R(2),Fr(i.feature().title)}}function OR(t,e){if(t&1&&ye(0,"markdown",11),t&2){let r=Q(2);Z("value",r.description)}}function RR(t,e){t&1&&j(0," - ")}function PR(t,e){t&1&&ye(0,"markdown",11),t&2&&Z("value",e)}function NR(t,e){t&1&&j(0," - ")}function FR(t,e){if(t&1&&(L(0,"section",8)(1,"h3"),j(2,"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435"),B(),L(3,"div",9),de(4,OR,1,1,"markdown",11)(5,RR,1,0),B(),L(6,"div",10),de(7,PR,1,1,"markdown",11)(8,NR,1,0),B()()),t&2){let r,i=Q(),n=Q();R(4),fe(i.description?4:5),R(3),fe((r=n.feature().description)?7:8,r)}}function BR(t,e){if(t&1&&(L(0,"article",12)(1,"h4"),j(2),B(),L(3,"div",10),j(4),B()()),t&2){let r=e.$implicit;R(2),Fr(r.code),R(2),Xn("+ ",r.code,": ",r.values.join(", "))}}function LR(t,e){if(t&1&&(L(0,"article",12)(1,"h4"),j(2),B(),L(3,"div",9),j(4),B(),L(5,"div",10),j(6),B()()),t&2){let r=e.$implicit;R(2),Fr(r.code),R(2),Xn("\u2212 ",r.code,": ",r.origin.join(", ")),R(2),Xn("+ ",r.code,": ",r.values.join(", "))}}function zR(t,e){if(t&1&&(L(0,"article",12)(1,"h4"),j(2),B(),L(3,"div",9),j(4),B()()),t&2){let r=e.$implicit;R(2),Fr(r.code),R(2),Xn("\u2212 ",r.code,": ",r.values.join(", "))}}function VR(t,e){if(t&1&&(L(0,"section",8)(1,"h3"),j(2,"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B"),B(),dt(3,BR,5,3,"article",12,um),dt(5,LR,7,5,"article",12,um),dt(7,zR,5,3,"article",12,um),B()),t&2){let r=Q(2);R(3),ft(r.addedAttributeItems()),R(2),ft(r.changedAttributeItems()),R(2),ft(r.removedAttributeItems())}}function HR(t,e){if(t&1&&(j(0," \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435: "),L(1,"div",10),ye(2,"markdown",11),B()),t&2){let r=Q().$implicit;R(2),Z("value",r.assertion.description)}}function UR(t,e){if(t&1&&(L(0,"article",12)(1,"h4"),j(2),B(),L(3,"div",10),ye(4,"markdown",11),B(),de(5,HR,3,1),B()),t&2){let r=e.$implicit;R(2),xe("",r.groupTitle,":"),R(2),Z("value",r.assertion.title),R(),fe(r.assertion.description?5:-1)}}function jR(t,e){if(t&1&&ye(0,"markdown",11),t&2){let r=Q(2).$implicit;Z("value",r.origin.description)}}function qR(t,e){t&1&&j(0," - ")}function WR(t,e){if(t&1&&ye(0,"markdown",11),t&2){let r=Q(2).$implicit;Z("value",r.assertion.description)}}function $R(t,e){t&1&&j(0," - ")}function GR(t,e){if(t&1&&(j(0," \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435: "),L(1,"div",9),de(2,jR,1,1,"markdown",11)(3,qR,1,0),B(),L(4,"div",10),de(5,WR,1,1,"markdown",11)(6,$R,1,0),B()),t&2){let r=Q().$implicit;R(2),fe(r.origin.description?2:3),R(3),fe(r.assertion.description?5:6)}}function YR(t,e){if(t&1&&(L(0,"article",12)(1,"h4"),j(2),B(),ye(3,"markdown",11),de(4,GR,7,2),B()),t&2){let r=e.$implicit;R(2),xe("",r.groupTitle,":"),R(),Z("value",r.assertion.title),R(),fe(r.origin.description!==r.assertion.description?4:-1)}}function KR(t,e){if(t&1&&ye(0,"markdown",11),t&2){let r=Q().$implicit;Z("value",r.assertion.description)}}function ZR(t,e){t&1&&j(0," - ")}function XR(t,e){if(t&1&&(L(0,"article",12)(1,"h4"),j(2),B(),ye(3,"markdown",11),L(4,"div",9),de(5,KR,1,1,"markdown",11)(6,ZR,1,0),B()()),t&2){let r=e.$implicit;R(2),xe("",r.groupTitle,":"),R(),Z("value",r.assertion.title),R(2),fe(r.assertion.description?5:6)}}function QR(t,e){if(t&1&&(L(0,"section",8)(1,"h3"),j(2,"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438"),B(),dt(3,UR,6,3,"article",12,lm),dt(5,YR,5,3,"article",12,lm),dt(7,XR,7,3,"article",12,lm),B()),t&2){let r=Q(2);R(3),ft(r.addedAssertionItems()),R(2),ft(r.changedAssertionItems()),R(2),ft(r.removedAssertionItems())}}function JR(t,e){if(t&1&&(L(0,"div",3),de(1,xR,2,1,"span",4),de(2,TR,2,1,"span",4),de(3,SR,2,1,"span",5),de(4,DR,2,1,"span",5),de(5,ER,2,1,"span",6),de(6,kR,2,1,"span",6),de(7,MR,2,0,"span",6),de(8,IR,2,0,"span",6),B(),L(9,"div",7),de(10,AR,7,2,"section",8),de(11,FR,9,2,"section",8),de(12,VR,9,0,"section",8),de(13,QR,9,0,"section",8),B()),t&2){let r=Q();R(),fe(r.addedAssertions()?1:-1),R(),fe(r.addedAttributes()?2:-1),R(),fe(r.removedAssertions()?3:-1),R(),fe(r.removedAttributes()?4:-1),R(),fe(r.changedAssertions()?5:-1),R(),fe(r.changedAttributes()?6:-1),R(),fe(r.titleChanged()?7:-1),R(),fe(r.descriptionChanged()?8:-1),R(2),fe(r.titleChanged()?10:-1),R(),fe(r.descriptionChanged()?11:-1),R(),fe(r.addedAttributes()||r.changedAttributes()||r.removedAttributes()?12:-1),R(),fe(r.addedAssertions()||r.changedAssertions()||r.removedAssertions()?13:-1)}}var Ys=t=>new Map(t.groups.flatMap(e=>e.assertions.map(r=>[`${e.title}\0${r.title}`,{groupTitle:e.title,assertion:r}]))),Of=class t{feature=U.required();origin=U.required();shortOriginCommit=re(()=>this.origin().commit.slice(0,7));originFeatureResource=Ea(()=>`/api/features/${this.feature().code}?revision=${this.origin().commit}`);originFeature=re(()=>this.originFeatureResource.hasValue()?this.originFeatureResource.value():null);addedAssertionItems=re(()=>{let e=this.originFeature();if(!e)return[];let r=Ys(e);return[...Ys(this.feature()).entries()].filter(([i])=>!r.has(i)).map(([,i])=>i)});removedAssertionItems=re(()=>{let e=this.originFeature();if(!e)return[];let r=Ys(this.feature());return[...Ys(e).entries()].filter(([i])=>!r.has(i)).map(([,i])=>i)});changedAssertionItems=re(()=>{let e=this.originFeature();if(!e)return[];let r=Ys(e);return[...Ys(this.feature()).values()].flatMap(i=>{let n=r.get(`${i.groupTitle}\0${i.assertion.title}`);return!n||i.assertion.description===n.assertion.description?[]:[Ke(ae({},i),{origin:n.assertion})]})});addedAttributeItems=re(()=>{let e=this.originFeature();return e?Object.entries(this.feature().attributes).filter(([r])=>!(r in e.attributes)).map(([r,i])=>({code:r,values:i})):[]});removedAttributeItems=re(()=>{let e=this.originFeature();return e?Object.entries(e.attributes).filter(([r])=>!(r in this.feature().attributes)).map(([r,i])=>({code:r,values:i})):[]});changedAttributeItems=re(()=>{let e=this.originFeature();return e?Object.entries(this.feature().attributes).flatMap(([r,i])=>{let n=e.attributes[r];return!n||JSON.stringify(i)===JSON.stringify(n)?[]:[{code:r,values:i,origin:n}]}):[]});addedAssertions=re(()=>this.addedAssertionItems().length);removedAssertions=re(()=>this.removedAssertionItems().length);changedAssertions=re(()=>this.changedAssertionItems().length);addedAttributes=re(()=>this.addedAttributeItems().length);removedAttributes=re(()=>this.removedAttributeItems().length);changedAttributes=re(()=>this.changedAttributeItems().length);titleChanged=re(()=>{let e=this.originFeature();return e!==null&&e.title!==this.feature().title});descriptionChanged=re(()=>{let e=this.originFeature();return e!==null&&e.description!==this.feature().description});static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-compare"]],inputs:{feature:[1,"feature"],origin:[1,"origin"]},decls:15,vars:9,consts:[[1,"origin"],[1,"origin-label"],[1,"origin-meta"],["aria-label","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",1,"statistics"],["appearance","positive","tuiBadge",""],["appearance","negative","tuiBadge",""],["appearance","warning","tuiBadge",""],["aria-label","\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F",1,"changes"],[1,"part"],[1,"diff-line","removed"],[1,"diff-line","added"],[3,"value"],[1,"change-item"]],template:function(r,i){if(r&1&&(L(0,"section",0)(1,"div")(2,"div",1),j(3,"\u0421\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0435 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439"),B(),L(4,"div"),j(5),B()(),L(6,"div",2)(7,"code"),j(8),B(),L(9,"span"),j(10),B(),L(11,"time"),j(12),Qn(13,"date"),B()()(),de(14,JR,14,12)),r&2){let n;R(5),Fr(i.origin().message),R(3),Fr(i.shortOriginCommit()),R(2),Fr(i.origin().author),R(),Ve("datetime",i.origin().date),R(),Fr(wc(13,6,i.origin().date,"dd.MM.yyyy HH:mm")),R(2),fe((n=i.originFeature())?14:-1,n)}},dependencies:[Us,za,Dc],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 2em;width:100%;min-height:0;overflow-x:hidden}.origin[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-bottom:.75rem}.origin-label[_ngcontent-%COMP%], .origin-meta[_ngcontent-%COMP%]{color:var(--tui-text-secondary);font:var(--tui-typography-body-xs)}.origin-meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.statistics[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.changes[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;overflow:hidden;gap:1rem}.part[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;border-top:1px solid var(--tui-border-normal);padding-top:.75rem}.part[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .part[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0}.change-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.diff-line[_ngcontent-%COMP%]{margin-left:2em;padding:.375rem .5rem;border-inline-start:.25rem solid var(--tui-border-normal);background:var(--tui-background-neutral-1)}.diff-line.added[_ngcontent-%COMP%]{border-color:var(--tui-status-positive);background:var(--tui-status-positive-pale)}.diff-line.removed[_ngcontent-%COMP%]{border-color:var(--tui-status-negative);background:var(--tui-status-negative-pale)}"]})};var Rf=class t{projectService=C(Di);attributeCode=U.required();attributeValues=U.required();attribute=re(()=>{if(!this.projectService.projectResource.hasValue())return null;let e=this.projectService.projectResource.value(),r=this.attributeCode();return e.attributes.find(n=>n.code===r)??null});attributeTitle=re(()=>this.attribute()?.title??this.attributeCode());attributeValue=re(()=>{let e=this.attribute();return e?this.attributeValues().map(r=>e.values.find(i=>i.code===r)?.title??r).join(", "):this.attributeValues().join(", ")});static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["attribute"]],inputs:{attributeCode:[1,"attributeCode"],attributeValues:[1,"attributeValues"]},decls:4,vars:2,consts:[["tuiBadge","","appearance","primary"]],template:function(r,i){r&1&&(L(0,"div",0)(1,"b"),j(2),B(),j(3),B()),r&2&&(R(2),xe("",i.attributeTitle(),":"),R(),xe(" ",i.attributeValue(),`
|
|
106
|
+
`))},dependencies:[Us],encapsulation:2})};function eP(t,e){t&1&&ye(0,"div",1)}function tP(t,e){t&1&&ye(0,"div",2)}function rP(t,e){t&1&&ye(0,"tui-icon",10),t&2&&st("font-size",16,"px")}function iP(t,e){t&1&&ye(0,"tui-icon",11),t&2&&st("font-size",16,"px")}function nP(t,e){if(t&1&&ye(0,"markdown",3),t&2){let r=Q();Z("value",r)}}function aP(t,e){if(t&1){let r=Kt();L(0,"div",4),Ce("click",function(){Nt(r);let n=Q();return Ft(n.toggleExpanded())}),de(1,rP,1,2,"tui-icon",5)(2,iP,1,2,"tui-icon",6),j(3," \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 "),B(),L(4,"div",7)(5,"tui-expand",8),Me(6,nP,1,1,"markdown",9),B()()}if(t&2){let r=Q();R(),fe(r.expanded()?1:2),R(4),Z("expanded",r.expanded())}}var Pf=class t{assertion=U.required();expanded=ge(!1);title="";description;constructor(){ot(()=>{let e=this.assertion();this.title=e.title,this.description=e.description})}toggleExpanded(){this.expanded.update(e=>!e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["assert"]],inputs:{assertion:[1,"assertion"]},decls:5,vars:3,consts:[[1,"assert"],["appearance","positive","tuiBadge","","tuiStatus","","size","m","tuiHint","\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u0430"],["appearance","negative","tuiBadge","","tuiStatus","","size","m","tuiHint","\u041D\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438"],[3,"value"],[1,"expander",3,"click"],["icon","@tui.chevron-down",3,"font-size"],["icon","@tui.chevron-right",3,"font-size"],[1,"description"],[3,"expanded"],[3,"value",4,"tuiItem"],["icon","@tui.chevron-down"],["icon","@tui.chevron-right"]],template:function(r,i){if(r&1&&(L(0,"div",0),de(1,eP,1,0,"div",1)(2,tP,1,0,"div",2),ye(3,"markdown",3),B(),de(4,aP,7,2)),r&2){let n;R(),fe(i.assertion().isAutomated?1:2),R(2),Z("value",i.title),R(),fe((n=i.assertion().description)?4:-1,n)}},dependencies:[ka,za,Us,$C,Ni,g1,Oa,ua],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] tui-expand .t-wrapper{overflow-x:hidden!important}.assert[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:2em;margin-bottom:.8em;gap:.4rem}.description[_ngcontent-%COMP%]{margin-left:4em;margin-bottom:1em}.expander[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:4rem;cursor:pointer}"]})};var oP=(t,e)=>e.title;function sP(t,e){if(t&1&&ye(0,"assert",0),t&2){let r=e.$implicit;Z("assertion",r)}}var Nf=class t{group=U.required();static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-group"]],inputs:{group:[1,"group"]},decls:4,vars:1,consts:[[3,"assertion"]],template:function(r,i){r&1&&(L(0,"h3"),j(1),B(),dt(2,sP,1,1,"assert",0,oP)),r&2&&(R(),xe(" ",i.group().title,`
|
|
107
|
+
`),R(),ft(i.group().assertions))},dependencies:[Pf],encapsulation:2})};var uP=(t,e)=>e.code,lP=(t,e)=>e.title;function cP(t,e){if(t&1&&ye(0,"attribute",1),t&2){let r=e.$implicit;Z("attributeCode",r.code)("attributeValues",r.values)}}function dP(t,e){t&1&&ye(0,"markdown",2),t&2&&Z("value",e)}function fP(t,e){if(t&1&&ye(0,"feature-group",3),t&2){let r=e.$implicit;Z("group",r)}}var Ff=class t{feature=U.required();attributes=re(()=>{let e=this.feature();return e?e.attributes?Object.entries(e.attributes).map(([r,i])=>({code:r,values:i})):[]:[]});static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-content"]],inputs:{feature:[1,"feature"]},decls:6,vars:1,consts:[[1,"meta"],[3,"attributeCode","attributeValues"],[3,"value"],[3,"group"]],template:function(r,i){if(r&1&&(L(0,"div",0),dt(1,cP,1,2,"attribute",1,uP),B(),de(3,dP,1,1,"markdown",2),dt(4,fP,1,1,"feature-group",3,lP)),r&2){let n;R(),ft(i.attributes()),R(2),fe((n=i.feature().description)?3:-1,n),R(),ft(i.feature().groups)}},dependencies:[za,Rf,Nf],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.meta[_ngcontent-%COMP%]{display:flex;gap:1em;margin-bottom:1em}"]})};var hP=["editorContainer"];var cm=new ee("NGX_MONACO_EDITOR_CONFIG"),yw=!1,bw,pP=(()=>{class t{constructor(){this.config=C(cm),this.insideNg=U(!1),this.onInit=qi(),this.editorContainer=wi.required("editorContainer"),this._models=[],this._listeners=[],ot(()=>{this.insideNg(),this._editor&&this.reinit()})}ngAfterViewInit(){yw?bw.then(()=>{this.initMonaco()}):(yw=!0,bw=new Promise(r=>{let i=this.config.baseUrl;if((i==="assets"||!i)&&(i="./assets/monaco/min/vs"),typeof window.monaco=="object"){this.initMonaco(),r();return}let n=s=>{let u=s||window.require,l={paths:{vs:`${i}`}};Object.assign(l,this.config.requireConfig||{}),u.config(l),u(["vs/editor/editor.main"],()=>{typeof this.config.onMonacoLoad=="function"&&this.config.onMonacoLoad(),this.initMonaco(),r()})};if(this.config.monacoRequire)n(this.config.monacoRequire);else if(window.require)if(window.require.config)n();else{var a=`${i}/loader.js`,o=new XMLHttpRequest;o.addEventListener("load",()=>{let s=document.createElement("script");s.type="text/javascript",s.text=["var nodeRequire = require;",o.responseText.replace('"use strict";',""),"var monacoAmdRequire = require;","require = nodeRequire;","require.nodeRequire = require;"].join(`
|
|
108
|
+
`),document.body.appendChild(s),n(window.monacoAmdRequire)}),o.open("GET",a),o.send()}else{let s=document.createElement("script");s.type="text/javascript",s.src=`${i}/loader.js`,s.addEventListener("load",()=>{n()}),document.body.appendChild(s)}}))}reinit(){this.disposeEditor(),this.initMonaco()}disposeEditor(){this._windowResizeSubscription?.unsubscribe(),this._windowResizeSubscription=void 0,this._listeners.forEach(r=>r.dispose()),this._listeners=[],this._editor?.dispose(),this._editor=void 0,this._models.forEach(r=>r.dispose()),this._models=[]}ngOnDestroy(){this.disposeEditor()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ng-component"]],viewQuery:function(i,n){i&1&&Ci(n.editorContainer,hP,5),i&2&&Wt()},inputs:{insideNg:[1,"insideNg"]},outputs:{onInit:"onInit"},standalone:!1,decls:0,vars:0,template:function(i,n){},encapsulation:2,changeDetection:1})}}return t})(),Cw=(()=>{class t extends pP{constructor(){super(),this.zone=C(gr),this._value="",this._disabled=!1,this.options=U({}),this.model=U(),this.propagateChange=r=>{},this.onTouched=()=>{},ot(()=>{this.options(),this.model(),this._editor&&this.reinit()})}writeValue(r){this._value=r||"",setTimeout(()=>{this._editor&&!this.model()&&this._editor.setValue(this._value)})}registerOnChange(r){this.propagateChange=r}registerOnTouched(r){this.onTouched=r}setDisabledState(r){this._disabled=r,this._editor?.updateOptions({readOnly:r||!!this.options().readOnly})}setTheme(r){monaco.editor.setTheme(r)}initMonaco(){let r=ae(ae({},this.config.defaultOptions),this.options());this._disabled&&(r.readOnly=!0);let i=this.model();if(i){let a=i.uri?monaco.editor.getModel(i.uri):null;if(a)a.setValue(this._value),r.model=a;else{let o=monaco.editor.createModel(i.value,i.language,i.uri);this._models.push(o),r.model=o}}let n=this.editorContainer().nativeElement;this.insideNg()?this._editor=monaco.editor.create(n,r):this.zone.runOutsideAngular(()=>{this._editor=monaco.editor.create(n,r)}),r.model||this._editor.setValue(this._value),this._listeners.push(this._editor.onDidChangeModelContent(()=>{let a=this._editor.getValue();this.zone.run(()=>{this.propagateChange(a),this._value=a})})),this._listeners.push(this._editor.onDidBlurEditorWidget(()=>{this.onTouched()})),this._windowResizeSubscription=ur(window,"resize").subscribe(()=>this._editor.layout()),this.onInit.emit(this._editor)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=K({type:t,selectors:[["ngx-monaco-editor"]],inputs:{options:[1,"options"],model:[1,"model"]},features:[_e([{provide:Rc,useExisting:Ut(()=>t),multi:!0}]),Ae],decls:2,vars:0,consts:[["editorContainer",""],[1,"editor-container"]],template:function(i,n){i&1&&ku(0,"div",1,0)},styles:["[_nghost-%COMP%]{display:block;height:200px}.editor-container[_ngcontent-%COMP%]{width:100%;height:98%}"]})}}return t})();var ww=(()=>{class t{static forRoot(r={}){return{ngModule:t,providers:[{provide:cm,useValue:r}]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Zn({type:t})}static{this.\u0275inj=Yn({imports:[cy]})}}return t})();function _w(t={}){return hc([{provide:cm,useValue:t}])}var Ks=class t{existingProvider;completionProvider;register(e,r,i){this.completionProvider=this.mapCompletionProvider(e,r,i),this.existingProvider&&this.initialize()}initialize(){this.existingProvider&&this.existingProvider.dispose(),this.completionProvider&&(this.existingProvider=monaco.languages.registerCompletionItemProvider("yaml",this.completionProvider))}mapCompletionProvider(e,r,i){return{triggerCharacters:r,provideCompletionItems:function(n,a){let{column:o,lineNumber:s}=a,l=n.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:a.lineNumber,endColumn:a.column}).match(i);if(!l)return{suggestions:[]};let d=l[1].slice(1),f={startColumn:o-d.length,endColumn:o,startLineNumber:s,endLineNumber:s};return{suggestions:e.filter(h=>h.label.startsWith(d)).map(({label:h,description:g,insertText:v})=>({label:h,kind:monaco.languages.CompletionItemKind.Reference,insertText:v??h,detail:g,range:f}))}}}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Xe({token:t,factory:t.\u0275fac,providedIn:"root"})};var Zs=()=>null;function dm(t,e,r,i){let{startLineNumber:n,startColumn:a,endLineNumber:o,endColumn:s}=r,u=i.getValueInRange(r),l=u.startsWith(t)&&u.endsWith(e),c=l?t.length:0,d=l?e.length:0,f={startLineNumber:n,startColumn:a,endLineNumber:n,endColumn:a+c},p={startLineNumber:o,startColumn:s-d,endLineNumber:o,endColumn:s},h={range:f,text:l?"":t},g={range:p,text:l?"":e};i.pushEditOperations([],[h,g],Zs)}function Va(t,e,r){let i=r.getModel(),n=r.getSelection();if(!i||!n)return;i=i;let a=t.length,o=e.length;if(n.isEmpty()){let s=i.getWordAtPosition(n.getPosition());if(s){let{startLineNumber:u,endLineNumber:l}=n,{startColumn:c,endColumn:d}=s,f={startLineNumber:u,endLineNumber:l,startColumn:c-a,endColumn:d+o},p=i.getValueInRange(f);p.startsWith(t)&&p.endsWith(e)?dm(t,e,f,i):dm(t,e,{startLineNumber:u,endLineNumber:l,startColumn:c,endColumn:d},i)}else{let l={range:n,text:`${t}${e}`};i.pushEditOperations([n],[l],Zs)}}else dm(t,e,n,i)}function wl(t,e){let r=e.getModel(),i=e.getSelection();if(!r||!i)return;r=r;let{startLineNumber:n,endLineNumber:a}=i,o=new Array;for(let s=n;s<=a;s++){let u={startLineNumber:s,endLineNumber:s,startColumn:1,endColumn:1};o.push({range:u,text:t})}r.pushEditOperations([],o,Zs)}function xw(t,e){let r=e.getModel(),i=e.getSelection();if(!r||!i)return;r=r;let{startLineNumber:n,endLineNumber:a}=i,o=new Array;for(let s=n;s<=a;s++){let u={startLineNumber:s,endLineNumber:s,startColumn:1,endColumn:1+t.length};r.getValueInRange(u)===t&&o.push({range:u,text:""})}r.pushEditOperations([],o,Zs)}function Bf(t,e){let r=e.getModel(),i=e.getSelection();if(!r||!i)return;r=r;let{startLineNumber:n,endLineNumber:a}=i,o=t.length,s=!1,u=new Array;for(let l=n;l<=a;l++){let c={startLineNumber:l,endLineNumber:l,startColumn:1,endColumn:1+o};r.getValueInRange(c)===t&&(s=!0,u.push({range:c,text:""}))}if(!s)for(let l=n;l<=a;l++){let c={startLineNumber:l,endLineNumber:l,startColumn:1,endColumn:1};u.push({range:c,text:t})}r.pushEditOperations([],u,Zs)}function Tw(t){let e=t.getModel(),r=t.getSelection();if(!e||!r)return;e=e;let{startLineNumber:i,endLineNumber:n}=r,a=!1,o=new Array;for(let s=i;s<=n;s++){let u={startLineNumber:s,endLineNumber:s,startColumn:1,endColumn:20},l=e.getValueInRange(u),c=/^(\s*)(\d+\.\s+)/g.exec(l);c&&(console.log(c),a=!0,u.startColumn=1+c[1].length,u.endColumn=u.startColumn+c[2].length,o.push({range:u,text:""}))}if(!a){let s=1;for(let u=i;u<=n;u++){let l={startLineNumber:u,endLineNumber:u,startColumn:1,endColumn:20},c=e.getValueInRange(l),d=/^(\s*)/g.exec(c);d&&(l.startColumn=1+d[1].length),l.endColumn=l.startColumn,o.push({range:l,text:`${s}. `}),s++}}e.pushEditOperations([],o,Zs)}var mP=`
|
|
109
|
+
| \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 1 | \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 2 | \u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A 3 |
|
|
110
|
+
|-------------|-------------|-------------|
|
|
111
|
+
| | | |
|
|
112
|
+
`,Lf=class t{editor=U.required();heading(){wl("# ",this.editor())}bold(){Va("**","**",this.editor())}italic(){Va("_","_",this.editor())}strikethrough(){Va("~","~",this.editor())}inlineCode(){Va("`","`",this.editor())}codeBlock(){Va("\n```\n","\n```\n",this.editor())}link(){Va("[","](https://)",this.editor())}image(){Va("",this.editor())}blockquote(){Bf("> ",this.editor())}horizontalRuler(){wl(`
|
|
113
|
+
---
|
|
114
|
+
`,this.editor())}ul(){Bf("- ",this.editor())}ol(){Tw(this.editor())}checkList(){Bf("- [ ] ",this.editor())}indentIncrease(){wl(" ",this.editor())}indentDecrease(){xw(" ",this.editor())}table(){wl(mP,this.editor())}undo(){this.editor().trigger(null,"undo",null)}redo(){this.editor().trigger(null,"redo",null)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["markdown-editor-toolbar"]],inputs:{editor:[1,"editor"]},features:[_e([Gr({size:"s"})])],decls:43,vars:0,consts:[["iconStart","@tui.undo","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.redo","appearance","secondary","tuiIconButton","","type","button",3,"click"],[1,"tui-space_left-2"],["iconStart","@tui.heading","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.bold","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.italic","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.strikethrough","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.code","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.file-json-2","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.link","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.image","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.minus","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.text-quote","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.list","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.list-ordered","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.list-check","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.indent-increase","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.indent-decrease","appearance","secondary","tuiIconButton","","type","button",3,"click"],["iconStart","@tui.table","appearance","secondary","tuiIconButton","","type","button",3,"click"]],template:function(r,i){r&1&&(L(0,"button",0),Ce("click",function(){return i.undo()}),j(1," Undo "),B(),L(2,"button",1),Ce("click",function(){return i.redo()}),j(3," Redo "),B(),ye(4,"span",2),L(5,"button",3),Ce("click",function(){return i.heading()}),j(6," Heading "),B(),L(7,"button",4),Ce("click",function(){return i.bold()}),j(8," Bold "),B(),L(9,"button",5),Ce("click",function(){return i.italic()}),j(10," Italic "),B(),L(11,"button",6),Ce("click",function(){return i.strikethrough()}),j(12," Strikethrough "),B(),ye(13,"span",2),L(14,"button",7),Ce("click",function(){return i.inlineCode()}),j(15," Code "),B(),L(16,"button",8),Ce("click",function(){return i.codeBlock()}),j(17," Code block "),B(),ye(18,"span",2),L(19,"button",9),Ce("click",function(){return i.link()}),j(20," Link "),B(),L(21,"button",10),Ce("click",function(){return i.image()}),j(22," Image "),B(),L(23,"button",11),Ce("click",function(){return i.horizontalRuler()}),j(24," Horizontal ruler "),B(),ye(25,"span",2),L(26,"button",12),Ce("click",function(){return i.blockquote()}),j(27," Blockquote "),B(),ye(28,"span",2),L(29,"button",13),Ce("click",function(){return i.ul()}),j(30," List unordered "),B(),L(31,"button",14),Ce("click",function(){return i.ol()}),j(32," List ordered "),B(),L(33,"button",15),Ce("click",function(){return i.checkList()}),j(34," Check list "),B(),ye(35,"span",2),L(36,"button",16),Ce("click",function(){return i.indentIncrease()}),j(37," Indent increase "),B(),L(38,"button",17),Ce("click",function(){return i.indentDecrease()}),j(39," Indent decrease "),B(),ye(40,"span",2),L(41,"button",18),Ce("click",function(){return i.table()}),j(42," Table "),B())},dependencies:[_i],styles:["[_nghost-%COMP%]{display:flex;gap:.2em;padding:.5em;border-bottom:1px solid var(--tui-border-normal);margin-bottom:.5em}"]})};function gP(t,e){t&1&&ye(0,"markdown-editor-toolbar",0),t&2&&Z("editor",e)}var zf=class t{completionProviderService=C(Ks,{optional:!0});editor=ge(null);value=U.required();valueChange=qi();editValue=ge("");editorOptions={theme:"vs-dark",language:"yaml",minimap:{enabled:!1},automaticLayout:!0};constructor(){ot(()=>{let e=this.value();nt(()=>this.editValue.set(e))}),ot(()=>{let e=this.editValue();nt(()=>this.valueChange.emit(e))})}initEditor(e){this.editor.set(e),this.completionProviderService?.initialize()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["markdown-editor"]],inputs:{value:[1,"value"]},outputs:{valueChange:"valueChange"},decls:2,vars:3,consts:[[3,"editor"],[1,"editor",3,"ngModelChange","onInit","ngModel","options"]],template:function(r,i){if(r&1&&(de(0,gP,1,1,"markdown-editor-toolbar",0),L(1,"ngx-monaco-editor",1),ln("ngModelChange",function(a){return un(i.editValue,a)||(i.editValue=a),a}),Ce("onInit",function(a){return i.initEditor(a)}),B(),fo()),r&2){let n;fe((n=i.editor())?0:-1,n),R(),sn("ngModel",i.editValue),Z("options",i.editorOptions),ho()}},dependencies:[ww,Cw,ka,ss,cn,Lf],styles:["[_nghost-%COMP%]{position:relative;height:100%;display:flex;flex-direction:column;border:1px solid var(--tui-border-normal);border-radius:.5em}.editor[_ngcontent-%COMP%]{flex-grow:1}"]})};var Vf=class t{mdCompletionProviderService=C(Ks);projectService=C(Di);constructor(){ot(()=>{if(this.projectService.projectResource.hasValue()){let r=this.projectService.projectResource.value().features.map(i=>({label:i.code,description:i.title,insertText:i.code}));this.mdCompletionProviderService.register(r,["$"],/\s(\$([A-Za-z][A-Za-z\d-]*)?)$/)}})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=jt({token:t,factory:t.\u0275fac})};function yP(t,e){if(t&1){let r=Kt();L(0,"markdown-editor",1),Ce("valueChange",function(n){Nt(r);let a=Q();return Ft(a.updateYaml(n))}),B()}if(t&2){let r=Q();Z("value",r.editYaml())}}var Hf=class t{notifications=C(T1);featureCode=U.required();featureYamlResource=Ea.text(()=>`/api/features/${this.featureCode()}/yaml`);featureYaml=re(()=>this.featureYamlResource.hasValue()?this.featureYamlResource.value():null);featureYamlHash=re(()=>this.featureYamlResource.hasValue()?this.featureYamlResource.headers()?.get("ETag")??null:null);hasChanges=re(()=>this.featureYaml()&&this.featureYaml()!==this.editYaml());editYaml=_c(()=>{let e=this.featureYaml();if(e==null)throw new Error("Yaml should be defined");return e});canClose=qi();constructor(){C(Vf)}updateYaml(e){this.editYaml.set(e)}async saveChanges(){let e=this.featureYamlHash();if(!e)throw new Error("Yaml HASH is undefined");let r=await fetch(`/api/features/${this.featureCode()}/yaml`,{method:"PUT",body:this.editYaml(),headers:{"Content-Type":"application/yaml",charset:"utf-8","If-Match":e}});r.status===200?(this.notifications.open("\u0421\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430",{appearance:"positive"}).subscribe(),this.canClose.emit()):r.status===409?this.notifications.open("\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0441\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044E, \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",{appearance:"negative"}).subscribe():this.notifications.open("\u041E\u0448\u0438\u0431\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F \u0441\u043F\u0435\u0446\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438",{appearance:"negative"}).subscribe()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-editor"]],inputs:{featureCode:[1,"featureCode"]},outputs:{canClose:"canClose"},decls:1,vars:1,consts:[[3,"value"],[3,"valueChange","value"]],template:function(r,i){r&1&&de(0,yP,1,1,"markdown-editor",0),r&2&&fe(i.featureYaml()!=null?0:-1)},dependencies:[zf],styles:["[_nghost-%COMP%]{display:contents}"]})};function bP(t,e){if(t&1&&ye(0,"tui-data-list-wrapper",4),t&2){let r=Q(),i=pr(4);Z("items",r.featureHistory())("itemContent",i)}}function CP(t,e){if(t&1&&(L(0,"div",5)(1,"div"),j(2),B(),L(3,"div",6)(4,"span"),j(5),B(),L(6,"span"),j(7),Qn(8,"date"),B()()()),t&2){let r=e.$implicit;R(2),xe(" ",r.message," "),R(3),xe(" ",r.author," "),R(2),xe(" ",wc(8,3,r.date,"dd.MM.yyyy HH:mm")," ")}}var Uf=class t{featureCode=U.required();featureHistoryResource=Ea(()=>`/api/features/${this.featureCode()}/history`);featureHistory=re(()=>this.featureHistoryResource.hasValue()?this.featureHistoryResource.value():null);value=Wi(null);static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-history-selector"]],inputs:{featureCode:[1,"featureCode"],value:[1,"value"]},outputs:{value:"valueChange"},features:[_e([id({stringify:ge(e=>e.message),identityMatcher:ge((e,r)=>e.commit===r.commit)})])],decls:5,vars:2,consts:[["content",""],["iconStart","@tui.git-compare-arrows","tuiChevron","","tuiTextfieldSize","s",1,"history-selector",3,"tuiTextfieldCleaner"],["placeholder","\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F","tuiSelect","",3,"ngModelChange","ngModel"],[3,"items","itemContent",4,"tuiDropdown"],[3,"items","itemContent"],[1,"history-item"],[1,"caption"]],template:function(r,i){if(r&1){let n=Kt();L(0,"tui-textfield",1)(1,"input",2),ln("ngModelChange",function(o){return Nt(n),un(i.value,o)||(i.value=o),Ft(o)}),B(),fo(),Me(2,bP,1,2,"tui-data-list-wrapper",3),B(),Me(3,CP,9,6,"ng-template",null,0,Oi)}r&2&&(Z("tuiTextfieldCleaner",!0),R(),sn("ngModel",i.value),ho())},dependencies:[ka,os,ss,cn,Hs,nf,tf,li,Ts,xo,Dc],styles:["[_nghost-%COMP%]{display:contents}.history-selector[_ngcontent-%COMP%]{width:40em}.history-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1}.history-item[_ngcontent-%COMP%] .caption[_ngcontent-%COMP%]{display:flex;justify-content:space-between;color:var(--tui-text-secondary);font:var(--tui-typography-body-xs)}"]})};function Ug(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function wP(t){if(Array.isArray(t))return t}function _P(t){if(Array.isArray(t))return Ug(t)}function ro(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xP(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,eT(i.key),i)}}function io(t,e,r){return e&&xP(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ki(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=u0(t))||e){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{o||r.return==null||r.return()}finally{if(s)throw a}}}}function Jx(t,e,r){return(e=eT(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function SP(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,n,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(i=a.call(r)).done)&&(s.push(i.value),s.length!==e);u=!0);}catch(c){l=!0,n=c}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}function DP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
116
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
117
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sr(t,e){return wP(t)||SP(t,e)||u0(t,e)||DP()}function hh(t){return _P(t)||TP(t)||u0(t)||EP()}function kP(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function eT(t){var e=kP(t,"string");return typeof e=="symbol"?e:e+""}function Or(t){"@babel/helpers - typeof";return Or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Or(t)}function u0(t,e){if(t){if(typeof t=="string")return Ug(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ug(t,e):void 0}}var Ir=typeof window>"u"?null:window,Sw=Ir?Ir.navigator:null;Ir&&Ir.document;var MP=Or(""),tT=Or({}),IP=Or(function(){}),AP=typeof HTMLElement>"u"?"undefined":Or(HTMLElement),Wl=function(e){return e&&e.instanceString&&cr(e.instanceString)?e.instanceString():null},Ue=function(e){return e!=null&&Or(e)==MP},cr=function(e){return e!=null&&Or(e)===IP},Zt=function(e){return!Vi(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Dt=function(e){return e!=null&&Or(e)===tT&&!Zt(e)&&e.constructor===Object},OP=function(e){return e!=null&&Or(e)===tT},Te=function(e){return e!=null&&Or(e)===Or(1)&&!isNaN(e)},RP=function(e){return Te(e)&&Math.floor(e)===e},ph=function(e){if(AP!=="undefined")return e!=null&&e instanceof HTMLElement},Vi=function(e){return $l(e)||rT(e)},$l=function(e){return Wl(e)==="collection"&&e._private.single},rT=function(e){return Wl(e)==="collection"&&!e._private.single},l0=function(e){return Wl(e)==="core"},iT=function(e){return Wl(e)==="stylesheet"},PP=function(e){return Wl(e)==="event"},Ka=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},NP=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},FP=function(e){return Dt(e)&&Te(e.x1)&&Te(e.x2)&&Te(e.y1)&&Te(e.y2)},BP=function(e){return OP(e)&&cr(e.then)},LP=function(){return Sw&&Sw.userAgent.match(/msie|trident|edge/i)},fu=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],o=0;o<arguments.length;o++)a.push(arguments[o]);return a.join("$")});var i=function(){var a=this,o=arguments,s,u=r.apply(a,o),l=i.cache;return(s=l[u])||(s=l[u]=e.apply(a,o)),s};return i.cache={},i},c0=fu(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Eh=fu(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),nT=fu(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Dw=function(e){return Ka(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},qa=function(e,r){return e.slice(-1*r.length)===r},Ar="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",zP="rgb[a]?\\(("+Ar+"[%]?)\\s*,\\s*("+Ar+"[%]?)\\s*,\\s*("+Ar+"[%]?)(?:\\s*,\\s*("+Ar+"))?\\)",VP="rgb[a]?\\((?:"+Ar+"[%]?)\\s*,\\s*(?:"+Ar+"[%]?)\\s*,\\s*(?:"+Ar+"[%]?)(?:\\s*,\\s*(?:"+Ar+"))?\\)",HP="hsl[a]?\\(("+Ar+")\\s*,\\s*("+Ar+"[%])\\s*,\\s*("+Ar+"[%])(?:\\s*,\\s*("+Ar+"))?\\)",UP="hsl[a]?\\((?:"+Ar+")\\s*,\\s*(?:"+Ar+"[%])\\s*,\\s*(?:"+Ar+"[%])(?:\\s*,\\s*(?:"+Ar+"))?\\)",jP="\\#[0-9a-fA-F]{3}",qP="\\#[0-9a-fA-F]{6}",aT=function(e,r){return e<r?-1:e>r?1:0},WP=function(e,r){return-1*aT(e,r)},$e=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var i=e[r];if(i!=null)for(var n=Object.keys(i),a=0;a<n.length;a++){var o=n[a];t[o]=i[o]}}return t},$P=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,i,n,a,o=16;return r?(i=parseInt(e[1]+e[1],o),n=parseInt(e[2]+e[2],o),a=parseInt(e[3]+e[3],o)):(i=parseInt(e[1]+e[2],o),n=parseInt(e[3]+e[4],o),a=parseInt(e[5]+e[6],o)),[i,n,a]}},GP=function(e){var r,i,n,a,o,s,u,l;function c(h,g,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?h+(g-h)*6*v:v<1/2?g:v<2/3?h+(g-h)*(2/3-v)*6:h}var d=new RegExp("^"+HP+"$").exec(e);if(d){if(i=parseInt(d[1]),i<0?i=(360- -1*i%360)%360:i>360&&(i=i%360),i/=360,n=parseFloat(d[2]),n<0||n>100||(n=n/100,a=parseFloat(d[3]),a<0||a>100)||(a=a/100,o=d[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(n===0)s=u=l=Math.round(a*255);else{var f=a<.5?a*(1+n):a+n-a*n,p=2*a-f;s=Math.round(255*c(p,f,i+1/3)),u=Math.round(255*c(p,f,i)),l=Math.round(255*c(p,f,i-1/3))}r=[s,u,l,o]}return r},YP=function(e){var r,i=new RegExp("^"+zP+"$").exec(e);if(i){r=[];for(var n=[],a=1;a<=3;a++){var o=i[a];if(o[o.length-1]==="%"&&(n[a]=!0),o=parseFloat(o),n[a]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var s=n[1]||n[2]||n[3],u=n[1]&&n[2]&&n[3];if(s&&!u)return;var l=i[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;r.push(l)}}return r},KP=function(e){return ZP[e.toLowerCase()]},oT=function(e){return(Zt(e)?e:null)||KP(e)||$P(e)||YP(e)||GP(e)},ZP={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},sT=function(e){for(var r=e.map,i=e.keys,n=i.length,a=0;a<n;a++){var o=i[a];if(Dt(o))throw Error("Tried to set map with object key");a<i.length-1?(r[o]==null&&(r[o]={}),r=r[o]):r[o]=e.value}},uT=function(e){for(var r=e.map,i=e.keys,n=i.length,a=0;a<n;a++){var o=i[a];if(Dt(o))throw Error("Tried to get map with object key");if(r=r[o],r==null)return r}return r},jf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fm,Ew;function Yl(){if(Ew)return fm;Ew=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return fm=t,fm}var hm,kw;function XP(){if(kw)return hm;kw=1;var t=typeof jf=="object"&&jf&&jf.Object===Object&&jf;return hm=t,hm}var pm,Mw;function kh(){if(Mw)return pm;Mw=1;var t=XP(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return pm=r,pm}var vm,Iw;function QP(){if(Iw)return vm;Iw=1;var t=kh(),e=function(){return t.Date.now()};return vm=e,vm}var mm,Aw;function JP(){if(Aw)return mm;Aw=1;var t=/\s/;function e(r){for(var i=r.length;i--&&t.test(r.charAt(i)););return i}return mm=e,mm}var gm,Ow;function eN(){if(Ow)return gm;Ow=1;var t=JP(),e=/^\s+/;function r(i){return i&&i.slice(0,t(i)+1).replace(e,"")}return gm=r,gm}var ym,Rw;function d0(){if(Rw)return ym;Rw=1;var t=kh(),e=t.Symbol;return ym=e,ym}var bm,Pw;function tN(){if(Pw)return bm;Pw=1;var t=d0(),e=Object.prototype,r=e.hasOwnProperty,i=e.toString,n=t?t.toStringTag:void 0;function a(o){var s=r.call(o,n),u=o[n];try{o[n]=void 0;var l=!0}catch{}var c=i.call(o);return l&&(s?o[n]=u:delete o[n]),c}return bm=a,bm}var Cm,Nw;function rN(){if(Nw)return Cm;Nw=1;var t=Object.prototype,e=t.toString;function r(i){return e.call(i)}return Cm=r,Cm}var wm,Fw;function lT(){if(Fw)return wm;Fw=1;var t=d0(),e=tN(),r=rN(),i="[object Null]",n="[object Undefined]",a=t?t.toStringTag:void 0;function o(s){return s==null?s===void 0?n:i:a&&a in Object(s)?e(s):r(s)}return wm=o,wm}var _m,Bw;function iN(){if(Bw)return _m;Bw=1;function t(e){return e!=null&&typeof e=="object"}return _m=t,_m}var xm,Lw;function Kl(){if(Lw)return xm;Lw=1;var t=lT(),e=iN(),r="[object Symbol]";function i(n){return typeof n=="symbol"||e(n)&&t(n)==r}return xm=i,xm}var Tm,zw;function nN(){if(zw)return Tm;zw=1;var t=eN(),e=Yl(),r=Kl(),i=NaN,n=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(l){if(typeof l=="number")return l;if(r(l))return i;if(e(l)){var c=typeof l.valueOf=="function"?l.valueOf():l;l=e(c)?c+"":c}if(typeof l!="string")return l===0?l:+l;l=t(l);var d=a.test(l);return d||o.test(l)?s(l.slice(2),d?2:8):n.test(l)?i:+l}return Tm=u,Tm}var Sm,Vw;function aN(){if(Vw)return Sm;Vw=1;var t=Yl(),e=QP(),r=nN(),i="Expected a function",n=Math.max,a=Math.min;function o(s,u,l){var c,d,f,p,h,g,v=0,m=!1,y=!1,b=!0;if(typeof s!="function")throw new TypeError(i);u=r(u)||0,t(l)&&(m=!!l.leading,y="maxWait"in l,f=y?n(r(l.maxWait)||0,u):f,b="trailing"in l?!!l.trailing:b);function w(A){var O=c,N=d;return c=d=void 0,v=A,p=s.apply(N,O),p}function T(A){return v=A,h=setTimeout(D,u),m?w(A):p}function x(A){var O=A-g,N=A-v,F=u-O;return y?a(F,f-N):F}function _(A){var O=A-g,N=A-v;return g===void 0||O>=u||O<0||y&&N>=f}function D(){var A=e();if(_(A))return E(A);h=setTimeout(D,x(A))}function E(A){return h=void 0,b&&c?w(A):(c=d=void 0,p)}function M(){h!==void 0&&clearTimeout(h),v=0,c=g=d=h=void 0}function k(){return h===void 0?p:E(e())}function I(){var A=e(),O=_(A);if(c=arguments,d=this,g=A,O){if(h===void 0)return T(g);if(y)return clearTimeout(h),h=setTimeout(D,u),w(g)}return h===void 0&&(h=setTimeout(D,u)),p}return I.cancel=M,I.flush=k,I}return Sm=o,Sm}var oN=aN(),Zl=Gl(oN),Dm=Ir?Ir.performance:null,cT=Dm&&Dm.now?function(){return Dm.now()}:function(){return Date.now()},sN=(function(){if(Ir){if(Ir.requestAnimationFrame)return function(t){Ir.requestAnimationFrame(t)};if(Ir.mozRequestAnimationFrame)return function(t){Ir.mozRequestAnimationFrame(t)};if(Ir.webkitRequestAnimationFrame)return function(t){Ir.webkitRequestAnimationFrame(t)};if(Ir.msRequestAnimationFrame)return function(t){Ir.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(cT())},1e3/60)}})(),vh=function(e){return sN(e)},pa=cT,zo=9261,dT=65599,nu=5381,fT=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zo,i=r,n;n=e.next(),!n.done;)i=i*dT+n.value|0;return i},Nl=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zo;return r*dT+e|0},Fl=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nu;return(r<<5)+r+e|0},uN=function(e,r){return e*2097152+r},Ha=function(e){return e[0]*2097152+e[1]},qf=function(e,r){return[Nl(e[0],r[0]),Fl(e[1],r[1])]},Hw=function(e,r){var i={value:0,done:!1},n=0,a=e.length,o={next:function(){return n<a?i.value=e[n++]:i.done=!0,i}};return fT(o,r)},Uo=function(e,r){var i={value:0,done:!1},n=0,a=e.length,o={next:function(){return n<a?i.value=e.charCodeAt(n++):i.done=!0,i}};return fT(o,r)},hT=function(){return lN(arguments)},lN=function(e){for(var r,i=0;i<e.length;i++){var n=e[i];i===0?r=Uo(n):r=Uo(n,r)}return r};function cN(t,e,r,i,n){var a=n*Math.PI/180,o=Math.cos(a)*(t-r)-Math.sin(a)*(e-i)+r,s=Math.sin(a)*(t-r)+Math.cos(a)*(e-i)+i;return{x:o,y:s}}var dN=function(e,r,i,n,a,o){return{x:(e-i)*a+i,y:(r-n)*o+n}};function fN(t,e,r){if(r===0)return t;var i=(e.x1+e.x2)/2,n=(e.y1+e.y2)/2,a=e.w/e.h,o=1/a,s=cN(t.x,t.y,i,n,r),u=dN(s.x,s.y,i,n,a,o);return{x:u.x,y:u.y}}var Uw=!0,hN=console.warn!=null,pN=console.trace!=null,f0=Number.MAX_SAFE_INTEGER||9007199254740991,pT=function(){return!0},mh=function(){return!1},jw=function(){return 0},h0=function(){},ar=function(e){throw new Error(e)},vT=function(e){if(e!==void 0)Uw=!!e;else return Uw},Vt=function(e){vT()&&(hN?console.warn(e):(console.log(e),pN&&console.trace()))},vN=function(e){return $e({},e)},Un=function(e){return e==null?e:Zt(e)?e.slice():Dt(e)?vN(e):e},mN=function(e){return e.slice()},mT=function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},gN={},gT=function(){return gN},Zr=function(e){var r=Object.keys(e);return function(i){for(var n={},a=0;a<r.length;a++){var o=r[a],s=i?.[o];n[o]=s===void 0?e[o]:s}return n}},Za=function(e,r,i){for(var n=e.length-1;n>=0;n--)e[n]===r&&e.splice(n,1)},p0=function(e){e.splice(0,e.length)},yN=function(e,r){for(var i=0;i<r.length;i++){var n=r[i];e.push(n)}},di=function(e,r,i){return i&&(r=nT(i,r)),e[r]},Hn=function(e,r,i,n){i&&(r=nT(i,r)),e[r]=n},bN=(function(){function t(){ro(this,t),this._obj={}}return io(t,[{key:"set",value:function(r,i){return this._obj[r]=i,this}},{key:"delete",value:function(r){return this._obj[r]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(r){return this._obj[r]!==void 0}},{key:"get",value:function(r){return this._obj[r]}}])})(),ha=typeof Map<"u"?Map:bN,CN="undefined",wN=(function(){function t(e){if(ro(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var i=0;i<r.length;i++)this.add(r[i])}}return io(t,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(r){var i=this._obj;i[r]!==1&&(i[r]=1,this.size++)}},{key:"delete",value:function(r){var i=this._obj;i[r]===1&&(i[r]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(r){return this._obj[r]===1}},{key:"toArray",value:function(){var r=this;return Object.keys(this._obj).filter(function(i){return r.has(i)})}},{key:"forEach",value:function(r,i){return this.toArray().forEach(r,i)}}])})(),gu=(typeof Set>"u"?"undefined":Or(Set))!==CN?Set:wN,Mh=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!l0(e)){ar("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){ar("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new gu,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var o=r.renderedPosition,s=e.pan(),u=e.zoom();a.position={x:(o.x-s.x)/u,y:(o.y-s.y)/u}}var l=[];Zt(r.classes)?l=r.classes:Ue(r.classes)&&(l=r.classes.split(/\s+/));for(var c=0,d=l.length;c<d;c++){var f=l[c];!f||f===""||a.classes.add(f)}this.createEmitter(),(i===void 0||i)&&this.restore();var p=r.style||r.css;p&&(Vt("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(p))},qw=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(i,n,a){var o;Dt(i)&&!Vi(i)&&(o=i,i=o.roots||o.root,n=o.visit,a=o.directed),a=arguments.length===2&&!cr(n)?n:a,n=cr(n)?n:function(){};for(var s=this._private.cy,u=i=Ue(i)?this.filter(i):i,l=[],c=[],d={},f={},p={},h=0,g,v=this.byGroup(),m=v.nodes,y=v.edges,b=0;b<u.length;b++){var w=u[b],T=w.id();w.isNode()&&(l.unshift(w),e.bfs&&(p[T]=!0,c.push(w)),f[T]=0)}for(var x=function(){var A=e.bfs?l.shift():l.pop(),O=A.id();if(e.dfs){if(p[O])return 0;p[O]=!0,c.push(A)}var N=f[O],F=d[O],P=F!=null?F.source():null,z=F!=null?F.target():null,$=F==null?void 0:A.same(P)?z[0]:P[0],G;if(G=n(A,F,$,h++,N),G===!0)return g=A,1;if(G===!1)return 1;for(var V=A.connectedEdges().filter(function(me){return(!a||me.source().same(A))&&y.has(me)}),W=0;W<V.length;W++){var ue=V[W],he=ue.connectedNodes().filter(function(me){return!me.same(A)&&m.has(me)}),le=he.id();he.length!==0&&!p[le]&&(he=he[0],l.push(he),e.bfs&&(p[le]=!0,c.push(he)),d[le]=ue,f[le]=f[O]+1)}},_;l.length!==0&&(_=x(),!(_!==0&&_===1)););for(var D=s.collection(),E=0;E<c.length;E++){var M=c[E],k=d[M.id()];k!=null&&D.push(k),D.push(M)}return{path:s.collection(D),found:s.collection(g)}}},Bl={breadthFirstSearch:qw({bfs:!0}),depthFirstSearch:qw({dfs:!0})};Bl.bfs=Bl.breadthFirstSearch;Bl.dfs=Bl.depthFirstSearch;var rh={exports:{}},_N=rh.exports,Ww;function xN(){return Ww||(Ww=1,(function(t,e){(function(){var r,i,n,a,o,s,u,l,c,d,f,p,h,g,v;n=Math.floor,d=Math.min,i=function(m,y){return m<y?-1:m>y?1:0},c=function(m,y,b,w,T){var x;if(b==null&&(b=0),T==null&&(T=i),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=m.length);b<w;)x=n((b+w)/2),T(y,m[x])<0?w=x:b=x+1;return[].splice.apply(m,[b,b-b].concat(y)),y},s=function(m,y,b){return b==null&&(b=i),m.push(y),g(m,0,m.length-1,b)},o=function(m,y){var b,w;return y==null&&(y=i),b=m.pop(),m.length?(w=m[0],m[0]=b,v(m,0,y)):w=b,w},l=function(m,y,b){var w;return b==null&&(b=i),w=m[0],m[0]=y,v(m,0,b),w},u=function(m,y,b){var w;return b==null&&(b=i),m.length&&b(m[0],y)<0&&(w=[m[0],y],y=w[0],m[0]=w[1],v(m,0,b)),y},a=function(m,y){var b,w,T,x,_,D;for(y==null&&(y=i),x=function(){D=[];for(var E=0,M=n(m.length/2);0<=M?E<M:E>M;0<=M?E++:E--)D.push(E);return D}.apply(this).reverse(),_=[],w=0,T=x.length;w<T;w++)b=x[w],_.push(v(m,b,y));return _},h=function(m,y,b){var w;if(b==null&&(b=i),w=m.indexOf(y),w!==-1)return g(m,0,w,b),v(m,w,b)},f=function(m,y,b){var w,T,x,_,D;if(b==null&&(b=i),T=m.slice(0,y),!T.length)return T;for(a(T,b),D=m.slice(y),x=0,_=D.length;x<_;x++)w=D[x],u(T,w,b);return T.sort(b).reverse()},p=function(m,y,b){var w,T,x,_,D,E,M,k,I;if(b==null&&(b=i),y*10<=m.length){if(x=m.slice(0,y).sort(b),!x.length)return x;for(T=x[x.length-1],M=m.slice(y),_=0,E=M.length;_<E;_++)w=M[_],b(w,T)<0&&(c(x,w,0,null,b),x.pop(),T=x[x.length-1]);return x}for(a(m,b),I=[],D=0,k=d(y,m.length);0<=k?D<k:D>k;0<=k?++D:--D)I.push(o(m,b));return I},g=function(m,y,b,w){var T,x,_;for(w==null&&(w=i),T=m[b];b>y;){if(_=b-1>>1,x=m[_],w(T,x)<0){m[b]=x,b=_;continue}break}return m[b]=T},v=function(m,y,b){var w,T,x,_,D;for(b==null&&(b=i),T=m.length,D=y,x=m[y],w=2*y+1;w<T;)_=w+1,_<T&&!(b(m[w],m[_])<0)&&(w=_),m[y]=m[w],y=w,w=2*y+1;return m[y]=x,g(m,D,y,b)},r=(function(){m.push=s,m.pop=o,m.replace=l,m.pushpop=u,m.heapify=a,m.updateItem=h,m.nlargest=f,m.nsmallest=p;function m(y){this.cmp=y??i,this.nodes=[]}return m.prototype.push=function(y){return s(this.nodes,y,this.cmp)},m.prototype.pop=function(){return o(this.nodes,this.cmp)},m.prototype.peek=function(){return this.nodes[0]},m.prototype.contains=function(y){return this.nodes.indexOf(y)!==-1},m.prototype.replace=function(y){return l(this.nodes,y,this.cmp)},m.prototype.pushpop=function(y){return u(this.nodes,y,this.cmp)},m.prototype.heapify=function(){return a(this.nodes,this.cmp)},m.prototype.updateItem=function(y){return h(this.nodes,y,this.cmp)},m.prototype.clear=function(){return this.nodes=[]},m.prototype.empty=function(){return this.nodes.length===0},m.prototype.size=function(){return this.nodes.length},m.prototype.clone=function(){var y;return y=new m,y.nodes=this.nodes.slice(0),y},m.prototype.toArray=function(){return this.nodes.slice(0)},m.prototype.insert=m.prototype.push,m.prototype.top=m.prototype.peek,m.prototype.front=m.prototype.peek,m.prototype.has=m.prototype.contains,m.prototype.copy=m.prototype.clone,m})(),(function(m,y){return t.exports=y()})(this,function(){return r})}).call(_N)})(rh)),rh.exports}var Em,$w;function TN(){return $w||($w=1,Em=xN()),Em}var SN=TN(),Xl=Gl(SN),DN=Zr({root:null,weight:function(e){return 1},directed:!1}),EN={dijkstra:function(e){if(!Dt(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var i=DN(e),n=i.root,a=i.weight,o=i.directed,s=this,u=a,l=Ue(n)?this.filter(n)[0]:n[0],c={},d={},f={},p=this.byGroup(),h=p.nodes,g=p.edges;g.unmergeBy(function(N){return N.isLoop()});for(var v=function(F){return c[F.id()]},m=function(F,P){c[F.id()]=P,y.updateItem(F)},y=new Xl(function(N,F){return v(N)-v(F)}),b=0;b<h.length;b++){var w=h[b];c[w.id()]=w.same(l)?0:1/0,y.push(w)}for(var T=function(F,P){for(var z=(o?F.edgesTo(P):F.edgesWith(P)).intersect(g),$=1/0,G,V=0;V<z.length;V++){var W=z[V],ue=u(W);(ue<$||!G)&&($=ue,G=W)}return{edge:G,dist:$}};y.size()>0;){var x=y.pop(),_=v(x),D=x.id();if(f[D]=_,_!==1/0)for(var E=x.neighborhood().intersect(h),M=0;M<E.length;M++){var k=E[M],I=k.id(),A=T(x,k),O=_+A.dist;O<v(k)&&(m(k,O),d[I]={node:x,edge:A.edge})}}return{distanceTo:function(F){var P=Ue(F)?h.filter(F)[0]:F[0];return f[P.id()]},pathTo:function(F){var P=Ue(F)?h.filter(F)[0]:F[0],z=[],$=P,G=$.id();if(P.length>0)for(z.unshift(P);d[G];){var V=d[G];z.unshift(V.edge),z.unshift(V.node),$=V.node,G=$.id()}return s.spawn(z)}}}},kN={kruskal:function(e){e=e||function(b){return 1};for(var r=this.byGroup(),i=r.nodes,n=r.edges,a=i.length,o=new Array(a),s=i,u=function(w){for(var T=0;T<o.length;T++){var x=o[T];if(x.has(w))return T}},l=0;l<a;l++)o[l]=this.spawn(i[l]);for(var c=n.sort(function(b,w){return e(b)-e(w)}),d=0;d<c.length;d++){var f=c[d],p=f.source()[0],h=f.target()[0],g=u(p),v=u(h),m=o[g],y=o[v];g!==v&&(s.merge(f),m.merge(y),o.splice(v,1))}return s}},MN=Zr({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),IN={aStar:function(e){var r=this.cy(),i=MN(e),n=i.root,a=i.goal,o=i.heuristic,s=i.directed,u=i.weight;n=r.collection(n)[0],a=r.collection(a)[0];var l=n.id(),c=a.id(),d={},f={},p={},h=new Xl(function(G,V){return f[G.id()]-f[V.id()]}),g=new gu,v={},m={},y=function(V,W){h.push(V),g.add(W)},b,w,T=function(){b=h.pop(),w=b.id(),g.delete(w)},x=function(V){return g.has(V)};y(n,l),d[l]=0,f[l]=o(n);for(var _=0;h.size()>0;){if(T(),_++,w===c){for(var D=[],E=a,M=c,k=m[M];D.unshift(E),k!=null&&D.unshift(k),E=v[M],E!=null;)M=E.id(),k=m[M];return{found:!0,distance:d[w],path:this.spawn(D),steps:_}}p[w]=!0;for(var I=b._private.edges,A=0;A<I.length;A++){var O=I[A];if(this.hasElementWithId(O.id())&&!(s&&O.data("source")!==w)){var N=O.source(),F=O.target(),P=N.id()!==w?N:F,z=P.id();if(this.hasElementWithId(z)&&!p[z]){var $=d[w]+u(O);if(!x(z)){d[z]=$,f[z]=$+o(P),y(P,z),v[z]=b,m[z]=O;continue}$<d[z]&&(d[z]=$,f[z]=$+o(P),v[z]=b,m[z]=O)}}}}return{found:!1,distance:void 0,path:void 0,steps:_}}},AN=Zr({weight:function(e){return 1},directed:!1}),ON={floydWarshall:function(e){for(var r=this.cy(),i=AN(e),n=i.weight,a=i.directed,o=n,s=this.byGroup(),u=s.nodes,l=s.edges,c=u.length,d=c*c,f=function(ue){return u.indexOf(ue)},p=function(ue){return u[ue]},h=new Array(d),g=0;g<d;g++){var v=g%c,m=(g-v)/c;m===v?h[g]=0:h[g]=1/0}for(var y=new Array(d),b=new Array(d),w=0;w<l.length;w++){var T=l[w],x=T.source()[0],_=T.target()[0];if(x!==_){var D=f(x),E=f(_),M=D*c+E,k=o(T);if(h[M]>k&&(h[M]=k,y[M]=E,b[M]=T),!a){var I=E*c+D;!a&&h[I]>k&&(h[I]=k,y[I]=D,b[I]=T)}}}for(var A=0;A<c;A++)for(var O=0;O<c;O++)for(var N=O*c+A,F=0;F<c;F++){var P=O*c+F,z=A*c+F;h[N]+h[z]<h[P]&&(h[P]=h[N]+h[z],y[P]=y[N])}var $=function(ue){return(Ue(ue)?r.filter(ue):ue)[0]},G=function(ue){return f($(ue))},V={distance:function(ue,he){var le=G(ue),me=G(he);return h[le*c+me]},path:function(ue,he){var le=G(ue),me=G(he),be=p(le);if(le===me)return be.collection();if(y[le*c+me]==null)return r.collection();var Se=r.collection(),se=le,q;for(Se.merge(be);le!==me;)se=le,le=y[le*c+me],q=b[se*c+le],Se.merge(q),Se.merge(p(le));return Se}};return V}},RN=Zr({weight:function(e){return 1},directed:!1,root:null}),PN={bellmanFord:function(e){var r=this,i=RN(e),n=i.weight,a=i.directed,o=i.root,s=n,u=this,l=this.cy(),c=this.byGroup(),d=c.edges,f=c.nodes,p=f.length,h=new ha,g=!1,v=[];o=l.collection(o)[0],d.unmergeBy(function(Je){return Je.isLoop()});for(var m=d.length,y=function(Ge){var qe=h.get(Ge.id());return qe||(qe={},h.set(Ge.id(),qe)),qe},b=function(Ge){return(Ue(Ge)?l.$(Ge):Ge)[0]},w=function(Ge){return y(b(Ge)).dist},T=function(Ge){for(var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o,Ee=b(Ge),He=[],ze=Ee;;){if(ze==null)return r.spawn();var et=y(ze),Ye=et.edge,ct=et.pred;if(He.unshift(ze[0]),ze.same(qe)&&He.length>0)break;Ye!=null&&He.unshift(Ye),ze=ct}return u.spawn(He)},x=0;x<p;x++){var _=f[x],D=y(_);_.same(o)?D.dist=0:D.dist=1/0,D.pred=null,D.edge=null}for(var E=!1,M=function(Ge,qe,Ee,He,ze,et){var Ye=He.dist+et;Ye<ze.dist&&!Ee.same(He.edge)&&(ze.dist=Ye,ze.pred=Ge,ze.edge=Ee,E=!0)},k=1;k<p;k++){E=!1;for(var I=0;I<m;I++){var A=d[I],O=A.source(),N=A.target(),F=s(A),P=y(O),z=y(N);M(O,N,A,P,z,F),a||M(N,O,A,z,P,F)}if(!E)break}if(E)for(var $=[],G=0;G<m;G++){var V=d[G],W=V.source(),ue=V.target(),he=s(V),le=y(W).dist,me=y(ue).dist;if(le+he<me||!a&&me+he<le)if(g||(Vt("Graph contains a negative weight cycle for Bellman-Ford"),g=!0),e.findNegativeWeightCycles!==!1){var be=[];le+he<me&&be.push(W),!a&&me+he<le&&be.push(ue);for(var Se=be.length,se=0;se<Se;se++){var q=be[se],X=[q];X.push(y(q).edge);for(var J=y(q).pred;X.indexOf(J)===-1;)X.push(J),X.push(y(J).edge),J=y(J).pred;X=X.slice(X.indexOf(J));for(var ne=X[0].id(),we=0,Re=2;Re<X.length;Re+=2)X[Re].id()<ne&&(ne=X[Re].id(),we=Re);X=X.slice(we).concat(X.slice(0,we)),X.push(X[0]);var vt=X.map(function(Je){return Je.id()}).join(",");$.indexOf(vt)===-1&&(v.push(u.spawn(X)),$.push(vt))}}else break}return{distanceTo:w,pathTo:T,hasNegativeWeightCycle:g,negativeWeightCycles:v}}},NN=Math.sqrt(2),FN=function(e,r,i){i.length===0&&ar("Karger-Stein must be run on a connected (sub)graph");for(var n=i[e],a=n[1],o=n[2],s=r[a],u=r[o],l=i,c=l.length-1;c>=0;c--){var d=l[c],f=d[1],p=d[2];(r[f]===s&&r[p]===u||r[f]===u&&r[p]===s)&&l.splice(c,1)}for(var h=0;h<l.length;h++){var g=l[h];g[1]===u?(l[h]=g.slice(),l[h][1]=s):g[2]===u&&(l[h]=g.slice(),l[h][2]=s)}for(var v=0;v<r.length;v++)r[v]===u&&(r[v]=s);return l},km=function(e,r,i,n){for(;i>n;){var a=Math.floor(Math.random()*r.length);r=FN(a,e,r),i--}return r},BN={kargerStein:function(){var e=this,r=this.byGroup(),i=r.nodes,n=r.edges;n.unmergeBy(function(z){return z.isLoop()});var a=i.length,o=n.length,s=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),u=Math.floor(a/NN);if(a<2){ar("At least 2 nodes are required for Karger-Stein algorithm");return}for(var l=[],c=0;c<o;c++){var d=n[c];l.push([c,i.indexOf(d.source()),i.indexOf(d.target())])}for(var f=1/0,p=[],h=new Array(a),g=new Array(a),v=new Array(a),m=function($,G){for(var V=0;V<a;V++)G[V]=$[V]},y=0;y<=s;y++){for(var b=0;b<a;b++)g[b]=b;var w=km(g,l.slice(),a,u),T=w.slice();m(g,v);var x=km(g,w,u,2),_=km(v,T,u,2);x.length<=_.length&&x.length<f?(f=x.length,p=x,m(g,h)):_.length<=x.length&&_.length<f&&(f=_.length,p=_,m(v,h))}for(var D=this.spawn(p.map(function(z){return n[z[0]]})),E=this.spawn(),M=this.spawn(),k=h[0],I=0;I<h.length;I++){var A=h[I],O=i[I];A===k?E.merge(O):M.merge(O)}var N=function($){var G=e.spawn();return $.forEach(function(V){G.merge(V),V.connectedEdges().forEach(function(W){e.contains(W)&&!D.contains(W)&&G.merge(W)})}),G},F=[N(E),N(M)],P={cut:D,components:F,partition1:E,partition2:M};return P}},Mm,LN=function(e){return{x:e.x,y:e.y}},Ih=function(e,r,i){return{x:e.x*r+i.x,y:e.y*r+i.y}},yT=function(e,r,i){return{x:(e.x-i.x)/r,y:(e.y-i.y)/r}},au=function(e){return{x:e[0],y:e[1]}},zN=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,a=r;a<i;a++){var o=e[a];isFinite(o)&&(n=Math.min(o,n))}return n},VN=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,a=r;a<i;a++){var o=e[a];isFinite(o)&&(n=Math.max(o,n))}return n},HN=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,a=0,o=r;o<i;o++){var s=e[o];isFinite(s)&&(n+=s,a++)}return n/a},UN=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,i):(i<e.length&&e.splice(i,e.length-i),r>0&&e.splice(0,r));for(var s=0,u=e.length-1;u>=0;u--){var l=e[u];o?isFinite(l)||(e[u]=-1/0,s++):e.splice(u,1)}a&&e.sort(function(f,p){return f-p});var c=e.length,d=Math.floor(c/2);return c%2!==0?e[d+1+s]:(e[d-1+s]+e[d+s])/2},jN=function(e){return Math.PI*e/180},Wf=function(e,r){return Math.atan2(r,e)-Math.PI/2},v0=Math.log2||function(t){return Math.log(t)/Math.log(2)},m0=function(e){return e>0?1:e<0?-1:0},jo=function(e,r){return Math.sqrt(Bo(e,r))},Bo=function(e,r){var i=r.x-e.x,n=r.y-e.y;return i*i+n*n},qN=function(e){for(var r=e.length,i=0,n=0;n<r;n++)i+=e[n];for(var a=0;a<r;a++)e[a]=e[a]/i;return e},zr=function(e,r,i,n){return(1-n)*(1-n)*e+2*(1-n)*n*r+n*n*i},uu=function(e,r,i,n){return{x:zr(e.x,r.x,i.x,n),y:zr(e.y,r.y,i.y,n)}},WN=function(e,r,i,n){var a={x:r.x-e.x,y:r.y-e.y},o=jo(e,r),s={x:a.x/o,y:a.y/o};return i=i??0,n=n??i*o,{x:e.x+s.x*n,y:e.y+s.y*n}},Ll=function(e,r,i){return Math.max(e,Math.min(i,r))},fi=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},$N=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},GN=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},YN=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},bT=function(e,r,i){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,i),e.y2=Math.max(e.y2,i),e.h=e.y2-e.y1},ih=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},nh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],i,n,a,o;if(r.length===1)i=n=a=o=r[0];else if(r.length===2)i=a=r[0],o=n=r[1];else if(r.length===4){var s=Sr(r,4);i=s[0],n=s[1],a=s[2],o=s[3]}return e.x1-=o,e.x2+=n,e.y1-=i,e.y2+=a,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Gw=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},g0=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},Wa=function(e,r,i){return e.x1<=r&&r<=e.x2&&e.y1<=i&&i<=e.y2},Yw=function(e,r){return Wa(e,r.x,r.y)},CT=function(e,r){return Wa(e,r.x1,r.y1)&&Wa(e,r.x2,r.y2)},KN=(Mm=Math.hypot)!==null&&Mm!==void 0?Mm:function(t,e){return Math.sqrt(t*t+e*e)};function ZN(t,e){if(t.length<3)throw new Error("Need at least 3 vertices");var r=function(D,E){return{x:D.x+E.x,y:D.y+E.y}},i=function(D,E){return{x:D.x-E.x,y:D.y-E.y}},n=function(D,E){return{x:D.x*E,y:D.y*E}},a=function(D,E){return D.x*E.y-D.y*E.x},o=function(D){var E=KN(D.x,D.y);return E===0?{x:0,y:0}:{x:D.x/E,y:D.y/E}},s=function(D){for(var E=0,M=0;M<D.length;M++){var k=D[M],I=D[(M+1)%D.length];E+=k.x*I.y-I.x*k.y}return E/2},u=function(D,E,M,k){var I=i(E,D),A=i(k,M),O=a(I,A);if(Math.abs(O)<1e-9)return r(D,n(I,.5));var N=a(i(M,D),A)/O;return r(D,n(I,N))},l=t.map(function(_){return{x:_.x,y:_.y}});s(l)<0&&l.reverse();for(var c=l.length,d=[],f=0;f<c;f++){var p=l[f],h=l[(f+1)%c],g=i(h,p),v=o({x:g.y,y:-g.x});d.push(v)}for(var m=d.map(function(_,D){var E=r(l[D],n(_,e)),M=r(l[(D+1)%c],n(_,e));return{p1:E,p2:M}}),y=[],b=0;b<c;b++){var w=m[(b-1+c)%c],T=m[b],x=u(w.p1,w.p2,T.p1,T.p2);y.push(x)}return y}function XN(t,e,r,i,n,a){var o=oF(t,e,r,i,n),s=ZN(o,a),u=fi();return s.forEach(function(l){return bT(u,l.x,l.y)}),u}var wT=function(e,r,i,n,a,o,s){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",l=u==="auto"?Xa(a,o):u,c=a/2,d=o/2;l=Math.min(l,c,d);var f=l!==c,p=l!==d,h;if(f){var g=i-c+l-s,v=n-d-s,m=i+c-l+s,y=v;if(h=$a(e,r,i,n,g,v,m,y,!1),h.length>0)return h}if(p){var b=i+c+s,w=n-d+l-s,T=b,x=n+d-l+s;if(h=$a(e,r,i,n,b,w,T,x,!1),h.length>0)return h}if(f){var _=i-c+l-s,D=n+d+s,E=i+c-l+s,M=D;if(h=$a(e,r,i,n,_,D,E,M,!1),h.length>0)return h}if(p){var k=i-c-s,I=n-d+l-s,A=k,O=n+d-l+s;if(h=$a(e,r,i,n,k,I,A,O,!1),h.length>0)return h}var N;{var F=i-c+l,P=n-d+l;if(N=Ml(e,r,i,n,F,P,l+s),N.length>0&&N[0]<=F&&N[1]<=P)return[N[0],N[1]]}{var z=i+c-l,$=n-d+l;if(N=Ml(e,r,i,n,z,$,l+s),N.length>0&&N[0]>=z&&N[1]<=$)return[N[0],N[1]]}{var G=i+c-l,V=n+d-l;if(N=Ml(e,r,i,n,G,V,l+s),N.length>0&&N[0]>=G&&N[1]>=V)return[N[0],N[1]]}{var W=i-c+l,ue=n+d-l;if(N=Ml(e,r,i,n,W,ue,l+s),N.length>0&&N[0]<=W&&N[1]>=ue)return[N[0],N[1]]}return[]},QN=function(e,r,i,n,a,o,s){var u=s,l=Math.min(i,a),c=Math.max(i,a),d=Math.min(n,o),f=Math.max(n,o);return l-u<=e&&e<=c+u&&d-u<=r&&r<=f+u},JN=function(e,r,i,n,a,o,s,u,l){var c={x1:Math.min(i,s,a)-l,x2:Math.max(i,s,a)+l,y1:Math.min(n,u,o)-l,y2:Math.max(n,u,o)+l};return!(e<c.x1||e>c.x2||r<c.y1||r>c.y2)},eF=function(e,r,i,n){i-=n;var a=r*r-4*e*i;if(a<0)return[];var o=Math.sqrt(a),s=2*e,u=(-r+o)/s,l=(-r-o)/s;return[u,l]},tF=function(e,r,i,n,a){var o=1e-5;e===0&&(e=o),r/=e,i/=e,n/=e;var s,u,l,c,d,f,p,h;if(u=(3*i-r*r)/9,l=-(27*n)+r*(9*i-2*(r*r)),l/=54,s=u*u*u+l*l,a[1]=0,p=r/3,s>0){d=l+Math.sqrt(s),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),f=l-Math.sqrt(s),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),a[0]=-p+d+f,p+=(d+f)/2,a[4]=a[2]=-p,p=Math.sqrt(3)*(-f+d)/2,a[3]=p,a[5]=-p;return}if(a[5]=a[3]=0,s===0){h=l<0?-Math.pow(-l,1/3):Math.pow(l,1/3),a[0]=-p+2*h,a[4]=a[2]=-(h+p);return}u=-u,c=u*u*u,c=Math.acos(l/Math.sqrt(c)),h=2*Math.sqrt(u),a[0]=-p+h*Math.cos(c/3),a[2]=-p+h*Math.cos((c+2*Math.PI)/3),a[4]=-p+h*Math.cos((c+4*Math.PI)/3)},rF=function(e,r,i,n,a,o,s,u){var l=1*i*i-4*i*a+2*i*s+4*a*a-4*a*s+s*s+n*n-4*n*o+2*n*u+4*o*o-4*o*u+u*u,c=9*i*a-3*i*i-3*i*s-6*a*a+3*a*s+9*n*o-3*n*n-3*n*u-6*o*o+3*o*u,d=3*i*i-6*i*a+i*s-i*e+2*a*a+2*a*e-s*e+3*n*n-6*n*o+n*u-n*r+2*o*o+2*o*r-u*r,f=1*i*a-i*i+i*e-a*e+n*o-n*n+n*r-o*r,p=[];tF(l,c,d,f,p);for(var h=1e-7,g=[],v=0;v<6;v+=2)Math.abs(p[v+1])<h&&p[v]>=0&&p[v]<=1&&g.push(p[v]);g.push(1),g.push(0);for(var m=-1,y,b,w,T=0;T<g.length;T++)y=Math.pow(1-g[T],2)*i+2*(1-g[T])*g[T]*a+g[T]*g[T]*s,b=Math.pow(1-g[T],2)*n+2*(1-g[T])*g[T]*o+g[T]*g[T]*u,w=Math.pow(y-e,2)+Math.pow(b-r,2),m>=0?w<m&&(m=w):m=w;return m},iF=function(e,r,i,n,a,o){var s=[e-i,r-n],u=[a-i,o-n],l=u[0]*u[0]+u[1]*u[1],c=s[0]*s[0]+s[1]*s[1],d=s[0]*u[0]+s[1]*u[1],f=d*d/l;return d<0?c:f>l?(e-a)*(e-a)+(r-o)*(r-o):c-f},Ei=function(e,r,i){for(var n,a,o,s,u,l=0,c=0;c<i.length/2;c++)if(n=i[c*2],a=i[c*2+1],c+1<i.length/2?(o=i[(c+1)*2],s=i[(c+1)*2+1]):(o=i[(c+1-i.length/2)*2],s=i[(c+1-i.length/2)*2+1]),!(n==e&&o==e))if(n>=e&&e>=o||n<=e&&e<=o)u=(e-n)/(o-n)*(s-a)+a,u>r&&l++;else continue;return l%2!==0},va=function(e,r,i,n,a,o,s,u,l){var c=new Array(i.length),d;u[0]!=null?(d=Math.atan(u[1]/u[0]),u[0]<0?d=d+Math.PI/2:d=-d-Math.PI/2):d=u;for(var f=Math.cos(-d),p=Math.sin(-d),h=0;h<c.length/2;h++)c[h*2]=o/2*(i[h*2]*f-i[h*2+1]*p),c[h*2+1]=s/2*(i[h*2+1]*f+i[h*2]*p),c[h*2]+=n,c[h*2+1]+=a;var g;if(l>0){var v=yh(c,-l);g=gh(v)}else g=c;return Ei(e,r,g)},nF=function(e,r,i,n,a,o,s,u){for(var l=new Array(i.length*2),c=0;c<u.length;c++){var d=u[c];l[c*4+0]=d.startX,l[c*4+1]=d.startY,l[c*4+2]=d.stopX,l[c*4+3]=d.stopY;var f=Math.pow(d.cx-e,2)+Math.pow(d.cy-r,2);if(f<=Math.pow(d.radius,2))return!0}return Ei(e,r,l)},gh=function(e){for(var r=new Array(e.length/2),i,n,a,o,s,u,l,c,d=0;d<e.length/4;d++){i=e[d*4],n=e[d*4+1],a=e[d*4+2],o=e[d*4+3],d<e.length/4-1?(s=e[(d+1)*4],u=e[(d+1)*4+1],l=e[(d+1)*4+2],c=e[(d+1)*4+3]):(s=e[0],u=e[1],l=e[2],c=e[3]);var f=$a(i,n,a,o,s,u,l,c,!0);r[d*2]=f[0],r[d*2+1]=f[1]}return r},yh=function(e,r){for(var i=new Array(e.length*2),n,a,o,s,u=0;u<e.length/2;u++){n=e[u*2],a=e[u*2+1],u<e.length/2-1?(o=e[(u+1)*2],s=e[(u+1)*2+1]):(o=e[0],s=e[1]);var l=s-a,c=-(o-n),d=Math.sqrt(l*l+c*c),f=l/d,p=c/d;i[u*4]=n+f*r,i[u*4+1]=a+p*r,i[u*4+2]=o+f*r,i[u*4+3]=s+p*r}return i},aF=function(e,r,i,n,a,o){var s=i-e,u=n-r;s/=a,u/=o;var l=Math.sqrt(s*s+u*u),c=l-1;if(c<0)return[];var d=c/l;return[(i-e)*d+e,(n-r)*d+r]},Ho=function(e,r,i,n,a,o,s){return e-=a,r-=o,e/=i/2+s,r/=n/2+s,e*e+r*r<=1},Ml=function(e,r,i,n,a,o,s){var u=[i-e,n-r],l=[e-a,r-o],c=u[0]*u[0]+u[1]*u[1],d=2*(l[0]*u[0]+l[1]*u[1]),f=l[0]*l[0]+l[1]*l[1]-s*s,p=d*d-4*c*f;if(p<0)return[];var h=(-d+Math.sqrt(p))/(2*c),g=(-d-Math.sqrt(p))/(2*c),v=Math.min(h,g),m=Math.max(h,g),y=[];if(v>=0&&v<=1&&y.push(v),m>=0&&m<=1&&y.push(m),y.length===0)return[];var b=y[0]*u[0]+e,w=y[0]*u[1]+r;if(y.length>1){if(y[0]==y[1])return[b,w];var T=y[1]*u[0]+e,x=y[1]*u[1]+r;return[b,w,T,x]}else return[b,w]},Im=function(e,r,i){return r<=e&&e<=i||i<=e&&e<=r?e:e<=r&&r<=i||i<=r&&r<=e?r:i},$a=function(e,r,i,n,a,o,s,u,l){var c=e-a,d=i-e,f=s-a,p=r-o,h=n-r,g=u-o,v=f*p-g*c,m=d*p-h*c,y=g*d-f*h;if(y!==0){var b=v/y,w=m/y,T=.001,x=0-T,_=1+T;return x<=b&&b<=_&&x<=w&&w<=_?[e+b*d,r+b*h]:l?[e+b*d,r+b*h]:[]}else return v===0||m===0?Im(e,i,s)===s?[s,u]:Im(e,i,a)===a?[a,o]:Im(a,s,i)===i?[i,n]:[]:[]},oF=function(e,r,i,n,a){var o=[],s=n/2,u=a/2,l=r,c=i;o.push({x:l+s*e[0],y:c+u*e[1]});for(var d=1;d<e.length/2;d++)o.push({x:l+s*e[d*2],y:c+u*e[d*2+1]});return o},zl=function(e,r,i,n,a,o,s,u){var l=[],c,d=new Array(i.length),f=!0;o==null&&(f=!1);var p;if(f){for(var h=0;h<d.length/2;h++)d[h*2]=i[h*2]*o+n,d[h*2+1]=i[h*2+1]*s+a;if(u>0){var g=yh(d,-u);p=gh(g)}else p=d}else p=i;for(var v,m,y,b,w=0;w<p.length/2;w++)v=p[w*2],m=p[w*2+1],w<p.length/2-1?(y=p[(w+1)*2],b=p[(w+1)*2+1]):(y=p[0],b=p[1]),c=$a(e,r,n,a,v,m,y,b),c.length!==0&&l.push(c[0],c[1]);return l},sF=function(e,r,i,n,a,o,s,u,l){var c=[],d,f=new Array(i.length*2);l.forEach(function(y,b){b===0?(f[f.length-2]=y.startX,f[f.length-1]=y.startY):(f[b*4-2]=y.startX,f[b*4-1]=y.startY),f[b*4]=y.stopX,f[b*4+1]=y.stopY,d=Ml(e,r,n,a,y.cx,y.cy,y.radius),d.length!==0&&c.push(d[0],d[1])});for(var p=0;p<f.length/4;p++)d=$a(e,r,n,a,f[p*4],f[p*4+1],f[p*4+2],f[p*4+3],!1),d.length!==0&&c.push(d[0],d[1]);if(c.length>2){for(var h=[c[0],c[1]],g=Math.pow(h[0]-e,2)+Math.pow(h[1]-r,2),v=1;v<c.length/2;v++){var m=Math.pow(c[v*2]-e,2)+Math.pow(c[v*2+1]-r,2);m<=g&&(h[0]=c[v*2],h[1]=c[v*2+1],g=m)}return h}return c},$f=function(e,r,i){var n=[e[0]-r[0],e[1]-r[1]],a=Math.sqrt(n[0]*n[0]+n[1]*n[1]),o=(a-i)/a;return o<0&&(o=1e-5),[r[0]+o*n[0],r[1]+o*n[1]]},ci=function(e,r){var i=jg(e,r);return i=_T(i),i},_T=function(e){for(var r,i,n=e.length/2,a=1/0,o=1/0,s=-1/0,u=-1/0,l=0;l<n;l++)r=e[2*l],i=e[2*l+1],a=Math.min(a,r),s=Math.max(s,r),o=Math.min(o,i),u=Math.max(u,i);for(var c=2/(s-a),d=2/(u-o),f=0;f<n;f++)r=e[2*f]=e[2*f]*c,i=e[2*f+1]=e[2*f+1]*d,a=Math.min(a,r),s=Math.max(s,r),o=Math.min(o,i),u=Math.max(u,i);if(o<-1)for(var p=0;p<n;p++)i=e[2*p+1]=e[2*p+1]+(-1-o);return e},jg=function(e,r){var i=1/e*2*Math.PI,n=e%2===0?Math.PI/2+i/2:Math.PI/2;n+=r;for(var a=new Array(e*2),o,s=0;s<e;s++)o=s*i+n,a[2*s]=Math.cos(o),a[2*s+1]=Math.sin(-o);return a},Xa=function(e,r){return Math.min(e/4,r/4,8)},xT=function(e,r){return Math.min(e/10,r/10,8)},y0=function(){return 8},uF=function(e,r,i){return[e-2*r+i,2*(r-e),e]},qg=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}};function Am(t,e){function r(d){for(var f=[],p=0;p<d.length;p++){var h=d[p],g=d[(p+1)%d.length],v={x:g.x-h.x,y:g.y-h.y},m={x:-v.y,y:v.x},y=Math.sqrt(m.x*m.x+m.y*m.y);f.push({x:m.x/y,y:m.y/y})}return f}function i(d,f){var p=1/0,h=-1/0,g=ki(d),v;try{for(g.s();!(v=g.n()).done;){var m=v.value,y=m.x*f.x+m.y*f.y;p=Math.min(p,y),h=Math.max(h,y)}}catch(b){g.e(b)}finally{g.f()}return{min:p,max:h}}function n(d,f){return!(d.max<f.min||f.max<d.min)}var a=[].concat(hh(r(t)),hh(r(e))),o=ki(a),s;try{for(o.s();!(s=o.n()).done;){var u=s.value,l=i(t,u),c=i(e,u);if(!n(l,c))return!1}}catch(d){o.e(d)}finally{o.f()}return!0}var lF=Zr({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),cF={pageRank:function(e){for(var r=lF(e),i=r.dampingFactor,n=r.precision,a=r.iterations,o=r.weight,s=this._private.cy,u=this.byGroup(),l=u.nodes,c=u.edges,d=l.length,f=d*d,p=c.length,h=new Array(f),g=new Array(d),v=(1-i)/d,m=0;m<d;m++){for(var y=0;y<d;y++){var b=m*d+y;h[b]=0}g[m]=0}for(var w=0;w<p;w++){var T=c[w],x=T.data("source"),_=T.data("target");if(x!==_){var D=l.indexOfId(x),E=l.indexOfId(_),M=o(T),k=E*d+D;h[k]+=M,g[D]+=M}}for(var I=1/d+v,A=0;A<d;A++)if(g[A]===0)for(var O=0;O<d;O++){var N=O*d+A;h[N]=I}else for(var F=0;F<d;F++){var P=F*d+A;h[P]=h[P]/g[A]+v}for(var z=new Array(d),$=new Array(d),G,V=0;V<d;V++)z[V]=1;for(var W=0;W<a;W++){for(var ue=0;ue<d;ue++)$[ue]=0;for(var he=0;he<d;he++)for(var le=0;le<d;le++){var me=he*d+le;$[he]+=h[me]*z[le]}qN($),G=z,z=$,$=G;for(var be=0,Se=0;Se<d;Se++){var se=G[Se]-z[Se];be+=se*se}if(be<n)break}var q={rank:function(J){return J=s.collection(J)[0],z[l.indexOf(J)]}};return q}},Kw=Zr({root:null,weight:function(e){return 1},directed:!1,alpha:0}),lu={degreeCentralityNormalized:function(e){e=Kw(e);var r=this.cy(),i=this.nodes(),n=i.length;if(e.directed){for(var c={},d={},f=0,p=0,h=0;h<n;h++){var g=i[h],v=g.id();e.root=g;var m=this.degreeCentrality(e);f<m.indegree&&(f=m.indegree),p<m.outdegree&&(p=m.outdegree),c[v]=m.indegree,d[v]=m.outdegree}return{indegree:function(b){return f==0?0:(Ue(b)&&(b=r.filter(b)),c[b.id()]/f)},outdegree:function(b){return p===0?0:(Ue(b)&&(b=r.filter(b)),d[b.id()]/p)}}}else{for(var a={},o=0,s=0;s<n;s++){var u=i[s];e.root=u;var l=this.degreeCentrality(e);o<l.degree&&(o=l.degree),a[u.id()]=l.degree}return{degree:function(b){return o===0?0:(Ue(b)&&(b=r.filter(b)),a[b.id()]/o)}}}},degreeCentrality:function(e){e=Kw(e);var r=this.cy(),i=this,n=e,a=n.root,o=n.weight,s=n.directed,u=n.alpha;if(a=r.collection(a)[0],s){for(var p=a.connectedEdges(),h=p.filter(function(x){return x.target().same(a)&&i.has(x)}),g=p.filter(function(x){return x.source().same(a)&&i.has(x)}),v=h.length,m=g.length,y=0,b=0,w=0;w<h.length;w++)y+=o(h[w]);for(var T=0;T<g.length;T++)b+=o(g[T]);return{indegree:Math.pow(v,1-u)*Math.pow(y,u),outdegree:Math.pow(m,1-u)*Math.pow(b,u)}}else{for(var l=a.connectedEdges().intersection(i),c=l.length,d=0,f=0;f<l.length;f++)d+=o(l[f]);return{degree:Math.pow(c,1-u)*Math.pow(d,u)}}}};lu.dc=lu.degreeCentrality;lu.dcn=lu.degreeCentralityNormalised=lu.degreeCentralityNormalized;var Zw=Zr({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),cu={closenessCentralityNormalized:function(e){for(var r=Zw(e),i=r.harmonic,n=r.weight,a=r.directed,o=this.cy(),s={},u=0,l=this.nodes(),c=this.floydWarshall({weight:n,directed:a}),d=0;d<l.length;d++){for(var f=0,p=l[d],h=0;h<l.length;h++)if(d!==h){var g=c.distance(p,l[h]);i?f+=1/g:f+=g}i||(f=1/f),u<f&&(u=f),s[p.id()]=f}return{closeness:function(m){return u==0?0:(Ue(m)?m=o.filter(m)[0].id():m=m.id(),s[m]/u)}}},closenessCentrality:function(e){var r=Zw(e),i=r.root,n=r.weight,a=r.directed,o=r.harmonic;i=this.filter(i)[0];for(var s=this.dijkstra({root:i,weight:n,directed:a}),u=0,l=this.nodes(),c=0;c<l.length;c++){var d=l[c];if(!d.same(i)){var f=s.distanceTo(d);o?u+=1/f:u+=f}}return o?u:1/u}};cu.cc=cu.closenessCentrality;cu.ccn=cu.closenessCentralityNormalised=cu.closenessCentralityNormalized;var dF=Zr({weight:null,directed:!1}),Wg={betweennessCentrality:function(e){for(var r=dF(e),i=r.directed,n=r.weight,a=n!=null,o=this.cy(),s=this.nodes(),u={},l={},c=0,d={set:function(b,w){l[b]=w,w>c&&(c=w)},get:function(b){return l[b]}},f=0;f<s.length;f++){var p=s[f],h=p.id();i?u[h]=p.outgoers().nodes():u[h]=p.openNeighborhood().nodes(),d.set(h,0)}for(var g=function(){for(var b=s[v].id(),w=[],T={},x={},_={},D=new Xl(function(he,le){return _[he]-_[le]}),E=0;E<s.length;E++){var M=s[E].id();T[M]=[],x[M]=0,_[M]=1/0}for(x[b]=1,_[b]=0,D.push(b);!D.empty();){var k=D.pop();if(w.push(k),a)for(var I=0;I<u[k].length;I++){var A=u[k][I],O=o.getElementById(k),N=void 0;O.edgesTo(A).length>0?N=O.edgesTo(A)[0]:N=A.edgesTo(O)[0];var F=n(N);A=A.id(),_[A]>_[k]+F&&(_[A]=_[k]+F,D.nodes.indexOf(A)<0?D.push(A):D.updateItem(A),x[A]=0,T[A]=[]),_[A]==_[k]+F&&(x[A]=x[A]+x[k],T[A].push(k))}else for(var P=0;P<u[k].length;P++){var z=u[k][P].id();_[z]==1/0&&(D.push(z),_[z]=_[k]+1),_[z]==_[k]+1&&(x[z]=x[z]+x[k],T[z].push(k))}}for(var $={},G=0;G<s.length;G++)$[s[G].id()]=0;for(;w.length>0;){for(var V=w.pop(),W=0;W<T[V].length;W++){var ue=T[V][W];$[ue]=$[ue]+x[ue]/x[V]*(1+$[V])}V!=s[v].id()&&d.set(V,d.get(V)+$[V])}},v=0;v<s.length;v++)g();var m={betweenness:function(b){var w=o.collection(b).id();return d.get(w)},betweennessNormalized:function(b){if(c==0)return 0;var w=o.collection(b).id();return d.get(w)/c}};return m.betweennessNormalised=m.betweennessNormalized,m}};Wg.bc=Wg.betweennessCentrality;var fF=Zr({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),hF=function(e){return fF(e)},pF=function(e,r){for(var i=0,n=0;n<r.length;n++)i+=r[n](e);return i},vF=function(e,r,i){for(var n=0;n<r;n++)e[n*r+n]=i},TT=function(e,r){for(var i,n=0;n<r;n++){i=0;for(var a=0;a<r;a++)i+=e[a*r+n];for(var o=0;o<r;o++)e[o*r+n]=e[o*r+n]/i}},mF=function(e,r,i){for(var n=new Array(i*i),a=0;a<i;a++){for(var o=0;o<i;o++)n[a*i+o]=0;for(var s=0;s<i;s++)for(var u=0;u<i;u++)n[a*i+u]+=e[a*i+s]*r[s*i+u]}return n},gF=function(e,r,i){for(var n=e.slice(0),a=1;a<i;a++)e=mF(e,n,r);return e},yF=function(e,r,i){for(var n=new Array(r*r),a=0;a<r*r;a++)n[a]=Math.pow(e[a],i);return TT(n,r),n},bF=function(e,r,i,n){for(var a=0;a<i;a++){var o=Math.round(e[a]*Math.pow(10,n))/Math.pow(10,n),s=Math.round(r[a]*Math.pow(10,n))/Math.pow(10,n);if(o!==s)return!1}return!0},CF=function(e,r,i,n){for(var a=[],o=0;o<r;o++){for(var s=[],u=0;u<r;u++)Math.round(e[o*r+u]*1e3)/1e3>0&&s.push(i[u]);s.length!==0&&a.push(n.collection(s))}return a},wF=function(e,r){for(var i=0;i<e.length;i++)if(!r[i]||e[i].id()!==r[i].id())return!1;return!0},_F=function(e){for(var r=0;r<e.length;r++)for(var i=0;i<e.length;i++)r!=i&&wF(e[r],e[i])&&e.splice(i,1);return e},Xw=function(e){for(var r=this.nodes(),i=this.edges(),n=this.cy(),a=hF(e),o={},s=0;s<r.length;s++)o[r[s].id()]=s;for(var u=r.length,l=u*u,c=new Array(l),d,f=0;f<l;f++)c[f]=0;for(var p=0;p<i.length;p++){var h=i[p],g=o[h.source().id()],v=o[h.target().id()],m=pF(h,a.attributes);c[g*u+v]+=m,c[v*u+g]+=m}vF(c,u,a.multFactor),TT(c,u);for(var y=!0,b=0;y&&b<a.maxIterations;)y=!1,d=gF(c,u,a.expandFactor),c=yF(d,u,a.inflateFactor),bF(c,d,l,4)||(y=!0),b++;var w=CF(c,u,r,n);return w=_F(w),w},xF={markovClustering:Xw,mcl:Xw},TF=function(e){return e},ST=function(e,r){return Math.abs(r-e)},Qw=function(e,r,i){return e+ST(r,i)},Jw=function(e,r,i){return e+Math.pow(i-r,2)},SF=function(e){return Math.sqrt(e)},DF=function(e,r,i){return Math.max(e,ST(r,i))},_l=function(e,r,i,n,a){for(var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:TF,s=n,u,l,c=0;c<e;c++)u=r(c),l=i(c),s=a(s,u,l);return o(s)},hu={euclidean:function(e,r,i){return e>=2?_l(e,r,i,0,Jw,SF):_l(e,r,i,0,Qw)},squaredEuclidean:function(e,r,i){return _l(e,r,i,0,Jw)},manhattan:function(e,r,i){return _l(e,r,i,0,Qw)},max:function(e,r,i){return _l(e,r,i,-1/0,DF)}};hu["squared-euclidean"]=hu.squaredEuclidean;hu.squaredeuclidean=hu.squaredEuclidean;function Ah(t,e,r,i,n,a){var o;return cr(t)?o=t:o=hu[t]||hu.euclidean,e===0&&cr(t)?o(n,a):o(e,r,i,n,a)}var EF=Zr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),b0=function(e){return EF(e)},bh=function(e,r,i,n,a){var o=a!=="kMedoids",s=o?function(d){return i[d]}:function(d){return n[d](i)},u=function(f){return n[f](r)},l=i,c=r;return Ah(e,n.length,s,u,l,c)},Om=function(e,r,i){for(var n=i.length,a=new Array(n),o=new Array(n),s=new Array(r),u=null,l=0;l<n;l++)a[l]=e.min(i[l]).value,o[l]=e.max(i[l]).value;for(var c=0;c<r;c++){u=[];for(var d=0;d<n;d++)u[d]=Math.random()*(o[d]-a[d])+a[d];s[c]=u}return s},DT=function(e,r,i,n,a){for(var o=1/0,s=0,u=0;u<r.length;u++){var l=bh(i,e,r[u],n,a);l<o&&(o=l,s=u)}return s},ET=function(e,r,i){for(var n=[],a=null,o=0;o<r.length;o++)a=r[o],i[a.id()]===e&&n.push(a);return n},kF=function(e,r,i){return Math.abs(r-e)<=i},MF=function(e,r,i){for(var n=0;n<e.length;n++)for(var a=0;a<e[n].length;a++){var o=Math.abs(e[n][a]-r[n][a]);if(o>i)return!1}return!0},IF=function(e,r,i){for(var n=0;n<i;n++)if(e===r[n])return!0;return!1},e_=function(e,r){var i=new Array(r);if(e.length<50)for(var n=0;n<r;n++){for(var a=e[Math.floor(Math.random()*e.length)];IF(a,i,n);)a=e[Math.floor(Math.random()*e.length)];i[n]=a}else for(var o=0;o<r;o++)i[o]=e[Math.floor(Math.random()*e.length)];return i},t_=function(e,r,i){for(var n=0,a=0;a<r.length;a++)n+=bh("manhattan",r[a],e,i,"kMedoids");return n},AF=function(e){var r=this.cy(),i=this.nodes(),n=null,a=b0(e),o=new Array(a.k),s={},u;a.testMode?typeof a.testCentroids=="number"?(a.testCentroids,u=Om(i,a.k,a.attributes)):Or(a.testCentroids)==="object"?u=a.testCentroids:u=Om(i,a.k,a.attributes):u=Om(i,a.k,a.attributes);for(var l=!0,c=0;l&&c<a.maxIterations;){for(var d=0;d<i.length;d++)n=i[d],s[n.id()]=DT(n,u,a.distance,a.attributes,"kMeans");l=!1;for(var f=0;f<a.k;f++){var p=ET(f,i,s);if(p.length!==0){for(var h=a.attributes.length,g=u[f],v=new Array(h),m=new Array(h),y=0;y<h;y++){m[y]=0;for(var b=0;b<p.length;b++)n=p[b],m[y]+=a.attributes[y](n);v[y]=m[y]/p.length,kF(v[y],g[y],a.sensitivityThreshold)||(l=!0)}u[f]=v,o[f]=r.collection(p)}}c++}return o},OF=function(e){var r=this.cy(),i=this.nodes(),n=null,a=b0(e),o=new Array(a.k),s,u={},l,c=new Array(a.k);a.testMode?typeof a.testCentroids=="number"||(Or(a.testCentroids)==="object"?s=a.testCentroids:s=e_(i,a.k)):s=e_(i,a.k);for(var d=!0,f=0;d&&f<a.maxIterations;){for(var p=0;p<i.length;p++)n=i[p],u[n.id()]=DT(n,s,a.distance,a.attributes,"kMedoids");d=!1;for(var h=0;h<s.length;h++){var g=ET(h,i,u);if(g.length!==0){c[h]=t_(s[h],g,a.attributes);for(var v=0;v<g.length;v++)l=t_(g[v],g,a.attributes),l<c[h]&&(c[h]=l,s[h]=g[v],d=!0);o[h]=r.collection(g)}}f++}return o},RF=function(e,r,i,n,a){for(var o,s,u=0;u<r.length;u++)for(var l=0;l<e.length;l++)n[u][l]=Math.pow(i[u][l],a.m);for(var c=0;c<e.length;c++)for(var d=0;d<a.attributes.length;d++){o=0,s=0;for(var f=0;f<r.length;f++)o+=n[f][c]*a.attributes[d](r[f]),s+=n[f][c];e[c][d]=o/s}},PF=function(e,r,i,n,a){for(var o=0;o<e.length;o++)r[o]=e[o].slice();for(var s,u,l,c=2/(a.m-1),d=0;d<i.length;d++)for(var f=0;f<n.length;f++){s=0;for(var p=0;p<i.length;p++)u=bh(a.distance,n[f],i[d],a.attributes,"cmeans"),l=bh(a.distance,n[f],i[p],a.attributes,"cmeans"),s+=Math.pow(u/l,c);e[f][d]=1/s}},NF=function(e,r,i,n){for(var a=new Array(i.k),o=0;o<a.length;o++)a[o]=[];for(var s,u,l=0;l<r.length;l++){s=-1/0,u=-1;for(var c=0;c<r[0].length;c++)r[l][c]>s&&(s=r[l][c],u=c);a[u].push(e[l])}for(var d=0;d<a.length;d++)a[d]=n.collection(a[d]);return a},r_=function(e){var r=this.cy(),i=this.nodes(),n=b0(e),a,o,s,u,l;u=new Array(i.length);for(var c=0;c<i.length;c++)u[c]=new Array(n.k);s=new Array(i.length);for(var d=0;d<i.length;d++)s[d]=new Array(n.k);for(var f=0;f<i.length;f++){for(var p=0,h=0;h<n.k;h++)s[f][h]=Math.random(),p+=s[f][h];for(var g=0;g<n.k;g++)s[f][g]=s[f][g]/p}o=new Array(n.k);for(var v=0;v<n.k;v++)o[v]=new Array(n.attributes.length);l=new Array(i.length);for(var m=0;m<i.length;m++)l[m]=new Array(n.k);for(var y=!0,b=0;y&&b<n.maxIterations;)y=!1,RF(o,i,s,l,n),PF(s,u,o,i,n),MF(s,u,n.sensitivityThreshold)||(y=!0),b++;return a=NF(i,s,n,r),{clusters:a,degreeOfMembership:s}},FF={kMeans:AF,kMedoids:OF,fuzzyCMeans:r_,fcm:r_},BF=Zr({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),LF={single:"min",complete:"max"},zF=function(e){var r=BF(e),i=LF[r.linkage];return i!=null&&(r.linkage=i),r},i_=function(e,r,i,n,a){for(var o=0,s=1/0,u,l=a.attributes,c=function(E,M){return Ah(a.distance,l.length,function(k){return l[k](E)},function(k){return l[k](M)},E,M)},d=0;d<e.length;d++){var f=e[d].key,p=i[f][n[f]];p<s&&(o=f,s=p)}if(a.mode==="threshold"&&s>=a.threshold||a.mode==="dendrogram"&&e.length===1)return!1;var h=r[o],g=r[n[o]],v;a.mode==="dendrogram"?v={left:h,right:g,key:h.key}:v={value:h.value.concat(g.value),key:h.key},e[h.index]=v,e.splice(g.index,1),r[h.key]=v;for(var m=0;m<e.length;m++){var y=e[m];h.key===y.key?u=1/0:a.linkage==="min"?(u=i[h.key][y.key],i[h.key][y.key]>i[g.key][y.key]&&(u=i[g.key][y.key])):a.linkage==="max"?(u=i[h.key][y.key],i[h.key][y.key]<i[g.key][y.key]&&(u=i[g.key][y.key])):a.linkage==="mean"?u=(i[h.key][y.key]*h.size+i[g.key][y.key]*g.size)/(h.size+g.size):a.mode==="dendrogram"?u=c(y.value,h.value):u=c(y.value[0],h.value[0]),i[h.key][y.key]=i[y.key][h.key]=u}for(var b=0;b<e.length;b++){var w=e[b].key;if(n[w]===h.key||n[w]===g.key){for(var T=w,x=0;x<e.length;x++){var _=e[x].key;i[w][_]<i[w][T]&&(T=_)}n[w]=T}e[b].index=b}return h.key=g.key=h.index=g.index=null,!0},ou=function(e,r,i){e&&(e.value?r.push(e.value):(e.left&&ou(e.left,r),e.right&&ou(e.right,r)))},$g=function(e,r){if(!e)return"";if(e.left&&e.right){var i=$g(e.left,r),n=$g(e.right,r),a=r.add({group:"nodes",data:{id:i+","+n}});return r.add({group:"edges",data:{source:i,target:a.id()}}),r.add({group:"edges",data:{source:n,target:a.id()}}),a.id()}else if(e.value)return e.value.id()},Gg=function(e,r,i){if(!e)return[];var n=[],a=[],o=[];return r===0?(e.left&&ou(e.left,n),e.right&&ou(e.right,a),o=n.concat(a),[i.collection(o)]):r===1?e.value?[i.collection(e.value)]:(e.left&&ou(e.left,n),e.right&&ou(e.right,a),[i.collection(n),i.collection(a)]):e.value?[i.collection(e.value)]:(e.left&&(n=Gg(e.left,r-1,i)),e.right&&(a=Gg(e.right,r-1,i)),n.concat(a))},n_=function(e){for(var r=this.cy(),i=this.nodes(),n=zF(e),a=n.attributes,o=function(b,w){return Ah(n.distance,a.length,function(T){return a[T](b)},function(T){return a[T](w)},b,w)},s=[],u=[],l=[],c=[],d=0;d<i.length;d++){var f={value:n.mode==="dendrogram"?i[d]:[i[d]],key:d,index:d};s[d]=f,c[d]=f,u[d]=[],l[d]=0}for(var p=0;p<s.length;p++)for(var h=0;h<=p;h++){var g=void 0;n.mode==="dendrogram"?g=p===h?1/0:o(s[p].value,s[h].value):g=p===h?1/0:o(s[p].value[0],s[h].value[0]),u[p][h]=g,u[h][p]=g,g<u[p][l[p]]&&(l[p]=h)}for(var v=i_(s,c,u,l,n);v;)v=i_(s,c,u,l,n);var m;return n.mode==="dendrogram"?(m=Gg(s[0],n.dendrogramDepth,r),n.addDendrogram&&$g(s[0],r)):(m=new Array(s.length),s.forEach(function(y,b){y.key=y.index=null,m[b]=r.collection(y.value)})),m},VF={hierarchicalClustering:n_,hca:n_},HF=Zr({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),UF=function(e){var r=e.damping,i=e.preference;.5<=r&&r<1||ar("Damping must range on [0.5, 1). Got: ".concat(r));var n=["median","mean","min","max"];return n.some(function(a){return a===i})||Te(i)||ar("Preference must be one of [".concat(n.map(function(a){return"'".concat(a,"'")}).join(", "),"] or a number. Got: ").concat(i)),HF(e)},jF=function(e,r,i,n){var a=function(s,u){return n[u](s)};return-Ah(e,n.length,function(o){return a(r,o)},function(o){return a(i,o)},r,i)},qF=function(e,r){var i=null;return r==="median"?i=UN(e):r==="mean"?i=HN(e):r==="min"?i=zN(e):r==="max"?i=VN(e):i=r,i},WF=function(e,r,i){for(var n=[],a=0;a<e;a++)r[a*e+a]+i[a*e+a]>0&&n.push(a);return n},a_=function(e,r,i){for(var n=[],a=0;a<e;a++){for(var o=-1,s=-1/0,u=0;u<i.length;u++){var l=i[u];r[a*e+l]>s&&(o=l,s=r[a*e+l])}o>0&&n.push(o)}for(var c=0;c<i.length;c++)n[i[c]]=i[c];return n},$F=function(e,r,i){for(var n=a_(e,r,i),a=0;a<i.length;a++){for(var o=[],s=0;s<n.length;s++)n[s]===i[a]&&o.push(s);for(var u=-1,l=-1/0,c=0;c<o.length;c++){for(var d=0,f=0;f<o.length;f++)d+=r[o[f]*e+o[c]];d>l&&(u=c,l=d)}i[a]=o[u]}return n=a_(e,r,i),n},o_=function(e){for(var r=this.cy(),i=this.nodes(),n=UF(e),a={},o=0;o<i.length;o++)a[i[o].id()]=o;var s,u,l,c,d,f;s=i.length,u=s*s,l=new Array(u);for(var p=0;p<u;p++)l[p]=-1/0;for(var h=0;h<s;h++)for(var g=0;g<s;g++)h!==g&&(l[h*s+g]=jF(n.distance,i[h],i[g],n.attributes));c=qF(l,n.preference);for(var v=0;v<s;v++)l[v*s+v]=c;d=new Array(u);for(var m=0;m<u;m++)d[m]=0;f=new Array(u);for(var y=0;y<u;y++)f[y]=0;for(var b=new Array(s),w=new Array(s),T=new Array(s),x=0;x<s;x++)b[x]=0,w[x]=0,T[x]=0;for(var _=new Array(s*n.minIterations),D=0;D<_.length;D++)_[D]=0;var E;for(E=0;E<n.maxIterations;E++){for(var M=0;M<s;M++){for(var k=-1/0,I=-1/0,A=-1,O=0,N=0;N<s;N++)b[N]=d[M*s+N],O=f[M*s+N]+l[M*s+N],O>=k?(I=k,k=O,A=N):O>I&&(I=O);for(var F=0;F<s;F++)d[M*s+F]=(1-n.damping)*(l[M*s+F]-k)+n.damping*b[F];d[M*s+A]=(1-n.damping)*(l[M*s+A]-I)+n.damping*b[A]}for(var P=0;P<s;P++){for(var z=0,$=0;$<s;$++)b[$]=f[$*s+P],w[$]=Math.max(0,d[$*s+P]),z+=w[$];z-=w[P],w[P]=d[P*s+P],z+=w[P];for(var G=0;G<s;G++)f[G*s+P]=(1-n.damping)*Math.min(0,z-w[G])+n.damping*b[G];f[P*s+P]=(1-n.damping)*(z-w[P])+n.damping*b[P]}for(var V=0,W=0;W<s;W++){var ue=f[W*s+W]+d[W*s+W]>0?1:0;_[E%n.minIterations*s+W]=ue,V+=ue}if(V>0&&(E>=n.minIterations-1||E==n.maxIterations-1)){for(var he=0,le=0;le<s;le++){T[le]=0;for(var me=0;me<n.minIterations;me++)T[le]+=_[me*s+le];(T[le]===0||T[le]===n.minIterations)&&he++}if(he===s)break}}for(var be=WF(s,d,f),Se=$F(s,l,be),se={},q=0;q<be.length;q++)se[be[q]]=[];for(var X=0;X<i.length;X++){var J=a[i[X].id()],ne=Se[J];ne!=null&&se[ne].push(i[X])}for(var we=new Array(be.length),Re=0;Re<be.length;Re++)we[Re]=r.collection(se[be[Re]]);return we},GF={affinityPropagation:o_,ap:o_},YF=Zr({root:void 0,directed:!1}),KF={hierholzer:function(e){if(!Dt(e)){var r=arguments;e={root:r[0],directed:r[1]}}var i=YF(e),n=i.root,a=i.directed,o=this,s=!1,u,l,c;n&&(c=Ue(n)?this.filter(n)[0].id():n[0].id());var d={},f={};a?o.forEach(function(y){var b=y.id();if(y.isNode()){var w=y.indegree(!0),T=y.outdegree(!0),x=w-T,_=T-w;x==1?u?s=!0:u=b:_==1?l?s=!0:l=b:(_>1||x>1)&&(s=!0),d[b]=[],y.outgoers().forEach(function(D){D.isEdge()&&d[b].push(D.id())})}else f[b]=[void 0,y.target().id()]}):o.forEach(function(y){var b=y.id();if(y.isNode()){var w=y.degree(!0);w%2&&(u?l?s=!0:l=b:u=b),d[b]=[],y.connectedEdges().forEach(function(T){return d[b].push(T.id())})}else f[b]=[y.source().id(),y.target().id()]});var p={found:!1,trail:void 0};if(s)return p;if(l&&u)if(a){if(c&&l!=c)return p;c=l}else{if(c&&l!=c&&u!=c)return p;c||(c=l)}else c||(c=o[0].id());var h=function(b){for(var w=b,T=[b],x,_,D;d[w].length;)x=d[w].shift(),_=f[x][0],D=f[x][1],w!=D?(d[D]=d[D].filter(function(E){return E!=x}),w=D):!a&&w!=_&&(d[_]=d[_].filter(function(E){return E!=x}),w=_),T.unshift(x),T.unshift(w);return T},g=[],v=[];for(v=h(c);v.length!=1;)d[v[0]].length==0?(g.unshift(o.getElementById(v.shift())),g.unshift(o.getElementById(v.shift()))):v=h(v.shift()).concat(v);g.unshift(o.getElementById(v.shift()));for(var m in d)if(d[m].length)return p;return p.found=!0,p.trail=this.spawn(g,!0),p}},Gf=function(){var e=this,r={},i=0,n=0,a=[],o=[],s={},u=function(f,p){for(var h=o.length-1,g=[],v=e.spawn();o[h].x!=f||o[h].y!=p;)g.push(o.pop().edge),h--;g.push(o.pop().edge),g.forEach(function(m){var y=m.connectedNodes().intersection(e);v.merge(m),y.forEach(function(b){var w=b.id(),T=b.connectedEdges().intersection(e);v.merge(b),r[w].cutVertex?v.merge(T.filter(function(x){return x.isLoop()})):v.merge(T)})}),a.push(v)},l=function(f,p,h){f===h&&(n+=1),r[p]={id:i,low:i++,cutVertex:!1};var g=e.getElementById(p).connectedEdges().intersection(e);if(g.size()===0)a.push(e.spawn(e.getElementById(p)));else{var v,m,y,b;g.forEach(function(w){v=w.source().id(),m=w.target().id(),y=v===p?m:v,y!==h&&(b=w.id(),s[b]||(s[b]=!0,o.push({x:p,y,edge:w})),y in r?r[p].low=Math.min(r[p].low,r[y].id):(l(f,y,p),r[p].low=Math.min(r[p].low,r[y].low),r[p].id<=r[y].low&&(r[p].cutVertex=!0,u(p,y))))})}};e.forEach(function(d){if(d.isNode()){var f=d.id();f in r||(n=0,l(f,f),r[f].cutVertex=n>1)}});var c=Object.keys(r).filter(function(d){return r[d].cutVertex}).map(function(d){return e.getElementById(d)});return{cut:e.spawn(c),components:a}},ZF={hopcroftTarjanBiconnected:Gf,htbc:Gf,htb:Gf,hopcroftTarjanBiconnectedComponents:Gf},Yf=function(){var e=this,r={},i=0,n=[],a=[],o=e.spawn(e),s=function(l){a.push(l),r[l]={index:i,low:i++,explored:!1};var c=e.getElementById(l).connectedEdges().intersection(e);if(c.forEach(function(g){var v=g.target().id();v!==l&&(v in r||s(v),r[v].explored||(r[l].low=Math.min(r[l].low,r[v].low)))}),r[l].index===r[l].low){for(var d=e.spawn();;){var f=a.pop();if(d.merge(e.getElementById(f)),r[f].low=r[l].index,r[f].explored=!0,f===l)break}var p=d.edgesWith(d),h=d.merge(p);n.push(h),o=o.difference(h)}};return e.forEach(function(u){if(u.isNode()){var l=u.id();l in r||s(l)}}),{cut:o,components:n}},XF={tarjanStronglyConnected:Yf,tsc:Yf,tscc:Yf,tarjanStronglyConnectedComponents:Yf},kT={};[Bl,EN,kN,IN,ON,PN,BN,cF,lu,cu,Wg,xF,FF,VF,GF,KF,ZF,XF].forEach(function(t){$e(kT,t)});var MT=0,IT=1,AT=2,wn=function(e){if(!(this instanceof wn))return new wn(e);this.id="Thenable/1.0.7",this.state=MT,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};wn.prototype={fulfill:function(e){return s_(this,IT,"fulfillValue",e)},reject:function(e){return s_(this,AT,"rejectReason",e)},then:function(e,r){var i=this,n=new wn;return i.onFulfilled.push(l_(e,n,"fulfill")),i.onRejected.push(l_(r,n,"reject")),OT(i),n.proxy}};var s_=function(e,r,i,n){return e.state===MT&&(e.state=r,e[i]=n,OT(e)),e},OT=function(e){e.state===IT?u_(e,"onFulfilled",e.fulfillValue):e.state===AT&&u_(e,"onRejected",e.rejectReason)},u_=function(e,r,i){if(e[r].length!==0){var n=e[r];e[r]=[];var a=function(){for(var s=0;s<n.length;s++)n[s](i)};typeof setImmediate=="function"?setImmediate(a):setTimeout(a,0)}},l_=function(e,r,i){return function(n){if(typeof e!="function")r[i].call(r,n);else{var a;try{a=e(n)}catch(o){r.reject(o);return}RT(r,a)}}},RT=function(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var i;if(Or(r)==="object"&&r!==null||typeof r=="function")try{i=r.then}catch(a){e.reject(a);return}if(typeof i=="function"){var n=!1;try{i.call(r,function(a){n||(n=!0,a===r?e.reject(new TypeError("circular thenable chain")):RT(e,a))},function(a){n||(n=!0,e.reject(a))})}catch(a){n||e.reject(a)}return}e.fulfill(r)};wn.all=function(t){return new wn(function(e,r){for(var i=new Array(t.length),n=0,a=function(u,l){i[u]=l,n++,n===t.length&&e(i)},o=0;o<t.length;o++)(function(s){var u=t[s],l=u!=null&&u.then!=null;if(l)u.then(function(d){a(s,d)},function(d){r(d)});else{var c=u;a(s,c)}})(o)})};wn.resolve=function(t){return new wn(function(e,r){e(t)})};wn.reject=function(t){return new wn(function(e,r){r(t)})};var yu=typeof Promise<"u"?Promise:wn,Yg=function(e,r,i){var n=l0(e),a=!n,o=this._private=$e({duration:1e3},r,i);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&cr(o.complete)&&o.completes.push(o.complete),a){var s=e.position();o.startPosition=o.startPosition||{x:s.x,y:s.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(n){var u=e.pan();o.startPan={x:u.x,y:u.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},qo=Yg.prototype;$e(qo,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var r,i=e.target._private.animation;e.queue?r=i.queue:r=i.current,r.push(this),Vi(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},progress:function(e){var r=this._private,i=r.playing;return e===void 0?r.progress:(i&&this.pause(),r.progress=e,r.started=!1,i&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var i=function(l,c){var d=e[l];d!=null&&(e[l]=e[c],e[c]=d)};if(i("zoom","startZoom"),i("pan","startPan"),i("position","startPosition"),e.style)for(var n=0;n<e.style.length;n++){var a=e.style[n],o=a.name,s=e.startStyle[o];e.startStyle[o]=a,e.style[n]=s}return r&&this.play(),this},promise:function(e){var r=this._private,i;switch(e){case"frame":i=r.frames;break;default:case"complete":case"completed":i=r.completes}return new yu(function(n,a){i.push(function(){n()})})}});qo.complete=qo.completed;qo.run=qo.play;qo.running=qo.playing;var QF={animated:function(){return function(){var r=this,i=r.length!==void 0,n=i?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return!1;var o=n[0];if(o)return o._private.animation.current.length>0}},clearQueue:function(){return function(){var r=this,i=r.length!==void 0,n=i?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var o=0;o<n.length;o++){var s=n[o];s._private.animation.queue=[]}return this}},delay:function(){return function(r,i){var n=this._private.cy||this;return n.styleEnabled()?this.animate({delay:r,duration:r,complete:i}):this}},delayAnimation:function(){return function(r,i){var n=this._private.cy||this;return n.styleEnabled()?this.animation({delay:r,duration:r,complete:i}):this}},animation:function(){return function(r,i){var n=this,a=n.length!==void 0,o=a?n:[n],s=this._private.cy||this,u=!a,l=!u;if(!s.styleEnabled())return this;var c=s.style();r=$e({},r,i);var d=Object.keys(r).length===0;if(d)return new Yg(o[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break}if(l&&(r.style=c.getPropsList(r.style||r.css),r.css=void 0),l&&r.renderedPosition!=null){var f=r.renderedPosition,p=s.pan(),h=s.zoom();r.position=yT(f,h,p)}if(u&&r.panBy!=null){var g=r.panBy,v=s.pan();r.pan={x:v.x+g.x,y:v.y+g.y}}var m=r.center||r.centre;if(u&&m!=null){var y=s.getCenterPan(m.eles,r.zoom);y!=null&&(r.pan=y)}if(u&&r.fit!=null){var b=r.fit,w=s.getFitViewport(b.eles||b.boundingBox,b.padding);w!=null&&(r.pan=w.pan,r.zoom=w.zoom)}if(u&&Dt(r.zoom)){var T=s.getZoomedViewport(r.zoom);T!=null?(T.zoomed&&(r.zoom=T.zoom),T.panned&&(r.pan=T.pan)):r.zoom=null}return new Yg(o[0],r)}},animate:function(){return function(r,i){var n=this,a=n.length!==void 0,o=a?n:[n],s=this._private.cy||this;if(!s.styleEnabled())return this;i&&(r=$e({},r,i));for(var u=0;u<o.length;u++){var l=o[u],c=l.animated()&&(r.queue===void 0||r.queue),d=l.animation(r,c?{queue:!0}:void 0);d.play()}return this}},stop:function(){return function(r,i){var n=this,a=n.length!==void 0,o=a?n:[n],s=this._private.cy||this;if(!s.styleEnabled())return this;for(var u=0;u<o.length;u++){for(var l=o[u],c=l._private,d=c.animation.current,f=0;f<d.length;f++){var p=d[f],h=p._private;i&&(h.duration=0)}r&&(c.animation.queue=[]),i||(c.animation.current=[])}return s.notify("draw"),this}}},Rm,c_;function Oh(){if(c_)return Rm;c_=1;var t=Array.isArray;return Rm=t,Rm}var Pm,d_;function JF(){if(d_)return Pm;d_=1;var t=Oh(),e=Kl(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function n(a,o){if(t(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||e(a)?!0:i.test(a)||!r.test(a)||o!=null&&a in Object(o)}return Pm=n,Pm}var Nm,f_;function e5(){if(f_)return Nm;f_=1;var t=lT(),e=Yl(),r="[object AsyncFunction]",i="[object Function]",n="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!e(s))return!1;var u=t(s);return u==i||u==n||u==r||u==a}return Nm=o,Nm}var Fm,h_;function t5(){if(h_)return Fm;h_=1;var t=kh(),e=t["__core-js_shared__"];return Fm=e,Fm}var Bm,p_;function r5(){if(p_)return Bm;p_=1;var t=t5(),e=(function(){var i=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function r(i){return!!e&&e in i}return Bm=r,Bm}var Lm,v_;function i5(){if(v_)return Lm;v_=1;var t=Function.prototype,e=t.toString;function r(i){if(i!=null){try{return e.call(i)}catch{}try{return i+""}catch{}}return""}return Lm=r,Lm}var zm,m_;function n5(){if(m_)return zm;m_=1;var t=e5(),e=r5(),r=Yl(),i=i5(),n=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,l=s.hasOwnProperty,c=RegExp("^"+u.call(l).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(f){if(!r(f)||e(f))return!1;var p=t(f)?c:a;return p.test(i(f))}return zm=d,zm}var Vm,g_;function a5(){if(g_)return Vm;g_=1;function t(e,r){return e?.[r]}return Vm=t,Vm}var Hm,y_;function C0(){if(y_)return Hm;y_=1;var t=n5(),e=a5();function r(i,n){var a=e(i,n);return t(a)?a:void 0}return Hm=r,Hm}var Um,b_;function Rh(){if(b_)return Um;b_=1;var t=C0(),e=t(Object,"create");return Um=e,Um}var jm,C_;function o5(){if(C_)return jm;C_=1;var t=Rh();function e(){this.__data__=t?t(null):{},this.size=0}return jm=e,jm}var qm,w_;function s5(){if(w_)return qm;w_=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return qm=t,qm}var Wm,__;function u5(){if(__)return Wm;__=1;var t=Rh(),e="__lodash_hash_undefined__",r=Object.prototype,i=r.hasOwnProperty;function n(a){var o=this.__data__;if(t){var s=o[a];return s===e?void 0:s}return i.call(o,a)?o[a]:void 0}return Wm=n,Wm}var $m,x_;function l5(){if(x_)return $m;x_=1;var t=Rh(),e=Object.prototype,r=e.hasOwnProperty;function i(n){var a=this.__data__;return t?a[n]!==void 0:r.call(a,n)}return $m=i,$m}var Gm,T_;function c5(){if(T_)return Gm;T_=1;var t=Rh(),e="__lodash_hash_undefined__";function r(i,n){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=t&&n===void 0?e:n,this}return Gm=r,Gm}var Ym,S_;function d5(){if(S_)return Ym;S_=1;var t=o5(),e=s5(),r=u5(),i=l5(),n=c5();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,Ym=a,Ym}var Km,D_;function f5(){if(D_)return Km;D_=1;function t(){this.__data__=[],this.size=0}return Km=t,Km}var Zm,E_;function PT(){if(E_)return Zm;E_=1;function t(e,r){return e===r||e!==e&&r!==r}return Zm=t,Zm}var Xm,k_;function Ph(){if(k_)return Xm;k_=1;var t=PT();function e(r,i){for(var n=r.length;n--;)if(t(r[n][0],i))return n;return-1}return Xm=e,Xm}var Qm,M_;function h5(){if(M_)return Qm;M_=1;var t=Ph(),e=Array.prototype,r=e.splice;function i(n){var a=this.__data__,o=t(a,n);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():r.call(a,o,1),--this.size,!0}return Qm=i,Qm}var Jm,I_;function p5(){if(I_)return Jm;I_=1;var t=Ph();function e(r){var i=this.__data__,n=t(i,r);return n<0?void 0:i[n][1]}return Jm=e,Jm}var eg,A_;function v5(){if(A_)return eg;A_=1;var t=Ph();function e(r){return t(this.__data__,r)>-1}return eg=e,eg}var tg,O_;function m5(){if(O_)return tg;O_=1;var t=Ph();function e(r,i){var n=this.__data__,a=t(n,r);return a<0?(++this.size,n.push([r,i])):n[a][1]=i,this}return tg=e,tg}var rg,R_;function g5(){if(R_)return rg;R_=1;var t=f5(),e=h5(),r=p5(),i=v5(),n=m5();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,rg=a,rg}var ig,P_;function y5(){if(P_)return ig;P_=1;var t=C0(),e=kh(),r=t(e,"Map");return ig=r,ig}var ng,N_;function b5(){if(N_)return ng;N_=1;var t=d5(),e=g5(),r=y5();function i(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return ng=i,ng}var ag,F_;function C5(){if(F_)return ag;F_=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return ag=t,ag}var og,B_;function Nh(){if(B_)return og;B_=1;var t=C5();function e(r,i){var n=r.__data__;return t(i)?n[typeof i=="string"?"string":"hash"]:n.map}return og=e,og}var sg,L_;function w5(){if(L_)return sg;L_=1;var t=Nh();function e(r){var i=t(this,r).delete(r);return this.size-=i?1:0,i}return sg=e,sg}var ug,z_;function _5(){if(z_)return ug;z_=1;var t=Nh();function e(r){return t(this,r).get(r)}return ug=e,ug}var lg,V_;function x5(){if(V_)return lg;V_=1;var t=Nh();function e(r){return t(this,r).has(r)}return lg=e,lg}var cg,H_;function T5(){if(H_)return cg;H_=1;var t=Nh();function e(r,i){var n=t(this,r),a=n.size;return n.set(r,i),this.size+=n.size==a?0:1,this}return cg=e,cg}var dg,U_;function S5(){if(U_)return dg;U_=1;var t=b5(),e=w5(),r=_5(),i=x5(),n=T5();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var l=o[s];this.set(l[0],l[1])}}return a.prototype.clear=t,a.prototype.delete=e,a.prototype.get=r,a.prototype.has=i,a.prototype.set=n,dg=a,dg}var fg,j_;function D5(){if(j_)return fg;j_=1;var t=S5(),e="Expected a function";function r(i,n){if(typeof i!="function"||n!=null&&typeof n!="function")throw new TypeError(e);var a=function(){var o=arguments,s=n?n.apply(this,o):o[0],u=a.cache;if(u.has(s))return u.get(s);var l=i.apply(this,o);return a.cache=u.set(s,l)||u,l};return a.cache=new(r.Cache||t),a}return r.Cache=t,fg=r,fg}var hg,q_;function E5(){if(q_)return hg;q_=1;var t=D5(),e=500;function r(i){var n=t(i,function(o){return a.size===e&&a.clear(),o}),a=n.cache;return n}return hg=r,hg}var pg,W_;function NT(){if(W_)return pg;W_=1;var t=E5(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=t(function(n){var a=[];return n.charCodeAt(0)===46&&a.push(""),n.replace(e,function(o,s,u,l){a.push(u?l.replace(r,"$1"):s||o)}),a});return pg=i,pg}var vg,$_;function FT(){if($_)return vg;$_=1;function t(e,r){for(var i=-1,n=e==null?0:e.length,a=Array(n);++i<n;)a[i]=r(e[i],i,e);return a}return vg=t,vg}var mg,G_;function k5(){if(G_)return mg;G_=1;var t=d0(),e=FT(),r=Oh(),i=Kl(),n=t?t.prototype:void 0,a=n?n.toString:void 0;function o(s){if(typeof s=="string")return s;if(r(s))return e(s,o)+"";if(i(s))return a?a.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return mg=o,mg}var gg,Y_;function BT(){if(Y_)return gg;Y_=1;var t=k5();function e(r){return r==null?"":t(r)}return gg=e,gg}var yg,K_;function LT(){if(K_)return yg;K_=1;var t=Oh(),e=JF(),r=NT(),i=BT();function n(a,o){return t(a)?a:e(a,o)?[a]:r(i(a))}return yg=n,yg}var bg,Z_;function w0(){if(Z_)return bg;Z_=1;var t=Kl();function e(r){if(typeof r=="string"||t(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return bg=e,bg}var Cg,X_;function M5(){if(X_)return Cg;X_=1;var t=LT(),e=w0();function r(i,n){n=t(n,i);for(var a=0,o=n.length;i!=null&&a<o;)i=i[e(n[a++])];return a&&a==o?i:void 0}return Cg=r,Cg}var wg,Q_;function I5(){if(Q_)return wg;Q_=1;var t=M5();function e(r,i,n){var a=r==null?void 0:t(r,i);return a===void 0?n:a}return wg=e,wg}var A5=I5(),O5=Gl(A5),_g,J_;function R5(){if(J_)return _g;J_=1;var t=C0(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return _g=e,_g}var xg,ex;function P5(){if(ex)return xg;ex=1;var t=R5();function e(r,i,n){i=="__proto__"&&t?t(r,i,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[i]=n}return xg=e,xg}var Tg,tx;function N5(){if(tx)return Tg;tx=1;var t=P5(),e=PT(),r=Object.prototype,i=r.hasOwnProperty;function n(a,o,s){var u=a[o];(!(i.call(a,o)&&e(u,s))||s===void 0&&!(o in a))&&t(a,o,s)}return Tg=n,Tg}var Sg,rx;function F5(){if(rx)return Sg;rx=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(i,n){var a=typeof i;return n=n??t,!!n&&(a=="number"||a!="symbol"&&e.test(i))&&i>-1&&i%1==0&&i<n}return Sg=r,Sg}var Dg,ix;function B5(){if(ix)return Dg;ix=1;var t=N5(),e=LT(),r=F5(),i=Yl(),n=w0();function a(o,s,u,l){if(!i(o))return o;s=e(s,o);for(var c=-1,d=s.length,f=d-1,p=o;p!=null&&++c<d;){var h=n(s[c]),g=u;if(h==="__proto__"||h==="constructor"||h==="prototype")return o;if(c!=f){var v=p[h];g=l?l(v,h,p):void 0,g===void 0&&(g=i(v)?v:r(s[c+1])?[]:{})}t(p,h,g),p=p[h]}return o}return Dg=a,Dg}var Eg,nx;function L5(){if(nx)return Eg;nx=1;var t=B5();function e(r,i,n){return r==null?r:t(r,i,n)}return Eg=e,Eg}var z5=L5(),V5=Gl(z5),kg,ax;function H5(){if(ax)return kg;ax=1;function t(e,r){var i=-1,n=e.length;for(r||(r=Array(n));++i<n;)r[i]=e[i];return r}return kg=t,kg}var Mg,ox;function U5(){if(ox)return Mg;ox=1;var t=FT(),e=H5(),r=Oh(),i=Kl(),n=NT(),a=w0(),o=BT();function s(u){return r(u)?t(u,a):i(u)?[u]:e(n(o(u)))}return Mg=s,Mg}var j5=U5(),q5=Gl(j5),W5={data:function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(n){},beforeSet:function(n,a){},onSet:function(n){},canSet:function(n){return!0}};return e=$e({},r,e),function(n,a){var o=e,s=this,u=s.length!==void 0,l=u?s:[s],c=u?s[0]:s;if(Ue(n)){var d=n.indexOf(".")!==-1,f=d&&q5(n);if(o.allowGetting&&a===void 0){var p;return c&&(o.beforeGet(c),f&&c._private[o.field][n]===void 0?p=O5(c._private[o.field],f):p=c._private[o.field][n]),p}else if(o.allowSetting&&a!==void 0){var h=!o.immutableKeys[n];if(h){var g=Jx({},n,a);o.beforeSet(s,g);for(var v=0,m=l.length;v<m;v++){var y=l[v];o.canSet(y)&&(f&&c._private[o.field][n]===void 0?V5(y._private[o.field],f,a):y._private[o.field][n]=a)}o.updateStyle&&s.updateStyle(),o.onSet(s),o.settingTriggersEvent&&s[o.triggerFnName](o.settingEvent)}}}else if(o.allowSetting&&Dt(n)){var b=n,w,T,x=Object.keys(b);o.beforeSet(s,b);for(var _=0;_<x.length;_++){w=x[_],T=b[w];var D=!o.immutableKeys[w];if(D)for(var E=0;E<l.length;E++){var M=l[E];o.canSet(M)&&(M._private[o.field][w]=T)}}o.updateStyle&&s.updateStyle(),o.onSet(s),o.settingTriggersEvent&&s[o.triggerFnName](o.settingEvent)}else if(o.allowBinding&&cr(n)){var k=n;s.on(o.bindingEvent,k)}else if(o.allowGetting&&n===void 0){var I;return c&&(o.beforeGet(c),I=c._private[o.field]),I}return s}},removeData:function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=$e({},r,e),function(n){var a=e,o=this,s=o.length!==void 0,u=s?o:[o];if(Ue(n)){for(var l=n.split(/\s+/),c=l.length,d=0;d<c;d++){var f=l[d];if(!Ka(f)){var p=!a.immutableKeys[f];if(p)for(var h=0,g=u.length;h<g;h++)u[h]._private[a.field][f]=void 0}}a.triggerEvent&&o[a.triggerFnName](a.event)}else if(n===void 0){for(var v=0,m=u.length;v<m;v++)for(var y=u[v]._private[a.field],b=Object.keys(y),w=0;w<b.length;w++){var T=b[w],x=!a.immutableKeys[T];x&&(y[T]=void 0)}a.triggerEvent&&o[a.triggerFnName](a.event)}return o}}},$5={eventAliasesOn:function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(i,n){var a=this,o=Array.prototype.slice.call(arguments,0);return new yu(function(s,u){var l=function(p){a.off.apply(a,d),s(p)},c=o.concat([l]),d=c.concat([]);a.on.apply(a,c)})}}},zt={};[QF,W5,$5].forEach(function(t){$e(zt,t)});var G5={animate:zt.animate(),animation:zt.animation(),animated:zt.animated(),clearQueue:zt.clearQueue(),delay:zt.delay(),delayAnimation:zt.delayAnimation(),stop:zt.stop()},ah={classes:function(e){var r=this;if(e===void 0){var i=[];return r[0]._private.classes.forEach(function(h){return i.push(h)}),i}else Zt(e)||(e=(e||"").match(/\S+/g)||[]);for(var n=[],a=new gu(e),o=0;o<r.length;o++){for(var s=r[o],u=s._private,l=u.classes,c=!1,d=0;d<e.length;d++){var f=e[d],p=l.has(f);if(!p){c=!0;break}}c||(c=l.size!==e.length),c&&(u.classes=a,n.push(s))}return n.length>0&&this.spawn(n).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){Zt(e)||(e=e.match(/\S+/g)||[]);for(var i=this,n=r===void 0,a=[],o=0,s=i.length;o<s;o++)for(var u=i[o],l=u._private.classes,c=!1,d=0;d<e.length;d++){var f=e[d],p=l.has(f),h=!1;r||n&&!p?(l.add(f),h=!0):(!r||n&&p)&&(l.delete(f),h=!0),!c&&h&&(a.push(u),c=!0)}return a.length>0&&this.spawn(a).updateStyle().emit("class"),i},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var i=this;if(r==null)r=250;else if(r===0)return i;return i.addClass(e),setTimeout(function(){i.removeClass(e)},r),i}};ah.className=ah.classNames=ah.classes;var St={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Ar,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};St.variable="(?:[\\w-.]|(?:\\\\"+St.metaChar+"))+";St.className="(?:[\\w-]|(?:\\\\"+St.metaChar+"))+";St.value=St.string+"|"+St.number;St.id=St.variable;(function(){var t,e,r;for(t=St.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],St.comparatorOp+="|@"+e;for(t=St.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(St.comparatorOp+="|\\!"+e)})();var Yt=function(){return{checks:[]}},Oe={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Kg=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return WP(t.selector,e.selector)}),Y5=(function(){for(var t={},e,r=0;r<Kg.length;r++)e=Kg[r],t[e.selector]=e.matches;return t})(),K5=function(e,r){return Y5[e](r)},Z5="("+Kg.map(function(t){return t.selector}).join("|")+")",Xs=function(e){return e.replace(new RegExp("\\\\("+St.metaChar+")","g"),function(r,i){return i})},Ua=function(e,r,i){e[e.length-1]=i},Zg=[{name:"group",query:!0,regex:"("+St.group+")",populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.GROUP,value:a==="*"?a:a+"s"})}},{name:"state",query:!0,regex:Z5,populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.STATE,value:a})}},{name:"id",query:!0,regex:"\\#("+St.id+")",populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.ID,value:Xs(a)})}},{name:"className",query:!0,regex:"\\.("+St.className+")",populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.CLASS,value:Xs(a)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+St.variable+")\\s*\\]",populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.DATA_EXIST,field:Xs(a)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+St.variable+")\\s*("+St.comparatorOp+")\\s*("+St.value+")\\s*\\]",populate:function(e,r,i){var n=Sr(i,3),a=n[0],o=n[1],s=n[2],u=new RegExp("^"+St.string+"$").exec(s)!=null;u?s=s.substring(1,s.length-1):s=parseFloat(s),r.checks.push({type:Oe.DATA_COMPARE,field:Xs(a),operator:o,value:s})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+St.boolOp+")\\s*("+St.variable+")\\s*\\]",populate:function(e,r,i){var n=Sr(i,2),a=n[0],o=n[1];r.checks.push({type:Oe.DATA_BOOL,field:Xs(o),operator:a})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+St.meta+")\\s*("+St.comparatorOp+")\\s*("+St.number+")\\s*\\]\\]",populate:function(e,r,i){var n=Sr(i,3),a=n[0],o=n[1],s=n[2];r.checks.push({type:Oe.META_COMPARE,field:Xs(a),operator:o,value:parseFloat(s)})}},{name:"nextQuery",separator:!0,regex:St.separator,populate:function(e,r){var i=e.currentSubject,n=e.edgeCount,a=e.compoundCount,o=e[e.length-1];i!=null&&(o.subject=i,e.currentSubject=null),o.edgeCount=n,o.compoundCount=a,e.edgeCount=0,e.compoundCount=0;var s=e[e.length++]=Yt();return s}},{name:"directedEdge",separator:!0,regex:St.directedEdge,populate:function(e,r){if(e.currentSubject==null){var i=Yt(),n=r,a=Yt();return i.checks.push({type:Oe.DIRECTED_EDGE,source:n,target:a}),Ua(e,r,i),e.edgeCount++,a}else{var o=Yt(),s=r,u=Yt();return o.checks.push({type:Oe.NODE_SOURCE,source:s,target:u}),Ua(e,r,o),e.edgeCount++,u}}},{name:"undirectedEdge",separator:!0,regex:St.undirectedEdge,populate:function(e,r){if(e.currentSubject==null){var i=Yt(),n=r,a=Yt();return i.checks.push({type:Oe.UNDIRECTED_EDGE,nodes:[n,a]}),Ua(e,r,i),e.edgeCount++,a}else{var o=Yt(),s=r,u=Yt();return o.checks.push({type:Oe.NODE_NEIGHBOR,node:s,neighbor:u}),Ua(e,r,o),u}}},{name:"child",separator:!0,regex:St.child,populate:function(e,r){if(e.currentSubject==null){var i=Yt(),n=Yt(),a=e[e.length-1];return i.checks.push({type:Oe.CHILD,parent:a,child:n}),Ua(e,r,i),e.compoundCount++,n}else if(e.currentSubject===r){var o=Yt(),s=e[e.length-1],u=Yt(),l=Yt(),c=Yt(),d=Yt();return o.checks.push({type:Oe.COMPOUND_SPLIT,left:s,right:u,subject:l}),l.checks=r.checks,r.checks=[{type:Oe.TRUE}],d.checks.push({type:Oe.TRUE}),u.checks.push({type:Oe.PARENT,parent:d,child:c}),Ua(e,s,o),e.currentSubject=l,e.compoundCount++,c}else{var f=Yt(),p=Yt(),h=[{type:Oe.PARENT,parent:f,child:p}];return f.checks=r.checks,r.checks=h,e.compoundCount++,p}}},{name:"descendant",separator:!0,regex:St.descendant,populate:function(e,r){if(e.currentSubject==null){var i=Yt(),n=Yt(),a=e[e.length-1];return i.checks.push({type:Oe.DESCENDANT,ancestor:a,descendant:n}),Ua(e,r,i),e.compoundCount++,n}else if(e.currentSubject===r){var o=Yt(),s=e[e.length-1],u=Yt(),l=Yt(),c=Yt(),d=Yt();return o.checks.push({type:Oe.COMPOUND_SPLIT,left:s,right:u,subject:l}),l.checks=r.checks,r.checks=[{type:Oe.TRUE}],d.checks.push({type:Oe.TRUE}),u.checks.push({type:Oe.ANCESTOR,ancestor:d,descendant:c}),Ua(e,s,o),e.currentSubject=l,e.compoundCount++,c}else{var f=Yt(),p=Yt(),h=[{type:Oe.ANCESTOR,ancestor:f,descendant:p}];return f.checks=r.checks,r.checks=h,e.compoundCount++,p}}},{name:"subject",modifier:!0,regex:St.subject,populate:function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return Vt("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var i=e[e.length-1],n=i.checks[0],a=n==null?null:n.type;a===Oe.DIRECTED_EDGE?n.type=Oe.NODE_TARGET:a===Oe.UNDIRECTED_EDGE&&(n.type=Oe.NODE_NEIGHBOR,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];Zg.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var X5=function(e){for(var r,i,n,a=0;a<Zg.length;a++){var o=Zg[a],s=o.name,u=e.match(o.regexObj);if(u!=null){i=u,r=o,n=s;var l=u[0];e=e.substring(l.length);break}}return{expr:r,match:i,name:n,remaining:e}},Q5=function(e){var r=e.match(/^\s+/);if(r){var i=r[0];e=e.substring(i.length)}return e},J5=function(e){var r=this,i=r.inputText=e,n=r[0]=Yt();for(r.length=1,i=Q5(i);;){var a=X5(i);if(a.expr==null)return Vt("The selector `"+e+"`is invalid"),!1;var o=a.match.slice(1),s=a.expr.populate(r,n,o);if(s===!1)return!1;if(s!=null&&(n=s),i=a.remaining,i.match(/^\s*$/))break}var u=r[r.length-1];r.currentSubject!=null&&(u.subject=r.currentSubject),u.edgeCount=r.edgeCount,u.compoundCount=r.compoundCount;for(var l=0;l<r.length;l++){var c=r[l];if(c.compoundCount>0&&c.edgeCount>0)return Vt("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return Vt("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;c.edgeCount===1&&Vt("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},eB=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(c){return c??""},r=function(c){return Ue(c)?'"'+c+'"':e(c)},i=function(c){return" "+c+" "},n=function(c,d){var f=c.type,p=c.value;switch(f){case Oe.GROUP:{var h=e(p);return h.substring(0,h.length-1)}case Oe.DATA_COMPARE:{var g=c.field,v=c.operator;return"["+g+i(e(v))+r(p)+"]"}case Oe.DATA_BOOL:{var m=c.operator,y=c.field;return"["+e(m)+y+"]"}case Oe.DATA_EXIST:{var b=c.field;return"["+b+"]"}case Oe.META_COMPARE:{var w=c.operator,T=c.field;return"[["+T+i(e(w))+r(p)+"]]"}case Oe.STATE:return p;case Oe.ID:return"#"+p;case Oe.CLASS:return"."+p;case Oe.PARENT:case Oe.CHILD:return a(c.parent,d)+i(">")+a(c.child,d);case Oe.ANCESTOR:case Oe.DESCENDANT:return a(c.ancestor,d)+" "+a(c.descendant,d);case Oe.COMPOUND_SPLIT:{var x=a(c.left,d),_=a(c.subject,d),D=a(c.right,d);return x+(x.length>0?" ":"")+_+D}case Oe.TRUE:return""}},a=function(c,d){return c.checks.reduce(function(f,p,h){return f+(d===c&&h===0?"$":"")+n(p,d)},"")},o="",s=0;s<this.length;s++){var u=this[s];o+=a(u,u.subject),this.length>1&&s<this.length-1&&(o+=", ")}return this.toStringCache=o,o},tB={parse:J5,toString:eB},zT=function(e,r,i){var n,a=Ue(e),o=Te(e),s=Ue(i),u,l,c=!1,d=!1,f=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),d=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),c=!0),(a||s||c)&&(u=!a&&!o?"":""+e,l=""+i),c&&(e=u=u.toLowerCase(),i=l=l.toLowerCase()),r){case"*=":n=u.indexOf(l)>=0;break;case"$=":n=u.indexOf(l,u.length-l.length)>=0;break;case"^=":n=u.indexOf(l)===0;break;case"=":n=e===i;break;case">":f=!0,n=e>i;break;case">=":f=!0,n=e>=i;break;case"<":f=!0,n=e<i;break;case"<=":f=!0,n=e<=i;break;default:n=!1;break}return d&&(e!=null||!f)&&(n=!n),n},rB=function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},iB=function(e){return e!==void 0},_0=function(e,r){return e.data(r)},nB=function(e,r){return e[r]()},mr=[],ir=function(e,r){return e.checks.every(function(i){return mr[i.type](i,r)})};mr[Oe.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group()};mr[Oe.STATE]=function(t,e){var r=t.value;return K5(r,e)};mr[Oe.ID]=function(t,e){var r=t.value;return e.id()===r};mr[Oe.CLASS]=function(t,e){var r=t.value;return e.hasClass(r)};mr[Oe.META_COMPARE]=function(t,e){var r=t.field,i=t.operator,n=t.value;return zT(nB(e,r),i,n)};mr[Oe.DATA_COMPARE]=function(t,e){var r=t.field,i=t.operator,n=t.value;return zT(_0(e,r),i,n)};mr[Oe.DATA_BOOL]=function(t,e){var r=t.field,i=t.operator;return rB(_0(e,r),i)};mr[Oe.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,iB(_0(e,r))};mr[Oe.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],i=t.nodes[1],n=e.source(),a=e.target();return ir(r,n)&&ir(i,a)||ir(i,n)&&ir(r,a)};mr[Oe.NODE_NEIGHBOR]=function(t,e){return ir(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&ir(t.neighbor,r)})};mr[Oe.DIRECTED_EDGE]=function(t,e){return ir(t.source,e.source())&&ir(t.target,e.target())};mr[Oe.NODE_SOURCE]=function(t,e){return ir(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&ir(t.target,r)})};mr[Oe.NODE_TARGET]=function(t,e){return ir(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&ir(t.source,r)})};mr[Oe.CHILD]=function(t,e){return ir(t.child,e)&&ir(t.parent,e.parent())};mr[Oe.PARENT]=function(t,e){return ir(t.parent,e)&&e.children().some(function(r){return ir(t.child,r)})};mr[Oe.DESCENDANT]=function(t,e){return ir(t.descendant,e)&&e.ancestors().some(function(r){return ir(t.ancestor,r)})};mr[Oe.ANCESTOR]=function(t,e){return ir(t.ancestor,e)&&e.descendants().some(function(r){return ir(t.descendant,r)})};mr[Oe.COMPOUND_SPLIT]=function(t,e){return ir(t.subject,e)&&ir(t.left,e)&&ir(t.right,e)};mr[Oe.TRUE]=function(){return!0};mr[Oe.COLLECTION]=function(t,e){var r=t.value;return r.has(e)};mr[Oe.FILTER]=function(t,e){var r=t.value;return r(e)};var aB=function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===Oe.ID)return e.getElementById(r[0].checks[0].value).collection();var i=function(a){for(var o=0;o<r.length;o++){var s=r[o];if(ir(s,a))return!0}return!1};return r.text()==null&&(i=function(){return!0}),e.filter(i)},oB=function(e){for(var r=this,i=0;i<r.length;i++){var n=r[i];if(ir(n,e))return!0}return!1},sB={matches:oB,filter:aB},Qa=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||Ue(e)&&e.match(/^\s*$/)||(Vi(e)?this.addQuery({checks:[{type:Oe.COLLECTION,value:e.collection()}]}):cr(e)?this.addQuery({checks:[{type:Oe.FILTER,value:e}]}):Ue(e)?this.parse(e)||(this.invalid=!0):ar("A selector must be created from a string; found "))},Ja=Qa.prototype;[tB,sB].forEach(function(t){return $e(Ja,t)});Ja.text=function(){return this.inputText};Ja.size=function(){return this.length};Ja.eq=function(t){return this[t]};Ja.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()};Ja.addQuery=function(t){this[this.length++]=t};Ja.selector=Ja.toString;var Ga={allAre:function(e){var r=new Qa(e);return this.every(function(i){return r.matches(i)})},is:function(e){var r=new Qa(e);return this.some(function(i){return r.matches(i)})},some:function(e,r){for(var i=0;i<this.length;i++){var n=r?e.apply(r,[this[i],i,this]):e(this[i],i,this);if(n)return!0}return!1},every:function(e,r){for(var i=0;i<this.length;i++){var n=r?e.apply(r,[this[i],i,this]):e(this[i],i,this);if(!n)return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,i=e.length;return r!==i?!1:r===1?this[0]===e[0]:this.every(function(n){return e.hasElementWithId(n.id())})},anySame:function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id())})},allAreNeighbors:function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(i){return r.hasElementWithId(i.id())})},contains:function(e){e=this.cy().collection(e);var r=this;return e.every(function(i){return r.hasElementWithId(i.id())})}};Ga.allAreNeighbours=Ga.allAreNeighbors;Ga.has=Ga.contains;Ga.equal=Ga.equals=Ga.same;var Qi=function(e,r){return function(n,a,o,s){var u=n,l=this,c;if(u==null?c="":Vi(u)&&u.length===1&&(c=u.id()),l.length===1&&c){var d=l[0]._private,f=d.traversalCache=d.traversalCache||{},p=f[r]=f[r]||[],h=Uo(c),g=p[h];return g||(p[h]=e.call(l,n,a,o,s))}else return e.call(l,n,a,o,s)}},pu={parent:function(e){var r=[];if(this.length===1){var i=this[0]._private.parent;if(i)return i}for(var n=0;n<this.length;n++){var a=this[n],o=a._private.parent;o&&r.push(o)}return this.spawn(r,!0).filter(e)},parents:function(e){for(var r=[],i=this.parent();i.nonempty();){for(var n=0;n<i.length;n++){var a=i[n];r.push(a)}i=i.parent()}return this.spawn(r,!0).filter(e)},commonAncestors:function(e){for(var r,i=0;i<this.length;i++){var n=this[i],a=n.parents();r=r||a,r=r.intersect(a)}return r.filter(e)},orphans:function(e){return this.stdFilter(function(r){return r.isOrphan()}).filter(e)},nonorphans:function(e){return this.stdFilter(function(r){return r.isChild()}).filter(e)},children:Qi(function(t){for(var e=[],r=0;r<this.length;r++)for(var i=this[r],n=i._private.children,a=0;a<n.length;a++)e.push(n[a]);return this.spawn(e,!0).filter(t)},"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},isChildless:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},isChild:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},descendants:function(e){var r=[];function i(n){for(var a=0;a<n.length;a++){var o=n[a];r.push(o),o.children().nonempty()&&i(o.children())}}return i(this.children()),this.spawn(r,!0).filter(e)}};function x0(t,e,r,i){for(var n=[],a=new gu,o=t.cy(),s=o.hasCompoundNodes(),u=0;u<t.length;u++){var l=t[u];r?n.push(l):s&&i(n,a,l)}for(;n.length>0;){var c=n.shift();e(c),a.add(c.id()),s&&i(n,a,c)}return t}function VT(t,e,r){if(r.isParent())for(var i=r._private.children,n=0;n<i.length;n++){var a=i[n];e.has(a.id())||t.push(a)}}pu.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return x0(this,t,e,VT)};function HT(t,e,r){if(r.isChild()){var i=r._private.parent;e.has(i.id())||t.push(i)}}pu.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return x0(this,t,e,HT)};function uB(t,e,r){HT(t,e,r),VT(t,e,r)}pu.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return x0(this,t,e,uB)};pu.ancestors=pu.parents;var Vl,UT;Vl=UT={data:zt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:zt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:zt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:zt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:zt.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:zt.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Vl.attr=Vl.data;Vl.removeAttr=Vl.removeData;var lB=UT,Fh={};function Ig(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var i=0,n=r[0],a=n._private.edges,o=0;o<a.length;o++){var s=a[o];!e&&s.isLoop()||(i+=t(n,s))}return i}else return}}$e(Fh,{degree:Ig(function(t,e){return e.source().same(e.target())?2:1}),indegree:Ig(function(t,e){return e.target().same(t)?1:0}),outdegree:Ig(function(t,e){return e.source().same(t)?1:0})});function Qs(t,e){return function(r){for(var i,n=this.nodes(),a=0;a<n.length;a++){var o=n[a],s=o[t](r);s!==void 0&&(i===void 0||e(s,i))&&(i=s)}return i}}$e(Fh,{minDegree:Qs("degree",function(t,e){return t<e}),maxDegree:Qs("degree",function(t,e){return t>e}),minIndegree:Qs("indegree",function(t,e){return t<e}),maxIndegree:Qs("indegree",function(t,e){return t>e}),minOutdegree:Qs("outdegree",function(t,e){return t<e}),maxOutdegree:Qs("outdegree",function(t,e){return t>e})});$e(Fh,{totalDegree:function(e){for(var r=0,i=this.nodes(),n=0;n<i.length;n++)r+=i[n].degree(e);return r}});var Cn,jT,qT=function(e,r,i){for(var n=0;n<e.length;n++){var a=e[n];if(!a.locked()){var o=a._private.position,s={x:r.x!=null?r.x-o.x:0,y:r.y!=null?r.y-o.y:0};a.isParent()&&!(s.x===0&&s.y===0)&&a.children().shift(s,i),a.dirtyBoundingBoxCache()}}},sx={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,r){qT(e,r,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};Cn=jT={position:zt.data(sx),silentPosition:zt.data($e({},sx,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,r){qT(e,r,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,r){if(Dt(e))r?this.silentPosition(e):this.position(e);else if(cr(e)){var i=e,n=this.cy();n.startBatch();for(var a=0;a<this.length;a++){var o=this[a],s=void 0;(s=i(o,a))&&(r?o.silentPosition(s):o.position(s))}n.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,r,i){var n;if(Dt(e)?(n={x:Te(e.x)?e.x:0,y:Te(e.y)?e.y:0},i=r):Ue(e)&&Te(r)&&(n={x:0,y:0},n[e]=r),n!=null){var a=this.cy();a.startBatch();for(var o=0;o<this.length;o++){var s=this[o];if(!(a.hasCompoundNodes()&&s.isChild()&&s.ancestors().anySame(this))){var u=s.position(),l={x:u.x+n.x,y:u.y+n.y};i?s.silentPosition(l):s.position(l)}}a.endBatch()}return this},silentShift:function(e,r){return Dt(e)?this.shift(e,!0):Ue(e)&&Te(r)&&this.shift(e,r,!0),this},renderedPosition:function(e,r){var i=this[0],n=this.cy(),a=n.zoom(),o=n.pan(),s=Dt(e)?e:void 0,u=s!==void 0||r!==void 0&&Ue(e);if(i&&i.isNode())if(u)for(var l=0;l<this.length;l++){var c=this[l];r!==void 0?c.position(e,(r-o[e])/a):s!==void 0&&c.position(yT(s,a,o))}else{var d=i.position();return s=Ih(d,a,o),e===void 0?s:s[e]}else if(!u)return;return this},relativePosition:function(e,r){var i=this[0],n=this.cy(),a=Dt(e)?e:void 0,o=a!==void 0||r!==void 0&&Ue(e),s=n.hasCompoundNodes();if(i&&i.isNode())if(o)for(var u=0;u<this.length;u++){var l=this[u],c=s?l.parent():null,d=c&&c.length>0,f=d;d&&(c=c[0]);var p=f?c.position():{x:0,y:0};r!==void 0?l.position(e,r+p[e]):a!==void 0&&l.position({x:a.x+p.x,y:a.y+p.y})}else{var h=i.position(),g=s?i.parent():null,v=g&&g.length>0,m=v;v&&(g=g[0]);var y=m?g.position():{x:0,y:0};return a={x:h.x-y.x,y:h.y-y.y},e===void 0?a:a[e]}else if(!o)return;return this}};Cn.modelPosition=Cn.point=Cn.position;Cn.modelPositions=Cn.points=Cn.positions;Cn.renderedPoint=Cn.renderedPosition;Cn.relativePoint=Cn.relativePosition;var cB=jT,vu=function(e){switch(e){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},mu=function(e){switch(e){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}},dB=function(e){switch(e){case"left":return"right";case"right":return"left";case"left-inside":return"left";case"right-inside":return"right";default:return"center"}},du,no;du=no={};no.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),i=r.zoom(),n=r.pan(),a=e.x1*i+n.x,o=e.x2*i+n.x,s=e.y1*i+n.y,u=e.y2*i+n.y;return{x1:a,x2:o,y1:s,y2:u,w:o-a,h:u-s}};no.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var i=r._private;i.compoundBoundsClean=!1,i.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};no.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(o){if(!o.isParent())return;var s=o._private,u=o.children(),l=o.pstyle("compound-sizing-wrt-labels").value==="include",c={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},d=u.boundingBox({includeLabels:l,includeOverlays:!1,useCache:!1}),f=s.position;(d.w===0||d.h===0)&&(d={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},d.x1=f.x-d.w/2,d.x2=f.x+d.w/2,d.y1=f.y-d.h/2,d.y2=f.y+d.h/2);function p(E,M,k){var I=0,A=0,O=M+k;return E>0&&O>0&&(I=M/O*E,A=k/O*E),{biasDiff:I,biasComplementDiff:A}}function h(E,M,k,I){if(k.units==="%")switch(I){case"width":return E>0?k.pfValue*E:0;case"height":return M>0?k.pfValue*M:0;case"average":return E>0&&M>0?k.pfValue*(E+M)/2:0;case"min":return E>0&&M>0?E>M?k.pfValue*M:k.pfValue*E:0;case"max":return E>0&&M>0?E>M?k.pfValue*E:k.pfValue*M:0;default:return 0}else return k.units==="px"?k.pfValue:0}var g=c.width.left.value;c.width.left.units==="px"&&c.width.val>0&&(g=g*100/c.width.val);var v=c.width.right.value;c.width.right.units==="px"&&c.width.val>0&&(v=v*100/c.width.val);var m=c.height.top.value;c.height.top.units==="px"&&c.height.val>0&&(m=m*100/c.height.val);var y=c.height.bottom.value;c.height.bottom.units==="px"&&c.height.val>0&&(y=y*100/c.height.val);var b=p(c.width.val-d.w,g,v),w=b.biasDiff,T=b.biasComplementDiff,x=p(c.height.val-d.h,m,y),_=x.biasDiff,D=x.biasComplementDiff;s.autoPadding=h(d.w,d.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),s.autoWidth=Math.max(d.w,c.width.val),f.x=(-w+d.x1+d.x2+T)/2,s.autoHeight=Math.max(d.h,c.height.val),f.y=(-_+d.y1+d.y2+D)/2}for(var i=0;i<this.length;i++){var n=this[i],a=n._private;(!a.compoundBoundsClean||t)&&(r(n),e.batching()||(a.compoundBoundsClean=!0))}return this};var Xi=function(e){return e===1/0||e===-1/0?0:e},bn=function(e,r,i,n,a){n-r===0||a-i===0||r==null||i==null||n==null||a==null||(e.x1=r<e.x1?r:e.x1,e.x2=n>e.x2?n:e.x2,e.y1=i<e.y1?i:e.y1,e.y2=a>e.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},ja=function(e,r){return r==null?e:bn(e,r.x1,r.y1,r.x2,r.y2)},xl=function(e,r,i){return di(e,r,i)},Kf=function(e,r,i){if(!r.cy().headless()){var n=r._private,a=n.rstyle,o=a.arrowWidth/2,s=r.pstyle(i+"-arrow-shape").value,u,l;if(s!=="none"){i==="source"?(u=a.srcX,l=a.srcY):i==="target"?(u=a.tgtX,l=a.tgtY):(u=a.midX,l=a.midY);var c=n.arrowBounds=n.arrowBounds||{},d=c[i]=c[i]||{};d.x1=u-o,d.y1=l-o,d.x2=u+o,d.y2=l+o,d.w=d.x2-d.x1,d.h=d.y2-d.y1,ih(d,1),bn(e,d.x1,d.y1,d.x2,d.y2)}}},Ag=function(e,r,i){if(!r.cy().headless()){var n;i?n=i+"-":n="";var a=r._private,o=a.rstyle,s=r.pstyle(n+"label").strValue;if(s){var u=r.pstyle("text-halign"),l=r.pstyle("text-valign"),c=xl(o,"labelWidth",i),d=xl(o,"labelHeight",i),f=xl(o,"labelX",i),p=xl(o,"labelY",i),h=r.pstyle(n+"text-margin-x").pfValue,g=r.pstyle(n+"text-margin-y").pfValue,v=r.isEdge(),m=r.pstyle(n+"text-rotation"),y=r.pstyle("text-outline-width").pfValue,b=r.pstyle("text-border-width").pfValue,w=b/2,T=r.pstyle("text-background-padding").pfValue,x=2,_=d,D=c,E=D/2,M=_/2,k,I,A,O;if(v)k=f-E,I=f+E,A=p-M,O=p+M;else{switch(vu(u.value)){case"left":k=f-D,I=f;break;case"center":k=f-E,I=f+E;break;case"right":k=f,I=f+D;break}switch(mu(l.value)){case"top":A=p-_,O=p;break;case"center":A=p-M,O=p+M;break;case"bottom":A=p,O=p+_;break}}var N=h-Math.max(y,w)-T-x,F=h+Math.max(y,w)+T+x,P=g-Math.max(y,w)-T-x,z=g+Math.max(y,w)+T+x;k+=N,I+=F,A+=P,O+=z;var $=i||"main",G=a.labelBounds,V=G[$]=G[$]||{};V.x1=k,V.y1=A,V.x2=I,V.y2=O,V.w=I-k,V.h=O-A,V.leftPad=N,V.rightPad=F,V.topPad=P,V.botPad=z;var W=v&&m.strValue==="autorotate",ue=m.pfValue!=null&&m.pfValue!==0;if(W||ue){var he=W?xl(a.rstyle,"labelAngle",i):m.pfValue,le=Math.cos(he),me=Math.sin(he),be=(k+I)/2,Se=(A+O)/2;if(!v){switch(vu(u.value)){case"left":be=I;break;case"right":be=k;break}switch(mu(l.value)){case"top":Se=O;break;case"bottom":Se=A;break}}var se=function(Je,Ge){return Je=Je-be,Ge=Ge-Se,{x:Je*le-Ge*me+be,y:Je*me+Ge*le+Se}},q=se(k,A),X=se(k,O),J=se(I,A),ne=se(I,O);k=Math.min(q.x,X.x,J.x,ne.x),I=Math.max(q.x,X.x,J.x,ne.x),A=Math.min(q.y,X.y,J.y,ne.y),O=Math.max(q.y,X.y,J.y,ne.y)}var we=$+"Rot",Re=G[we]=G[we]||{};Re.x1=k,Re.y1=A,Re.x2=I,Re.y2=O,Re.w=I-k,Re.h=O-A,bn(e,k,A,I,O),bn(a.labelBounds.all,k,A,I,O)}return e}},ux=function(e,r){if(!r.cy().headless()){var i=r.pstyle("outline-opacity").value,n=r.pstyle("outline-width").value,a=r.pstyle("outline-offset").value,o=n+a;WT(e,r,i,o,"outside",o/2)}},WT=function(e,r,i,n,a,o){if(!(i===0||n<=0||a==="inside")){var s=r.cy(),u=s.renderer(),l=u.nodeShapes[u.getNodeShape(r)];if(l){var c=r.position(),d=c.x,f=c.y,p=r.width(),h=r.height();if(l.hasMiterBounds){a==="center"&&(n/=2);var g=l.miterBounds(d,f,p,h,n);ja(e,g)}else o!=null&&o>0&&nh(e,[o,o,o,o])}}},fB=function(e,r){if(!r.cy().headless()){var i=r.pstyle("border-opacity").value,n=r.pstyle("border-width").pfValue,a=r.pstyle("border-position").value;WT(e,r,i,n,a)}},hB=function(e,r){var i=e._private.cy,n=i.styleEnabled(),a=i.headless(),o=fi(),s=e._private,u=e.isNode(),l=e.isEdge(),c,d,f,p,h,g,v=s.rstyle,m=u&&n?e.pstyle("bounds-expansion").pfValue:[0],y=function(vt){return vt.pstyle("display").value!=="none"},b=!n||y(e)&&(!l||y(e.source())&&y(e.target()));if(b){var w=0,T=0;n&&r.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(T=e.pstyle("overlay-padding").value));var x=0,_=0;n&&r.includeUnderlays&&(x=e.pstyle("underlay-opacity").value,x!==0&&(_=e.pstyle("underlay-padding").value));var D=Math.max(T,_),E=0,M=0;if(n&&(E=e.pstyle("width").pfValue,M=E/2),u&&r.includeNodes){var k=e.position();h=k.x,g=k.y;var I=e.outerWidth(),A=I/2,O=e.outerHeight(),N=O/2;c=h-A,d=h+A,f=g-N,p=g+N,bn(o,c,f,d,p),n&&ux(o,e),n&&r.includeOutlines&&!a&&ux(o,e),n&&fB(o,e)}else if(l&&r.includeEdges)if(n&&!a){var F=e.pstyle("curve-style").strValue;if(c=Math.min(v.srcX,v.midX,v.tgtX),d=Math.max(v.srcX,v.midX,v.tgtX),f=Math.min(v.srcY,v.midY,v.tgtY),p=Math.max(v.srcY,v.midY,v.tgtY),c-=M,d+=M,f-=M,p+=M,bn(o,c,f,d,p),F==="haystack"){var P=v.haystackPts;if(P&&P.length===2){if(c=P[0].x,f=P[0].y,d=P[1].x,p=P[1].y,c>d){var z=c;c=d,d=z}if(f>p){var $=f;f=p,p=$}bn(o,c-M,f-M,d+M,p+M)}}else if(F==="bezier"||F==="unbundled-bezier"||qa(F,"segments")||qa(F,"taxi")){var G;switch(F){case"bezier":case"unbundled-bezier":G=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":G=v.linePts;break}if(G!=null)for(var V=0;V<G.length;V++){var W=G[V];c=W.x-M,d=W.x+M,f=W.y-M,p=W.y+M,bn(o,c,f,d,p)}}}else{var ue=e.source(),he=ue.position(),le=e.target(),me=le.position();if(c=he.x,d=me.x,f=he.y,p=me.y,c>d){var be=c;c=d,d=be}if(f>p){var Se=f;f=p,p=Se}c-=M,d+=M,f-=M,p+=M,bn(o,c,f,d,p)}if(n&&r.includeEdges&&l&&(Kf(o,e,"mid-source"),Kf(o,e,"mid-target"),Kf(o,e,"source"),Kf(o,e,"target")),n){var se=e.pstyle("ghost").value==="yes";if(se){var q=e.pstyle("ghost-offset-x").pfValue,X=e.pstyle("ghost-offset-y").pfValue;bn(o,o.x1+q,o.y1+X,o.x2+q,o.y2+X)}}var J=s.bodyBounds=s.bodyBounds||{};Gw(J,o),nh(J,m),ih(J,1),n&&(c=o.x1,d=o.x2,f=o.y1,p=o.y2,bn(o,c-D,f-D,d+D,p+D));var ne=s.overlayBounds=s.overlayBounds||{};Gw(ne,o),nh(ne,m),ih(ne,1);var we=s.labelBounds=s.labelBounds||{};we.all!=null?GN(we.all):we.all=fi(),n&&r.includeLabels&&(r.includeMainLabels&&Ag(o,e,null),l&&(r.includeSourceLabels&&Ag(o,e,"source"),r.includeTargetLabels&&Ag(o,e,"target")))}return o.x1=Xi(o.x1),o.y1=Xi(o.y1),o.x2=Xi(o.x2),o.y2=Xi(o.y2),o.w=Xi(o.x2-o.x1),o.h=Xi(o.y2-o.y1),o.w>0&&o.h>0&&b&&(nh(o,m),ih(o,1)),o},$T=function(e){var r=0,i=function(o){return(o?1:0)<<r++},n=0;return n+=i(e.incudeNodes),n+=i(e.includeEdges),n+=i(e.includeLabels),n+=i(e.includeMainLabels),n+=i(e.includeSourceLabels),n+=i(e.includeTargetLabels),n+=i(e.includeOverlays),n+=i(e.includeOutlines),n},GT=function(e){var r=function(s){return Math.round(s)};if(e.isEdge()){var i=e.source().position(),n=e.target().position();return Hw([r(i.x),r(i.y),r(n.x),r(n.y)])}else{var a=e.position();return Hw([r(a.x),r(a.y)])}},lx=function(e,r){var i=e._private,n,a=e.isEdge(),o=r==null?cx:$T(r),s=o===cx;if(i.bbCache==null?(n=hB(e,Hl),i.bbCache=n,i.bbCachePosKey=GT(e)):n=i.bbCache,!s){var u=e.isNode();n=fi(),(r.includeNodes&&u||r.includeEdges&&!u)&&(r.includeOverlays?ja(n,i.overlayBounds):ja(n,i.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!a||r.includeSourceLabels&&r.includeTargetLabels)?ja(n,i.labelBounds.all):(r.includeMainLabels&&ja(n,i.labelBounds.mainRot),r.includeSourceLabels&&ja(n,i.labelBounds.sourceRot),r.includeTargetLabels&&ja(n,i.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},Hl={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},cx=$T(Hl),dx=Zr(Hl);no.boundingBox=function(t){var e,r=t===void 0||t.useCache===void 0||t.useCache===!0,i=fu(function(c){var d=c._private;return d.bbCache==null||d.styleDirty||d.bbCachePosKey!==GT(c)},function(c){return c.id()});if(r&&this.length===1&&!i(this[0]))t===void 0?t=Hl:t=dx(t),e=lx(this[0],t);else{e=fi(),t=t||Hl;var n=dx(t),a=this,o=a.cy(),s=o.styleEnabled();this.edges().forEach(i),this.nodes().forEach(i),s&&this.recalculateRenderedStyle(r),this.updateCompoundBounds(!r);for(var u=0;u<a.length;u++){var l=a[u];i(l)&&l.dirtyBoundingBoxCache(),ja(e,lx(l,n))}}return e.x1=Xi(e.x1),e.y1=Xi(e.y1),e.x2=Xi(e.x2),e.y2=Xi(e.y2),e.w=Xi(e.x2-e.x1),e.h=Xi(e.y2-e.y1),e};no.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this};no.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),i=r.hasCompoundNodes(),n=r.collection();if(i&&(n=e.filter(function(l){return l.isParent()}),e=e.not(n)),Dt(t)){var a=t;t=function(){return a}}var o=function(c,d){return c._private.bbAtOldPos=t(c,d)},s=function(c){return c._private.bbAtOldPos};r.startBatch(),e.forEach(o).silentPositions(t),i&&(n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),n.updateCompoundBounds(!0));var u=$N(this.boundingBox({useCache:!1}));return e.silentPositions(s),i&&(n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),n.updateCompoundBounds(!0)),r.endBatch(),u};du.boundingbox=du.bb=du.boundingBox;du.renderedBoundingbox=du.renderedBoundingBox;var pB=no,Il,Ql;Il=Ql={};var YT=function(e){e.uppercaseName=Dw(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=Dw(e.outerName),Il[e.name]=function(){var i=this[0],n=i._private,a=n.cy,o=a._private.styleEnabled;if(i)if(o){if(i.isParent())return i.updateCompoundBounds(),n[e.autoName]||0;var s=i.pstyle(e.name);return s.strValue==="label"?(i.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):s.pfValue}else return 1},Il["outer"+e.uppercaseName]=function(){var i=this[0],n=i._private,a=n.cy,o=a._private.styleEnabled;if(i)if(o){var s=i[e.name](),u=i.pstyle("border-position").value,l;u==="center"?l=i.pstyle("border-width").pfValue:u==="outside"?l=2*i.pstyle("border-width").pfValue:l=0;var c=2*i.padding();return s+l+c}else return 1},Il["rendered"+e.uppercaseName]=function(){var i=this[0];if(i){var n=i[e.name]();return n*this.cy().zoom()}},Il["rendered"+e.uppercaseOuterName]=function(){var i=this[0];if(i){var n=i[e.outerName]();return n*this.cy().zoom()}}};YT({name:"width"});YT({name:"height"});Ql.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue};Ql.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()};Ql.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var vB=Ql,mB=function(e,r){if(e.isEdge()&&e.takesUpSpace())return r(e)},gB=function(e,r){if(e.isEdge()&&e.takesUpSpace()){var i=e.cy();return Ih(r(e),i.zoom(),i.pan())}},yB=function(e,r){if(e.isEdge()&&e.takesUpSpace()){var i=e.cy(),n=i.pan(),a=i.zoom();return r(e).map(function(o){return Ih(o,a,n)})}},bB=function(e){return e.renderer().getControlPoints(e)},CB=function(e){return e.renderer().getSegmentPoints(e)},wB=function(e){return e.renderer().getSourceEndpoint(e)},_B=function(e){return e.renderer().getTargetEndpoint(e)},xB=function(e){return e.renderer().getEdgeMidpoint(e)},fx={controlPoints:{get:bB,mult:!0},segmentPoints:{get:CB,mult:!0},sourceEndpoint:{get:wB},targetEndpoint:{get:_B},midpoint:{get:xB}},TB=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},SB=Object.keys(fx).reduce(function(t,e){var r=fx[e],i=TB(e);return t[e]=function(){return mB(this,r.get)},r.mult?t[i]=function(){return yB(this,r.get)}:t[i]=function(){return gB(this,r.get)},t},{}),DB=$e({},cB,pB,vB,SB);var KT=function(e,r){this.recycle(e,r)};function Tl(){return!1}function Zf(){return!0}KT.prototype={instanceString:function(){return"event"},recycle:function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Tl,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Zf:Tl):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var i=this.position,n=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:i.x*n+a.x,y:i.y*n+a.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Zf;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Zf;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Zf,this.stopPropagation()},isDefaultPrevented:Tl,isPropagationStopped:Tl,isImmediatePropagationStopped:Tl};var ZT=/^([^.]+)(\.(?:[^.]+))?$/,EB=".*",XT={qualifierCompare:function(e,r){return e===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},hx=Object.keys(XT),kB={};function Bh(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kB,e=arguments.length>1?arguments[1]:void 0,r=0;r<hx.length;r++){var i=hx[r];this[i]=t[i]||XT[i]}this.context=e||this.context,this.listeners=[],this.emitting=0}var eo=Bh.prototype,QT=function(e,r,i,n,a,o,s){cr(n)&&(a=n,n=null),s&&(o==null?o=s:o=$e({},o,s));for(var u=Zt(i)?i:i.split(/\s+/),l=0;l<u.length;l++){var c=u[l];if(!Ka(c)){var d=c.match(ZT);if(d){var f=d[1],p=d[2]?d[2]:null,h=r(e,c,f,p,n,a,o);if(h===!1)break}}}},px=function(e,r){return e.addEventFields(e.context,r),new KT(r.type,r)},MB=function(e,r,i){if(PP(i)){r(e,i);return}else if(Dt(i)){r(e,px(e,i));return}for(var n=Zt(i)?i:i.split(/\s+/),a=0;a<n.length;a++){var o=n[a];if(!Ka(o)){var s=o.match(ZT);if(s){var u=s[1],l=s[2]?s[2]:null,c=px(e,{type:u,namespace:l,target:e.context});r(e,c)}}}};eo.on=eo.addListener=function(t,e,r,i,n){return QT(this,function(a,o,s,u,l,c,d){cr(c)&&a.listeners.push({event:o,callback:c,type:s,namespace:u,qualifier:l,conf:d})},t,e,r,i,n),this};eo.one=function(t,e,r,i){return this.on(t,e,r,i,{one:!0})};eo.removeListener=eo.off=function(t,e,r,i){var n=this;this.emitting!==0&&(this.listeners=mN(this.listeners));for(var a=this.listeners,o=function(l){var c=a[l];QT(n,function(d,f,p,h,g,v){if((c.type===p||t==="*")&&(!h&&c.namespace!==".*"||c.namespace===h)&&(!g||d.qualifierCompare(c.qualifier,g))&&(!v||c.callback===v))return a.splice(l,1),!1},t,e,r,i)},s=a.length-1;s>=0;s--)o(s);return this};eo.removeAllListeners=function(){return this.removeListener("*")};eo.emit=eo.trigger=function(t,e,r){var i=this.listeners,n=i.length;return this.emitting++,Zt(e)||(e=[e]),MB(this,function(a,o){r!=null&&(i=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],n=i.length);for(var s=function(){var c=i[u];if(c.type===o.type&&(!c.namespace||c.namespace===o.namespace||c.namespace===EB)&&a.eventMatches(a.context,c,o)){var d=[o];e!=null&&yN(d,e),a.beforeEmit(a.context,c,o),c.conf&&c.conf.one&&(a.listeners=a.listeners.filter(function(h){return h!==c}));var f=a.callbackContext(a.context,c,o),p=c.callback.apply(f,d);a.afterEmit(a.context,c,o),p===!1&&(o.stopPropagation(),o.preventDefault())}},u=0;u<n;u++)s();a.bubble(a.context)&&!o.isPropagationStopped()&&a.parent(a.context).emit(o,e)},t),this.emitting--,this};var IB={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,i){var n=r.qualifier;return n!=null?e!==i.target&&$l(i.target)&&n.matches(i.target):!0},addEventFields:function(e,r){r.cy=e.cy(),r.target=e},callbackContext:function(e,r,i){return r.qualifier!=null?i.target:e},beforeEmit:function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},Xf=function(e){return Ue(e)?new Qa(e):e},JT={createEmitter:function(){for(var e=0;e<this.length;e++){var r=this[e],i=r._private;i.emitter||(i.emitter=new Bh(IB,r))}return this},emitter:function(){return this._private.emitter},on:function(e,r,i){for(var n=Xf(r),a=0;a<this.length;a++){var o=this[a];o.emitter().on(e,n,i)}return this},removeListener:function(e,r,i){for(var n=Xf(r),a=0;a<this.length;a++){var o=this[a];o.emitter().removeListener(e,n,i)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},one:function(e,r,i){for(var n=Xf(r),a=0;a<this.length;a++){var o=this[a];o.emitter().one(e,n,i)}return this},once:function(e,r,i){for(var n=Xf(r),a=0;a<this.length;a++){var o=this[a];o.emitter().on(e,n,i,{once:!0,onceCollection:this})}},emit:function(e,r){for(var i=0;i<this.length;i++){var n=this[i];n.emitter().emit(e,r)}return this},emitAndNotify:function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this}};zt.eventAliasesOn(JT);var eS={nodes:function(e){return this.filter(function(r){return r.isNode()}).filter(e)},edges:function(e){return this.filter(function(r){return r.isEdge()}).filter(e)},byGroup:function(){for(var e=this.spawn(),r=this.spawn(),i=0;i<this.length;i++){var n=this[i];n.isNode()?e.push(n):r.push(n)}return{nodes:e,edges:r}},filter:function(e,r){if(e===void 0)return this;if(Ue(e)||Vi(e))return new Qa(e).filter(this);if(cr(e)){for(var i=this.spawn(),n=this,a=0;a<n.length;a++){var o=n[a],s=r?e.apply(r,[o,a,n]):e(o,a,n);s&&i.push(o)}return i}return this.spawn()},not:function(e){if(e){Ue(e)&&(e=this.filter(e));for(var r=this.spawn(),i=0;i<this.length;i++){var n=this[i],a=e.has(n);a||r.push(n)}return r}else return this},absoluteComplement:function(){var e=this.cy();return e.mutableElements().not(this)},intersect:function(e){if(Ue(e)){var r=e;return this.filter(r)}for(var i=this.spawn(),n=this,a=e,o=this.length<e.length,s=o?n:a,u=o?a:n,l=0;l<s.length;l++){var c=s[l];u.has(c)&&i.push(c)}return i},xor:function(e){var r=this._private.cy;Ue(e)&&(e=r.$(e));var i=this.spawn(),n=this,a=e,o=function(u,l){for(var c=0;c<u.length;c++){var d=u[c],f=d._private.data.id,p=l.hasElementWithId(f);p||i.push(d)}};return o(n,a),o(a,n),i},diff:function(e){var r=this._private.cy;Ue(e)&&(e=r.$(e));var i=this.spawn(),n=this.spawn(),a=this.spawn(),o=this,s=e,u=function(c,d,f){for(var p=0;p<c.length;p++){var h=c[p],g=h._private.data.id,v=d.hasElementWithId(g);v?a.merge(h):f.push(h)}};return u(o,s,i),u(s,o,n),{left:i,right:n,both:a}},add:function(e){var r=this._private.cy;if(!e)return this;if(Ue(e)){var i=e;e=r.mutableElements().filter(i)}for(var n=this.spawnSelf(),a=0;a<e.length;a++){var o=e[a],s=!this.has(o);s&&n.push(o)}return n},merge:function(e){var r=this._private,i=r.cy;if(!e)return this;if(e&&Ue(e)){var n=e;e=i.mutableElements().filter(n)}for(var a=r.map,o=0;o<e.length;o++){var s=e[o],u=s._private.data.id,l=!a.has(u);if(l){var c=this.length++;this[c]=s,a.set(u,{ele:s,index:c})}}return this},unmergeAt:function(e){var r=this[e],i=r.id(),n=this._private,a=n.map;this[e]=void 0,a.delete(i);var o=e===this.length-1;if(this.length>1&&!o){var s=this.length-1,u=this[s],l=u._private.data.id;this[s]=void 0,this[e]=u,a.set(l,{ele:u,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,i=e._private.data.id,n=r.map,a=n.get(i);if(!a)return this;var o=a.index;return this.unmergeAt(o),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&Ue(e)){var i=e;e=r.mutableElements().filter(i)}for(var n=0;n<e.length;n++)this.unmergeOne(e[n]);return this},unmergeBy:function(e){for(var r=this.length-1;r>=0;r--){var i=this[r];e(i)&&this.unmergeAt(r)}return this},map:function(e,r){for(var i=[],n=this,a=0;a<n.length;a++){var o=n[a],s=r?e.apply(r,[o,a,n]):e(o,a,n);i.push(s)}return i},reduce:function(e,r){for(var i=r,n=this,a=0;a<n.length;a++)i=e(i,n[a],a,n);return i},max:function(e,r){for(var i=-1/0,n,a=this,o=0;o<a.length;o++){var s=a[o],u=r?e.apply(r,[s,o,a]):e(s,o,a);u>i&&(i=u,n=s)}return{value:i,ele:n}},min:function(e,r){for(var i=1/0,n,a=this,o=0;o<a.length;o++){var s=a[o],u=r?e.apply(r,[s,o,a]):e(s,o,a);u<i&&(i=u,n=s)}return{value:i,ele:n}}},Mt=eS;Mt.u=Mt["|"]=Mt["+"]=Mt.union=Mt.or=Mt.add;Mt["\\"]=Mt["!"]=Mt["-"]=Mt.difference=Mt.relativeComplement=Mt.subtract=Mt.not;Mt.n=Mt["&"]=Mt["."]=Mt.and=Mt.intersection=Mt.intersect;Mt["^"]=Mt["(+)"]=Mt["(-)"]=Mt.symmetricDifference=Mt.symdiff=Mt.xor;Mt.fnFilter=Mt.filterFn=Mt.stdFilter=Mt.filter;Mt.complement=Mt.abscomp=Mt.absoluteComplement;var AB={isNode:function(){return this.group()==="nodes"},isEdge:function(){return this.group()==="edges"},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},tS=function(e,r){var i=e.cy(),n=i.hasCompoundNodes();function a(c){var d=c.pstyle("z-compound-depth");return d.value==="auto"?n?c.zDepth():0:d.value==="bottom"?-1:d.value==="top"?f0:0}var o=a(e)-a(r);if(o!==0)return o;function s(c){var d=c.pstyle("z-index-compare");return d.value==="auto"&&c.isNode()?1:0}var u=s(e)-s(r);if(u!==0)return u;var l=e.pstyle("z-index").value-r.pstyle("z-index").value;return l!==0?l:e.poolIndex()-r.poolIndex()},Ch={forEach:function(e,r){if(cr(e))for(var i=this.length,n=0;n<i;n++){var a=this[n],o=r?e.apply(r,[a,n,this]):e(a,n,this);if(o===!1)break}return this},toArray:function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e},slice:function(e,r){var i=[],n=this.length;r==null&&(r=n),e==null&&(e=0),e<0&&(e=n+e),r<0&&(r=n+r);for(var a=e;a>=0&&a<r&&a<n;a++)i.push(this[a]);return this.spawn(i)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(e){if(!cr(e))return this;var r=this.toArray().sort(e);return this.spawn(r)},sortByZIndex:function(){return this.sort(tS)},zDepth:function(){var e=this[0];if(e){var r=e._private,i=r.group;if(i==="nodes"){var n=r.data.parent?e.parents().size():0;return e.isParent()?n:f0-1}else{var a=r.source,o=r.target,s=a.zDepth(),u=o.zDepth();return Math.max(s,u,0)}}}};Ch.each=Ch.forEach;var OB=function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":Or(Symbol))!=e&&Or(Symbol.iterator)!=e;r&&(Ch[Symbol.iterator]=function(){var i=this,n={value:void 0,done:!1},a=0,o=this.length;return Jx({next:function(){return a<o?n.value=i[a++]:(n.value=void 0,n.done=!0),n}},Symbol.iterator,function(){return this})})};OB();var RB=Zr({nodeDimensionsIncludeLabels:!1}),oh={layoutDimensions:function(e){e=RB(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var i=this.boundingBox();r={w:i.w,h:i.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},layoutPositions:function(e,r,i){var n=this.nodes().filter(function(T){return!T.isParent()}),a=this.cy(),o=r.eles,s=function(x){return x.id()},u=fu(i,s);e.emit({type:"layoutstart",layout:e}),e.animations=[];var l=function(x,_,D){var E={x:_.x1+_.w/2,y:_.y1+_.h/2},M={x:(D.x-E.x)*x,y:(D.y-E.y)*x};return{x:E.x+M.x,y:E.y+M.y}},c=r.spacingFactor&&r.spacingFactor!==1,d=function(){if(!c)return null;for(var x=fi(),_=0;_<n.length;_++){var D=n[_],E=u(D,_);bT(x,E.x,E.y)}return x},f=d(),p=fu(function(T,x){var _=u(T,x);if(c){var D=Math.abs(r.spacingFactor);_=l(D,f,_)}return r.transform!=null&&(_=r.transform(T,_)),_},s);if(r.animate){for(var h=0;h<n.length;h++){var g=n[h],v=p(g,h),m=r.animateFilter==null||r.animateFilter(g,h);if(m){var y=g.animation({position:v,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(y)}else g.position(v)}if(r.fit){var b=a.animation({fit:{boundingBox:o.boundingBoxAt(p),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(b)}else if(r.zoom!==void 0&&r.pan!==void 0){var w=a.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(w)}e.animations.forEach(function(T){return T.play()}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),yu.all(e.animations.map(function(T){return T.promise()})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e})})}else n.positions(p),r.fit&&a.fit(r.eles,r.padding),r.zoom!=null&&a.zoom(r.zoom),r.pan&&a.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){var r=this.cy();return r.makeLayout($e({},e,{eles:this}))}};oh.createLayout=oh.makeLayout=oh.layout;function rS(t,e,r){var i=r._private,n=i.styleCache=i.styleCache||[],a;return(a=n[t])!=null||(a=n[t]=e(r)),a}function Lh(t,e){return t=Uo(t),function(i){return rS(t,e,i)}}function zh(t,e){t=Uo(t);var r=function(n){return e.call(n)};return function(){var n=this[0];if(n)return rS(t,r,n)}}var Yr={recalculateRenderedStyle:function(e){var r=this.cy(),i=r.renderer(),n=r.styleEnabled();return i&&n&&i.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e=this.cy(),r=function(a){return a._private.styleCache=null};if(e.hasCompoundNodes()){var i;i=this.spawnSelf().merge(this.descendants()).merge(this.parents()),i.merge(i.connectedEdges()),i.forEach(r)}else this.forEach(function(n){r(n),n.connectedEdges().forEach(r)});return this},updateStyle:function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var i=r._private.batchStyleEles;return i.merge(this),this}var n=r.hasCompoundNodes(),a=this;e=!!(e||e===void 0),n&&(a=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var o=a;return e?o.emitAndNotify("style"):o.emit("style"),a.forEach(function(s){return s._private.styleDirty=!0}),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var i=this[r];i._private.styleDirty&&(i._private.styleDirty=!1,e.style().apply(i))}},parsedStyle:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=this[0],n=i.cy();if(n.styleEnabled()&&i){i._private.styleDirty&&(i._private.styleDirty=!1,n.style().apply(i));var a=i._private.style[e];return a??(r?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var i=r.pstyle(e);return i.pfValue!==void 0?i.pfValue:i.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var i=this[0];if(i)return r.style().getRenderedStyle(i,e)},style:function(e,r){var i=this.cy();if(!i.styleEnabled())return this;var n=!1,a=i.style();if(Dt(e)){var o=e;a.applyBypass(this,o,n),this.emitAndNotify("style")}else if(Ue(e))if(r===void 0){var s=this[0];return s?a.getStylePropertyValue(s,e):void 0}else a.applyBypass(this,e,r,n),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?a.getRawStyle(u):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var i=!1,n=r.style(),a=this;if(e===void 0)for(var o=0;o<a.length;o++){var s=a[o];n.removeAllBypasses(s,i)}else{e=e.split(/\s+/);for(var u=0;u<a.length;u++){var l=a[u];n.removeBypasses(l,e,i)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),i=this[0];if(i){var n=i._private,a=i.pstyle("opacity").value;if(!r)return a;var o=n.data.parent?i.parents():null;if(o)for(var s=0;s<o.length;s++){var u=o[s],l=u.pstyle("opacity").value;a=l*a}return a}},transparent:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],i=r.cy().hasCompoundNodes();if(r)return i?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},backgrounding:function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding}};function Og(t,e){var r=t._private,i=r.data.parent?t.parents():null;if(i)for(var n=0;n<i.length;n++){var a=i[n];if(!e(a))return!1}return!0}function T0(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,i=t.parentOk||t.ok;return function(){var n=this.cy();if(!n.styleEnabled())return!0;var a=this[0],o=n.hasCompoundNodes();if(a){var s=a._private;if(!e(a))return!1;if(a.isNode())return!o||Og(a,i);var u=s.source,l=s.target;return r(u)&&(!o||Og(u,r))&&(u===l||r(l)&&(!o||Og(l,r)))}}}var bu=Lh("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});Yr.takesUpSpace=zh("takesUpSpace",T0({ok:bu}));var PB=Lh("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&bu(t)}),NB=Lh("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&bu(t)});Yr.interactive=zh("interactive",T0({ok:PB,parentOk:NB,edgeOkViaNode:bu}));Yr.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var FB=Lh("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&bu(t)}),BB=bu;Yr.visible=zh("visible",T0({ok:FB,edgeOkViaNode:BB}));Yr.hidden=function(){var t=this[0];if(t)return!t.visible()};Yr.isBundledBezier=zh("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1});Yr.bypass=Yr.css=Yr.style;Yr.renderedCss=Yr.renderedStyle;Yr.removeBypass=Yr.removeCss=Yr.removeStyle;Yr.pstyle=Yr.parsedStyle;var Ya={};function vx(t){return function(){var e=arguments,r=[];if(e.length===2){var i=e[0],n=e[1];this.on(t.event,i,n)}else if(e.length===1&&cr(e[0])){var a=e[0];this.on(t.event,a)}else if(e.length===0||e.length===1&&Zt(e[0])){for(var o=e.length===1?e[0]:null,s=0;s<this.length;s++){var u=this[s],l=!t.ableField||u._private[t.ableField],c=u._private[t.field]!=t.value;if(t.overrideAble){var d=t.overrideAble(u);if(d!==void 0&&(l=d,!d))return this}l&&(u._private[t.field]=t.value,c&&r.push(u))}var f=this.spawn(r);f.updateStyle(),f.emit(t.event),o&&f.emit(o)}return this}}function Cu(t){Ya[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r}return e._private[t.field]}},Ya[t.on]=vx({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Ya[t.off]=vx({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}Cu({field:"locked",overrideField:function(e){return e.cy().autolock()?!0:void 0},on:"lock",off:"unlock"});Cu({field:"grabbable",overrideField:function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},on:"grabify",off:"ungrabify"});Cu({field:"selected",ableField:"selectable",overrideAble:function(e){return e.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"});Cu({field:"selectable",overrideField:function(e){return e.cy().autounselectify()?!1:void 0},on:"selectify",off:"unselectify"});Ya.deselect=Ya.unselect;Ya.grabbed=function(){var t=this[0];if(t)return t._private.grabbed};Cu({field:"active",on:"activate",off:"unactivate"});Cu({field:"pannable",on:"panify",off:"unpanify"});Ya.inactive=function(){var t=this[0];if(t)return!t._private.active};var ii={},mx=function(e){return function(i){for(var n=this,a=[],o=0;o<n.length;o++){var s=n[o];if(s.isNode()){for(var u=!1,l=s.connectedEdges(),c=0;c<l.length;c++){var d=l[c],f=d.source(),p=d.target();if(e.noIncomingEdges&&p===s&&f!==s||e.noOutgoingEdges&&f===s&&p!==s){u=!0;break}}u||a.push(s)}}return this.spawn(a,!0).filter(i)}},gx=function(e){return function(r){for(var i=this,n=[],a=0;a<i.length;a++){var o=i[a];if(o.isNode())for(var s=o.connectedEdges(),u=0;u<s.length;u++){var l=s[u],c=l.source(),d=l.target();e.outgoing&&c===o?(n.push(l),n.push(d)):e.incoming&&d===o&&(n.push(l),n.push(c))}}return this.spawn(n,!0).filter(r)}},yx=function(e){return function(r){for(var i=this,n=[],a={};;){var o=e.outgoing?i.outgoers():i.incomers();if(o.length===0)break;for(var s=!1,u=0;u<o.length;u++){var l=o[u],c=l.id();a[c]||(a[c]=!0,n.push(l),s=!0)}if(!s)break;i=o}return this.spawn(n,!0).filter(r)}};ii.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null};$e(ii,{roots:mx({noIncomingEdges:!0}),leaves:mx({noOutgoingEdges:!0}),outgoers:Qi(gx({outgoing:!0}),"outgoers"),successors:yx({outgoing:!0}),incomers:Qi(gx({incoming:!0}),"incomers"),predecessors:yx({})});$e(ii,{neighborhood:Qi(function(t){for(var e=[],r=this.nodes(),i=0;i<r.length;i++)for(var n=r[i],a=n.connectedEdges(),o=0;o<a.length;o++){var s=a[o],u=s.source(),l=s.target(),c=n===u?l:u;c.length>0&&e.push(c[0]),e.push(s[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});ii.neighbourhood=ii.neighborhood;ii.closedNeighbourhood=ii.closedNeighborhood;ii.openNeighbourhood=ii.openNeighborhood;$e(ii,{source:Qi(function(e){var r=this[0],i;return r&&(i=r._private.source||r.cy().collection()),i&&e?i.filter(e):i},"source"),target:Qi(function(e){var r=this[0],i;return r&&(i=r._private.target||r.cy().collection()),i&&e?i.filter(e):i},"target"),sources:bx({attr:"source"}),targets:bx({attr:"target"})});function bx(t){return function(r){for(var i=[],n=0;n<this.length;n++){var a=this[n],o=a._private[t.attr];o&&i.push(o)}return this.spawn(i,!0).filter(r)}}$e(ii,{edgesWith:Qi(Cx(),"edgesWith"),edgesTo:Qi(Cx({thisIsSrc:!0}),"edgesTo")});function Cx(t){return function(r){var i=[],n=this._private.cy,a=t||{};Ue(r)&&(r=n.$(r));for(var o=0;o<r.length;o++)for(var s=r[o]._private.edges,u=0;u<s.length;u++){var l=s[u],c=l._private.data,d=this.hasElementWithId(c.source)&&r.hasElementWithId(c.target),f=r.hasElementWithId(c.source)&&this.hasElementWithId(c.target),p=d||f;p&&((a.thisIsSrc||a.thisIsTgt)&&(a.thisIsSrc&&!d||a.thisIsTgt&&!f)||i.push(l))}return this.spawn(i,!0)}}$e(ii,{connectedEdges:Qi(function(t){for(var e=[],r=this,i=0;i<r.length;i++){var n=r[i];if(n.isNode())for(var a=n._private.edges,o=0;o<a.length;o++){var s=a[o];e.push(s)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:Qi(function(t){for(var e=[],r=this,i=0;i<r.length;i++){var n=r[i];n.isEdge()&&(e.push(n.source()[0]),e.push(n.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:Qi(wx(),"parallelEdges"),codirectedEdges:Qi(wx({codirected:!0}),"codirectedEdges")});function wx(t){var e={codirected:!1};return t=$e({},e,t),function(i){for(var n=[],a=this.edges(),o=t,s=0;s<a.length;s++)for(var u=a[s],l=u._private,c=l.source,d=c._private.data.id,f=l.data.target,p=c._private.edges,h=0;h<p.length;h++){var g=p[h],v=g._private.data,m=v.target,y=v.source,b=m===f&&y===d,w=d===m&&f===y;(o.codirected&&b||!o.codirected&&(b||w))&&n.push(g)}return this.spawn(n,!0).filter(i)}}$e(ii,{components:function(e){var r=this,i=r.cy(),n=i.collection(),a=e==null?r.nodes():e.nodes(),o=[];e!=null&&a.empty()&&(a=e.sources());var s=function(c,d){n.merge(c),a.unmerge(c),d.merge(c)};if(a.empty())return r.spawn();var u=function(){var c=i.collection();o.push(c);var d=a[0];s(d,c),r.bfs({directed:!1,roots:d,visit:function(p){return s(p,c)}}),c.forEach(function(f){f.connectedEdges().forEach(function(p){r.has(p)&&c.has(p.source())&&c.has(p.target())&&c.merge(p)})})};do u();while(a.length>0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});ii.componentsOf=ii.components;var Kr=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){ar("A collection must have a reference to the core");return}var a=new ha,o=!1;if(!r)r=[];else if(r.length>0&&Dt(r[0])&&!$l(r[0])){o=!0;for(var s=[],u=new gu,l=0,c=r.length;l<c;l++){var d=r[l];d.data==null&&(d.data={});var f=d.data;if(f.id==null)f.id=mT();else if(e.hasElementWithId(f.id)||u.has(f.id))continue;var p=new Mh(e,d,!1);s.push(p),u.add(f.id)}r=s}this.length=0;for(var h=0,g=r.length;h<g;h++){var v=r[h][0];if(v!=null){var m=v._private.data.id;(!i||!a.has(m))&&(i&&a.set(m,{index:this.length,ele:v}),this[this.length]=v,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(y){this.lazyMap=y},rebuildMap:function(){for(var b=this.lazyMap=new ha,w=this.eles,T=0;T<w.length;T++){var x=w[T];b.set(x.id(),{index:T,ele:x})}}},i&&(this._private.map=a),o&&!n&&this.restore()},er=Mh.prototype=Kr.prototype=Object.create(Array.prototype);er.instanceString=function(){return"collection"};er.spawn=function(t,e){return new Kr(this.cy(),t,e)};er.spawnSelf=function(){return this.spawn(this)};er.cy=function(){return this._private.cy};er.renderer=function(){return this._private.cy.renderer()};er.element=function(){return this[0]};er.collection=function(){return rT(this)?this:new Kr(this._private.cy,[this])};er.unique=function(){return new Kr(this._private.cy,this,!0)};er.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)};er.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new Kr(e)};er.$id=er.getElementById;er.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index};er.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index};er.indexOfId=function(t){return t=""+t,this._private.map.get(t).index};er.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var i=e._private;if(Dt(t)){if(r.startBatch(),t.data){e.data(t.data);var n=i.data;if(e.isEdge()){var a=!1,o={},s=t.data.source,u=t.data.target;s!=null&&s!=n.source&&(o.source=""+s,a=!0),u!=null&&u!=n.target&&(o.target=""+u,a=!0),a&&(e=e.move(o))}else{var l="parent"in t.data,c=t.data.parent;l&&(c!=null||n.parent!=null)&&c!=n.parent&&(c===void 0&&(c=null),c!=null&&(c=""+c),e=e.move({parent:c}))}}t.position&&e.position(t.position);var d=function(g,v,m){var y=t[g];y!=null&&y!==i[g]&&(y?e[v]():e[m]())};return d("removed","remove","restore"),d("selected","select","unselect"),d("selectable","selectify","unselectify"),d("locked","lock","unlock"),d("grabbable","grabify","ungrabify"),d("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this}else if(t===void 0){var f={data:Un(i.data),position:Un(i.position),group:i.group,removed:i.removed,selected:i.selected,selectable:i.selectable,locked:i.locked,grabbable:i.grabbable,pannable:i.pannable,classes:null};f.classes="";var p=0;return i.classes.forEach(function(h){return f.classes+=p++===0?h:" "+h}),f}}};er.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],i=r.json();t.push(i)}return t};er.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var i=this[r],n=i.json(),a=new Mh(t,n,!1);e.push(a)}return new Kr(t,e)};er.copy=er.clone;er.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=r.cy(),n=i._private,a=[],o=[],s,u=0,l=r.length;u<l;u++){var c=r[u];e&&!c.removed()||(c.isNode()?a.push(c):o.push(c))}s=a.concat(o);var d,f=function(){s.splice(d,1),d--};for(d=0;d<s.length;d++){var p=s[d],h=p._private,g=h.data;if(p.clearTraversalCache(),!(!e&&!h.removed)){if(g.id===void 0)g.id=mT();else if(Te(g.id))g.id=""+g.id;else if(Ka(g.id)||!Ue(g.id)){ar("Can not create element with invalid string ID `"+g.id+"`"),f();continue}else if(i.hasElementWithId(g.id)){ar("Can not create second element with ID `"+g.id+"`"),f();continue}}var v=g.id;if(p.isNode()){var m=h.position;m.x==null&&(m.x=0),m.y==null&&(m.y=0)}if(p.isEdge()){for(var y=p,b=["source","target"],w=b.length,T=!1,x=0;x<w;x++){var _=b[x],D=g[_];Te(D)&&(D=g[_]=""+g[_]),D==null||D===""?(ar("Can not create edge `"+v+"` with unspecified "+_),T=!0):i.hasElementWithId(D)||(ar("Can not create edge `"+v+"` with nonexistent "+_+" `"+D+"`"),T=!0)}if(T){f();continue}var E=i.getElementById(g.source),M=i.getElementById(g.target);E.same(M)?E._private.edges.push(y):(E._private.edges.push(y),M._private.edges.push(y)),y._private.source=E,y._private.target=M}h.map=new ha,h.map.set(v,{ele:p,index:0}),h.removed=!1,e&&i.addToPool(p)}for(var k=0;k<a.length;k++){var I=a[k],A=I._private.data;Te(A.parent)&&(A.parent=""+A.parent);var O=A.parent,N=O!=null;if(N||I._private.parent){var F=I._private.parent?i.collection().merge(I._private.parent):i.getElementById(O);if(F.empty())A.parent=void 0;else if(F[0].removed())Vt("Node added with missing parent, reference to parent removed"),A.parent=void 0,I._private.parent=null;else{for(var P=!1,z=F;!z.empty();){if(I.same(z)){P=!0,A.parent=void 0;break}z=z.parent()}P||(F[0]._private.children.push(I),I._private.parent=F[0],n.hasCompoundNodes=!0)}}}if(s.length>0){for(var $=s.length===r.length?r:new Kr(i,s),G=0;G<$.length;G++){var V=$[G];V.isNode()||(V.parallelEdges().clearTraversalCache(),V.source().clearTraversalCache(),V.target().clearTraversalCache())}var W;n.hasCompoundNodes?W=i.collection().merge($).merge($.connectedNodes()).merge($.parent()):W=$,W.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?$.emitAndNotify("add"):e&&$.emit("add")}return r};er.removed=function(){var t=this[0];return t&&t._private.removed};er.inside=function(){var t=this[0];return t&&!t._private.removed};er.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=[],n={},a=r._private.cy;function o(O){for(var N=O._private.edges,F=0;F<N.length;F++)u(N[F])}function s(O){for(var N=O._private.children,F=0;F<N.length;F++)u(N[F])}function u(O){var N=n[O.id()];e&&O.removed()||N||(n[O.id()]=!0,O.isNode()?(i.push(O),o(O),s(O)):i.unshift(O))}for(var l=0,c=r.length;l<c;l++){var d=r[l];u(d)}function f(O,N){var F=O._private.edges;Za(F,N),O.clearTraversalCache()}function p(O){O.clearTraversalCache()}var h=[];h.ids={};function g(O,N){N=N[0],O=O[0];var F=O._private.children,P=O.id();Za(F,N),N._private.parent=null,h.ids[P]||(h.ids[P]=!0,h.push(O))}r.dirtyCompoundBoundsCache(),e&&a.removeFromPool(i);for(var v=0;v<i.length;v++){var m=i[v];if(m.isEdge()){var y=m.source()[0],b=m.target()[0];f(y,m),f(b,m);for(var w=m.parallelEdges(),T=0;T<w.length;T++){var x=w[T];p(x),x.isBundledBezier()&&x.dirtyBoundingBoxCache()}}else{var _=m.parent();_.length!==0&&g(_,m)}e&&(m._private.removed=!0)}var D=a._private.elements;a._private.hasCompoundNodes=!1;for(var E=0;E<D.length;E++){var M=D[E];if(M.isParent()){a._private.hasCompoundNodes=!0;break}}var k=new Kr(this.cy(),i);k.size()>0&&(t?k.emitAndNotify("remove"):e&&k.emit("remove"));for(var I=0;I<h.length;I++){var A=h[I];(!e||!A.removed())&&A.updateStyle()}return k};er.move=function(t){var e=this._private.cy,r=this,i=!1,n=!1,a=function(h){return h==null?h:""+h};if(t.source!==void 0||t.target!==void 0){var o=a(t.source),s=a(t.target),u=o!=null&&e.hasElementWithId(o),l=s!=null&&e.hasElementWithId(s);(u||l)&&(e.batch(function(){r.remove(i,n),r.emitAndNotify("moveout");for(var p=0;p<r.length;p++){var h=r[p],g=h._private.data;h.isEdge()&&(u&&(g.source=o),l&&(g.target=s))}r.restore(i,n)}),r.emitAndNotify("move"))}else if(t.parent!==void 0){var c=a(t.parent),d=c===null||e.hasElementWithId(c);if(d){var f=c===null?void 0:c;e.batch(function(){var p=r.remove(i,n);p.emitAndNotify("moveout");for(var h=0;h<r.length;h++){var g=r[h],v=g._private.data;g.isNode()&&(v.parent=f)}p.restore(i,n)}),r.emitAndNotify("move")}}return this};[kT,G5,ah,Ga,pu,lB,Fh,DB,JT,eS,AB,Ch,oh,Yr,Ya,ii].forEach(function(t){$e(er,t)});var LB={add:function(e){var r,i=this;if(Vi(e)){var n=e;if(n._private.cy===i)r=n.restore();else{for(var a=[],o=0;o<n.length;o++){var s=n[o];a.push(s.json())}r=new Kr(i,a)}}else if(Zt(e)){var u=e;r=new Kr(i,u)}else if(Dt(e)&&(Zt(e.nodes)||Zt(e.edges))){for(var l=e,c=[],d=["nodes","edges"],f=0,p=d.length;f<p;f++){var h=d[f],g=l[h];if(Zt(g))for(var v=0,m=g.length;v<m;v++){var y=$e({group:h},g[v]);c.push(y)}}r=new Kr(i,c)}else{var b=e;r=new Mh(i,b).collection()}return r},remove:function(e){if(!Vi(e)){if(Ue(e)){var r=e;e=this.$(r)}}return e.remove()}};function zB(t,e,r,i){var n=4,a=.001,o=1e-7,s=10,u=11,l=1/(u-1),c=typeof Float32Array<"u";if(arguments.length!==4)return!1;for(var d=0;d<4;++d)if(typeof arguments[d]!="number"||isNaN(arguments[d])||!isFinite(arguments[d]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var f=c?new Float32Array(u):new Array(u);function p(M,k){return 1-3*k+3*M}function h(M,k){return 3*k-6*M}function g(M){return 3*M}function v(M,k,I){return((p(k,I)*M+h(k,I))*M+g(k))*M}function m(M,k,I){return 3*p(k,I)*M*M+2*h(k,I)*M+g(k)}function y(M,k){for(var I=0;I<n;++I){var A=m(k,t,r);if(A===0)return k;var O=v(k,t,r)-M;k-=O/A}return k}function b(){for(var M=0;M<u;++M)f[M]=v(M*l,t,r)}function w(M,k,I){var A,O,N=0;do O=k+(I-k)/2,A=v(O,t,r)-M,A>0?I=O:k=O;while(Math.abs(A)>o&&++N<s);return O}function T(M){for(var k=0,I=1,A=u-1;I!==A&&f[I]<=M;++I)k+=l;--I;var O=(M-f[I])/(f[I+1]-f[I]),N=k+O*l,F=m(N,t,r);return F>=a?y(M,N):F===0?N:w(M,k,k+l)}var x=!1;function _(){x=!0,(t!==e||r!==i)&&b()}var D=function(k){return x||_(),t===e&&r===i?k:k===0?0:k===1?1:v(T(k),e,i)};D.getControlPoints=function(){return[{x:t,y:e},{x:r,y:i}]};var E="generateBezier("+[t,e,r,i]+")";return D.toString=function(){return E},D}var VB=(function(){function t(i){return-i.tension*i.x-i.friction*i.v}function e(i,n,a){var o={x:i.x+a.dx*n,v:i.v+a.dv*n,tension:i.tension,friction:i.friction};return{dx:o.v,dv:t(o)}}function r(i,n){var a={dx:i.v,dv:t(i)},o=e(i,n*.5,a),s=e(i,n*.5,o),u=e(i,n,s),l=1/6*(a.dx+2*(o.dx+s.dx)+u.dx),c=1/6*(a.dv+2*(o.dv+s.dv)+u.dv);return i.x=i.x+l*n,i.v=i.v+c*n,i}return function i(n,a,o){var s={x:-1,v:0,tension:null,friction:null},u=[0],l=0,c=1/1e4,d=16/1e3,f,p,h;for(n=parseFloat(n)||500,a=parseFloat(a)||20,o=o||null,s.tension=n,s.friction=a,f=o!==null,f?(l=i(n,a),p=l/o*d):p=d;h=r(h||s,p),u.push(1+h.x),l+=16,Math.abs(h.x)>c&&Math.abs(h.v)>c;);return f?function(g){return u[g*(u.length-1)|0]}:l}})(),Jt=function(e,r,i,n){var a=zB(e,r,i,n);return function(o,s,u){return o+(s-o)*a(u)}},sh={linear:function(e,r,i){return e+(r-e)*i},ease:Jt(.25,.1,.25,1),"ease-in":Jt(.42,0,1,1),"ease-out":Jt(0,0,.58,1),"ease-in-out":Jt(.42,0,.58,1),"ease-in-sine":Jt(.47,0,.745,.715),"ease-out-sine":Jt(.39,.575,.565,1),"ease-in-out-sine":Jt(.445,.05,.55,.95),"ease-in-quad":Jt(.55,.085,.68,.53),"ease-out-quad":Jt(.25,.46,.45,.94),"ease-in-out-quad":Jt(.455,.03,.515,.955),"ease-in-cubic":Jt(.55,.055,.675,.19),"ease-out-cubic":Jt(.215,.61,.355,1),"ease-in-out-cubic":Jt(.645,.045,.355,1),"ease-in-quart":Jt(.895,.03,.685,.22),"ease-out-quart":Jt(.165,.84,.44,1),"ease-in-out-quart":Jt(.77,0,.175,1),"ease-in-quint":Jt(.755,.05,.855,.06),"ease-out-quint":Jt(.23,1,.32,1),"ease-in-out-quint":Jt(.86,0,.07,1),"ease-in-expo":Jt(.95,.05,.795,.035),"ease-out-expo":Jt(.19,1,.22,1),"ease-in-out-expo":Jt(1,0,0,1),"ease-in-circ":Jt(.6,.04,.98,.335),"ease-out-circ":Jt(.075,.82,.165,1),"ease-in-out-circ":Jt(.785,.135,.15,.86),spring:function(e,r,i){if(i===0)return sh.linear;var n=VB(e,r,i);return function(a,o,s){return a+(o-a)*n(s)}},"cubic-bezier":Jt};function _x(t,e,r,i,n){if(i===1||e===r)return r;var a=n(e,r,i);return t==null||((t.roundValue||t.color)&&(a=Math.round(a)),t.min!==void 0&&(a=Math.max(a,t.min)),t.max!==void 0&&(a=Math.min(a,t.max))),a}function xx(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Js(t,e,r,i,n){var a=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var o=xx(t,n),s=xx(e,n);if(Te(o)&&Te(s))return _x(a,o,s,r,i);if(Zt(o)&&Zt(s)){for(var u=[],l=0;l<s.length;l++){var c=o[l],d=s[l];if(c!=null&&d!=null){var f=_x(a,c,d,r,i);u.push(f)}else u.push(d)}return u}}function HB(t,e,r,i){var n=!i,a=t._private,o=e._private,s=o.easing,u=o.startTime,l=i?t:t.cy(),c=l.style();if(!o.easingImpl)if(s==null)o.easingImpl=sh.linear;else{var d;if(Ue(s)){var f=c.parse("transition-timing-function",s);d=f.value}else d=s;var p,h;Ue(d)?(p=d,h=[]):(p=d[1],h=d.slice(2).map(function($){return+$})),h.length>0?(p==="spring"&&h.push(o.duration),o.easingImpl=sh[p].apply(null,h)):o.easingImpl=sh[p]}var g=o.easingImpl,v;if(o.duration===0?v=1:v=(r-u)/o.duration,o.applying&&(v=o.progress),v<0?v=0:v>1&&(v=1),o.delay==null){var m=o.startPosition,y=o.position;if(y&&n&&!t.locked()){var b={};Sl(m.x,y.x)&&(b.x=Js(m.x,y.x,v,g)),Sl(m.y,y.y)&&(b.y=Js(m.y,y.y,v,g)),t.position(b)}var w=o.startPan,T=o.pan,x=a.pan,_=T!=null&&i;_&&(Sl(w.x,T.x)&&(x.x=Js(w.x,T.x,v,g)),Sl(w.y,T.y)&&(x.y=Js(w.y,T.y,v,g)),t.emit("pan"));var D=o.startZoom,E=o.zoom,M=E!=null&&i;M&&(Sl(D,E)&&(a.zoom=Ll(a.minZoom,Js(D,E,v,g),a.maxZoom)),t.emit("zoom")),(_||M)&&t.emit("viewport");var k=o.style;if(k&&k.length>0&&n){for(var I=0;I<k.length;I++){var A=k[I],O=A.name,N=A,F=o.startStyle[O],P=c.properties[F.name],z=Js(F,N,v,g,P);c.overrideBypass(t,O,z)}t.emit("style")}}return o.progress=v,v}function Sl(t,e){return t==null||e==null?!1:Te(t)&&Te(e)?!0:!!(t&&e)}function UB(t,e,r,i){var n=e._private;n.started=!0,n.startTime=r-n.progress*n.duration}function Tx(t,e){var r=e._private.aniEles,i=[];function n(c,d){var f=c._private,p=f.animation.current,h=f.animation.queue,g=!1;if(p.length===0){var v=h.shift();v&&p.push(v)}for(var m=function(x){for(var _=x.length-1;_>=0;_--){var D=x[_];D()}x.splice(0,x.length)},y=p.length-1;y>=0;y--){var b=p[y],w=b._private;if(w.stopped){p.splice(y,1),w.hooked=!1,w.playing=!1,w.started=!1,m(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||UB(c,b,t),HB(c,b,t,d),w.applying&&(w.applying=!1),m(w.frames),w.step!=null&&w.step(t),b.completed()&&(p.splice(y,1),w.hooked=!1,w.playing=!1,w.started=!1,m(w.completes)),g=!0)}return!d&&p.length===0&&h.length===0&&i.push(c),g}for(var a=!1,o=0;o<r.length;o++){var s=r[o],u=n(s);a=a||u}var l=n(e,!0);(a||l)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(i),e.emit("step")}var jB={animate:zt.animate(),animation:zt.animation(),animated:zt.animated(),clearQueue:zt.clearQueue(),delay:zt.delay(),delayAnimation:zt.delayAnimation(),stop:zt.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&vh(function(a){Tx(a,e),r()})}var i=e.renderer();i&&i.beforeRender?i.beforeRender(function(a,o){Tx(o,e)},i.beforeRenderPriorities.animations):r()}},qB={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,i){var n=r.qualifier;return n!=null?e!==i.target&&$l(i.target)&&n.matches(i.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,i){return r.qualifier!=null?i.target:e}},Qf=function(e){return Ue(e)?new Qa(e):e},iS={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Bh(qB,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,i){return this.emitter().on(e,Qf(r),i),this},removeListener:function(e,r,i){return this.emitter().removeListener(e,Qf(r),i),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,i){return this.emitter().one(e,Qf(r),i),this},once:function(e,r,i){return this.emitter().one(e,Qf(r),i),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};zt.eventAliasesOn(iS);var Xg={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};Xg.jpeg=Xg.jpg;var uh={layout:function(e){var r=this;if(e==null){ar("Layout options must be specified to make a layout");return}if(e.name==null){ar("A `name` must be specified to make a layout");return}var i=e.name,n=r.extension("layout",i);if(n==null){ar("No such layout `"+i+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;Ue(e.eles)?a=r.$(e.eles):a=e.eles!=null?e.eles:r.$();var o=new n($e({},e,{cy:r,eles:a}));return o}};uh.createLayout=uh.makeLayout=uh.layout;var WB={notify:function(e,r){var i=this._private;if(this.batching()){i.batchNotifications=i.batchNotifications||{};var n=i.batchNotifications[e]=i.batchNotifications[e]||this.collection();r!=null&&n.merge(r);return}if(i.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(i){var n=e.batchNotifications[i];n.empty()?r.notify(i):r.notify(i,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var i=Object.keys(e),n=0;n<i.length;n++){var a=i[n],o=e[a],s=r.getElementById(a);s.data(o)}})}},$B=Zr({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),Qg={renderTo:function(e,r,i,n){var a=this._private.renderer;return a.renderTo(e,r,i,n),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var r=this,i=r.extension("renderer",e.name);if(i==null){ar("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}e.wheelSensitivity!==void 0&&Vt("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var n=$B(e);n.cy=r,r._private.renderer=new i(n),this.notify("init")},destroyRenderer:function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(i){var n=i._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Qg.invalidateDimensions=Qg.resize;var lh={collection:function(e,r){return Ue(e)?this.$(e):Vi(e)?e.collection():Zt(e)?(r||(r={}),new Kr(this,e,r.unique,r.removed)):new Kr(this)},nodes:function(e){var r=this.$(function(i){return i.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(i){return i.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};lh.elements=lh.filter=lh.$;var Hr={},Ol="t",GB="f";Hr.apply=function(t){for(var e=this,r=e._private,i=r.cy,n=i.collection(),a=0;a<t.length;a++){var o=t[a],s=e.getContextMeta(o);if(!s.empty){var u=e.getContextStyle(s),l=e.applyContextStyle(s,u,o);o._private.appliedInitStyle?e.updateTransitions(o,l.diffProps):o._private.appliedInitStyle=!0;var c=e.updateStyleHints(o);c&&n.push(o)}}return n};Hr.getPropertiesDiff=function(t,e){var r=this,i=r._private.propDiffs=r._private.propDiffs||{},n=t+"-"+e,a=i[n];if(a)return a;for(var o=[],s={},u=0;u<r.length;u++){var l=r[u],c=t[u]===Ol,d=e[u]===Ol,f=c!==d,p=l.mappedProperties.length>0;if(f||d&&p){var h=void 0;f&&p||f?h=l.properties:p&&(h=l.mappedProperties);for(var g=0;g<h.length;g++){for(var v=h[g],m=v.name,y=!1,b=u+1;b<r.length;b++){var w=r[b],T=e[b]===Ol;if(T&&(y=w.properties[v.name]!=null,y))break}!s[m]&&!y&&(s[m]=!0,o.push(m))}}}return i[n]=o,o};Hr.getContextMeta=function(t){for(var e=this,r="",i,n=t._private.styleCxtKey||"",a=0;a<e.length;a++){var o=e[a],s=o.selector&&o.selector.matches(t);s?r+=Ol:r+=GB}return i=e.getPropertiesDiff(n,r),t._private.styleCxtKey=r,{key:r,diffPropNames:i,empty:i.length===0}};Hr.getContextStyle=function(t){var e=t.key,r=this,i=this._private.contextStyles=this._private.contextStyles||{};if(i[e])return i[e];for(var n={_private:{key:e}},a=0;a<r.length;a++){var o=r[a],s=e[a]===Ol;if(s)for(var u=0;u<o.properties.length;u++){var l=o.properties[u];n[l.name]=l}}return i[e]=n,n};Hr.applyContextStyle=function(t,e,r){for(var i=this,n=t.diffPropNames,a={},o=i.types,s=0;s<n.length;s++){var u=n[s],l=e[u],c=r.pstyle(u);if(!l)if(c)c.bypass?l={name:u,deleteBypassed:!0}:l={name:u,delete:!0};else continue;if(c!==l){if(l.mapped===o.fn&&c!=null&&c.mapping!=null&&c.mapping.value===l.value){var d=c.mapping,f=d.fnValue=l.value(r);if(f===d.prevFnValue)continue}var p=a[u]={prev:c};i.applyParsedProperty(r,l),p.next=r.pstyle(u),p.next&&p.next.bypass&&(p.next=p.next.bypassed)}}return{diffProps:a}};Hr.updateStyleHints=function(t){var e=t._private,r=this,i=r.propertyGroupNames,n=r.propertyGroupKeys,a=function(J,ne,we){return r.getPropertiesHash(J,ne,we)},o=e.styleKey;if(t.removed())return!1;var s=e.group==="nodes",u=t._private.style;i=Object.keys(u);for(var l=0;l<n.length;l++){var c=n[l];e.styleKeys[c]=[zo,nu]}for(var d=function(J,ne){return e.styleKeys[ne][0]=Nl(J,e.styleKeys[ne][0])},f=function(J,ne){return e.styleKeys[ne][1]=Fl(J,e.styleKeys[ne][1])},p=function(J,ne){d(J,ne),f(J,ne)},h=function(J,ne){for(var we=0;we<J.length;we++){var Re=J.charCodeAt(we);d(Re,ne),f(Re,ne)}},g=2e9,v=function(J){return-128<J&&J<128&&Math.floor(J)!==J?g-(J*1024|0):J},m=0;m<i.length;m++){var y=i[m],b=u[y];if(b!=null){var w=this.properties[y],T=w.type,x=w.groupKey,_=void 0;w.hashOverride!=null?_=w.hashOverride(t,b):b.pfValue!=null&&(_=b.pfValue);var D=w.enums==null?b.value:null,E=_!=null,M=D!=null,k=E||M,I=b.units;if(T.number&&k&&!T.multiple){var A=E?_:D;p(v(A),x),!E&&I!=null&&h(I,x)}else h(b.strValue,x)}}for(var O=[zo,nu],N=0;N<n.length;N++){var F=n[N],P=e.styleKeys[F];O[0]=Nl(P[0],O[0]),O[1]=Fl(P[1],O[1])}e.styleKey=uN(O[0],O[1]);var z=e.styleKeys;e.labelDimsKey=Ha(z.labelDimensions);var $=a(t,["label"],z.labelDimensions);if(e.labelKey=Ha($),e.labelStyleKey=Ha(qf(z.commonLabel,$)),!s){var G=a(t,["source-label"],z.labelDimensions);e.sourceLabelKey=Ha(G),e.sourceLabelStyleKey=Ha(qf(z.commonLabel,G));var V=a(t,["target-label"],z.labelDimensions);e.targetLabelKey=Ha(V),e.targetLabelStyleKey=Ha(qf(z.commonLabel,V))}if(s){var W=e.styleKeys,ue=W.nodeBody,he=W.nodeBorder,le=W.nodeOutline,me=W.backgroundImage,be=W.compound,Se=W.pie,se=W.stripe,q=[ue,he,le,me,be,Se,se].filter(function(X){return X!=null}).reduce(qf,[zo,nu]);e.nodeKey=Ha(q),e.hasPie=Se!=null&&Se[0]!==zo&&Se[1]!==nu,e.hasStripe=se!=null&&se[0]!==zo&&se[1]!==nu}return o!==e.styleKey};Hr.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null};Hr.applyParsedProperty=function(t,e){var r=this,i=e,n=t._private.style,a,o=r.types,s=r.properties[i.name].type,u=i.bypass,l=n[i.name],c=l&&l.bypass,d=t._private,f="mapping",p=function(ue){return ue==null?null:ue.pfValue!=null?ue.pfValue:ue.value},h=function(){var ue=p(l),he=p(i);r.checkTriggers(t,i.name,ue,he)};if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(i=e=this.parse(e.name,"bezier",u)),i.delete)return n[i.name]=void 0,h(),!0;if(i.deleteBypassed)return l?l.bypass?(l.bypassed=void 0,h(),!0):!1:(h(),!0);if(i.deleteBypass)return l?l.bypass?(n[i.name]=l.bypassed,h(),!0):!1:(h(),!0);var g=function(){Vt("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+i.name+"` with data field `"+i.field+"`); try a `["+i.field+"]` selector to limit scope to elements with `"+i.field+"` defined")};switch(i.mapped){case o.mapData:{for(var v=i.field.split("."),m=d.data,y=0;y<v.length&&m;y++){var b=v[y];m=m[b]}if(m==null)return g(),!1;var w;if(Te(m)){var T=i.fieldMax-i.fieldMin;T===0?w=0:w=(m-i.fieldMin)/T}else return Vt("Do not use continuous mappers without specifying numeric data (i.e. `"+i.field+": "+m+"` for `"+t.id()+"` is non-numeric)"),!1;if(w<0?w=0:w>1&&(w=1),s.color){var x=i.valueMin[0],_=i.valueMax[0],D=i.valueMin[1],E=i.valueMax[1],M=i.valueMin[2],k=i.valueMax[2],I=i.valueMin[3]==null?1:i.valueMin[3],A=i.valueMax[3]==null?1:i.valueMax[3],O=[Math.round(x+(_-x)*w),Math.round(D+(E-D)*w),Math.round(M+(k-M)*w),Math.round(I+(A-I)*w)];a={bypass:i.bypass,name:i.name,value:O,strValue:"rgb("+O[0]+", "+O[1]+", "+O[2]+")"}}else if(s.number){var N=i.valueMin+(i.valueMax-i.valueMin)*w;a=this.parse(i.name,N,i.bypass,f)}else return!1;if(!a)return g(),!1;a.mapping=i,i=a;break}case o.data:{for(var F=i.field.split("."),P=d.data,z=0;z<F.length&&P;z++){var $=F[z];P=P[$]}if(P!=null&&(a=this.parse(i.name,P,i.bypass,f)),!a)return g(),!1;a.mapping=i,i=a;break}case o.fn:{var G=i.value,V=i.fnValue!=null?i.fnValue:G(t);if(i.prevFnValue=V,V==null)return Vt("Custom function mappers may not return null (i.e. `"+i.name+"` for ele `"+t.id()+"` is null)"),!1;if(a=this.parse(i.name,V,i.bypass,f),!a)return Vt("Custom function mappers may not return invalid values for the property type (i.e. `"+i.name+"` for ele `"+t.id()+"` is invalid)"),!1;a.mapping=Un(i),i=a;break}case void 0:break;default:return!1}return u?(c?i.bypassed=l.bypassed:i.bypassed=l,n[i.name]=i):c?l.bypassed=i:n[i.name]=i,h(),!0};Hr.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(this.clearStyleHints(i),i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),!e)i._private.style={};else for(var n=i._private.style,a=Object.keys(n),o=0;o<a.length;o++){var s=a[o],u=n[s];u!=null&&(u.bypass?u.bypassed=null:n[s]=null)}}};Hr.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()};Hr.updateTransitions=function(t,e){var r=this,i=t._private,n=t.pstyle("transition-property").value,a=t.pstyle("transition-duration").pfValue,o=t.pstyle("transition-delay").pfValue;if(n.length>0&&a>0){for(var s={},u=!1,l=0;l<n.length;l++){var c=n[l],d=t.pstyle(c),f=e[c];if(f){var p=f.prev,h=p,g=f.next!=null?f.next:d,v=!1,m=void 0,y=1e-6;h&&(Te(h.pfValue)&&Te(g.pfValue)?(v=g.pfValue-h.pfValue,m=h.pfValue+y*v):Te(h.value)&&Te(g.value)?(v=g.value-h.value,m=h.value+y*v):Zt(h.value)&&Zt(g.value)&&(v=h.value[0]!==g.value[0]||h.value[1]!==g.value[1]||h.value[2]!==g.value[2],m=h.strValue),v&&(s[c]=g.strValue,this.applyBypass(t,c,m),u=!0))}}if(!u)return;i.transitioning=!0,new yu(function(b){o>0?t.delayAnimation(o).play().promise().then(b):b()}).then(function(){return t.animation({style:s,duration:a,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,n),t.emitAndNotify("style"),i.transitioning=!1})}else i.transitioning&&(this.removeBypasses(t,n),t.emitAndNotify("style"),i.transitioning=!1)};Hr.checkTrigger=function(t,e,r,i,n,a){var o=this.properties[e],s=n(o);t.removed()||s!=null&&s(r,i,t)&&a(o)};Hr.checkZOrderTrigger=function(t,e,r,i){var n=this;this.checkTrigger(t,e,r,i,function(a){return a.triggersZOrder},function(){n._private.cy.notify("zorder",t)})};Hr.checkBoundsTrigger=function(t,e,r,i){this.checkTrigger(t,e,r,i,function(n){return n.triggersBounds},function(n){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};Hr.checkConnectedEdgesBoundsTrigger=function(t,e,r,i){this.checkTrigger(t,e,r,i,function(n){return n.triggersBoundsOfConnectedEdges},function(n){t.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};Hr.checkParallelEdgesBoundsTrigger=function(t,e,r,i){this.checkTrigger(t,e,r,i,function(n){return n.triggersBoundsOfParallelEdges},function(n){t.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};Hr.checkTriggers=function(t,e,r,i){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,i),this.checkBoundsTrigger(t,e,r,i),this.checkConnectedEdgesBoundsTrigger(t,e,r,i),this.checkParallelEdgesBoundsTrigger(t,e,r,i)};var Jl={};Jl.applyBypass=function(t,e,r,i){var n=this,a=[],o=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var s=0;s<n.properties.length;s++){var u=n.properties[s],l=u.name,c=this.parse(l,r,!0);c&&a.push(c)}}else if(Ue(e)){var d=this.parse(e,r,!0);d&&a.push(d)}else if(Dt(e)){var f=e;i=r;for(var p=Object.keys(f),h=0;h<p.length;h++){var g=p[h],v=f[g];if(v===void 0&&(v=f[Eh(g)]),v!==void 0){var m=this.parse(g,v,!0);m&&a.push(m)}}}else return!1;if(a.length===0)return!1;for(var y=!1,b=0;b<t.length;b++){for(var w=t[b],T={},x=void 0,_=0;_<a.length;_++){var D=a[_];if(i){var E=w.pstyle(D.name);x=T[D.name]={prev:E}}y=this.applyParsedProperty(w,Un(D))||y,i&&(x.next=w.pstyle(D.name))}y&&this.updateStyleHints(w),i&&this.updateTransitions(w,T,o)}return y};Jl.overrideBypass=function(t,e,r){e=c0(e);for(var i=0;i<t.length;i++){var n=t[i],a=n._private.style[e],o=this.properties[e].type,s=o.color,u=o.mutiple,l=a?a.pfValue!=null?a.pfValue:a.value:null;!a||!a.bypass?this.applyBypass(n,e,r):(a.value=r,a.pfValue!=null&&(a.pfValue=r),s?a.strValue="rgb("+r.join(",")+")":u?a.strValue=r.join(" "):a.strValue=""+r,this.updateStyleHints(n)),this.checkTriggers(n,e,l,r)}};Jl.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)};Jl.removeBypasses=function(t,e,r){for(var i=!0,n=0;n<t.length;n++){for(var a=t[n],o={},s=0;s<e.length;s++){var u=e[s],l=this.properties[u],c=a.pstyle(l.name);if(!(!c||!c.bypass)){var d="",f=this.parse(u,d,!0),p=o[l.name]={prev:c};this.applyParsedProperty(a,f),p.next=a.pstyle(l.name)}}this.updateStyleHints(a),r&&this.updateTransitions(a,o,i)}};var S0={};S0.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1};S0.containerCss=function(t){var e=this._private.cy,r=e.container(),i=e.window();if(i&&r&&i.getComputedStyle)return i.getComputedStyle(r).getPropertyValue(t)};var jn={};jn.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)};jn.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var i={},n=0;n<r.properties.length;n++){var a=r.properties[n],o=r.getStylePropertyValue(t,a.name,e);o!=null&&(i[a.name]=o,i[Eh(a.name)]=o)}return i}};jn.getIndexedStyle=function(t,e,r,i){var n=t.pstyle(e)[r][i];return n??t.cy().style().getDefaultProperty(e)[r][0]};jn.getStylePropertyValue=function(t,e,r){var i=this;if(t=t[0],t){var n=i.properties[e];n.alias&&(n=n.pointsTo);var a=n.type,o=t.pstyle(n.name);if(o){var s=o.value,u=o.units,l=o.strValue;if(r&&a.number&&s!=null&&Te(s)){var c=t.cy().zoom(),d=function(v){return v*c},f=function(v,m){return d(v)+m},p=Zt(s),h=p?u.every(function(g){return g!=null}):u!=null;return h?p?s.map(function(g,v){return f(g,u[v])}).join(" "):f(s,u):p?s.map(function(g){return Ue(g)?g:""+d(g)}).join(" "):""+d(s)}else if(l!=null)return l}return null}};jn.getAnimationStartStyle=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i],a=n.name,o=t.pstyle(a);o!==void 0&&(Dt(o)?o=this.parse(a,o.strValue):o=this.parse(a,o)),o&&(r[a]=o)}return r};jn.getPropsList=function(t){var e=this,r=[],i=t,n=e.properties;if(i)for(var a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],u=i[s],l=n[s]||n[c0(s)],c=this.parse(l.name,u);c&&r.push(c)}return r};jn.getNonDefaultPropertiesHash=function(t,e,r){var i=r.slice(),n,a,o,s,u,l;for(u=0;u<e.length;u++)if(n=e[u],a=t.pstyle(n,!1),a!=null)if(a.pfValue!=null)i[0]=Nl(s,i[0]),i[1]=Fl(s,i[1]);else for(o=a.strValue,l=0;l<o.length;l++)s=o.charCodeAt(l),i[0]=Nl(s,i[0]),i[1]=Fl(s,i[1]);return i};jn.getPropertiesHash=jn.getNonDefaultPropertiesHash;var Vh={};Vh.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var i=t[r],n=i.selector,a=i.style||i.css,o=Object.keys(a);e.selector(n);for(var s=0;s<o.length;s++){var u=o[s],l=a[u];e.css(u,l)}}return e};Vh.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e};Vh.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],i=r.selector,n=r.properties,a={},o=0;o<n.length;o++){var s=n[o];a[s.name]=s.strValue}t.push({selector:i?i.toString():"core",style:a})}return t};var D0={};D0.appendFromString=function(t){var e=this,r=this,i=""+t,n,a,o;i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");function s(){i.length>n.length?i=i.substr(n.length):i=""}function u(){a.length>o.length?a=a.substr(o.length):a=""}for(;;){var l=i.match(/^\s*$/);if(l)break;var c=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!c){Vt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}n=c[0];var d=c[1];if(d!=="core"){var f=new Qa(d);if(f.invalid){Vt("Skipping parsing of block: Invalid selector found in string stylesheet: "+d),s();continue}}var p=c[2],h=!1;a=p;for(var g=[];;){var v=a.match(/^\s*$/);if(v)break;var m=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!m){Vt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),h=!0;break}o=m[0];var y=m[1],b=m[2],w=e.properties[y];if(!w){Vt("Skipping property: Invalid property name in: "+o),u();continue}var T=r.parse(y,b);if(!T){Vt("Skipping property: Invalid property definition in: "+o),u();continue}g.push({name:y,val:b}),u()}if(h){s();break}r.selector(d);for(var x=0;x<g.length;x++){var _=g[x];r.css(_.name,_.val)}s()}return r};D0.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};var Tr={};(function(){var t=Ar,e=VP,r=UP,i=jP,n=qP,a=function(X){return"^"+X+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},o=function(X){var J=t+"|\\w+|"+e+"|"+r+"|"+i+"|"+n;return"^"+X+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+J+")\\s*\\,\\s*("+J+")\\)$"},s=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];Tr.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","top-inside","center","bottom","bottom-inside"]},halign:{enums:["left","left-inside","center","right","right-inside"]},justification:{enums:["left","center","right","auto"]},textMetrics:{enums:["font","glyph"]},text:{string:!0},data:{mapping:!0,regex:a("data")},layoutData:{mapping:!0,regex:a("layoutData")},scratch:{mapping:!0,regex:a("scratch")},mapData:{mapping:!0,regex:o("mapData")},mapLayoutData:{mapping:!0,regex:o("mapLayoutData")},mapScratch:{mapping:!0,regex:o("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:s,singleRegexMatchValue:!0},urls:{regexes:s,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(X,J){switch(X.length){case 2:return J[0]!=="deg"&&J[0]!=="rad"&&J[1]!=="deg"&&J[1]!=="rad";case 1:return Ue(X[0])||J[0]==="deg"||J[0]==="rad";default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(X){var J=X.length;return J===1||J===2||J===4}}};var u={zeroNonZero:function(X,J){return(X==null||J==null)&&X!==J||X==0&&J!=0?!0:X!=0&&J==0},any:function(X,J){return X!=J},emptyNonEmpty:function(X,J){var ne=Ka(X),we=Ka(J);return ne&&!we||!ne&&we}},l=Tr.types,c=[{name:"label",type:l.text,triggersBounds:u.any,triggersZOrder:u.emptyNonEmpty},{name:"text-rotation",type:l.textRotation,triggersBounds:u.any},{name:"text-margin-x",type:l.bidirectionalSize,triggersBounds:u.any},{name:"text-margin-y",type:l.bidirectionalSize,triggersBounds:u.any}],d=[{name:"source-label",type:l.text,triggersBounds:u.any},{name:"source-text-rotation",type:l.textRotation,triggersBounds:u.any},{name:"source-text-margin-x",type:l.bidirectionalSize,triggersBounds:u.any},{name:"source-text-margin-y",type:l.bidirectionalSize,triggersBounds:u.any},{name:"source-text-offset",type:l.size,triggersBounds:u.any}],f=[{name:"target-label",type:l.text,triggersBounds:u.any},{name:"target-text-rotation",type:l.textRotation,triggersBounds:u.any},{name:"target-text-margin-x",type:l.bidirectionalSize,triggersBounds:u.any},{name:"target-text-margin-y",type:l.bidirectionalSize,triggersBounds:u.any},{name:"target-text-offset",type:l.size,triggersBounds:u.any}],p=[{name:"font-family",type:l.fontFamily,triggersBounds:u.any},{name:"font-style",type:l.fontStyle,triggersBounds:u.any},{name:"font-weight",type:l.fontWeight,triggersBounds:u.any},{name:"font-size",type:l.size,triggersBounds:u.any},{name:"text-transform",type:l.textTransform,triggersBounds:u.any},{name:"text-wrap",type:l.textWrap,triggersBounds:u.any},{name:"text-overflow-wrap",type:l.textOverflowWrap,triggersBounds:u.any},{name:"text-max-width",type:l.size,triggersBounds:u.any},{name:"text-outline-width",type:l.size,triggersBounds:u.any},{name:"line-height",type:l.positiveNumber,triggersBounds:u.any}],h=[{name:"text-valign",type:l.valign,triggersBounds:u.any},{name:"text-halign",type:l.halign,triggersBounds:u.any},{name:"color",type:l.color},{name:"text-outline-color",type:l.color},{name:"text-outline-opacity",type:l.zeroOneNumber},{name:"text-background-color",type:l.color},{name:"text-background-opacity",type:l.zeroOneNumber},{name:"text-background-padding",type:l.size,triggersBounds:u.any},{name:"text-border-opacity",type:l.zeroOneNumber},{name:"text-border-color",type:l.color},{name:"text-border-width",type:l.size,triggersBounds:u.any},{name:"text-border-style",type:l.borderStyle,triggersBounds:u.any},{name:"text-background-shape",type:l.textBackgroundShape,triggersBounds:u.any},{name:"text-justification",type:l.justification},{name:"text-metrics",type:l.textMetrics},{name:"box-select-labels",type:l.bool,triggersBounds:u.any}],g=[{name:"events",type:l.bool,triggersZOrder:u.any},{name:"text-events",type:l.bool,triggersZOrder:u.any},{name:"box-selection",type:l.boxSelection,triggersZOrder:u.any}],v=[{name:"display",type:l.display,triggersZOrder:u.any,triggersBounds:u.any,triggersBoundsOfConnectedEdges:u.any,triggersBoundsOfParallelEdges:function(X,J,ne){return X===J?!1:ne.pstyle("curve-style").value==="bezier"}},{name:"visibility",type:l.visibility,triggersZOrder:u.any},{name:"opacity",type:l.zeroOneNumber,triggersZOrder:u.zeroNonZero},{name:"text-opacity",type:l.zeroOneNumber},{name:"min-zoomed-font-size",type:l.size},{name:"z-compound-depth",type:l.zCompoundDepth,triggersZOrder:u.any},{name:"z-index-compare",type:l.zIndexCompare,triggersZOrder:u.any},{name:"z-index",type:l.number,triggersZOrder:u.any}],m=[{name:"overlay-padding",type:l.size,triggersBounds:u.any},{name:"overlay-color",type:l.color},{name:"overlay-opacity",type:l.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"overlay-shape",type:l.overlayShape,triggersBounds:u.any},{name:"overlay-corner-radius",type:l.cornerRadius}],y=[{name:"underlay-padding",type:l.size,triggersBounds:u.any},{name:"underlay-color",type:l.color},{name:"underlay-opacity",type:l.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"underlay-shape",type:l.overlayShape,triggersBounds:u.any},{name:"underlay-corner-radius",type:l.cornerRadius}],b=[{name:"transition-property",type:l.propList},{name:"transition-duration",type:l.time},{name:"transition-delay",type:l.time},{name:"transition-timing-function",type:l.easing}],w=function(X,J){return J.value==="label"?-X.poolIndex():J.pfValue},T=[{name:"height",type:l.nodeSize,triggersBounds:u.any,hashOverride:w},{name:"width",type:l.nodeSize,triggersBounds:u.any,hashOverride:w},{name:"shape",type:l.nodeShape,triggersBounds:u.any},{name:"shape-polygon-points",type:l.polygonPointList,triggersBounds:u.any},{name:"corner-radius",type:l.cornerRadius},{name:"background-color",type:l.color},{name:"background-fill",type:l.fill},{name:"background-opacity",type:l.zeroOneNumber},{name:"background-blacken",type:l.nOneOneNumber},{name:"background-gradient-stop-colors",type:l.colors},{name:"background-gradient-stop-positions",type:l.percentages},{name:"background-gradient-direction",type:l.gradientDirection},{name:"padding",type:l.sizeMaybePercent,triggersBounds:u.any},{name:"padding-relative-to",type:l.paddingRelativeTo,triggersBounds:u.any},{name:"bounds-expansion",type:l.boundsExpansion,triggersBounds:u.any}],x=[{name:"border-color",type:l.color},{name:"border-opacity",type:l.zeroOneNumber},{name:"border-width",type:l.size,triggersBounds:u.any},{name:"border-style",type:l.borderStyle},{name:"border-cap",type:l.lineCap},{name:"border-join",type:l.lineJoin},{name:"border-dash-pattern",type:l.numbers},{name:"border-dash-offset",type:l.number},{name:"border-position",type:l.linePosition}],_=[{name:"outline-color",type:l.color},{name:"outline-opacity",type:l.zeroOneNumber},{name:"outline-width",type:l.size,triggersBounds:u.any},{name:"outline-style",type:l.borderStyle},{name:"outline-offset",type:l.size,triggersBounds:u.any}],D=[{name:"background-image",type:l.urls},{name:"background-image-crossorigin",type:l.bgCrossOrigin},{name:"background-image-opacity",type:l.zeroOneNumbers},{name:"background-image-containment",type:l.bgContainment},{name:"background-image-smoothing",type:l.bools},{name:"background-position-x",type:l.bgPos},{name:"background-position-y",type:l.bgPos},{name:"background-width-relative-to",type:l.bgRelativeTo},{name:"background-height-relative-to",type:l.bgRelativeTo},{name:"background-repeat",type:l.bgRepeat},{name:"background-fit",type:l.bgFit},{name:"background-clip",type:l.bgClip},{name:"background-width",type:l.bgWH},{name:"background-height",type:l.bgWH},{name:"background-offset-x",type:l.bgPos},{name:"background-offset-y",type:l.bgPos}],E=[{name:"position",type:l.position,triggersBounds:u.any},{name:"compound-sizing-wrt-labels",type:l.compoundIncludeLabels,triggersBounds:u.any},{name:"min-width",type:l.size,triggersBounds:u.any},{name:"min-width-bias-left",type:l.sizeMaybePercent,triggersBounds:u.any},{name:"min-width-bias-right",type:l.sizeMaybePercent,triggersBounds:u.any},{name:"min-height",type:l.size,triggersBounds:u.any},{name:"min-height-bias-top",type:l.sizeMaybePercent,triggersBounds:u.any},{name:"min-height-bias-bottom",type:l.sizeMaybePercent,triggersBounds:u.any}],M=[{name:"line-style",type:l.lineStyle},{name:"line-color",type:l.color},{name:"line-fill",type:l.fill},{name:"line-cap",type:l.lineCap},{name:"line-opacity",type:l.zeroOneNumber},{name:"line-dash-pattern",type:l.numbers},{name:"line-dash-offset",type:l.number},{name:"line-outline-width",type:l.size},{name:"line-outline-color",type:l.color},{name:"line-gradient-stop-colors",type:l.colors},{name:"line-gradient-stop-positions",type:l.percentages},{name:"curve-style",type:l.curveStyle,triggersBounds:u.any,triggersBoundsOfParallelEdges:function(X,J){return X===J?!1:X==="bezier"||J==="bezier"}},{name:"haystack-radius",type:l.zeroOneNumber,triggersBounds:u.any},{name:"source-endpoint",type:l.edgeEndpoint,triggersBounds:u.any},{name:"target-endpoint",type:l.edgeEndpoint,triggersBounds:u.any},{name:"control-point-step-size",type:l.size,triggersBounds:u.any},{name:"control-point-distances",type:l.bidirectionalSizes,triggersBounds:u.any},{name:"control-point-weights",type:l.numbers,triggersBounds:u.any},{name:"segment-distances",type:l.bidirectionalSizes,triggersBounds:u.any},{name:"segment-weights",type:l.numbers,triggersBounds:u.any},{name:"segment-radii",type:l.numbers,triggersBounds:u.any},{name:"radius-type",type:l.radiusType,triggersBounds:u.any},{name:"taxi-turn",type:l.bidirectionalSizeMaybePercent,triggersBounds:u.any},{name:"taxi-turn-min-distance",type:l.size,triggersBounds:u.any},{name:"taxi-direction",type:l.axisDirection,triggersBounds:u.any},{name:"taxi-radius",type:l.number,triggersBounds:u.any},{name:"edge-distances",type:l.edgeDistances,triggersBounds:u.any},{name:"arrow-scale",type:l.positiveNumber,triggersBounds:u.any},{name:"loop-direction",type:l.angle,triggersBounds:u.any},{name:"loop-sweep",type:l.angle,triggersBounds:u.any},{name:"source-distance-from-node",type:l.size,triggersBounds:u.any},{name:"target-distance-from-node",type:l.size,triggersBounds:u.any}],k=[{name:"ghost",type:l.bool,triggersBounds:u.any},{name:"ghost-offset-x",type:l.bidirectionalSize,triggersBounds:u.any},{name:"ghost-offset-y",type:l.bidirectionalSize,triggersBounds:u.any},{name:"ghost-opacity",type:l.zeroOneNumber}],I=[{name:"selection-box-color",type:l.color},{name:"selection-box-opacity",type:l.zeroOneNumber},{name:"selection-box-border-color",type:l.color},{name:"selection-box-border-width",type:l.size},{name:"active-bg-color",type:l.color},{name:"active-bg-opacity",type:l.zeroOneNumber},{name:"active-bg-size",type:l.size},{name:"outside-texture-bg-color",type:l.color},{name:"outside-texture-bg-opacity",type:l.zeroOneNumber}],A=[];Tr.pieBackgroundN=16,A.push({name:"pie-size",type:l.sizeMaybePercent}),A.push({name:"pie-hole",type:l.sizeMaybePercent}),A.push({name:"pie-start-angle",type:l.angle});for(var O=1;O<=Tr.pieBackgroundN;O++)A.push({name:"pie-"+O+"-background-color",type:l.color}),A.push({name:"pie-"+O+"-background-size",type:l.percent}),A.push({name:"pie-"+O+"-background-opacity",type:l.zeroOneNumber});var N=[];Tr.stripeBackgroundN=16,N.push({name:"stripe-size",type:l.sizeMaybePercent}),N.push({name:"stripe-direction",type:l.axisDirectionPrimary});for(var F=1;F<=Tr.stripeBackgroundN;F++)N.push({name:"stripe-"+F+"-background-color",type:l.color}),N.push({name:"stripe-"+F+"-background-size",type:l.percent}),N.push({name:"stripe-"+F+"-background-opacity",type:l.zeroOneNumber});var P=[],z=Tr.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:l.arrowShape,triggersBounds:u.any},{name:"arrow-color",type:l.color},{name:"arrow-fill",type:l.arrowFill},{name:"arrow-width",type:l.arrowWidth}].forEach(function(q){z.forEach(function(X){var J=X+"-"+q.name,ne=q.type,we=q.triggersBounds;P.push({name:J,type:ne,triggersBounds:we})})},{});var $=Tr.properties=[].concat(g,b,v,m,y,k,h,p,c,d,f,T,x,_,D,A,N,E,M,P,I),G=Tr.propertyGroups={behavior:g,transition:b,visibility:v,overlay:m,underlay:y,ghost:k,commonLabel:h,labelDimensions:p,mainLabel:c,sourceLabel:d,targetLabel:f,nodeBody:T,nodeBorder:x,nodeOutline:_,backgroundImage:D,pie:A,stripe:N,compound:E,edgeLine:M,edgeArrow:P,core:I},V=Tr.propertyGroupNames={},W=Tr.propertyGroupKeys=Object.keys(G);W.forEach(function(q){V[q]=G[q].map(function(X){return X.name}),G[q].forEach(function(X){return X.groupKey=q})});var ue=Tr.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];Tr.propertyNames=$.map(function(q){return q.name});for(var he=0;he<$.length;he++){var le=$[he];$[le.name]=le}for(var me=0;me<ue.length;me++){var be=ue[me],Se=$[be.pointsTo],se={name:be.name,alias:!0,pointsTo:Se};$.push(se),$[be.name]=se}})();Tr.getDefaultProperty=function(t){return this.getDefaultProperties()[t]};Tr.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=$e({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","text-metrics":"font","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(u,l){for(var c=1;c<=Tr.pieBackgroundN;c++){var d=l.name.replace("{{i}}",c),f=l.value;u[d]=f}return u},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(u,l){for(var c=1;c<=Tr.stripeBackgroundN;c++){var d=l.name.replace("{{i}}",c),f=l.value;u[d]=f}return u},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(u,l){return Tr.arrowPrefixes.forEach(function(c){var d=c+"-"+l.name,f=l.value;u[d]=f}),u},{})),r={},i=0;i<this.properties.length;i++){var n=this.properties[i];if(!n.pointsTo){var a=n.name,o=e[a],s=this.parse(a,o);r[a]=s}}return t.defaultProperties=r,t.defaultProperties};Tr.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var Hh={};Hh.parse=function(t,e,r,i){var n=this;if(cr(e))return n.parseImplWarn(t,e,r,i);var a=i==="mapping"||i===!0||i===!1||i==null?"dontcare":i,o=r?"t":"f",s=""+e,u=hT(t,s,o,a),l=n.propCache=n.propCache||[],c;return(c=l[u])||(c=l[u]=n.parseImplWarn(t,e,r,i)),(r||i==="mapping")&&(c=Un(c),c&&(c.value=Un(c.value))),c};Hh.parseImplWarn=function(t,e,r,i){var n=this.parseImpl(t,e,r,i);return!n&&e!=null&&Vt("The style property `".concat(t,": ").concat(e,"` is invalid")),n&&(n.name==="width"||n.name==="height")&&e==="label"&&Vt("The style value of `label` is deprecated for `"+n.name+"`"),n};Hh.parseImpl=function(t,e,r,i){var n=this;t=c0(t);var a=n.properties[t],o=e,s=n.types;if(!a||e===void 0)return null;a.alias&&(a=a.pointsTo,t=a.name);var u=Ue(e);u&&(e=e.trim());var l=a.type;if(!l)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(cr(e))return{name:t,value:e,strValue:"fn",mapped:s.fn,bypass:r};var c,d;if(!(!u||i||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(c=new RegExp(s.data.regex).exec(e))){if(r)return!1;var f=s.data;return{name:t,value:c,strValue:""+e,mapped:f,field:c[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(d=new RegExp(s.mapData.regex).exec(e))){if(r||l.multiple)return!1;var p=s.mapData;if(!(l.color||l.number))return!1;var h=this.parse(t,d[4]);if(!h||h.mapped)return!1;var g=this.parse(t,d[5]);if(!g||g.mapped)return!1;if(h.pfValue===g.pfValue||h.strValue===g.strValue)return Vt("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+h.strValue+"`"),this.parse(t,h.strValue);if(l.color){var v=h.value,m=g.value,y=v[0]===m[0]&&v[1]===m[1]&&v[2]===m[2]&&(v[3]===m[3]||(v[3]==null||v[3]===1)&&(m[3]==null||m[3]===1));if(y)return!1}return{name:t,value:d,strValue:""+e,mapped:p,field:d[1],fieldMin:parseFloat(d[2]),fieldMax:parseFloat(d[3]),valueMin:h.value,valueMax:g.value,bypass:r}}}if(l.multiple&&i!=="multiple"){var b;if(u?b=e.split(/\s+/):Zt(e)?b=e:b=[e],l.evenMultiple&&b.length%2!==0)return null;for(var w=[],T=[],x=[],_="",D=!1,E=0;E<b.length;E++){var M=n.parse(t,b[E],r,"multiple");D=D||Ue(M.value),w.push(M.value),x.push(M.pfValue!=null?M.pfValue:M.value),T.push(M.units),_+=(E>0?" ":"")+M.strValue}return l.validate&&!l.validate(w,T)?null:l.singleEnum&&D?w.length===1&&Ue(w[0])?{name:t,value:w[0],strValue:w[0],bypass:r}:null:{name:t,value:w,pfValue:x,strValue:_,bypass:r,units:T}}var k=function(){for(var se=0;se<l.enums.length;se++){var q=l.enums[se];if(q===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null};if(l.number){var I,A="px";if(l.units&&(I=l.units),l.implicitUnits&&(A=l.implicitUnits),!l.unitless)if(u){var O="px|em"+(l.allowPercent?"|\\%":"");I&&(O=I);var N=e.match("^("+Ar+")("+O+")?$");N&&(e=N[1],I=N[2]||A)}else(!I||l.implicitUnits)&&(I=A);if(e=parseFloat(e),isNaN(e)&&l.enums===void 0)return null;if(isNaN(e)&&l.enums!==void 0)return e=o,k();if(l.integer&&!RP(e)||l.min!==void 0&&(e<l.min||l.strictMin&&e===l.min)||l.max!==void 0&&(e>l.max||l.strictMax&&e===l.max))return null;var F={name:t,value:e,strValue:""+e+(I||""),units:I,bypass:r};return l.unitless||I!=="px"&&I!=="em"?F.pfValue=e:F.pfValue=I==="px"||!I?e:this.getEmSizeInPixels()*e,(I==="ms"||I==="s")&&(F.pfValue=I==="ms"?e:1e3*e),(I==="deg"||I==="rad")&&(F.pfValue=I==="rad"?e:jN(e)),I==="%"&&(F.pfValue=e/100),F}else if(l.propList){var P=[],z=""+e;if(z!=="none"){for(var $=z.split(/\s*,\s*|\s+/),G=0;G<$.length;G++){var V=$[G].trim();n.properties[V]?P.push(V):Vt("`"+V+"` is not a valid property name")}if(P.length===0)return null}return{name:t,value:P,strValue:P.length===0?"none":P.join(" "),bypass:r}}else if(l.color){var W=oT(e);return W?{name:t,value:W,pfValue:W,strValue:"rgb("+W[0]+","+W[1]+","+W[2]+")",bypass:r}:null}else if(l.regex||l.regexes){if(l.enums){var ue=k();if(ue)return ue}for(var he=l.regexes?l.regexes:[l.regex],le=0;le<he.length;le++){var me=new RegExp(he[le]),be=me.exec(e);if(be)return{name:t,value:l.singleRegexMatchValue?be[1]:be,strValue:""+e,bypass:r}}return null}else return l.string?{name:t,value:""+e,strValue:""+e,bypass:r}:l.enums?k():null};var Vr=function(e){if(!(this instanceof Vr))return new Vr(e);if(!l0(e)){ar("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},ni=Vr.prototype;ni.instanceString=function(){return"style"};ni.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),i=0;i<this.length;i++)this[i]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(n){var a=n[0]._private;a.styleDirty=!0,a.appliedInitStyle=!1}),this};ni.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this};ni.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)};ni.selector=function(t){var e=t==="core"?null:new Qa(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this};ni.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],i=0;i<t.properties.length;i++){var n=t.properties[i],a=r[n.name];a===void 0&&(a=r[Eh(n.name)]),a!==void 0&&this.cssRule(n.name,a)}else e.length===2&&this.cssRule(e[0],e[1]);return this};ni.style=ni.css;ni.cssRule=function(t,e){var r=this.parse(t,e);if(r){var i=this.length-1;this[i].properties.push(r),this[i].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.name.match(/stripe-(\d+)-background-size/)&&r.value&&(this._private.hasStripe=!0),r.mapped&&this[i].mappedProperties.push(r);var n=!this[i].selector;n&&(this._private.coreStyle[r.name]=r)}return this};ni.append=function(t){return iT(t)?t.appendToStyle(this):Zt(t)?this.appendFromJson(t):Ue(t)&&this.appendFromString(t),this};Vr.fromJson=function(t,e){var r=new Vr(t);return r.fromJson(e),r};Vr.fromString=function(t,e){return new Vr(t).fromString(e)};[Hr,Jl,S0,jn,Vh,D0,Tr,Hh].forEach(function(t){$e(ni,t)});Vr.types=ni.types;Vr.properties=ni.properties;Vr.propertyGroups=ni.propertyGroups;Vr.propertyGroupNames=ni.propertyGroupNames;Vr.propertyGroupKeys=ni.propertyGroupKeys;var YB={style:function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},setStyle:function(e){var r=this._private;return iT(e)?r.style=e.generateStyle(this):Zt(e)?r.style=Vr.fromJson(this,e):Ue(e)?r.style=Vr.fromString(this,e):r.style=Vr(this),r.style},updateStyle:function(){this.mutableElements().updateStyle()}},KB="single",Wo={autolock:function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},autoungrabify:function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},autounselectify:function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},selectionType:function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=KB),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this},panningEnabled:function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},userPanningEnabled:function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},pan:function(){var e=arguments,r=this._private.pan,i,n,a,o,s;switch(e.length){case 0:return r;case 1:if(Ue(e[0]))return i=e[0],r[i];if(Dt(e[0])){if(!this._private.panningEnabled)return this;a=e[0],o=a.x,s=a.y,Te(o)&&(r.x=o),Te(s)&&(r.y=s),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;i=e[0],n=e[1],(i==="x"||i==="y")&&Te(n)&&(r[i]=n),this.emit("pan viewport");break}return this.notify("viewport"),this},panBy:function(e,r){var i=arguments,n=this._private.pan,a,o,s,u,l;if(!this._private.panningEnabled)return this;switch(i.length){case 1:Dt(e)&&(s=i[0],u=s.x,l=s.y,Te(u)&&(n.x+=u),Te(l)&&(n.y+=l),this.emit("pan viewport"));break;case 2:a=e,o=r,(a==="x"||a==="y")&&Te(o)&&(n[a]+=o),this.emit("pan viewport");break}return this.notify("viewport"),this},gc:function(){this.notify("gc")},fit:function(e,r){var i=this.getFitViewport(e,r);if(i){var n=this._private;n.zoom=i.zoom,n.pan=i.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,r){if(Te(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var i;if(Ue(e)){var n=e;e=this.$(n)}else if(FP(e)){var a=e;i={x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2},i.w=i.x2-i.x1,i.h=i.y2-i.y1}else Vi(e)||(e=this.mutableElements());if(!(Vi(e)&&e.empty())){i=i||e.boundingBox();var o=this.width(),s=this.height(),u;if(r=Te(r)?r:0,!isNaN(o)&&!isNaN(s)&&o>0&&s>0&&!isNaN(i.w)&&!isNaN(i.h)&&i.w>0&&i.h>0){u=Math.min((o-2*r)/i.w,(s-2*r)/i.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u<this._private.minZoom?this._private.minZoom:u;var l={x:(o-u*(i.x1+i.x2))/2,y:(s-u*(i.y1+i.y2))/2};return{zoom:u,pan:l}}}}},zoomRange:function(e,r){var i=this._private;if(r==null){var n=e;e=n.min,r=n.max}return Te(e)&&Te(r)&&e<=r?(i.minZoom=e,i.maxZoom=r):Te(e)&&r===void 0&&e<=i.maxZoom?i.minZoom=e:Te(r)&&e===void 0&&r>=i.minZoom&&(i.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,i=r.pan,n=r.zoom,a,o,s=!1;if(r.zoomingEnabled||(s=!0),Te(e)?o=e:Dt(e)&&(o=e.level,e.position!=null?a=Ih(e.position,n,i):e.renderedPosition!=null&&(a=e.renderedPosition),a!=null&&!r.panningEnabled&&(s=!0)),o=o>r.maxZoom?r.maxZoom:o,o=o<r.minZoom?r.minZoom:o,s||!Te(o)||o===n||a!=null&&(!Te(a.x)||!Te(a.y)))return null;if(a!=null){var u=i,l=n,c=o,d={x:-c/l*(a.x-u.x)+a.x,y:-c/l*(a.y-u.y)+a.y};return{zoomed:!0,panned:!0,zoom:c,pan:d}}else return{zoomed:!0,panned:!1,zoom:o,pan:i}},zoom:function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),i=this._private;return r==null||!r.zoomed?this:(i.zoom=r.zoom,r.panned&&(i.pan.x=r.pan.x,i.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},viewport:function(e){var r=this._private,i=!0,n=!0,a=[],o=!1,s=!1;if(!e)return this;if(Te(e.zoom)||(i=!1),Dt(e.pan)||(n=!1),!i&&!n)return this;if(i){var u=e.zoom;u<r.minZoom||u>r.maxZoom||!r.zoomingEnabled?o=!0:(r.zoom=u,a.push("zoom"))}if(n&&(!o||!e.cancelOnFailedZoom)&&r.panningEnabled){var l=e.pan;Te(l.x)&&(r.pan.x=l.x,s=!1),Te(l.y)&&(r.pan.y=l.y,s=!1),s||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(Ue(e)){var i=e;e=this.mutableElements().filter(i)}else Vi(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),a=this.width(),o=this.height();r=r===void 0?this._private.zoom:r;var s={x:(a-r*(n.x1+n.x2))/2,y:(o-r*(n.y1+n.y2))/2};return s}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,i=this;return e.sizeCache=e.sizeCache||(r?(function(){var n=i.window().getComputedStyle(r),a=function(s){return parseFloat(n.getPropertyValue(s))};return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}})():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,i=this.renderedExtent(),n={x1:(i.x1-e.x)/r,x2:(i.x2-e.x)/r,y1:(i.y1-e.y)/r,y2:(i.y2-e.y)/r};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};Wo.centre=Wo.center;Wo.autolockNodes=Wo.autolock;Wo.autoungrabifyNodes=Wo.autoungrabify;var Ul={data:zt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:zt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:zt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:zt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ul.attr=Ul.data;Ul.removeAttr=Ul.removeData;var jl=function(e){var r=this;e=$e({},e);var i=e.container;i&&!ph(i)&&ph(i[0])&&(i=i[0]);var n=i?i._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var a=n.readies=n.readies||[];i&&(i._cyreg=n),n.cy=r;var o=Ir!==void 0&&i!==void 0&&!e.headless,s=e;s.layout=$e({name:o?"grid":"null"},s.layout),s.renderer=$e({name:o?"canvas":"null"},s.renderer);var u=function(h,g,v){return g!==void 0?g:v!==void 0?v:h},l=this._private={container:i,ready:!1,options:s,elements:new Kr(this),listeners:[],aniEles:new Kr(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,s.zoomingEnabled),userZoomingEnabled:u(!0,s.userZoomingEnabled),panningEnabled:u(!0,s.panningEnabled),userPanningEnabled:u(!0,s.userPanningEnabled),boxSelectionEnabled:u(!0,s.boxSelectionEnabled),autolock:u(!1,s.autolock,s.autolockNodes),autoungrabify:u(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:u(!1,s.autounselectify),styleEnabled:s.styleEnabled===void 0?o:s.styleEnabled,zoom:Te(s.zoom)?s.zoom:1,pan:{x:Dt(s.pan)&&Te(s.pan.x)?s.pan.x:0,y:Dt(s.pan)&&Te(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var c=function(h,g){var v=h.some(BP);if(v)return yu.all(h).then(g);g(h)};l.styleEnabled&&r.setStyle([]);var d=$e({},s,s.renderer);r.initRenderer(d);var f=function(h,g,v){r.notifications(!1);var m=r.mutableElements();m.length>0&&m.remove(),h!=null&&(Dt(h)||Zt(h))&&r.add(h),r.one("layoutready",function(b){r.notifications(!0),r.emit(b),r.one("load",g),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var y=$e({},r._private.options.layout);y.eles=r.elements(),r.layout(y).run()};c([s.style,s.elements],function(p){var h=p[0],g=p[1];l.styleEnabled&&r.style().append(h),f(g,function(){r.startAnimationLoop(),l.ready=!0,cr(s.ready)&&r.on("ready",s.ready);for(var v=0;v<a.length;v++){var m=a[v];r.on("ready",m)}n&&(n.readies=[]),r.emit("ready")},s.done)})},wh=jl.prototype;$e(wh,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},window:function(){var e=this._private.container;if(e==null)return Ir;var r=this._private.container.ownerDocument;return r===void 0||r==null?Ir:r.defaultView||Ir},mount:function(e){if(e!=null){var r=this,i=r._private,n=i.options;return!ph(e)&&ph(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),i.container=e,i.styleEnabled=!0,r.invalidateSize(),r.initRenderer($e({},n,n.renderer,{name:n.renderer.name==="null"?"canvas":n.renderer.name})),r.startAnimationLoop(),r.style(n.style),r.emit("mount"),r}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return Un(this._private.options)},json:function(e){var r=this,i=r._private,n=r.mutableElements(),a=function(w){return r.getElementById(w.id())};if(Dt(e)){if(r.startBatch(),e.elements){var o={},s=function(w,T){for(var x=[],_=[],D=0;D<w.length;D++){var E=w[D];if(!E.data.id){Vt("cy.json() cannot handle elements without an ID attribute");continue}var M=""+E.data.id,k=r.getElementById(M);o[M]=!0,k.length!==0?_.push({ele:k,json:E}):(T&&(E.group=T),x.push(E))}r.add(x);for(var I=0;I<_.length;I++){var A=_[I],O=A.ele,N=A.json;O.json(N)}};if(Zt(e.elements))s(e.elements);else for(var u=["nodes","edges"],l=0;l<u.length;l++){var c=u[l],d=e.elements[c];Zt(d)&&s(d,c)}var f=r.collection();n.filter(function(b){return!o[b.id()]}).forEach(function(b){b.isParent()?f.merge(b):b.remove()}),f.forEach(function(b){return b.children().move({parent:null})}),f.forEach(function(b){return a(b).remove()})}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==i.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==i.pan.x||e.pan.y!==i.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var p=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],h=0;h<p.length;h++){var g=p[h];e[g]!=null&&r[g](e[g])}return r.endBatch(),this}else{var v=!!e,m={};v?m.elements=this.elements().map(function(b){return b.json()}):(m.elements={},n.forEach(function(b){var w=b.group();m.elements[w]||(m.elements[w]=[]),m.elements[w].push(b.json())})),this._private.styleEnabled&&(m.style=r.style().json()),m.data=Un(r.data());var y=i.options;return m.zoomingEnabled=i.zoomingEnabled,m.userZoomingEnabled=i.userZoomingEnabled,m.zoom=i.zoom,m.minZoom=i.minZoom,m.maxZoom=i.maxZoom,m.panningEnabled=i.panningEnabled,m.userPanningEnabled=i.userPanningEnabled,m.pan=Un(i.pan),m.boxSelectionEnabled=i.boxSelectionEnabled,m.renderer=Un(y.renderer),m.hideEdgesOnViewport=y.hideEdgesOnViewport,m.textureOnViewport=y.textureOnViewport,m.wheelSensitivity=y.wheelSensitivity,m.motionBlur=y.motionBlur,m.multiClickDebounceTime=y.multiClickDebounceTime,m}}});wh.$id=wh.getElementById;[LB,jB,iS,Xg,uh,WB,Qg,lh,YB,Wo,Ul].forEach(function(t){$e(wh,t)});var ZB={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}},XB={maximal:!1,acyclic:!1},eu=function(e){return e.scratch("breadthfirst")},Sx=function(e,r){return e.scratch("breadthfirst",r)};function nS(t){this.options=$e({},ZB,XB,t)}nS.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,i=r.nodes().filter(function(qe){return qe.isChildless()}),n=r,a=t.directed,o=t.acyclic||t.maximal||t.maximalAdjustments>0,s=!!t.boundingBox,u=fi(s?t.boundingBox:structuredClone(e.extent())),l;if(Vi(t.roots))l=t.roots;else if(Zt(t.roots)){for(var c=[],d=0;d<t.roots.length;d++){var f=t.roots[d],p=e.getElementById(f);c.push(p)}l=e.collection(c)}else if(Ue(t.roots))l=e.$(t.roots);else if(a)l=i.roots();else{var h=r.components();l=e.collection();for(var g=function(){var Ee=h[v],He=Ee.maxDegree(!1),ze=Ee.filter(function(et){return et.degree(!1)===He});l=l.add(ze)},v=0;v<h.length;v++)g()}var m=[],y={},b=function(Ee,He){m[He]==null&&(m[He]=[]);var ze=m[He].length;m[He].push(Ee),Sx(Ee,{index:ze,depth:He})},w=function(Ee,He){var ze=eu(Ee),et=ze.depth,Ye=ze.index;m[et][Ye]=null,Ee.isChildless()&&b(Ee,He)};n.bfs({roots:l,directed:t.directed,visit:function(Ee,He,ze,et,Ye){var ct=Ee[0],gt=ct.id();ct.isChildless()&&b(ct,Ye),y[gt]=!0}});for(var T=[],x=0;x<i.length;x++){var _=i[x];y[_.id()]||T.push(_)}var D=function(Ee){for(var He=m[Ee],ze=0;ze<He.length;ze++){var et=He[ze];if(et==null){He.splice(ze,1),ze--;continue}Sx(et,{depth:Ee,index:ze})}},E=function(Ee,He){for(var ze=eu(Ee),et=Ee.incomers().filter(function(ce){return ce.isNode()&&r.has(ce)}),Ye=-1,ct=Ee.id(),gt=0;gt<et.length;gt++){var Pt=et[gt],Et=eu(Pt);Ye=Math.max(Ye,Et.depth)}if(ze.depth<=Ye){if(!t.acyclic&&He[ct])return null;var _t=Ye+1;return w(Ee,_t),He[ct]=_t,!0}return!1};if(a&&o){var M=[],k={},I=function(Ee){return M.push(Ee)},A=function(){return M.shift()};for(i.forEach(function(qe){return M.push(qe)});M.length>0;){var O=A(),N=E(O,k);if(N)O.outgoers().filter(function(qe){return qe.isNode()&&r.has(qe)}).forEach(I);else if(N===null){Vt("Detected double maximal shift for node `"+O.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var F=0;if(t.avoidOverlap)for(var P=0;P<i.length;P++){var z=i[P],$=z.layoutDimensions(t),G=$.w,V=$.h;F=Math.max(F,G,V)}var W={},ue=function(Ee){if(W[Ee.id()])return W[Ee.id()];for(var He=eu(Ee).depth,ze=Ee.neighborhood(),et=0,Ye=0,ct=0;ct<ze.length;ct++){var gt=ze[ct];if(!(gt.isEdge()||gt.isParent()||!i.has(gt))){var Pt=eu(gt);if(Pt!=null){var Et=Pt.index,_t=Pt.depth;if(!(Et==null||_t==null)){var ce=m[_t].length;_t<He&&(et+=Et/ce,Ye++)}}}}return Ye=Math.max(1,Ye),et=et/Ye,Ye===0&&(et=0),W[Ee.id()]=et,et},he=function(Ee,He){var ze=ue(Ee),et=ue(He),Ye=ze-et;return Ye===0?aT(Ee.id(),He.id()):Ye};t.depthSort!==void 0&&(he=t.depthSort);for(var le=m.length,me=0;me<le;me++)m[me].sort(he),D(me);for(var be=[],Se=0;Se<T.length;Se++)be.push(T[Se]);var se=function(){for(var Ee=0;Ee<le;Ee++)D(Ee)};be.length&&(m.unshift(be),le=m.length,se());for(var q=0,X=0;X<le;X++)q=Math.max(m[X].length,q);var J={x:u.x1+u.w/2,y:u.y1+u.h/2},ne=i.reduce(function(qe,Ee){return(function(He){return{w:qe.w===-1?He.w:(qe.w+He.w)/2,h:qe.h===-1?He.h:(qe.h+He.h)/2}})(Ee.boundingBox({includeLabels:t.nodeDimensionsIncludeLabels}))},{w:-1,h:-1}),we=Math.max(le===1?0:s?(u.h-t.padding*2-ne.h)/(le-1):(u.h-t.padding*2-ne.h)/(le+1),F),Re=m.reduce(function(qe,Ee){return Math.max(qe,Ee.length)},0),vt=function(Ee){var He=eu(Ee),ze=He.depth,et=He.index;if(t.circle){var Ye=Math.min(u.w/2/le,u.h/2/le);Ye=Math.max(Ye,F);var ct=Ye*ze+Ye-(le>0&&m[0].length<=3?Ye/2:0),gt=2*Math.PI/m[ze].length*et;return ze===0&&m[0].length===1&&(ct=1),{x:J.x+ct*Math.cos(gt),y:J.y+ct*Math.sin(gt)}}else{var Pt=m[ze].length,Et=Math.max(Pt===1?0:s?(u.w-t.padding*2-ne.w)/((t.grid?Re:Pt)-1):(u.w-t.padding*2-ne.w)/((t.grid?Re:Pt)+1),F),_t={x:J.x+(et+1-(Pt+1)/2)*Et,y:J.y+(ze+1-(le+1)/2)*we};return _t}},Je={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(Je).indexOf(t.direction)===-1&&ar("Invalid direction '".concat(t.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Je).join(", ")));var Ge=function(Ee){return fN(vt(Ee),u,Je[t.direction])};return r.nodes().layoutPositions(this,t,Ge),this};var QB={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function aS(t){this.options=$e({},QB,t)}aS.prototype.run=function(){var t=this.options,e=t,r=t.cy,i=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=i.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));for(var o=fi(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/a.length:e.sweep,l=u/Math.max(1,a.length-1),c,d=0,f=0;f<a.length;f++){var p=a[f],h=p.layoutDimensions(e),g=h.w,v=h.h;d=Math.max(d,g,v)}if(Te(e.radius)?c=e.radius:a.length<=1?c=0:c=Math.min(o.h,o.w)/2-d,a.length>1&&e.avoidOverlap){d*=1.75;var m=Math.cos(l)-Math.cos(0),y=Math.sin(l)-Math.sin(0),b=Math.sqrt(d*d/(m*m+y*y));c=Math.max(b,c)}var w=function(x,_){var D=e.startAngle+_*l*(n?1:-1),E=c*Math.cos(D),M=c*Math.sin(D),k={x:s.x+E,y:s.y+M};return k};return i.nodes().layoutPositions(this,e,w),this};var JB={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function oS(t){this.options=$e({},JB,t)}oS.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=t.cy,n=e.eles,a=n.nodes().not(":parent"),o=fi(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:i.width(),h:i.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],l=0,c=0;c<a.length;c++){var d=a[c],f=void 0;f=e.concentric(d),u.push({value:f,node:d}),d._private.scratch.concentric=f}a.updateStyle();for(var p=0;p<a.length;p++){var h=a[p],g=h.layoutDimensions(e);l=Math.max(l,g.w,g.h)}u.sort(function(we,Re){return Re.value-we.value});for(var v=e.levelWidth(a),m=[[]],y=m[0],b=0;b<u.length;b++){var w=u[b];if(y.length>0){var T=Math.abs(y[0].value-w.value);T>=v&&(y=[],m.push(y))}y.push(w)}var x=l+e.minNodeSpacing;if(!e.avoidOverlap){var _=m.length>0&&m[0].length>1,D=Math.min(o.w,o.h)/2-x,E=D/(m.length+_?1:0);x=Math.min(x,E)}for(var M=0,k=0;k<m.length;k++){var I=m[k],A=e.sweep===void 0?2*Math.PI-2*Math.PI/I.length:e.sweep,O=I.dTheta=A/Math.max(1,I.length-1);if(I.length>1&&e.avoidOverlap){var N=Math.cos(O)-Math.cos(0),F=Math.sin(O)-Math.sin(0),P=Math.sqrt(x*x/(N*N+F*F));M=Math.max(P,M)}I.r=M,M+=x}if(e.equidistant){for(var z=0,$=0,G=0;G<m.length;G++){var V=m[G],W=V.r-$;z=Math.max(z,W)}$=0;for(var ue=0;ue<m.length;ue++){var he=m[ue];ue===0&&($=he.r),he.r=$,$+=z}}for(var le={},me=0;me<m.length;me++)for(var be=m[me],Se=be.dTheta,se=be.r,q=0;q<be.length;q++){var X=be[q],J=e.startAngle+(r?1:-1)*Se*q,ne={x:s.x+se*Math.cos(J),y:s.y+se*Math.sin(J)};le[X.node.id()]=ne}return n.nodes().layoutPositions(this,e,function(we){var Re=we.id();return le[Re]}),this};var Rg,eL={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,r){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function Uh(t){this.options=$e({},eL,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),i=r.filter(function(n){var a=n.source().data("id"),o=n.target().data("id"),s=e.some(function(l){return l.data("id")===a}),u=e.some(function(l){return l.data("id")===o});return!s||!u});this.options.eles=this.options.eles.not(i)}Uh.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?Rg=!0:Rg=!1;var i=tL(e,r,t);Rg&&iL(i),t.randomize&&nL(i);var n=pa(),a=function(){aL(i,e,t),t.fit===!0&&e.fit(t.padding)},o=function(f){return!(r.stopped||f>=t.numIter||(oL(i,t),i.temperature=i.temperature*t.coolingFactor,i.temperature<t.minTemp))},s=function(){if(t.animate===!0||t.animate===!1)a(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var f=t.eles.nodes(),p=uS(i,t,f);f.layoutPositions(r,t,p)}},u=0,l=!0;if(t.animate===!0){var c=function(){for(var f=0;l&&f<t.refresh;)l=o(u),u++,f++;if(!l)Ex(i,t),s();else{var p=pa();p-n>=t.animationThreshold&&a(),vh(c)}};c()}else{for(;l;)l=o(u),u++;Ex(i,t),s()}return this};Uh.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Uh.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var tL=function(e,r,i){for(var n=i.eles.edges(),a=i.eles.nodes(),o=fi(i.boundingBox?i.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:i.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=i.eles.components(),l={},c=0;c<u.length;c++)for(var d=u[c],f=0;f<d.length;f++){var p=d[f];l[p.id()]=c}for(var c=0;c<s.nodeSize;c++){var h=a[c],g=h.layoutDimensions(i),v={};v.isLocked=h.locked(),v.id=h.data("id"),v.parentId=h.data("parent"),v.cmptId=l[h.id()],v.children=[],v.positionX=h.position("x"),v.positionY=h.position("y"),v.offsetX=0,v.offsetY=0,v.height=g.w,v.width=g.h,v.maxX=v.positionX+v.width/2,v.minX=v.positionX-v.width/2,v.maxY=v.positionY+v.height/2,v.minY=v.positionY-v.height/2,v.padLeft=parseFloat(h.style("padding")),v.padRight=parseFloat(h.style("padding")),v.padTop=parseFloat(h.style("padding")),v.padBottom=parseFloat(h.style("padding")),v.nodeRepulsion=cr(i.nodeRepulsion)?i.nodeRepulsion(h):i.nodeRepulsion,s.layoutNodes.push(v),s.idToIndex[v.id]=c}for(var m=[],y=0,b=-1,w=[],c=0;c<s.nodeSize;c++){var h=s.layoutNodes[c],T=h.parentId;T!=null?s.layoutNodes[s.idToIndex[T]].children.push(h.id):(m[++b]=h.id,w.push(h.id))}for(s.graphSet.push(w);y<=b;){var x=m[y++],_=s.idToIndex[x],p=s.layoutNodes[_],D=p.children;if(D.length>0){s.graphSet.push(D);for(var c=0;c<D.length;c++)m[++b]=D[c]}}for(var c=0;c<s.graphSet.length;c++)for(var E=s.graphSet[c],f=0;f<E.length;f++){var M=s.idToIndex[E[f]];s.indexToGraph[M]=c}for(var c=0;c<s.edgeSize;c++){var k=n[c],I={};I.id=k.data("id"),I.sourceId=k.data("source"),I.targetId=k.data("target");var A=cr(i.idealEdgeLength)?i.idealEdgeLength(k):i.idealEdgeLength,O=cr(i.edgeElasticity)?i.edgeElasticity(k):i.edgeElasticity,N=s.idToIndex[I.sourceId],F=s.idToIndex[I.targetId],P=s.indexToGraph[N],z=s.indexToGraph[F];if(P!=z){for(var $=rL(I.sourceId,I.targetId,s),G=s.graphSet[$],V=0,v=s.layoutNodes[N];G.indexOf(v.id)===-1;)v=s.layoutNodes[s.idToIndex[v.parentId]],V++;for(v=s.layoutNodes[F];G.indexOf(v.id)===-1;)v=s.layoutNodes[s.idToIndex[v.parentId]],V++;A*=V*i.nestingFactor}I.idealLength=A,I.elasticity=O,s.layoutEdges.push(I)}return s},rL=function(e,r,i){var n=sS(e,r,0,i);return 2>n.count?0:n.graph},sS=function(e,r,i,n){var a=n.graphSet[i];if(-1<a.indexOf(e)&&-1<a.indexOf(r))return{count:2,graph:i};for(var o=0,s=0;s<a.length;s++){var u=a[s],l=n.idToIndex[u],c=n.layoutNodes[l].children;if(c.length!==0){var d=n.indexToGraph[n.idToIndex[c[0]]],f=sS(e,r,d,n);if(f.count!==0)if(f.count===1){if(o++,o===2)break}else return f}}return{count:o,graph:i}},iL,nL=function(e,r){for(var i=e.clientWidth,n=e.clientHeight,a=0;a<e.nodeSize;a++){var o=e.layoutNodes[a];o.children.length===0&&!o.isLocked&&(o.positionX=Math.random()*i,o.positionY=Math.random()*n)}},uS=function(e,r,i){var n=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(i.forEach(function(o){var s=e.layoutNodes[e.idToIndex[o.data("id")]];a.x1=Math.min(a.x1,s.positionX),a.x2=Math.max(a.x2,s.positionX),a.y1=Math.min(a.y1,s.positionY),a.y2=Math.max(a.y2,s.positionY)}),a.w=a.x2-a.x1,a.h=a.y2-a.y1),function(o,s){var u=e.layoutNodes[e.idToIndex[o.data("id")]];if(r.boundingBox){var l=a.w===0?.5:(u.positionX-a.x1)/a.w,c=a.h===0?.5:(u.positionY-a.y1)/a.h;return{x:n.x1+l*n.w,y:n.y1+c*n.h}}else return{x:u.positionX,y:u.positionY}}},aL=function(e,r,i){var n=i.layout,a=i.eles.nodes(),o=uS(e,i,a);a.positions(o),e.ready!==!0&&(e.ready=!0,n.one("layoutready",i.ready),n.emit({type:"layoutready",layout:this}))},oL=function(e,r,i){sL(e,r),cL(e),dL(e,r),fL(e),hL(e)},sL=function(e,r){for(var i=0;i<e.graphSet.length;i++)for(var n=e.graphSet[i],a=n.length,o=0;o<a;o++)for(var s=e.layoutNodes[e.idToIndex[n[o]]],u=o+1;u<a;u++){var l=e.layoutNodes[e.idToIndex[n[u]]];uL(s,l,e,r)}},Dx=function(e){return-e+2*e*Math.random()},uL=function(e,r,i,n){var a=e.cmptId,o=r.cmptId;if(!(a!==o&&!i.isCompound)){var s=r.positionX-e.positionX,u=r.positionY-e.positionY,l=1;s===0&&u===0&&(s=Dx(l),u=Dx(l));var c=lL(e,r,s,u);if(c>0)var d=n.nodeOverlap*c,f=Math.sqrt(s*s+u*u),p=d*s/f,h=d*u/f;else var g=_h(e,s,u),v=_h(r,-1*s,-1*u),m=v.x-g.x,y=v.y-g.y,b=m*m+y*y,f=Math.sqrt(b),d=(e.nodeRepulsion+r.nodeRepulsion)/b,p=d*m/f,h=d*y/f;e.isLocked||(e.offsetX-=p,e.offsetY-=h),r.isLocked||(r.offsetX+=p,r.offsetY+=h)}},lL=function(e,r,i,n){if(i>0)var a=e.maxX-r.minX;else var a=r.maxX-e.minX;if(n>0)var o=e.maxY-r.minY;else var o=r.maxY-e.minY;return a>=0&&o>=0?Math.sqrt(a*a+o*o):0},_h=function(e,r,i){var n=e.positionX,a=e.positionY,o=e.height||1,s=e.width||1,u=i/r,l=o/s,c={};return r===0&&0<i||r===0&&0>i?(c.x=n,c.y=a+o/2,c):0<r&&-1*l<=u&&u<=l?(c.x=n+s/2,c.y=a+s*i/2/r,c):0>r&&-1*l<=u&&u<=l?(c.x=n-s/2,c.y=a-s*i/2/r,c):0<i&&(u<=-1*l||u>=l)?(c.x=n+o*r/2/i,c.y=a+o/2,c):(0>i&&(u<=-1*l||u>=l)&&(c.x=n-o*r/2/i,c.y=a-o/2),c)},cL=function(e,r){for(var i=0;i<e.edgeSize;i++){var n=e.layoutEdges[i],a=e.idToIndex[n.sourceId],o=e.layoutNodes[a],s=e.idToIndex[n.targetId],u=e.layoutNodes[s],l=u.positionX-o.positionX,c=u.positionY-o.positionY;if(!(l===0&&c===0)){var d=_h(o,l,c),f=_h(u,-1*l,-1*c),p=f.x-d.x,h=f.y-d.y,g=Math.sqrt(p*p+h*h),v=Math.pow(n.idealLength-g,2)/n.elasticity;if(g!==0)var m=v*p/g,y=v*h/g;else var m=0,y=0;o.isLocked||(o.offsetX+=m,o.offsetY+=y),u.isLocked||(u.offsetX-=m,u.offsetY-=y)}}},dL=function(e,r){if(r.gravity!==0)for(var i=1,n=0;n<e.graphSet.length;n++){var a=e.graphSet[n],o=a.length;if(n===0)var s=e.clientHeight/2,u=e.clientWidth/2;else var l=e.layoutNodes[e.idToIndex[a[0]]],c=e.layoutNodes[e.idToIndex[l.parentId]],s=c.positionX,u=c.positionY;for(var d=0;d<o;d++){var f=e.layoutNodes[e.idToIndex[a[d]]];if(!f.isLocked){var p=s-f.positionX,h=u-f.positionY,g=Math.sqrt(p*p+h*h);if(g>i){var v=r.gravity*p/g,m=r.gravity*h/g;f.offsetX+=v,f.offsetY+=m}}}}},fL=function(e,r){var i=[],n=0,a=-1;for(i.push.apply(i,e.graphSet[0]),a+=e.graphSet[0].length;n<=a;){var o=i[n++],s=e.idToIndex[o],u=e.layoutNodes[s],l=u.children;if(0<l.length&&!u.isLocked){for(var c=u.offsetX,d=u.offsetY,f=0;f<l.length;f++){var p=e.layoutNodes[e.idToIndex[l[f]]];p.offsetX+=c,p.offsetY+=d,i[++a]=l[f]}u.offsetX=0,u.offsetY=0}}},hL=function(e,r){for(var i=0;i<e.nodeSize;i++){var n=e.layoutNodes[i];0<n.children.length&&(n.maxX=void 0,n.minX=void 0,n.maxY=void 0,n.minY=void 0)}for(var i=0;i<e.nodeSize;i++){var n=e.layoutNodes[i];if(!(0<n.children.length||n.isLocked)){var a=pL(n.offsetX,n.offsetY,e.temperature);n.positionX+=a.x,n.positionY+=a.y,n.offsetX=0,n.offsetY=0,n.minX=n.positionX-n.width,n.maxX=n.positionX+n.width,n.minY=n.positionY-n.height,n.maxY=n.positionY+n.height,lS(n,e)}}for(var i=0;i<e.nodeSize;i++){var n=e.layoutNodes[i];0<n.children.length&&!n.isLocked&&(n.positionX=(n.maxX+n.minX)/2,n.positionY=(n.maxY+n.minY)/2,n.width=n.maxX-n.minX,n.height=n.maxY-n.minY)}},pL=function(e,r,i){var n=Math.sqrt(e*e+r*r);if(n>i)var a={x:i*e/n,y:i*r/n};else var a={x:e,y:r};return a},lS=function(e,r){var i=e.parentId;if(i!=null){var n=r.layoutNodes[r.idToIndex[i]],a=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,a=!0),(n.minX==null||e.minX-n.padLeft<n.minX)&&(n.minX=e.minX-n.padLeft,a=!0),(n.maxY==null||e.maxY+n.padBottom>n.maxY)&&(n.maxY=e.maxY+n.padBottom,a=!0),(n.minY==null||e.minY-n.padTop<n.minY)&&(n.minY=e.minY-n.padTop,a=!0),a)return lS(n,r)}},Ex=function(e,r){for(var i=e.layoutNodes,n=[],a=0;a<i.length;a++){var o=i[a],s=o.cmptId,u=n[s]=n[s]||[];u.push(o)}for(var l=0,a=0;a<n.length;a++){var c=n[a];if(c){c.x1=1/0,c.x2=-1/0,c.y1=1/0,c.y2=-1/0;for(var d=0;d<c.length;d++){var f=c[d];c.x1=Math.min(c.x1,f.positionX-f.width/2),c.x2=Math.max(c.x2,f.positionX+f.width/2),c.y1=Math.min(c.y1,f.positionY-f.height/2),c.y2=Math.max(c.y2,f.positionY+f.height/2)}c.w=c.x2-c.x1,c.h=c.y2-c.y1,l+=c.w*c.h}}n.sort(function(y,b){return b.w*b.h-y.w*y.h});for(var p=0,h=0,g=0,v=0,m=Math.sqrt(l)*e.clientWidth/e.clientHeight,a=0;a<n.length;a++){var c=n[a];if(c){for(var d=0;d<c.length;d++){var f=c[d];f.isLocked||(f.positionX+=p-c.x1,f.positionY+=h-c.y1)}p+=c.w+r.componentSpacing,g+=c.w+r.componentSpacing,v=Math.max(v,c.h),g>m&&(h+=v+r.componentSpacing,p=0,g=0,v=0)}}},vL={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function cS(t){this.options=$e({},vL,t)}cS.prototype.run=function(){var t=this.options,e=t,r=t.cy,i=e.eles,n=i.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var a=fi(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)i.nodes().layoutPositions(this,e,function(ue){return{x:a.x1,y:a.y1}});else{var o=n.size(),s=Math.sqrt(o*a.h/a.w),u=Math.round(s),l=Math.round(a.w/a.h*s),c=function(he){if(he==null)return Math.min(u,l);var le=Math.min(u,l);le==u?u=he:l=he},d=function(he){if(he==null)return Math.max(u,l);var le=Math.max(u,l);le==u?u=he:l=he},f=e.rows,p=e.cols!=null?e.cols:e.columns;if(f!=null&&p!=null)u=f,l=p;else if(f!=null&&p==null)u=f,l=Math.ceil(o/u);else if(f==null&&p!=null)l=p,u=Math.ceil(o/l);else if(l*u>o){var h=c(),g=d();(h-1)*g>=o?c(h-1):(g-1)*h>=o&&d(g-1)}else for(;l*u<o;){var v=c(),m=d();(m+1)*v>=o?d(m+1):c(v+1)}var y=a.w/l,b=a.h/u;if(e.condense&&(y=0,b=0),e.avoidOverlap)for(var w=0;w<n.length;w++){var T=n[w],x=T._private.position;(x.x==null||x.y==null)&&(x.x=0,x.y=0);var _=T.layoutDimensions(e),D=e.avoidOverlapPadding,E=_.w+D,M=_.h+D;y=Math.max(y,E),b=Math.max(b,M)}for(var k={},I=function(he,le){return!!k["c-"+he+"-"+le]},A=function(he,le){k["c-"+he+"-"+le]=!0},O=0,N=0,F=function(){N++,N>=l&&(N=0,O++)},P={},z=0;z<n.length;z++){var $=n[z],G=e.position($);if(G&&(G.row!==void 0||G.col!==void 0)){var V={row:G.row,col:G.col};if(V.col===void 0)for(V.col=0;I(V.row,V.col);)V.col++;else if(V.row===void 0)for(V.row=0;I(V.row,V.col);)V.row++;P[$.id()]=V,A(V.row,V.col)}}var W=function(he,le){var me,be;if(he.locked()||he.isParent())return!1;var Se=P[he.id()];if(Se)me=Se.col*y+y/2+a.x1,be=Se.row*b+b/2+a.y1;else{for(;I(O,N);)F();me=N*y+y/2+a.x1,be=O*b+b/2+a.y1,A(O,N),F()}return{x:me,y:be}};n.layoutPositions(this,e,W)}return this};var mL={ready:function(){},stop:function(){}};function E0(t){this.options=$e({},mL,t)}E0.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this};E0.prototype.stop=function(){return this};var gL={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function dS(t){this.options=$e({},gL,t)}dS.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),i=cr(t.positions);function n(a){if(t.positions==null)return LN(a.position());if(i)return t.positions(a);var o=t.positions[a._private.data.id];return o??null}return r.layoutPositions(this,t,function(a,o){var s=n(a);return a.locked()||s==null?!1:s}),this};var yL={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function fS(t){this.options=$e({},yL,t)}fS.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,i=fi(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),n=function(o,s){return{x:i.x1+Math.round(Math.random()*i.w),y:i.y1+Math.round(Math.random()*i.h)}};return r.nodes().layoutPositions(this,t,n),this};var bL=[{name:"breadthfirst",impl:nS},{name:"circle",impl:aS},{name:"concentric",impl:oS},{name:"cose",impl:Uh},{name:"grid",impl:cS},{name:"null",impl:E0},{name:"preset",impl:dS},{name:"random",impl:fS}];function hS(t){this.options=t,this.notifications=0}var kx=function(){},Mx=function(){throw new Error("A headless instance can not render images")};hS.prototype={recalculateRenderedStyle:kx,notify:function(){this.notifications++},init:kx,isHeadless:function(){return!0},png:Mx,jpg:Mx};var k0={};k0.arrowShapeWidth=.3;k0.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=function(l,c,d,f,p,h,g){var v=p.x-d/2-g,m=p.x+d/2+g,y=p.y-d/2-g,b=p.y+d/2+g,w=v<=l&&l<=m&&y<=c&&c<=b;return w},i=function(l,c,d,f,p){var h=l*Math.cos(f)-c*Math.sin(f),g=l*Math.sin(f)+c*Math.cos(f),v=h*d,m=g*d,y=v+p.x,b=m+p.y;return{x:y,y:b}},n=function(l,c,d,f){for(var p=[],h=0;h<l.length;h+=2){var g=l[h],v=l[h+1];p.push(i(g,v,c,d,f))}return p},a=function(l){for(var c=[],d=0;d<l.length;d++){var f=l[d];c.push(f.x,f.y)}return c},o=function(l){return l.pstyle("width").pfValue*l.pstyle("arrow-scale").pfValue*2},s=function(l,c){Ue(c)&&(c=t[c]),t[l]=$e({name:l,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(f,p,h,g,v,m){var y=a(n(this.points,h+2*m,g,v)),b=Ei(f,p,y);return b},roughCollide:r,draw:function(f,p,h,g){var v=n(this.points,p,h,g);e.arrowShapeImpl("polygon")(f,v)},spacing:function(f){return 0},gap:o},c)};s("none",{collide:mh,roughCollide:mh,draw:h0,spacing:jw,gap:jw}),s("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),s("arrow","triangle"),s("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:function(l,c,d,f,p){var h=n(this.points,c,d,f),g=this.controlPoint,v=i(g[0],g[1],c,d,f);e.arrowShapeImpl(this.name)(l,h,v)},gap:function(l){return o(l)*.8}}),s("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(l,c,d,f,p,h,g){var v=a(n(this.points,d+2*g,f,p)),m=a(n(this.pointsTee,d+2*g,f,p)),y=Ei(l,c,v)||Ei(l,c,m);return y},draw:function(l,c,d,f,p){var h=n(this.points,c,d,f),g=n(this.pointsTee,c,d,f);e.arrowShapeImpl(this.name)(l,h,g)}}),s("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(l,c,d,f,p,h,g){var v=p,m=Math.pow(v.x-l,2)+Math.pow(v.y-c,2)<=Math.pow((d+2*g)*this.radius,2),y=a(n(this.points,d+2*g,f,p));return Ei(l,c,y)||m},draw:function(l,c,d,f,p){var h=n(this.pointsTr,c,d,f);e.arrowShapeImpl(this.name)(l,h,f.x,f.y,this.radius*c)},spacing:function(l){return e.getArrowWidth(l.pstyle("width").pfValue,l.pstyle("arrow-scale").value)*this.radius}}),s("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(l,c){var d=this.baseCrossLinePts.slice(),f=c/l,p=3,h=5;return d[p]=d[p]-f,d[h]=d[h]-f,d},collide:function(l,c,d,f,p,h,g){var v=a(n(this.points,d+2*g,f,p)),m=a(n(this.crossLinePts(d,h),d+2*g,f,p)),y=Ei(l,c,v)||Ei(l,c,m);return y},draw:function(l,c,d,f,p){var h=n(this.points,c,d,f),g=n(this.crossLinePts(c,p),c,d,f);e.arrowShapeImpl(this.name)(l,h,g)}}),s("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(l){return o(l)*.525}}),s("circle",{radius:.15,collide:function(l,c,d,f,p,h,g){var v=p,m=Math.pow(v.x-l,2)+Math.pow(v.y-c,2)<=Math.pow((d+2*g)*this.radius,2);return m},draw:function(l,c,d,f,p){e.arrowShapeImpl(this.name)(l,f.x,f.y,this.radius*c)},spacing:function(l){return e.getArrowWidth(l.pstyle("width").pfValue,l.pstyle("arrow-scale").value)*this.radius}}),s("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(l){return 1},gap:function(l){return 1}}),s("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(l){return l.pstyle("width").pfValue*l.pstyle("arrow-scale").value}}),s("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(l){return .95*l.pstyle("width").pfValue*l.pstyle("arrow-scale").value}})};var Go={};Go.projectIntoViewport=function(t,e){var r=this.cy,i=this.findContainerClientCoords(),n=i[0],a=i[1],o=i[4],s=r.pan(),u=r.zoom(),l=((t-n)/o-s.x)/u,c=((e-a)/o-s.y)/u;return[l,c]};Go.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),i=function(m){return parseFloat(r.getPropertyValue(m))},n={left:i("padding-left"),right:i("padding-right"),top:i("padding-top"),bottom:i("padding-bottom")},a={left:i("border-left-width"),right:i("border-right-width"),top:i("border-top-width"),bottom:i("border-bottom-width")},o=t.clientWidth,s=t.clientHeight,u=n.left+n.right,l=n.top+n.bottom,c=a.left+a.right,d=e.width/(o+c),f=o-u,p=s-l,h=e.left+n.left+a.left,g=e.top+n.top+a.top;return this.containerBB=[h,g,f,p,d]};Go.invalidateContainerClientCoordsCache=function(){this.containerBB=null};Go.findNearestElement=function(t,e,r,i){return this.findNearestElements(t,e,r,i)[0]};Go.findNearestElements=function(t,e,r,i){var n=this,a=this,o=a.getCachedZSortedEles(),s=[],u=a.cy.zoom(),l=a.cy.hasCompoundNodes(),c=(i?24:8)/u,d=(i?8:2)/u,f=(i?8:2)/u,p=1/0,h,g;r&&(o=o.interactive);function v(_,D){if(_.isNode()){if(g)return;g=_,s.push(_)}if(_.isEdge()&&(D==null||D<p))if(h){if(h.pstyle("z-compound-depth").value===_.pstyle("z-compound-depth").value&&h.pstyle("z-compound-depth").value===_.pstyle("z-compound-depth").value){for(var E=0;E<s.length;E++)if(s[E].isEdge()){s[E]=_,h=_,p=D??p;break}}}else s.push(_),h=_,p=D??p}function m(_){var D=_.outerWidth()+2*d,E=_.outerHeight()+2*d,M=D/2,k=E/2,I=_.position(),A=_.pstyle("corner-radius").value==="auto"?"auto":_.pstyle("corner-radius").pfValue,O=_._private.rscratch;if(I.x-M<=t&&t<=I.x+M&&I.y-k<=e&&e<=I.y+k){var N=a.nodeShapes[n.getNodeShape(_)];if(N.checkPoint(t,e,0,D,E,I.x,I.y,A,O))return v(_,0),!0}}function y(_){var D=_._private,E=D.rscratch,M=_.pstyle("width").pfValue,k=_.pstyle("arrow-scale").value,I=M/2+c,A=I*I,O=I*2,z=D.source,$=D.target,N;if(E.edgeType==="segments"||E.edgeType==="straight"||E.edgeType==="haystack"){for(var F=E.allpts,P=0;P+3<F.length;P+=2)if(QN(t,e,F[P],F[P+1],F[P+2],F[P+3],O)&&A>(N=iF(t,e,F[P],F[P+1],F[P+2],F[P+3])))return v(_,N),!0}else if(E.edgeType==="bezier"||E.edgeType==="multibezier"||E.edgeType==="self"||E.edgeType==="compound"){for(var F=E.allpts,P=0;P+5<E.allpts.length;P+=4)if(JN(t,e,F[P],F[P+1],F[P+2],F[P+3],F[P+4],F[P+5],O)&&A>(N=rF(t,e,F[P],F[P+1],F[P+2],F[P+3],F[P+4],F[P+5])))return v(_,N),!0}for(var z=z||D.source,$=$||D.target,G=n.getArrowWidth(M,k),V=[{name:"source",x:E.arrowStartX,y:E.arrowStartY,angle:E.srcArrowAngle},{name:"target",x:E.arrowEndX,y:E.arrowEndY,angle:E.tgtArrowAngle},{name:"mid-source",x:E.midX,y:E.midY,angle:E.midsrcArrowAngle},{name:"mid-target",x:E.midX,y:E.midY,angle:E.midtgtArrowAngle}],P=0;P<V.length;P++){var W=V[P],ue=a.arrowShapes[_.pstyle(W.name+"-arrow-shape").value],he=_.pstyle("width").pfValue;if(ue.roughCollide(t,e,G,W.angle,{x:W.x,y:W.y},he,c)&&ue.collide(t,e,G,W.angle,{x:W.x,y:W.y},he,c))return v(_),!0}l&&s.length>0&&(m(z),m($))}function b(_,D,E){return di(_,D,E)}function w(_,D){var E=_._private,M=f,k;D?k=D+"-":k="",_.boundingBox();var I=E.labelBounds[D||"main"],A=_.pstyle(k+"label").value,O=_.pstyle("text-events").strValue==="yes";if(!(!O||!A)){var N=b(E.rscratch,"labelX",D),F=b(E.rscratch,"labelY",D),P=b(E.rscratch,"labelAngle",D),z=_.pstyle(k+"text-margin-x").pfValue,$=_.pstyle(k+"text-margin-y").pfValue,G=I.x1-M-z,V=I.x2+M-z,W=I.y1-M-$,ue=I.y2+M-$;if(P){var he=Math.cos(P),le=Math.sin(P),me=function(ne,we){return ne=ne-N,we=we-F,{x:ne*he-we*le+N,y:ne*le+we*he+F}},be=me(G,W),Se=me(G,ue),se=me(V,W),q=me(V,ue),X=[be.x+z,be.y+$,se.x+z,se.y+$,q.x+z,q.y+$,Se.x+z,Se.y+$];if(Ei(t,e,X))return v(_),!0}else if(Wa(I,t,e))return v(_),!0}}for(var T=o.length-1;T>=0;T--){var x=o[T];x.isNode()?m(x)||w(x):y(x)||w(x)||w(x,"source")||w(x,"target")}return s};Go.getAllInBox=function(t,e,r,i){var n=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),o=2/a,s=[],u=Math.min(t,r),l=Math.max(t,r),c=Math.min(e,i),d=Math.max(e,i);t=u,r=l,e=c,i=d;var f=fi({x1:t,y1:e,x2:r,y2:i}),p=[{x:f.x1,y:f.y1},{x:f.x2,y:f.y1},{x:f.x2,y:f.y2},{x:f.x1,y:f.y2}],h=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function g(ne,we,Re){return di(ne,we,Re)}function v(ne,we){var Re=ne._private,vt=o,Je="";ne.boundingBox();var Ge=Re.labelBounds.main;if(!Ge)return null;var qe=g(Re.rscratch,"labelX",we),Ee=g(Re.rscratch,"labelY",we),He=g(Re.rscratch,"labelAngle",we),ze=ne.pstyle(Je+"text-margin-x").pfValue,et=ne.pstyle(Je+"text-margin-y").pfValue,Ye=Ge.x1-vt-ze,ct=Ge.x2+vt-ze,gt=Ge.y1-vt-et,Pt=Ge.y2+vt-et;if(He){var Et=Math.cos(He),_t=Math.sin(He),ce=function(H,Y){return H=H-qe,Y=Y-Ee,{x:H*Et-Y*_t+qe,y:H*_t+Y*Et+Ee}};return[ce(Ye,gt),ce(ct,gt),ce(ct,Pt),ce(Ye,Pt)]}else return[{x:Ye,y:gt},{x:ct,y:gt},{x:ct,y:Pt},{x:Ye,y:Pt}]}function m(ne,we,Re,vt){function Je(Ge,qe,Ee){return(Ee.y-Ge.y)*(qe.x-Ge.x)>(qe.y-Ge.y)*(Ee.x-Ge.x)}return Je(ne,Re,vt)!==Je(we,Re,vt)&&Je(ne,we,Re)!==Je(ne,we,vt)}for(var y=0;y<n.length;y++){var b=n[y];if(b.isNode()){var w=b,T=w.pstyle("text-events").strValue==="yes",x=w.pstyle("box-selection").strValue,_=w.pstyle("box-select-labels").strValue==="yes";if(x==="none")continue;var D=(x==="overlap"||_)&&T,E=w.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:D});if(x==="contain"){var M=!1;if(_&&T){var k=v(w);k&&Am(k,p)&&(s.push(w),M=!0)}!M&&CT(f,E)&&s.push(w)}else if(x==="overlap"&&g0(f,E)){var I=w.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1}),A=[{x:I.x1,y:I.y1},{x:I.x2,y:I.y1},{x:I.x2,y:I.y2},{x:I.x1,y:I.y2}];if(Am(A,p))s.push(w);else{var O=v(w);O&&Am(O,p)&&s.push(w)}}}else{var N=b,F=N._private,P=F.rscratch,z=N.pstyle("box-selection").strValue;if(z==="none")continue;if(z==="contain"){if(P.startX!=null&&P.startY!=null&&!Wa(f,P.startX,P.startY)||P.endX!=null&&P.endY!=null&&!Wa(f,P.endX,P.endY))continue;if(P.edgeType==="bezier"||P.edgeType==="multibezier"||P.edgeType==="self"||P.edgeType==="compound"||P.edgeType==="segments"||P.edgeType==="haystack"){for(var $=F.rstyle.bezierPts||F.rstyle.linePts||F.rstyle.haystackPts,G=!0,V=0;V<$.length;V++)if(!Yw(f,$[V])){G=!1;break}G&&s.push(N)}else P.edgeType==="straight"&&s.push(N)}else if(z==="overlap"){var W=!1;if(P.startX!=null&&P.startY!=null&&P.endX!=null&&P.endY!=null&&(Wa(f,P.startX,P.startY)||Wa(f,P.endX,P.endY)))s.push(N),W=!0;else if(!W&&P.edgeType==="haystack"){for(var ue=F.rstyle.haystackPts,he=0;he<ue.length;he++)if(Yw(f,ue[he])){s.push(N),W=!0;break}}if(!W){var le=F.rstyle.bezierPts||F.rstyle.linePts||F.rstyle.haystackPts;if((!le||le.length<2)&&P.edgeType==="straight"&&P.startX!=null&&P.startY!=null&&P.endX!=null&&P.endY!=null&&(le=[{x:P.startX,y:P.startY},{x:P.endX,y:P.endY}]),!le||le.length<2)continue;for(var me=0;me<le.length-1;me++){for(var be=le[me],Se=le[me+1],se=0;se<h.length;se++){var q=Sr(h[se],2),X=q[0],J=q[1];if(m(be,Se,X,J)){s.push(N),W=!0;break}}if(W)break}}}}}return s};var xh={};xh.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",i=e.edgeType==="bezier",n=e.edgeType==="multibezier",a=e.edgeType==="segments",o=e.edgeType==="compound",s=e.edgeType==="self",u,l,c,d,f,p,m,y;if(r?(c=e.haystackPts[0],d=e.haystackPts[1],f=e.haystackPts[2],p=e.haystackPts[3]):(c=e.arrowStartX,d=e.arrowStartY,f=e.arrowEndX,p=e.arrowEndY),m=e.midX,y=e.midY,a)u=c-e.segpts[0],l=d-e.segpts[1];else if(n||o||s||i){var h=e.allpts,g=zr(h[0],h[2],h[4],.1),v=zr(h[1],h[3],h[5],.1);u=c-g,l=d-v}else u=c-m,l=d-y;e.srcArrowAngle=Wf(u,l);var m=e.midX,y=e.midY;if(r&&(m=(c+f)/2,y=(d+p)/2),u=f-c,l=p-d,a){var h=e.allpts;if(h.length/2%2===0){var b=h.length/2,w=b-2;u=h[b]-h[w],l=h[b+1]-h[w+1]}else if(e.isRound)u=e.midVector[1],l=-e.midVector[0];else{var b=h.length/2-1,w=b-2;u=h[b]-h[w],l=h[b+1]-h[w+1]}}else if(n||o||s){var h=e.allpts,T=e.ctrlpts,x,_,D,E;if(T.length/2%2===0){var M=h.length/2-1,k=M+2,I=k+2;x=zr(h[M],h[k],h[I],0),_=zr(h[M+1],h[k+1],h[I+1],0),D=zr(h[M],h[k],h[I],1e-4),E=zr(h[M+1],h[k+1],h[I+1],1e-4)}else{var k=h.length/2-1,M=k-2,I=k+2;x=zr(h[M],h[k],h[I],.4999),_=zr(h[M+1],h[k+1],h[I+1],.4999),D=zr(h[M],h[k],h[I],.5),E=zr(h[M+1],h[k+1],h[I+1],.5)}u=D-x,l=E-_}if(e.midtgtArrowAngle=Wf(u,l),e.midDispX=u,e.midDispY=l,u*=-1,l*=-1,a){var h=e.allpts;if(h.length/2%2!==0){if(!e.isRound){var b=h.length/2-1,A=b+2;u=-(h[A]-h[b]),l=-(h[A+1]-h[b+1])}}}if(e.midsrcArrowAngle=Wf(u,l),a)u=f-e.segpts[e.segpts.length-2],l=p-e.segpts[e.segpts.length-1];else if(n||o||s||i){var h=e.allpts,O=h.length,g=zr(h[O-6],h[O-4],h[O-2],.9),v=zr(h[O-5],h[O-3],h[O-1],.9);u=f-g,l=p-v}else u=f-m,l=p-y;e.tgtArrowAngle=Wf(u,l)};xh.getArrowWidth=xh.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},i=r[t+", "+e];return i||(i=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=i,i)};var Jg,e0,Vn={},Zi={},Ix,Ax,Vo,ch,fa,Po,Lo,Ln,tu,Jf,pS,vS,t0,r0,Ox,Rx=function(e,r,i){i.x=r.x-e.x,i.y=r.y-e.y,i.len=Math.sqrt(i.x*i.x+i.y*i.y),i.nx=i.x/i.len,i.ny=i.y/i.len,i.ang=Math.atan2(i.ny,i.nx)},CL=function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},wL=function(e,r,i,n,a){if(e!==Ox?Rx(r,e,Vn):CL(Zi,Vn),Rx(r,i,Zi),Ix=Vn.nx*Zi.ny-Vn.ny*Zi.nx,Ax=Vn.nx*Zi.nx-Vn.ny*-Zi.ny,fa=Math.asin(Math.max(-1,Math.min(1,Ix))),Math.abs(fa)<1e-6){Jg=r.x,e0=r.y,Lo=tu=0;return}Vo=1,ch=!1,Ax<0?fa<0?fa=Math.PI+fa:(fa=Math.PI-fa,Vo=-1,ch=!0):fa>0&&(Vo=-1,ch=!0),r.radius!==void 0?tu=r.radius:tu=n,Po=fa/2,Jf=Math.min(Vn.len/2,Zi.len/2),a?(Ln=Math.abs(Math.cos(Po)*tu/Math.sin(Po)),Ln>Jf?(Ln=Jf,Lo=Math.abs(Ln*Math.sin(Po)/Math.cos(Po))):Lo=tu):(Ln=Math.min(Jf,tu),Lo=Math.abs(Ln*Math.sin(Po)/Math.cos(Po))),t0=r.x+Zi.nx*Ln,r0=r.y+Zi.ny*Ln,Jg=t0-Zi.ny*Lo*Vo,e0=r0+Zi.nx*Lo*Vo,pS=r.x+Vn.nx*Ln,vS=r.y+Vn.ny*Ln,Ox=r};function mS(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function M0(t,e,r,i){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return i===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(wL(t,e,r,i,n),{cx:Jg,cy:e0,radius:Lo,startX:pS,startY:vS,stopX:t0,stopY:r0,startAngle:Vn.ang+Math.PI/2*Vo,endAngle:Zi.ang-Math.PI/2*Vo,counterClockwise:ch})}var ql=.01,_L=Math.sqrt(2*ql),ai={};ai.findMidptPtsEtc=function(t,e){var r=e.posPts,i=e.intersectionPts,n=e.vectorNormInverse,a,o=t.pstyle("source-endpoint"),s=t.pstyle("target-endpoint"),u=o.units!=null&&s.units!=null,l=function(T,x,_,D){var E=D-x,M=_-T,k=Math.sqrt(M*M+E*E);return{x:-E/k,y:M/k}},c=t.pstyle("edge-distances").value;switch(c){case"node-position":a=r;break;case"intersection":a=i;break;case"endpoints":{if(u){var d=this.manualEndptToPx(t.source()[0],o),f=Sr(d,2),p=f[0],h=f[1],g=this.manualEndptToPx(t.target()[0],s),v=Sr(g,2),m=v[0],y=v[1],b={x1:p,y1:h,x2:m,y2:y};n=l(p,h,m,y),a=b}else Vt("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=i;break}}return{midptPts:a,vectorNormInverse:n}};ai.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],i=r._private,n=i.rscratch;if(!n.haystack){var a=Math.random()*2*Math.PI;n.source={x:Math.cos(a),y:Math.sin(a)},a=Math.random()*2*Math.PI,n.target={x:Math.cos(a),y:Math.sin(a)}}var o=i.source,s=i.target,u=o.position(),l=s.position(),c=o.width(),d=s.width(),f=o.height(),p=s.height(),h=r.pstyle("haystack-radius").value,g=h/2;n.haystackPts=n.allpts=[n.source.x*c*g+u.x,n.source.y*f*g+u.y,n.target.x*d*g+l.x,n.target.y*p*g+l.y],n.midX=(n.allpts[0]+n.allpts[2])/2,n.midY=(n.allpts[1]+n.allpts[3])/2,n.edgeType="haystack",n.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}};ai.findSegmentsPoints=function(t,e){var r=t._private.rscratch,i=t.pstyle("segment-weights"),n=t.pstyle("segment-distances"),a=t.pstyle("segment-radii"),o=t.pstyle("radius-type"),s=Math.min(i.pfValue.length,n.pfValue.length),u=a.pfValue[a.pfValue.length-1],l=o.pfValue[o.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var c=0;c<s;c++){var d=i.pfValue[c],f=n.pfValue[c],p=1-d,h=d,g=this.findMidptPtsEtc(t,e),v=g.midptPts,m=g.vectorNormInverse,y={x:v.x1*p+v.x2*h,y:v.y1*p+v.y2*h};r.segpts.push(y.x+m.x*f,y.y+m.y*f),r.radii.push(a.pfValue[c]!==void 0?a.pfValue[c]:u),r.isArcRadius.push((o.pfValue[c]!==void 0?o.pfValue[c]:l)==="arc-radius")}};ai.findLoopPoints=function(t,e,r,i){var n=t._private.rscratch,a=e.dirCounts,o=e.srcPos,s=t.pstyle("control-point-distances"),u=s?s.pfValue[0]:void 0,l=t.pstyle("loop-direction").pfValue,c=t.pstyle("loop-sweep").pfValue,d=t.pstyle("control-point-step-size").pfValue;n.edgeType="self";var f=r,p=d;i&&(f=0,p=u);var h=l-Math.PI/2,g=h-c/2,v=h+c/2,m=l+"_"+c;f=a[m]===void 0?a[m]=0:++a[m],n.ctrlpts=[o.x+Math.cos(g)*1.4*p*(f/3+1),o.y+Math.sin(g)*1.4*p*(f/3+1),o.x+Math.cos(v)*1.4*p*(f/3+1),o.y+Math.sin(v)*1.4*p*(f/3+1)]};ai.findCompoundLoopPoints=function(t,e,r,i){var n=t._private.rscratch;n.edgeType="compound";var a=e.srcPos,o=e.tgtPos,s=e.srcW,u=e.srcH,l=e.tgtW,c=e.tgtH,d=t.pstyle("control-point-step-size").pfValue,f=t.pstyle("control-point-distances"),p=f?f.pfValue[0]:void 0,h=r,g=d;i&&(h=0,g=p);var v=50,m={x:a.x-s/2,y:a.y-u/2},y={x:o.x-l/2,y:o.y-c/2},b={x:Math.min(m.x,y.x),y:Math.min(m.y,y.y)},w=.5,T=Math.max(w,Math.log(s*ql)),x=Math.max(w,Math.log(l*ql));n.ctrlpts=[b.x,b.y-(1+Math.pow(v,1.12)/100)*g*(h/3+1)*T,b.x-(1+Math.pow(v,1.12)/100)*g*(h/3+1)*x,b.y]};ai.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"};ai.findBezierPoints=function(t,e,r,i,n){var a=t._private.rscratch,o=t.pstyle("control-point-step-size").pfValue,s=t.pstyle("control-point-distances"),u=t.pstyle("control-point-weights"),l=s&&u?Math.min(s.value.length,u.value.length):1,c=s?s.pfValue[0]:void 0,d=u.value[0],f=i;a.edgeType=f?"multibezier":"bezier",a.ctrlpts=[];for(var p=0;p<l;p++){var h=(.5-e.eles.length/2+r)*o*(n?-1:1),g=void 0,v=m0(h);f&&(c=s?s.pfValue[p]:o,d=u.value[p]),i?g=c:g=c!==void 0?v*c:void 0;var m=g!==void 0?g:h,y=1-d,b=d,w=this.findMidptPtsEtc(t,e),T=w.midptPts,x=w.vectorNormInverse,_={x:T.x1*y+T.x2*b,y:T.y1*y+T.y2*b};a.ctrlpts.push(_.x+x.x*m,_.y+x.y*m)}};ai.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var i="vertical",n="horizontal",a="leftward",o="rightward",s="downward",u="upward",l="auto",c=e.posPts,d=e.srcW,f=e.srcH,p=e.tgtW,h=e.tgtH,g=t.pstyle("edge-distances").value,v=g!=="node-position",m=t.pstyle("taxi-direction").value,y=m,b=t.pstyle("taxi-turn"),w=b.units==="%",T=b.pfValue,x=T<0,_=t.pstyle("taxi-turn-min-distance").pfValue,D=v?(d+p)/2:0,E=v?(f+h)/2:0,M=c.x2-c.x1,k=c.y2-c.y1,I=function(Y,ie){return Y>0?Math.max(Y-ie,0):Math.min(Y+ie,0)},A=I(M,D),O=I(k,E),N=!1;y===l?m=Math.abs(A)>Math.abs(O)?n:i:y===u||y===s?(m=i,N=!0):(y===a||y===o)&&(m=n,N=!0);var F=m===i,P=F?O:A,z=F?k:M,$=m0(z),G=!1;!(N&&(w||x))&&(y===s&&z<0||y===u&&z>0||y===a&&z>0||y===o&&z<0)&&($*=-1,P=$*Math.abs(P),G=!0);var V;if(w){var W=T<0?1+T:T;V=W*P}else{var ue=T<0?P:0;V=ue+T*$}var he=function(Y){return Math.abs(Y)<_||Math.abs(Y)>=Math.abs(P)},le=he(V),me=he(Math.abs(P)-Math.abs(V)),be=le||me;if(be&&!G)if(F){var Se=Math.abs(z)<=f/2,se=Math.abs(M)<=p/2;if(Se){var q=(c.x1+c.x2)/2,X=c.y1,J=c.y2;r.segpts=[q,X,q,J]}else if(se){var ne=(c.y1+c.y2)/2,we=c.x1,Re=c.x2;r.segpts=[we,ne,Re,ne]}else r.segpts=[c.x1,c.y2]}else{var vt=Math.abs(z)<=d/2,Je=Math.abs(k)<=h/2;if(vt){var Ge=(c.y1+c.y2)/2,qe=c.x1,Ee=c.x2;r.segpts=[qe,Ge,Ee,Ge]}else if(Je){var He=(c.x1+c.x2)/2,ze=c.y1,et=c.y2;r.segpts=[He,ze,He,et]}else r.segpts=[c.x2,c.y1]}else if(F){var Ye=c.y1+V+(v?f/2*$:0),ct=c.x1,gt=c.x2;r.segpts=[ct,Ye,gt,Ye]}else{var Pt=c.x1+V+(v?d/2*$:0),Et=c.y1,_t=c.y2;r.segpts=[Pt,Et,Pt,_t]}if(r.isRound){var ce=t.pstyle("taxi-radius").value,S=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ce),r.isArcRadius=new Array(r.segpts.length/2).fill(S)}};ai.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var i=e.srcPos,n=e.tgtPos,a=e.srcW,o=e.srcH,s=e.tgtW,u=e.tgtH,l=e.srcShape,c=e.tgtShape,d=e.srcCornerRadius,f=e.tgtCornerRadius,p=e.srcRs,h=e.tgtRs,g=!Te(r.startX)||!Te(r.startY),v=!Te(r.arrowStartX)||!Te(r.arrowStartY),m=!Te(r.endX)||!Te(r.endY),y=!Te(r.arrowEndX)||!Te(r.arrowEndY),b=3,w=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,T=b*w,x=jo({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),_=x<T,D=jo({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),E=D<T,M=!1;if(g||v||_){M=!0;var k={x:r.ctrlpts[0]-i.x,y:r.ctrlpts[1]-i.y},I=Math.sqrt(k.x*k.x+k.y*k.y),A={x:k.x/I,y:k.y/I},O=Math.max(a,o),N={x:r.ctrlpts[0]+A.x*2*O,y:r.ctrlpts[1]+A.y*2*O},F=l.intersectLine(i.x,i.y,a,o,N.x,N.y,0,d,p);_?(r.ctrlpts[0]=r.ctrlpts[0]+A.x*(T-x),r.ctrlpts[1]=r.ctrlpts[1]+A.y*(T-x)):(r.ctrlpts[0]=F[0]+A.x*T,r.ctrlpts[1]=F[1]+A.y*T)}if(m||y||E){M=!0;var P={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},z=Math.sqrt(P.x*P.x+P.y*P.y),$={x:P.x/z,y:P.y/z},G=Math.max(a,o),V={x:r.ctrlpts[0]+$.x*2*G,y:r.ctrlpts[1]+$.y*2*G},W=c.intersectLine(n.x,n.y,s,u,V.x,V.y,0,f,h);E?(r.ctrlpts[0]=r.ctrlpts[0]+$.x*(T-D),r.ctrlpts[1]=r.ctrlpts[1]+$.y*(T-D)):(r.ctrlpts[0]=W[0]+$.x*T,r.ctrlpts[1]=W[1]+$.y*T)}M&&this.findEndpoints(t)}};ai.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var i,n;e.ctrlpts.length/2%2===0?(i=e.allpts.length/2-1,e.midX=e.allpts[i],e.midY=e.allpts[i+1]):(i=e.allpts.length/2-3,n=.5,e.midX=zr(e.allpts[i],e.allpts[i+2],e.allpts[i+4],n),e.midY=zr(e.allpts[i+1],e.allpts[i+3],e.allpts[i+5],n))}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var a=2;a+3<e.allpts.length;a+=2){var o=e.radii[a/2-1],s=e.isArcRadius[a/2-1];e.roundCorners.push(M0({x:e.allpts[a-2],y:e.allpts[a-1]},{x:e.allpts[a],y:e.allpts[a+1],radius:o},{x:e.allpts[a+2],y:e.allpts[a+3]},o,s))}}if(e.segpts.length%4===0){var u=e.segpts.length/2,l=u-2;e.midX=(e.segpts[l]+e.segpts[u])/2,e.midY=(e.segpts[l+1]+e.segpts[u+1])/2}else{var c=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[c],e.midY=e.segpts[c+1];else{var d={x:e.segpts[c],y:e.segpts[c+1]},f=e.roundCorners[c/2];if(f.radius===0){var p={x:e.segpts[c+2],y:e.segpts[c+3]};e.midX=d.x,e.midY=d.y,e.midVector=[d.y-p.y,p.x-d.x]}else{var h=[d.x-f.cx,d.y-f.cy],g=f.radius/Math.sqrt(Math.pow(h[0],2)+Math.pow(h[1],2));h=h.map(function(v){return v*g}),e.midX=f.cx+h[0],e.midY=f.cy+h[1],e.midVector=h}}}}};ai.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||Te(e.startX)&&Te(e.startY)&&Te(e.endX)&&Te(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,Vt("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))};ai.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,i=r.cy,n=i.hasCompoundNodes(),a=new ha,o=function(E,M){return[].concat(hh(E),[M?1:0]).join("-")},s=[],u=[],l=0;l<t.length;l++){var c=t[l],d=c._private,f=c.pstyle("curve-style").value;if(!(c.removed()||!c.takesUpSpace())){if(f==="haystack"){u.push(c);continue}var p=f==="unbundled-bezier"||qa(f,"segments")||f==="straight"||f==="straight-triangle"||qa(f,"taxi"),h=f==="unbundled-bezier"||f==="bezier",g=d.source,v=d.target,m=g.poolIndex(),y=v.poolIndex(),b=[m,y].sort(),w=o(b,p),T=a.get(w);T==null&&(T={eles:[]},s.push({pairId:b,edgeIsUnbundled:p}),a.set(w,T)),T.eles.push(c),p&&(T.hasUnbundled=!0),h&&(T.hasBezier=!0)}}for(var x=function(){var E=s[_],M=E.pairId,k=E.edgeIsUnbundled,I=o(M,k),A=a.get(I),O;if(!A.hasUnbundled){var N=A.eles[0].parallelEdges().filter(function(S){return S.isBundledBezier()});p0(A.eles),N.forEach(function(S){return A.eles.push(S)}),A.eles.sort(function(S,H){return S.poolIndex()-H.poolIndex()})}var F=A.eles[0],P=F.source(),z=F.target();if(P.poolIndex()>z.poolIndex()){var $=P;P=z,z=$}var G=A.srcPos=P.position(),V=A.tgtPos=z.position(),W=A.srcW=P.outerWidth(),ue=A.srcH=P.outerHeight(),he=A.tgtW=z.outerWidth(),le=A.tgtH=z.outerHeight(),me=A.srcShape=r.nodeShapes[e.getNodeShape(P)],be=A.tgtShape=r.nodeShapes[e.getNodeShape(z)],Se=A.srcCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,se=A.tgtCornerRadius=z.pstyle("corner-radius").value==="auto"?"auto":z.pstyle("corner-radius").pfValue,q=A.tgtRs=z._private.rscratch,X=A.srcRs=P._private.rscratch;A.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var J=0;J<A.eles.length;J++){var ne=A.eles[J],we=ne[0]._private.rscratch,Re=ne.pstyle("curve-style").value,vt=Re==="unbundled-bezier"||qa(Re,"segments")||qa(Re,"taxi"),Je=!P.same(ne.source());if(!A.calculatedIntersection&&P!==z&&(A.hasBezier||A.hasUnbundled)){A.calculatedIntersection=!0;var Ge=me.intersectLine(G.x,G.y,W,ue,V.x,V.y,0,Se,X),qe=A.srcIntn=Ge,Ee=be.intersectLine(V.x,V.y,he,le,G.x,G.y,0,se,q),He=A.tgtIntn=Ee,ze=A.intersectionPts={x1:Ge[0],x2:Ee[0],y1:Ge[1],y2:Ee[1]},et=A.posPts={x1:G.x,x2:V.x,y1:G.y,y2:V.y},Ye=Ee[1]-Ge[1],ct=Ee[0]-Ge[0],gt=Math.sqrt(ct*ct+Ye*Ye);Te(gt)&>>=_L||(gt=Math.sqrt(Math.max(ct*ct,ql)+Math.max(Ye*Ye,ql)));var Pt=A.vector={x:ct,y:Ye},Et=A.vectorNorm={x:Pt.x/gt,y:Pt.y/gt},_t={x:-Et.y,y:Et.x};A.nodesOverlap=!Te(gt)||be.checkPoint(Ge[0],Ge[1],0,he,le,V.x,V.y,se,q)||me.checkPoint(Ee[0],Ee[1],0,W,ue,G.x,G.y,Se,X),A.vectorNormInverse=_t,O={nodesOverlap:A.nodesOverlap,dirCounts:A.dirCounts,calculatedIntersection:!0,hasBezier:A.hasBezier,hasUnbundled:A.hasUnbundled,eles:A.eles,srcPos:V,srcRs:q,tgtPos:G,tgtRs:X,srcW:he,srcH:le,tgtW:W,tgtH:ue,srcIntn:He,tgtIntn:qe,srcShape:be,tgtShape:me,posPts:{x1:et.x2,y1:et.y2,x2:et.x1,y2:et.y1},intersectionPts:{x1:ze.x2,y1:ze.y2,x2:ze.x1,y2:ze.y1},vector:{x:-Pt.x,y:-Pt.y},vectorNorm:{x:-Et.x,y:-Et.y},vectorNormInverse:{x:-_t.x,y:-_t.y}}}var ce=Je?O:A;we.nodesOverlap=ce.nodesOverlap,we.srcIntn=ce.srcIntn,we.tgtIntn=ce.tgtIntn,we.isRound=Re.startsWith("round"),n&&(P.isParent()||P.isChild()||z.isParent()||z.isChild())&&(P.parents().anySame(z)||z.parents().anySame(P)||P.same(z)&&P.isParent())?e.findCompoundLoopPoints(ne,ce,J,vt):P===z?e.findLoopPoints(ne,ce,J,vt):Re.endsWith("segments")?e.findSegmentsPoints(ne,ce):Re.endsWith("taxi")?e.findTaxiPoints(ne,ce):Re==="straight"||!vt&&A.eles.length%2===1&&J===Math.floor(A.eles.length/2)?e.findStraightEdgePoints(ne):e.findBezierPoints(ne,ce,J,vt,Je),e.findEndpoints(ne),e.tryToCorrectInvalidPoints(ne,ce),e.checkForInvalidEdgeWarning(ne),e.storeAllpts(ne),e.storeEdgeProjections(ne),e.calculateArrowAngles(ne),e.recalculateEdgeLabelProjections(ne),e.calculateLabelAngles(ne)}},_=0;_<s.length;_++)x();this.findHaystackPoints(u)}};function gS(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var i=t[r],n=t[r+1];e.push({x:i,y:n})}return e}}ai.getSegmentPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="segments")return gS(e.segpts)};ai.getControlPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return gS(e.ctrlpts)};ai.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var ec={};ec.manualEndptToPx=function(t,e){var r=this,i=t.position(),n=t.outerWidth(),a=t.outerHeight(),o=t._private.rscratch;if(e.value.length===2){var s=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(s[0]=s[0]*n),e.units[1]==="%"&&(s[1]=s[1]*a),s[0]+=i.x,s[1]+=i.y,s}else{var u=e.pfValue[0];u=-Math.PI/2+u;var l=2*Math.max(n,a),c=[i.x+Math.cos(u)*l,i.y+Math.sin(u)*l];return r.nodeShapes[this.getNodeShape(t)].intersectLine(i.x,i.y,n,a,c[0],c[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,o)}};ec.findEndpoints=function(t){var e,r,i,n,a=this,o,s=t.source()[0],u=t.target()[0],l=s.position(),c=u.position(),d=t.pstyle("target-arrow-shape").value,f=t.pstyle("source-arrow-shape").value,p=t.pstyle("target-distance-from-node").pfValue,h=t.pstyle("source-distance-from-node").pfValue,g=s._private.rscratch,v=u._private.rscratch,m=t.pstyle("curve-style").value,y=t._private.rscratch,b=y.edgeType,w=qa(m,"taxi"),T=b==="self"||b==="compound",x=b==="bezier"||b==="multibezier"||T,_=b!=="bezier",D=b==="straight"||b==="segments",E=b==="segments",M=x||_||D,k=T||w,I=t.pstyle("source-endpoint"),A=k?"outside-to-node":I.value,O=s.pstyle("corner-radius").value==="auto"?"auto":s.pstyle("corner-radius").pfValue,N=t.pstyle("target-endpoint"),F=k?"outside-to-node":N.value,P=u.pstyle("corner-radius").value==="auto"?"auto":u.pstyle("corner-radius").pfValue;y.srcManEndpt=I,y.tgtManEndpt=N;var z,$,G,V,W=(e=(N==null||(r=N.pfValue)===null||r===void 0?void 0:r.length)===2?N.pfValue:null)!==null&&e!==void 0?e:[0,0],ue=(i=(I==null||(n=I.pfValue)===null||n===void 0?void 0:n.length)===2?I.pfValue:null)!==null&&i!==void 0?i:[0,0];if(x){var he=[y.ctrlpts[0],y.ctrlpts[1]],le=_?[y.ctrlpts[y.ctrlpts.length-2],y.ctrlpts[y.ctrlpts.length-1]]:he;z=le,$=he}else if(D){var me=E?y.segpts.slice(0,2):[c.x+W[0],c.y+W[1]],be=E?y.segpts.slice(y.segpts.length-2):[l.x+ue[0],l.y+ue[1]];z=be,$=me}if(F==="inside-to-node")o=[c.x,c.y];else if(N.units)o=this.manualEndptToPx(u,N);else if(F==="outside-to-line")o=y.tgtIntn;else if(F==="outside-to-node"||F==="outside-to-node-or-label"?G=z:(F==="outside-to-line"||F==="outside-to-line-or-label")&&(G=[l.x,l.y]),o=a.nodeShapes[this.getNodeShape(u)].intersectLine(c.x,c.y,u.outerWidth(),u.outerHeight(),G[0],G[1],0,P,v),F==="outside-to-node-or-label"||F==="outside-to-line-or-label"){var Se=u._private.rscratch,se=Se.labelWidth,q=Se.labelHeight,X=Se.labelX,J=Se.labelY,ne=se/2,we=q/2,Re=u.pstyle("text-valign").value;Re=mu(Re),Re==="top"?J-=we:Re==="bottom"&&(J+=we);var vt=u.pstyle("text-halign").value;vt=vu(vt),vt==="left"?X-=ne:vt==="right"&&(X+=ne);var Je=zl(G[0],G[1],[X-ne,J-we,X+ne,J-we,X+ne,J+we,X-ne,J+we],c.x,c.y);if(Je.length>0){var Ge=l,qe=Bo(Ge,au(o)),Ee=Bo(Ge,au(Je)),He=qe;if(Ee<qe&&(o=Je,He=Ee),Je.length>2){var ze=Bo(Ge,{x:Je[2],y:Je[3]});ze<He&&(o=[Je[2],Je[3]])}}}var et=$f(o,z,a.arrowShapes[d].spacing(t)+p),Ye=$f(o,z,a.arrowShapes[d].gap(t)+p);if(y.endX=Ye[0],y.endY=Ye[1],y.arrowEndX=et[0],y.arrowEndY=et[1],A==="inside-to-node")o=[l.x,l.y];else if(I.units)o=this.manualEndptToPx(s,I);else if(A==="outside-to-line")o=y.srcIntn;else if(A==="outside-to-node"||A==="outside-to-node-or-label"?V=$:(A==="outside-to-line"||A==="outside-to-line-or-label")&&(V=[c.x,c.y]),o=a.nodeShapes[this.getNodeShape(s)].intersectLine(l.x,l.y,s.outerWidth(),s.outerHeight(),V[0],V[1],0,O,g),A==="outside-to-node-or-label"||A==="outside-to-line-or-label"){var ct=s._private.rscratch,gt=ct.labelWidth,Pt=ct.labelHeight,Et=ct.labelX,_t=ct.labelY,ce=gt/2,S=Pt/2,H=s.pstyle("text-valign").value;H=mu(H),H==="top"?_t-=S:H==="bottom"&&(_t+=S);var Y=s.pstyle("text-halign").value;Y=vu(Y),Y==="left"?Et-=ce:Y==="right"&&(Et+=ce);var ie=zl(V[0],V[1],[Et-ce,_t-S,Et+ce,_t-S,Et+ce,_t+S,Et-ce,_t+S],l.x,l.y);if(ie.length>0){var oe=c,Ne=Bo(oe,au(o)),ve=Bo(oe,au(ie)),De=Ne;if(ve<Ne&&(o=[ie[0],ie[1]],De=ve),ie.length>2){var ke=Bo(oe,{x:ie[2],y:ie[3]});ke<De&&(o=[ie[2],ie[3]])}}}var We=$f(o,$,a.arrowShapes[f].spacing(t)+h),tt=$f(o,$,a.arrowShapes[f].gap(t)+h);y.startX=tt[0],y.startY=tt[1],y.arrowStartX=We[0],y.arrowStartY=We[1],M&&(!Te(y.startX)||!Te(y.startY)||!Te(y.endX)||!Te(y.endY)?y.badLine=!0:y.badLine=!1)};ec.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),e.edgeType==="haystack"?{x:e.haystackPts[0],y:e.haystackPts[1]}:{x:e.arrowStartX,y:e.arrowStartY}};ec.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),e.edgeType==="haystack"?{x:e.haystackPts[2],y:e.haystackPts[3]}:{x:e.arrowEndX,y:e.arrowEndY}};var I0={};function xL(t,e,r){for(var i=function(l,c,d,f){return zr(l,c,d,f)},n=e._private,a=n.rstyle.bezierPts,o=0;o<t.bezierProjPcts.length;o++){var s=t.bezierProjPcts[o];a.push({x:i(r[0],r[2],r[4],s),y:i(r[1],r[3],r[5],s)})}}I0.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,i=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,i==="multibezier"||i==="bezier"||i==="self"||i==="compound"){e.rstyle.bezierPts=[];for(var n=0;n+5<r.allpts.length;n+=4)xL(this,t,r.allpts.slice(n,n+6))}else if(i==="segments")for(var a=e.rstyle.linePts=[],n=0;n+1<r.allpts.length;n+=2)a.push({x:r.allpts[n],y:r.allpts[n+1]});else if(i==="haystack"){var o=r.haystackPts;e.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth};I0.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var qn={};qn.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!Ka(e)){var r,i,n=t._private,a=t.width(),o=t.height(),s=t.padding(),u=t.position(),l=t.pstyle("text-halign").strValue,c=t.pstyle("text-valign").strValue,d=n.rscratch,f=n.rstyle;switch(l){case"left":r=u.x-a/2-s;break;case"left-inside":r=u.x-a/2+s;break;case"right":r=u.x+a/2+s;break;case"right-inside":r=u.x+a/2-s;break;default:r=u.x}switch(c){case"top":i=u.y-o/2-s;break;case"top-inside":i=u.y-o/2+s;break;case"bottom":i=u.y+o/2+s;break;case"bottom-inside":i=u.y+o/2-s;break;default:i=u.y}d.labelX=r,d.labelY=i,f.labelX=r,f.labelY=i,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};var yS=function(e,r){var i=Math.atan(r/e);return e===0&&i<0&&(i=i*-1),i},bS=function(e,r){var i=r.x-e.x,n=r.y-e.y;return yS(i,n)},TL=function(e,r,i,n){var a=Ll(0,n-.001,1),o=Ll(0,n+.001,1),s=uu(e,r,i,a),u=uu(e,r,i,o);return bS(s,u)};qn.recalculateEdgeLabelProjections=function(t){var e,r=t._private,i=r.rscratch,n=this,a={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(a.mid||a.source||a.target){e={x:i.midX,y:i.midY};var o=function(d,f,p){Hn(r.rscratch,d,f,p),Hn(r.rstyle,d,f,p)};o("labelX",null,e.x),o("labelY",null,e.y);var s=yS(i.midDispX,i.midDispY);o("labelAutoAngle",null,s);var u=function(){if(u.cache)return u.cache;for(var d=[],f=0;f+5<i.allpts.length;f+=4){var p={x:i.allpts[f],y:i.allpts[f+1]},h={x:i.allpts[f+2],y:i.allpts[f+3]},g={x:i.allpts[f+4],y:i.allpts[f+5]};d.push({p0:p,p1:h,p2:g,startDist:0,length:0,segments:[]})}var v=r.rstyle.bezierPts,m=n.bezierProjPcts.length;function y(_,D,E,M,k){var I=jo(D,E),A=_.segments[_.segments.length-1],O={p0:D,p1:E,t0:M,t1:k,startDist:A?A.startDist+A.length:0,length:I};_.segments.push(O),_.length+=I}for(var b=0;b<d.length;b++){var w=d[b],T=d[b-1];T&&(w.startDist=T.startDist+T.length),y(w,w.p0,v[b*m],0,n.bezierProjPcts[0]);for(var x=0;x<m-1;x++)y(w,v[b*m+x],v[b*m+x+1],n.bezierProjPcts[x],n.bezierProjPcts[x+1]);y(w,v[b*m+m-1],w.p2,n.bezierProjPcts[m-1],1)}return u.cache=d},l=function(d){var f,p=d==="source";if(a[d]){var h=t.pstyle(d+"-text-offset").pfValue;switch(i.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var g=u(),v,m=0,y=0,b=0;b<g.length;b++){for(var w=g[p?b:g.length-1-b],T=0;T<w.segments.length;T++){var x=w.segments[p?T:w.segments.length-1-T],_=b===g.length-1&&T===w.segments.length-1;if(m=y,y+=x.length,y>=h||_){v={cp:w,segment:x};break}}if(v)break}var D=v.cp,E=v.segment,M=(h-m)/E.length,k=E.t1-E.t0,I=p?E.t0+k*M:E.t1-k*M;I=Ll(0,I,1),e=uu(D.p0,D.p1,D.p2,I),f=TL(D.p0,D.p1,D.p2,I);break}case"straight":case"segments":case"haystack":{for(var A=0,O,N,F,P,z=i.allpts.length,$=0;$+3<z&&(p?(F={x:i.allpts[$],y:i.allpts[$+1]},P={x:i.allpts[$+2],y:i.allpts[$+3]}):(F={x:i.allpts[z-2-$],y:i.allpts[z-1-$]},P={x:i.allpts[z-4-$],y:i.allpts[z-3-$]}),O=jo(F,P),N=A,A+=O,!(A>=h));$+=2);var G=h-N,V=G/O;V=Ll(0,V,1),e=WN(F,P,V),f=bS(F,P);break}}o("labelX",d,e.x),o("labelY",d,e.y),o("labelAutoAngle",d,f)}};l("source"),l("target"),this.applyLabelDimensions(t)}};qn.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};qn.applyPrefixedLabelDimensions=function(t,e){var r=t._private,i=this.getLabelText(t,e),n=Uo(i,t._private.labelDimsKey);if(di(r.rscratch,"prefixedLabelDimsKey",e)!==n){Hn(r.rscratch,"prefixedLabelDimsKey",e,n);var a=this.calculateLabelDimensions(t,i),o=t.pstyle("line-height").pfValue,s=t.pstyle("font-size").pfValue,u=t.pstyle("text-wrap").strValue,l=di(r.rscratch,"labelWrapCachedLines",e)||[],c=u!=="wrap"?1:Math.max(l.length,1),d=s*o,f=a.width,p=a.height+(c-1)*(o-1)*s;Hn(r.rstyle,"labelWidth",e,f),Hn(r.rscratch,"labelWidth",e,f),Hn(r.rstyle,"labelHeight",e,p),Hn(r.rscratch,"labelHeight",e,p),Hn(r.rscratch,"labelLineHeight",e,d),Hn(r.rscratch,"labelActualDescent",e,a.labelActualDescent)}};qn.getLabelText=function(t,e){var r=t._private,i=e?e+"-":"",n=t.pstyle(i+"label").strValue,a=t.pstyle("text-transform").value,o=function(ue,he){return he?(Hn(r.rscratch,ue,e,he),he):di(r.rscratch,ue,e)};if(!n)return"";a=="none"||(a=="uppercase"?n=n.toUpperCase():a=="lowercase"&&(n=n.toLowerCase()));var s=t.pstyle("text-wrap").value;if(s==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var l="\u200B",c=n.split(`
|
|
118
|
+
`),d=t.pstyle("text-max-width").pfValue,f=t.pstyle("text-overflow-wrap").value,p=f==="anywhere",h=[],g=/[\s\u200b]+|$/g,v=0;v<c.length;v++){var m=c[v],y=this.calculateLabelDimensions(t,m),b=y.width;if(p){var w=m.split("").join(l);m=w}if(b>d){var T=m.matchAll(g),x="",_=0,D=ki(T),E;try{for(D.s();!(E=D.n()).done;){var M=E.value,k=M[0],I=m.substring(_,M.index);_=M.index+k.length;var A=x.length===0?I:x+I+k,O=this.calculateLabelDimensions(t,A),N=O.width;N<=d?x+=I+k:(x&&h.push(x),x=I+k)}}catch(W){D.e(W)}finally{D.f()}x.match(/^[\s\u200b]+$/)||h.push(x)}else h.push(m)}o("labelWrapCachedLines",h),n=o("labelWrapCachedText",h.join(`
|
|
119
|
+
`)),o("labelWrapKey",u)}else if(s==="ellipsis"){var F=t.pstyle("text-max-width").pfValue,P="",z="\u2026",$=!1;if(this.calculateLabelDimensions(t,n).width<F)return n;for(var G=0;G<n.length;G++){var V=this.calculateLabelDimensions(t,P+n[G]+z).width;if(V>F)break;P+=n[G],G===n.length-1&&($=!0)}return $||(P+=z),P}return n};qn.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;return e==="auto"?t.isNode()?dB(r):"center":e};qn.calculateLabelDimensions=function(t,e){var r=this,i=r.cy.window(),n=i.document,a=0,o=t.pstyle("font-style").strValue,s=t.pstyle("font-size").pfValue,u=t.pstyle("font-family").strValue,l=t.pstyle("font-weight").strValue,c=t.pstyle("text-metrics").strValue||"font",d=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!d){d=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=d.getContext("2d");var p=d.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}f.font="".concat(o," ").concat(l," ").concat(s,"px ").concat(u);for(var h=0,g=0,v=e.split(`
|
|
120
|
+
`),m=v.length,y=0,b=0,w=0;w<m;w++){var T=v[w],x=f.measureText(T),_=Math.ceil(x.width),D=s;c==="glyph"&&(w===0&&(b=x.actualBoundingBoxAscent),w===m-1&&(y=x.actualBoundingBoxDescent)),h=Math.max(_,h),g+=D}return c==="glyph"&&(g-=s-b-y),h+=a,g+=a,{width:h,height:g,labelActualAscent:b,labelActualDescent:y}};qn.calculateLabelAngle=function(t,e){var r=t._private,i=r.rscratch,n=t.isEdge(),a=e?e+"-":"",o=t.pstyle(a+"text-rotation"),s=o.strValue;return s==="none"?0:n&&s==="autorotate"?i.labelAutoAngle:s==="autorotate"?0:o.pfValue};qn.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),i=t._private,n=i.rscratch;n.labelAngle=e.calculateLabelAngle(t),r&&(n.sourceLabelAngle=e.calculateLabelAngle(t,"source"),n.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var CS={},Px=28,Nx=!1;CS.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<Px||t.height()<Px))return Nx||(Vt("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),Nx=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var i=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(i).name}return r};var jh={};jh.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,i=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var u=0;u<o.length;u++){var l=o[u],c=l._private,d=c.rstyle;d.clean=!1,d.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(o){var s=o.target;i(s)}).on("style.* background.*",function(o){var s=o.target;i(s,!1)});var n=function(o){if(o){var s=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var l=e[u],c=l._private.rstyle;l.isNode()&&!c.cleanConnected&&(i(l.connectedEdges()),c.cleanConnected=!0)}if(s)for(var d=0;d<s.length;d++){var f=s[d];f(o,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){n(!0)},r.beforeRender(n,r.beforeRenderPriorities.eleCalcs)};jh.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)};jh.recalculateRenderedStyle=function(t,e){var r=function(w){return w._private.rstyle.cleanConnected};if(t.length!==0){var i=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var a=0;a<t.length;a++){var o=t[a],s=o._private,u=s.rstyle;o.isEdge()&&(!r(o.source())||!r(o.target()))&&(u.clean=!1),o.isEdge()&&o.isBundledBezier()&&o.parallelEdges().some(function(b){return!b._private.rstyle.clean&&b.isBundledBezier()})&&(u.clean=!1),!(e&&u.clean||o.removed())&&o.pstyle("display").value!=="none"&&(s.group==="nodes"?n.push(o):i.push(o),u.clean=!0)}for(var l=0;l<n.length;l++){var c=n[l],d=c._private,f=d.rstyle,p=c.position();this.recalculateNodeLabelProjection(c),f.nodeX=p.x,f.nodeY=p.y,f.nodeW=c.pstyle("width").pfValue,f.nodeH=c.pstyle("height").pfValue}this.recalculateEdgeProjections(i);for(var h=0;h<i.length;h++){var g=i[h],v=g._private,m=v.rstyle,y=v.rscratch;m.srcX=y.arrowStartX,m.srcY=y.arrowStartY,m.tgtX=y.arrowEndX,m.tgtY=y.arrowEndY,m.midX=y.midX,m.midY=y.midY,m.labelAngle=y.labelAngle,m.sourceLabelAngle=y.sourceLabelAngle,m.targetLabelAngle=y.targetLabelAngle}}}};var qh={};qh.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var i=t[r],n=i._private.rscratch;i.grabbed()&&!i.isParent()?e.push(i):n.inDragLayer?t.drag.push(i):t.nondrag.push(i)}for(var r=0;r<e.length;r++){var i=e[r];t.drag.push(i)}}};qh.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};qh.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(tS),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var wS={};[Go,xh,ai,ec,I0,qn,CS,jh,qh].forEach(function(t){$e(wS,t)});var _S={};_S.getCachedImage=function(t,e,r){var i=this,n=i.imageCache=i.imageCache||{},a=n[t];if(a)return a.image.complete||a.image.addEventListener("load",r),a.image;a=n[t]=n[t]||{};var o=a.image=new Image;o.addEventListener("load",r),o.addEventListener("error",function(){o.error=!0});var s="data:",u=t.substring(0,s.length).toLowerCase()===s;return u||(e=e==="null"?null:e,o.crossOrigin=e),o.src=t,o};var xS=function(e,r){var i=e[0];!i||i._private.grabbed===r||(i._private.grabbed=r,e.updateStyle(!1))},SL=function(e){xS(e,!0)},DL=function(e){xS(e,!1)},wu={};wu.registerBinding=function(t,e,r,i){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var a=[],o=0;o<t.length;o++){var s=t[o];if(s!==void 0){var u=this.binder(s);a.push(u.on.apply(u,n))}}return a}var u=this.binder(t);return u.on.apply(u,n)};wu.binder=function(t){var e=this,r=e.cy.window(),i=t===r||t===r.document||t===r.document.body||NP(t);if(e.supportsPassiveEvents==null){var n=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return n=!0,!0}});r.addEventListener("test",null,a)}catch{}e.supportsPassiveEvents=n}var o=function(u,l,c){var d=Array.prototype.slice.call(arguments);return i&&e.supportsPassiveEvents&&(d[2]={capture:c??!1,passive:!1,once:!1}),e.bindings.push({target:t,args:d}),(t.addEventListener||t.on).apply(t,d),this};return{on:o,addEventListener:o,addListener:o,bind:o}};wu.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()};wu.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()};wu.load=function(){var t=this,e=t.cy.window(),r=function(S){return S.selected()},i=function(S){var H=S.getRootNode();if(H&&H.nodeType===11&&H.host!==void 0)return H},n=function(S,H,Y,ie){S==null&&(S=t.cy);for(var oe=0;oe<H.length;oe++){var Ne=H[oe];S.emit({originalEvent:Y,type:Ne,position:ie})}},a=function(S){return S.shiftKey||S.metaKey||S.ctrlKey},o=function(S,H){var Y=!0;if(t.cy.hasCompoundNodes()&&S&&S.pannable())for(var ie=0;H&&ie<H.length;ie++){var S=H[ie];if(S.isNode()&&S.isParent()&&!S.pannable()){Y=!1;break}}else Y=!0;return Y},s=function(S){S[0]._private.rscratch.inDragLayer=!0},u=function(S){S[0]._private.rscratch.inDragLayer=!1},l=function(S){S[0]._private.rscratch.isGrabTarget=!0},c=function(S){S[0]._private.rscratch.isGrabTarget=!1},d=function(S,H){var Y=H.addToList,ie=Y.has(S);!ie&&S.grabbable()&&!S.locked()&&(Y.merge(S),SL(S))},f=function(S,H){if(S.cy().hasCompoundNodes()&&!(H.inDragLayer==null&&H.addToList==null)){var Y=S.descendants();H.inDragLayer&&(Y.forEach(s),Y.connectedEdges().forEach(s)),H.addToList&&d(Y,H)}},p=function(S,H){H=H||{};var Y=S.cy().hasCompoundNodes();H.inDragLayer&&(S.forEach(s),S.neighborhood().stdFilter(function(ie){return!Y||ie.isEdge()}).forEach(s)),H.addToList&&S.forEach(function(ie){d(ie,H)}),f(S,H),v(S,{inDragLayer:H.inDragLayer}),t.updateCachedGrabbedEles()},h=p,g=function(S){S&&(t.getCachedZSortedEles().forEach(function(H){DL(H),u(H),c(H)}),t.updateCachedGrabbedEles())},v=function(S,H){if(!(H.inDragLayer==null&&H.addToList==null)&&S.cy().hasCompoundNodes()){var Y=S.ancestors().orphans();if(!Y.same(S)){var ie=Y.descendants().spawnSelf().merge(Y).unmerge(S).unmerge(S.descendants()),oe=ie.connectedEdges();H.inDragLayer&&(oe.forEach(s),ie.forEach(s)),H.addToList&&ie.forEach(function(Ne){d(Ne,H)})}}},m=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},y=typeof MutationObserver<"u",b=typeof ResizeObserver<"u";y?(t.removeObserver=new MutationObserver(function(ce){for(var S=0;S<ce.length;S++){var H=ce[S],Y=H.removedNodes;if(Y)for(var ie=0;ie<Y.length;ie++){var oe=Y[ie];if(oe===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(ce){t.destroy()});var w=Zl(function(){t.cy.resize()},100);y&&(t.styleObserver=new MutationObserver(w),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",w),b&&(t.resizeObserver=new ResizeObserver(w),t.resizeObserver.observe(t.container));var T=function(S,H){for(;S!=null;)H(S),S=S.parentNode},x=function(){t.invalidateContainerClientCoordsCache()};T(t.container,function(ce){t.registerBinding(ce,"transitionend",x),t.registerBinding(ce,"animationend",x),t.registerBinding(ce,"scroll",x)}),t.registerBinding(t.container,"contextmenu",function(ce){ce.preventDefault()});var _=function(){return t.selection[4]!==0},D=function(S){for(var H=t.findContainerClientCoords(),Y=H[0],ie=H[1],oe=H[2],Ne=H[3],ve=S.touches?S.touches:[S],De=!1,ke=0;ke<ve.length;ke++){var We=ve[ke];if(Y<=We.clientX&&We.clientX<=Y+oe&&ie<=We.clientY&&We.clientY<=ie+Ne){De=!0;break}}if(!De)return!1;for(var tt=t.container,at=S.target,Fe=at.parentNode,pt=!1;Fe;){if(Fe===tt){pt=!0;break}Fe=Fe.parentNode}return!!pt};t.registerBinding(t.container,"mousedown",function(S){if(D(S)&&!(t.hoverData.which===1&&S.which!==1)){S.preventDefault(),m(),t.hoverData.capture=!0,t.hoverData.which=S.which;var H=t.cy,Y=[S.clientX,S.clientY],ie=t.projectIntoViewport(Y[0],Y[1]),oe=t.selection,Ne=t.findNearestElements(ie[0],ie[1],!0,!1),ve=Ne[0],De=t.dragData.possibleDragElements;t.hoverData.mdownPos=ie,t.hoverData.mdownGPos=Y;var ke=function(bt){return{originalEvent:S,type:bt,position:{x:ie[0],y:ie[1]}}},We=function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var bt=t.hoverData.down;bt?bt.emit(ke("taphold")):H.emit(ke("taphold"))}},t.tapholdDuration)};if(S.which==3){t.hoverData.cxtStarted=!0;var tt={originalEvent:S,type:"cxttapstart",position:{x:ie[0],y:ie[1]}};ve?(ve.activate(),ve.emit(tt),t.hoverData.down=ve):H.emit(tt),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(S.which==1){ve&&ve.activate();{if(ve!=null&&t.nodeIsGrabbable(ve)){var at=function(bt){bt.emit(ke("grab"))};if(l(ve),!ve.selected())De=t.dragData.possibleDragElements=H.collection(),h(ve,{addToList:De}),ve.emit(ke("grabon")).emit(ke("grab"));else{De=t.dragData.possibleDragElements=H.collection();var Fe=H.$(function(pt){return pt.isNode()&&pt.selected()&&t.nodeIsGrabbable(pt)});p(Fe,{addToList:De}),ve.emit(ke("grabon")),Fe.forEach(at)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=ve,t.hoverData.downs=Ne,t.hoverData.downTime=new Date().getTime()}n(ve,["mousedown","tapstart","vmousedown"],S,{x:ie[0],y:ie[1]}),ve==null?(oe[4]=1,t.data.bgActivePosistion={x:ie[0],y:ie[1]},t.redrawHint("select",!0),t.redraw()):ve.pannable()&&(oe[4]=1),We()}oe[0]=oe[2]=ie[0],oe[1]=oe[3]=ie[1]}},!1);var E=i(t.container);t.registerBinding([e,E],"mousemove",function(S){var H=t.hoverData.capture;if(!(!H&&!D(S))){var Y=!1,ie=t.cy,oe=ie.zoom(),Ne=[S.clientX,S.clientY],ve=t.projectIntoViewport(Ne[0],Ne[1]),De=t.hoverData.mdownPos,ke=t.hoverData.mdownGPos,We=t.selection,tt=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(tt=t.findNearestElement(ve[0],ve[1],!0,!1));var at=t.hoverData.last,Fe=t.hoverData.down,pt=[ve[0]-We[2],ve[1]-We[3]],bt=t.dragData.possibleDragElements,Pr;if(ke){var dr=Ne[0]-ke[0],Ji=dr*dr,fr=Ne[1]-ke[1],_r=fr*fr,Dr=Ji+_r;t.hoverData.isOverThresholdDrag=Pr=Dr>=t.desktopTapThreshold2}var Ur=a(S);Pr&&(t.hoverData.tapholdCancelled=!0);var _n=function(){var Hi=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Hi.length===0?(Hi.push(pt[0]),Hi.push(pt[1])):(Hi[0]+=pt[0],Hi[1]+=pt[1])};Y=!0,n(tt,["mousemove","vmousemove","tapdrag"],S,{x:ve[0],y:ve[1]});var or=function(Hi){return{originalEvent:S,type:Hi,position:{x:ve[0],y:ve[1]}}},$n=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||ie.emit(or("boxstart")),We[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(Pr){var en=or("cxtdrag");Fe?Fe.emit(en):ie.emit(en),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||tt!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(or("cxtdragout")),t.hoverData.cxtOver=tt,tt&&tt.emit(or("cxtdragover")))}}else if(t.hoverData.dragging){if(Y=!0,ie.panningEnabled()&&ie.userPanningEnabled()){var ya;if(t.hoverData.justStartedPan){var nc=t.hoverData.mdownPos;ya={x:(ve[0]-nc[0])*oe,y:(ve[1]-nc[1])*oe},t.hoverData.justStartedPan=!1}else ya={x:pt[0]*oe,y:pt[1]*oe};ie.panBy(ya),ie.emit(or("dragpan")),t.hoverData.dragged=!0}ve=t.projectIntoViewport(S.clientX,S.clientY)}else if(We[4]==1&&(Fe==null||Fe.pannable())){if(Pr){if(!t.hoverData.dragging&&ie.boxSelectionEnabled()&&(Ur||!ie.panningEnabled()||!ie.userPanningEnabled()))$n();else if(!t.hoverData.selecting&&ie.panningEnabled()&&ie.userPanningEnabled()){var so=o(Fe,t.hoverData.downs);so&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,We[4]=0,t.data.bgActivePosistion=au(De),t.redrawHint("select",!0),t.redraw())}Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate()}}else{if(Fe&&Fe.pannable()&&Fe.active()&&Fe.unactivate(),(!Fe||!Fe.grabbed())&&tt!=at&&(at&&n(at,["mouseout","tapdragout"],S,{x:ve[0],y:ve[1]}),tt&&n(tt,["mouseover","tapdragover"],S,{x:ve[0],y:ve[1]}),t.hoverData.last=tt),Fe)if(Pr){if(ie.boxSelectionEnabled()&&Ur)Fe&&Fe.grabbed()&&(g(bt),Fe.emit(or("freeon")),bt.emit(or("free")),t.dragData.didDrag&&(Fe.emit(or("dragfreeon")),bt.emit(or("dragfree")))),$n();else if(Fe&&Fe.grabbed()&&t.nodeIsDraggable(Fe)){var pi=!t.dragData.didDrag;pi&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||p(bt,{inDragLayer:!0});var Qr={x:0,y:0};if(Te(pt[0])&&Te(pt[1])&&(Qr.x+=pt[0],Qr.y+=pt[1],pi)){var vi=t.hoverData.dragDelta;vi&&Te(vi[0])&&Te(vi[1])&&(Qr.x+=vi[0],Qr.y+=vi[1])}t.hoverData.draggingEles=!0,bt.silentShift(Qr).emit(or("position")).emit(or("drag")),t.redrawHint("drag",!0),t.redraw()}}else _n();Y=!0}if(We[2]=ve[0],We[3]=ve[1],Y)return S.stopPropagation&&S.stopPropagation(),S.preventDefault&&S.preventDefault(),!1}},!1);var M,k,I;t.registerBinding(e,"mouseup",function(S){if(!(t.hoverData.which===1&&S.which!==1&&t.hoverData.capture)){var H=t.hoverData.capture;if(H){t.hoverData.capture=!1;var Y=t.cy,ie=t.projectIntoViewport(S.clientX,S.clientY),oe=t.selection,Ne=t.findNearestElement(ie[0],ie[1],!0,!1),ve=t.dragData.possibleDragElements,De=t.hoverData.down,ke=a(S);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,De&&De.unactivate();var We=function(dr){return{originalEvent:S,type:dr,position:{x:ie[0],y:ie[1]}}};if(t.hoverData.which===3){var tt=We("cxttapend");if(De?De.emit(tt):Y.emit(tt),!t.hoverData.cxtDragged){var at=We("cxttap");De?De.emit(at):Y.emit(at)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(Ne,["mouseup","tapend","vmouseup"],S,{x:ie[0],y:ie[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(De,["click","tap","vclick"],S,{x:ie[0],y:ie[1]}),k=!1,S.timeStamp-I<=Y.multiClickDebounceTime()?(M&&clearTimeout(M),k=!0,I=null,n(De,["dblclick","dbltap","vdblclick"],S,{x:ie[0],y:ie[1]})):(M=setTimeout(function(){k||n(De,["oneclick","onetap","voneclick"],S,{x:ie[0],y:ie[1]})},Y.multiClickDebounceTime()),I=S.timeStamp)),De==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(S)&&(Y.$(r).unselect(["tapunselect"]),ve.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=ve=Y.collection()),Ne==De&&!t.dragData.didDrag&&!t.hoverData.selecting&&Ne!=null&&Ne._private.selectable&&(t.hoverData.dragging||(Y.selectionType()==="additive"||ke?Ne.selected()?Ne.unselect(["tapunselect"]):Ne.select(["tapselect"]):ke||(Y.$(r).unmerge(Ne).unselect(["tapunselect"]),Ne.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Fe=Y.collection(t.getAllInBox(oe[0],oe[1],oe[2],oe[3]));t.redrawHint("select",!0),Fe.length>0&&t.redrawHint("eles",!0),Y.emit(We("boxend"));var pt=function(dr){return dr.selectable()&&!dr.selected()};Y.selectionType()==="additive"||ke||Y.$(r).unmerge(Fe).unselect(),Fe.emit(We("box")).stdFilter(pt).select().emit(We("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!oe[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var bt=De&&De.grabbed();g(ve),bt&&(De.emit(We("freeon")),ve.emit(We("free")),t.dragData.didDrag&&(De.emit(We("dragfreeon")),ve.emit(We("dragfree"))))}}oe[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var A=[],O=4,N,F=1e5,P=function(S,H){for(var Y=0;Y<S.length;Y++)if(S[Y]%H!==0)return!1;return!0},z=function(S){for(var H=Math.abs(S[0]),Y=1;Y<S.length;Y++)if(Math.abs(S[Y])!==H)return!1;return!0},$=function(S){var H=!1,Y=S.deltaY;if(Y==null&&(S.wheelDeltaY!=null?Y=S.wheelDeltaY/4:S.wheelDelta!=null&&(Y=S.wheelDelta/4)),Y!==0){if(N==null)if(A.length>=O){var ie=A;if(N=P(ie,5),!N){var oe=Math.abs(ie[0]);N=z(ie)&&oe>5}if(N)for(var Ne=0;Ne<ie.length;Ne++)F=Math.min(Math.abs(ie[Ne]),F)}else A.push(Y),H=!0;else N&&(F=Math.min(Math.abs(Y),F));if(!t.scrollingPage){var ve=t.cy,De=ve.zoom(),ke=ve.pan(),We=t.projectIntoViewport(S.clientX,S.clientY),tt=[We[0]*De+ke.x,We[1]*De+ke.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||_()){S.preventDefault();return}if(ve.panningEnabled()&&ve.userPanningEnabled()&&ve.zoomingEnabled()&&ve.userZoomingEnabled()){S.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var at;H&&Math.abs(Y)>5&&(Y=m0(Y)*5),at=Y/-250,N&&(at/=F,at*=3),at=at*t.wheelSensitivity;var Fe=S.deltaMode===1;Fe&&(at*=33);var pt=ve.zoom()*Math.pow(10,at);S.type==="gesturechange"&&(pt=t.gestureStartZoom*S.scale),ve.zoom({level:pt,renderedPosition:{x:tt[0],y:tt[1]}}),ve.emit({type:S.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:S,position:{x:We[0],y:We[1]}})}}}};t.registerBinding(t.container,"wheel",$,!0),t.registerBinding(e,"scroll",function(S){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(S){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||S.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(ce){t.hasTouchStarted||$(ce)},!0),t.registerBinding(t.container,"mouseout",function(S){var H=t.projectIntoViewport(S.clientX,S.clientY);t.cy.emit({originalEvent:S,type:"mouseout",position:{x:H[0],y:H[1]}})},!1),t.registerBinding(t.container,"mouseover",function(S){var H=t.projectIntoViewport(S.clientX,S.clientY);t.cy.emit({originalEvent:S,type:"mouseover",position:{x:H[0],y:H[1]}})},!1);var G,V,W,ue,he,le,me,be,Se,se,q,X,J,ne=function(S,H,Y,ie){return Math.sqrt((Y-S)*(Y-S)+(ie-H)*(ie-H))},we=function(S,H,Y,ie){return(Y-S)*(Y-S)+(ie-H)*(ie-H)},Re;t.registerBinding(t.container,"touchstart",Re=function(S){if(t.hasTouchStarted=!0,!!D(S)){m(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var H=t.cy,Y=t.touchData.now,ie=t.touchData.earlier;if(S.touches[0]){var oe=t.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);Y[0]=oe[0],Y[1]=oe[1]}if(S.touches[1]){var oe=t.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);Y[2]=oe[0],Y[3]=oe[1]}if(S.touches[2]){var oe=t.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);Y[4]=oe[0],Y[5]=oe[1]}var Ne=function(Ur){return{originalEvent:S,type:Ur,position:{x:Y[0],y:Y[1]}}};if(S.touches[1]){t.touchData.singleTouchMoved=!0,g(t.dragData.touchDragEles);var ve=t.findContainerClientCoords();Se=ve[0],se=ve[1],q=ve[2],X=ve[3],G=S.touches[0].clientX-Se,V=S.touches[0].clientY-se,W=S.touches[1].clientX-Se,ue=S.touches[1].clientY-se,J=0<=G&&G<=q&&0<=W&&W<=q&&0<=V&&V<=X&&0<=ue&&ue<=X;var De=H.pan(),ke=H.zoom();he=ne(G,V,W,ue),le=we(G,V,W,ue),me=[(G+W)/2,(V+ue)/2],be=[(me[0]-De.x)/ke,(me[1]-De.y)/ke];var We=200,tt=We*We;if(le<tt&&!S.touches[2]){var at=t.findNearestElement(Y[0],Y[1],!0,!0),Fe=t.findNearestElement(Y[2],Y[3],!0,!0);at&&at.isNode()?(at.activate().emit(Ne("cxttapstart")),t.touchData.start=at):Fe&&Fe.isNode()?(Fe.activate().emit(Ne("cxttapstart")),t.touchData.start=Fe):H.emit(Ne("cxttapstart")),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(S.touches[2])H.boxSelectionEnabled()&&S.preventDefault();else if(!S.touches[1]){if(S.touches[0]){var pt=t.findNearestElements(Y[0],Y[1],!0,!0),bt=pt[0];if(bt!=null&&(bt.activate(),t.touchData.start=bt,t.touchData.starts=pt,t.nodeIsGrabbable(bt))){var Pr=t.dragData.touchDragEles=H.collection(),dr=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),bt.selected()?(dr=H.$(function(Dr){return Dr.selected()&&t.nodeIsGrabbable(Dr)}),p(dr,{addToList:Pr})):h(bt,{addToList:Pr}),l(bt),bt.emit(Ne("grabon")),dr?dr.forEach(function(Dr){Dr.emit(Ne("grab"))}):bt.emit(Ne("grab"))}n(bt,["touchstart","tapstart","vmousedown"],S,{x:Y[0],y:Y[1]}),bt==null&&(t.data.bgActivePosistion={x:oe[0],y:oe[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&n(t.touchData.start,["taphold"],S,{x:Y[0],y:Y[1]})},t.tapholdDuration)}}if(S.touches.length>=1){for(var Ji=t.touchData.startPosition=[null,null,null,null,null,null],fr=0;fr<Y.length;fr++)Ji[fr]=ie[fr]=Y[fr];var _r=S.touches[0];t.touchData.startGPosition=[_r.clientX,_r.clientY]}}},!1);var vt;t.registerBinding(e,"touchmove",vt=function(S){var H=t.touchData.capture;if(!(!H&&!D(S))){var Y=t.selection,ie=t.cy,oe=t.touchData.now,Ne=t.touchData.earlier,ve=ie.zoom();if(S.touches[0]){var De=t.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);oe[0]=De[0],oe[1]=De[1]}if(S.touches[1]){var De=t.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);oe[2]=De[0],oe[3]=De[1]}if(S.touches[2]){var De=t.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);oe[4]=De[0],oe[5]=De[1]}var ke=function(iD){return{originalEvent:S,type:iD,position:{x:oe[0],y:oe[1]}}},We=t.touchData.startGPosition,tt;if(H&&S.touches[0]&&We){for(var at=[],Fe=0;Fe<oe.length;Fe++)at[Fe]=oe[Fe]-Ne[Fe];var pt=S.touches[0].clientX-We[0],bt=pt*pt,Pr=S.touches[0].clientY-We[1],dr=Pr*Pr,Ji=bt+dr;tt=Ji>=t.touchTapThreshold2}if(H&&t.touchData.cxt){S.preventDefault();var fr=S.touches[0].clientX-Se,_r=S.touches[0].clientY-se,Dr=S.touches[1].clientX-Se,Ur=S.touches[1].clientY-se,_n=we(fr,_r,Dr,Ur),or=_n/le,$n=150,en=$n*$n,ya=1.5,nc=ya*ya;if(or>=nc||_n>=en){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var so=ke("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit(so),t.touchData.start=null):ie.emit(so)}}if(H&&t.touchData.cxt){var so=ke("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(so):ie.emit(so),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var pi=t.findNearestElement(oe[0],oe[1],!0,!0);(!t.touchData.cxtOver||pi!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(ke("cxtdragout")),t.touchData.cxtOver=pi,pi&&pi.emit(ke("cxtdragover")))}else if(H&&S.touches[2]&&ie.boxSelectionEnabled())S.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||ie.emit(ke("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,Y[4]=1,!Y||Y.length===0||Y[0]===void 0?(Y[0]=(oe[0]+oe[2]+oe[4])/3,Y[1]=(oe[1]+oe[3]+oe[5])/3,Y[2]=(oe[0]+oe[2]+oe[4])/3+1,Y[3]=(oe[1]+oe[3]+oe[5])/3+1):(Y[2]=(oe[0]+oe[2]+oe[4])/3,Y[3]=(oe[1]+oe[3]+oe[5])/3),t.redrawHint("select",!0),t.redraw();else if(H&&S.touches[1]&&!t.touchData.didSelect&&ie.zoomingEnabled()&&ie.panningEnabled()&&ie.userZoomingEnabled()&&ie.userPanningEnabled()){S.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Qr=t.dragData.touchDragEles;if(Qr){t.redrawHint("drag",!0);for(var vi=0;vi<Qr.length;vi++){var xu=Qr[vi]._private;xu.grabbed=!1,xu.rscratch.inDragLayer=!1}}var Hi=t.touchData.start,fr=S.touches[0].clientX-Se,_r=S.touches[0].clientY-se,Dr=S.touches[1].clientX-Se,Ur=S.touches[1].clientY-se,P0=ne(fr,_r,Dr,Ur),YS=P0/he;if(J){var KS=fr-G,ZS=_r-V,XS=Dr-W,QS=Ur-ue,JS=(KS+XS)/2,eD=(ZS+QS)/2,Tu=ie.zoom(),ep=Tu*YS,ac=ie.pan(),N0=be[0]*Tu+ac.x,F0=be[1]*Tu+ac.y,tD={x:-ep/Tu*(N0-ac.x-JS)+N0,y:-ep/Tu*(F0-ac.y-eD)+F0};if(Hi&&Hi.active()){var Qr=t.dragData.touchDragEles;g(Qr),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Hi.unactivate().emit(ke("freeon")),Qr.emit(ke("free")),t.dragData.didDrag&&(Hi.emit(ke("dragfreeon")),Qr.emit(ke("dragfree")))}ie.viewport({zoom:ep,pan:tD,cancelOnFailedZoom:!0}),ie.emit(ke("pinchzoom")),he=P0,G=fr,V=_r,W=Dr,ue=Ur,t.pinching=!0}if(S.touches[0]){var De=t.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);oe[0]=De[0],oe[1]=De[1]}if(S.touches[1]){var De=t.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);oe[2]=De[0],oe[3]=De[1]}if(S.touches[2]){var De=t.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);oe[4]=De[0],oe[5]=De[1]}}else if(S.touches[0]&&!t.touchData.didSelect){var tn=t.touchData.start,tp=t.touchData.last,pi;if(!t.hoverData.draggingEles&&!t.swipePanning&&(pi=t.findNearestElement(oe[0],oe[1],!0,!0)),H&&tn!=null&&S.preventDefault(),H&&tn!=null&&t.nodeIsDraggable(tn))if(tt){var Qr=t.dragData.touchDragEles,B0=!t.dragData.didDrag;B0&&p(Qr,{inDragLayer:!0}),t.dragData.didDrag=!0;var Su={x:0,y:0};if(Te(at[0])&&Te(at[1])&&(Su.x+=at[0],Su.y+=at[1],B0)){t.redrawHint("eles",!0);var rn=t.touchData.dragDelta;rn&&Te(rn[0])&&Te(rn[1])&&(Su.x+=rn[0],Su.y+=rn[1])}t.hoverData.draggingEles=!0,Qr.silentShift(Su).emit(ke("position")).emit(ke("drag")),t.redrawHint("drag",!0),t.touchData.startPosition[0]==Ne[0]&&t.touchData.startPosition[1]==Ne[1]&&t.redrawHint("eles",!0),t.redraw()}else{var rn=t.touchData.dragDelta=t.touchData.dragDelta||[];rn.length===0?(rn.push(at[0]),rn.push(at[1])):(rn[0]+=at[0],rn[1]+=at[1])}if(n(tn||pi,["touchmove","tapdrag","vmousemove"],S,{x:oe[0],y:oe[1]}),(!tn||!tn.grabbed())&&pi!=tp&&(tp&&tp.emit(ke("tapdragout")),pi&&pi.emit(ke("tapdragover"))),t.touchData.last=pi,H)for(var vi=0;vi<oe.length;vi++)oe[vi]&&t.touchData.startPosition[vi]&&tt&&(t.touchData.singleTouchMoved=!0);if(H&&(tn==null||tn.pannable())&&ie.panningEnabled()&&ie.userPanningEnabled()){var rD=o(tn,t.touchData.starts);rD&&(S.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=au(t.touchData.startPosition)),t.swipePanning?(ie.panBy({x:at[0]*ve,y:at[1]*ve}),ie.emit(ke("dragpan"))):tt&&(t.swipePanning=!0,ie.panBy({x:pt*ve,y:Pr*ve}),ie.emit(ke("dragpan")),tn&&(tn.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var De=t.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);oe[0]=De[0],oe[1]=De[1]}}for(var Fe=0;Fe<oe.length;Fe++)Ne[Fe]=oe[Fe];H&&S.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var Je;t.registerBinding(e,"touchcancel",Je=function(S){var H=t.touchData.start;t.touchData.capture=!1,H&&H.unactivate()});var Ge,qe,Ee,He;if(t.registerBinding(e,"touchend",Ge=function(S){var H=t.touchData.start,Y=t.touchData.capture;if(Y)S.touches.length===0&&(t.touchData.capture=!1),S.preventDefault();else return;var ie=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var oe=t.cy,Ne=oe.zoom(),ve=t.touchData.now,De=t.touchData.earlier;if(S.touches[0]){var ke=t.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);ve[0]=ke[0],ve[1]=ke[1]}if(S.touches[1]){var ke=t.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);ve[2]=ke[0],ve[3]=ke[1]}if(S.touches[2]){var ke=t.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);ve[4]=ke[0],ve[5]=ke[1]}var We=function(en){return{originalEvent:S,type:en,position:{x:ve[0],y:ve[1]}}};H&&H.unactivate();var tt;if(t.touchData.cxt){if(tt=We("cxttapend"),H?H.emit(tt):oe.emit(tt),!t.touchData.cxtDragged){var at=We("cxttap");H?H.emit(at):oe.emit(at)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!S.touches[2]&&oe.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Fe=oe.collection(t.getAllInBox(ie[0],ie[1],ie[2],ie[3]));ie[0]=void 0,ie[1]=void 0,ie[2]=void 0,ie[3]=void 0,ie[4]=0,t.redrawHint("select",!0),oe.emit(We("boxend"));var pt=function(en){return en.selectable()&&!en.selected()};Fe.emit(We("box")).stdFilter(pt).select().emit(We("boxselect")),Fe.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(H?.unactivate(),S.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!S.touches[1]){if(!S.touches[0]){if(!S.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var bt=t.dragData.touchDragEles;if(H!=null){var Pr=H._private.grabbed;g(bt),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Pr&&(H.emit(We("freeon")),bt.emit(We("free")),t.dragData.didDrag&&(H.emit(We("dragfreeon")),bt.emit(We("dragfree")))),n(H,["touchend","tapend","vmouseup","tapdragout"],S,{x:ve[0],y:ve[1]}),H.unactivate(),t.touchData.start=null}else{var dr=t.findNearestElement(ve[0],ve[1],!0,!0);n(dr,["touchend","tapend","vmouseup","tapdragout"],S,{x:ve[0],y:ve[1]})}var Ji=t.touchData.startPosition[0]-ve[0],fr=Ji*Ji,_r=t.touchData.startPosition[1]-ve[1],Dr=_r*_r,Ur=fr+Dr,_n=Ur*Ne*Ne;t.touchData.singleTouchMoved||(H||oe.$(":selected").unselect(["tapunselect"]),n(H,["tap","vclick"],S,{x:ve[0],y:ve[1]}),qe=!1,S.timeStamp-He<=oe.multiClickDebounceTime()?(Ee&&clearTimeout(Ee),qe=!0,He=null,n(H,["dbltap","vdblclick"],S,{x:ve[0],y:ve[1]})):(Ee=setTimeout(function(){qe||n(H,["onetap","voneclick"],S,{x:ve[0],y:ve[1]})},oe.multiClickDebounceTime()),He=S.timeStamp)),H!=null&&!t.dragData.didDrag&&H._private.selectable&&_n<t.touchTapThreshold2&&!t.pinching&&(oe.selectionType()==="single"?(oe.$(r).unmerge(H).unselect(["tapunselect"]),H.select(["tapselect"])):H.selected()?H.unselect(["tapunselect"]):H.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}}}for(var or=0;or<ve.length;or++)De[or]=ve[or];t.dragData.didDrag=!1,S.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),S.touches.length<2&&(S.touches.length===1&&(t.touchData.startGPosition=[S.touches[0].clientX,S.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},!1),typeof TouchEvent>"u"){var ze=[],et=function(S){return{clientX:S.clientX,clientY:S.clientY,force:1,identifier:S.pointerId,pageX:S.pageX,pageY:S.pageY,radiusX:S.width/2,radiusY:S.height/2,screenX:S.screenX,screenY:S.screenY,target:S.target}},Ye=function(S){return{event:S,touch:et(S)}},ct=function(S){ze.push(Ye(S))},gt=function(S){for(var H=0;H<ze.length;H++){var Y=ze[H];if(Y.event.pointerId===S.pointerId){ze.splice(H,1);return}}},Pt=function(S){var H=ze.filter(function(Y){return Y.event.pointerId===S.pointerId})[0];H.event=S,H.touch=et(S)},Et=function(S){S.touches=ze.map(function(H){return H.touch})},_t=function(S){return S.pointerType==="mouse"||S.pointerType===4};t.registerBinding(t.container,"pointerdown",function(ce){_t(ce)||(ce.preventDefault(),ct(ce),Et(ce),Re(ce))}),t.registerBinding(t.container,"pointerup",function(ce){_t(ce)||(gt(ce),Et(ce),Ge(ce))}),t.registerBinding(t.container,"pointercancel",function(ce){_t(ce)||(gt(ce),Et(ce),Je(ce))}),t.registerBinding(t.container,"pointermove",function(ce){_t(ce)||(ce.preventDefault(),Pt(ce),Et(ce),vt(ce))})}};var ma={};ma.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:function(i,n,a,o,s,u){this.renderer.nodeShapeImpl("polygon",i,n,a,o,s,this.points)},intersectLine:function(i,n,a,o,s,u,l,c){return zl(s,u,this.points,i,n,a/2,o/2,l)},checkPoint:function(i,n,a,o,s,u,l,c){return va(i,n,this.points,u,l,o,s,[0,-1],a)},hasMiterBounds:t!=="rectangle",miterBounds:function(i,n,a,o,s,u){return XN(this.points,i,n,a,o,s)}}};ma.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,r,i,n,a,o){this.renderer.nodeShapeImpl(this.name,e,r,i,n,a)},intersectLine:function(e,r,i,n,a,o,s,u){return aF(a,o,e,r,i/2+s,n/2+s)},checkPoint:function(e,r,i,n,a,o,s,u){return Ho(e,r,n,a,o,s,i)}}};ma.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:function(i,n,a,o,s,u,l){if(u[l]!==void 0&&u[l+"-cx"]===i&&u[l+"-cy"]===n)return u[l];u[l]=new Array(e.length/2),u[l+"-cx"]=i,u[l+"-cy"]=n;var c=a/2,d=o/2;s=s==="auto"?xT(a,o):s;for(var f=new Array(e.length/2),p=0;p<e.length/2;p++)f[p]={x:i+c*e[p*2],y:n+d*e[p*2+1]};var h,g,v,m,y=f.length;for(g=f[y-1],h=0;h<y;h++)v=f[h%y],m=f[(h+1)%y],u[l][h]=M0(g,v,m,s),g=v,v=m;return u[l]},draw:function(i,n,a,o,s,u,l){this.renderer.nodeShapeImpl("round-polygon",i,n,a,o,s,this.points,this.getOrCreateCorners(n,a,o,s,u,l,"drawCorners"))},intersectLine:function(i,n,a,o,s,u,l,c,d){return sF(s,u,this.points,i,n,a,o,l,this.getOrCreateCorners(i,n,a,o,c,d,"corners"))},checkPoint:function(i,n,a,o,s,u,l,c,d){return nF(i,n,this.points,u,l,o,s,this.getOrCreateCorners(u,l,o,s,c,d,"corners"))}}};ma.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:ci(4,0),draw:function(e,r,i,n,a,o){this.renderer.nodeShapeImpl(this.name,e,r,i,n,a,this.points,o)},intersectLine:function(e,r,i,n,a,o,s,u){return wT(a,o,e,r,i,n,s,u)},checkPoint:function(e,r,i,n,a,o,s,u){var l=n/2,c=a/2;u=u==="auto"?Xa(n,a):u,u=Math.min(l,c,u);var d=u*2;return!!(va(e,r,this.points,o,s,n,a-d,[0,-1],i)||va(e,r,this.points,o,s,n-d,a,[0,-1],i)||Ho(e,r,d,d,o-l+u,s-c+u,i)||Ho(e,r,d,d,o+l-u,s-c+u,i)||Ho(e,r,d,d,o+l-u,s+c-u,i)||Ho(e,r,d,d,o-l+u,s+c-u,i))}}};ma.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:y0(),points:ci(4,0),draw:function(e,r,i,n,a,o){this.renderer.nodeShapeImpl(this.name,e,r,i,n,a,null,o)},generateCutTrianglePts:function(e,r,i,n,a){var o=a==="auto"?this.cornerLength:a,s=r/2,u=e/2,l=i-u,c=i+u,d=n-s,f=n+s;return{topLeft:[l,d+o,l+o,d,l+o,d+o],topRight:[c-o,d,c,d+o,c-o,d+o],bottomRight:[c,f-o,c-o,f,c-o,f-o],bottomLeft:[l+o,f,l,f-o,l+o,f-o]}},intersectLine:function(e,r,i,n,a,o,s,u){var l=this.generateCutTrianglePts(i+2*s,n+2*s,e,r,u),c=[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]);return zl(a,o,c,e,r)},checkPoint:function(e,r,i,n,a,o,s,u){var l=u==="auto"?this.cornerLength:u;if(va(e,r,this.points,o,s,n,a-2*l,[0,-1],i)||va(e,r,this.points,o,s,n-2*l,a,[0,-1],i))return!0;var c=this.generateCutTrianglePts(n,a,o,s);return Ei(e,r,c.topLeft)||Ei(e,r,c.topRight)||Ei(e,r,c.bottomRight)||Ei(e,r,c.bottomLeft)}}};ma.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:ci(4,0),draw:function(e,r,i,n,a,o){this.renderer.nodeShapeImpl(this.name,e,r,i,n,a)},intersectLine:function(e,r,i,n,a,o,s,u){var l=.15,c=.5,d=.85,f=this.generateBarrelBezierPts(i+2*s,n+2*s,e,r),p=function(v){var m=uu({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},l),y=uu({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},c),b=uu({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},d);return[v[0],v[1],m.x,m.y,y.x,y.y,b.x,b.y,v[4],v[5]]},h=[].concat(p(f.topLeft),p(f.topRight),p(f.bottomRight),p(f.bottomLeft));return zl(a,o,h,e,r)},generateBarrelBezierPts:function(e,r,i,n){var a=r/2,o=e/2,s=i-o,u=i+o,l=n-a,c=n+a,d=qg(e,r),f=d.heightOffset,p=d.widthOffset,h=d.ctrlPtOffsetPct*e,g={topLeft:[s,l+f,s+h,l,s+p,l],topRight:[u-p,l,u-h,l,u,l+f],bottomRight:[u,c-f,u-h,c,u-p,c],bottomLeft:[s+p,c,s+h,c,s,c-f]};return g.topLeft.isTop=!0,g.topRight.isTop=!0,g.bottomLeft.isBottom=!0,g.bottomRight.isBottom=!0,g},checkPoint:function(e,r,i,n,a,o,s,u){var l=qg(n,a),c=l.heightOffset,d=l.widthOffset;if(va(e,r,this.points,o,s,n,a-2*c,[0,-1],i)||va(e,r,this.points,o,s,n-2*d,a,[0,-1],i))return!0;for(var f=this.generateBarrelBezierPts(n,a,o,s),p=function(D,E,M){var k=M[4],I=M[2],A=M[0],O=M[5],N=M[1],F=Math.min(k,A),P=Math.max(k,A),z=Math.min(O,N),$=Math.max(O,N);if(F<=D&&D<=P&&z<=E&&E<=$){var G=uF(k,I,A),V=eF(G[0],G[1],G[2],D),W=V.filter(function(ue){return 0<=ue&&ue<=1});if(W.length>0)return W[0]}return null},h=Object.keys(f),g=0;g<h.length;g++){var v=h[g],m=f[v],y=p(e,r,m);if(y!=null){var b=m[5],w=m[3],T=m[1],x=zr(b,w,T,y);if(m.isTop&&x<=r||m.isBottom&&r<=x)return!0}}return!1}}};ma.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:ci(4,0),draw:function(e,r,i,n,a,o){this.renderer.nodeShapeImpl(this.name,e,r,i,n,a,this.points,o)},intersectLine:function(e,r,i,n,a,o,s,u){var l=e-(i/2+s),c=r-(n/2+s),d=c,f=e+(i/2+s),p=$a(a,o,e,r,l,c,f,d,!1);return p.length>0?p:wT(a,o,e,r,i,n,s,u)},checkPoint:function(e,r,i,n,a,o,s,u){u=u==="auto"?Xa(n,a):u;var l=2*u;if(va(e,r,this.points,o,s,n,a-l,[0,-1],i)||va(e,r,this.points,o,s,n-l,a,[0,-1],i))return!0;var c=n/2+2*i,d=a/2+2*i,f=[o-c,s-d,o-c,s,o+c,s,o+c,s-d];return!!(Ei(e,r,f)||Ho(e,r,l,l,o+n/2-u,s+a/2-u,i)||Ho(e,r,l,l,o-n/2+u,s+a/2-u,i))}}};ma.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ci(3,0)),this.generateRoundPolygon("round-triangle",ci(3,0)),this.generatePolygon("rectangle",ci(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ci(5,0)),this.generateRoundPolygon("round-pentagon",ci(5,0)),this.generatePolygon("hexagon",ci(6,0)),this.generateRoundPolygon("round-hexagon",ci(6,0)),this.generatePolygon("heptagon",ci(7,0)),this.generateRoundPolygon("round-heptagon",ci(7,0)),this.generatePolygon("octagon",ci(8,0)),this.generateRoundPolygon("round-octagon",ci(8,0));var i=new Array(20);{var n=jg(5,0),a=jg(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s<a.length/2;s++)a[s*2]*=o,a[s*2+1]*=o;for(var s=0;s<20/4;s++)i[s*4]=n[s*2],i[s*4+1]=n[s*2+1],i[s*4+2]=a[s*2],i[s*4+3]=a[s*2+1]}i=_T(i),this.generatePolygon("star",i),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var u=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",u),this.generateRoundPolygon("round-tag",u)}t.makePolygon=function(l){var c=l.join("$"),d="polygon-"+c,f;return(f=this[d])?f:e.generatePolygon(d,l)}};var tc={};tc.timeToRender=function(){return this.redrawTotalTime/this.redrawCount};tc.redraw=function(t){t=t||gT();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t};tc.beforeRender=function(t,e){if(!this.destroyed){e==null&&ar("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(i,n){return n.priority-i.priority})}};var Fx=function(e,r,i){for(var n=e.beforeRenderCallbacks,a=0;a<n.length;a++)n[a].fn(r,i)};tc.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=function(n){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){Fx(t,!0,n);var a=pa();t.render(t.renderOptions);var o=t.lastDrawTime=pa();t.averageRedrawTime===void 0&&(t.averageRedrawTime=o-a),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var s=o-a;t.redrawTotalTime+=s,t.lastRedrawTime=s,t.averageRedrawTime=t.averageRedrawTime/2+s/2,t.requestedFrame=!1}else Fx(t,!1,n);t.skipFrame=!1,vh(r)}};vh(r)}};var EL=function(e){this.init(e)},TS=EL,_u=TS.prototype;_u.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"];_u.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),i=e.cy.window();if(i){var n=i.document,a=n.head,o="__________cytoscape_stylesheet",s="__________cytoscape_container",u=n.getElementById(o)!=null;if(r.className.indexOf(s)<0&&(r.className=(r.className||"")+" "+s),!u){var l=n.createElement("style");l.id=o,l.textContent="."+s+" { position: relative; }",a.insertBefore(l,a.children[0])}var c=i.getComputedStyle(r),d=c.getPropertyValue("position");d==="static"&&Vt("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.webgl=t.webgl,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=Te(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()};_u.notify=function(t,e){var r=this,i=r.cy;if(!this.destroyed){if(t==="init"){r.load();return}if(t==="destroy"){r.destroy();return}(t==="add"||t==="remove"||t==="move"&&i.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),t==="gc"&&r.redrawHint("gc",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}};_u.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],i=r,n=i.target;(n.off||n.removeEventListener).apply(n,i.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch{}};_u.isHeadless=function(){return!1};[k0,wS,_S,wu,ma,tc].forEach(function(t){$e(_u,t)});var Pg=1e3/60,SS={setupDequeueing:function(e){return function(){var i=this,n=this.renderer;if(!i.dequeueingSetup){i.dequeueingSetup=!0;var a=Zl(function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()},e.deqRedrawThreshold),o=function(l,c){var d=pa(),f=n.averageRedrawTime,p=n.lastRedrawTime,h=[],g=n.cy.extent(),v=n.getPixelRatio();for(l||n.flushRenderedStyleQueue();;){var m=pa(),y=m-d,b=m-c;if(p<Pg){var w=Pg-(l?f:0);if(b>=e.deqFastCost*w)break}else if(l){if(y>=e.deqCost*p||y>=e.deqAvgCost*f)break}else if(b>=e.deqNoDrawCost*Pg)break;var T=e.deq(i,v,g);if(T.length>0)for(var x=0;x<T.length;x++)h.push(T[x]);else break}h.length>0&&(e.onDeqd(i,h),!l&&e.shouldRedraw(i,h,v,g)&&a())},s=e.priority||h0;n.beforeRender(o,s(i))}}}},kL=(function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mh;ro(this,t),this.idsByKey=new ha,this.keyForId=new ha,this.cachesByLvl=new ha,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return io(t,[{key:"getIdsFor",value:function(r){r==null&&ar("Can not get id list for null key");var i=this.idsByKey,n=this.idsByKey.get(r);return n||(n=new gu,i.set(r,n)),n}},{key:"addIdForKey",value:function(r,i){r!=null&&this.getIdsFor(r).add(i)}},{key:"deleteIdForKey",value:function(r,i){r!=null&&this.getIdsFor(r).delete(i)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var i=r.id(),n=this.keyForId.get(i),a=this.getKey(r);this.deleteIdForKey(n,i),this.addIdForKey(a,i),this.keyForId.set(i,a)}},{key:"deleteKeyMappingFor",value:function(r){var i=r.id(),n=this.keyForId.get(i);this.deleteIdForKey(n,i),this.keyForId.delete(i)}},{key:"keyHasChangedFor",value:function(r){var i=r.id(),n=this.keyForId.get(i),a=this.getKey(r);return n!==a}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var i=this.cachesByLvl,n=this.lvls,a=i.get(r);return a||(a=new ha,i.set(r,a),n.push(r)),a}},{key:"getCache",value:function(r,i){return this.getCachesAt(i).get(r)}},{key:"get",value:function(r,i){var n=this.getKey(r),a=this.getCache(n,i);return a!=null&&this.updateKeyMappingFor(r),a}},{key:"getForCachedKey",value:function(r,i){var n=this.keyForId.get(r.id()),a=this.getCache(n,i);return a}},{key:"hasCache",value:function(r,i){return this.getCachesAt(i).has(r)}},{key:"has",value:function(r,i){var n=this.getKey(r);return this.hasCache(n,i)}},{key:"setCache",value:function(r,i,n){n.key=r,this.getCachesAt(i).set(r,n)}},{key:"set",value:function(r,i,n){var a=this.getKey(r);this.setCache(a,i,n),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,i){this.getCachesAt(i).delete(r)}},{key:"delete",value:function(r,i){var n=this.getKey(r);this.deleteCache(n,i)}},{key:"invalidateKey",value:function(r){var i=this;this.lvls.forEach(function(n){return i.deleteCache(r,n)})}},{key:"invalidate",value:function(r){var i=r.id(),n=this.keyForId.get(i);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(n),a||this.getNumberOfIdsForKey(n)===0}}])})(),Bx=25,eh=50,dh=-4,i0=3,DS=7.99,ML=8,IL=1024,AL=1024,OL=1024,RL=.2,PL=.8,NL=10,FL=.15,BL=.1,LL=.9,zL=.9,VL=100,HL=1,su={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},UL=Zr({getKey:null,doesEleInvalidateKey:mh,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:pT,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Al=function(e,r){var i=this;i.renderer=e,i.onDequeues=[];var n=UL(r);$e(i,n),i.lookup=new kL(n.getKey,n.doesEleInvalidateKey),i.setupDequeueing()},Rr=Al.prototype;Rr.reasons=su;Rr.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Rr.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},i=r[t]=r[t]||[];return i};Rr.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Xl(function(r,i){return i.reqs-r.reqs});return e};Rr.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Rr.getElement=function(t,e,r,i,n){var a=this,o=this.renderer,s=o.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!a.allowEdgeTxrCaching&&t.isEdge()||!a.allowParentTxrCaching&&t.isParent())return null;if(i==null&&(i=Math.ceil(v0(s*r))),i<dh)i=dh;else if(s>=DS||i>i0)return null;var l=Math.pow(2,i),c=e.h*l,d=e.w*l,f=o.eleTextBiggerThanMin(t,l);if(!this.isVisible(t,f))return null;var p=u.get(t,i);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var h;if(c<=Bx?h=Bx:c<=eh?h=eh:h=Math.ceil(c/eh)*eh,c>OL||d>AL)return null;var g=a.getTextureQueue(h),v=g[g.length-2],m=function(){return a.recycleTexture(h,d)||a.addTexture(h,d)};v||(v=g[g.length-1]),v||(v=m()),v.width-v.usedWidth<d&&(v=m());for(var y=function(F){return F&&F.scaledLabelShown===f},b=n&&n===su.dequeue,w=n&&n===su.highQuality,T=n&&n===su.downscale,x,_=i+1;_<=i0;_++){var D=u.get(t,_);if(D){x=D;break}}var E=x&&x.level===i+1?x:null,M=function(){v.context.drawImage(E.texture.canvas,E.x,0,E.width,E.height,v.usedWidth,0,d,c)};if(v.context.setTransform(1,0,0,1,0,0),v.context.clearRect(v.usedWidth,0,d,h),y(E))M();else if(y(x))if(w){for(var k=x.level;k>i;k--)E=a.getElement(t,e,r,k,su.downscale);M()}else return a.queueElement(t,x.level-1),x;else{var I;if(!b&&!w&&!T)for(var A=i-1;A>=dh;A--){var O=u.get(t,A);if(O){I=O;break}}if(y(I))return a.queueElement(t,i),I;v.context.translate(v.usedWidth,0),v.context.scale(l,l),this.drawElement(v.context,t,e,f,!1),v.context.scale(1/l,1/l),v.context.translate(-v.usedWidth,0)}return p={x:v.usedWidth,texture:v,level:i,scale:l,width:d,height:c,scaledLabelShown:f},v.usedWidth+=Math.ceil(d+ML),v.eleCaches.push(p),u.set(t,i,p),a.checkTextureFullness(v),p};Rr.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])};Rr.invalidateElement=function(t){var e=this,r=e.lookup,i=[],n=r.isInvalid(t);if(n){for(var a=dh;a<=i0;a++){var o=r.getForCachedKey(t,a);o&&i.push(o)}var s=r.invalidate(t);if(s)for(var u=0;u<i.length;u++){var l=i[u],c=l.texture;c.invalidatedWidth+=l.width,l.invalidated=!0,e.checkTextureUtility(c)}e.removeFromQueue(t)}};Rr.checkTextureUtility=function(t){t.invalidatedWidth>=RL*t.width&&this.retireTexture(t)};Rr.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>PL&&t.fullnessChecks>=NL?Za(r,t):t.fullnessChecks++};Rr.retireTexture=function(t){var e=this,r=t.height,i=e.getTextureQueue(r),n=this.lookup;Za(i,t),t.retired=!0;for(var a=t.eleCaches,o=0;o<a.length;o++){var s=a[o];n.deleteCache(s.key,s.level)}p0(a);var u=e.getRetiredTextureQueue(r);u.push(t)};Rr.addTexture=function(t,e){var r=this,i=r.getTextureQueue(t),n={};return i.push(n),n.eleCaches=[],n.height=t,n.width=Math.max(IL,e),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=r.renderer.makeOffscreenCanvas(n.width,n.height),n.context=n.canvas.getContext("2d"),n};Rr.recycleTexture=function(t,e){for(var r=this,i=r.getTextureQueue(t),n=r.getRetiredTextureQueue(t),a=0;a<n.length;a++){var o=n[a];if(o.width>=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,p0(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Za(n,o),i.push(o),o}};Rr.queueElement=function(t,e){var r=this,i=r.getElementQueue(),n=r.getElementKeyToQueue(),a=this.getKey(t),o=n[a];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,i.updateItem(o);else{var s={eles:t.spawn().merge(t),level:e,reqs:1,key:a};i.push(s),n[a]=s}};Rr.dequeue=function(t){for(var e=this,r=e.getElementQueue(),i=e.getElementKeyToQueue(),n=[],a=e.lookup,o=0;o<HL&&r.size()>0;o++){var s=r.pop(),u=s.key,l=s.eles[0],c=a.hasCache(l,s.level);if(i[u]=null,c)continue;n.push(s);var d=e.getBoundingBox(l);e.getElement(l,d,t,s.level,su.dequeue)}return n};Rr.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),i=e.getElementKeyToQueue(),n=this.getKey(t),a=i[n];a!=null&&(a.eles.length===1?(a.reqs=f0,r.updateItem(a),r.pop(),i[n]=null):a.eles.unmerge(t))};Rr.onDequeue=function(t){this.onDequeues.push(t)};Rr.offDequeue=function(t){Za(this.onDequeues,t)};Rr.setupDequeueing=SS.setupDequeueing({deqRedrawThreshold:VL,deqCost:FL,deqAvgCost:BL,deqNoDrawCost:LL,deqFastCost:zL,deq:function(e,r,i){return e.dequeue(r,i)},onDeqd:function(e,r){for(var i=0;i<e.onDequeues.length;i++){var n=e.onDequeues[i];n(r)}},shouldRedraw:function(e,r,i,n){for(var a=0;a<r.length;a++)for(var o=r[a].eles,s=0;s<o.length;s++){var u=o[s].boundingBox();if(g0(u,n))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var jL=1,Rl=-4,Th=2,qL=3.99,WL=50,$L=50,GL=.15,YL=.1,KL=.9,ZL=.9,XL=1,Lx=250,QL=4e3*4e3,zx=32767,JL=!0,ES=function(e){var r=this,i=r.renderer=e,n=i.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=pa()-2*Lx,r.skipping=!1,r.eleTxrDeqs=n.collection(),r.scheduleElementRefinement=Zl(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},$L),i.beforeRender(function(o,s){s-r.lastInvalidationTime<=Lx?r.skipping=!0:r.skipping=!1},i.beforeRenderPriorities.lyrTxrSkip);var a=function(s,u){return u.reqs-s.reqs};r.layersQueue=new Xl(a),r.setupDequeueing()},Xr=ES.prototype,Vx=0,ez=Math.pow(2,53)-1;Xr.makeLayer=function(t,e){var r=Math.pow(2,e),i=Math.ceil(t.w*r),n=Math.ceil(t.h*r),a=this.renderer.makeOffscreenCanvas(i,n),o={id:Vx=++Vx%ez,bb:t,level:e,width:i,height:n,canvas:a,context:a.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=o.context,u=-o.bb.x1,l=-o.bb.y1;return s.scale(r,r),s.translate(u,l),o};Xr.getLayers=function(t,e,r){var i=this,n=i.renderer,a=n.cy,o=a.zoom(),s=i.firstGet;if(i.firstGet=!1,r==null){if(r=Math.ceil(v0(o*e)),r<Rl)r=Rl;else if(o>=qL||r>Th)return null}i.validateLayersElesOrdering(r,t);var u=i.layersByLevel,l=Math.pow(2,r),c=u[r]=u[r]||[],d,f=i.levelIsComplete(r,t),p,h=function(){var M=function(N){if(i.validateLayersElesOrdering(N,t),i.levelIsComplete(N,t))return p=u[N],!0},k=function(N){if(!p)for(var F=r+N;Rl<=F&&F<=Th&&!M(F);F+=N);};k(1),k(-1);for(var I=c.length-1;I>=0;I--){var A=c[I];A.invalid&&Za(c,A)}};if(!f)h();else return c;var g=function(){if(!d){d=fi();for(var M=0;M<t.length;M++)YN(d,t[M].boundingBox())}return d},v=function(M){M=M||{};var k=M.after;g();var I=Math.ceil(d.w*l),A=Math.ceil(d.h*l);if(I>zx||A>zx)return null;var O=I*A;if(O>QL)return null;var N=i.makeLayer(d,r);if(k!=null){var F=c.indexOf(k)+1;c.splice(F,0,N)}else(M.insert===void 0||M.insert)&&c.unshift(N);return N};if(i.skipping&&!s)return null;for(var m=null,y=t.length/jL,b=!s,w=0;w<t.length;w++){var T=t[w],x=T._private.rscratch,_=x.imgLayerCaches=x.imgLayerCaches||{},D=_[r];if(D){m=D;continue}if((!m||m.eles.length>=y||!CT(m.bb,T.boundingBox()))&&(m=v({insert:!0,after:m}),!m))return null;p||b?i.queueLayer(m,T):i.drawEleInLayer(m,T,r,e),m.eles.push(T),_[r]=m}return p||(b?null:c)};Xr.getEleLevelForLayerLevel=function(t,e){return t};Xr.drawEleInLayer=function(t,e,r,i){var n=this,a=this.renderer,o=t.context,s=e.boundingBox();s.w===0||s.h===0||!e.visible()||(r=n.getEleLevelForLayerLevel(r,i),a.setImgSmoothing(o,!1),a.drawCachedElement(o,e,null,null,r,JL),a.setImgSmoothing(o,!0))};Xr.levelIsComplete=function(t,e){var r=this,i=r.layersByLevel[t];if(!i||i.length===0)return!1;for(var n=0,a=0;a<i.length;a++){var o=i[a];if(o.reqs>0||o.invalid)return!1;n+=o.eles.length}return n===e.length};Xr.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var i=0;i<r.length;i++){for(var n=r[i],a=-1,o=0;o<e.length;o++)if(n.eles[0]===e[o]){a=o;break}if(a<0){this.invalidateLayer(n);continue}for(var s=a,o=0;o<n.eles.length;o++)if(n.eles[o]!==e[s+o]){this.invalidateLayer(n);break}}};Xr.updateElementsInLayers=function(t,e){for(var r=this,i=$l(t[0]),n=0;n<t.length;n++)for(var a=i?null:t[n],o=i?t[n]:t[n].ele,s=o._private.rscratch,u=s.imgLayerCaches=s.imgLayerCaches||{},l=Rl;l<=Th;l++){var c=u[l];c&&(a&&r.getEleLevelForLayerLevel(c.level)!==a.level||e(c,o,a))}};Xr.haveLayers=function(){for(var t=this,e=!1,r=Rl;r<=Th;r++){var i=t.layersByLevel[r];if(i&&i.length>0){e=!0;break}}return e};Xr.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=pa(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(i,n,a){e.invalidateLayer(i)}))};Xr.invalidateLayer=function(t){if(this.lastInvalidationTime=pa(),!t.invalid){var e=t.level,r=t.eles,i=this.layersByLevel[e];Za(i,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var n=0;n<r.length;n++){var a=r[n]._private.rscratch.imgLayerCaches;a&&(a[e]=null)}}};Xr.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,function(i,n,a){var o=i.replacement;if(o||(o=i.replacement=e.makeLayer(i.bb,i.level),o.replaces=i,o.eles=i.eles),!o.reqs)for(var s=0;s<o.eles.length;s++)e.queueLayer(o,o.eles[s])})};Xr.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()};Xr.queueLayer=function(t,e){var r=this,i=r.layersQueue,n=t.elesQueue,a=n.hasId=n.hasId||{};if(!t.replacement){if(e){if(a[e.id()])return;n.push(e),a[e.id()]=!0}t.reqs?(t.reqs++,i.updateItem(t)):(t.reqs=1,i.push(t))}};Xr.dequeue=function(t){for(var e=this,r=e.layersQueue,i=[],n=0;n<XL&&r.size()!==0;){var a=r.peek();if(a.replacement){r.pop();continue}if(a.replaces&&a!==a.replaces.replacement){r.pop();continue}if(a.invalid){r.pop();continue}var o=a.elesQueue.shift();o&&(e.drawEleInLayer(a,o,a.level,t),n++),i.length===0&&i.push(!0),a.elesQueue.length===0&&(r.pop(),a.reqs=0,a.replaces&&e.applyLayerReplacement(a),e.requestRedraw())}return i};Xr.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],i=t.replaces,n=r.indexOf(i);if(!(n<0||i.invalid)){r[n]=t;for(var a=0;a<t.eles.length;a++){var o=t.eles[a]._private,s=o.imgLayerCaches=o.imgLayerCaches||{};s&&(s[t.level]=t)}e.requestRedraw()}};Xr.requestRedraw=Zl(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100);Xr.setupDequeueing=SS.setupDequeueing({deqRedrawThreshold:WL,deqCost:GL,deqAvgCost:YL,deqNoDrawCost:KL,deqFastCost:ZL,deq:function(e,r){return e.dequeue(r)},onDeqd:h0,shouldRedraw:pT,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var kS={},Hx;function tz(t,e){for(var r=0;r<e.length;r++){var i=e[r];t.lineTo(i.x,i.y)}}function rz(t,e,r){for(var i,n=0;n<e.length;n++){var a=e[n];n===0&&(i=a),t.lineTo(a.x,a.y)}t.quadraticCurveTo(r.x,r.y,i.x,i.y)}function Ux(t,e,r){t.beginPath&&t.beginPath();for(var i=e,n=0;n<i.length;n++){var a=i[n];t.lineTo(a.x,a.y)}var o=r,s=r[0];t.moveTo(s.x,s.y);for(var n=1;n<o.length;n++){var a=o[n];t.lineTo(a.x,a.y)}t.closePath&&t.closePath()}function iz(t,e,r,i,n){t.beginPath&&t.beginPath(),t.arc(r,i,n,0,Math.PI*2,!1);var a=e,o=a[0];t.moveTo(o.x,o.y);for(var s=0;s<a.length;s++){var u=a[s];t.lineTo(u.x,u.y)}t.closePath&&t.closePath()}function nz(t,e,r,i){t.arc(e,r,i,0,Math.PI*2,!1)}kS.arrowShapeImpl=function(t){return(Hx||(Hx={polygon:tz,"triangle-backcurve":rz,"triangle-tee":Ux,"circle-triangle":iz,"triangle-cross":Ux,circle:nz}))[t]};var Wn={};Wn.drawElement=function(t,e,r,i,n,a){var o=this;e.isNode()?o.drawNode(t,e,r,i,n,a):o.drawEdge(t,e,r,i,n,a)};Wn.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e)};Wn.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e)};Wn.drawCachedElementPortion=function(t,e,r,i,n,a,o,s){var u=this,l=r.getBoundingBox(e);if(!(l.w===0||l.h===0)){var c=r.getElement(e,l,i,n,a);if(c!=null){var d=s(u,e);if(d===0)return;var f=o(u,e),p=l.x1,h=l.y1,g=l.w,v=l.h,m,y,b,w,T;if(f!==0){var x=r.getRotationPoint(e);b=x.x,w=x.y,t.translate(b,w),t.rotate(f),T=u.getImgSmoothing(t),T||u.setImgSmoothing(t,!0);var _=r.getRotationOffset(e);m=_.x,y=_.y}else m=p,y=h;var D;d!==1&&(D=t.globalAlpha,t.globalAlpha=D*d),t.drawImage(c.texture.canvas,c.x,0,c.width,c.height,m,y,g,v),d!==1&&(t.globalAlpha=D),f!==0&&(t.rotate(-f),t.translate(-b,-w),T||u.setImgSmoothing(t,!1))}else r.drawElement(t,e)}};var az=function(){return 0},oz=function(e,r){return e.getTextAngle(r,null)},sz=function(e,r){return e.getTextAngle(r,"source")},uz=function(e,r){return e.getTextAngle(r,"target")},lz=function(e,r){return r.effectiveOpacity()},Ng=function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()};Wn.drawCachedElement=function(t,e,r,i,n,a){var o=this,s=o.data,u=s.eleTxrCache,l=s.lblTxrCache,c=s.slbTxrCache,d=s.tlbTxrCache,f=e.boundingBox(),p=a===!0?u.reasons.highQuality:null;if(!(f.w===0||f.h===0||!e.visible())&&(!i||g0(f,i))){var h=e.isEdge(),g=e.element()._private.rscratch.badLine;o.drawElementUnderlay(t,e),o.drawCachedElementPortion(t,e,u,r,n,p,az,lz),(!h||!g)&&o.drawCachedElementPortion(t,e,l,r,n,p,oz,Ng),h&&!g&&(o.drawCachedElementPortion(t,e,c,r,n,p,sz,Ng),o.drawCachedElementPortion(t,e,d,r,n,p,uz,Ng)),o.drawElementOverlay(t,e)}};Wn.drawElements=function(t,e){for(var r=this,i=0;i<e.length;i++){var n=e[i];r.drawElement(t,n)}};Wn.drawCachedElements=function(t,e,r,i){for(var n=this,a=0;a<e.length;a++){var o=e[a];n.drawCachedElement(t,o,r,i)}};Wn.drawCachedNodes=function(t,e,r,i){for(var n=this,a=0;a<e.length;a++){var o=e[a];o.isNode()&&n.drawCachedElement(t,o,r,i)}};Wn.drawLayeredElements=function(t,e,r,i){var n=this,a=n.data.lyrTxrCache.getLayers(e,r);if(a)for(var o=0;o<a.length;o++){var s=a[o],u=s.bb;u.w===0||u.h===0||t.drawImage(s.canvas,u.x1,u.y1,u.w,u.h)}else n.drawCachedElements(t,e,r,i)};var ga={};ga.drawEdge=function(t,e,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=e._private.rscratch;if(!(a&&!e.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var u;r&&(u=r,t.translate(-u.x1,-u.y1));var l=a?e.pstyle("opacity").value:1,c=a?e.pstyle("line-opacity").value:1,d=e.pstyle("curve-style").value,f=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,h=e.pstyle("line-cap").value,g=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,m=l*c,y=l*c,b=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;d==="straight-triangle"?(o.eleStrokeStyle(t,e,N),o.drawEdgeTrianglePath(e,t,s.allpts)):(t.lineWidth=p,t.lineCap=h,o.eleStrokeStyle(t,e,N),o.drawEdgePath(e,t,s.allpts,f),t.lineCap="butt")},w=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;if(t.lineWidth=p+g,t.lineCap=h,g>0)o.colorStrokeStyle(t,v[0],v[1],v[2],N);else{t.lineCap="butt";return}d==="straight-triangle"?o.drawEdgeTrianglePath(e,t,s.allpts):(o.drawEdgePath(e,t,s.allpts,f),t.lineCap="butt")},T=function(){n&&o.drawEdgeOverlay(t,e)},x=function(){n&&o.drawEdgeUnderlay(t,e)},_=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;o.drawArrowheads(t,e,N)},D=function(){o.drawElementText(t,e,null,i)};t.lineJoin="round";var E=e.pstyle("ghost").value==="yes";if(E){var M=e.pstyle("ghost-offset-x").pfValue,k=e.pstyle("ghost-offset-y").pfValue,I=e.pstyle("ghost-opacity").value,A=m*I;t.translate(M,k),b(A),_(A),t.translate(-M,-k)}else w();x(),b(),_(),T(),D(),r&&t.translate(u.x1,u.y1)}};var MS=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,i){if(i.visible()){var n=i.pstyle("".concat(e,"-opacity")).value;if(n!==0){var a=this,o=a.usePaths(),s=i._private.rscratch,u=i.pstyle("".concat(e,"-padding")).pfValue,l=2*u,c=i.pstyle("".concat(e,"-color")).value;r.lineWidth=l,s.edgeType==="self"&&!o?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,c[0],c[1],c[2],n),a.drawEdgePath(i,r,s.allpts,"solid")}}}};ga.drawEdgeOverlay=MS("overlay");ga.drawEdgeUnderlay=MS("underlay");ga.drawEdgePath=function(t,e,r,i){var n=t._private.rscratch,a=e,o,s=!1,u=this.usePaths(),l=t.pstyle("line-dash-pattern").pfValue,c=t.pstyle("line-dash-offset").pfValue;if(u){var d=r.join("$"),f=n.pathCacheKey&&n.pathCacheKey===d;f?(o=e=n.pathCache,s=!0):(o=e=new Path2D,n.pathCacheKey=d,n.pathCache=o)}if(a.setLineDash)switch(i){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(l),a.lineDashOffset=c;break;case"solid":a.setLineDash([]);break}if(!s&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+3<r.length;p+=4)e.quadraticCurveTo(r[p],r[p+1],r[p+2],r[p+3]);break;case"straight":case"haystack":for(var h=2;h+1<r.length;h+=2)e.lineTo(r[h],r[h+1]);break;case"segments":if(n.isRound){var g=ki(n.roundCorners),v;try{for(g.s();!(v=g.n()).done;){var m=v.value;mS(e,m)}}catch(b){g.e(b)}finally{g.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var y=2;y+1<r.length;y+=2)e.lineTo(r[y],r[y+1]);break}e=a,u?e.stroke(o):e.stroke(),e.setLineDash&&e.setLineDash([])};ga.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var i=t.pstyle("width").pfValue,n=0;n+1<r.length;n+=2){var a=[r[n+2]-r[n],r[n+3]-r[n+1]],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[a[1]/o,-a[0]/o],u=[s[0]*i/2,s[1]*i/2];e.beginPath(),e.moveTo(r[n]-u[0],r[n+1]-u[1]),e.lineTo(r[n]+u[0],r[n+1]+u[1]),e.lineTo(r[n+2],r[n+3]),e.closePath(),e.fill()}};ga.drawArrowheads=function(t,e,r){var i=e._private.rscratch,n=i.edgeType==="haystack";n||this.drawArrowhead(t,e,"source",i.arrowStartX,i.arrowStartY,i.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",i.midX,i.midY,i.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",i.midX,i.midY,i.midsrcArrowAngle,r),n||this.drawArrowhead(t,e,"target",i.arrowEndX,i.arrowEndY,i.tgtArrowAngle,r)};ga.drawArrowhead=function(t,e,r,i,n,a,o){if(!(isNaN(i)||i==null||isNaN(n)||n==null||isNaN(a)||a==null)){var s=this,u=e.pstyle(r+"-arrow-shape").value;if(u!=="none"){var l=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",c=e.pstyle(r+"-arrow-fill").value,d=e.pstyle("width").pfValue,f=e.pstyle(r+"-arrow-width"),p=f.value==="match-line"?d:f.pfValue;f.units==="%"&&(p*=d);var h=e.pstyle("opacity").value;o===void 0&&(o=h);var g=t.globalCompositeOperation;(o!==1||c==="hollow")&&(t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,1),s.colorStrokeStyle(t,255,255,255,1),s.drawArrowShape(e,t,l,d,u,p,i,n,a),t.globalCompositeOperation=g);var v=e.pstyle(r+"-arrow-color").value;s.colorFillStyle(t,v[0],v[1],v[2],o),s.colorStrokeStyle(t,v[0],v[1],v[2],o),s.drawArrowShape(e,t,c,d,u,p,i,n,a)}}};ga.drawArrowShape=function(t,e,r,i,n,a,o,s,u){var l=this,c=this.usePaths()&&n!=="triangle-cross",d=!1,f,p=e,h={x:o,y:s},g=t.pstyle("arrow-scale").value,v=this.getArrowWidth(i,g),m=l.arrowShapes[n];if(c){var y=l.arrowPathCache=l.arrowPathCache||[],b=Uo(n),w=y[b];w!=null?(f=e=w,d=!0):(f=e=new Path2D,y[b]=f)}d||(e.beginPath&&e.beginPath(),c?m.draw(e,1,0,{x:0,y:0},1):m.draw(e,v,u,h,i),e.closePath&&e.closePath()),e=p,c&&(e.translate(o,s),e.rotate(u),e.scale(v,v)),(r==="filled"||r==="both")&&(c?e.fill(f):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=a/(c?v:1),e.lineJoin="miter",c?e.stroke(f):e.stroke()),c&&(e.scale(1/v,1/v),e.rotate(-u),e.translate(-o,-s))};var A0={};A0.safeDrawImage=function(t,e,r,i,n,a,o,s,u,l){if(!(n<=0||a<=0||u<=0||l<=0))try{t.drawImage(e,r,i,n,a,o,s,u,l)}catch(c){Vt(c)}};A0.drawInscribedImage=function(t,e,r,i,n){var a=this,o=r.position(),s=o.x,u=o.y,l=r.cy().style(),c=l.getIndexedStyle.bind(l),d=c(r,"background-fit","value",i),f=c(r,"background-repeat","value",i),p=r.width(),h=r.height(),g=r.padding()*2,v=p+(c(r,"background-width-relative-to","value",i)==="inner"?0:g),m=h+(c(r,"background-height-relative-to","value",i)==="inner"?0:g),y=r._private.rscratch,b=c(r,"background-clip","value",i),w=b==="node",T=c(r,"background-image-opacity","value",i)*n,x=c(r,"background-image-smoothing","value",i),_=r.pstyle("corner-radius").value;_!=="auto"&&(_=r.pstyle("corner-radius").pfValue);var D=e.width||e.cachedW,E=e.height||e.cachedH;(D==null||E==null)&&(document.body.appendChild(e),D=e.cachedW=e.width||e.offsetWidth,E=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var M=D,k=E;if(c(r,"background-width","value",i)!=="auto"&&(c(r,"background-width","units",i)==="%"?M=c(r,"background-width","pfValue",i)*v:M=c(r,"background-width","pfValue",i)),c(r,"background-height","value",i)!=="auto"&&(c(r,"background-height","units",i)==="%"?k=c(r,"background-height","pfValue",i)*m:k=c(r,"background-height","pfValue",i)),!(M===0||k===0)){if(d==="contain"){var I=Math.min(v/M,m/k);M*=I,k*=I}else if(d==="cover"){var I=Math.max(v/M,m/k);M*=I,k*=I}var A=s-v/2,O=c(r,"background-position-x","units",i),N=c(r,"background-position-x","pfValue",i);O==="%"?A+=(v-M)*N:A+=N;var F=c(r,"background-offset-x","units",i),P=c(r,"background-offset-x","pfValue",i);F==="%"?A+=(v-M)*P:A+=P;var z=u-m/2,$=c(r,"background-position-y","units",i),G=c(r,"background-position-y","pfValue",i);$==="%"?z+=(m-k)*G:z+=G;var V=c(r,"background-offset-y","units",i),W=c(r,"background-offset-y","pfValue",i);V==="%"?z+=(m-k)*W:z+=W,y.pathCache&&(A-=s,z-=u,s=0,u=0);var ue=t.globalAlpha;t.globalAlpha=T;var he=a.getImgSmoothing(t),le=!1;if(x==="no"&&he?(a.setImgSmoothing(t,!1),le=!0):x==="yes"&&!he&&(a.setImgSmoothing(t,!0),le=!0),f==="no-repeat")w&&(t.save(),y.pathCache?t.clip(y.pathCache):(a.nodeShapes[a.getNodeShape(r)].draw(t,s,u,v,m,_,y),t.clip())),a.safeDrawImage(t,e,0,0,D,E,A,z,M,k),w&&t.restore();else{var me=t.createPattern(e,f);t.fillStyle=me,a.nodeShapes[a.getNodeShape(r)].draw(t,s,u,v,m,_,y),t.translate(A,z),t.fill(),t.translate(-A,-z)}t.globalAlpha=ue,le&&a.setImgSmoothing(t,he)}};var Yo={};Yo.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),i=this.getPixelRatio(),n=Math.ceil(v0(r*i));e=Math.pow(2,n)}var a=t.pstyle("font-size").pfValue*e,o=t.pstyle("min-zoomed-font-size").pfValue;return!(a<o)};Yo.drawElementText=function(t,e,r,i,n){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(i==null){if(a&&!o.eleTextBiggerThanMin(e))return}else if(i===!1)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var u=o.getLabelJustification(e),l=e.pstyle("text-metrics").strValue==="glyph";t.textAlign=u,t.textBaseline=l?"alphabetic":"bottom"}else{var c=e.element()._private.rscratch.badLine,d=e.pstyle("label"),f=e.pstyle("source-label"),p=e.pstyle("target-label");if(c||(!d||!d.value)&&(!f||!f.value)&&(!p||!p.value))return;t.textAlign="center",t.textBaseline="bottom"}var h=!r,g;r&&(g=r,t.translate(-g.x1,-g.y1)),n==null?(o.drawText(t,e,null,h,a),e.isEdge()&&(o.drawText(t,e,"source",h,a),o.drawText(t,e,"target",h,a))):o.drawText(t,e,n,h,a),r&&t.translate(g.x1,g.y1)};Yo.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e};Yo.setupTextStyle=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",a=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*s,l=e.pstyle("color").value,c=e.pstyle("text-outline-color").value;t.font=i+" "+o+" "+n+" "+a,t.lineJoin="round",this.colorFillStyle(t,l[0],l[1],l[2],s),this.colorStrokeStyle(t,c[0],c[1],c[2],u)};function cz(t,e,r,i,n){var a=Math.min(i,n),o=a/2,s=e+i/2,u=r+n/2;t.beginPath(),t.arc(s,u,o,0,Math.PI*2),t.closePath()}function jx(t,e,r,i,n){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,i/2,n/2);t.beginPath(),t.moveTo(e+o,r),t.lineTo(e+i-o,r),t.quadraticCurveTo(e+i,r,e+i,r+o),t.lineTo(e+i,r+n-o),t.quadraticCurveTo(e+i,r+n,e+i-o,r+n),t.lineTo(e+o,r+n),t.quadraticCurveTo(e,r+n,e,r+n-o),t.lineTo(e,r+o),t.quadraticCurveTo(e,r,e+o,r),t.closePath()}Yo.getTextAngle=function(t,e){var r,i=t._private,n=i.rscratch,a=e?e+"-":"",o=t.pstyle(a+"text-rotation");if(o.strValue==="autorotate"){var s=di(n,"labelAngle",e);r=t.isEdge()?s:0}else o.strValue==="none"?r=0:r=o.pfValue;return r};Yo.drawText=function(t,e,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e._private,o=a.rscratch,s=n?e.effectiveOpacity():1;if(!(n&&(s===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=di(o,"labelX",r),l=di(o,"labelY",r),c,d,f=this.getLabelText(e,r);if(f!=null&&f!==""&&!isNaN(u)&&!isNaN(l)){this.setupTextStyle(t,e,n);var p=r?r+"-":"",h=di(o,"labelWidth",r),g=di(o,"labelHeight",r),v=di(o,"labelActualDescent",r),m=e.pstyle(p+"text-margin-x").pfValue,y=e.pstyle(p+"text-margin-y").pfValue,b=e.isEdge(),w=e.pstyle("text-halign").value,T=e.pstyle("text-valign").value;b&&(w="center",T="center"),u+=m,l+=y;var x;i?x=this.getTextAngle(e,r):x=0,x!==0&&(c=u,d=l,t.translate(c,d),t.rotate(x),u=0,l=0);var _=vu(w),D=mu(T);switch(D){case"top":break;case"center":l+=g/2;break;case"bottom":l+=g;break}var E=e.pstyle("text-background-opacity").value,M=e.pstyle("text-border-opacity").value,k=e.pstyle("text-border-width").pfValue,I=e.pstyle("text-background-padding").pfValue,A=e.pstyle("text-background-shape").strValue,O=A==="round-rectangle"||A==="roundrectangle",N=A==="circle",F=2;if(E>0||k>0&&M>0){var P=t.fillStyle,z=t.strokeStyle,$=t.lineWidth,G=e.pstyle("text-background-color").value,V=e.pstyle("text-border-color").value,W=e.pstyle("text-border-style").value,ue=E>0,he=k>0&&M>0,le=u-I;switch(_){case"left":le-=h;break;case"center":le-=h/2;break}var me=l-g-I,be=h+2*I,Se=g+2*I;if(ue&&(t.fillStyle="rgba(".concat(G[0],",").concat(G[1],",").concat(G[2],",").concat(E*s,")")),he&&(t.strokeStyle="rgba(".concat(V[0],",").concat(V[1],",").concat(V[2],",").concat(M*s,")"),t.lineWidth=k,t.setLineDash))switch(W){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=k/4,t.setLineDash([]);break;default:t.setLineDash([]);break}if(O?(t.beginPath(),jx(t,le,me,be,Se,F)):N?(t.beginPath(),cz(t,le,me,be,Se)):(t.beginPath(),t.rect(le,me,be,Se)),ue&&t.fill(),he&&t.stroke(),he&&W==="double"){var se=k/2;t.beginPath(),O?jx(t,le+se,me+se,be-2*se,Se-2*se,F):t.rect(le+se,me+se,be-2*se,Se-2*se),t.stroke()}t.fillStyle=P,t.strokeStyle=z,t.lineWidth=$,t.setLineDash&&t.setLineDash([])}var q=2*e.pstyle("text-outline-width").pfValue;if(q>0&&(t.lineWidth=q),l-=v,e.pstyle("text-wrap").value==="wrap"){var X=di(o,"labelWrapCachedLines",r),J=di(o,"labelLineHeight",r),ne=h/2,we=this.getLabelJustification(e);switch(we==="auto"||(_==="left"?we==="left"?u+=-h:we==="center"&&(u+=-ne):_==="center"?we==="left"?u+=-ne:we==="right"&&(u+=ne):_==="right"&&(we==="center"?u+=ne:we==="right"&&(u+=h))),D){case"top":l-=(X.length-1)*J;break;case"center":case"bottom":l-=(X.length-1)*J;break}for(var Re=0;Re<X.length;Re++)q>0&&t.strokeText(X[Re],u,l),t.fillText(X[Re],u,l),l+=J}else q>0&&t.strokeText(f,u,l),t.fillText(f,u,l);x!==0&&(t.rotate(-x),t.translate(-c,-d))}}};var ao={};ao.drawNode=function(t,e,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,u,l=e._private,c=l.rscratch,d=e.position();if(!(!Te(d.x)||!Te(d.y))&&!(a&&!e.visible())){var f=a?e.effectiveOpacity():1,p=o.usePaths(),h,g=!1,v=e.padding();s=e.width()+2*v,u=e.height()+2*v;var m;r&&(m=r,t.translate(-m.x1,-m.y1));for(var y=e.pstyle("background-image"),b=y.value,w=new Array(b.length),T=new Array(b.length),x=0,_=0;_<b.length;_++){var D=b[_],E=w[_]=D!=null&&D!=="none";if(E){var M=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",_);x++,T[_]=o.getCachedImage(D,M,function(){l.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var k=e.pstyle("background-blacken").value,I=e.pstyle("border-width").pfValue,A=e.pstyle("background-opacity").value*f,O=e.pstyle("border-color").value,N=e.pstyle("border-style").value,F=e.pstyle("border-join").value,P=e.pstyle("border-cap").value,z=e.pstyle("border-position").value,$=e.pstyle("border-dash-pattern").pfValue,G=e.pstyle("border-dash-offset").pfValue,V=e.pstyle("border-opacity").value*f,W=e.pstyle("outline-width").pfValue,ue=e.pstyle("outline-color").value,he=e.pstyle("outline-style").value,le=e.pstyle("outline-opacity").value*f,me=e.pstyle("outline-offset").value,be=e.pstyle("corner-radius").value;be!=="auto"&&(be=e.pstyle("corner-radius").pfValue);var Se=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A;o.eleFillStyle(t,e,S)},se=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;o.colorStrokeStyle(t,O[0],O[1],O[2],S)},q=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:le;o.colorStrokeStyle(t,ue[0],ue[1],ue[2],S)},X=function(S,H,Y,ie){var oe=o.nodePathCache=o.nodePathCache||[],Ne=hT(Y==="polygon"?Y+","+ie.join(","):Y,""+H,""+S,""+be),ve=oe[Ne],De,ke=!1;return ve!=null?(De=ve,ke=!0,c.pathCache=De):(De=new Path2D,oe[Ne]=c.pathCache=De),{path:De,cacheHit:ke}},J=e.pstyle("shape").strValue,ne=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(d.x,d.y);var we=X(s,u,J,ne);h=we.path,g=we.cacheHit}var Re=function(){if(!g){var S=d;p&&(S={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(h||t,S.x,S.y,s,u,be,c)}p?t.fill(h):t.fill()},vt=function(){for(var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=l.backgrounding,ie=0,oe=0;oe<T.length;oe++){var Ne=e.cy().style().getIndexedStyle(e,"background-image-containment","value",oe);if(H&&Ne==="over"||!H&&Ne==="inside"){ie++;continue}w[oe]&&T[oe].complete&&!T[oe].error&&(ie++,o.drawInscribedImage(t,T[oe],e,oe,S))}l.backgrounding=ie!==x,Y!==l.backgrounding&&e.updateStyle(!1)},Je=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f;o.hasPie(e)&&(o.drawPie(t,e,H),S&&(p||o.nodeShapes[o.getNodeShape(e)].draw(t,d.x,d.y,s,u,be,c)))},Ge=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f;o.hasStripe(e)&&(t.save(),p?t.clip(c.pathCache):(o.nodeShapes[o.getNodeShape(e)].draw(t,d.x,d.y,s,u,be,c),t.clip()),o.drawStripe(t,e,H),t.restore(),S&&(p||o.nodeShapes[o.getNodeShape(e)].draw(t,d.x,d.y,s,u,be,c)))},qe=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,H=(k>0?k:-k)*S,Y=k>0?0:255;k!==0&&(o.colorFillStyle(t,Y,Y,Y,H),p?t.fill(h):t.fill())},Ee=function(){if(I>0){if(t.lineWidth=I,t.lineCap=P,t.lineJoin=F,t.setLineDash)switch(N){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash($),t.lineDashOffset=G;break;case"solid":case"double":t.setLineDash([]);break}if(z!=="center"){if(t.save(),t.lineWidth*=2,z==="inside")p?t.clip(h):t.clip();else{var S=new Path2D;S.rect(-s/2-I,-u/2-I,s+2*I,u+2*I),S.addPath(h),t.clip(S,"evenodd")}p?t.stroke(h):t.stroke(),t.restore()}else p?t.stroke(h):t.stroke();if(N==="double"){t.lineWidth=I/3;var H=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(h):t.stroke(),t.globalCompositeOperation=H}t.setLineDash&&t.setLineDash([])}},He=function(){if(W>0){if(t.lineWidth=W,t.lineCap="butt",t.setLineDash)switch(he){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var S=d;p&&(S={x:0,y:0});var H=o.getNodeShape(e),Y=I;z==="inside"&&(Y=0),z==="outside"&&(Y*=2);var ie=(s+Y+(W+me))/s,oe=(u+Y+(W+me))/u,Ne=s*ie,ve=u*oe,De=o.nodeShapes[H].points,ke;if(p){var We=X(Ne,ve,H,De);ke=We.path}if(H==="ellipse")o.drawEllipsePath(ke||t,S.x,S.y,Ne,ve);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(H)){var tt=0,at=0,Fe=0;H==="round-diamond"?tt=(Y+me+W)*1.4:H==="round-heptagon"?(tt=(Y+me+W)*1.075,Fe=-(Y/2+me+W)/35):H==="round-hexagon"?tt=(Y+me+W)*1.12:H==="round-pentagon"?(tt=(Y+me+W)*1.13,Fe=-(Y/2+me+W)/15):H==="round-tag"?(tt=(Y+me+W)*1.12,at=(Y/2+W+me)*.07):H==="round-triangle"&&(tt=(Y+me+W)*(Math.PI/2),Fe=-(Y+me/2+W)/Math.PI),tt!==0&&(ie=(s+tt)/s,Ne=s*ie,["round-hexagon","round-tag"].includes(H)||(oe=(u+tt)/u,ve=u*oe)),be=be==="auto"?xT(Ne,ve):be;for(var pt=Ne/2,bt=ve/2,Pr=be+(Y+W+me)/2,dr=new Array(De.length/2),Ji=new Array(De.length/2),fr=0;fr<De.length/2;fr++)dr[fr]={x:S.x+at+pt*De[fr*2],y:S.y+Fe+bt*De[fr*2+1]};var _r,Dr,Ur,_n,or=dr.length;for(Dr=dr[or-1],_r=0;_r<or;_r++)Ur=dr[_r%or],_n=dr[(_r+1)%or],Ji[_r]=M0(Dr,Ur,_n,Pr),Dr=Ur,Ur=_n;o.drawRoundPolygonPath(ke||t,S.x+at,S.y+Fe,s*ie,u*oe,De,Ji)}else if(["roundrectangle","round-rectangle"].includes(H))be=be==="auto"?Xa(Ne,ve):be,o.drawRoundRectanglePath(ke||t,S.x,S.y,Ne,ve,be+(Y+W+me)/2);else if(["cutrectangle","cut-rectangle"].includes(H))be=be==="auto"?y0():be,o.drawCutRectanglePath(ke||t,S.x,S.y,Ne,ve,null,be+(Y+W+me)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(H))be=be==="auto"?Xa(Ne,ve):be,o.drawBottomRoundRectanglePath(ke||t,S.x,S.y,Ne,ve,be+(Y+W+me)/2);else if(H==="barrel")o.drawBarrelPath(ke||t,S.x,S.y,Ne,ve);else if(H.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(H)){var $n=(Y+W+me)/s;De=gh(yh(De,$n)),o.drawPolygonPath(ke||t,S.x,S.y,s,u,De)}else{var en=(Y+W+me)/s;De=gh(yh(De,-en)),o.drawPolygonPath(ke||t,S.x,S.y,s,u,De)}if(p?t.stroke(ke):t.stroke(),he==="double"){t.lineWidth=Y/3;var ya=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(ke):t.stroke(),t.globalCompositeOperation=ya}t.setLineDash&&t.setLineDash([])}},ze=function(){n&&o.drawNodeOverlay(t,e,d,s,u)},et=function(){n&&o.drawNodeUnderlay(t,e,d,s,u)},Ye=function(){o.drawElementText(t,e,null,i)},ct=e.pstyle("ghost").value==="yes";if(ct){var gt=e.pstyle("ghost-offset-x").pfValue,Pt=e.pstyle("ghost-offset-y").pfValue,Et=e.pstyle("ghost-opacity").value,_t=Et*f;t.translate(gt,Pt),q(),He(),Se(Et*A),Re(),vt(_t,!0),se(Et*V),Ee(),Je(k!==0||I!==0),Ge(k!==0||I!==0),vt(_t,!1),qe(_t),t.translate(-gt,-Pt)}p&&t.translate(-d.x,-d.y),et(),p&&t.translate(d.x,d.y),q(),He(),Se(),Re(),vt(f,!0),se(),Ee(),Je(k!==0||I!==0),Ge(k!==0||I!==0),vt(f,!1),qe(),p&&t.translate(-d.x,-d.y),Ye(),ze(),r&&t.translate(m.x1,m.y1)}};var IS=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,i,n,a,o){var s=this;if(i.visible()){var u=i.pstyle("".concat(e,"-padding")).pfValue,l=i.pstyle("".concat(e,"-opacity")).value,c=i.pstyle("".concat(e,"-color")).value,d=i.pstyle("".concat(e,"-shape")).value,f=i.pstyle("".concat(e,"-corner-radius")).value;if(l>0){if(n=n||i.position(),a==null||o==null){var p=i.padding();a=i.width()+2*p,o=i.height()+2*p}s.colorFillStyle(r,c[0],c[1],c[2],l),s.nodeShapes[d].draw(r,n.x,n.y,a+u*2,o+u*2,f),r.fill()}}}};ao.drawNodeOverlay=IS("overlay");ao.drawNodeUnderlay=IS("underlay");ao.hasPie=function(t){return t=t[0],t._private.hasPie};ao.hasStripe=function(t){return t=t[0],t._private.hasStripe};ao.drawPie=function(t,e,r,i){e=e[0],i=i||e.position();var n=e.cy().style(),a=e.pstyle("pie-size"),o=e.pstyle("pie-hole"),s=e.pstyle("pie-start-angle").pfValue,u=i.x,l=i.y,c=e.width(),d=e.height(),f=Math.min(c,d)/2,p,h=0,g=this.usePaths();if(g&&(u=0,l=0),a.units==="%"?f=f*a.pfValue:a.pfValue!==void 0&&(f=a.pfValue/2),o.units==="%"?p=f*o.pfValue:o.pfValue!==void 0&&(p=o.pfValue/2),!(p>=f))for(var v=1;v<=n.pieBackgroundN;v++){var m=e.pstyle("pie-"+v+"-background-size").value,y=e.pstyle("pie-"+v+"-background-color").value,b=e.pstyle("pie-"+v+"-background-opacity").value*r,w=m/100;w+h>1&&(w=1-h);var T=1.5*Math.PI+2*Math.PI*h;T+=s;var x=2*Math.PI*w,_=T+x;m===0||h>=1||h+w>1||(p===0?(t.beginPath(),t.moveTo(u,l),t.arc(u,l,f,T,_),t.closePath()):(t.beginPath(),t.arc(u,l,f,T,_),t.arc(u,l,p,_,T,!0),t.closePath()),this.colorFillStyle(t,y[0],y[1],y[2],b),t.fill(),h+=w)}};ao.drawStripe=function(t,e,r,i){e=e[0],i=i||e.position();var n=e.cy().style(),a=i.x,o=i.y,s=e.width(),u=e.height(),l=0,c=this.usePaths();t.save();var d=e.pstyle("stripe-direction").value,f=e.pstyle("stripe-size");switch(d){case"vertical":break;case"righward":t.rotate(-Math.PI/2);break}var p=s,h=u;f.units==="%"?(p=p*f.pfValue,h=h*f.pfValue):f.pfValue!==void 0&&(p=f.pfValue,h=f.pfValue),c&&(a=0,o=0),o-=p/2,a-=h/2;for(var g=1;g<=n.stripeBackgroundN;g++){var v=e.pstyle("stripe-"+g+"-background-size").value,m=e.pstyle("stripe-"+g+"-background-color").value,y=e.pstyle("stripe-"+g+"-background-opacity").value*r,b=v/100;b+l>1&&(b=1-l),!(v===0||l>=1||l+b>1)&&(t.beginPath(),t.rect(a,o+h*l,p,h*b),t.closePath(),this.colorFillStyle(t,m[0],m[1],m[2],y),t.fill(),l+=b)}t.restore()};var hi={},dz=100;hi.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};hi.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,i,n=0;n<e.length;n++)if(i=e[n],i.context===t){r=!1;break}return r&&(i={context:t},e.push(i)),i};hi.createGradientStyleFor=function(t,e,r,i,n){var a,o=this.usePaths(),s=r.pstyle(e+"-gradient-stop-colors").value,u=r.pstyle(e+"-gradient-stop-positions").pfValue;if(i==="radial-gradient")if(r.isEdge()){var l=r.sourceEndpoint(),c=r.targetEndpoint(),d=r.midpoint(),f=jo(l,d),p=jo(c,d);a=t.createRadialGradient(d.x,d.y,0,d.x,d.y,Math.max(f,p))}else{var h=o?{x:0,y:0}:r.position(),g=r.paddedWidth(),v=r.paddedHeight();a=t.createRadialGradient(h.x,h.y,0,h.x,h.y,Math.max(g,v))}else if(r.isEdge()){var m=r.sourceEndpoint(),y=r.targetEndpoint();a=t.createLinearGradient(m.x,m.y,y.x,y.y)}else{var b=o?{x:0,y:0}:r.position(),w=r.paddedWidth(),T=r.paddedHeight(),x=w/2,_=T/2,D=r.pstyle("background-gradient-direction").value;switch(D){case"to-bottom":a=t.createLinearGradient(b.x,b.y-_,b.x,b.y+_);break;case"to-top":a=t.createLinearGradient(b.x,b.y+_,b.x,b.y-_);break;case"to-left":a=t.createLinearGradient(b.x+x,b.y,b.x-x,b.y);break;case"to-right":a=t.createLinearGradient(b.x-x,b.y,b.x+x,b.y);break;case"to-bottom-right":case"to-right-bottom":a=t.createLinearGradient(b.x-x,b.y-_,b.x+x,b.y+_);break;case"to-top-right":case"to-right-top":a=t.createLinearGradient(b.x-x,b.y+_,b.x+x,b.y-_);break;case"to-bottom-left":case"to-left-bottom":a=t.createLinearGradient(b.x+x,b.y-_,b.x-x,b.y+_);break;case"to-top-left":case"to-left-top":a=t.createLinearGradient(b.x+x,b.y+_,b.x-x,b.y-_);break}}if(!a)return null;for(var E=u.length===s.length,M=s.length,k=0;k<M;k++)a.addColorStop(E?u[k]:k/(M-1),"rgba("+s[k][0]+","+s[k][1]+","+s[k][2]+","+n+")");return a};hi.gradientFillStyle=function(t,e,r,i){var n=this.createGradientStyleFor(t,"background",e,r,i);if(!n)return null;t.fillStyle=n};hi.colorFillStyle=function(t,e,r,i,n){t.fillStyle="rgba("+e+","+r+","+i+","+n+")"};hi.eleFillStyle=function(t,e,r){var i=e.pstyle("background-fill").value;if(i==="linear-gradient"||i==="radial-gradient")this.gradientFillStyle(t,e,i,r);else{var n=e.pstyle("background-color").value;this.colorFillStyle(t,n[0],n[1],n[2],r)}};hi.gradientStrokeStyle=function(t,e,r,i){var n=this.createGradientStyleFor(t,"line",e,r,i);if(!n)return null;t.strokeStyle=n};hi.colorStrokeStyle=function(t,e,r,i,n){t.strokeStyle="rgba("+e+","+r+","+i+","+n+")"};hi.eleStrokeStyle=function(t,e,r){var i=e.pstyle("line-fill").value;if(i==="linear-gradient"||i==="radial-gradient")this.gradientStrokeStyle(t,e,i,r);else{var n=e.pstyle("line-color").value;this.colorStrokeStyle(t,n[0],n[1],n[2],r)}};hi.matchCanvasSize=function(t){var e=this,r=e.data,i=e.findContainerClientCoords(),n=i[2],a=i[3],o=e.getPixelRatio(),s=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(o=s);var u=n*o,l=a*o,c;if(!(u===e.canvasWidth&&l===e.canvasHeight)){e.fontCaches=null;var d=r.canvasContainer;d.style.width=n+"px",d.style.height=a+"px";for(var f=0;f<e.CANVAS_LAYERS;f++)c=r.canvases[f],c.width=u,c.height=l,c.style.width=n+"px",c.style.height=a+"px";for(var f=0;f<e.BUFFER_COUNT;f++)c=r.bufferCanvases[f],c.width=u,c.height=l,c.style.width=n+"px",c.style.height=a+"px";e.textureMult=1,o<=1&&(c=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,c.width=u*e.textureMult,c.height=l*e.textureMult),e.canvasWidth=u,e.canvasHeight=l,e.pixelRatio=o}};hi.renderTo=function(t,e,r,i){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:i})};hi.clearCanvas=function(){var t=this,e=t.data;function r(i){i.clearRect(0,0,t.canvasWidth,t.canvasHeight)}r(e.contexts[t.NODE]),r(e.contexts[t.DRAG])};hi.render=function(t){var e=this;t=t||gT();var r=e.cy,i=t.forcedContext,n=t.drawAllLayers,a=t.drawOnlyNodeLayer,o=t.forcedZoom,s=t.forcedPan,u=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,l=e.data,c=l.canvasNeedsRedraw,d=e.textureOnViewport&&!i&&(e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming),f=t.motionBlur!==void 0?t.motionBlur:e.motionBlur,p=e.motionBlurPxRatio,h=r.hasCompoundNodes(),g=e.hoverData.draggingEles,v=!!(e.hoverData.selecting||e.touchData.selecting);f=f&&!i&&e.motionBlurEnabled&&!v;var m=f;i||(e.prevPxRatio!==u&&(e.invalidateContainerClientCoordsCache(),e.matchCanvasSize(e.container),e.redrawHint("eles",!0),e.redrawHint("drag",!0)),e.prevPxRatio=u),!i&&e.motionBlurTimeout&&clearTimeout(e.motionBlurTimeout),f&&(e.mbFrames==null&&(e.mbFrames=0),e.mbFrames++,e.mbFrames<3&&(m=!1),e.mbFrames>e.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!d&&(c[e.NODE]=!0,c[e.SELECT_BOX]=!0);var y=r.style(),b=r.zoom(),w=o!==void 0?o:b,T=r.pan(),x={x:T.x,y:T.y},_={zoom:b,pan:{x:T.x,y:T.y}},D=e.prevViewport,E=D===void 0||_.zoom!==D.zoom||_.pan.x!==D.pan.x||_.pan.y!==D.pan.y;!E&&!(g&&!h)&&(e.motionBlurPxRatio=1),s&&(x=s),w*=u,x.x*=u,x.y*=u;var M=e.getCachedZSortedEles();function k(se,q,X,J,ne){var we=se.globalCompositeOperation;se.globalCompositeOperation="destination-out",e.colorFillStyle(se,255,255,255,e.motionBlurTransparency),se.fillRect(q,X,J,ne),se.globalCompositeOperation=we}function I(se,q){var X,J,ne,we;!e.clearingMotionBlur&&(se===l.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||se===l.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(X={x:T.x*p,y:T.y*p},J=b*p,ne=e.canvasWidth*p,we=e.canvasHeight*p):(X=x,J=w,ne=e.canvasWidth,we=e.canvasHeight),se.setTransform(1,0,0,1,0,0),q==="motionBlur"?k(se,0,0,ne,we):!i&&(q===void 0||q)&&se.clearRect(0,0,ne,we),n||(se.translate(X.x,X.y),se.scale(J,J)),s&&se.translate(s.x,s.y),o&&se.scale(o,o)}if(d||(e.textureDrawLastFrame=!1),d){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var A=e.data.bufferContexts[e.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:u*e.textureMult});var _=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};_.mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}c[e.DRAG]=!1,c[e.NODE]=!1;var O=l.contexts[e.NODE],N=e.textureCache.texture,_=e.textureCache.viewport;O.setTransform(1,0,0,1,0,0),f?k(O,0,0,_.width,_.height):O.clearRect(0,0,_.width,_.height);var F=y.core("outside-texture-bg-color").value,P=y.core("outside-texture-bg-opacity").value;e.colorFillStyle(O,F[0],F[1],F[2],P),O.fillRect(0,0,_.width,_.height);var b=r.zoom();I(O,!1),O.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/u,_.height/_.zoom/u),O.drawImage(N,_.mpan.x,_.mpan.y,_.width/_.zoom/u,_.height/_.zoom/u)}else e.textureOnViewport&&!i&&(e.textureCache=null);var z=r.extent(),$=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),G=e.hideEdgesOnViewport&&$,V=[];if(V[e.NODE]=!c[e.NODE]&&f&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,V[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),V[e.DRAG]=!c[e.DRAG]&&f&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,V[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),c[e.NODE]||n||a||V[e.NODE]){var W=f&&!V[e.NODE]&&p!==1,O=i||(W?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:l.contexts[e.NODE]),ue=f&&!W?"motionBlur":void 0;I(O,ue),G?e.drawCachedNodes(O,M.nondrag,u,z):e.drawLayeredElements(O,M.nondrag,u,z),e.debug&&e.drawDebugPoints(O,M.nondrag),!n&&!f&&(c[e.NODE]=!1)}if(!a&&(c[e.DRAG]||n||V[e.DRAG])){var W=f&&!V[e.DRAG]&&p!==1,O=i||(W?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:l.contexts[e.DRAG]);I(O,f&&!W?"motionBlur":void 0),G?e.drawCachedNodes(O,M.drag,u,z):e.drawCachedElements(O,M.drag,u,z),e.debug&&e.drawDebugPoints(O,M.drag),!n&&!f&&(c[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,I),f&&p!==1){var he=l.contexts[e.NODE],le=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],me=l.contexts[e.DRAG],be=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],Se=function(q,X,J){q.setTransform(1,0,0,1,0,0),J||!m?q.clearRect(0,0,e.canvasWidth,e.canvasHeight):k(q,0,0,e.canvasWidth,e.canvasHeight);var ne=p;q.drawImage(X,0,0,e.canvasWidth*ne,e.canvasHeight*ne,0,0,e.canvasWidth,e.canvasHeight)};(c[e.NODE]||V[e.NODE])&&(Se(he,le,V[e.NODE]),c[e.NODE]=!1),(c[e.DRAG]||V[e.DRAG])&&(Se(me,be,V[e.DRAG]),c[e.DRAG]=!1)}e.prevViewport=_,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),f&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!d,e.mbFrames=0,c[e.NODE]=!0,c[e.DRAG]=!0,e.redraw()},dz)),i||r.emit("render")};var Dl;hi.drawSelectionRectangle=function(t,e){var r=this,i=r.cy,n=r.data,a=i.style(),o=t.drawOnlyNodeLayer,s=t.drawAllLayers,u=n.canvasNeedsRedraw,l=t.forcedContext;if(r.showFps||!o&&u[r.SELECT_BOX]&&!s){var c=l||n.contexts[r.SELECT_BOX];if(e(c),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var d=r.cy.zoom(),f=a.core("selection-box-border-width").value/d;c.lineWidth=f,c.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",c.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),f>0&&(c.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",c.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(n.bgActivePosistion&&!r.hoverData.selecting){var d=r.cy.zoom(),p=n.bgActivePosistion;c.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",c.beginPath(),c.arc(p.x,p.y,a.core("active-bg-size").pfValue/d,0,2*Math.PI),c.fill()}var h=r.lastRedrawTime;if(r.showFps&&h){h=Math.round(h);var g=Math.round(1e3/h),v="1 frame = "+h+" ms = "+g+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!Dl){var m=c.measureText(v);Dl=m.actualBoundingBoxAscent}c.fillText(v,0,Dl);var y=60;c.strokeRect(0,Dl+10,250,20),c.fillRect(0,Dl+10,250*Math.min(g/y,1),20)}s||(u[r.SELECT_BOX]=!1)}};function qx(t,e,r){var i=t.createShader(e);if(t.shaderSource(i,r),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(i));return i}function fz(t,e,r){var i=qx(t,t.VERTEX_SHADER,e),n=qx(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,i),t.attachShader(a,n),t.linkProgram(a),!t.getProgramParameter(a,t.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function hz(t,e,r){r===void 0&&(r=e);var i=t.makeOffscreenCanvas(e,r),n=i.context=i.getContext("2d");return i.clear=function(){return n.clearRect(0,0,i.width,i.height)},i.clear(),i}function O0(t){var e=t.pixelRatio,r=t.cy.zoom(),i=t.cy.pan();return{zoom:r*e,pan:{x:i.x*e,y:i.y*e}}}function pz(t){var e=t.pixelRatio,r=t.cy.zoom();return r*e}function vz(t,e,r,i,n){var a=i*r+e.x,o=n*r+e.y;return o=Math.round(t.canvasHeight-o),[a,o]}function mz(t,e){return e.picking?!0:t.pstyle("background-fill").value!=="solid"||t.pstyle("background-image").strValue!=="none"?!1:t.pstyle("border-width").value===0||t.pstyle("border-opacity").value===0?!0:t.pstyle("border-style").value==="solid"}function gz(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function No(t,e,r){var i=t[0]/255,n=t[1]/255,a=t[2]/255,o=e,s=r||new Array(4);return s[0]=i*o,s[1]=n*o,s[2]=a*o,s[3]=o,s}function ru(t,e){var r=e||new Array(4);return r[0]=(t>>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function yz(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function bz(t,e){var r=t.createTexture();return r.buffer=function(i){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function AS(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function OS(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function Cz(t,e,r,i,n,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*i,n);case t.INT:return new Int32Array(r.buffer,a*i,n)}}function wz(t,e,r,i){var n=AS(t,e),a=Sr(n,2),o=a[0],s=a[1],u=OS(t,s,i),l=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,u,t.STATIC_DRAW),s===t.FLOAT?t.vertexAttribPointer(r,o,s,!1,0,0):s===t.INT&&t.vertexAttribIPointer(r,o,s,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),l}function zn(t,e,r,i){var n=AS(t,r),a=Sr(n,3),o=a[0],s=a[1],u=a[2],l=OS(t,s,e*o),c=o*u,d=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,d),t.bufferData(t.ARRAY_BUFFER,e*c,t.DYNAMIC_DRAW),t.enableVertexAttribArray(i),s===t.FLOAT?t.vertexAttribPointer(i,o,s,!1,c,0):s===t.INT&&t.vertexAttribIPointer(i,o,s,c,0),t.vertexAttribDivisor(i,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var f=new Array(e),p=0;p<e;p++)f[p]=Cz(t,s,l,c,o,p);return d.dataArray=l,d.stride=c,d.size=o,d.getView=function(h){return f[h]},d.setPoint=function(h,g,v){var m=f[h];m[0]=g,m[1]=v},d.bufferSubData=function(h){t.bindBuffer(t.ARRAY_BUFFER,d),h?t.bufferSubData(t.ARRAY_BUFFER,0,l,0,h*o):t.bufferSubData(t.ARRAY_BUFFER,0,l)},d}function _z(t,e,r){for(var i=9,n=new Float32Array(e*i),a=new Array(e),o=0;o<e;o++){var s=o*i*4;a[o]=new Float32Array(n.buffer,s,i)}var u=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,n.byteLength,t.DYNAMIC_DRAW);for(var l=0;l<3;l++){var c=r+l;t.enableVertexAttribArray(c),t.vertexAttribPointer(c,3,t.FLOAT,!1,36,l*12),t.vertexAttribDivisor(c,1)}return t.bindBuffer(t.ARRAY_BUFFER,null),u.getMatrixView=function(d){return a[d]},u.setData=function(d,f){a[f].set(d,0)},u.bufferSubData=function(){t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferSubData(t.ARRAY_BUFFER,0,n)},u}function xz(t){var e=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,e);var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0),t.bindFramebuffer(t.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(i,n){t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,i,n,0,t.RGBA,t.UNSIGNED_BYTE,null)},e}var Wx=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function Fg(){var t=new Wx(9);return Wx!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function $x(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Tz(t,e,r){var i=e[0],n=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],d=e[8],f=r[0],p=r[1],h=r[2],g=r[3],v=r[4],m=r[5],y=r[6],b=r[7],w=r[8];return t[0]=f*i+p*o+h*l,t[1]=f*n+p*s+h*c,t[2]=f*a+p*u+h*d,t[3]=g*i+v*o+m*l,t[4]=g*n+v*s+m*c,t[5]=g*a+v*u+m*d,t[6]=y*i+b*o+w*l,t[7]=y*n+b*s+w*c,t[8]=y*a+b*u+w*d,t}function fh(t,e,r){var i=e[0],n=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],d=e[8],f=r[0],p=r[1];return t[0]=i,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=f*i+p*o+l,t[7]=f*n+p*s+c,t[8]=f*a+p*u+d,t}function Gx(t,e,r){var i=e[0],n=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],d=e[8],f=Math.sin(r),p=Math.cos(r);return t[0]=p*i+f*o,t[1]=p*n+f*s,t[2]=p*a+f*u,t[3]=p*o-f*i,t[4]=p*s-f*n,t[5]=p*u-f*a,t[6]=l,t[7]=c,t[8]=d,t}function n0(t,e,r){var i=r[0],n=r[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=n*e[3],t[4]=n*e[4],t[5]=n*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Sz(t,e,r){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}var Dz=(function(){function t(e,r,i,n){ro(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=e,this.texSize=r,this.texRows=i,this.texHeight=Math.floor(r/i),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=n(e,r,r),this.scratch=n(e,r,this.texHeight,"scratch")}return io(t,[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(r){var i=r.w,n=r.h,a=this.texHeight,o=this.texSize,s=a/n,u=i*s,l=n*s;return u>o&&(s=o/i,u=i*s,l=n*s),{scale:s,texW:u,texH:l}}},{key:"draw",value:function(r,i,n){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,s=this.texRows,u=this.texHeight,l=this.getScale(i),c=l.scale,d=l.texW,f=l.texH,p=function(b,w){if(n&&w){var T=w.context,x=b.x,_=b.row,D=x,E=u*_;T.save(),T.translate(D,E),T.scale(c,c),n(T,i),T.restore()}},h=[null,null],g=function(){p(a.freePointer,a.canvas),h[0]={x:a.freePointer.x,y:a.freePointer.row*u,w:d,h:f},h[1]={x:a.freePointer.x+d,y:a.freePointer.row*u,w:0,h:f},a.freePointer.x+=d,a.freePointer.x==o&&(a.freePointer.x=0,a.freePointer.row++)},v=function(){var b=a.scratch,w=a.canvas;b.clear(),p({x:0,row:0},b);var T=o-a.freePointer.x,x=d-T,_=u;{var D=a.freePointer.x,E=a.freePointer.row*u,M=T;w.context.drawImage(b,0,0,M,_,D,E,M,_),h[0]={x:D,y:E,w:M,h:f}}{var k=T,I=(a.freePointer.row+1)*u,A=x;w&&w.context.drawImage(b,k,0,A,_,0,I,A,_),h[1]={x:0,y:I,w:A,h:f}}a.freePointer.x=x,a.freePointer.row++},m=function(){a.freePointer.x=0,a.freePointer.row++};if(this.freePointer.x+d<=o)g();else{if(this.freePointer.row>=s-1)return!1;this.freePointer.x===o?(m(),g()):this.enableWrapping?v():(m(),g())}return this.keyToLocation.set(r,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var i=this.texSize,n=this.texRows,a=this.getScale(r),o=a.texW;return this.freePointer.x+o>i?this.freePointer.row<n-1:!0}},{key:"bufferIfNeeded",value:function(r){this.texture||(this.texture=bz(r,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))}},{key:"dispose",value:function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0}}])})(),Ez=(function(){function t(e,r,i,n){ro(this,t),this.r=e,this.texSize=r,this.texRows=i,this.createTextureCanvas=n,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}return io(t,[{key:"getKeys",value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:"_createAtlas",value:function(){var r=this.r,i=this.texSize,n=this.texRows,a=this.createTextureCanvas;return new Dz(r,i,n,a)}},{key:"_getScratchCanvas",value:function(){if(!this.scratch){var r=this.r,i=this.texSize,n=this.texRows,a=this.createTextureCanvas,o=Math.floor(i/n);this.scratch=a(r,i,o,"scratch")}return this.scratch}},{key:"draw",value:function(r,i,n){var a=this.styleKeyToAtlas.get(r);return a||(a=this.atlases[this.atlases.length-1],(!a||!a.canFit(i))&&(a&&a.lock(),a=this._createAtlas(),this.atlases.push(a)),a.draw(r,i,n),this.styleKeyToAtlas.set(r,a)),a}},{key:"getAtlas",value:function(r){return this.styleKeyToAtlas.get(r)}},{key:"hasAtlas",value:function(r){return this.styleKeyToAtlas.has(r)}},{key:"markKeyForGC",value:function(r){this.markedKeys.add(r)}},{key:"gc",value:function(){var r=this,i=this.markedKeys;if(i.size===0){console.log("nothing to garbage collect");return}var n=[],a=new Map,o=null,s=ki(this.atlases),u;try{var l=function(){var d=u.value,f=d.getKeys(),p=kz(i,f);if(p.size===0)return n.push(d),f.forEach(function(T){return a.set(T,d)}),1;o||(o=r._createAtlas(),n.push(o));var h=ki(f),g;try{for(h.s();!(g=h.n()).done;){var v=g.value;if(!p.has(v)){var m=d.getOffsets(v),y=Sr(m,2),b=y[0],w=y[1];o.canFit({w:b.w+w.w,h:b.h})||(o.lock(),o=r._createAtlas(),n.push(o)),d.canvas&&(r._copyTextureToNewAtlas(v,d,o),a.set(v,o))}}}catch(T){h.e(T)}finally{h.f()}d.dispose()};for(s.s();!(u=s.n()).done;)l()}catch(c){s.e(c)}finally{s.f()}this.atlases=n,this.styleKeyToAtlas=a,this.markedKeys=new Set}},{key:"_copyTextureToNewAtlas",value:function(r,i,n){var a=i.getOffsets(r),o=Sr(a,2),s=o[0],u=o[1];if(u.w===0)n.draw(r,s,function(f){f.drawImage(i.canvas,s.x,s.y,s.w,s.h,0,0,s.w,s.h)});else{var l=this._getScratchCanvas();l.clear(),l.context.drawImage(i.canvas,s.x,s.y,s.w,s.h,0,0,s.w,s.h),l.context.drawImage(i.canvas,u.x,u.y,u.w,u.h,s.w,0,u.w,u.h);var c=s.w+u.w,d=s.h;n.draw(r,{w:c,h:d},function(f){f.drawImage(l,0,0,c,d,0,0,c,d)})}}},{key:"getCounts",value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])})();function kz(t,e){return t.intersection?t.intersection(e):new Set(hh(t).filter(function(r){return e.has(r)}))}var Mz=(function(){function t(e,r){ro(this,t),this.r=e,this.globalOptions=r,this.atlasSize=r.webglTexSize,this.maxAtlasesPerBatch=r.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}return io(t,[{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"addAtlasCollection",value:function(r,i){var n=this.globalOptions,a=n.webglTexSize,o=n.createTextureCanvas,s=i.texRows,u=this._cacheScratchCanvas(o),l=new Ez(this.r,a,s,u);this.collections.set(r,l)}},{key:"addRenderType",value:function(r,i){var n=i.collection;if(!this.collections.has(n))throw new Error("invalid atlas collection name '".concat(n,"'"));var a=this.collections.get(n),o=$e({type:r,atlasCollection:a},i);this.renderTypes.set(r,o)}},{key:"getRenderTypeOpts",value:function(r){return this.renderTypes.get(r)}},{key:"getAtlasCollection",value:function(r){return this.collections.get(r)}},{key:"_cacheScratchCanvas",value:function(r){var i=-1,n=-1,a=null;return function(o,s,u,l){return l?((!a||s!=i||u!=n)&&(i=s,n=u,a=r(o,s,u)),a):r(o,s,u)}}},{key:"_key",value:function(r,i){return"".concat(r,"-").concat(i)}},{key:"invalidate",value:function(r){var i=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.forceRedraw,o=a===void 0?!1:a,s=n.filterEle,u=s===void 0?function(){return!0}:s,l=n.filterType,c=l===void 0?function(){return!0}:l,d=!1,f=!1,p=ki(r),h;try{for(p.s();!(h=p.n()).done;){var g=h.value;if(u(g)){var v=ki(this.renderTypes.values()),m;try{var y=function(){var w=m.value,T=w.type;if(c(T)){var x=i.collections.get(w.collection),_=w.getKey(g),D=Array.isArray(_)?_:[_];if(o)D.forEach(function(I){return x.markKeyForGC(I)}),f=!0;else{var E=w.getID?w.getID(g):g.id(),M=i._key(T,E),k=i.typeAndIdToKey.get(M);k!==void 0&&!gz(D,k)&&(d=!0,i.typeAndIdToKey.delete(M),k.forEach(function(I){return x.markKeyForGC(I)}))}}};for(v.s();!(m=v.n()).done;)y()}catch(b){v.e(b)}finally{v.f()}}}}catch(b){p.e(b)}finally{p.f()}return f&&(this.gc(),d=!1),d}},{key:"gc",value:function(){var r=ki(this.collections.values()),i;try{for(r.s();!(i=r.n()).done;){var n=i.value;n.gc()}}catch(a){r.e(a)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,i,n,a){var o=this.renderTypes.get(i),s=this.collections.get(o.collection),u=!1,l=s.draw(a,n,function(f){o.drawClipped?(f.save(),f.beginPath(),f.rect(0,0,n.w,n.h),f.clip(),o.drawElement(f,r,n,!0,!0),f.restore()):o.drawElement(f,r,n,!0,!0),u=!0});if(u){var c=o.getID?o.getID(r):r.id(),d=this._key(i,c);this.typeAndIdToKey.has(d)?this.typeAndIdToKey.get(d).push(a):this.typeAndIdToKey.set(d,[a])}return l}},{key:"getAtlasInfo",value:function(r,i){var n=this,a=this.renderTypes.get(i),o=a.getKey(r),s=Array.isArray(o)?o:[o];return s.map(function(u){var l=a.getBoundingBox(r,u),c=n.getOrCreateAtlas(r,i,l,u),d=c.getOffsets(u),f=Sr(d,2),p=f[0],h=f[1];return{atlas:c,tex:p,tex1:p,tex2:h,bb:l}})}},{key:"getDebugInfo",value:function(){var r=[],i=ki(this.collections),n;try{for(i.s();!(n=i.n()).done;){var a=Sr(n.value,2),o=a[0],s=a[1],u=s.getCounts(),l=u.keyCount,c=u.atlasCount;r.push({type:o,keyCount:l,atlasCount:c})}}catch(d){i.e(d)}finally{i.f()}return r}}])})(),Iz=(function(){function t(e){ro(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return io(t,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,i){return i})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0}},{key:"getAtlasIndexForBatch",value:function(r){var i=this.batchAtlases.indexOf(r);if(i<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),i=this.batchAtlases.length-1}return i}}])})(),Az=`
|
|
121
|
+
float circleSD(vec2 p, float r) {
|
|
122
|
+
return distance(vec2(0), p) - r; // signed distance
|
|
123
|
+
}
|
|
124
|
+
`,Oz=`
|
|
125
|
+
float rectangleSD(vec2 p, vec2 b) {
|
|
126
|
+
vec2 d = abs(p)-b;
|
|
127
|
+
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
|
|
128
|
+
}
|
|
129
|
+
`,Rz=`
|
|
130
|
+
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
|
|
131
|
+
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
|
|
132
|
+
cr.x = (p.y > 0.0) ? cr.x : cr.y;
|
|
133
|
+
vec2 q = abs(p) - b + cr.x;
|
|
134
|
+
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
|
|
135
|
+
}
|
|
136
|
+
`,Pz=`
|
|
137
|
+
float ellipseSD(vec2 p, vec2 ab) {
|
|
138
|
+
p = abs( p ); // symmetry
|
|
139
|
+
|
|
140
|
+
// find root with Newton solver
|
|
141
|
+
vec2 q = ab*(p-ab);
|
|
142
|
+
float w = (q.x<q.y)? 1.570796327 : 0.0;
|
|
143
|
+
for( int i=0; i<5; i++ ) {
|
|
144
|
+
vec2 cs = vec2(cos(w),sin(w));
|
|
145
|
+
vec2 u = ab*vec2( cs.x,cs.y);
|
|
146
|
+
vec2 v = ab*vec2(-cs.y,cs.x);
|
|
147
|
+
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// compute final point and distance
|
|
151
|
+
float d = length(p-ab*vec2(cos(w),sin(w)));
|
|
152
|
+
|
|
153
|
+
// return signed distance
|
|
154
|
+
return (dot(p/ab,p/ab)>1.0) ? d : -d;
|
|
155
|
+
}
|
|
156
|
+
`,Pl={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Sh={IGNORE:1,USE_BB:2},Bg=0,Yx=1,Kx=2,Lg=3,iu=4,th=5,El=6,kl=7,Nz=(function(){function t(e,r,i){ro(this,t),this.r=e,this.gl=r,this.maxInstances=i.webglBatchSize,this.atlasSize=i.webglTexSize,this.bgColor=i.bgColor,this.debug=i.webglDebug,this.batchDebugInfo=[],i.enableWrapping=!0,i.createTextureCanvas=hz,this.atlasManager=new Mz(e,i),this.batchManager=new Iz(i),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Pl.SCREEN),this.pickingProgram=this._createShaderProgram(Pl.PICKING),this.vao=this._createVAO()}return io(t,[{key:"addAtlasCollection",value:function(r,i){this.atlasManager.addAtlasCollection(r,i)}},{key:"addTextureAtlasRenderType",value:function(r,i){this.atlasManager.addRenderType(r,i)}},{key:"addSimpleShapeRenderType",value:function(r,i){this.simpleShapeOptions.set(r,i)}},{key:"invalidate",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.type,a=this.atlasManager;return n?a.invalidate(r,{filterType:function(s){return s===n},forceRedraw:!0}):a.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var i=this.gl,n=`#version 300 es
|
|
157
|
+
precision highp float;
|
|
158
|
+
|
|
159
|
+
uniform mat3 uPanZoomMatrix;
|
|
160
|
+
uniform int uAtlasSize;
|
|
161
|
+
|
|
162
|
+
// instanced
|
|
163
|
+
in vec2 aPosition; // a vertex from the unit square
|
|
164
|
+
|
|
165
|
+
in mat3 aTransform; // used to transform verticies, eg into a bounding box
|
|
166
|
+
in int aVertType; // the type of thing we are rendering
|
|
167
|
+
|
|
168
|
+
// the z-index that is output when using picking mode
|
|
169
|
+
in vec4 aIndex;
|
|
170
|
+
|
|
171
|
+
// For textures
|
|
172
|
+
in int aAtlasId; // which shader unit/atlas to use
|
|
173
|
+
in vec4 aTex; // x/y/w/h of texture in atlas
|
|
174
|
+
|
|
175
|
+
// for edges
|
|
176
|
+
in vec4 aPointAPointB;
|
|
177
|
+
in vec4 aPointCPointD;
|
|
178
|
+
in vec2 aLineWidth; // also used for node border width
|
|
179
|
+
|
|
180
|
+
// simple shapes
|
|
181
|
+
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
|
|
182
|
+
in vec4 aColor; // also used for edges
|
|
183
|
+
in vec4 aBorderColor; // aLineWidth is used for border width
|
|
184
|
+
|
|
185
|
+
// output values passed to the fragment shader
|
|
186
|
+
out vec2 vTexCoord;
|
|
187
|
+
out vec4 vColor;
|
|
188
|
+
out vec2 vPosition;
|
|
189
|
+
// flat values are not interpolated
|
|
190
|
+
flat out int vAtlasId;
|
|
191
|
+
flat out int vVertType;
|
|
192
|
+
flat out vec2 vTopRight;
|
|
193
|
+
flat out vec2 vBotLeft;
|
|
194
|
+
flat out vec4 vCornerRadius;
|
|
195
|
+
flat out vec4 vBorderColor;
|
|
196
|
+
flat out vec2 vBorderWidth;
|
|
197
|
+
flat out vec4 vIndex;
|
|
198
|
+
|
|
199
|
+
void main(void) {
|
|
200
|
+
int vid = gl_VertexID;
|
|
201
|
+
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
|
|
202
|
+
|
|
203
|
+
if(aVertType == `.concat(Bg,`) {
|
|
204
|
+
float texX = aTex.x; // texture coordinates
|
|
205
|
+
float texY = aTex.y;
|
|
206
|
+
float texW = aTex.z;
|
|
207
|
+
float texH = aTex.w;
|
|
208
|
+
|
|
209
|
+
if(vid == 1 || vid == 2 || vid == 4) {
|
|
210
|
+
texX += texW;
|
|
211
|
+
}
|
|
212
|
+
if(vid == 2 || vid == 4 || vid == 5) {
|
|
213
|
+
texY += texH;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
float d = float(uAtlasSize);
|
|
217
|
+
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
|
|
218
|
+
|
|
219
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
220
|
+
}
|
|
221
|
+
else if(aVertType == `).concat(iu," || aVertType == ").concat(kl,`
|
|
222
|
+
|| aVertType == `).concat(th," || aVertType == ").concat(El,`) { // simple shapes
|
|
223
|
+
|
|
224
|
+
// the bounding box is needed by the fragment shader
|
|
225
|
+
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
|
|
226
|
+
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
|
|
227
|
+
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
|
|
228
|
+
|
|
229
|
+
// calculations are done in the fragment shader, just pass these along
|
|
230
|
+
vColor = aColor;
|
|
231
|
+
vCornerRadius = aCornerRadius;
|
|
232
|
+
vBorderColor = aBorderColor;
|
|
233
|
+
vBorderWidth = aLineWidth;
|
|
234
|
+
|
|
235
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
236
|
+
}
|
|
237
|
+
else if(aVertType == `).concat(Yx,`) {
|
|
238
|
+
vec2 source = aPointAPointB.xy;
|
|
239
|
+
vec2 target = aPointAPointB.zw;
|
|
240
|
+
|
|
241
|
+
// adjust the geometry so that the line is centered on the edge
|
|
242
|
+
position.y = position.y - 0.5;
|
|
243
|
+
|
|
244
|
+
// stretch the unit square into a long skinny rectangle
|
|
245
|
+
vec2 xBasis = target - source;
|
|
246
|
+
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
|
|
247
|
+
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
|
|
248
|
+
|
|
249
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
|
|
250
|
+
vColor = aColor;
|
|
251
|
+
}
|
|
252
|
+
else if(aVertType == `).concat(Kx,`) {
|
|
253
|
+
vec2 pointA = aPointAPointB.xy;
|
|
254
|
+
vec2 pointB = aPointAPointB.zw;
|
|
255
|
+
vec2 pointC = aPointCPointD.xy;
|
|
256
|
+
vec2 pointD = aPointCPointD.zw;
|
|
257
|
+
|
|
258
|
+
// adjust the geometry so that the line is centered on the edge
|
|
259
|
+
position.y = position.y - 0.5;
|
|
260
|
+
|
|
261
|
+
vec2 p0, p1, p2, pos;
|
|
262
|
+
if(position.x == 0.0) { // The left side of the unit square
|
|
263
|
+
p0 = pointA;
|
|
264
|
+
p1 = pointB;
|
|
265
|
+
p2 = pointC;
|
|
266
|
+
pos = position;
|
|
267
|
+
} else { // The right side of the unit square, use same approach but flip the geometry upside down
|
|
268
|
+
p0 = pointD;
|
|
269
|
+
p1 = pointC;
|
|
270
|
+
p2 = pointB;
|
|
271
|
+
pos = vec2(0.0, -position.y);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
vec2 p01 = p1 - p0;
|
|
275
|
+
vec2 p12 = p2 - p1;
|
|
276
|
+
vec2 p21 = p1 - p2;
|
|
277
|
+
|
|
278
|
+
// Find the normal vector.
|
|
279
|
+
vec2 tangent = normalize(normalize(p12) + normalize(p01));
|
|
280
|
+
vec2 normal = vec2(-tangent.y, tangent.x);
|
|
281
|
+
|
|
282
|
+
// Find the vector perpendicular to p0 -> p1.
|
|
283
|
+
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
|
|
284
|
+
|
|
285
|
+
// Determine the bend direction.
|
|
286
|
+
float sigma = sign(dot(p01 + p21, normal));
|
|
287
|
+
float width = aLineWidth[0];
|
|
288
|
+
|
|
289
|
+
if(sign(pos.y) == -sigma) {
|
|
290
|
+
// This is an intersecting vertex. Adjust the position so that there's no overlap.
|
|
291
|
+
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
|
|
292
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
|
293
|
+
} else {
|
|
294
|
+
// This is a non-intersecting vertex. Treat it like a mitre join.
|
|
295
|
+
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
|
|
296
|
+
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
vColor = aColor;
|
|
300
|
+
}
|
|
301
|
+
else if(aVertType == `).concat(Lg,` && vid < 3) {
|
|
302
|
+
// massage the first triangle into an edge arrow
|
|
303
|
+
if(vid == 0)
|
|
304
|
+
position = vec2(-0.15, -0.3);
|
|
305
|
+
if(vid == 1)
|
|
306
|
+
position = vec2( 0.0, 0.0);
|
|
307
|
+
if(vid == 2)
|
|
308
|
+
position = vec2( 0.15, -0.3);
|
|
309
|
+
|
|
310
|
+
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
311
|
+
vColor = aColor;
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
vAtlasId = aAtlasId;
|
|
318
|
+
vVertType = aVertType;
|
|
319
|
+
vIndex = aIndex;
|
|
320
|
+
}
|
|
321
|
+
`),a=this.batchManager.getIndexArray(),o=`#version 300 es
|
|
322
|
+
precision highp float;
|
|
323
|
+
|
|
324
|
+
// declare texture unit for each texture atlas in the batch
|
|
325
|
+
`.concat(a.map(function(l){return"uniform sampler2D uTexture".concat(l,";")}).join(`
|
|
326
|
+
`),`
|
|
327
|
+
|
|
328
|
+
uniform vec4 uBGColor;
|
|
329
|
+
uniform float uZoom;
|
|
330
|
+
|
|
331
|
+
in vec2 vTexCoord;
|
|
332
|
+
in vec4 vColor;
|
|
333
|
+
in vec2 vPosition; // model coordinates
|
|
334
|
+
|
|
335
|
+
flat in int vAtlasId;
|
|
336
|
+
flat in vec4 vIndex;
|
|
337
|
+
flat in int vVertType;
|
|
338
|
+
flat in vec2 vTopRight;
|
|
339
|
+
flat in vec2 vBotLeft;
|
|
340
|
+
flat in vec4 vCornerRadius;
|
|
341
|
+
flat in vec4 vBorderColor;
|
|
342
|
+
flat in vec2 vBorderWidth;
|
|
343
|
+
|
|
344
|
+
out vec4 outColor;
|
|
345
|
+
|
|
346
|
+
`).concat(Az,`
|
|
347
|
+
`).concat(Oz,`
|
|
348
|
+
`).concat(Rz,`
|
|
349
|
+
`).concat(Pz,`
|
|
350
|
+
|
|
351
|
+
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
|
|
352
|
+
return vec4(
|
|
353
|
+
top.rgb + (bot.rgb * (1.0 - top.a)),
|
|
354
|
+
top.a + (bot.a * (1.0 - top.a))
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
|
|
359
|
+
// scale to the zoom level so that borders don't look blurry when zoomed in
|
|
360
|
+
// note 1.5 is an aribitrary value chosen because it looks good
|
|
361
|
+
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
void main(void) {
|
|
365
|
+
if(vVertType == `).concat(Bg,`) {
|
|
366
|
+
// look up the texel from the texture unit
|
|
367
|
+
`).concat(a.map(function(l){return"if(vAtlasId == ".concat(l,") outColor = texture(uTexture").concat(l,", vTexCoord);")}).join(`
|
|
368
|
+
else `),`
|
|
369
|
+
}
|
|
370
|
+
else if(vVertType == `).concat(Lg,`) {
|
|
371
|
+
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
|
|
372
|
+
outColor = blend(vColor, uBGColor);
|
|
373
|
+
outColor.a = 1.0; // make opaque, masks out line under arrow
|
|
374
|
+
}
|
|
375
|
+
else if(vVertType == `).concat(iu,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
|
|
376
|
+
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
|
|
377
|
+
}
|
|
378
|
+
else if(vVertType == `).concat(iu," || vVertType == ").concat(kl,`
|
|
379
|
+
|| vVertType == `).concat(th," || vVertType == ").concat(El,`) { // use SDF
|
|
380
|
+
|
|
381
|
+
float outerBorder = vBorderWidth[0];
|
|
382
|
+
float innerBorder = vBorderWidth[1];
|
|
383
|
+
float borderPadding = outerBorder * 2.0;
|
|
384
|
+
float w = vTopRight.x - vBotLeft.x - borderPadding;
|
|
385
|
+
float h = vTopRight.y - vBotLeft.y - borderPadding;
|
|
386
|
+
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
|
|
387
|
+
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
|
|
388
|
+
|
|
389
|
+
float d; // signed distance
|
|
390
|
+
if(vVertType == `).concat(iu,`) {
|
|
391
|
+
d = rectangleSD(p, b);
|
|
392
|
+
} else if(vVertType == `).concat(kl,` && w == h) {
|
|
393
|
+
d = circleSD(p, b.x); // faster than ellipse
|
|
394
|
+
} else if(vVertType == `).concat(kl,`) {
|
|
395
|
+
d = ellipseSD(p, b);
|
|
396
|
+
} else {
|
|
397
|
+
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
|
|
401
|
+
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
|
|
402
|
+
if(d > 0.0) {
|
|
403
|
+
if(d > outerBorder) {
|
|
404
|
+
discard;
|
|
405
|
+
} else {
|
|
406
|
+
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
|
|
407
|
+
}
|
|
408
|
+
} else {
|
|
409
|
+
if(d > innerBorder) {
|
|
410
|
+
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
|
|
411
|
+
vec4 innerBorderColor = blend(vBorderColor, vColor);
|
|
412
|
+
outColor = distInterp(innerBorderColor, outerColor, d);
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
vec4 outerColor;
|
|
416
|
+
if(innerBorder == 0.0 && outerBorder == 0.0) {
|
|
417
|
+
outerColor = vec4(0);
|
|
418
|
+
} else if(innerBorder == 0.0) {
|
|
419
|
+
outerColor = vBorderColor;
|
|
420
|
+
} else {
|
|
421
|
+
outerColor = blend(vBorderColor, vColor);
|
|
422
|
+
}
|
|
423
|
+
outColor = distInterp(vColor, outerColor, d - innerBorder);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
outColor = vColor;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
`).concat(r.picking?`if(outColor.a == 0.0) discard;
|
|
432
|
+
else outColor = vIndex;`:"",`
|
|
433
|
+
}
|
|
434
|
+
`),s=fz(i,n,o);s.aPosition=i.getAttribLocation(s,"aPosition"),s.aIndex=i.getAttribLocation(s,"aIndex"),s.aVertType=i.getAttribLocation(s,"aVertType"),s.aTransform=i.getAttribLocation(s,"aTransform"),s.aAtlasId=i.getAttribLocation(s,"aAtlasId"),s.aTex=i.getAttribLocation(s,"aTex"),s.aPointAPointB=i.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=i.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=i.getAttribLocation(s,"aLineWidth"),s.aColor=i.getAttribLocation(s,"aColor"),s.aCornerRadius=i.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=i.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=i.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=i.getUniformLocation(s,"uAtlasSize"),s.uBGColor=i.getUniformLocation(s,"uBGColor"),s.uZoom=i.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)s.uTextures.push(i.getUniformLocation(s,"uTexture".concat(u)));return s}},{key:"_createVAO",value:function(){var r=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=r.length/2;var i=this.maxInstances,n=this.gl,a=this.program,o=n.createVertexArray();return n.bindVertexArray(o),wz(n,"vec2",a.aPosition,r),this.transformBuffer=_z(n,i,a.aTransform),this.indexBuffer=zn(n,i,"vec4",a.aIndex),this.vertTypeBuffer=zn(n,i,"int",a.aVertType),this.atlasIdBuffer=zn(n,i,"int",a.aAtlasId),this.texBuffer=zn(n,i,"vec4",a.aTex),this.pointAPointBBuffer=zn(n,i,"vec4",a.aPointAPointB),this.pointCPointDBuffer=zn(n,i,"vec4",a.aPointCPointD),this.lineWidthBuffer=zn(n,i,"vec2",a.aLineWidth),this.colorBuffer=zn(n,i,"vec4",a.aColor),this.cornerRadiusBuffer=zn(n,i,"vec4",a.aCornerRadius),this.borderColorBuffer=zn(n,i,"vec4",a.aBorderColor),n.bindVertexArray(null),o}},{key:"buffers",get:function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(i){return qa(i,"Buffer")}).map(function(i){return r[i]})),this._buffers}},{key:"startFrame",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pl.SCREEN;this.panZoomMatrix=r,this.renderTarget=i,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,i){return r.visible()?i&&i.isVisible?i.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,i,n){var a=this.atlasManager,o=this.batchManager,s=a.getRenderTypeOpts(n);if(this._isVisible(r,s)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&s.getTexPickingMode){var u=s.getTexPickingMode(r);if(u===Sh.IGNORE)return;if(u==Sh.USE_BB){this.drawPickingRectangle(r,i,n);return}}var l=a.getAtlasInfo(r,n),c=ki(l),d;try{for(c.s();!(d=c.n()).done;){var f=d.value,p=f.atlas,h=f.tex1,g=f.tex2;o.canAddToCurrentBatch(p)||this.endBatch();for(var v=o.getAtlasIndexForBatch(p),m=0,y=[[h,!0],[g,!1]];m<y.length;m++){var b=Sr(y[m],2),w=b[0],T=b[1];if(w.w!=0){var x=this.instanceCount;this.vertTypeBuffer.getView(x)[0]=Bg;var _=this.indexBuffer.getView(x);ru(i,_);var D=this.atlasIdBuffer.getView(x);D[0]=v;var E=this.texBuffer.getView(x);E[0]=w.x,E[1]=w.y,E[2]=w.w,E[3]=w.h;var M=this.transformBuffer.getMatrixView(x);this.setTransformMatrix(r,M,s,f,T),this.instanceCount++,T||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(k){c.e(k)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(r,i,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(n.shapeProps&&n.shapeProps.padding&&(s=r.pstyle(n.shapeProps.padding).pfValue),a){var u=a.bb,l=a.tex1,c=a.tex2,d=l.w/(l.w+c.w);o||(d=1-d);var f=this._getAdjustedBB(u,s,o,d);this._applyTransformMatrix(i,f,n,r)}else{var p=n.getBoundingBox(r),h=this._getAdjustedBB(p,s,!0,1);this._applyTransformMatrix(i,h,n,r)}}},{key:"_applyTransformMatrix",value:function(r,i,n,a){var o,s;$x(r);var u=n.getRotation?n.getRotation(a):0;if(u!==0){var l=n.getRotationPoint(a),c=l.x,d=l.y;fh(r,r,[c,d]),Gx(r,r,u);var f=n.getRotationOffset(a);o=f.x+(i.xOffset||0),s=f.y+(i.yOffset||0)}else o=i.x1,s=i.y1;fh(r,r,[o,s]),n0(r,r,[i.w,i.h])}},{key:"_getAdjustedBB",value:function(r,i,n,a){var o=r.x1,s=r.y1,u=r.w,l=r.h,c=r.yOffset;i&&(o-=i,s-=i,u+=2*i,l+=2*i);var d=0,f=u*a;return n&&a<1?u=f:!n&&a<1&&(d=u-f,o+=d,u=f),{x1:o,y1:s,w:u,h:l,xOffset:d,yOffset:c}}},{key:"drawPickingRectangle",value:function(r,i,n){var a=this.atlasManager.getRenderTypeOpts(n),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=iu;var s=this.indexBuffer.getView(o);ru(i,s);var u=this.colorBuffer.getView(o);No([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(r,l,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,i,n){var a=this.simpleShapeOptions.get(n);if(this._isVisible(r,a)){var o=a.shapeProps,s=this._getVertTypeForShape(r,o.shape);if(s===void 0||a.isSimple&&!a.isSimple(r,this.renderTarget)){this.drawTexture(r,i,n);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=s,s===th||s===El){var l=a.getBoundingBox(r),c=this._getCornerRadius(r,o.radius,l),d=this.cornerRadiusBuffer.getView(u);d[0]=c,d[1]=c,d[2]=c,d[3]=c,s===El&&(d[0]=0,d[2]=0)}var f=this.indexBuffer.getView(u);ru(i,f);var p=this.renderTarget.picking?1:n==="node-body"?r.effectiveOpacity():1,h=this.renderTarget.picking?1:r.pstyle(o.opacity).value*p,g=r.pstyle(o.color).value,v=this.colorBuffer.getView(u);No(g,h,v);var m=this.lineWidthBuffer.getView(u);if(m[0]=0,m[1]=0,o.border){var y=r.pstyle("border-width").value;if(y>0){var b=r.pstyle("border-color").value,w=p*r.pstyle("border-opacity").value,T=this.borderColorBuffer.getView(u);No(b,w,T);var x=r.pstyle("border-position").value;if(x==="inside")m[0]=0,m[1]=-y;else if(x==="outside")m[0]=y,m[1]=0;else{var _=y/2;m[0]=_,m[1]=-_}}}var D=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(r,D,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(r,i){var n=r.pstyle(i).value;switch(n){case"rectangle":return iu;case"ellipse":return kl;case"roundrectangle":case"round-rectangle":return th;case"bottom-round-rectangle":return El;default:return}}},{key:"_getCornerRadius",value:function(r,i,n){var a=n.w,o=n.h;if(r.pstyle(i).value==="auto")return Xa(a,o);var s=r.pstyle(i).pfValue,u=a/2,l=o/2;return Math.min(s,l,u)}},{key:"drawEdgeArrow",value:function(r,i,n){if(r.visible()){var a=r._private.rscratch,o,s,u;if(n==="source"?(o=a.arrowStartX,s=a.arrowStartY,u=a.srcArrowAngle):(o=a.arrowEndX,s=a.arrowEndY,u=a.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(s)||s==null||isNaN(u)||u==null)){var l=r.pstyle(n+"-arrow-shape").value;if(l!=="none"){var c=r.pstyle(n+"-arrow-color").value,d=r.pstyle("opacity").value,f=r.pstyle("line-opacity").value,p=d*f,h=r.pstyle("width").pfValue,g=r.pstyle("arrow-scale").value,v=this.r.getArrowWidth(h,g),m=this.instanceCount,y=this.transformBuffer.getMatrixView(m);$x(y),fh(y,y,[o,s]),n0(y,y,[v,v]),Gx(y,y,u),this.vertTypeBuffer.getView(m)[0]=Lg;var b=this.indexBuffer.getView(m);ru(i,b);var w=this.colorBuffer.getView(m);No(c,p,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,i){if(r.visible()){var n=this._getEdgePoints(r);if(n){var a=r.pstyle("opacity").value,o=r.pstyle("line-opacity").value,s=r.pstyle("width").pfValue,u=r.pstyle("line-color").value,l=a*o;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var c=this.instanceCount;this.vertTypeBuffer.getView(c)[0]=Yx;var d=this.indexBuffer.getView(c);ru(i,d);var f=this.colorBuffer.getView(c);No(u,l,f);var p=this.lineWidthBuffer.getView(c);p[0]=s;var h=this.pointAPointBBuffer.getView(c);h[0]=n[0],h[1]=n[1],h[2]=n[2],h[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var g=0;g<n.length-2;g+=2){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=Kx;var m=this.indexBuffer.getView(v);ru(i,m);var y=this.colorBuffer.getView(v);No(u,l,y);var b=this.lineWidthBuffer.getView(v);b[0]=s;var w=n[g-2],T=n[g-1],x=n[g],_=n[g+1],D=n[g+2],E=n[g+3],M=n[g+4],k=n[g+5];g==0&&(w=2*x-D+.001,T=2*_-E+.001),g==n.length-4&&(M=2*D-x+.001,k=2*E-_+.001);var I=this.pointAPointBBuffer.getView(v);I[0]=w,I[1]=T,I[2]=x,I[3]=_;var A=this.pointCPointDBuffer.getView(v);A[0]=D,A[1]=E,A[2]=M,A[3]=k,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(r){var i=r._private.rscratch;return!(i.badLine||i.allpts==null||isNaN(i.allpts[0]))}},{key:"_getEdgePoints",value:function(r){var i=r._private.rscratch;if(this._isValidEdge(r)){var n=i.allpts;if(n.length==4)return n;var a=this._getNumSegments(r);return this._getCurveSegmentPoints(n,a)}}},{key:"_getNumSegments",value:function(r){var i=15;return Math.min(Math.max(i,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(r,i){if(r.length==4)return r;for(var n=Array((i+1)*2),a=0;a<=i;a++)if(a==0)n[0]=r[0],n[1]=r[1];else if(a==i)n[a*2]=r[r.length-2],n[a*2+1]=r[r.length-1];else{var o=a/i;this._setCurvePoint(r,o,n,a*2)}return n}},{key:"_setCurvePoint",value:function(r,i,n,a){if(r.length<=2)n[a]=r[0],n[a+1]=r[1];else{for(var o=Array(r.length-2),s=0;s<o.length;s+=2){var u=(1-i)*r[s]+i*r[s+2],l=(1-i)*r[s+1]+i*r[s+3];o[s]=u,o[s+1]=l}return this._setCurvePoint(o,i,n,a)}}},{key:"endBatch",value:function(){var r=this.gl,i=this.vao,n=this.vertexCount,a=this.instanceCount;if(a!==0){var o=this.renderTarget.picking?this.pickingProgram:this.program;r.useProgram(o),r.bindVertexArray(i);var s=ki(this.buffers),u;try{for(s.s();!(u=s.n()).done;){var l=u.value;l.bufferSubData(a)}}catch(h){s.e(h)}finally{s.f()}for(var c=this.batchManager.getAtlases(),d=0;d<c.length;d++)c[d].bufferIfNeeded(r);for(var f=0;f<c.length;f++)r.activeTexture(r.TEXTURE0+f),r.bindTexture(r.TEXTURE_2D,c[f].texture),r.uniform1i(o.uTextures[f],f);r.uniform1f(o.uZoom,pz(this.r)),r.uniformMatrix3fv(o.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(o.uAtlasSize,this.batchManager.getAtlasSize());var p=No(this.bgColor,1);r.uniform4fv(o.uBGColor,p),r.drawArraysInstanced(r.TRIANGLES,0,n,a),r.bindVertexArray(null),r.bindTexture(r.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:a,atlasCount:c.length}),this.startBatch()}}},{key:"getDebugInfo",value:function(){var r=this.atlasManager.getDebugInfo(),i=r.reduce(function(o,s){return o+s.atlasCount},0),n=this.batchDebugInfo,a=n.reduce(function(o,s){return o+s.count},0);return{atlasInfo:r,totalAtlases:i,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:n.length,batchInfo:n,totalInstances:a}}}])})(),RS={};RS.initWebgl=function(t,e){var r=this,i=r.data.contexts[r.WEBGL];t.bgColor=Fz(r),t.webglTexSize=Math.min(t.webglTexSize,i.getParameter(i.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=xz(i),r.pickingFrameBuffer.needsDraw=!0,r.drawing=new Nz(r,i,t);var n=function(d){return function(f){return r.getTextAngle(f,d)}},a=function(d){return function(f){var p=f.pstyle(d);return p&&p.value}},o=function(d){return function(f){return f.pstyle("".concat(d,"-opacity")).value>0}},s=function(d){var f=d.pstyle("text-events").strValue==="yes";return f?Sh.USE_BB:Sh.IGNORE},u=function(d){var f=d.position(),p=f.x,h=f.y,g=d.outerWidth(),v=d.outerHeight();return{w:g,h:v,x1:p-g/2,y1:h-v/2}};r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:mz,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:s,getKey:zg(e.getLabelKey,null),getBoundingBox:Vg(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:s,getKey:zg(e.getSourceLabelKey,"source"),getBoundingBox:Vg(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:s,getKey:zg(e.getTargetLabelKey,"target"),getBoundingBox:Vg(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var l=Zl(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(c,d){var f=!1;d&&d.length>0&&(f|=r.drawing.invalidate(d)),f&&l()}),Bz(r)};function Fz(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return oT(r)}function PS(t,e){var r=t._private.rscratch;return di(r,"labelWrapCachedLines",e)||[]}var zg=function(e,r){return function(i){var n=e(i),a=PS(i,r);return a.length>1?a.map(function(o,s){return"".concat(n,"_").concat(s)}):n}},Vg=function(e,r){return function(i,n){var a=e(i);if(typeof n=="string"){var o=n.indexOf("_");if(o>0){var s=Number(n.substring(o+1)),u=PS(i,r),l=a.h/u.length,c=l*s,d=a.y1+c;return{x1:a.x1,w:a.w,y1:d,h:l,yOffset:c}}}return a}};function Bz(t){{var e=t.render;t.render=function(a){a=a||{};var o=t.cy;t.webgl&&(o.zoom()>DS?(Lz(t),e.call(t,a)):(zz(t),FS(t,a,Pl.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(a){r.call(t,a),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(a,o,s,u){return Wz(t,a,o)};{var i=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){i.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var n=t.notify;t.notify=function(a,o){n.call(t,a,o),a==="viewport"||a==="bounds"?t.pickingFrameBuffer.needsDraw=!0:a==="background"&&t.drawing.invalidate(o,{type:"node-body"})}}}function Lz(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function zz(t){var e=function(i){i.save(),i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,t.canvasWidth,t.canvasHeight),i.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function Vz(t){var e=t.canvasWidth,r=t.canvasHeight,i=O0(t),n=i.pan,a=i.zoom,o=Fg();fh(o,o,[n.x,n.y]),n0(o,o,[a,a]);var s=Fg();Sz(s,e,r);var u=Fg();return Tz(u,s,o),u}function NS(t,e){var r=t.canvasWidth,i=t.canvasHeight,n=O0(t),a=n.pan,o=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,i),e.translate(a.x,a.y),e.scale(o,o)}function Hz(t,e){t.drawSelectionRectangle(e,function(r){return NS(t,r)})}function Uz(t){var e=t.data.contexts[t.NODE];e.save(),NS(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function jz(t){var e=function(n,a,o){for(var s=n.atlasManager.getAtlasCollection(a),u=t.data.contexts[t.NODE],l=s.atlases,c=0;c<l.length;c++){var d=l[c],f=d.canvas;if(f){var p=f.width,h=f.height,g=p*c,v=f.height*o,m=.4;u.save(),u.scale(m,m),u.drawImage(f,g,v),u.strokeStyle="black",u.rect(g,v,p,h),u.stroke(),u.restore()}}},r=0;e(t.drawing,"node",r++),e(t.drawing,"label",r++)}function qz(t,e,r,i,n){var a,o,s,u,l=O0(t),c=l.pan,d=l.zoom;{var f=vz(t,c,d,e,r),p=Sr(f,2),h=p[0],g=p[1],v=6;a=h-v/2,o=g-v/2,s=v,u=v}if(s===0||u===0)return[];var m=t.data.contexts[t.WEBGL];m.bindFramebuffer(m.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(m.viewport(0,0,m.canvas.width,m.canvas.height),FS(t,null,Pl.PICKING),t.pickingFrameBuffer.needsDraw=!1);var y=s*u,b=new Uint8Array(y*4);m.readPixels(a,o,s,u,m.RGBA,m.UNSIGNED_BYTE,b),m.bindFramebuffer(m.FRAMEBUFFER,null);for(var w=new Set,T=0;T<y;T++){var x=b.slice(T*4,T*4+4),_=yz(x)-1;_>=0&&w.add(_)}return w}function Wz(t,e,r){var i=qz(t,e,r),n=t.getCachedZSortedEles(),a,o,s=ki(i),u;try{for(s.s();!(u=s.n()).done;){var l=u.value,c=n[l];if(!a&&c.isNode()&&(a=c),!o&&c.isEdge()&&(o=c),a&&o)break}}catch(d){s.e(d)}finally{s.f()}return[a,o].filter(Boolean)}function Hg(t,e,r){var i=t.drawing;e+=1,r.isNode()?(i.drawNode(r,e,"node-underlay"),i.drawNode(r,e,"node-body"),i.drawTexture(r,e,"label"),i.drawNode(r,e,"node-overlay")):(i.drawEdgeLine(r,e),i.drawEdgeArrow(r,e,"source"),i.drawEdgeArrow(r,e,"target"),i.drawTexture(r,e,"label"),i.drawTexture(r,e,"edge-source-label"),i.drawTexture(r,e,"edge-target-label"))}function FS(t,e,r){var i;t.webglDebug&&(i=performance.now());var n=t.drawing,a=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&Hz(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=t.data.contexts[t.WEBGL];r.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=Vz(t),u=t.getCachedZSortedEles();if(a=u.length,n.startFrame(s,r),r.screen){for(var l=0;l<u.nondrag.length;l++)Hg(t,l,u.nondrag[l]);for(var c=0;c<u.drag.length;c++)Hg(t,c,u.drag[c])}else if(r.picking)for(var d=0;d<u.length;d++)Hg(t,d,u[d]);n.endFrame(),r.screen&&t.webglDebugShowAtlases&&(Uz(t),jz(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var f=performance.now(),p=!1,h=Math.ceil(f-i),g=n.getDebugInfo(),v=["".concat(a," elements"),"".concat(g.totalInstances," instances"),"".concat(g.batchCount," batches"),"".concat(g.totalAtlases," atlases"),"".concat(g.wrappedCount," wrapped textures"),"".concat(g.simpleCount," simple shapes")].join(", ");if(p)console.log("WebGL (".concat(r.name,") - time ").concat(h,"ms, ").concat(v));else{console.log("WebGL (".concat(r.name,") - frame time ").concat(h,"ms")),console.log("Totals:"),console.log(" ".concat(v)),console.log("Texture Atlases Used:");var m=g.atlasInfo,y=ki(m),b;try{for(y.s();!(b=y.n()).done;){var w=b.value;console.log(" ".concat(w.type,": ").concat(w.keyCount," keys, ").concat(w.atlasCount," atlases"))}}catch(T){y.e(T)}finally{y.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,n.gc())}var oo={};oo.drawPolygonPath=function(t,e,r,i,n,a){var o=i/2,s=n/2;t.beginPath&&t.beginPath(),t.moveTo(e+o*a[0],r+s*a[1]);for(var u=1;u<a.length/2;u++)t.lineTo(e+o*a[u*2],r+s*a[u*2+1]);t.closePath()};oo.drawRoundPolygonPath=function(t,e,r,i,n,a,o){o.forEach(function(s){return mS(t,s)}),t.closePath()};oo.drawRoundRectanglePath=function(t,e,r,i,n,a){var o=i/2,s=n/2,u=a==="auto"?Xa(i,n):Math.min(a,s,o);t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.arcTo(e+o,r-s,e+o,r,u),t.arcTo(e+o,r+s,e,r+s,u),t.arcTo(e-o,r+s,e-o,r,u),t.arcTo(e-o,r-s,e,r-s,u),t.lineTo(e,r-s),t.closePath()};oo.drawBottomRoundRectanglePath=function(t,e,r,i,n,a){var o=i/2,s=n/2,u=a==="auto"?Xa(i,n):a;t.beginPath&&t.beginPath(),t.moveTo(e,r-s),t.lineTo(e+o,r-s),t.lineTo(e+o,r),t.arcTo(e+o,r+s,e,r+s,u),t.arcTo(e-o,r+s,e-o,r,u),t.lineTo(e-o,r-s),t.lineTo(e,r-s),t.closePath()};oo.drawCutRectanglePath=function(t,e,r,i,n,a,o){var s=i/2,u=n/2,l=o==="auto"?y0():o;t.beginPath&&t.beginPath(),t.moveTo(e-s+l,r-u),t.lineTo(e+s-l,r-u),t.lineTo(e+s,r-u+l),t.lineTo(e+s,r+u-l),t.lineTo(e+s-l,r+u),t.lineTo(e-s+l,r+u),t.lineTo(e-s,r+u-l),t.lineTo(e-s,r-u+l),t.closePath()};oo.drawBarrelPath=function(t,e,r,i,n){var a=i/2,o=n/2,s=e-a,u=e+a,l=r-o,c=r+o,d=qg(i,n),f=d.widthOffset,p=d.heightOffset,h=d.ctrlPtOffsetPct*f;t.beginPath&&t.beginPath(),t.moveTo(s,l+p),t.lineTo(s,c-p),t.quadraticCurveTo(s+h,c,s+f,c),t.lineTo(u-f,c),t.quadraticCurveTo(u-h,c,u,c-p),t.lineTo(u,l+p),t.quadraticCurveTo(u-h,l,u-f,l),t.lineTo(s+f,l),t.quadraticCurveTo(s+h,l,s,l+p),t.closePath()};var Zx=Math.sin(0),Xx=Math.cos(0),a0={},o0={},BS=Math.PI/40;for(Fo=0*Math.PI;Fo<2*Math.PI;Fo+=BS)a0[Fo]=Math.sin(Fo),o0[Fo]=Math.cos(Fo);var Fo;oo.drawEllipsePath=function(t,e,r,i,n){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,i/2,n/2,0,0,2*Math.PI);else for(var a,o,s=i/2,u=n/2,l=0*Math.PI;l<2*Math.PI;l+=BS)a=e-s*a0[l]*Zx+s*o0[l]*Xx,o=r+u*o0[l]*Zx+u*a0[l]*Xx,l===0?t.moveTo(a,o):t.lineTo(a,o);t.closePath()};var rc={};rc.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]};rc.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),i=r.boundingBox(),n=this.findContainerClientCoords(),a=t.full?Math.ceil(i.w):n[2],o=t.full?Math.ceil(i.h):n[3],s=Te(t.maxWidth)||Te(t.maxHeight),u=this.getPixelRatio(),l=1;if(t.scale!==void 0)a*=t.scale,o*=t.scale,l=t.scale;else if(s){var c=1/0,d=1/0;Te(t.maxWidth)&&(c=l*t.maxWidth/a),Te(t.maxHeight)&&(d=l*t.maxHeight/o),l=Math.min(c,d),a*=l,o*=l}s||(a*=u,o*=u,l*=u);var f=document.createElement("canvas");f.width=a,f.height=o,f.style.width=a+"px",f.style.height=o+"px";var p=f.getContext("2d");if(a>0&&o>0){p.clearRect(0,0,a,o),p.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(t.full)p.translate(-i.x1*l,-i.y1*l),p.scale(l,l),this.drawElements(p,h),p.scale(1/l,1/l),p.translate(i.x1*l,i.y1*l);else{var g=e.pan(),v={x:g.x*l,y:g.y*l};l*=e.zoom(),p.translate(v.x,v.y),p.scale(l,l),this.drawElements(p,h),p.scale(1/l,1/l),p.translate(-v.x,-v.y)}t.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=t.bg,p.rect(0,0,a,o),p.fill())}return f};function $z(t,e){for(var r=atob(t),i=new ArrayBuffer(r.length),n=new Uint8Array(i),a=0;a<r.length;a++)n[a]=r.charCodeAt(a);return new Blob([i],{type:e})}function Qx(t){var e=t.indexOf(",");return t.substr(e+1)}function LS(t,e,r){var i=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new yu(function(n,a){try{e.toBlob(function(o){o!=null?n(o):a(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(o){a(o)}});case"blob":return $z(Qx(i()),r);case"base64":return Qx(i());default:return i()}}rc.png=function(t){return LS(t,this.bufferCanvasImage(t),"image/png")};rc.jpg=function(t){return LS(t,this.bufferCanvasImage(t),"image/jpeg")};var zS={};zS.nodeShapeImpl=function(t,e,r,i,n,a,o,s){switch(t){case"ellipse":return this.drawEllipsePath(e,r,i,n,a);case"polygon":return this.drawPolygonPath(e,r,i,n,a,o);case"round-polygon":return this.drawRoundPolygonPath(e,r,i,n,a,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,i,n,a,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,i,n,a,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,i,n,a,s);case"barrel":return this.drawBarrelPath(e,r,i,n,a)}};var Gz=VS,lt=VS.prototype;lt.CANVAS_LAYERS=3;lt.SELECT_BOX=0;lt.DRAG=1;lt.NODE=2;lt.WEBGL=3;lt.CANVAS_TYPES=["2d","2d","2d","webgl2"];lt.BUFFER_COUNT=3;lt.TEXTURE_BUFFER=0;lt.MOTIONBLUR_BUFFER_NODE=1;lt.MOTIONBLUR_BUFFER_DRAG=2;function VS(t){var e=this,r=e.cy.window(),i=r.document;t.webgl&&(lt.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(lt.CANVAS_LAYERS),contexts:new Array(lt.CANVAS_LAYERS),canvasNeedsRedraw:new Array(lt.CANVAS_LAYERS),bufferCanvases:new Array(lt.BUFFER_COUNT),bufferContexts:new Array(lt.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";e.data.canvasContainer=i.createElement("div");var o=e.data.canvasContainer.style;e.data.canvasContainer.style[n]=a,o.position="relative",o.zIndex="0",o.overflow="hidden";var s=t.cy.container();s.appendChild(e.data.canvasContainer),s.style[n]=a;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};LP()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var l=0;l<lt.CANVAS_LAYERS;l++){var c=e.data.canvases[l]=i.createElement("canvas"),d=lt.CANVAS_TYPES[l];e.data.contexts[l]=c.getContext(d),e.data.contexts[l]||ar("Could not create canvas of type "+d),Object.keys(u).forEach(function(se){c.style[se]=u[se]}),c.style.position="absolute",c.setAttribute("data-id","layer"+l),c.style.zIndex=String(lt.CANVAS_LAYERS-l),e.data.canvasContainer.appendChild(c),e.data.canvasNeedsRedraw[l]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[lt.NODE].setAttribute("data-id","layer"+lt.NODE+"-node"),e.data.canvases[lt.SELECT_BOX].setAttribute("data-id","layer"+lt.SELECT_BOX+"-selectbox"),e.data.canvases[lt.DRAG].setAttribute("data-id","layer"+lt.DRAG+"-drag"),e.data.canvases[lt.WEBGL]&&e.data.canvases[lt.WEBGL].setAttribute("data-id","layer"+lt.WEBGL+"-webgl");for(var l=0;l<lt.BUFFER_COUNT;l++)e.data.bufferCanvases[l]=i.createElement("canvas"),e.data.bufferContexts[l]=e.data.bufferCanvases[l].getContext("2d"),e.data.bufferCanvases[l].style.position="absolute",e.data.bufferCanvases[l].setAttribute("data-id","buffer"+l),e.data.bufferCanvases[l].style.zIndex=String(-l-1),e.data.bufferCanvases[l].style.visibility="hidden";e.pathsEnabled=!0;var f=fi(),p=function(q){return{x:(q.x1+q.x2)/2,y:(q.y1+q.y2)/2}},h=function(q){return{x:-q.w/2,y:-q.h/2}},g=function(q){var X=q[0]._private,J=X.oldBackgroundTimestamp===X.backgroundTimestamp;return!J},v=function(q){return q[0]._private.nodeKey},m=function(q){return q[0]._private.labelStyleKey},y=function(q){return q[0]._private.sourceLabelStyleKey},b=function(q){return q[0]._private.targetLabelStyleKey},w=function(q,X,J,ne,we){return e.drawElement(q,X,J,!1,!1,we)},T=function(q,X,J,ne,we){return e.drawElementText(q,X,J,ne,"main",we)},x=function(q,X,J,ne,we){return e.drawElementText(q,X,J,ne,"source",we)},_=function(q,X,J,ne,we){return e.drawElementText(q,X,J,ne,"target",we)},D=function(q){return q.boundingBox(),q[0]._private.bodyBounds},E=function(q){return q.boundingBox(),q[0]._private.labelBounds.main||f},M=function(q){return q.boundingBox(),q[0]._private.labelBounds.source||f},k=function(q){return q.boundingBox(),q[0]._private.labelBounds.target||f},I=function(q,X){return X},A=function(q){return p(D(q))},O=function(q,X,J){var ne=q?q+"-":"";return{x:X.x+J.pstyle(ne+"text-margin-x").pfValue,y:X.y+J.pstyle(ne+"text-margin-y").pfValue}},N=function(q,X,J){var ne=q[0]._private.rscratch;return{x:ne[X],y:ne[J]}},F=function(q){return O("",N(q,"labelX","labelY"),q)},P=function(q){return O("source",N(q,"sourceLabelX","sourceLabelY"),q)},z=function(q){return O("target",N(q,"targetLabelX","targetLabelY"),q)},$=function(q){return h(D(q))},G=function(q){return h(M(q))},V=function(q){return h(k(q))},W=function(q){var X=E(q),J=h(E(q));if(q.isNode()){switch(vu(q.pstyle("text-halign").value)){case"left":J.x=-X.w-(X.leftPad||0);break;case"right":J.x=-(X.rightPad||0);break}switch(mu(q.pstyle("text-valign").value)){case"top":J.y=-X.h-(X.topPad||0);break;case"bottom":J.y=-(X.botPad||0);break}}return J},ue=e.data.eleTxrCache=new Al(e,{getKey:v,doesEleInvalidateKey:g,drawElement:w,getBoundingBox:D,getRotationPoint:A,getRotationOffset:$,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),he=e.data.lblTxrCache=new Al(e,{getKey:m,drawElement:T,getBoundingBox:E,getRotationPoint:F,getRotationOffset:W,isVisible:I}),le=e.data.slbTxrCache=new Al(e,{getKey:y,drawElement:x,getBoundingBox:M,getRotationPoint:P,getRotationOffset:G,isVisible:I}),me=e.data.tlbTxrCache=new Al(e,{getKey:b,drawElement:_,getBoundingBox:k,getRotationPoint:z,getRotationOffset:V,isVisible:I}),be=e.data.lyrTxrCache=new ES(e);e.onUpdateEleCalcs(function(q,X){ue.invalidateElements(X),he.invalidateElements(X),le.invalidateElements(X),me.invalidateElements(X),be.invalidateElements(X);for(var J=0;J<X.length;J++){var ne=X[J]._private;ne.oldBackgroundTimestamp=ne.backgroundTimestamp}});var Se=function(q){for(var X=0;X<q.length;X++)be.enqueueElementRefinement(q[X].ele)};ue.onDequeue(Se),he.onDequeue(Se),le.onDequeue(Se),me.onDequeue(Se),t.webgl&&e.initWebgl(t,{getStyleKey:v,getLabelKey:m,getSourceLabelKey:y,getTargetLabelKey:b,drawElement:w,drawLabel:T,drawSourceLabel:x,drawTargetLabel:_,getElementBox:D,getLabelBox:E,getSourceLabelBox:M,getTargetLabelBox:k,getElementRotationPoint:A,getElementRotationOffset:$,getLabelRotationPoint:F,getSourceLabelRotationPoint:P,getTargetLabelRotationPoint:z,getLabelRotationOffset:W,getSourceLabelRotationOffset:G,getTargetLabelRotationOffset:V})}lt.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[lt.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[lt.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[lt.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break}};var Yz=typeof Path2D<"u";lt.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};lt.usePaths=function(){return Yz&&this.pathsEnabled};lt.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)};lt.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled};lt.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas>"u"?"undefined":Or(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var i=this.cy.window(),n=i.document;r=n.createElement("canvas"),r.width=t,r.height=e}return r};[kS,Wn,ga,A0,Yo,ao,hi,RS,oo,rc,zS].forEach(function(t){$e(lt,t)});var Kz=[{name:"null",impl:hS},{name:"base",impl:TS},{name:"canvas",impl:Gz}],Zz=[{type:"layout",extensions:bL},{type:"renderer",extensions:Kz}],HS={},US={};function jS(t,e,r){var i=r,n=function(D){Vt("Can not register `"+e+"` for `"+t+"` since `"+D+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(jl.prototype[e])return n(e);jl.prototype[e]=r}else if(t==="collection"){if(Kr.prototype[e])return n(e);Kr.prototype[e]=r}else if(t==="layout"){for(var a=function(D){this.options=D,r.call(this,D),Dt(this._private)||(this._private={}),this._private.cy=D.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(r.prototype),s=[],u=0;u<s.length;u++){var l=s[u];o[l]=o[l]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var c=r.prototype.stop;o.stop=function(){var _=this.options;if(_&&_.animate){var D=this.animations;if(D)for(var E=0;E<D.length;E++)D[E].stop()}return c?c.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var d=function(D){return D._private.cy},f={addEventFields:function(D,E){E.layout=D,E.cy=d(D),E.target=D},bubble:function(){return!0},parent:function(D){return d(D)}};$e(o,{createEmitter:function(){return this._private.emitter=new Bh(f,this),this},emitter:function(){return this._private.emitter},on:function(D,E){return this.emitter().on(D,E),this},one:function(D,E){return this.emitter().one(D,E),this},once:function(D,E){return this.emitter().one(D,E),this},removeListener:function(D,E){return this.emitter().removeListener(D,E),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(D,E){return this.emitter().emit(D,E),this}}),zt.eventAliasesOn(o),i=a}else if(t==="renderer"&&e!=="null"&&e!=="base"){var p=qS("renderer","base"),h=p.prototype,g=r,v=r.prototype,m=function(){p.apply(this,arguments),g.apply(this,arguments)},y=m.prototype;for(var b in h){var w=h[b],T=v[b]!=null;if(T)return n(b);y[b]=w}for(var x in v)y[x]=v[x];h.clientFunctions.forEach(function(_){y[_]=y[_]||function(){ar("Renderer does not implement `renderer."+_+"()` on its prototype")}}),i=m}else if(t==="__proto__"||t==="constructor"||t==="prototype")return ar(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return sT({map:HS,keys:[t,e],value:i})}function qS(t,e){return uT({map:HS,keys:[t,e]})}function Xz(t,e,r,i,n){return sT({map:US,keys:[t,e,r,i],value:n})}function Qz(t,e,r,i){return uT({map:US,keys:[t,e,r,i]})}var s0=function(){if(arguments.length===2)return qS.apply(null,arguments);if(arguments.length===3)return jS.apply(null,arguments);if(arguments.length===4)return Qz.apply(null,arguments);if(arguments.length===5)return Xz.apply(null,arguments);ar("Invalid extension access syntax")};jl.prototype.extension=s0;Zz.forEach(function(t){t.extensions.forEach(function(e){jS(t.type,e.name,e.impl)})});var Dh=function(){if(!(this instanceof Dh))return new Dh;this.length=0},$o=Dh.prototype;$o.instanceString=function(){return"stylesheet"};$o.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};$o.css=function(t,e){var r=this.length-1;if(Ue(t))this[r].properties.push({name:t,value:e});else if(Dt(t))for(var i=t,n=Object.keys(i),a=0;a<n.length;a++){var o=n[a],s=i[o];if(s!=null){var u=Vr.properties[o]||Vr.properties[Eh(o)];if(u!=null){var l=u.name,c=s;this[r].properties.push({name:l,value:c})}}}return this};$o.style=$o.css;$o.generateStyle=function(t){var e=new Vr(t);return this.appendToStyle(e)};$o.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],i=r.selector,n=r.properties;t.selector(i);for(var a=0;a<n.length;a++){var o=n[a];t.css(o.name,o.value)}}return t};var Jz="3.34.0",to=function(e){if(e===void 0&&(e={}),Dt(e))return new jl(e);if(Ue(e))return s0.apply(s0,arguments)};to.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(to),t.apply(null,e),this};to.warnings=function(t){return vT(t)};to.version=Jz;to.stylesheet=to.Stylesheet=Dh;var e4=["graph"],Wh=class t{injector=C(si);route=C(zi);router=C(Si);graphHost=wi.required("graph");graph;selectedNodeId;hoveredNodeId;project=U.required();featureCode=U(null);layout=ge("breadthfirst");generations=ge(2);ngAfterViewInit(){ot(()=>this.renderGraph(),{injector:this.injector})}ngOnDestroy(){this.graph?.destroy()}onLayoutChange(e){this.layout.set(e.target.value)}onGenerationsChange(e){this.generations.set(Math.max(0,Math.floor(Number(e.target.value)||0)))}renderGraph(){let{nodes:e,edges:r}=this.project().dependencyGraph,i=this.featureCode(),n=this.visibleCodes(i,e,r),a=n?e.filter(d=>n.has(d.code)):e,o=n?r.filter(d=>n.has(d.from)&&n.has(d.to)):r,s=Array.from(new Map(o.map(d=>[`${d.from}\0${d.to}`,d])).values()),u=d=>s.filter(f=>f.from===d||f.to===d).length,l=this.layout(),c=this.themeColors();this.graph?.destroy(),this.graph=to({container:this.graphHost().nativeElement,elements:[...a.map(d=>({data:{id:d.code,label:d.title??d.code,degree:u(d.code),exists:d.exists},classes:d.exists?"":"missing"})),...s.map((d,f)=>({data:{id:`${d.from}-${d.to}-${f}`,source:d.from,target:d.to},classes:d.resolved?"":"unresolved"}))],style:[{selector:"node",style:{label:"data(label)",shape:"round-rectangle",width:"mapData(degree, 0, 6, 128, 176)",height:"mapData(degree, 0, 6, 48, 64)","font-size":"mapData(degree, 0, 6, 12, 14)","text-valign":"center","text-halign":"center","text-wrap":"wrap","text-max-width":"112px",color:c.text,"background-color":c.node,"border-color":c.border,"border-width":1}},{selector:"node.active",style:{"background-color":c.active,"border-color":c.active,"border-width":3,color:c.activeText}},{selector:"node.missing",style:{"background-color":c.negativePale,"border-color":c.negative}},{selector:"edge",style:{width:1,opacity:.65,"line-color":c.edge,"target-arrow-color":c.edge,"target-arrow-shape":"triangle","arrow-scale":.7,"curve-style":"bezier"}},{selector:"edge.unresolved",style:{"line-style":"dashed","line-color":c.negative,"target-arrow-color":c.negative}},{selector:"edge.highlighted",style:{width:2,opacity:1,"line-color":c.active,"target-arrow-color":c.active}}],layout:l==="breadthfirst"?{name:l,directed:!0,fit:!1,padding:64,spacingFactor:1.2,animate:!1}:l==="weighted"?{name:"concentric",concentric:d=>Number(d.data("degree")),levelWidth:()=>1,fit:!1,padding:64,animate:!1}:{name:l,fit:!1,padding:64,animate:!1},minZoom:.3,maxZoom:2.5}),i&&this.graph.$id(i).addClass("active"),this.bindHighlights(),this.graph.fit(this.graph.elements(),64),this.graph.zoom()>1&&this.graph.zoom(1).center()}bindHighlights(){this.graph?.on("mouseover","node",e=>{this.hoveredNodeId=e.target.id(),this.updateHighlights()}),this.graph?.on("mouseout","node",()=>{this.hoveredNodeId=void 0,this.updateHighlights()}),this.graph?.on("tap","node",e=>{this.selectedNodeId=e.target.id(),this.updateHighlights(),e.target.data("exists")&&this.router.navigate([],{relativeTo:this.route,queryParams:{feature:e.target.id()},queryParamsHandling:"merge"})}),this.graph?.on("tap",e=>{e.target===this.graph&&(this.selectedNodeId=void 0,this.updateHighlights())})}updateHighlights(){if(!this.graph)return;this.graph.edges().removeClass("highlighted");let e=this.hoveredNodeId??this.selectedNodeId;e&&this.graph.$id(e).connectedEdges().addClass("highlighted")}themeColors(){let e=this.graphHost().nativeElement,r=document.createElement("span");e.append(r);let i=a=>(r.style.color=`var(${a})`,getComputedStyle(r).color),n={node:i("--tui-background-elevation-2"),text:i("--tui-text-primary"),border:i("--tui-border-normal"),edge:i("--tui-border-normal-strong"),active:i("--tui-background-accent-2"),activeText:i("--tui-text-primary-on-accent-2"),negative:i("--tui-status-negative"),negativePale:i("--tui-status-negative-pale")};return r.remove(),n}visibleCodes(e,r,i){if(!e||this.generations()===0||!r.some(o=>o.code===e))return null;let n=new Set([e]),a=new Set([e]);for(let o=0;o<this.generations();o++){let s=new Set;for(let u of i)a.has(u.from)&&!n.has(u.to)&&s.add(u.to),a.has(u.to)&&!n.has(u.from)&&s.add(u.from);s.forEach(u=>n.add(u)),a=s}return n}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["graph"]],viewQuery:function(r,i){r&1&&Ci(i.graphHost,e4,5),r&2&&Wt()},inputs:{project:[1,"project"],featureCode:[1,"featureCode"]},decls:17,vars:3,consts:[["graph",""],["aria-label","\u0413\u0440\u0430\u0444 \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0435\u0439 \u0444\u0438\u0447","role","img",1,"graph"],[1,"controls-container"],[3,"change","value"],["value","breadthfirst"],["value","circle"],["value","concentric"],["value","weighted"],["min","0","step","1","type","number",3,"input","disabled","value"]],template:function(r,i){r&1&&(ku(0,"div",1,0),ui(2,"div",2)(3,"label"),j(4," \u0412\u0438\u0434 \u0433\u0440\u0430\u0444\u0430 "),ui(5,"select",3),ts("change",function(a){return i.onLayoutChange(a)}),ui(6,"option",4),j(7,"\u0417\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438"),Tn(),ui(8,"option",5),j(9,"\u041A\u0440\u0443\u0433"),Tn(),ui(10,"option",6),j(11,"\u041A\u043E\u043D\u0446\u0435\u043D\u0442\u0440\u0438\u0447\u0435\u0441\u043A\u0438\u0439"),Tn(),ui(12,"option",7),j(13,"\u0412\u0435\u0441\u043E\u0432\u043E\u0439"),Tn()()(),ui(14,"label"),j(15," \u041F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0439 "),ui(16,"input",8),ts("input",function(a){return i.onGenerationsChange(a)}),Tn()()()),r&2&&(R(5),Wr("value",i.layout()),R(11),Wr("disabled",!i.featureCode())("value",i.generations()))},styles:["[_nghost-%COMP%]{display:block;position:relative;height:100%}.graph[_ngcontent-%COMP%]{min-height:560px;height:100%;width:100%}.controls-container[_ngcontent-%COMP%]{display:grid;gap:.75rem;position:absolute;background-color:var(--tui-background-elevation-3);border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-m);color:var(--tui-text-primary);padding:1rem;right:1em;top:1em;width:12rem;z-index:1000}.controls-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:grid;gap:.25rem}.controls-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .controls-container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{background:var(--tui-background-base);border:1px solid var(--tui-border-normal);border-radius:var(--tui-radius-s);color:var(--tui-text-primary);width:100%}"]})};var t4=["editor"],ic=()=>[],r4=()=>({mode:"graph"}),i4=()=>({mode:"edit"}),R0=()=>({mode:"view"});function n4(t,e){t&1&&(L(0,"a",10),ye(1,"tui-icon",11),j(2," \u0417\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438 "),B(),L(3,"a",5),ye(4,"tui-icon",12),j(5,"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C "),B()),t&2&&(Z("routerLink",Ii(4,ic))("queryParams",Ii(5,r4)),R(3),Z("routerLink",Ii(6,ic))("queryParams",Ii(7,i4)))}function a4(t,e){if(t&1){let r=Kt();L(0,"a",13),j(1," \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "),B(),L(2,"button",14),Ce("click",function(){Nt(r);let n=Q(2);return Ft(n.saveChanges())}),j(3," \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C "),B()}if(t&2){let r=Q(2);Z("routerLink",Ii(3,ic))("queryParams",Ii(4,R0)),R(2),Z("disabled",!r.hasChanges())}}function o4(t,e){t&1&&(L(0,"a",5),j(1,"\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044F"),B()),t&2&&Z("routerLink",Ii(2,ic))("queryParams",Ii(3,R0))}function s4(t,e){t&1&&(L(0,"a",5),j(1,"\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0435\u0439"),B()),t&2&&Z("routerLink",Ii(2,ic))("queryParams",Ii(3,R0))}function u4(t,e){if(t&1&&(L(0,"div",9)(1,"tui-scrollbar"),ye(2,"feature-compare",15),B()()),t&2){let r=Q(2);R(2),Z("feature",r)("origin",e)}}function l4(t,e){if(t&1&&de(0,u4,3,2,"div",9),t&2){let r,i=Q(2);fe((r=i.compareWith())?0:-1,r)}}function c4(t,e){if(t&1){let r=Kt();L(0,"div",8)(1,"feature-editor",16,0),Ce("canClose",function(){Nt(r);let n=Q(2);return Ft(n.enterView())}),B()()}if(t&2){let r=Q();R(),Z("featureCode",r.code)}}function d4(t,e){if(t&1&&(L(0,"div",9),ye(1,"graph",17),B()),t&2){let r=Q(),i=Q();R(),Z("project",i.project())("featureCode",r.code)}}function f4(t,e){if(t&1&&(L(0,"div",9)(1,"tui-scrollbar"),ye(2,"feature-content",18),B()()),t&2){let r=Q();R(2),Z("feature",r)}}function h4(t,e){if(t&1){let r=Kt();L(0,"div",3)(1,"h2"),j(2),B(),L(3,"div",4),de(4,n4,6,8)(5,a4,4,5)(6,o4,2,4,"a",5)(7,s4,2,4,"a",5),B()(),ye(8,"div",6),L(9,"div",6)(10,"div")(11,"b"),j(12,"\u041A\u043E\u0434:"),B(),L(13,"tui-copy"),j(14),B()(),L(15,"feature-history-selector",7),Ce("valueChange",function(n){Nt(r);let a=Q();return Ft(a.onCompareWithChange(n))}),B()(),de(16,l4,1,1)(17,c4,3,1,"div",8)(18,d4,2,2,"div",9)(19,f4,3,1,"div",9)}if(t&2){let r,i,n=e,a=Q();R(2),Fr(n.title),R(2),fe((r=a.mode())==="view"?4:r==="edit"?5:r==="compare"?6:r==="graph"?7:-1),R(10),xe(" ",n.code," "),R(),Z("featureCode",n.code)("value",a.compareWith()),R(),fe((i=a.mode())==="compare"?16:i==="edit"?17:i==="graph"?18:i==="view"?19:-1)}}function p4(t,e){t&1&&(L(0,"div",2),j(1,"\u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043E"),B())}var $h=class t{router=C(Si);mode=U.required({transform:e=>e==="edit"?"edit":e==="compare"?"compare":e==="graph"?"graph":"view"});project=U.required();feature=U.required();editor=wi("editor");compareWith=ge(null);graphMode=ge(!1);hasChanges=re(()=>this.editor()?.hasChanges());saveChanges(){this.editor()?.saveChanges()}enterView(){this.router.navigate([],{queryParams:{mode:"view"},queryParamsHandling:"merge"})}onCompareWithChange(e){this.compareWith.set(e),e!=null?this.router.navigate([],{queryParams:{mode:"compare"},queryParamsHandling:"merge"}):this.router.navigate([],{queryParams:{mode:"view"},queryParamsHandling:"merge"})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-presenter"]],viewQuery:function(r,i){r&1&&Ci(i.editor,t4,5),r&2&&Wt()},inputs:{mode:[1,"mode"],project:[1,"project"],feature:[1,"feature"]},decls:3,vars:1,consts:[["editor",""],[1,"wrapper"],[1,"nothing"],[1,"header"],[1,"actions"],["size","s","tuiButton","","queryParamsHandling","merge",3,"routerLink","queryParams"],[1,"details"],[3,"valueChange","featureCode","value"],[1,"editor"],[1,"content"],["tuiButton","","size","s","appearance","secondary","queryParamsHandling","merge",3,"routerLink","queryParams"],["icon","@tui.waypoints"],["icon","@tui.pencil"],["size","s","appearance","secondary","tuiButton","","queryParamsHandling","merge",3,"routerLink","queryParams"],["size","s","tuiButton","",3,"click","disabled"],[3,"feature","origin"],[3,"canClose","featureCode"],[3,"project","featureCode"],[3,"feature"]],template:function(r,i){if(r&1&&(L(0,"div",1),de(1,h4,20,6)(2,p4,2,0,"div",2),B()),r&2){let n;R(),fe((n=i.feature())?1:2,n)}},dependencies:[rf,bs,Uf,Ff,_i,Ni,Hf,Of,Wh,zs],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:12px;background:var(--tui-background-neutral-1);height:100%}.wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.header[_ngcontent-%COMP%]{flex:0 0 auto;padding:1em 2em;display:flex;justify-content:space-between;align-items:center;width:100%}.header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.6rem}.details[_ngcontent-%COMP%]{flex:0 0 auto;padding:.2em 2em;display:flex;gap:1em;margin-bottom:1em;align-items:center;justify-content:space-between}.content[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:hidden;min-height:0}feature-content[_ngcontent-%COMP%]{margin:0 2em}.editor[_ngcontent-%COMP%]{margin:0 2em;flex:1 1 auto;overflow-y:hidden;min-height:0}.nothing[_ngcontent-%COMP%]{margin:1em 2em}"]})};var v4=(t,e)=>e.valueCode;function m4(t,e){t&1&&ye(0,"tui-icon",8),t&2&&st("font-size",16,"px")}function g4(t,e){t&1&&ye(0,"tui-icon",9),t&2&&st("font-size",16,"px")}function y4(t,e){if(t&1&&(L(0,"span",10),j(1),B()),t&2){let r=Q();Ze("zero",r.node().automatedCount===0),R(),Xn(" ",r.node().automatedCount," / ",r.node().totalCount," ")}}function b4(t,e){if(t&1&&ye(0,"feature-tree-node",11),t&2){let r=e.$implicit;Z("node",r)}}function C4(t,e){if(t&1&&ye(0,"feature-item",12),t&2){let r=e.$implicit;Z("featureCode",r)}}function w4(t,e){if(t&1&&(dt(0,b4,1,1,"feature-tree-node",11,v4),dt(2,C4,1,1,"feature-item",12,gi)),t&2){let r=Q();ft(r.node().children),R(2),ft(r.node().features)}}var Gh=class t{node=U.required();expanded=ge(!1);toggleExpanded(){this.expanded.update(e=>!e)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-tree-node"]],inputs:{node:[1,"node"]},decls:11,vars:10,consts:[[1,"item",3,"click"],[1,"title"],["icon","@tui.chevron-down",3,"font-size"],["icon","@tui.chevron-right",3,"font-size"],[1,"suffix"],[1,"counters",3,"zero"],[1,"status"],[1,"children"],["icon","@tui.chevron-down"],["icon","@tui.chevron-right"],[1,"counters"],[3,"node"],[3,"featureCode"]],template:function(r,i){r&1&&(L(0,"div",0),Ce("click",function(){return i.toggleExpanded()}),L(1,"div",1),de(2,m4,1,2,"tui-icon",2)(3,g4,1,2,"tui-icon",3),L(4,"span"),j(5),B()(),L(6,"div",4),de(7,y4,2,4,"span",5),ye(8,"div",6),B()(),L(9,"div",7),de(10,w4,4,0),B()),r&2&&(R(2),fe(i.expanded()?2:3),R(2),rs(i.node().gitStatus),R(),xe(" ",i.node().valueTitle??i.node().valueCode," "),R(2),fe(i.node().totalCount>0?7:-1),R(),rs(i.node().gitStatus),R(),Ze("expanded",i.expanded()),R(),fe(i.expanded()?10:-1))},dependencies:[t,Vs,Ni],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.children[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-left:1em;overflow-y:hidden;border-left:var(--tui-border-normal) 1px solid}.item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.4rem;padding:4px 12px;border-radius:4px;cursor:pointer}.item[_ngcontent-%COMP%]:hover{background:var(--tui-background-neutral-1-hover)}.title[_ngcontent-%COMP%], .suffix[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;gap:.2rem;align-items:center}.modified[_ngcontent-%COMP%]{color:var(--tui-status-warning)}.untracked[_ngcontent-%COMP%]{color:var(--tui-text-positive)}.counters[_ngcontent-%COMP%]{white-space:nowrap;font:var(--tui-typography-body-xs);color:var(--tui-text-secondary)}.counters.zero[_ngcontent-%COMP%]{color:var(--tui-text-negative)}.status[_ngcontent-%COMP%]{border-radius:50%}.status.modified[_ngcontent-%COMP%]{width:.4rem;height:.4rem;background-color:var(--tui-status-warning)}.status.untracked[_ngcontent-%COMP%]{width:.4rem;height:.4rem;background-color:var(--tui-text-positive)}"]})};var _4=(t,e)=>e.valueCode;function x4(t,e){if(t&1&&ye(0,"feature-tree-node",0),t&2){let r=e.$implicit;Z("node",r)}}var Yh=class t{tree=U.required();static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-tree"]],inputs:{tree:[1,"tree"]},decls:2,vars:0,consts:[[3,"node"]],template:function(r,i){r&1&&dt(0,x4,1,1,"feature-tree-node",0,_4),r&2&&ft(i.tree().root.children)},dependencies:[Gh],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}"]})};function T4(t,e){if(t&1&&ye(0,"tui-data-list-wrapper",5),t&2){let r=Q();Z("items",r.projectSnapshot().trees)}}var Kh=class t{projectSnapshot=U.required();search=Wi();activeTree=Wi(null);featureCodes=qi();constructor(){ot(()=>{let e=this.matchFeatures(this.search(),this.projectSnapshot().features);e.sort((i,n)=>i.title.localeCompare(n.title,"ru-Ru"));let r=e.map(i=>i.code);this.featureCodes.emit(r)})}matchFeatures(e,r){if(!e||!e.trim())return[...r];let i=e.trim().split(/\s+/).map(n=>new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"));return r.filter(n=>{let a=[n.code,n.title,n.description,...n.groups.flatMap(o=>[o.title,...o.assertions.flatMap(s=>[s.title,s.description])])].join(`
|
|
435
|
+
`);return i.every(o=>o.test(a))})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["nav-controls"]],inputs:{projectSnapshot:[1,"projectSnapshot"],search:[1,"search"],activeTree:[1,"activeTree"]},outputs:{search:"searchChange",activeTree:"activeTreeChange",featureCodes:"featureCodes"},features:[_e([id({stringify:ge(e=>e.title),identityMatcher:ge((e,r)=>e.code===r.code)})])],decls:5,vars:2,consts:[["tuiTextfieldSize","s","iconEnd","@tui.search"],["placeholder","\u041F\u043E\u0438\u0441\u043A...","tuiInput","",3,"ngModelChange","ngModel"],["tuiTextfieldSize","s","tuiChevron",""],["placeholder","\u0411\u0435\u0437 \u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u043A\u0438","tuiSelect","",3,"ngModelChange","ngModel"],[3,"items",4,"tuiDropdown"],[3,"items"]],template:function(r,i){r&1&&(L(0,"tui-textfield",0)(1,"input",1),ln("ngModelChange",function(a){return un(i.search,a)||(i.search=a),a}),B(),fo(),B(),L(2,"tui-textfield",2)(3,"input",3),ln("ngModelChange",function(a){return un(i.activeTree,a)||(i.activeTree=a),a}),B(),fo(),Me(4,T4,1,1,"tui-data-list-wrapper",4),B()),r&2&&(R(),sn("ngModel",i.search),ho(),R(2),sn("ngModel",i.activeTree),ho())},dependencies:[ka,os,ss,cn,Hs,nf,tf,li,Ts,xo,Yu],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1em}"]})};function S4(t,e){t&1&&ye(0,"feature-tree",2),t&2&&Z("tree",e)}function D4(t,e){if(t&1&&ye(0,"feature-list",3),t&2){let r=Q();Z("featureCodes",r.featureCodes())}}var Zh=class t{router=C(Si);activeFeatureService=C(da);projectSnapshot=U.required();activeTree=U.required();activeFeature=U.required();mode=U.required();featureCodes=ge([]);constructor(){ot(()=>{let e=this.activeFeature(),r=this.activeFeatureService.activeFeature();e?.code!==r?.code&&this.activeFeatureService.activate(e)})}setFeatureCodes(e){this.featureCodes.set(e)}setActiveTree(e){this.router.navigate([],{queryParams:{tree:e?.code??null},queryParamsHandling:"merge"})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["feature-page-presenter"]],inputs:{projectSnapshot:[1,"projectSnapshot"],activeTree:[1,"activeTree"],activeFeature:[1,"activeFeature"],mode:[1,"mode"]},features:[_e([da])],decls:7,vars:6,consts:[[1,"tree-container"],[3,"featureCodes","activeTreeChange","projectSnapshot","activeTree"],[3,"tree"],[3,"featureCodes"],[1,"content"],[3,"feature","project","mode"]],template:function(r,i){if(r&1&&(L(0,"section",0)(1,"nav-controls",1),Ce("featureCodes",function(a){return i.setFeatureCodes(a)})("activeTreeChange",function(a){return i.setActiveTree(a)}),B(),L(2,"tui-scrollbar"),de(3,S4,1,1,"feature-tree",2)(4,D4,1,1,"feature-list",3),B()(),L(5,"section",4),ye(6,"feature-presenter",5),B()),r&2){let n;R(),Z("projectSnapshot",i.projectSnapshot())("activeTree",i.activeTree()),R(2),fe((n=i.activeTree())?3:4,n),R(3),Z("feature",i.activeFeature())("project",i.projectSnapshot())("mode",i.mode())}},dependencies:[Yh,ef,Kh,$h,bs],styles:["[_nghost-%COMP%]{display:flex;height:100%;padding:1em;gap:1em}.tree-container[_ngcontent-%COMP%]{display:flex;flex-basis:30%;flex-grow:1;flex-direction:column;gap:1em}.content[_ngcontent-%COMP%]{height:100%;flex-basis:70%;flex-grow:1;overflow:hidden}"]})};function E4(t,e){if(t&1&&(L(0,"div",2)(1,"div",3),j(2),B(),j(3),L(4,"div",4),j(5),B()()),t&2){let r=e.$implicit,i=Q(3);Z("appearance",i.severityToAppearance(r.severity)),R(2),xe(" ",r.code," "),R(),xe(" ",r.message," "),R(2),xe(" ",r.path," ")}}function k4(t,e){t&1&&(L(0,"div",0),dt(1,E4,6,4,"div",2,on),B()),t&2&&(R(),ft(e))}function M4(t,e){if(t&1&&ye(0,"feature-page-presenter",1),t&2){let r=Q(2);Z("projectSnapshot",r.projectSnapshotResource.value())("activeFeature",r.activeFeature())("activeTree",r.activeTree())("mode",r.queryMode())}}function I4(t,e){if(t&1&&de(0,k4,3,0,"div",0)(1,M4,1,4,"feature-page-presenter",1),t&2){let r,i=Q();fe((r=i.errors())?0:1,r)}}function A4(t,e){t&1&&j(0,` \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...
|
|
436
|
+
`)}var Xh=class t{activatedRoute=C(zi);queryParams=$i(this.activatedRoute.queryParams);queryTree=re(()=>this.queryParams()?.tree??null);queryFeature=re(()=>this.queryParams()?.feature??null);queryMode=re(()=>this.queryParams()?.mode??null);projectSnapshotResource=C(Di).projectResource;errors=re(()=>{if(this.projectSnapshotResource.hasValue()){let r=this.projectSnapshotResource.value().diagnostics.filter(i=>i.severity==="error");if(r.length)return r}return null});activeFeature=re(()=>{let e=this.queryFeature();return e&&this.projectSnapshotResource.hasValue()?this.projectSnapshotResource.value().features.find(r=>r.code===e)??null:null});activeTree=re(()=>{let e=this.queryTree();return e&&this.projectSnapshotResource.hasValue()?this.projectSnapshotResource.value().trees.find(r=>r.code===e)??null:null});featureCodes=ge([]);severityToAppearance(e){return e==="error"?"negative":"info"}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["features-page"]],features:[_e([da])],decls:2,vars:1,consts:[[1,"error-container"],[3,"projectSnapshot","activeFeature","activeTree","mode"],["tuiNotification","",3,"appearance"],["tuiTitle",""],[1,""]],template:function(r,i){r&1&&de(0,I4,2,1)(1,A4,1,0),r&2&&fe(i.projectSnapshotResource.hasValue()?0:1)},dependencies:[Zh,Ku],styles:["[_nghost-%COMP%]{display:contents}.error-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:4em;gap:1em}"]})};var WS=[{path:"",component:Xh}];var O4={baseUrl:"assets",defaultOptions:{scrollBeyondLastLine:!1},requireConfig:{preferScriptTags:!0},monacoRequire:window.monacoRequire},$S=()=>_w(O4);var GS={providers:[Q0(),Vv(WS,Hv()),jb(),{provide:Jd,useValue:""},gy({fullLibraryLoader:()=>import("./chunk-DLDSQNZX.js"),lineNumbersLoader:()=>import("./chunk-YW3B3PDE.js")}),$S()]};function R4(t,e){t&1&&ye(0,"tui-loader")}function P4(t,e){if(t&1){let r=Kt();L(0,"tui-badged-content")(1,"tui-badge-notification",4),j(2),B(),L(3,"div",5),ln("tuiDropdownOpenChange",function(n){Nt(r);let a=Q(3);return un(a.infoOpen,n)||(a.infoOpen=n),Ft(n)}),B()()}if(t&2){let r=Q(3),i=pr(3);R(2),xe(" ",r.info().length," "),R(),Z("round",!1)("tuiDropdown",i),sn("tuiDropdownOpen",r.infoOpen)}}function N4(t,e){if(t&1){let r=Kt();L(0,"tui-badged-content")(1,"tui-badge-notification",4),j(2),B(),L(3,"div",6),ln("tuiDropdownOpenChange",function(n){Nt(r);let a=Q(3);return un(a.warningsOpen,n)||(a.warningsOpen=n),Ft(n)}),B()()}if(t&2){let r=Q(3),i=pr(5);R(2),xe(" ",r.warnings().length," "),R(),Z("round",!1)("tuiDropdown",i),sn("tuiDropdownOpen",r.warningsOpen)}}function F4(t,e){if(t&1){let r=Kt();L(0,"tui-badged-content")(1,"tui-badge-notification",4),j(2),B(),L(3,"div",7),ln("tuiDropdownOpenChange",function(n){Nt(r);let a=Q(3);return un(a.errorsOpen,n)||(a.errorsOpen=n),Ft(n)}),B()()}if(t&2){let r=Q(3),i=pr(7);R(2),xe(" ",r.errors().length," "),R(),Z("round",!1)("tuiDropdown",i),sn("tuiDropdownOpen",r.errorsOpen)}}function B4(t,e){if(t&1&&(de(0,P4,4,4,"tui-badged-content"),de(1,N4,4,4,"tui-badged-content"),de(2,F4,4,4,"tui-badged-content")),t&2){let r=Q(2);fe(r.info().length?0:-1),R(),fe(r.warnings().length?1:-1),R(),fe(r.errors().length?2:-1)}}function L4(t,e){t&1&&ye(0,"div",3),t&2&&Z("round",!1)}function z4(t,e){if(t&1&&de(0,B4,3,3)(1,L4,1,1,"div",3),t&2){let r=Q();fe(r.hasErrors()?0:1)}}function V4(t,e){if(t&1&&(L(0,"div",8)(1,"div",9),j(2),B(),j(3),L(4,"div",10),j(5),B()()),t&2){let r=e.$implicit,i=Q(2);Z("appearance",i.severityToAppearance(r.severity)),R(2),xe(" ",r.code," "),R(),xe(" ",r.message," "),R(2),xe(" ",r.path," ")}}function H4(t,e){if(t&1&&(L(0,"tui-data-list"),dt(1,V4,6,4,"div",8,on),B()),t&2){let r=Q();st("max-inline-size",35,"rem"),R(),ft(r.info())}}function U4(t,e){if(t&1&&(L(0,"div",11)(1,"div",9),j(2),B(),j(3),L(4,"div",10),j(5),B()()),t&2){let r=e.$implicit,i=Q(2);Z("appearance",i.severityToAppearance(r.severity)),R(2),xe(" ",r.code," "),R(),xe(" ",r.message," "),R(2),xe(" ",r.path," ")}}function j4(t,e){if(t&1&&(L(0,"tui-data-list"),dt(1,U4,6,4,"div",11,on),B()),t&2){let r=Q();st("max-inline-size",35,"rem"),R(),ft(r.warnings())}}function q4(t,e){if(t&1&&(L(0,"div",11)(1,"div",9),j(2),B(),j(3),L(4,"div",10),j(5),B()()),t&2){let r=e.$implicit,i=Q(2);Z("appearance",i.severityToAppearance(r.severity)),R(2),xe(" ",r.code," "),R(),xe(" ",r.message," "),R(2),xe(" ",r.path," ")}}function W4(t,e){if(t&1&&(L(0,"tui-data-list"),dt(1,q4,6,4,"div",11,on),B()),t&2){let r=Q();st("max-inline-size",35,"rem"),R(),ft(r.errors())}}var Qh=class t{projectResource=C(Di).projectResource;diagnostics=re(()=>this.projectResource.hasValue()?this.projectResource.value().diagnostics:null);hasErrors=re(()=>{let e=this.diagnostics();return e==null?!1:e.length>0});info=re(()=>this.diagnostics()?.filter(e=>e.severity==="info")??[]);warnings=re(()=>this.diagnostics()?.filter(e=>e.severity==="warning")??[]);errors=re(()=>this.diagnostics()?.filter(e=>e.severity==="error")??[]);severityToAppearance(e){return e==="error"?"negative":e==="warning"?"warning":"info"}infoOpen=!1;warningsOpen=!1;errorsOpen=!1;static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["diagnostics"]],decls:8,vars:1,consts:[["infoDropdown",""],["warningsDropdown",""],["errorsDropdown",""],["tuiHint","\u0412\u0441\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043F\u0440\u043E\u0448\u043B\u0438 \u0443\u0441\u043F\u0435\u0448\u043D\u043E","size","s","tuiAvatar","@tui.circle-check-big","appearance","positive",3,"round"],["size","s","tuiSlot","top"],["size","s","tuiAvatar","@tui.info","appearance","info","tuiDropdownLimitWidth","min",3,"tuiDropdownOpenChange","round","tuiDropdown","tuiDropdownOpen"],["size","s","tuiAvatar","@tui.triangle-alert","appearance","warning","tuiDropdownLimitWidth","min",3,"tuiDropdownOpenChange","round","tuiDropdown","tuiDropdownOpen"],["size","s","tuiAvatar","@tui.circle-x","appearance","negative","tuiDropdownLimitWidth","min",3,"tuiDropdownOpenChange","round","tuiDropdown","tuiDropdownOpen"],["tuiNotification","","size","s",3,"appearance"],["tuiTitle",""],[1,""],["tuiOption","","tuiNotification","","size","s",3,"appearance"]],template:function(r,i){r&1&&(de(0,R4,1,0,"tui-loader")(1,z4,2,1),Me(2,H4,3,2,"ng-template",null,0,Oi)(4,j4,3,2,"ng-template",null,1,Oi)(6,W4,3,2,"ng-template",null,2,Oi)),r&2&&fe(i.projectResource.isLoading()?0:1)},dependencies:[_d,BC,FC,NC,Ku,OC,Rn,rv,kr,sa,ua],styles:["[_nghost-%COMP%]{display:flex;gap:.4em}"]})};function $4(t,e){t&1&&j(0),t&2&&xe(" - ",e," ")}var Jh=class t{projectService=C(Di);theme=ge(this.savedTheme());themeButtonIcon=re(()=>{let e=this.theme();return e==="dark"?"@tui.moon":e==="light"?"@tui.sun":"@tui.sun-moon"});title=re(()=>this.projectService.projectResource.hasValue()?this.projectService.projectResource.value().project?.title??null:null);toggleTheme(){let e=this.theme(),r=e==="auto"?"dark":e==="dark"?"light":"auto";this.theme.set(r),localStorage.setItem("spec-box-theme",r)}savedTheme(){let e=localStorage.getItem("spec-box-theme");return e==="dark"||e==="light"?e:"auto"}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=K({type:t,selectors:[["app-root"]],decls:13,vars:5,consts:[[1,"header"],[1,"title"],["src","favicon.ico","alt","Spec Box TMS",1,"logo"],[1,"suffix"],["tuiIconButton","","appearance","secondary","size","s",3,"click","iconStart"]],template:function(r,i){if(r&1&&(L(0,"tui-root")(1,"div",0)(2,"div",1),ye(3,"img",2),L(4,"h2"),j(5," SpecBoxTMS "),de(6,$4,1,1),B()(),L(7,"div",3),ye(8,"diagnostics"),L(9,"button",4),Ce("click",function(){return i.toggleTheme()}),j(10," \u0422\u0435\u043C\u0430 "),B()()(),L(11,"main"),ye(12,"router-outlet"),B()()),r&2){let n;Ve("tuiTheme",i.theme()),R(6),fe((n=i.title())?6:-1,n),R(3),st("border-radius",100,"%"),Z("iconStart",i.themeButtonIcon())}},dependencies:[cl,k1,_i,Qh],styles:["main[_ngcontent-%COMP%]{height:calc(100vh - 46px)}.header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1em;height:46px;background-color:var(--tui-background-neutral-1)}.header[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{width:2rem;height:2rem;filter:drop-shadow(0 0 3px rgba(255,255,255,.4))}.header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .suffix[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}"]})};hy(Jh,GS).catch(t=>console.error(t));
|