spec-box-tms-sync 1.1.2 → 1.2.2
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/README.md +35 -0
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +7 -2
- package/dist/commands/serve.js.map +1 -1
- package/dist/lib/serve/models.d.ts +1 -0
- package/dist/lib/serve/models.d.ts.map +1 -1
- package/dist/lib/serve/models.js.map +1 -1
- package/dist/lib/serve/server.d.ts +2 -1
- package/dist/lib/serve/server.d.ts.map +1 -1
- package/dist/lib/serve/server.js +35 -1
- package/dist/lib/serve/server.js.map +1 -1
- package/dist/lib/serve/snapshot.d.ts +2 -1
- package/dist/lib/serve/snapshot.d.ts.map +1 -1
- package/dist/lib/serve/snapshot.js +9 -5
- package/dist/lib/serve/snapshot.js.map +1 -1
- package/dist/lib/test-matcher/junit/index.d.ts.map +1 -1
- package/dist/lib/test-matcher/junit/index.js +18 -3
- package/dist/lib/test-matcher/junit/index.js.map +1 -1
- package/dist/ui/{chunk-NYVIJIB3.js → chunk-DRKYG2KS.js} +1 -1
- package/dist/ui/{chunk-YW3B3PDE.js → chunk-KOYISRC6.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-OW2Z3D2N.js +436 -0
- package/package.json +5 -3
- package/dist/ui/main-T6ERP5M5.js +0 -436
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import{$ as Kn,$a as sy,$b as _c,A as G0,Aa as $t,Ab as rs,Ac as vy,B as St,Ba as wa,Bb as $,Bc as my,C as Y0,Ca as iy,Cb as It,Cc as gy,D as uo,Da as co,Db as Xe,Dc as Ea,E as up,Ea as Rt,Eb as fp,Ec as yy,F as K0,Fa as es,Fb as Cc,Fc as kc,G as Yn,Ga as mc,Gb as wc,Gc as Mc,H as Tn,Ha as ny,Hb as ei,Hc as by,I as rr,Ia as ay,Ib as _i,Ic as Cy,J as fc,Ja as ts,Jb as Wt,K as ba,Ka as _a,Kb as pr,Kc as wy,L as lp,La as O,Lb as st,M as Ca,Ma as yr,Mb as Qe,N as nn,Na as gc,Nb as is,O as Xo,Oa as xa,Ob as j,P as hc,Pa as fo,Pb as Br,Q as Ut,Qa as ho,Qb as we,R as mt,Ra as qt,Rb as Iu,S as lr,Sa as Zn,Sb as sn,T as Mu,Ta as qr,Tb as un,U as Nr,Ua as yc,Ub as ln,V as lo,Va as oy,Vb as xe,W as Z0,Wa as cp,Wb as Ai,X as hr,Xa as Z,Xb as Oi,Y as X0,Ya as Xn,Yb as cy,Z as jt,Za as re,Zb as Qn,_ as Ze,_a as dp,_b as Au,a as sc,aa as Q0,ab as Le,ac as Ri,b as ku,ba as te,bb as Ae,bc as dy,c as ap,ca as Qo,cb as Me,cc as J,d as Zo,da as C,db as uy,dc as it,e as Ot,ea as ui,eb as ly,ec as ns,f as tr,fa as pc,fb as bc,fc as fy,g as xr,ga as ji,gb as Ve,gc as hp,h as U0,ha as $i,hb as ne,hc as xi,i as op,ia as Ct,ib as ae,ic as U,j as uc,ja as wt,jb as on,jc as qi,k as sr,ka as J0,kb as bi,kc as Ti,l as j0,la as li,lb as dt,lc as Lr,m as Jr,ma as Dt,mb as ft,mc as Sa,n as je,na as Xt,nb as X,nc as vr,o as $0,oa as ey,ob as B,oc as Da,p as lc,pa as yi,pb as F,pc as xc,q as q0,qa as gr,qb as be,qc as Tc,r as Ie,ra as vc,rb as ci,rc as pp,s as cc,sa as ty,sb as Sn,sc as hy,t as ya,ta as ye,tb as Ta,tc as Sc,u as sp,ua as an,ub as Ci,uc as as,v as dc,va as ot,vb as wi,vc as Ou,w as W0,wa as Jo,wb as rt,wc as Dc,x as ur,xa as $r,xb as Pt,xc as py,y as Ii,ya as Pe,yb as Fr,yc as Dn,z as nr,za as ry,zb as ge,zc as Ec}from"./chunk-DRKYG2KS.js";import{a as se,b as Ke,c as H0}from"./chunk-IFGU66OU.js";var Iy=(()=>{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(xa),qt(Rt))};static \u0275dir=re({type:t})}return t})(),uD=(()=>{class t extends Iy{static \u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})();static \u0275dir=re({type:t,features:[Ae]})}return t})(),Nc=new te("");var lD={provide:Nc,useExisting:jt(()=>us),multi:!0};function cD(){let t=pp()?pp().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var dD=new te(""),us=(()=>{class t extends Iy{_compositionMode;_composing=!1;constructor(r,i,n){super(r,i),this._compositionMode=n,this._compositionMode==null&&(this._compositionMode=!cD())}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(xa),qt(Rt),qt(dD,8))};static \u0275dir=re({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&&ge("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:[xe([lD]),Ae]})}return t})();function wp(t){return t==null||_p(t)===0}function _p(t){return t==null?null:Array.isArray(t)||typeof t=="string"?t.length:t instanceof Set?t.size:null}var Fc=new te(""),fD=new te(""),hD=/^(?=.{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])?)*$/,vp=class{static min(e){return pD(e)}static max(e){return vD(e)}static required(e){return Ay(e)}static requiredTrue(e){return mD(e)}static email(e){return gD(e)}static minLength(e){return yD(e)}static maxLength(e){return bD(e)}static pattern(e){return CD(e)}static nullValidator(e){return Ac()}static compose(e){return By(e)}static composeAsync(e){return zy(e)}};function pD(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 vD(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 Ay(t){return wp(t.value)?{required:!0}:null}function mD(t){return t.value===!0?null:{required:!0}}function gD(t){return wp(t.value)||hD.test(t.value)?null:{email:!0}}function yD(t){return e=>{let r=e.value?.length??_p(e.value);return r===null||r===0?null:r<t?{minlength:{requiredLength:t,actualLength:r}}:null}}function bD(t){return e=>{let r=e.value?.length??_p(e.value);return r!==null&&r>t?{maxlength:{requiredLength:t,actualLength:r}}:null}}function CD(t){if(!t)return Ac;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(wp(i.value))return null;let n=i.value;return e.test(n)?null:{pattern:{requiredPattern:r,actualValue:n}}}}function Ac(t){return null}function Oy(t){return t!=null}function Ry(t){return yc(t)?Jr(t):t}function Py(t){let e={};return t.forEach(r=>{e=r!=null?se(se({},e),r):e}),Object.keys(e).length===0?null:e}function Ny(t,e){return e.map(r=>r(t))}function wD(t){return!t.validate}function Fy(t){return t.map(e=>wD(e)?e:r=>e.validate(r))}function By(t){if(!t)return null;let e=t.filter(Oy);return e.length==0?null:function(r){return Py(Ny(r,e))}}function Ly(t){return t!=null?By(Fy(t)):null}function zy(t){if(!t)return null;let e=t.filter(Oy);return e.length==0?null:function(r){let i=Ny(r,e).map(Ry);return W0(i).pipe(Ie(Py))}}function Vy(t){return t!=null?zy(Fy(t)):null}function _y(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function _D(t){return t._rawValidators}function xD(t){return t._rawAsyncValidators}function mp(t){return t?Array.isArray(t)?t:[t]:[]}function Oc(t,e){return Array.isArray(t)?t.includes(e):t===e}function xy(t,e){let r=mp(e);return mp(t).forEach(n=>{Oc(r,n)||r.push(n)}),r}function Ty(t,e){return mp(e).filter(r=>!Oc(t,r))}var Rc=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=Ly(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Vy(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}},gp=class extends Rc{name;get formDirective(){return null}get path(){return null}};var Ru="VALID",Ic="INVALID",os="PENDING",Pu="DISABLED",po=class{},Pc=class extends po{value;source;constructor(e,r){super(),this.value=e,this.source=r}},Nu=class extends po{pristine;source;constructor(e,r){super(),this.pristine=e,this.source=r}},Fu=class extends po{touched;source;constructor(e,r){super(),this.touched=e,this.source=r}},ss=class extends po{status;source;constructor(e,r){super(),this.status=e,this.source=r}};var Bu=class extends po{source;constructor(e){super(),this.source=e}};function TD(t){return(Bc(t)?t.validators:t)||null}function SD(t){return Array.isArray(t)?Ly(t):t||null}function DD(t,e){return(Bc(e)?e.asyncValidators:t)||null}function ED(t){return Array.isArray(t)?Vy(t):t||null}function Bc(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}var yp=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_hasRequired=ye(!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 it(this.statusReactive)}set status(e){it(()=>this.statusReactive.set(e))}_status=J(()=>this.statusReactive());statusReactive=ye(void 0);get valid(){return this.status===Ru}get invalid(){return this.status===Ic}get pending(){return this.status===os}get disabled(){return this.status===Pu}get enabled(){return this.status!==Pu}errors;get pristine(){return it(this.pristineReactive)}set pristine(e){it(()=>this.pristineReactive.set(e))}_pristine=J(()=>this.pristineReactive());pristineReactive=ye(!0);get dirty(){return!this.pristine}get touched(){return it(this.touchedReactive)}set touched(e){it(()=>this.touchedReactive.set(e))}_touched=J(()=>this.touchedReactive());touchedReactive=ye(!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(xy(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(xy(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Ty(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Ty(e,this._rawAsyncValidators))}hasValidator(e){return Oc(this._rawValidators,e)}hasAsyncValidator(e){return Oc(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(se({},e),{sourceControl:i})),r&&e.emitEvent!==!1&&this._events.next(new Fu(!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 Fu(!1,i))}markAsDirty(e={}){let r=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(Ke(se({},e),{sourceControl:i})),r&&e.emitEvent!==!1&&this._events.next(new Nu(!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 Nu(!0,i))}markAsPending(e={}){this.status=os;let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new ss(this.status,r)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(Ke(se({},e),{sourceControl:r}))}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Pu,this.errors=null,this._forEachChild(n=>{n.disable(Ke(se({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Pc(this.value,i)),this._events.next(new ss(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Ke(se({},e),{skipPristineCheck:r}),this),this._onDisabledChange.forEach(n=>n(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Ru,this._forEachChild(i=>{i.enable(Ke(se({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Ke(se({},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===Ru||this.status===os)&&this._runAsyncValidator(i,e.emitEvent)}let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Pc(this.value,r)),this._events.next(new ss(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(Ke(se({},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()?Pu:Ru}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,r){if(this.asyncValidator){this.status=os,this._hasOwnPendingAsyncValidator={emitEvent:r!==!1,shouldHaveEmitted:e!==!1};let i=Ry(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 ss(this.status,r)),this._parent&&this._parent._updateControlsErrors(e,r,i)}_initObservables(){this.valueChanges=new yi,this.statusChanges=new yi}_calculateStatus(){return this._allControlsDisabled()?Pu:this.errors?Ic:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(os)?os:this._anyControlsHaveStatus(Ic)?Ic:Ru}_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 Nu(this.pristine,r))}_updateTouched(e={},r){this.touched=this._anyControlsTouched(),this._events.next(new Fu(this.touched,r)),e.onlySelf||this._parent?._updateTouched(e,r)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Bc(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=SD(this._rawValidators),this._updateHasRequiredValidator()}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=ED(this._rawAsyncValidators)}_updateHasRequiredValidator(){it(()=>this._hasRequired.set(this.hasValidator(vp.required)))}};function kD(t){return t.tagName==="INPUT"||t.tagName==="SELECT"||t.tagName==="TEXTAREA"}function MD(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 bp=class{kind;context;control;message;constructor({kind:e,context:r,control:i}){this.kind=e,this.context=r,this.control=i}};var ID=(()=>{class t{_validator=Ac;_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):Ac,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=re({type:t,features:[$r]})}return t})();var AD={provide:Fc,useExisting:jt(()=>Hy),multi:!0};var Hy=(()=>{class t extends ID{required;inputName="required";normalizeInput=Da;createValidator=r=>Ay;enabled(r){return r}static \u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})();static \u0275dir=re({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:[xe([AD]),Ae]})}return t})();var OD=new te(""),Uy=new te("",{factory:()=>xp}),xp="always";function RD(t,e){return[...e.path,t]}function Sy(t,e,r=xp){ND(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),FD(t,e),LD(t,e),BD(t,e),PD(t,e)}function Dy(t,e){t.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function PD(t,e){if(e.valueAccessor.setDisabledState){let r=i=>{e.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(r),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(r)})}}function ND(t,e){let r=_D(t);e.validator!==null?t.setValidators(_y(r,e.validator)):typeof r=="function"&&t.setValidators([r]);let i=xD(t);e.asyncValidator!==null?t.setAsyncValidators(_y(i,e.asyncValidator)):typeof i=="function"&&t.setAsyncValidators([i]);let n=()=>t.updateValueAndValidity();Dy(e._rawValidators,n),Dy(e._rawAsyncValidators,n)}function FD(t,e){e.valueAccessor.registerOnChange(r=>{t._pendingValue=r,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&jy(t,e)})}function BD(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&jy(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function jy(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function LD(t,e){let r=(i,n)=>{e.valueAccessor.writeValue(i),n&&e.viewToModelUpdate(i)};t.registerOnChange(r),e._registerOnDestroy(()=>{t._unregisterOnChange(r)})}function zD(t,e){if(!t.hasOwnProperty("model"))return!1;let r=t.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function VD(t){return Object.getPrototypeOf(t.constructor)===uD}function HD(t,e){if(!e)return null;Array.isArray(e);let r,i,n;return e.forEach(a=>{a.constructor===us?r=a:VD(a)?i=a:n=a}),n||i||r||null}var UD={provide:OD,useFactory:()=>{let t=C(Wr,{self:!0});return{setParseErrors:e=>{t.setParseErrorSource(e)},set onReset(e){t.onReset=e}}}},Wr=class extends Rc{_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 Bu&&this.control&&this.userOnReset?.(this.control.value)}),this.subscription?.add(this.resetSubscription))}isNativeFormElement=!1;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=HD(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 ku,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 Bu&&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=kD(e.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(n=>n instanceof Hy))}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&&MD(this.renderer,e.nativeElement,i,n)}_convertErrors(e){if(e===null)return[];let r=this.control;return Object.entries(e).map(([i,n])=>new bp({context:n,kind:i,control:r}))}setParseErrorSource(e){if(e===void 0)return;let r=null,i=J(()=>{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}))}},Cp=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 ls=(()=>{class t extends Cp{constructor(r){super(r)}static \u0275fac=function(i){return new(i||t)(qt(Wr,2))};static \u0275dir=re({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,n){i&2&&Qe("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 Ey(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}function ky(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var jD=class extends yp{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,r,i){super(TD(r),DD(i,r)),this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Bc(r)&&(r.nonNullable||r.initialValueIsDefault)&&(ky(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){it(()=>{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 Bu(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Ey(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Ey(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){ky(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 $D={provide:Wr,useExisting:jt(()=>cn)},My=Promise.resolve(),cn=(()=>{class t extends Wr{_changeDetectorRef;callSetDisabledState;control=new jD;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yi;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),zD(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,Sy(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:!1})}_setupWithForm(r){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,Sy(this.control,this,r))}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(r){My.then(()=>{this.control.setValue(r,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(r){let i=r.isDisabled.currentValue,n=i!==0&&Da(i);My.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(r){return this._parent?RD(r,this._parent):[r]}static \u0275fac=function(i){return new(i||t)(qt(gp,9),qt(Fc,10),qt(fD,10),qt(Nc,10),qt(vr,8),qt(Uy,8),qt(li,8),qt(xa,8))};static \u0275dir=re({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:[xe([$D,UD]),Ae,$r,sy(null)]})}return t})();var qD=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Xn({type:t});static \u0275inj=Kn({})}return t})();var ka=(()=>{class t{static withConfig(r){return{ngModule:t,providers:[{provide:Uy,useValue:r.callSetDisabledState??xp}]}}static \u0275fac=function(i){return new(i||t)};static \u0275mod=Xn({type:t});static \u0275inj=Kn({imports:[qD]})}return t})();function Ma(t,e,r){let i=GD(e??t,t);return WD(r??i,i)}function WD(t,...e){return e.reduce((r,i)=>r<i?r:i,t)}function GD(t,...e){return e.reduce((r,i)=>r>i?r:i,t)}function Sp(t,e){return t.slice(0,Math.max(e,0)).concat(t.slice(Math.max(e+1,0)))}function $y(t,e,r){let i=r?t.findIndex(n=>r(n,e)):t.indexOf(e);return i===-1?[...t,e]:Sp(t,i)}function En(t){return typeof t=="string"}function qy(t,e){return t===e?0:En(t)&&En(e)?t.localeCompare(e,void 0,{numeric:!0}):t>e?1:-1}var YD=0;function cs(){return`tui_${YD++}${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[sc]&&t[sc].applyValueToInputSignal(t[sc],e)}var KD=new te("",{factory:()=>{let t=new Map;return C(Xt).onDestroy(()=>t.forEach(e=>e.destroy())),t}});function Gt(t){let e=C(KD),r=C(ji);e.has(t)||e.set(t,xc(t,{environmentInjector:r}))}function Wy(t,e,r){return{provide:t,useFactory:()=>se(se({},C(t,{optional:!0,skipSelf:!0})||r),C(e,{optional:!0})||(typeof e=="function"?e():e))}}function ut(t){let e=new te("",{factory:()=>t});return[e,r=>Wy(e,r,t)]}function Pi(t,e,r,i={self:!0}){let n=Jo(r)?r:ye(r),a=C(t,i),o=a?.[`${e.toString()}Change`];if(!a)return n;let s;return ot(()=>{let u=n();s!==u&&(Jo(a[e])?vo(a[e],u):a[e]=u,a.ngOnChanges?.({}),o?.emit?.(u),s=u)}),n}function _t(t,e,r=!1){return{provide:t,useExisting:e,multi:r}}function ds(t){return t instanceof Rt?t.nativeElement:t}function fs(t){return Array.isArray(t)?t:[t]}function Lt(t){t||(t=C(Xt));let e=new Ot(r=>{if(t.destroyed){r.next();return}return t.onDestroy(r.next.bind(r))});return r=>r.pipe(lr(e))}var Dp=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(Lt(this.destroyRef)).subscribe({next:i=>e(i)});return{unsubscribe:()=>r.unsubscribe()}}};function kn(t,e){return new Dp(t)}function hs(t,e){let r=e?.injector??C(li),i=new U0(1),n=ot(()=>{let a;try{a=t()}catch(o){it(()=>i.error(o));return}it(()=>i.next(a))},{injector:r,manualCleanup:!0});return r.get(Xt).onDestroy(()=>{n.destroy(),i.complete()}),i.asObservable()}function Wi(t,e){let i=!e?.manualCleanup?e?.injector?.get(Xt)??C(Xt):null,n=QD(e?.equal),a;e?.requireSync?a=ye({kind:0},{equal:n}):a=ye({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)),J(()=>{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 QD(t=Object.is){return(e,r)=>e.kind===1&&r.kind===1&&t(e.value,r.value)}var Lc=class{},Jn=class extends Lc{},Mn=class extends Lc{};function Gy(t,e,r){return{provide:t,deps:[[new co,new wa,t],r],useFactory:ps(e)}}function ps(t){return(e,r)=>e?.find?.(i=>i!==r&&i.type===t)||Object.create(r,{type:{value:t}})}function Vc(t,e){return Gy(Jn,t,e)}function Hc(t,e){return Gy(Mn,t,e)}function Ep(t){return _t(Mn,t,!0)}var zc=class{};function Uc(t){return _t(zc,t,!0)}var Ia=class extends Ot{};function vs(t){return _t(Ia,t,!0)}var jc=(()=>{class t{constructor(){this.destroyRef=C(Xt),this.drivers=fs(C(Ia,{self:!0,optional:!0})||[]),this.vehicles=fs(C(zc,{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(),Lt(this.destroyRef)).subscribe(i=>{r?.toggle(i)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t})}}return t})();var Yy={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},Lu=()=>{},ea=Ke(se({},Yy),{toJSON:()=>Yy}),ta=()=>!1,zu=()=>!0;function JD(t,e){return Array.isArray(t)&&Array.isArray(e)&&!t.length&&!e.length}var $c=(t,e,r=String)=>r(t).toLowerCase().includes(e.toLowerCase()),Ky=(t,e,r=String)=>r(t).toLowerCase()===e.toLowerCase(),Zy=(t,e)=>t===e||JD(t,e);var Xy={acceptNode(t){return"ownerSVGElement"in t?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},kp="\xA0";var Qy="5.16.0";var Cr=new te("",{factory:()=>{let{defaultView:t}=C(Dt);if(!t)throw new Error("Window is not available");return t}}),mo=new te("",{factory:()=>{let{requestAnimationFrame:t,cancelAnimationFrame:e}=C(Cr);return new Ot(i=>{let n=Number.NaN,a=o=>{i.next(o),n=t(a)};return n=t(a),()=>{e(n)}}).pipe(nn())}});var Jy=new te("",{factory:()=>C(Cr).localStorage});var Mp=new te("",{factory:()=>C(Cr).navigator});var eb=new te("",{factory:()=>C(Mp).userAgent});function eE(t){return t.matches("input")}function tE(t){return t.matches("textarea")}function tb(t){return eE(t)||tE(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 qc(t){return"getRootNode"in t&&t.isConnected?t.getRootNode():t.ownerDocument}function Wc(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=qc(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 rb(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(Rt).nativeElement}function Ap(t){return tb(t)&&!t.readOnly&&t.inputMode!=="none"||!!t.isContentEditable}function Op(t=0,e=0){let r={x:t,y:e,left:t,right:t,top:e,bottom:e,width:0,height:0};return Ke(se({},r),{toJSON:()=>r})}function Gc(t,e=C(ui)){let r=e.get(Cr);!r.tuiInputPatched&&Dn(e.get(an))&&(r.tuiInputPatched=!0,Ip(r.HTMLInputElement.prototype),Ip(r.HTMLTextAreaElement.prototype),Ip(r.HTMLSelectElement.prototype));let i=Jo(t)?void 0:ds(t),n=()=>{},a={injector:e},o=ye(i?.value||""),s=u=>{let l=()=>it(()=>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()),Jo(t)?ot(()=>{i=ds(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 Ip(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 Rp(t){return Wi(ur(t,"resize").pipe(Ut(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(se({},i),{toJSON:()=>JSON.stringify(i)})})),{requireSync:!0})}var ib=(()=>{class t{constructor(){let r=Be();_a(()=>requestAnimationFrame(()=>r.style.setProperty("transition","")))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiTransitioned",""]],hostAttrs:[2,"transition","none"]})}}return t})();var iE={appearance:""},nb=new te("",{factory:()=>iE});function In(t){return _t(nb,t)}var nE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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=Gt(nE),this.modes=J((r=this.tuiAppearanceMode())=>!r||En(r)?r:r.join(" ")),this.tuiAppearance=U(C(nb).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=re({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([ib])]})}}return t})();function ms(t,e={}){return Pi(hn,"tuiAppearance",t,e)}function ab(t,e={}){return Pi(hn,"tuiAppearanceState",t,e)}function ob(t,e={}){return Pi(hn,"tuiAppearanceFocus",t,e)}function sb(t,e={}){return Pi(hn,"tuiAppearanceMode",t,e)}var An=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,features:[Le([{directive:hn,inputs:["tuiAppearance","appearance","tuiAppearanceState","tuiAppearanceState","tuiAppearanceFocus","tuiAppearanceFocus","tuiAppearanceMode","tuiAppearanceMode"]}])]})}}return t})();var aE={cardNumber:["Number","Card number"],cardExpiry:["Expires","Valid through"]},oE={demoTexts:["Dark mode","Background","Value"],preview:"Preview",menuText:"Menu",searchText:"Search",seeAlsoText:"See also",tocText:"On this page",sourceCodeText:"Source code"},sE={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"}},uE={showHideText:"Show/Hide",paginationTexts:{pages:"Pages",linesPerPage:"Lines per page",of:"of"}},lE={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"},cE={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:lE},dE={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"]},fE={inputSearch:{popular:"Popular",history:"Recent",placeholder:"Type query",hotkey:"to search",all:"All",empty:"Nothing found"}},ub=se(se(se(se(se(se(se({name:"english"},cE),dE),uE),aE),sE),oE),fE);var lb=new te("",{factory:()=>ub}),cb=new te("",{factory:()=>ye(C(lb))});function yt(t){return(e=C(cb))=>J(()=>e()[t])}function db(){return new Ot(t=>{let e,r=()=>{e=pE(),e.onclose=()=>r(),e.oncancel=i=>{i.preventDefault(),t.next()}};return r(),()=>e.destroy()})}function pE(){try{return new CloseWatcher}catch{return{destroy:()=>{}}}}function Yc(t){return new Ot(e=>t?.valueChanges?.pipe(Ut(t.value)).subscribe(e))}function Yt(t,e,r={}){return ur(t,e,r)}function fb(){return Nr(t=>t.preventDefault())}function hb(){return Nr(t=>t.stopPropagation())}function Kc(t,e=Boolean){return Zo(mt(r=>e(r)?t(r):sr))}function pb(t){return Yt(t===t.ownerDocument.documentElement?t.ownerDocument:t,"scroll")}function Zc(t){return Zo(lr(G0.pipe(Lt(t),uo(()=>sr),K0(null))))}var vb={now:uc.now.bind(uc),schedule(t,e,r){return uc.schedule(function(i){return it(()=>t.call(this,i))},e,r)}};function Np(t=C(vr)){return Nr(()=>t.markForCheck())}function vE(t=C(gr)){return e=>new Ot(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 Ot(r=>t.runOutsideAngular(()=>e.subscribe(r)))}function ra(t=C(gr)){return Zo(Gi(t),vE(t))}var Pp=class{constructor(e,r=op){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=op){return new Pp(t.runOutsideAngular.bind(t),e)}var Fp=new te("",{factory:()=>C(Dt).defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1}),mb=new te("",{factory:()=>C(Fp)?0:1}),mE=new te("",{factory:()=>"assets/taiga-ui/icons"});var Xc=new te("",{factory:()=>null});function Qc(t){return _t(Xc,t)}var gE=new te("",{factory:()=>({mobile:768,desktopSmall:1280,desktopLarge:1/0})}),gb=new te("",{factory:()=>{let t=Rp(C(Cr)),e=C(gE),r=Object.values(e).sort((n,a)=>n-a),i=Object.keys(e).reduce((n,a)=>Ke(se({},n),{[e[a]]:a}),{});return J(()=>{let{width:n}=t(),o=r.find(s=>s>n)||r[r.length-1]||0;return i[o]??"desktopLarge"})}}),yE={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"},[Jc,rH]=ut(yE),bE="tuiDark",CE=new te("",{factory:()=>bE}),ed=new te("",{factory:()=>{let t=C(Jy),e=C(CE),r=t?.getItem(e),i=C(Cr).matchMedia("(prefers-color-scheme: dark)"),n=ye(r?r==="true":i.matches),a=n.set.bind(n),o=s=>{t?.setItem(e,String(s)),a(s)};return ur(i,"change").pipe(St(()=>!t?.getItem(e)),Lt()).subscribe(()=>a(i.matches)),Object.assign(n,{set:o,update:s=>o(s(n())),reset:()=>{t?.removeItem(e),a(i.matches)}})}});var iH=new te("",{factory:yt("months")}),yb=new te("",{factory:yt("close")}),nH=new te("",{factory:yt("back")}),bb=new te("",{factory:yt("clear")}),Cb=new te("",{factory:yt("nothingFoundMessage")}),aH=new te("",{factory:yt("defaultErrorMessage")}),oH=new te("",{factory:yt("spinTexts")}),sH=new te("",{factory:yt("shortWeekDays")}),td=new te("",{factory:()=>""}),rd=new te("",{factory:()=>""}),wE=new te("",{factory:()=>({})});var _E=new te("",{factory:()=>{let t=C(mE);return e=>`${t}/${e.replace(/@[a-z]+\./i,"").replaceAll(".","/")}.svg`}});function id(t){return t?.match(/@([^.]*)\./)?.[1]||t||void 0}function wb(){let t=C(wE),e=C(_E);return r=>!r||r.includes("/")?r.replace(/@[a-z]+\./i,""):r.startsWith("@font.")?r.replace("@font.",""):t[r]??e(r)}var uH={precision:Number.NaN,decimalSeparator:".",thousandSeparator:kp,rounding:"truncate",decimalMode:"pad",negativePattern:"prefixFirst"};var Bp=new te("");var gs=new te("",{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(se({},i),{toJSON:()=>JSON.stringify(i)})}}}});var _b={self:!0,optional:!0},xE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),Ni=(()=>{class t{constructor(){this.resolver=wb(),this.nothing=Gt(xE),this.start=J(()=>this.resolve(this.iconStart())),this.end=J(()=>this.resolve(this.iconEnd())),this.startMode=J(()=>id(this.iconStart())),this.endMode=J(()=>id(this.iconEnd())),this.iconEnd=U(C(rd,_b)),this.iconStart=U(C(td,_b))}resolve(r){return r?id(r)==="font"?`'${this.resolver(r)}'`:`url(${this.resolver(r)})`:null}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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 ys(t,e){return Pi(Ni,"iconStart",t,e)}function Lp(t,e={}){return Pi(Ni,"iconEnd",t,e)}var Yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,features:[Le([{directive:Ni,inputs:["iconStart","iconStart","iconEnd","iconEnd"]}])]})}}return t})();var TE={appearance:"primary",size:"l"},[Vu,Gr]=ut(TE),SE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),ti=(()=>{class t{constructor(){this.nothing=Gt(SE),this.size=U(C(Vu).size)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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:[xe([In(Vu)]),Le([An,Yi])]})}}return t})();var nd={stringify:ye(String),identityMatcher:ye(Zy),disabledItemHandler:ye(ta)},Si=new te("",{factory:()=>nd});function ad(t){return{provide:Si,deps:[[new wa,new co,Si]],useFactory:e=>se({stringify:ye(e?.stringify()??nd.stringify()),identityMatcher:ye(e?.identityMatcher()??nd.identityMatcher()),disabledItemHandler:ye(e?.disabledItemHandler()??nd.disabledItemHandler())},t)}}var DE=(()=>{class t{constructor(){this.handlers=C(Si,{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=re({type:t,inputs:{stringify:[1,"stringify"],identityMatcher:[1,"identityMatcher"],disabledItemHandler:[1,"disabledItemHandler"]},features:[xe([_t(Si,t)])]})}}return t})(),Tb=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,features:[Le([{directive:DE,inputs:["stringify","stringify","identityMatcher","identityMatcher","disabledItemHandler","disabledItemHandler"]}])]})}}return t})();var zp;try{zp=typeof Intl<"u"&&Intl.v8BreakIterator}catch{zp=!1}var Sb=(()=>{class t{_platformId=C(an);isBrowser=this._platformId?Dn(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||zp)&&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=$t({token:t,factory:t.\u0275fac})}return t})();var kE=new te("cdk-dir-doc",{providedIn:"root",factory:()=>C(Dt)}),ME=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function IE(t){let e=t?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?ME.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var Db=(()=>{class t{get value(){return this.valueSignal()}valueSignal=ye("ltr");change=new yi;constructor(){let r=C(kE,{optional:!0});if(r){let i=r.body?r.body.dir:null,n=r.documentElement?r.documentElement.dir:null;this.valueSignal.set(IE(i||n||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({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||{}),od,bo;function Eb(){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 bs(){if(typeof document!="object"||!document)return pn.NORMAL;if(od==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),od=pn.NORMAL,t.scrollLeft===0&&(t.scrollLeft=1,od=t.scrollLeft===0?pn.NEGATED:pn.INVERTED),t.remove()}return od}var AE=20,OE=(()=>{class t{_ngZone=C(gr);_platform=C(Sb);_renderer=C(gc).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=AE){return this._platform.isBrowser?new Ot(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let n=r>0?this._scrolled.pipe(Y0(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(St(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=ds(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=$t({token:t,factory:t.\u0275fac})}return t})(),kb=(()=>{class t{elementRef=C(Rt);scrollDispatcher=C(OE);ngZone=C(gr);dir=C(Db,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new tr;_renderer=C(xa);_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&&bs()!=pn.NORMAL?(r.left!=null&&(r.right=i.scrollWidth-i.clientWidth-r.left),bs()==pn.INVERTED?r.left=r.right:bs()==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;Eb()?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&&bs()==pn.INVERTED?r==i?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft:o&&bs()==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=re({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return t})();var Ib="tui-enter",Ab="tui-leave",RE="tui-animated",Mb=`${Ab}_${Qy.split(".")[0]}`,On=(()=>{class t{constructor(){this.renderer=C(qr)._hostLView?.[11],this.el=Be(),_a(()=>this.remove()),this.renderer&&Dn(C(an))&&PE(this.renderer.delegate||this.renderer)}remove(){this.el.isConnected&&!this.el.getAnimations?.().length&&this.el.classList.remove(Ib)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiAnimated",""]],hostAttrs:[1,"tui-enter","tui-animated"],hostBindings:function(i,n){i&1&&ge("animationcancel.self",function(){return n.remove()})("animationend.self",function(){return n.remove()})}})}}return t})();function PE(t){if(t.data[Mb])return;let{removeChild:e}=t;t.data[Mb]=!0,t.removeChild=(r,i,n)=>{if(!fn(i)||!i.classList.contains(RE)){e.call(t,r,i,n);return}i.classList.remove(Ib);let{length:a}=i.getAnimations?.()||[];i.classList.add(Ab);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 NE=/(?: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,FE=/^((?!chrome|android).)*safari/i,BE=/ipad|iphone|ipod/i;function LE({userAgent:t,maxTouchPoints:e}){return BE.test(t)||FE.test(t)&&e>1}var Co=new te("",{factory:()=>LE(C(Mp))}),Rn=new te("",{factory:()=>NE.test(C(eb))}),ud=new te("",{factory:()=>C(Rn)&&!C(Co)});var Ob=new te("",{factory:()=>!!C(Cr)?.webkitConvertPointFromNodeToPage});function Rb({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 zE(t,e){}function VE(t,e){if(t&1&&(B(0,"div",2),ge("mousedown.capture.prevent",function(){return 0}),be(1,"div",3),F()),t&2){let r=$();Qe("t-bar_has-horizontal",r[1])}}function HE(t,e){if(t&1&&(B(0,"div",4),ge("mousedown.capture.prevent",function(){return 0}),be(1,"div",5),F()),t&2){let r=$();Qe("t-bar_has-vertical",r[0])}}function UE(t,e){if(t&1&&(ne(0,VE,2,2,"div",0),ne(1,HE,2,2,"div",1)),t&2){let r=e;ae(r[0]?0:-1),O(),ae(r[1]?1:-1)}}function jE(t,e){if(t&1&&(ne(0,UE,2,2),Qn(1,"async")),t&2){let r,i=$();ae((r=Au(1,1,i.refresh$))?0:-1,r)}}var $E=["*"];function qE(t,e){if(t&1&&be(0,"tui-scroll-controls",2),t&2){let r=$();Qe("t-hover-mode",r.options.mode==="hover")}}var Cs=new te("",{factory:()=>new Rt(C(Dt).documentElement)}),Vp=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiScrollRef",""]],features:[xe([_t(Cs,Rt)])]})}}return t})(),Pb=(()=>{class t extends Ot{constructor(){super(r=>this.stream$.subscribe(r)),this.scrollRef=C(Cs),this.stream$=C(mo).pipe(lo(300,ia()),Ie(()=>this.scrollbars),Ut([!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=Ze({token:t,factory:t.\u0275fac})}}return t})(),Nb=(()=>{class t extends Ot{constructor(){super(r=>this.scroll$.subscribe(r)),this.el=Be(),this.element=C(Cs).nativeElement,this.scroll$=nr(Yt(this.el.parentElement,"mousedown").pipe(St(({target:r})=>r!==this.el),Ie(r=>this.getScrolled(r,.5,.5))),Yt(this.el,"mousedown").pipe(Gi(),mt(r=>{let{ownerDocument:i}=this.el,n=this.el.getBoundingClientRect(),a=WE(r,n),o=GE(r,n);return Yt(i,"mousemove").pipe(Ie(s=>this.getScrolled(s,a,o)),lr(Yt(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=Ze({token:t,factory:t.\u0275fac})}}return t})();function WE({clientY:t},{top:e,height:r}){return(t-e)/r}function GE({clientX:t},{left:e,width:r}){return(t-e)/r}var ld=24,Fb=(()=>{class t extends Ot{constructor(){super(r=>this.stream$.subscribe(r)),this.scrollRef=C(Cs),this.stream$=nr(C(mo).pipe(lo(100,ia())),pb(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>ld&&this.tuiScrollbar()==="vertical"||r.clientWidth*r.clientWidth/r.scrollWidth>ld&&this.tuiScrollbar()==="horizontal"?0:this.tuiScrollbar()==="vertical"?ld/r.clientHeight:ld/r.clientWidth}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,inputs:{tuiScrollbar:[1,"tuiScrollbar"]},features:[Ae]})}}return t})(),YE=(()=>{class t{constructor(){this.scrollRef=C(Cs),this.style=Be().style,this.scrollSub=C(Nb).pipe(Lt()).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(Fb).pipe(Lt()).subscribe(r=>Object.assign(this.style,r)),this.tuiScrollbar=U("vertical")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiScrollbar",""]],inputs:{tuiScrollbar:[1,"tuiScrollbar"]},features:[xe([Nb]),Le([{directive:Fb,inputs:["tuiScrollbar","tuiScrollbar"]}])]})}}return t})(),KE={mode:"always"},[cd,A6]=ut(KE),Hu=(()=>{class t{constructor(){this.scrollable=C(kb,{optional:!0,host:!0}),this.el=Be(),this.nativeScrollbar=C(cd).mode==="native",this.refresh$=C(Pb)}ngOnInit(){this.scrollable?.getElementRef().nativeElement.prepend(this.el)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["tui-scroll-controls"]],features:[xe([Pb])],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&&ne(0,zE,0,0)(1,jE,2,3),i&2&&ae(n.nativeScrollbar?0:1)},dependencies:[Ou,On,YE],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})(),ZE="tui-scroll-into-view";var ws=(()=>{class t{constructor(){this.el=Be(),this.options=C(cd),this.isIOS=C(Co),this.browserScrollRef=new Rt(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}=rb(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=Z({type:t,selectors:[["tui-scrollbar"]],hostVars:2,hostBindings:function(i,n){i&1&&ge("tui-scrollable.stop",function(o){return n.scrollRef=o.detail})("tui-scroll-into-view.stop",function(o){return n.scrollIntoView(o.detail)}),i&2&&Qe("_native-hidden",n.options.mode!=="native"&&(!n.isIOS||n.options.mode==="hidden"))},features:[xe([{provide:Cs,useFactory:()=>C(t).browserScrollRef}]),Le([Vp])],ngContentSelectors:$E,decls:3,vars:3,consts:[[1,"t-bars",3,"t-hover-mode"],[1,"t-content"],[1,"t-bars"]],template:function(i,n){i&1&&(It(),ne(0,qE,1,2,"tui-scroll-controls",0),B(1,"div",1),Xe(2),F()),i&2&&(ae(!n.isIOS&&n.options.mode!=="native"&&n.options.mode!=="hidden"?0:-1),O(),Qe("t-content_delegated",n.delegated))},dependencies:[Hu],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})(),dd=(()=>{class t{constructor(){this.el=Be(),this.destroyRef=C(Xt),this.tuiScrollIntoView=U(),this.dispatchEvent=ot(()=>{this.tuiScrollIntoView()&&Ii(0).pipe(Lt(this.destroyRef)).subscribe(()=>{this.el.dispatchEvent(new CustomEvent(ZE,{bubbles:!0,detail:this.el}))})})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiScrollIntoView",""]],inputs:{tuiScrollIntoView:[1,"tuiScrollIntoView"]}})}}return t})();function XE({currentTarget:t,relatedTarget:e}){return!fn(e)||!fn(t)||!t.contains(e)}var Uu=(()=>{class t extends Ot{constructor(){super(r=>this.stream$.subscribe(r)),this.el=Be(),this.zone=C(gr),this.stream$=nr(Yt(this.el,"mouseenter").pipe(Ie(zu)),Yt(this.el,"mouseleave").pipe(Ie(ta)),Yt(this.el,"mouseout").pipe(St(XE),Ie(ta))).pipe(rr(),ra(this.zone))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac})}}return t})();var[QE,Lb]=ut({appearance:"action"}),JE=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),fd=(()=>{class t{constructor(){this.nothing=Gt(JE)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["a","tuiLink",""],["button","tuiLink",""]],hostAttrs:["tuiLink",""],features:[xe([In(QE)]),Le([An,Yi])]})}}return t})();var Oa=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiItem",""]]})}}return t})();var ek=typeof IntersectionObserver>"u"?class{root=null;rootMargin="";thresholds=[];observe(){}unobserve(){}disconnect(){}takeRecords(){return[]}}:IntersectionObserver,tk=new te(""),rk="0px 0px 0px 0px",hd=new te("",{factory:()=>rk});var ik=0,Hp=new te("",{factory:()=>ik});var Up=(()=>{class t extends Ot{nativeElement=C(Rt).nativeElement;rootMargin=C(hd);threshold=C(Hp);root=C(tk,{optional:!0})?.nativeElement??null;constructor(){super(r=>{let i=new ek(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=Ze({token:t,factory:t.\u0275fac})}return t})();var nk={position:"fixed",visibility:"hidden",pointerEvents:"none"},ak={height:"fit-content",lineHeight:"1em",fontSize:"calc(env(preferred-text-scale) * 1em)"};function zb(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,nk),Object.assign(i?.body.style||{},ak),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 jp=new te(""),Vb=(()=>{class t{constructor(){this.handler=C(jp,{optional:!0}),this.enabled=!C(t,{optional:!0,skipSelf:!0})&&Dn(C(an))&&typeof ResizeObserver<"u",this.nothing=C(Xt).onDestroy(this.enabled&&this.handler?zb(this.handler,C(Dt).createElement("iframe")):Lu)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t})}}return t})();var $p=class extends CustomEvent{constructor(e,a){var o=a,{clientX:r,clientY:i}=o,n=H0(o,["clientX","clientY"]);super(e,Ke(se({},n),{detail:{clientX:r,clientY:i}}))}},sk=({userAgent:t,maxTouchPoints:e})=>/ipad|iphone|ipod/i.test(t)||/^((?!chrome|android).)*safari/i.test(t)&&e>1,uk=700,Hb=typeof navigator>"u"?null:navigator,lk=15,qp=class extends Ec{constructor(){super(...arguments),this.isIOS=!!Hb&&sk(Hb)}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()},uk)}),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)<=lk||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 $p("longtap",{clientX:r,clientY:i,bubbles:!1,cancelable:!1,composed:!1}))}},pd=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,"")}},Wp=class extends pd{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(Dt))}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=Ze({token:t,factory:t.\u0275fac})}}return t})(),ck=new te("",{factory:()=>{let t=C(Dt);return e=>e.split(".").reduce((r,i)=>r?.[i],t.defaultView)}}),dk=(()=>{class t extends wo{constructor(){super(...arguments),this.handler=C(ck),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=Ze({token:t,factory:t.\u0275fac})}}return t})(),fk=(()=>{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=Ze({token:t,factory:t.\u0275fac})}}return t})(),hk=(()=>{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=Ze({token:t,factory:t.\u0275fac})}}return t})(),pk=(()=>{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=Ze({token:t,factory:t.\u0275fac})}}return t})(),vk=(()=>{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=Ze({token:t,factory:t.\u0275fac})}}return t})(),mk=(()=>{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=Ze({token:t,factory:t.\u0275fac})}}return t})(),Gp=class extends pd{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()}}},gk=(()=>{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=Ze({token:t,factory:t.\u0275fac})}}return t})(),yk=[gk,vk,dk,fk,hk,pk,mk,qp,Wp,Gp],bk=yk.map(t=>({provide:vy,multi:!0,useClass:t}));function Ub(){return bk}var Ck=new te("",{factory:()=>ye(0)});function wk(){return{provide:jp,useFactory:()=>{let t=C(Ck),{documentElement:e}=C(Dt);return r=>{let i=Ma(r,17,28)-17;return t.set(i),e.style.setProperty("--t-font-offset",String(i))}}}}var _k=300;function jb(t){return t&&_k/t}var xk=["Spacebar","Backspace","Delete","ArrowLeft","ArrowRight","Left","Right","End","Home"];function $b(t=""){return t.length===1||xk.includes(t)}function Yp(t,e="tui-popups"){return!!Wc(t)?.some(r=>!r.closest(e))}var Tk={apis:"stable",fontScaling:!0,scrollbars:"custom"},vd=new te("");function qb(t={}){let e=se(se({},Tk),t),r=[{provide:my,useValue:!1},{provide:vd,useValue:e},Ub(),dp(()=>{let i=C(Dt),n=C(yy),a=C(ed);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(wk()),r}var Wb=new te("",{factory:()=>{let{apis:t}=C(vd);return t!=="stable"&&(t.all||!!t.liquidGlass)}});function Kp(t,e){return(r,i)=>{let n=r||se({},i||e);return Object.keys(t).forEach(a=>{n[a]=t[a]}),n}}var[Sk,Gb]=ut({height:"normal",size:"l"}),Dk=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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=Gt(Dk),this.options=C(Sk),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=re({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:[xe([Gr({size:"s"})])]})}}return t})();var md=(()=>{class t{constructor(){this.el=Be(),this.doc=C(Dt),this.control$=new xr(null),this.sub=this.control$.pipe(mt(r=>r?.events||je(null)),Tn(0),Gi(),Zc()).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=re({type:t,selectors:[["","tuiNativeValidator",""]],hostBindings:function(i,n){i&1&&ge("focusout",function(){return n.handleValidation()})},inputs:{tuiNativeValidator:[1,"tuiNativeValidator"]},features:[xe([_t(Fc,t,!0)])]})}}return t})();var[Zp,XU]=ut({size:"m",appearance:({checked:t})=>t?"primary":"outline-grayscale"}),Kb=(()=>{class t{constructor(){this.destroyRef=C(Xt),this.el=Be(),this.options=C(Zp),this.appearance=ms(this.options.appearance(this.el)),this.control=C(Wr,{self:!0,optional:!0}),this.size=U(this.options.size)}ngOnInit(){Yc(this.control).pipe(rr(),Lt(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=Z({type:t,selectors:[["input","type","radio","tuiRadio",""]],hostVars:4,hostBindings:function(i,n){i&2&&(Fr("disabled",!n.control||n.control.disabled),Ve("data-size",n.size()),Qe("_readonly",!n.control))},inputs:{size:[1,"size"]},features:[Le([{directive:hn,inputs:["tuiAppearanceState","tuiAppearanceState","tuiAppearanceFocus","tuiAppearanceFocus","tuiAppearanceMode","tuiAppearanceMode"]},md])],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[kk,Zb]=ut({size:"m",appearance:t=>t.checked||t.indeterminate?"primary":"outline-grayscale",icons:{checked:()=>"@tui.check",indeterminate:()=>"@tui.minus"}}),Xb=(()=>{class t extends Kb{constructor(){super(...arguments),this.check=ys(J(()=>this.options.icons.checked(this.size()))),this.indeterminate=Lp(J(()=>this.options.icons.indeterminate(this.size())))}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275cmp=Z({type:t,selectors:[["input","type","checkbox","tuiCheckbox",""]],features:[xe([_t(Zp,kk)]),Le([Ni]),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 Qb(t){return Wi(nr(ur(t,"focus",{capture:!0}).pipe(Ie(zu)),ur(t,"blur",{capture:!0}).pipe(Ie(ta))).pipe(j0(vb)),{initialValue:!1})}function ju(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 Xp({initial:t,root:e,previous:r=!1}){if(!e.ownerDocument)return null;let i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,Xy);i.currentNode=t;do if(go(i.currentNode)&&(t=i.currentNode),go(t)&&ju(t))return t;while(r?i.previousNode():i.nextNode());return null}function Qp({activeElement:t}){if(!t?.shadowRoot)return t;let e=t.shadowRoot.activeElement;for(;e?.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Jp(t){return!!t?.ownerDocument&&Qp(t.ownerDocument)===t&&t.ownerDocument.hasFocus()}function $u(t){let e=t?.ownerDocument&&Qp(t.ownerDocument);return!!e&&t.contains(e)&&t.ownerDocument?.hasFocus()}function Jb(t,e,r){for(t+=r;t>=0&&t<e.length;){if(e[t]?.focus(),Jp(e[t]))return;t+=r}}var yd=new te("");function Mk(t){return{provide:yd,useValue:t}}function _s(t={}){return C(yd,t)}var Di=class{constructor(e,r){this.component=e,this.i=r}createInjector(e,r){return li.create({parent:this.i||e,providers:r==null?[]:[Mk(r)]})}},qu=class{constructor(e){this.$implicit=e}get polymorpheusOutlet(){return this.$implicit}};function Ik(t){return Object(t)!==t}var bd=(()=>{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=re({type:t,selectors:[["ng-template","polymorpheus",""]],inputs:{polymorpheus:"polymorpheus"},exportAs:["polymorpheus"]})}}return t})(),Er=(()=>{class t{constructor(){this.vcr=C(qr),this.i=C(ui),this.t=C(yr),this.content=""}static ngTemplateContextGuard(r,i){return!0}ngOnChanges({content:r}){let i=this.getContext(),n=gd(this.content);if(this.update(),this.c?.injector.get(vr).markForCheck(),!r)return;this.vcr.clear();let a=new Proxy(e1(i),{get:(o,s)=>e1(n?this.context:this.getContext())?.[s]});gd(this.content)?(this.process(this.content,i==null?void 0:a),this.update()):(i instanceof qu&&i.$implicit)!=null&&this.vcr.createEmbeddedView(this.template,a,{injector:this.i})}ngDoCheck(){ev(this.content)&&this.content.check()}get template(){return ev(this.content)?this.content.template:this.content instanceof yr?this.content:this.t}getContext(){return Ak(this.content)||gd(this.content)?this.context:new qu(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"||!gd(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=re({type:t,selectors:[["","polymorpheusOutlet",""]],inputs:{content:[0,"polymorpheusOutlet","content"],context:[0,"polymorpheusOutletContext","context"]},features:[$r]})}}return t})();function ev(t){return t instanceof bd}function gd(t){return t instanceof Di}function Ak(t){return ev(t)||t instanceof yr}function e1(t){return Ik(t)?new qu(t):t}var Wu=(()=>{class t{constructor(){this.vcr=C(qr)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiVCR",""]]})}}return t})();var t1=(()=>{class t{constructor(r){this.service=r,this.injector=C(ui)}open(r,i={}){return new Ot(n=>this.add(new Di(this.component,li.create({parent:this.injector,providers:[{provide:yd,useValue:Ke(se(se({},this.options),i),{content:r,$implicit:n,createdAt:Date.now(),id:cs(),completeWith:a=>{n.next(a),n.complete()}})}]}))))}add(r){let i=this.service.add(r);return()=>i.destroy()}static{this.\u0275fac=function(i){Zn()}}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac})}}return t})();var Cd=(()=>{class t{attach(r){this.host=r}add(r,i){if(!this.host)throw new tv;return r instanceof Di?this.host.addComponent(r):this.host.addTemplate(r,i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac})}}return t})(),tv=class extends Error{constructor(){super("")}},r1=(()=>{class t{constructor(){this.injector=C(ui),this.anchor=Ti.required(Wu),C(Cd).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=re({type:t,viewQuery:function(i,n){i&1&&_i(n.anchor,Wu,5),i&2&&Wt()}})}}return t})();var Ok=["*"],aa=(()=>{class t extends Cd{static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})(),Rk="_tuiCdr",i1=(()=>{class t extends r1{ngAfterViewChecked(){for(let r=0;r<this.anchor().vcr.length;r++){let i=this.anchor().vcr.get(r);Pk(i)&&i.context?.[Rk]?.markForCheck()}}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275cmp=Z({type:t,selectors:[["tui-popups"]],features:[xe([_t(Cd,aa)]),Ae],ngContentSelectors:Ok,decls:2,vars:0,consts:[["tuiVCR",""]],template:function(i,n){i&1&&(It(),Xe(0),rt(1,0))},dependencies:[Wu],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 Pk(t){return!!t&&"context"in t}function rv(t){return!!t&&(Nk(t)||rv(t.parentElement))}function Nk(t){return t.ownerDocument.defaultView?.getComputedStyle(t).getPropertyValue("position")==="fixed"}var Fk=new te("",{factory:()=>{let t=new tr,e=C(gc).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(Ut(null),mt(n=>Ii(0).pipe(Ie(()=>null),Ut(n))),nn())}});function n1(t,e=null){return qc(t).activeElement!==t&&!t.matches(":disabled")&&!e?.contains(t)&&(t.getAttribute("tabIndex")==="-1"||ju(t))}function Bk(t){return nr(Yt(t,"focusin").pipe(Ie(({target:e})=>e)),Yt(t,"focusout").pipe(St(({target:e,relatedTarget:r})=>!!r&&n1(e)),Ie(({relatedTarget:e})=>e)))}var a1=new te("",{factory:()=>{let t=C(Fk),e=C(Cr),r=C(Dt),i=C(gr),n=Yt(e,"focusout",{capture:!0}),a=Yt(e,"focusin",{capture:!0}),o=Yt(e,"blur"),s=Yt(e,"mousedown"),u=Yt(e,"mouseup"),l=Yt(e,"pointerdown"),c=Yt(e,"pointercancel");return nr(n.pipe(lr(l.pipe(St(d=>!d.defaultPrevented))),Ca({delay:()=>nr(u,c)}),Z0(t),St(([d,f])=>n1(yo(d),f)),Ie(([{relatedTarget:d}])=>d)),o.pipe(Ie(()=>r.activeElement),St(d=>!!d?.matches("iframe"))),a.pipe(mt(d=>{let f=yo(d),p=qc(f)||r;return p===r?je(f):Bk(p).pipe(Ut(f))})),s.pipe(Ie(yo),mt(d=>!r.activeElement||r.activeElement===r.body?je(d):n.pipe(Yn(1),Ie(()=>d),lr(Ii(0,ia(i))))))).pipe(rr(),nn())}}),o1=new te("",{factory:()=>null});var iv=new te("",{factory:()=>C(Co)?"ios":C(ud)?"android":"web"});var oa=(()=>{class t{constructor(){this.active$=C(a1),this.tuiActiveZoneParent=null,this.parent=C(t,{skipSelf:!0,optional:!0}),this.el=C(Rt,{optional:!0})?.nativeElement??C(Dt).documentElement,this.tuiActiveZoneChange=this.active$.pipe(Ie(r=>fn(r)&&this.contains(r)),Ut(!1),rr(),hc(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=Sp(this.children,this.children.indexOf(r))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var xs=(()=>{class t extends Ot{constructor(){let r=C(mo),i=C(gr);super(n=>r.pipe(Ut(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),fc(()=>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=Ze({token:t,factory:t.\u0275fac})}}return t})(),wd=(()=>{class t{constructor(){this.isWebkit=C(Ob),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=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var u1=(()=>{class t extends Ot{constructor(){super(r=>this.obscured$.subscribe(r)),this.el=Be(),this.obscured$=C(mo).pipe(lo(100,ia()),Ie(()=>Wc(this.el)),Ut(null),rr(),ra())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac})}}return t})(),Gu=(()=>{class t{constructor(){this.activeZone=C(oa,{optional:!0}),this.obscured$=C(u1,{self:!0}).pipe(Ie(r=>!!r?.every(i=>!this.activeZone?.contains(i)))),this.tuiObscuredEnabled=U(),this.tuiObscured$=hs(this.tuiObscuredEnabled).pipe(Kc(()=>this.obscured$)),this.tuiObscured=kn(this.tuiObscured$)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiObscured",""]],inputs:{tuiObscuredEnabled:[1,"tuiObscuredEnabled"]},outputs:{tuiObscured:"tuiObscured"},features:[xe([u1])]})}}return t})();var zk=t=>({$implicit:t});function Vk(t,e){if(t&1&&(B(0,"div",2),j(1),F()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}var Hk=["tuiDropdownHost"],Yu=(()=>{class t extends xr{constructor(){super(!1),this.type="dropdown"}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac})}}return t})(),Uk=(()=>{class t extends jc{constructor(){super(...arguments),this.type="dropdown"}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=re({type:t,features:[Ae]})}}return t})(),nv={align:"start",direction:null,limitWidth:"auto",maxHeight:400,minHeight:80,offset:4,appearance:""},Ra=new te("",{factory:()=>nv}),jk=t=>({provide:Ra,deps:[[new wa,new iy,av],[new wa,new co,Ra]],useFactory:Kp(t,nv)}),av=(()=>{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=re({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:[xe([_t(Ra,t)])]})}}return t})(),l1=(()=>{class t extends Jn{constructor(){super(...arguments),this.el=Be(),this.options=C(Ra),this.viewport=C(gs),this.direction=new tr,this.type="dropdown",this.accessor=ps("dropdown")(C(Mn,{self:!0,optional:!0}),{getClientRect:()=>this.el.getBoundingClientRect()}),this.tuiDropdownDirectionChange=kn(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=re({type:t,outputs:{tuiDropdownDirectionChange:"tuiDropdownDirectionChange"},features:[Ae]})}}return t})(),$k=16,qk=(()=>{class t{constructor(){this.el=Be(),this.directive=C(kr),this.accessor=this.directive.accessor,this.viewport=C(gs),this.vvs=C(wd),this.options=C(Ra),this.position=this.directive.position,this.styles$=C(xs).pipe(Mu(()=>this.directive.el.isConnected&&!!this.directive.el.getBoundingClientRect().height),Ie(r=>this.position==="fixed"?this.vvs.correct(r):r),Ie(r=>this.getStyles(...r)),Lt())}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)-$k)}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,features:[xe([xs,Vc("dropdown",l1),Hc("dropdown",jt(()=>kr))])]})}}return t})(),Wk=(()=>{class t{constructor(){this.options=C(Ra),this.directive=C(kr),this.context=C(Yk,{optional:!0}),this.darkMode=C(ed),this.theme=J((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=Z({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,On,qk])],decls:2,vars:4,consts:[[1,"t-scroll"],["class","t-primitive",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-primitive"]],template:function(i,n){i&1&&(B(0,"tui-scrollbar",0),Me(1,Vk,2,1,"div",1),F()),i&2&&(O(),X("polymorpheusOutlet",n.directive.content())("polymorpheusOutletContext",Oi(2,zk,n.close)))},dependencies:[Er,ws],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})(),Gk=new te("",{factory:()=>Wk}),Yk=new te(""),ov=new te(""),Kk=(()=>{class t{constructor(){this.id=cs(),this.host=C(ov),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=re({type:t,selectors:[["","tuiDropdownA11y",""]],inputs:{tuiDropdownRole:[1,"tuiDropdownRole"]}})}}return t})(),kr=(()=>{class t{constructor(){this.injector=C(ui),this.refresh$=new tr,this.service=C(aa),this.cdr=C(vr),this.drivers=fs(C(Yu,{self:!0,optional:!0})),this.sub=this.refresh$.pipe(lo(0,ia()),Lt()).subscribe(()=>{this.ref()?.changeDetectorRef.detectChanges(),this.ref()?.changeDetectorRef.markForCheck()}),this.autoClose=ot(()=>{this.content()||this.toggle(!1)}),this.ref=ye(null),this.el=Be(),this.type="dropdown",this.component=new Di(C(Gk),C(ui)),this.content=U(null,{alias:"tuiDropdown",transform:r=>r instanceof yr?new bd(r,this.cdr):r})}get accessor(){let r=this.injector.get(Mn,null,{self:!0});return ps("dropdown")(r,this)}get position(){return rv(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=re({type:t,selectors:[["","tuiDropdown","",5,"ng-container",5,"ng-template"]],hostVars:2,hostBindings:function(i,n){i&2&&Qe("tui-dropdown-open",n.ref())},inputs:{content:[1,"tuiDropdown","content"]},exportAs:["tuiDropdown"],features:[xe([Uc(t),_t(ov,Rt)]),Le([Uk,{directive:Kk,inputs:["tuiDropdownRole","tuiDropdownRole"]},{directive:l1,outputs:["tuiDropdownDirectionChange","tuiDropdownDirectionChange"]}])]})}}return t})(),Zk=(()=>{class t{constructor(){this.el=Be(),this.ref=C(kr).ref,this.open=C(sa),this.obscured=C(Gu),this.activeZone=C(oa),this.tuiDropdownClose=kn(nr(C(Yu).pipe(Kc(()=>nr(db(),this.obscured.tuiObscured$.pipe(St(Boolean)),this.activeZone.tuiActiveZoneChange.pipe(St(r=>!r)),Yt(this.el,"focusin").pipe(St(r=>!this.open.nativeElement.contains(yo(r))||!this.ref()))))),typeof CloseWatcher>"u"?Yt(C(Dt),"keydown",{capture:!0}).pipe(St(({key:r})=>r==="Escape"&&this.open.open()&&!this.ref()?.location.nativeElement?.nextElementSibling),hb()):sr))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,outputs:{tuiDropdownClose:"tuiDropdownClose"}})}}return t})(),sa=(()=>{class t{constructor(){this.dropdownHost=Lr("tuiDropdownHost",{descendants:!0,read:Rt}),this.directive=C(kr),this.el=Be(),this.obscured=C(Gu),this.driver=C(Yu),this.dropdown=J(()=>this.directive.ref()?.location.nativeElement),this.enabled=U(!0,{alias:"tuiDropdownEnabled"}),this.open=qi(!1,{alias:"tuiDropdownOpen"}),this.driveEffect=ot(()=>this.drive(this.open())),this.syncSub=this.driver.pipe(St(r=>r!==this.open()),Lt()).subscribe(r=>this.update(r)),this.keydownSub=Yt(C(Dt),"keydown").pipe(Lt()).subscribe(r=>this.onKeydown(r))}get nativeElement(){let r=this.dropdownHost()?.nativeElement||this.el,i=ju(r)?r:Xp({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 Ap(this.nativeElement)}get focused(){return $u(this.nativeElement)||$u(this.dropdown())}onKeydown(r){let i=yo(r);!r.defaultPrevented&&$b(r.key)&&this.editable&&this.focused&&go(i)&&!Ap(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=Xp({initial:r?a:i,previous:r,root:i});a.remove(),s?.focus()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiDropdown","","tuiDropdownAuto",""],["","tuiDropdown","","tuiDropdownOpen",""],["","tuiDropdown","","tuiDropdownOpenChange",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.dropdownHost,Hk,5,Rt),i&2&&Wt()},hostBindings:function(i,n){i&1&&ge("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:[xe([Yu,vs(Yu),_t(ov,t)]),Le([Gu,{directive:Zk,outputs:["tuiDropdownClose","tuiDropdownClose"]},{directive:oa,inputs:["tuiActiveZoneParent","tuiActiveZoneParent"],outputs:["tuiActiveZoneChange","tuiActiveZoneChange"]}])]})}}return t})();function c1(t){return Pi(sa,"enabled",t,{})}var xo=(()=>{class t{constructor(){this.directive=C(kr),vo(this.directive.content,C(yr)),Dn(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=re({type:t,selectors:[["ng-template","tuiDropdown",""]]})}}return t})();var Xk={showDelay:200,hideDelay:500},[K$,Z$]=ut(Xk);var d1=(()=>{class t{constructor(){Kp({limitWidth:"fixed"},nv)(C(Ra,{self:!0,optional:!0}),null)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,features:[xe([jk({})])]})}}return t})();var f1=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,features:[Le([{directive:sa,inputs:["tuiDropdownOpen","open","tuiDropdownEnabled","tuiDropdownEnabled"],outputs:["tuiDropdownOpenChange","openChange"]}])]})}}return t})();var Qk=["*"];function Jk(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}function eM(t,e){if(t&1&&(B(0,"span",0),Me(1,Jk,2,1,"ng-container",1),F()),t&2){let r=$();O(),X("polymorpheusOutlet",r.emptyContent()||r.fallback())}}var To=new te("");function uv(t){return _t(To,t)}var tM=new te("");function lv(){let t=["s","m","l"],e=C(tM,{optional:!0})||C(To,{optional:!0})?.size;return e&&t.includes(e)?e:"l"}var Ts=new te("");function h1(t){return{provide:Ts,useValue:t}}var cv=(()=>{class t{constructor(){this.local=null,this.global=C(Ts,{optional:!0})}get content(){return this.global??this.local}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,contentQueries:function(i,n,a){if(i&1&&fp(a,Ts,5),i&2){let o;Cc(o=wc())&&(n.local=o.first)}}})}}return t})(),rM=(()=>{class t{constructor(){this.vcr=C(qr),this.content=C(Ts,{optional:!0}),this.ref=this.content&&xc(this.content,{environmentInjector:C(ji),elementInjector:C(ui),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=re({type:t})}}return t})(),Ss=(()=>{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=re({type:t,selectors:[["button","tuiOption","","value",""],["a","tuiOption","","value",""],["label","tuiOption","","value",""]],hostBindings:function(i,n){i&1&&ge("click",function(){return n.onClick()})},inputs:{disabled:[1,"disabled"],value:[1,"value"]},features:[Le([rM])]})}}return t})(),Pn=(()=>{class t{constructor(){this.ngZone=C(gr),this.destroyRef=C(Xt),this.el=Be(),this.cdr=C(vr),this.optionsQuery=Sa(jt(()=>Ss),{descendants:!0}),this.fallback=C(Cb),this.empty=ye(!1),this.emptyContent=U(),this.size=U(lv()),this.options=J(()=>this.optionsQuery().map(({value:r})=>r()).filter(dn))}onKeyDownArrow(r,i){let{elements:n}=this;Jb(n.indexOf(r),n,i)}handleFocusLossIfNecessary(r=this.el){$u(r)&&this.origin?.focus({preventScroll:!0})}ngAfterContentChecked(){Ii(0).pipe(Gi(this.ngZone),Zc(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=Z({type:t,selectors:[["tui-data-list"]],contentQueries:function(i,n,a){i&1&&ei(a,n.optionsQuery,Ss,5),i&2&&Wt()},hostAttrs:["data-tui-version","5.16.0","role","listbox"],hostVars:2,hostBindings:function(i,n){i&1&&ge("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:[xe([Gb(()=>({size:C(t).size()})),Qc(t),{provide:Ts,useFactory:()=>C(cv,{optional:!0})?.content??C(Ts,{skipSelf:!0,optional:!0})}])],ngContentSelectors:Qk,decls:2,vars:1,consts:[["tuiCell","","tuiOption","",1,"t-empty"],[4,"polymorpheusOutlet"]],template:function(i,n){i&1&&(It(),Xe(0),ne(1,eM,2,1,"span",0)),i&2&&(O(),ae(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 p1=(()=>{class t{constructor(){this.isMobile=C(Rn),this.el=Be(),this.datalist=C(jt(()=>Pn),{optional:!0}),this.dropdown=C(kr,{self:!0,optional:!0})?.ref,this.disabled=U(!1)}ngOnDestroy(){this.datalist?.handleFocusLossIfNecessary(this.el)}onMouseMove(){!this.isMobile&&!Jp(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=re({type:t,selectors:[["button","tuiOption",""],["a","tuiOption",""],["label","tuiOption",""]],hostAttrs:["role","option","type","button"],hostVars:3,hostBindings:function(i,n){i&1&&ge("mousemove.zoneless",function(){return n.onMouseMove()}),i&2&&(Ve("disabled",n.disabled()||null),Qe("_with-dropdown",n.dropdown==null?null:n.dropdown()))},inputs:{disabled:[1,"disabled"]},features:[Le([Yi,_o])]})}}return t})();var dv=class{};var iM={fromControlValue:ap,toControlValue:ap},m1={self:!0,optional:!0},vn=(()=>{class t{constructor(){this.fallback=C(o1,m1),this.refresh$=new tr,this.internal=ye(this.fallback),this.control=C(Wr,{self:!0}),this.cdr=C(vr),this.transformer=C(dv,m1)??iM,this.value=J(()=>this.internal()??this.fallback),this.readOnly=U(!1),this.pseudoInvalid=U(void 0,{alias:"invalid"}),this.touched=ye(!1),this.status=ye(void 0),this.disabled=J(()=>this.status()==="DISABLED"),this.interactive=J(()=>!this.disabled()&&!this.readOnly()),this.invalid=J(()=>{let r=this.pseudoInvalid();return r==null?this.interactive()&&this.touched()&&this.status()==="INVALID":r&&this.interactive()}),this.mode=J(()=>this.readOnly()?"readonly":this.invalid()?"invalid":"valid"),this.onTouched=Lu,this.onChange=Lu,this.control.valueAccessor=this,this.refresh$.pipe(Tn(0),Ut(null),Ie(()=>this.control.control),St(Boolean),rr(),mt(r=>nr(r.valueChanges,r.statusChanges,r.events).pipe(Ut(null))),Lt()).subscribe(()=>this.update())}registerOnChange(r){this.refresh$.next(),this.onChange=i=>{let n=it(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=re({type:t,inputs:{readOnly:[1,"readOnly"],pseudoInvalid:[1,"invalid","pseudoInvalid"]}})}}return t})();function g1(t){return _t(vn,t)}var y1=(()=>{class t{constructor(){this.el=Be(),this.autoId=cs()}get id(){return this.el.id||this.autoId}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiId",""]],hostVars:1,hostBindings:function(i,n){i&2&&Fr("id",n.id)}})}}return t})();var aM=["*"];function oM(t,e){if(t&1&&rt(0,1),t&2){let r=$();X("ngTemplateOutlet",r.content()||null)}}var b1=(()=>{class t{constructor(){this.content=Lr(Oa,{read:yr}),this.open=ye(!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=Z({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&&ge("transitionend.self",function(o){return n.onTransitionEnd(o)}),i&2&&Qe("_expanded",n.expanded())("_open",n.open())},inputs:{expanded:[1,"expanded"]},ngContentSelectors:aM,decls:3,vars:1,consts:[[1,"t-wrapper"],[3,"ngTemplateOutlet"]],template:function(i,n){i&1&&(It(),B(0,"div",0),ne(1,oM,1,1,"ng-container",1),Xe(2),F()),i&2&&(O(),ae(n.expanded()||n.open()?1:-1))},dependencies:[as],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 Fi=(()=>{class t{constructor(){this.icons=C(Ni),this.mask=J(()=>this.icons.resolve(this.background())),this.background=U("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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:Ni,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 uM=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),fv=(()=>{class t{constructor(){this.textfield=Lr(jt(()=>To)),this.el=Be(),this.nothing=Gt(uM),this.parent=C(jt(()=>To),{optional:!0})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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[lM,hv]=ut({appearance:"neutral",size:"s"}),pv=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiButtonX",""]],hostAttrs:["tuiIconButton","","type","button"],hostVars:2,hostBindings:function(i,n){i&1&&ge("pointerdown.prevent.zoneless",function(){return 0}),i&2&&st("--t-radius",100,"%")},features:[xe([Gr(()=>C(lM)),{provide:td,useFactory:()=>C(Jc).close}]),Le([{directive:ti,inputs:["size","size"]}])]})}}return t})();var cM={filter:(t,e,r)=>t.find(i=>Ky(i,e,r))?t:t.filter(i=>$c(i,e,r))},[rW,C1]=ut(cM);var dM=["ghost"],fM=["vcr"],hM=[[["input"]],[["select"]],[["textarea"]],[["label","tuiLabel",""]],"*",[["tui-icon"]]],pM=["input","select","textarea","label[tuiLabel]","*","tui-icon"],vv=t=>({$implicit:t});function vM(t,e){}function mM(t,e){if(t&1){let r=Pt();B(0,"button",7),ge("click",function(){let n;Ct(r);let a=$();return wt((n=a.accessor())==null?null:n.setValue(null))}),j(1),F()}if(t&2){let r=$();O(),we(" ",r.clear()," ")}}function gM(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}function yM(t,e){if(t&1&&(B(0,"span",5),Me(1,gM,2,1,"ng-container",8),F()),t&2){let r,i=$();X("tuiCell",i.options.size()),O(),X("polymorpheusOutlet",i.content())("polymorpheusOutletContext",Oi(3,vv,(r=i.control())==null?null:r.value))}}function bM(t,e){if(t&1&&be(0,"input",6,2),t&2){let r=$();X("value",r.computedFiller())}}function CM(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),Br(r)}}var wM=[[["label","tuiLabel",""]],[["input"]],[["select"]],"*",[["tui-icon"]]],_M=["label[tuiLabel]","input","select","*","tui-icon"],xM=(t,e)=>({item:t,index:e});function TM(t,e){}function SM(t,e){t&1&&be(0,"tui-scroll-controls",3)}function DM(t,e){}function EM(t,e){if(t&1&&Me(0,DM,0,0,"ng-template",5),t&2){let r=e.$implicit,i=e.$index,n=$();X("polymorpheusOutlet",n.component)("polymorpheusOutletContext",Oi(5,vv,cy(2,xM,r,i)))}}function kM(t,e){if(t&1&&(B(0,"span",7),j(1),F()),t&2){let r=$();O(),Br(r.placeholder)}}function MM(t,e){if(t&1){let r=Pt();B(0,"button",12),ge("click",function(){let n;Ct(r);let a=$();return wt((n=a.accessor())==null?null:n.setValue([]))}),j(1),F()}if(t&2){let r=$();O(),we(" ",r.clear()," ")}}function IM(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}function AM(t,e){if(t&1&&(B(0,"span",11),Me(1,IM,2,1,"ng-container",13),F()),t&2){let r,i=$();X("tuiCell",i.options.size()),O(),X("polymorpheusOutlet",i.content())("polymorpheusOutletContext",Oi(3,vv,(r=i.control())==null?null:r.value))}}var _d={appearance:"textfield",size:"l",cleaner:!0},Pa=new te("",{factory:()=>({appearance:ye(_d.appearance),size:ye(_d.size),cleaner:ye(_d.cleaner)})});var Ds=(()=>{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||_d.size}),this.cleaner=U(this.options.cleaner(),{alias:"tuiTextfieldCleaner"})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiTextfieldAppearance",""],["","tuiTextfieldSize",""],["","tuiTextfieldCleaner",""]],inputs:{appearance:[1,"tuiTextfieldAppearance","appearance"],size:[1,"tuiTextfieldSize","size"],cleaner:[1,"tuiTextfieldCleaner","cleaner"]},features:[xe([_t(Pa,t)])]})}}return t})(),w1=(()=>{class t{constructor(){this.el=Be(),this.isAndroid=C(ud),this.isMobile=C(Rn),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=re({type:t,selectors:[["","tuiSelectLike",""]],hostAttrs:["autocomplete","off","inputmode","none","spellcheck","false","tuiSelectLike",""],hostBindings:function(i,n){i&1&&ge("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})(),Ku=new te("");function xd(t){return _t(Ku,t)}var di=(()=>{class t{constructor(){this.focusedIn=Qb(Be()),this.ghost=Ti("ghost"),this.dropdown=C(kr),this.open=C(sa),this.clear=C(bb),this.label=Lr(jt(()=>fv),{read:Rt}),this.computedFiller=J((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=J(()=>this.focused()&&!!this.computedFiller()&&(!!this.value()||!this.input()?.nativeElement.placeholder)),this.accessor=Lr(Ku),this.vcr=Ti("vcr",{read:qr}),this.control=Lr(Wr),this.child=Lr(vn),this.auxiliaries=Sa(Xc,{descendants:!0}),this.focused=J(()=>this.open.open()||this.focusedIn()),this.options=C(Pa),this.el=Be(),this.input=Lr(Ku,{read:Rt}),this.content=U(),this.filler=U(""),this.value=Gc(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=Z({type:t,selectors:[["tui-textfield",3,"multi",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.label,fv,5,Rt)(a,n.accessor,Ku,5)(a,n.control,Wr,5)(a,n.child,vn,5)(a,n.auxiliaries,Xc,5)(a,n.input,Ku,5,Rt),i&2&&Wt(6)},viewQuery:function(i,n){i&1&&_i(n.ghost,dM,5)(n.vcr,fM,5,qr),i&2&&Wt(2)},hostAttrs:[1,"tui-interactive"],hostVars:7,hostBindings:function(i,n){if(i&1&&ge("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()),Qe("_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:[xe([Gr({size:"xs",appearance:"icon"}),hv(()=>C(Vu)),uv(t),{provide:Bp,useFactory:()=>C(t).value}]),Le([hn,kr,d1,f1,Yi,Tb,cv])],ngContentSelectors:pM,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=Pt();It(hM),ne(0,vM,0,0),Qn(1,"async"),Xe(2),Xe(3,1),Xe(4,2),Xe(5,3),B(6,"span",3,0),ge("pointerdown",function(){let s;return Ct(a),wt((s=n.input())==null||s.nativeElement==null?null:s.nativeElement.focus())})("resize",function(){Ct(a);let s=pr(7);return wt(n.onResize(s))}),Xe(8,4),rt(9,null,1),ne(11,mM,2,1,"button",4),Xe(12,5),F(),ne(13,yM,2,5,"span",5),ne(14,bM,2,1,"input",6)}if(i&2){let a,o;ae(((a=n.child())==null?null:a.value())??Au(1,4,(a=n.control())==null||a.control==null?null:a.control.valueChanges)?0:-1),O(11),ae(n.options.cleaner()?11:-1),O(2),ae(((o=n.control())==null?null:o.value)!=null?13:-1),O(),ae(n.showFiller()?14:-1)}},dependencies:[Ou,Er,pv,_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})(),OM=(()=>{class t{constructor(){this.el=Be(),this.handlers=C(Si),this.context=_s(),this.textfield=C(PM),this.content=J(()=>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=Z({type:t,selectors:[["tui-textfield-item"]],hostVars:4,hostBindings:function(i,n){i&1&&ge("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&&Qe("_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,CM,2,1,"ng-container",0),i&2&&X("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})(),RM=new Di(OM),PM=(()=>{class t extends di{constructor(){super(...arguments),this.height=ye(null),this.win=C(Cr),this.handlers=C(Si),this.component=RM,this.items=J(()=>this.cva()?.value()??[]),this.sub=ur(this.el,"scroll").pipe(St(()=>this.rows()===1),Gi(),Lt()).subscribe(()=>{this.el.style.setProperty("--t-scroll",br(-1*this.el.scrollLeft))}),this.cva=Lr(vn),this.item=Lr(Oa,{read:yr,descendants:!0}),this.rows=U(100)}handleOption(r){this.accessor()?.setValue($y(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=Z({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&&ge("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()),Qe("_empty",!n.items().length))},inputs:{rows:[1,"rows"]},features:[xe([Gr({size:"xs",appearance:"icon"}),hv(()=>C(Vu)),uv(t),_t(di,t),{provide:Bp,useFactory:()=>C(di).value},C1({filter:(r,i,n)=>r.filter(a=>$c(a,i,n))})]),Le([Vp]),Ae],ngContentSelectors:_M,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=Pt();It(wM),ne(0,TM,0,0),Qn(1,"async"),ne(2,SM,1,0,"tui-scroll-controls",3),B(3,"div",4,0),ge("click",function(){return n.focusInput()})("pointerdown.self.zoneless.prevent",function(){return 0})("resize",function(){Ct(a);let s=pr(4);return wt(n.onItems(s))}),Xe(5),dt(6,EM,1,7,null,5,bi),B(8,"span",6),ge("keydown.arrowLeft",function(s){return n.onLeft(s)}),Xe(9,1),Xe(10,2),ne(11,kM,2,1,"span",7),be(12,"input",8),F()(),B(13,"span",9,1),ge("click.stop",function(){let s;return Ct(a),wt((s=n.input())==null||s.nativeElement==null?null:s.nativeElement.focus())})("pointerdown.zoneless.prevent",function(){return 0})("resize",function(){Ct(a);let s=pr(14);return wt(n.onResize(s))}),Xe(15,3),ne(16,MM,2,1,"button",10),rt(17,null,2),Xe(19,4),F(),ne(20,AM,2,5,"span",11)}if(i&2){let a,o;ae(((a=n.child())==null?null:a.value())??Au(1,10,(a=n.control())==null||a.control==null?null:a.control.valueChanges)?0:-1),O(2),ae(n.rows()>1?2:-1),O(),Qe("t-items_horizontal",n.rows()===1),O(3),ft(n.items()),O(5),ae(n.placeholder?11:-1),O(),Qe("t-filler_hidden",!n.showFiller()),X("value",n.computedFiller()),O(4),ae(n.options.cleaner()?16:-1),O(4),ae(((o=n.control())==null?null:o.value)!=null?20:-1)}},dependencies:[Ou,Er,pv,_o,Hu],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 Zu=(()=>{class t{constructor(){this.el=Be(),this.control=C(Wr,{optional:!0}),this.handlers=C(Si),this.textfield=C(di),this.dropdown=C(kr),this.a=ms(C(Pa).appearance),this.s=ab(J(()=>this.state())),this.m=sb(J(()=>this.mode())),this.f=ob(J(()=>this.focused()??this.textfield.focused())),this.readOnly=U(!1),this.invalid=U(null),this.focused=U(null),this.state=U(null),this.value=Gc(this.el),this.mode=J(()=>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=re({type:t,selectors:[["input","tuiInput",""]],hostAttrs:["tuiInput",""],hostVars:4,hostBindings:function(i,n){i&1&&ge("focusin",function(){return 0})("focusout",function(){return 0})("input",function(){return 0}),i&2&&(Fr("readOnly",n.readOnly()),Ve("role",n.dropdown.content()&&!n.el.matches("select")?"combobox":null),Qe("_empty",n.value()===""))},inputs:{readOnly:[1,"readOnly"],invalid:[1,"invalid"],focused:[1,"focused"],state:[1,"state"]},features:[xe([xd(t)]),Le([md,y1])]})}}return t})(),_1=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,features:[Le([{directive:Zu,inputs:["invalid","invalid","focused","focused","readOnly","readOnly","state","state"]}])]})}}return t})();var FM=["*"];function BM(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}function LM(t,e){if(t&1&&(B(0,"div",5),Me(1,BM,2,1,"ng-container",6),F()),t&2){let r=$(2);O(),X("polymorpheusOutlet",r.textContent())}}function zM(t,e){if(t&1&&(B(0,"div",2),J0(),B(1,"svg",3),be(2,"circle",4),F(),ne(3,LM,2,1,"div",5),F()),t&2){let r=$();Qe("t-loader_inherit-color",r.inheritColor()),O(3),ae(r.textContent()?3:-1)}}var VM={size:"m",inheritColor:!1,overlay:!1},[HM,tG]=ut(VM),Td=(()=>{class t{constructor(){this.options=C(HM),this.isApple=Rb(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=Z({type:t,selectors:[["tui-loader"]],hostVars:3,hostBindings:function(i,n){i&2&&(Ve("data-size",n.size()),Qe("_loading",n.loading()))},inputs:{size:[1,"size"],inheritColor:[1,"inheritColor"],overlay:[1,"overlay"],textContent:[1,"textContent"],loading:[1,"loading"]},ngContentSelectors:FM,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&&(It(),B(0,"fieldset",0),Xe(1),F(),ne(2,zM,4,3,"div",1)),i&2&&(st("opacity",n.overlay()&&n.loading()?.3:null)("pointer-events",n.loading()?"none":null),X("disabled",n.loading()&&!n.isApple),Ve("inert",n.loading()||null),O(2),ae(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 UM=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),x1=(()=>{class t{constructor(){this.nothing=Gt(UM),this.context=_s()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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})(),T1=(()=>{class t extends t1{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){Zn()}}static{this.\u0275prov=Ze({token:t,factory:t.\u0275fac})}}return t})();var $M=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),S1=(()=>{class t{constructor(){this.nothing=Gt($M),this.tuiTitle=U("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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 qM(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}function WM(t,e){if(t&1&&be(0,"span",7),t&2){let r=e.polymorpheusOutlet;X("innerHTML",r,es)}}function GM(t,e){if(t&1){let r=Pt();B(0,"button",8),ge("click",function(){Ct(r);let n=$();return wt(n.item.$implicit.complete())}),j(1),F()}if(t&2){let r=$();X("iconStart",r.icons.close),O(),we(" ",r.close()," ")}}var YM={info:"@tui.info",positive:"@tui.circle-check",negative:"@tui.circle-x",warning:"@tui.circle-alert",neutral:"@tui.info"},KM={appearance:"info",icon:t=>YM[t]??"",size:"l",data:void 0,autoClose:3e3,label:"",closable:!0,block:"start",inline:"end"},[Es,jG]=ut(KM),ZM=new te("",{factory:()=>5}),XM=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),Xu=(()=>{class t{constructor(){this.options=C(Es),this.nothing=Gt(XM),this.icons=ys(J((r=this.icon())=>En(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=re({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:[xe([In(Es),Lb({appearance:""}),Gr({appearance:"outline-grayscale",size:"s"})]),Le([Yi,An])]})}}return t})(),QM=(()=>{class t{constructor(){this.el=Be(),this.icons=C(Jc),this.close=C(yb),this.item=_s(),this.sub=je(typeof this.item.autoClose=="function"?this.item.autoClose(this.item.appearance):this.item.autoClose).pipe(mt(r=>r?Ii(r):sr),lr(ur(this.el,"mouseenter")),Ca({delay:()=>ur(this.el,"mouseleave")}),Lt()).subscribe(()=>this.item.$implicit.complete())}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["tui-notification-alert"]],hostAttrs:["role","alert"],features:[Le([On,x1])],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&&(B(0,"div")(1,"div",0)(2,"div",1)(3,"span",2),Me(4,qM,2,1,"ng-container",3),B(5,"span",4),Me(6,WM,1,1,"span",5),F()(),ne(7,GM,2,2,"button",6),F()()()),i&2&&(O(2),Qe("t-closable",n.item.closable),X("appearance",n.item.appearance)("icon",n.item.icon),O(2),X("polymorpheusOutlet",n.item.label)("polymorpheusOutletContext",n.item),O(2),X("polymorpheusOutlet",n.item.content)("polymorpheusOutletContext",n.item),O(),ae(n.item.closable?7:-1))},dependencies:[Er,ti,Xu,S1],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})(),D1=(()=>{class t extends T1{constructor(r){super(C(ZM),r),this.options=C(Es),this.component=QM}static{this.\u0275fac=function(i){Zn()}}static{this.\u0275prov=Ze({token:t,factory:function(i){let n=null;return i?n=new i:n=new t(Qo(aa)),n},providedIn:"root"})}}return t})();var E1=(()=>{class t{constructor(){this.tuiPlatform=U(C(iv,{skipSelf:!0}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiPlatform",""]],hostVars:1,hostBindings:function(i,n){i&2&&Ve("data-platform",n.tuiPlatform())},inputs:{tuiPlatform:[1,"tuiPlatform"]},features:[xe([{provide:iv,useFactory:()=>C(t).tuiPlatform()}])]})}}return t})();var k1=(()=>{class t extends Ot{visualViewport=C(Cr).visualViewport;stream$=this.visualViewport?nr(ur(this.visualViewport,"resize"),ur(this.visualViewport,"scroll"),ur(this.visualViewport,"scrollend")).pipe(Ut(null),Ie(()=>this.visualViewport),St(Boolean),Xo({bufferSize:1,refCount:!0})):sr;constructor(){super(r=>this.stream$.subscribe(r))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var M1=(()=>{class t{constructor(){this.w=C(Cr),this.style=Be().style,this.minInnerHeight=1/0,this.$=C(k1).pipe(Lt()).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=re({type:t,selectors:[["","tuiVisualViewport",""]]})}}return t})();var tI=["*",[["tuiOverContent"]]],rI=["*","tuiOverContent"];function iI(t,e){t&1&&be(0,"tui-scroll-controls",1)}function nI(t,e){if(t&1&&(ne(0,iI,1,0,"tui-scroll-controls",1),B(1,"tui-popups"),Xe(2,1),F()),t&2){let r=$();ae(r.scrollbars?0:-1)}}var I1=(()=>{class t{constructor(){this.doc=C(Dt),this.el=Be(),this.child=!!C(t,{optional:!0,skipSelf:!0}),this.reducedMotion=C(Fp),this.duration=jb(C(mb)),this.top=ye(this.parent),this.breakpoint=C(gb),this.liquidGlass=C(Wb),this.scrollbars=!C(Rn)&&!this.child&&C(cd).mode!=="native"&&C(vd).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=Z({type:t,selectors:[["tui-root"]],hostAttrs:["data-tui-version","5.16.0"],hostVars:8,hostBindings:function(i,n){i&1&&ge("fullscreenchange",function(){return n.top.set(n.parent)},ts)("touchstart.passive.zoneless",function(){return 0}),i&2&&(st("--tui-duration",n.duration,"ms")("--tui-scroll-behavior",n.reducedMotion?"auto":"smooth"),Qe("_mobile",n.breakpoint()==="mobile")("tui-liquid-glass",n.liquidGlass))},features:[Le([E1,M1,Vb])],ngContentSelectors:rI,decls:3,vars:1,consts:[[1,"t-root-content"],[1,"t-root-scrollbar"]],template:function(i,n){i&1&&(It(tI),B(0,"div",0),Xe(1),F(),ne(2,nI,3,1)),i&2&&(O(2),ae(n.top()?2:-1))},dependencies:[i1,Hu],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 aI(t,e){t&1&&rt(0)}var oI=["*"];function sI(t,e){if(t&1&&be(0,"span",1),t&2){let r=e.polymorpheusOutlet;X("innerHTML",r,es)}}var uI=new te("",{factory:()=>pI}),lI=(()=>{class t extends jc{constructor(){super(...arguments),this.type="hint"}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=re({type:t,features:[Ae]})}}return t})(),A1=["bottom-start","bottom","bottom-end","top-start","top","top-end","start-top","start","start-bottom","end-top","end","end-bottom"],cI={direction:"bottom-start",centered:!0,showDelay:500,hideDelay:200,appearance:"",icon:"@tui.circle-help"},[gv,H7]=ut(cI),kd=(()=>{class t extends Ia{constructor(){super(r=>this.stream$.subscribe(r)),this.isMobile=C(Rn),this.el=Be(),this.hovered$=C(Uu),this.options=C(gv),this.visible=!1,this.toggle$=new tr,this.stream$=nr(this.toggle$.pipe(mt(r=>this.isMobile?je(r).pipe(Tn(0)):je(r).pipe(Tn(r?0:this.hideDelay()))),lr(this.hovered$),Ca()),this.hovered$.pipe(mt(r=>this.isMobile?je(r).pipe(Tn(0)):je(r).pipe(Tn(r?this.showDelay():this.hideDelay()))),lr(this.toggle$),Ca())).pipe(St(()=>this.enabled),Ie(r=>r&&(this.el.hasAttribute("tuiHintPointer")||!Yp(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=re({type:t,inputs:{showDelay:[1,"tuiHintShowDelay","showDelay"],hideDelay:[1,"tuiHintHideDelay","hideDelay"]},exportAs:["tuiHintHover"],features:[xe([vs(t),Uu]),Ae]})}}return t})(),Sd=8,ks=22,wr=1,Mr=0,R1=(()=>{class t extends Jn{constructor(){super(...arguments),this.el=Be(),this.viewport=C(gs),this.options=C(gv),this.directionChange=new tr,this.accessor=ps("hint")(C(Mn,{optional:!0}),{getClientRect:()=>this.el.getBoundingClientRect()}),this.points=A1.reduce((r,i)=>Ke(se({},r),{[i]:[0,0]}),{}),this.direction=U(this.options.direction,{alias:"tuiHintDirection"}),this.offset=U(C(Rn)?16:8,{alias:"tuiHintOffset"}),this.centered=U(this.options.centered,{alias:"tuiHintCentered"}),this.tuiHintDirectionChange=kn(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<ks*2||this.centered(),c=a.height<ks*2||this.centered(),d=l?o-ks:a.left,f=l?o-r+ks:a.right-r,p=c?s-ks:a.top,h=c?s-i+ks: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=>O1(y,u)).concat(A1).find(y=>this.checkPosition(this.points[y],r,i))||this.fallback;return this.directionChange.next(O1(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+Sd&&r>o.left+Sd&&i+a<o.bottom-Sd&&r+n<o.right-Sd}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=re({type:t,inputs:{direction:[1,"tuiHintDirection","direction"],offset:[1,"tuiHintOffset","offset"],centered:[1,"tuiHintCentered","centered"]},outputs:{tuiHintDirectionChange:"tuiHintDirectionChange"},features:[Ae]})}}return t})();function O1(t,e){return e&&t.includes("left")?t.replace("left","right"):e&&t.includes("right")?t.replace("right","left"):t}var mn=(()=>{class t{constructor(){this.service=C(aa),this.ref=ye(null),this.content=U(null,{alias:"tuiHint"}),this.context=U(void 0,{alias:"tuiHintContext"}),this.appearance=U(C(gv).appearance,{alias:"tuiHintAppearance"}),this.visible=kn(hs(this.ref).pipe(Ie(Boolean),hc(1)),{alias:"tuiHintVisible"}),this.component=C(Di),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=re({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:[xe([Uc(t),{provide:Di,deps:[uI,ui],useClass:Di}]),Le([lI,{directive:kd,inputs:["tuiHintHideDelay","tuiHintHideDelay","tuiHintShowDelay","tuiHintShowDelay"]},{directive:R1,inputs:["tuiHintDirection","tuiHintDirection","tuiHintCentered","tuiHintCentered","tuiHintOffset","tuiHintOffset"],outputs:["tuiHintDirectionChange","tuiHintDirectionChange"]}]),$r]})}}return t})(),dI=(()=>{class t extends kd{constructor(){super(...arguments),this.currentRect=ea}getClientRect(){return this.currentRect}onMove({clientX:r,clientY:i}){this.currentRect=Op(r,i)}static{this.\u0275fac=(()=>{let r;return function(n){return(r||(r=Pe(t)))(n||t)}})()}static{this.\u0275dir=re({type:t,selectors:[["","tuiHint","","tuiHintPointer",""]],hostBindings:function(i,n){i&1&&ge("mousemove.zoneless",function(o){return n.onMove(o)})},features:[xe([Ep(t),vs(t)]),Ae]})}}return t})(),fI=(()=>{class t{constructor(){this.hint=C(mn)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["ng-component"]],decls:1,vars:1,consts:[[4,"polymorpheusOutlet"]],template:function(i,n){i&1&&Me(0,aI,1,0,"ng-container",0),i&2&&X("polymorpheusOutlet",n.hint.content())},dependencies:[Er],encapsulation:2})}}return t})();function hI(){return[xs,Uu,Vc("hint",R1),Hc("hint",jt(()=>mn))]}var Dd=8,Ed=22,pI=(()=>{class t{constructor(){this.el=Be(),this.hover=C(kd),this.vvs=C(wd),this.viewport=C(gs),this.pointer=C(dI,{optional:!0}),this.accessor=C(Mn),this.hint=C(mn),this.content=this.hint.component.component===fI?ye(""):this.hint.content,this.theme=this.hint.el.closest("[tuiTheme]")?.getAttribute("tuiTheme"),this.appearance=ms(this.hint.appearance),C(xs).pipe(Mu(()=>this.hint.el.isConnected&&!!this.hint.el.getBoundingClientRect().height),Ie(r=>this.vvs.correct(r)),Lt()).subscribe({next:r=>this.update(...r),complete:()=>this.hint.toggle(!1)}),C(Uu).pipe(Lt()).subscribe(r=>this.hover.toggle(r))}onClick(r){(!r.closest(this.el.tagName)&&!this.hint.el.contains(r)||Yp(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(Dd,r),s.left+Dd,Math.max(Dd,s.width+s.left-a-Dd)),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?Ed:d?a-Ed:p,v=c?Ed:f?n-Ed: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=Z({type:t,selectors:[["tui-hint"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(i,n){i&1&&ge("click",function(o){return n.onClick(o.target)},ts),i&2&&(Ve("tuiTheme",n.theme),Qe("_untouchable",n.pointer))},features:[xe([hI(),Gr({size:"s"})]),Le([hn,On,oa])],ngContentSelectors:oI,decls:2,vars:2,consts:[[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],[3,"innerHTML"]],template:function(i,n){i&1&&(It(),Xe(0),Me(1,sI,1,1,"span",0)),i&2&&(O(),X("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 P1=(()=>{class t extends Ia{constructor(){super(r=>this.stream$.subscribe(r)),this.hover=C(kd),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=re({type:t,selectors:[["","tuiHint","","tuiHintManual",""]],inputs:{visible:[1,"tuiHintManual","visible"]},features:[xe([vs(t)]),Ae,$r]})}}return t})();var nt="primary",dl=Symbol("RouteTitle"),_v=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 _v(t)}function yv(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 j1(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 yv(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!yv(a,t.slice(0,a.length),s)||!yv(o,t.slice(t.length-o.length),s)?null:{consumed:t,posParams:s}}function Pd(t){return new Promise((e,r)=>{t.pipe(ba()).subscribe({next:i=>e(i),error:i=>r(i)})})}function mI(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!Nn(t[r],e[r]))return!1;return!0}function Nn(t,e){let r=t?xv(t):void 0,i=e?xv(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],!$1(t[n],e[n]))return!1;return!0}function xv(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function $1(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 gI(t){return t.length>0?t[t.length-1]:null}function Mo(t){return lc(t)?t:yc(t)?Jr(Promise.resolve(t)):je(t)}function q1(t){return lc(t)?Pd(t):Promise.resolve(t)}var yI={exact:Y1,subset:K1},W1={exact:bI,subset:CI,ignored:()=>!0},G1={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Tv={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};function N1(t,e,r){return yI[r.paths](t.root,e.root,r.matrixParams)&&W1[r.queryParams](t.queryParams,e.queryParams)&&!(r.fragment==="exact"&&t.fragment!==e.fragment)}function bI(t,e){return Nn(t,e)}function Y1(t,e,r){if(!So(t.segments,e.segments)||!Ad(t.segments,e.segments,r)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let i in e.children)if(!t.children[i]||!Y1(t.children[i],e.children[i],r))return!1;return!0}function CI(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(r=>$1(t[r],e[r]))}function K1(t,e,r){return Z1(t,e,e.segments,r)}function Z1(t,e,r,i){if(t.segments.length>r.length){let n=t.segments.slice(0,r.length);return!(!So(n,r)||e.hasChildren()||!Ad(n,r,i))}else if(t.segments.length===r.length){if(!So(t.segments,r)||!Ad(t.segments,r,i))return!1;for(let n in e.children)if(!t.children[n]||!K1(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)||!Ad(t.segments,n,i)||!t.children[nt]?!1:Z1(t.children[nt],e,a,i)}}function Ad(t,e,r){return e.every((i,n)=>W1[r](t[n].parameters,i.parameters))}var Li=class{root;queryParams;fragment;_queryParamMap;constructor(e=new Nt([],{}),r={},i=null){this.root=e,this.queryParams=r,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Do(this.queryParams),this._queryParamMap}toString(){return xI.serialize(this)}},Nt=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 Od(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 Q1(this)}};function wI(t,e){return So(t,e)&&t.every((r,i)=>Nn(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 _I(t,e){let r=[];return Object.entries(t.children).forEach(([i,n])=>{i===nt&&(r=r.concat(e(n,i)))}),Object.entries(t.children).forEach(([i,n])=>{i!==nt&&(r=r.concat(e(n,i)))}),r}var Bs=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:()=>new Fa})}return t})(),Fa=class{parse(e){let r=new Dv(e);return new Li(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(e){let r=`/${Qu(e.root,!0)}`,i=DI(e.queryParams),n=typeof e.fragment=="string"?`#${TI(e.fragment)}`:"";return`${r}${i}${n}`}},xI=new Fa;function Od(t){return t.segments.map(e=>Q1(e)).join("/")}function Qu(t,e){if(!t.hasChildren())return Od(t);if(e){let r=t.children[nt]?Qu(t.children[nt],!1):"",i=[];return Object.entries(t.children).forEach(([n,a])=>{n!==nt&&i.push(`${n}:${Qu(a,!1)}`)}),i.length>0?`${r}(${i.join("//")})`:r}else{let r=_I(t,(i,n)=>n===nt?[Qu(t.children[nt],!1)]:[`${n}:${Qu(i,!1)}`]);return Object.keys(t.children).length===1&&t.children[nt]!=null?`${Od(t)}/${r[0]}`:`${Od(t)}/(${r.join("//")})`}}function X1(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Md(t){return X1(t).replace(/%3B/gi,";")}function TI(t){return encodeURI(t)}function Sv(t){return X1(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Rd(t){return decodeURIComponent(t)}function F1(t){return Rd(t.replace(/\+/g,"%20"))}function Q1(t){return`${Sv(t.path)}${SI(t.parameters)}`}function SI(t){return Object.entries(t).map(([e,r])=>`;${Sv(e)}=${Sv(r)}`).join("")}function DI(t){let e=Object.entries(t).map(([r,i])=>Array.isArray(i)?i.map(n=>`${Md(r)}=${Md(n)}`).join("&"):`${Md(r)}=${Md(i)}`).filter(r=>r);return e.length?`?${e.join("&")}`:""}var EI=/^[^\/()?;#]+/;function bv(t){let e=t.match(EI);return e?e[0]:""}var kI=/^[^\/()?;=#]+/;function MI(t){let e=t.match(kI);return e?e[0]:""}var II=/^[^=?&#]+/;function AI(t){let e=t.match(II);return e?e[0]:""}var OI=/^[^&#]+/;function RI(t){let e=t.match(OI);return e?e[0]:""}var Dv=class{url;remaining;constructor(e){this.url=e,this.remaining=e}parseRootSegment(){for(;this.consumeOptional("/"););return this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Nt([],{}):new Nt([],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[nt]=new Nt(r,i)),n}parseSegment(){let e=bv(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new hr(4009,!1);return this.capture(e),new Na(Rd(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let r=MI(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){let n=bv(this.remaining);n&&(i=n,this.capture(i))}e[Rd(r)]=Rd(i)}parseQueryParam(e){let r=AI(this.remaining);if(!r)return;this.capture(r);let i="";if(this.consumeOptional("=")){let o=RI(this.remaining);o&&(i=o,this.capture(i))}let n=F1(r),a=F1(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=bv(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=nt);let s=this.parseChildren(r+1);i[o??nt]=Object.keys(s).length===1&&s[nt]?s[nt]:new Nt([],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 J1(t){return t.segments.length>0?new Nt([],{[nt]:t}):t}function eC(t){let e=Object.create(null);for(let[i,n]of Object.entries(t.children)){let a=eC(n);if(i===nt&&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 Nt(t.segments,e);return PI(r)}function PI(t){if(t.numberOfChildren===1&&t.children[nt]){let e=t.children[nt];return new Nt(t.segments.concat(e.segments),e.children)}return t}function Ba(t){return t instanceof Li}function tC(t,e,r=null,i=null,n=new Fa){let a=rC(t);return iC(a,e,r,i,n)}function rC(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 Nt(a.url,o);return a===t&&(e=s),s}let i=r(t.root),n=J1(i);return e??n}function iC(t,e,r,i,n){let a=t;for(;a.parent;)a=a.parent;if(e.length===0)return Cv(a,a,a,r,i,n);let o=NI(e);if(o.toRoot())return Cv(a,a,new Nt([],{}),r,i,n);let s=FI(o,a,t),u=s.processChildren?el(s.segmentGroup,s.index,o.commands):aC(s.segmentGroup,s.index,o.commands);return Cv(a,s.segmentGroup,u,r,i,n)}function Nd(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function il(t){return typeof t=="object"&&t!=null&&t.outlets}function B1(t,e,r){t||="\u0275";let i=new Li;return i.queryParams={[t]:e},r.parse(r.serialize(i)).queryParams[t]}function Cv(t,e,r,i,n,a){let o={};for(let[l,c]of Object.entries(i??{}))o[l]=Array.isArray(c)?c.map(d=>B1(l,d,a)):B1(l,c,a);let s;t===e?s=r:s=nC(t,e,r);let u=J1(eC(s));return new Li(u,o,n)}function nC(t,e,r){let i=Object.create(null);return Object.entries(t.children).forEach(([n,a])=>{a===e?i[n]=r:i[n]=nC(a,e,r)}),new Nt(t.segments,i)}var Fd=class{isAbsolute;numberOfDoubleDots;commands;constructor(e,r,i){if(this.isAbsolute=e,this.numberOfDoubleDots=r,this.commands=i,e&&i.length>0&&Nd(i[0]))throw new hr(4003,!1);let n=i.find(il);if(n&&n!==gI(i))throw new hr(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function NI(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Fd(!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 Fd(r,e,i)}var Is=class{segmentGroup;processChildren;index;constructor(e,r,i){this.segmentGroup=e,this.processChildren=r,this.index=i}};function FI(t,e,r){if(t.isAbsolute)return new Is(e,!0,0);if(!r)return new Is(e,!1,NaN);if(r.parent===null)return new Is(r,!0,0);let i=Nd(t.commands[0])?0:1,n=r.segments.length-1+i;return BI(r,n,t.numberOfDoubleDots)}function BI(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 Is(i,!1,n-a)}function LI(t){return il(t[0])?t[0].outlets:{[nt]:t}}function aC(t,e,r){if(t??=new Nt([],{}),t.segments.length===0&&t.hasChildren())return el(t,e,r);let i=zI(t,e,r),n=r.slice(i.commandIndex);if(i.match&&i.pathIndex<t.segments.length){let a=new Nt(t.segments.slice(0,i.pathIndex),{});return a.children[nt]=new Nt(t.segments.slice(i.pathIndex),t.children),el(a,0,n)}else return i.match&&n.length===0?new Nt(t.segments,{}):i.match&&!t.hasChildren()?Ev(t,e,r):i.match?el(t,0,n):Ev(t,e,r)}function el(t,e,r){if(r.length===0)return new Nt(t.segments,{});{let i=LI(r),n=Object.create(null);if(Object.keys(i).some(a=>a!==nt)&&t.children[nt]&&t.numberOfChildren===1&&t.children[nt].segments.length===0){let a=el(t.children[nt],e,r);return new Nt(t.segments,a.children)}return Object.entries(i).forEach(([a,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(n[a]=aC(t.children[a],e,o))}),Object.entries(t.children).forEach(([a,o])=>{i[a]===void 0&&(n[a]=o)}),new Nt(t.segments,n)}}function zI(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(il(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(!z1(u,l,o))return a;i+=2}else{if(!z1(u,{},o))return a;i++}n++}return{match:!0,pathIndex:n,commandIndex:i}}function Ev(t,e,r){let i=t.segments.slice(0,e),n=0;for(;n<r.length;){let a=r[n];if(il(a)){let u=VI(a.outlets);return new Nt(i,u)}if(n===0&&Nd(r[0])){let u=t.segments[e];i.push(new Na(u.path,L1(r[0]))),n++;continue}let o=il(a)?a.outlets[nt]:`${a}`,s=n<r.length-1?r[n+1]:null;o&&s&&Nd(s)?(i.push(new Na(o,L1(s))),n+=2):(i.push(new Na(o,{})),n++)}return new Nt(i,{})}function VI(t){let e={};return Object.entries(t).forEach(([r,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(e[r]=Ev(new Nt([],{}),0,i))}),e}function L1(t){let e={};return Object.entries(t).forEach(([r,i])=>e[r]=`${i}`),e}function z1(t,e,r){return t==r.path&&Nn(e,r.parameters)}var tl="imperative",zr=(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})(zr||{}),zi=class{id;url;constructor(e,r){this.id=e,this.url=r}},Eo=class extends zi{type=zr.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}')`}},Fn=class extends zi{urlAfterRedirects;type=zr.NavigationEnd;constructor(e,r,i){super(e,r),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ri=(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})(ri||{}),nl=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(nl||{}),Ki=class extends zi{reason;code;type=zr.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 oC(t){return t instanceof Ki&&(t.code===ri.Redirect||t.code===ri.SupersededByNewNavigation)}var la=class extends zi{reason;code;type=zr.NavigationSkipped;constructor(e,r,i,n){super(e,r),this.reason=i,this.code=n}},ko=class extends zi{error;target;type=zr.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})`}},al=class extends zi{urlAfterRedirects;state;type=zr.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})`}},Bd=class extends zi{urlAfterRedirects;state;type=zr.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})`}},Ld=class extends zi{urlAfterRedirects;state;shouldActivate;type=zr.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})`}},zd=class extends zi{urlAfterRedirects;state;type=zr.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})`}},Vd=class extends zi{urlAfterRedirects;state;type=zr.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})`}},Hd=class{route;type=zr.RouteConfigLoadStart;constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Ud=class{route;type=zr.RouteConfigLoadEnd;constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},jd=class{snapshot;type=zr.ChildActivationStart;constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},$d=class{snapshot;type=zr.ChildActivationEnd;constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},qd=class{snapshot;type=zr.ActivationStart;constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Wd=class{snapshot;type=zr.ActivationEnd;constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Os=class{},ol=class{},Rs=class{url;navigationBehaviorOptions;constructor(e,r){this.url=e,this.navigationBehaviorOptions=r}};function HI(t){return!(t instanceof Os)&&!(t instanceof Rs)&&!(t instanceof ol)}var Gd=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 Ls(this.rootInjector)}},Ls=(()=>{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 Gd(this.rootInjector),this.contexts.set(r,i)),i}getContext(r){return this.contexts.get(r)||null}static \u0275fac=function(i){return new(i||t)(Qo(ji))};static \u0275prov=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Yd=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=kv(e,this._root);return r?r.children.map(i=>i.value):[]}firstChild(e){let r=kv(e,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(e){let r=Mv(e,this._root);return r.length<2?[]:r[r.length-2].children.map(n=>n.value).filter(n=>n!==e)}pathFromRoot(e){return Mv(e,this._root).map(r=>r.value)}};function kv(t,e){if(t===e.value)return e;for(let r of e.children){let i=kv(t,r);if(i)return i}return null}function Mv(t,e){if(t===e.value)return[e];for(let r of e.children){let i=Mv(t,r);if(i.length)return i.unshift(e),i}return[]}var Bi=class{value;children;constructor(e,r){this.value=e,this.children=r}toString(){return`TreeNode(${this.value})`}};function Ms(t){let e={};return t&&t.children.forEach(r=>e[r.value.outlet]=r),e}var sl=class extends Yd{snapshot;constructor(e,r){super(e),this.snapshot=r,Lv(this,e)}toString(){return this.snapshot.toString()}};function sC(t,e){let r=UI(t,e),i=new xr([new Na("",{})]),n=new xr({}),a=new xr({}),o=new xr({}),s=new xr(""),u=new Vi(i,n,o,s,a,nt,t,r.root);return u.snapshot=r.root,new sl(new Bi(u,[]),r)}function UI(t,e){let r={},i={},n={},o=new Ps([],r,n,"",i,nt,t,null,{},e);return new ul("",new Bi(o,[]))}var Vi=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[dl]))??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})`}},jI="always";function Bv(t,e,r){let i,{routeConfig:n}=t;return e!==null&&(r==="always"||n?.path===""||!e.component&&!e.routeConfig?.loadComponent)?i={params:se(se({},e.params),t.params),data:se(se({},e.data),t.data),resolve:se(se(se(se({},t.data),e.data),n?.data),t._resolvedData)}:i={params:se({},t.params),data:se({},t.data),resolve:se(se({},t.data),t._resolvedData??{})},n&&lC(n)&&(i.resolve[dl]=n.title),i}var Ps=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;_environmentInjector;get title(){return this.data?.[dl]}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}')`}},ul=class extends Yd{url;constructor(e,r){super(r),this.url=e,Lv(this,r)}toString(){return uC(this._root)}};function Lv(t,e){e.value._routerState=t,e.children.forEach(r=>Lv(t,r))}function uC(t){let e=t.children.length>0?` { ${t.children.map(uC).join(", ")} } `:"";return`${t.value}${e}`}function wv(t){if(t.snapshot){let e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,Nn(e.queryParams,r.queryParams)||t.queryParamsSubject.next(r.queryParams),e.fragment!==r.fragment&&t.fragmentSubject.next(r.fragment),Nn(e.params,r.params)||t.paramsSubject.next(r.params),mI(e.url,r.url)||t.urlSubject.next(r.url),Nn(e.data,r.data)||t.dataSubject.next(r.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Iv(t,e){let r=Nn(t.params,e.params)&&wI(t.url,e.url),i=!t.parent!=!e.parent;return r&&!i&&(!t.parent||Iv(t.parent,e.parent))}function lC(t){return typeof t.title=="string"||t.title===null}var cC=new te(""),fl=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=nt;activateEvents=new yi;deactivateEvents=new yi;attachEvents=new yi;detachEvents=new yi;routerOutletData=U();parentContexts=C(Ls);location=C(qr);changeDetector=C(vr);inputBinder=C(hl,{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 Av(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=re({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[$r]})}return t})(),Av=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===Vi?this.route:e===Ls?this.childContexts:e===cC?this.outletData:this.parent.get(e,r)}},hl=new te(""),dC=(()=>{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=cc([this.options.queryParams?i.queryParams:je({}),i.params,i.data]).pipe(mt(([a,o,s],u)=>(s=se(se(se({},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){Zn()};static \u0275prov=Ze({token:t,factory:t.\u0275fac})}return t})(),zv=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Z({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(i,n){i&1&&be(0,"router-outlet")},dependencies:[fl],encapsulation:2,changeDetection:1})}return t})();function Vv(t){let e=t.children&&t.children.map(Vv),r=e?Ke(se({},t),{children:e}):se({},t);return!r.component&&!r.loadComponent&&(e||r.loadChildren)&&r.outlet&&r.outlet!==nt&&(r.component=zv),r}function $I(t,e,r){let i=new Set,n=ll(t,e._root,r?r._root:void 0,i);return{newlyCreatedRoutes:i,state:new sl(n,e)}}function ll(t,e,r,i){if(r&&t.shouldReuseRoute(e.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=e.value;let a=qI(t,e,r,i);return new Bi(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=>ll(t,u,void 0,i)),s}}let n=WI(e.value);i.add(n);let a=e.children.map(o=>ll(t,o,void 0,i));return new Bi(n,a)}}function qI(t,e,r,i){return e.children.map(n=>{for(let a of r.children)if(t.shouldReuseRoute(n.value,a.value.snapshot))return ll(t,n,a,i);return ll(t,n,void 0,i)})}function WI(t){return new Vi(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 Ns=class{redirectTo;navigationBehaviorOptions;constructor(e,r){this.redirectTo=e,this.navigationBehaviorOptions=r}},fC="ngNavigationCancelingError";function Kd(t,e){let{redirectTo:r,navigationBehaviorOptions:i}=Ba(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,n=hC(!1,ri.Redirect);return n.url=r,n.navigationBehaviorOptions=i,n}function hC(t,e){let r=new Error(`NavigationCancelingError: ${t||""}`);return r[fC]=!0,r.cancellationCode=e,r}function GI(t){return pC(t)&&Ba(t.url)}function pC(t){return!!t&&t[fC]}var Ov=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),wv(this.futureState.root),this.activateChildRoutes(r,i,e)}deactivateChildRoutes(e,r,i){let n=Ms(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=Ms(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=Ms(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=Ms(r);e.children.forEach(a=>{this.activateRoutes(a,n[a.value.outlet],i),this.forwardEvent(new Wd(a.value.snapshot))}),e.children.length&&this.forwardEvent(new $d(e.value.snapshot))}activateRoutes(e,r,i){let n=e.value,a=r?r.value:null;if(wv(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),wv(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)}},Zd=class{path;route;constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},As=class{component;route;constructor(e,r){this.component=e,this.route=r}};function YI(t,e,r){let i=t._root,n=e?e._root:null;return Ju(i,n,r,[i.value])}function KI(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function zs(t,e){let r=Symbol(),i=e.get(t,r);return i===r?typeof t=="function"&&!Q0(t)?t:e.get(t):i}function Ju(t,e,r,i,n={canDeactivateChecks:[],canActivateChecks:[]}){let a=Ms(e);return t.children.forEach(o=>{ZI(o,a[o.value.outlet],r,i.concat([o.value]),n),delete a[o.value.outlet]}),Object.entries(a).forEach(([o,s])=>rl(s,r.getContext(o),n)),n}function ZI(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=XI(o,a,a.routeConfig.runGuardsAndResolvers);u?n.canActivateChecks.push(new Zd(i)):(a.data=o.data,a._resolvedData=o._resolvedData),a.component?Ju(t,e,s?s.children:null,i,n):Ju(t,e,r,i,n),u&&s&&s.outlet&&s.outlet.isActivated&&n.canDeactivateChecks.push(new As(s.outlet.component,o))}else o&&rl(e,s,n),n.canActivateChecks.push(new Zd(i)),a.component?Ju(t,null,s?s.children:null,i,n):Ju(t,null,r,i,n);return n}function XI(t,e,r){if(typeof r=="function")return $i(e._environmentInjector,()=>r(t,e));switch(r){case"pathParamsChange":return!So(t.url,e.url);case"pathParamsOrQueryParamsChange":return!So(t.url,e.url)||!Nn(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Iv(t,e)||!Nn(t.queryParams,e.queryParams);default:return!Iv(t,e)}}function rl(t,e,r){let i=Ms(t),n=t.value;Object.entries(i).forEach(([a,o])=>{n.component?e?rl(o,e.children.getContext(a),r):rl(o,null,r):rl(o,e,r)}),n.component?e&&e.outlet&&e.outlet.isActivated?r.canDeactivateChecks.push(new As(e.outlet.component,n)):r.canDeactivateChecks.push(new As(null,n)):r.canDeactivateChecks.push(new As(null,n))}function pl(t){return typeof t=="function"}function QI(t){return typeof t=="boolean"}function JI(t){return t&&pl(t.canLoad)}function eA(t){return t&&pl(t.canActivate)}function tA(t){return t&&pl(t.canActivateChild)}function rA(t){return t&&pl(t.canDeactivate)}function iA(t){return t&&pl(t.canMatch)}function vC(t){return t instanceof q0||t?.name==="EmptyError"}var Id=Symbol("INITIAL_VALUE");function Fs(){return mt(t=>cc(t.map(e=>e.pipe(Yn(1),Ut(Id)))).pipe(Ie(e=>{for(let r of e)if(r!==!0){if(r===Id)return Id;if(r===!1||nA(r))return r}return!0}),St(e=>e!==Id),Yn(1)))}function nA(t){return Ba(t)||t instanceof Ns}function mC(t){return t.aborted?je(void 0).pipe(Yn(1)):new Ot(e=>{let r=()=>{e.next(),e.complete()};return t.addEventListener("abort",r),()=>t.removeEventListener("abort",r)})}function gC(t){return lr(mC(t))}function aA(t){return ya(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:n,canDeactivateChecks:a}}=e;return a.length===0&&n.length===0?je(Ke(se({},e),{guardsResult:!0})):oA(a,r,i).pipe(ya(o=>o&&QI(o)?sA(r,n,t):je(o)),Ie(o=>Ke(se({},e),{guardsResult:o})))})}function oA(t,e,r){return Jr(t).pipe(ya(i=>fA(i.component,i.route,r,e)),ba(i=>i!==!0,!0))}function sA(t,e,r){return Jr(e).pipe(up(i=>sp(lA(i.route.parent,r),uA(i.route,r),dA(t,i.path),cA(t,i.route))),ba(i=>i!==!0,!0))}function uA(t,e){return t!==null&&e&&e(new qd(t)),je(!0)}function lA(t,e){return t!==null&&e&&e(new jd(t)),je(!0)}function cA(t,e){let r=e.routeConfig?e.routeConfig.canActivate:null;if(!r||r.length===0)return je(!0);let i=r.map(n=>dc(()=>{let a=e._environmentInjector,o=zs(n,a),s=eA(o)?o.canActivate(e,t):$i(a,()=>o(e,t));return Mo(s).pipe(ba())}));return je(i).pipe(Fs())}function dA(t,e){let r=e[e.length-1],n=e.slice(0,e.length-1).reverse().map(a=>KI(a)).filter(a=>a!==null).map(a=>dc(()=>{let o=a.guards.map(s=>{let u=a.node._environmentInjector,l=zs(s,u),c=tA(l)?l.canActivateChild(r,t):$i(u,()=>l(r,t));return Mo(c).pipe(ba())});return je(o).pipe(Fs())}));return je(n).pipe(Fs())}function fA(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=zs(o,s),l=rA(u)?u.canDeactivate(t,e,r,i):$i(s,()=>u(t,e,r,i));return Mo(l).pipe(ba())});return je(a).pipe(Fs())}function hA(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=zs(s,t),l=JI(u)?u.canLoad(e,r):$i(t,()=>u(e,r)),c=Mo(l);return n?c.pipe(gC(n)):c});return je(o).pipe(Fs(),yC(i))}function yC(t){return Zo(Nr(e=>{if(typeof e!="boolean")throw Kd(t,e)}),Ie(e=>e===!0))}function pA(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=zs(u,t),c=iA(l)?l.canMatch(e,r,n):$i(t,()=>l(e,r,n));return Mo(c).pipe(gC(a))});return je(s).pipe(Fs(),yC(i))}var ua=class t extends Error{segmentGroup;constructor(e){super(),this.segmentGroup=e||null,Object.setPrototypeOf(this,t.prototype)}},cl=class t extends Error{urlTree;constructor(e){super(),this.urlTree=e,Object.setPrototypeOf(this,t.prototype)}};function vA(t){throw new hr(4e3,!1)}function mA(t){throw hC(!1,ri.GuardRejected)}var Rv=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[nt])throw vA(`${e.redirectTo}`);n=n.children[nt]}}async applyRedirectCommands(e,r,i,n,a){let o=await gA(r,n,a);if(o instanceof Li)throw new cl(o);let s=this.applyRedirectCreateUrlTree(o,this.urlSerializer.parse(o),e,i);if(o[0]==="/")throw new cl(s);return s}applyRedirectCreateUrlTree(e,r,i,n){let a=this.createSegmentGroup(e,r.root,i,n);return new Li(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 Nt(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 gA(t,e,r){if(typeof t=="string")return Promise.resolve(t);let i=t;return Pd(Mo($i(r,()=>i(e))))}function yA(t,e){return t.providers&&!t._injector&&(t._injector=cp(t.providers,e,`Route: ${t.path}`)),t._injector??e}function gn(t){return t.outlet||nt}function bA(t,e){let r=t.filter(i=>gn(i)===e);return r.push(...t.filter(i=>gn(i)!==e)),r}var Pv={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function bC(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 CA(t,e,r,i,n,a,o){let s=CC(t,e,r);if(!s.matched)return je(s);let u=bC(a(s));return i=yA(e,i),pA(i,e,r,n,u,o).pipe(Ie(l=>l===!0?s:se({},Pv)))}function CC(t,e,r){if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||r.length>0)?se({},Pv):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let n=(e.matcher||j1)(r,t,e);if(!n)return se({},Pv);let a={};Object.entries(n.posParams??{}).forEach(([s,u])=>{a[s]=u.path});let o=n.consumed.length>0?se(se({},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 V1(t,e,r,i,n){return r.length>0&&xA(t,r,i,n)?{segmentGroup:new Nt(e,_A(i,new Nt(r,t.children))),slicedSegments:[]}:r.length===0&&TA(t,r,i)?{segmentGroup:new Nt(t.segments,wA(t,r,i,t.children)),slicedSegments:r}:{segmentGroup:new Nt(t.segments,t.children),slicedSegments:r}}function wA(t,e,r,i){let n={};for(let a of r)if(Qd(t,e,a)&&!i[gn(a)]){let o=new Nt([],{});n[gn(a)]=o}return se(se({},i),n)}function _A(t,e){let r={};r[nt]=e;for(let i of t)if(i.path===""&&gn(i)!==nt){let n=new Nt([],{});r[gn(i)]=n}return r}function xA(t,e,r,i){return r.some(n=>!Qd(t,e,n)||!(gn(n)!==nt)?!1:!(i!==void 0&&gn(n)===i))}function TA(t,e,r){return r.some(i=>Qd(t,e,i))}function Qd(t,e,r){return(t.hasChildren()||e.length>0)&&r.pathMatch==="full"?!1:r.path===""}function SA(t,e,r){return e.length===0&&!t.children[r]}var Nv=class{};async function DA(t,e,r,i,n,a,o,s){return new Fv(t,e,r,i,n,o,a,s).recognize()}var EA=31,Fv=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 Rv(this.urlSerializer,this.urlTree)}noMatchError(e){return new hr(4002,`'${e.segmentGroup}'`)}async recognize(){let e=V1(this.urlTree.root,[],[],this.config).segmentGroup,{children:r,rootSnapshot:i}=await this.match(e),n=new Bi(i,r),a=new ul("",n),o=tC(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 Ps([],Object.freeze({}),Object.freeze(se({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),nt,this.rootComponentType,null,{},this.injector);try{return{children:await this.processSegmentGroup(this.injector,this.config,e,nt,r),rootSnapshot:r}}catch(i){if(i instanceof cl)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof ua?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 Bi?[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=bA(r,u),d=await this.processSegmentGroup(e,c,l,u,n);o.push(...d)}let s=wC(o);return kA(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 ua||vC(l))continue;throw l}if(SA(i,n,a))return new Nv;throw new ua(i)}async processSegmentAgainstRoute(e,r,i,n,a,o,s,u){if(gn(i)!==o&&(o===nt||!Qd(n,a,i)))throw new ua(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 ua(n)}async expandSegmentAgainstRouteUsingRedirect(e,r,i,n,a,o,s){let{matched:u,parameters:l,consumedSegments:c,positionalParamSegments:d,remainingSegments:f}=CC(r,n,a);if(!u)throw new ua(r);typeof n.redirectTo=="string"&&n.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>EA&&(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,bC(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 Ps(i,n,Object.freeze(se({},this.urlTree.queryParams)),this.urlTree.fragment,IA(r),gn(r),r.component??r._loadedComponent??null,r,AA(r),e),s=Bv(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 Pd(CA(r,i,n,e,this.urlSerializer,s,this.abortSignal));if(i.path==="**"&&(r.children={}),!u?.matched)throw new ua(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}=V1(r,f,p,l,a);if(v.length===0&&g.hasChildren()){let b=await this.processChildren(c,l,g,h);return new Bi(h,b)}if(l.length===0&&v.length===0)return new Bi(h,[]);let m=gn(i)===a,y=await this.processSegment(c,l,g,v,m?nt:a,!0,h);return new Bi(h,y instanceof Bi?[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 Pd(hA(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 mA(r)}return{routes:[],injector:e}}};function kA(t){t.sort((e,r)=>e.value.outlet===nt?-1:r.value.outlet===nt?1:e.value.outlet.localeCompare(r.value.outlet))}function MA(t){let e=t.value.routeConfig;return e&&e.path===""}function wC(t){let e=[],r=new Set;for(let i of t){if(!MA(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=wC(i.children);e.push(new Bi(i.value,n))}return e.filter(i=>!r.has(i))}function IA(t){return t.data||{}}function AA(t){return t.resolve||{}}function OA(t,e,r,i,n,a,o){return ya(async s=>{let{state:u,tree:l}=await DA(t,e,r,i,s.extractedUrl,n,a,o);return Ke(se({},s),{targetSnapshot:u,urlAfterRedirects:l})})}function RA(t){return ya(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 _C(s))a.add(u);let o=0;return Jr(a).pipe(up(s=>n.has(s)?PA(s,r,t):(s.data=Bv(s,s.parent,t).resolve,je(void 0))),Nr(()=>o++),lp(1),ya(s=>o===a.size?je(e):sr))})}function _C(t){let e=t.children.map(r=>_C(r)).flat();return[t,...e]}function PA(t,e,r){let i=t.routeConfig,n=t._resolve;return i?.title!==void 0&&!lC(i)&&(n[dl]=i.title),dc(()=>(t.data=Bv(t,t.parent,r).resolve,NA(n,t,e).pipe(Ie(a=>(t._resolvedData=a,t.data=se(se({},t.data),a),null)))))}function NA(t,e,r){let i=xv(t);if(i.length===0)return je({});let n={};return Jr(i).pipe(ya(a=>FA(t[a],e,r).pipe(ba(),Nr(o=>{if(o instanceof Ns)throw Kd(new Fa,o);n[a]=o}))),lp(1),Ie(()=>n),uo(a=>vC(a)?sr:$0(a)))}function FA(t,e,r){let i=e._environmentInjector,n=zs(t,i),a=n.resolve?n.resolve(e,r):$i(i,()=>n(e,r));return Mo(a)}function H1(t){return mt(e=>{let r=t(e);return r?Jr(r).pipe(Ie(()=>e)):je(e)})}var Hv=(()=>{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===nt);return i}getResolvedTitleForRoute(r){return r.data[dl]}static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:()=>C(xC)})}return t})(),xC=(()=>{class t extends Hv{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)(Qo(kc))};static \u0275prov=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Vs=new te("",{factory:()=>({})}),vl=new te(""),TC=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=C(dy);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 q1($i(r,()=>i.loadComponent())),o=await DC(hp(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 SC(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=$t({token:t,factory:t.\u0275fac})}return t})();async function SC(t,e,r,i){let n=await q1($i(r,()=>t.loadChildren())),a=await DC(hp(n)),o;a instanceof oy||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(vl,[],{optional:!0,self:!0}).flat()),{routes:u.map(Vv),injector:s,factory:c}}async function DC(t){return t}var Jd=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:()=>C(BA)})}return t})(),BA=(()=>{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=$t({token:t,factory:t.\u0275fac})}return t})(),EC=new te("");var kC=new te(""),LA=()=>{},MC=new te(""),IC=(()=>{class t{currentNavigation=ye(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=ye(null);events=new tr;transitionAbortWithErrorSubject=new tr;configLoader=C(TC);environmentInjector=C(ji);destroyRef=C(Xt);urlSerializer=C(Bs);rootContexts=C(Ls);location=C(Sc);inputBindingEnabled=C(hl,{optional:!0})!==null;titleStrategy=C(Hv);options=C(Vs,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||jI;urlHandlingStrategy=C(Jd);createViewTransition=C(EC,{optional:!0});navigationErrorHandler=C(MC,{optional:!0});activatedRouteInjectorFeature=C(kC,{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 Hd(n)),i=n=>this.events.next(new Ud(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;it(()=>{this.transitions?.next(Ke(se({},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(St(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,"",ri.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(se({},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 la(u.id,this.urlSerializer.serialize(u.rawUrl),"",nl.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))),OA(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 ol)}),mt(f=>Jr(i.routesRecognizeHandler.deferredHandle??je(void 0)).pipe(Ie(()=>f))),Nr(()=>{let f=new al(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=sC(this.rootComponentType,this.environmentInjector).snapshot;return this.currentTransition=i=Ke(se({},u),{targetSnapshot:y,urlAfterRedirects:p,extras:Ke(se({},v),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(b=>(b.finalUrl=p,b)),je(i)}else return this.events.next(new la(u.id,this.urlSerializer.serialize(u.extractedUrl),"",nl.IgnoredByUrlHandlingStrategy)),u.resolve(!1),sr}),Ie(u=>{let l=new Bd(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);return this.events.next(l),this.currentTransition=i=Ke(se({},u),{guards:YI(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),i}),aA(u=>this.events.next(u)),mt(u=>{if(i.guardsResult=u.guardsResult,u.guardsResult&&typeof u.guardsResult!="boolean")throw Kd(this.urlSerializer,u.guardsResult);let l=new Ld(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,"",ri.GuardRejected),sr;if(u.guards.canActivateChecks.length===0)return je(u);let c=new zd(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(RA(this.paramsInheritanceStrategy),Nr({next:()=>{d=!0;let f=new Vd(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(f)},complete:()=>{d||this.cancelNavigationTransition(u,"",ri.NoDataFromResolver)}}))}),H1(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}=$I(r.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=i=u=Ke(se({},u),{targetRouterState:c,newlyCreatedRoutes:l}),this.currentNavigation.update(d=>(d.targetRouterState=c,d)),je(u)}),this.activatedRouteInjectorFeature?.operator()??(u=>u),H1(()=>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)}),Yn(1),mt(u=>{n=!1,this.events.next(new Os);let l=i.beforeActivateHandler.deferredHandle;return l?Jr(l.then(()=>u)):je(u)}),Nr(u=>{new Ov(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=LA,l)),this.lastSuccessfulNavigation.set(it(this.currentNavigation)),this.events.next(new Fn(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),this.titleStrategy?.updateTitle(u.targetRouterState.snapshot),u.resolve(!0))}),lr(mC(o.signal).pipe(St(()=>!a&&n),Nr(()=>{this.cancelNavigationTransition(i,o.signal.reason+"",ri.Aborted)}))),Nr({complete:()=>{a=!0}}),lr(this.transitionAbortWithErrorSubject.pipe(Nr(u=>{throw u}))),fc(()=>{o.abort(),a||this.cancelNavigationTransition(i,"",ri.SupersededByNewNavigation),this.currentTransition?.id===i.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),uo(u=>{if(a=!0,U1(i),this.destroyed)return i.resolve(!1),sr;if(pC(u))this.events.next(new Ki(i.id,this.urlSerializer.serialize(i.extractedUrl),u.message,u.cancellationCode)),GI(u)?this.events.next(new Rs(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=$i(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(c instanceof Ns){let{message:d,cancellationCode:f}=Kd(this.urlSerializer,c);this.events.next(new Ki(i.id,this.urlSerializer.serialize(i.extractedUrl),d,f)),this.events.next(new Rs(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){U1(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=it(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=$t({token:t,factory:t.\u0275fac})}return t})();function zA(t){return t!==tl}function U1(t){if(t.newlyCreatedRoutes)for(let e of t.newlyCreatedRoutes)e._localInjector?.destroy()}var AC=new te("");var OC=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:()=>C(VA)})}return t})(),Xd=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}},VA=(()=>{class t extends Xd{static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:t.\u0275fac})}return t})(),ef=(()=>{class t{urlSerializer=C(Bs);options=C(Vs,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=C(Sc);urlHandlingStrategy=C(Jd);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new Li;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 Li?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=sC(null,C(ji));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=$t({token:t,factory:()=>C(HA)})}return t})(),HA=(()=>{class t extends ef{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 la?this.commitTransition(i):r instanceof al?this.urlUpdateStrategy==="eager"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(i),i)):r instanceof Os?(this.commitTransition(i),this.urlUpdateStrategy==="deferred"&&!i.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(i),i)):r instanceof Ki&&!oC(r)?this.restoreHistory(i):r instanceof ko?this.restoreHistory(i,!0):r instanceof Fn&&(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=se(se({},s),this.generateNgRouterState(a,u,i));this.location.replaceState(r,"",l)}else{let u=se(se({},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"?se({navigationId:r,\u0275routerPageId:i},this.routerUrlState(n)):se({navigationId:r},this.routerUrlState(n))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:t.\u0275fac})}return t})();function Uv(t,e){t.events.pipe(St(r=>r instanceof Fn||r instanceof Ki||r instanceof ko||r instanceof la),Ie(r=>r instanceof Fn||r instanceof la?0:(r instanceof Ki?r.code===ri.Redirect||r.code===ri.SupersededByNewNavigation:!1)?2:1),St(r=>r!==2),Yn(1)).subscribe(()=>{e()})}var Ei=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=C(uy);stateManager=C(ef);options=C(Vs,{optional:!0})||{};pendingTasks=C(ey);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=C(IC);urlSerializer=C(Bs);location=C(Sc);urlHandlingStrategy=C(Jd);injector=C(ji);_events=new tr;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=C(OC);injectorCleanup=C(AC,{optional:!0});onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=C(vl,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!C(hl,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:r=>{}}),this.subscribeToNavigationEvents()}eventsSubscription=new ku;subscribeToNavigationEvents(){let r=this.navigationTransitions.events.subscribe(i=>{try{let n=this.navigationTransitions.currentTransition,a=it(this.navigationTransitions.currentNavigation);if(n!==null&&a!==null){if(this.stateManager.handleRouterEvent(i,a),i instanceof Ki&&i.code!==ri.Redirect&&i.code!==ri.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof Fn)this.navigated=!0,this.injectorCleanup?.(this.routeReuseStrategy,this.routerState,this.config);else if(i instanceof Rs){let o=i.navigationBehaviorOptions,s=this.urlHandlingStrategy.merge(i.url,n.currentRawUrl),u=se({scroll:n.extras.scroll,browserUrl:n.extras.browserUrl,info:n.extras.info,skipLocationChange:n.extras.skipLocationChange,replaceUrl:n.extras.replaceUrl||this.urlUpdateStrategy==="eager"||zA(n.source)},o);this.scheduleNavigation(s,tl,null,u,{resolve:n.resolve,reject:n.reject,promise:n.promise})}}HI(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),tl,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(se({},a),{browserUrl:r})),n){let l=se({},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(vc)(l)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return it(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(r){this.config=r.map(Vv),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=se(se({},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=rC(f)}catch{(typeof r[0]!="string"||r[0][0]!=="/")&&(r=[]),d=this.currentUrlTree.root}return iC(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,tl,null,i)}navigate(r,i={skipLocationChange:!1}){return UA(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(X0(4018,!1)),this.urlSerializer.parse("/")}}isActive(r,i){let n;if(i===!0?n=se({},G1):i===!1?n=se({},Tv):n=se(se({},Tv),i),Ba(r))return N1(this.currentUrlTree,r,n);let a=this.parseUrl(r);return N1(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 Uv(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=$t({token:t,factory:t.\u0275fac})}return t})();function UA(t){for(let e=0;e<t.length;e++)if(t[e]==null)throw new hr(4008,!1)}var qA=(()=>{class t{router=C(Ei);stateManager=C(ef);fragment=ye("");queryParams=ye({});path=ye("");serializer=C(Bs);constructor(){this.updateState(),this.router.events?.subscribe(r=>{r instanceof Fn&&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 Li(i)))}static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:t.\u0275fac})}return t})(),Hs=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;hrefAttributeValue=C(new fy("href"),{optional:!0});reactiveHref=ns(()=>this.isAnchorElement?this.computeHref(this._urlTree()):this.hrefAttributeValue);get href(){return it(this.reactiveHref)}set href(r){this.reactiveHref.set(r)}set target(r){this._target.set(r)}get target(){return it(this._target)}_target=ye(void 0);set queryParams(r){this._queryParams.set(r)}get queryParams(){return it(this._queryParams)}_queryParams=ye(void 0,{equal:()=>!1});set fragment(r){this._fragment.set(r)}get fragment(){return it(this._fragment)}_fragment=ye(void 0);set queryParamsHandling(r){this._queryParamsHandling.set(r)}get queryParamsHandling(){return it(this._queryParamsHandling)}_queryParamsHandling=ye(void 0);set state(r){this._state.set(r)}get state(){return it(this._state)}_state=ye(void 0,{equal:()=>!1});set info(r){this._info.set(r)}get info(){return it(this._info)}_info=ye(void 0,{equal:()=>!1});set relativeTo(r){this._relativeTo.set(r)}get relativeTo(){return it(this._relativeTo)}_relativeTo=ye(void 0);set preserveFragment(r){this._preserveFragment.set(r)}get preserveFragment(){return it(this._preserveFragment)}_preserveFragment=ye(!1);set skipLocationChange(r){this._skipLocationChange.set(r)}get skipLocationChange(){return it(this._skipLocationChange)}_skipLocationChange=ye(!1);set replaceUrl(r){this._replaceUrl.set(r)}get replaceUrl(){return it(this._replaceUrl)}_replaceUrl=ye(!1);browserUrl=U(void 0);isAnchorElement;onChanges=new tr;applicationErrorHandler=C(vc);options=C(Vs,{optional:!0});reactiveRouterState=C(qA);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=ye(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=se({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=J(()=>{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 it(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(Ei),qt(Vi),ry("tabindex"),qt(xa),qt(Rt),qt(hy))};static \u0275dir=re({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(i,n){i&1&&ge("click",function(o){return n.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),i&2&&Ve("href",n.reactiveHref(),ay)("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:[$r]})}return t})();var WA=new te("");function jv(t,...e){return pc([{provide:vl,multi:!0,useValue:t},{provide:Vi,useFactory:GA},{provide:ly,multi:!0,useFactory:KA},e.map(r=>r.\u0275providers)])}function GA(){return C(Ei).routerState.root}function YA(t,e){return{\u0275kind:t,\u0275providers:e}}function KA(){let t=C(li);return e=>{let r=t.get(bc);if(e!==r.components[0])return;let i=t.get(Ei),n=t.get(ZA);t.get(XA)===1&&i.initialNavigation(),t.get(QA,null,{optional:!0})?.setUpPreloading(),t.get(WA,null,{optional:!0})?.init(),i.resetRootComponentType(r.componentTypes[0]),n.closed||(n.next(),n.complete(),n.unsubscribe())}}var ZA=new te("",{factory:()=>new tr}),XA=new te("",{factory:()=>1});var QA=new te("");function $v(t={}){return YA(8,[{provide:hl,useFactory:()=>new dC(t)}])}var tf=new te("API_URL");var ii=class t{apiUrl=C(tf);events=new EventSource(`${this.apiUrl}/api/events`);projectResource=Ea(()=>`${this.apiUrl}/api/project`,{parse:e=>this.processTreeGitStatus(e)});readOnly=J(()=>this.projectResource.hasValue()?this.projectResource.value().readOnly:!0);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=$t({token:t,factory:t.\u0275fac})};var ca=class t{activeFeatureSignal=ye(null);activeFeature=this.activeFeatureSignal.asReadonly();activate(e){this.activeFeatureSignal.set(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Ze({token:t,factory:t.\u0275fac})};function JA(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 e2(t,e){t&1&&be(0,"tui-icon",6),t&2&&st("font-size",16,"px")}function t2(t,e){t&1&&be(0,"tui-icon",7),t&2&&st("font-size",16,"px")}function r2(t,e){if(t&1&&(B(0,"span",9),j(1),F()),t&2){let r=$(4);O(),we(" ",r.skippedCount()," / ")}}function i2(t,e){if(t&1&&(B(0,"span",10),j(1),F()),t&2){let r=$(4);O(),we(" ",r.failedCount()," / ")}}function n2(t,e){if(t&1&&(B(0,"div",4)(1,"span",8),j(2),F(),ne(3,r2,2,1,"span",9),ne(4,i2,2,1,"span",10),B(5,"span",11),j(6),F()()),t&2){let r=$(3);O(2),we(" ",r.automatedCount()," / "),O(),ae(r.skippedCount()?3:-1),O(),ae(r.failedCount()?4:-1),O(2),we(" ",r.totalCount()," ")}}function a2(t,e){if(t&1&&(B(0,"div",0),ne(1,e2,1,2,"tui-icon",1)(2,t2,1,2,"tui-icon",2),B(3,"span"),j(4),F()(),B(5,"div",3),ne(6,n2,7,4,"div",4),B(7,"span",5),j(8),F()()),t&2){let r=e,i=$(2);O(),ae(i.hasAsserts()?1:2),O(2),is(r.gitStatus),O(),we(" ",r.title," "),O(2),ae(i.totalCount()>0?6:-1),O(),is(r.gitStatus),O(),we(" ",i.gitStatusToLetter(r.gitStatus)," ")}}function o2(t,e){t&1&&j(0," \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430... ")}function s2(t,e){if(t&1&&ne(0,a2,9,8)(1,o2,1,0),t&2){let r,i=$();ae((r=i.feature())?0:1,r)}}var Us=class t{projectSnapshotResource=C(ii).projectResource;activeFeatureService=C(ca);router=C(Ei);featureCode=U.required();isMissing=ye(!1);isActive=J(()=>{let e=this.activeFeatureService.activeFeature();return e?this.featureCode()===e.code:!1});hasAsserts=J(()=>{let e=this.feature();return e?e.groups.length>0:!1});feature=J(()=>{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)});assertions=J(()=>{let e=this.feature();return e?e.groups.flatMap(r=>r.assertions).filter(r=>r.type==="assert"):[]});totalCount=J(()=>this.assertions().length);automatedCount=J(()=>this.assertions().filter(e=>e.status!=="not-automated").length);skippedCount=J(()=>this.assertions().filter(e=>e.status==="skipped").length);failedCount=J(()=>this.assertions().filter(e=>e.status==="failed").length);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=Z({type:t,selectors:[["feature-item"]],hostVars:2,hostBindings:function(r,i){r&1&&ge("click",function(){return i.activate()}),r&2&&Qe("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"],[1,"status"],["icon","@tui.table-of-contents"],["icon","@tui.file-text"],["tuiHint","\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u043E","tuiHintAppearance","floating"],["tuiHint","\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E","tuiHintAppearance","floating",1,"skipped"],["tuiHint","\u041F\u0440\u043E\u0432\u0430\u043B\u0435\u043D\u043E","tuiHintAppearance","floating",1,"failed"],["tuiHint","\u0412\u0441\u0435\u0433\u043E","tuiHintAppearance","floating"]],template:function(r,i){r&1&&ne(0,JA,1,0)(1,s2,2,1),r&2&&ae(i.isMissing()?0:1)},dependencies:[Fi],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[_ngcontent-%COMP%] .skipped[_ngcontent-%COMP%]{color:var(--tui-status-warning)}.counters[_ngcontent-%COMP%] .failed[_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 u2(t,e){if(t&1&&be(0,"feature-item",0),t&2){let r=e.$implicit;X("featureCode",r)}}function l2(t,e){t&1&&j(0,` \u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E
|
|
20
|
+
`)}var rf=class t{featureCodes=U.required();static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["feature-list"]],inputs:{featureCodes:[1,"featureCodes"]},decls:3,vars:1,consts:[[3,"featureCode"]],template:function(r,i){r&1&&(dt(0,u2,1,1,"feature-item",0,bi),ne(2,l2,1,0)),r&2&&(ft(i.featureCodes()),O(2),ae(i.featureCodes().length===0?2:-1))},dependencies:[Us],encapsulation:2})};var[RC,P8]=ut({appearance:"",round:!0,size:"m"}),c2=class qv{static{this.\u0275fac=function(i){return new(i||qv)}}static{this.\u0275cmp=Z({type:qv,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})}},PC=(()=>{class t{constructor(){this.options=C(RC),this.nothing=Gt(c2),this.icons=C(Ni),this.fallback=ye(!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=re({type:t,selectors:[["","tuiAvatar",""]],hostAttrs:["tuiAvatar",""],hostVars:10,hostBindings:function(i,n){if(i&1&&ge("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()),Qe("_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:[xe([In(RC)]),Le([An,{directive:Ni,inputs:["iconStart","tuiAvatar"]}])]})}}return t})();var d2=new te("",{factory:()=>"@tui.chevron-down"}),f2=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),js=(()=>{class t{constructor(){this.el=Be(),this.dropdown=C(kr,{optional:!0}),this.nothing=Gt(f2),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=re({type:t,selectors:[["","tuiChevron",""]],hostAttrs:["tuiChevron",""],inputs:{rotated:[1,"tuiChevron","rotated"]},features:[xe([_t(rd,d2)])]})}}return t})();var h2={appearance:"",size:"l"},[NC,FC]=ut(h2),p2=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),$s=(()=>{class t{constructor(){this.nothing=Gt(p2),this.size=U(C(NC).size)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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:[xe([In(NC)]),Le([An,Yi])]})}}return t})();var v2=["*"],m2={size:"m"},[g2,sY]=ut(m2),BC=(()=>{class t{constructor(){this.size=U(C(g2).size)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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([On])],ngContentSelectors:v2,decls:1,vars:0,template:function(i,n){i&1&&(It(),Xe(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 y2=["*",[["tui-badge-notification","tuiSlot","top"],["img","tuiSlot","top"]],[["","tuiSlot","top"]],[["tui-badge-notification","tuiSlot","bottom"],["img","tuiSlot","bottom"]],[["","tuiSlot","bottom"]]],b2=["*","tui-badge-notification[tuiSlot='top'], img[tuiSlot='top']","[tuiSlot='top']","tui-badge-notification[tuiSlot='bottom'], img[tuiSlot='bottom']","[tuiSlot='bottom']"],LC=(()=>{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=Z({type:t,selectors:[["tui-badged-content"]],ngContentSelectors:b2,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&&(It(y2),Xe(0),ci(1,"div",2,0),rs("resize",function(){return n.onResize()}),Xe(3,1),ci(4,"div",3),Xe(5,2),Sn()(),ci(6,"div",4,1),rs("resize",function(){return n.onResize()}),Xe(8,3),ci(9,"div",3),Xe(10,4),Sn()()),i&2){let a=pr(2),o=pr(7);O(),st("--t-badge-height",a.offsetHeight,"px")("--t-img",n.imgTop),O(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})(),zC=(()=>{class t{constructor(){this.tuiSlot=U("top")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiSlot",""]],inputs:{tuiSlot:[1,"tuiSlot"]}})}}return t})();var gY=new te("",{factory:yt("confirm")}),yY=new te("",{factory:yt("cancel")}),bY=new te("",{factory:yt("done")}),CY=new te("",{factory:yt("more")}),wY=new te("",{factory:yt("hide")}),_Y=new te("",{factory:yt("showAll")}),xY=new te("",{factory:yt("otherDate")}),TY=new te("",{factory:yt("mobileCalendarTexts")}),SY=new te("",{factory:yt("range")}),DY=new te("",{factory:yt("countTexts")}),EY=new te("",{factory:yt("time")}),kY=new te("",{factory:yt("dateTexts")}),MY=new te("",{factory:yt("digitalInformationUnits")}),Wv=new te("",{factory:yt("copyTexts")}),IY=new te("",{factory:yt("passwordTexts")}),AY=new te("",{factory:yt("shortCalendarMonths")}),OY=new te("",{factory:yt("fileTexts")}),RY=new te("",{factory:yt("pagination")}),PY=new te("",{factory:yt("inputFileTexts")}),NY=new te("",{factory:yt("multiSelectTexts")}),FY=new te("",{factory:yt("countries")}),BY=new te("",{factory:yt("previewTexts")}),LY=new te("",{factory:yt("zoomTexts")}),zY=new te("",{factory:yt("phoneSearch")}),VY=new te("",{factory:yt("dayRangePeriods")});var C2={appearance:"neutral",size:"s"},[jY,VC]=ut(C2);function HC(){let t=C(di,{optional:!0}),e=t?.control()||C(Wr,{optional:!0}),r=Wi(Yc(e),{requireSync:!0});return J(()=>{let i=t?.child();return i?i.value():r()})}function w2(t,e){if(t&1&&be(0,"input",0),t&2){let r=$();X("size",r.datalist.size()==="l"?"m":"s")}}var _2=(()=>{class t{constructor(){this.handlers=C(Si),this.value=HC(),this.datalist=C(Pn),this.option=C(Ss),this.selected=J((r=this.value(),i=this.option.value())=>dn(i)&&dn(r)&&this.handlers.identityMatcher()(r,i)),this.scrolled=Pi(dd,"tuiScrollIntoView",this.selected)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["ng-component"]],hostAttrs:["tuiSelectOption",""],hostVars:1,hostBindings:function(i,n){i&2&&Ve("aria-selected",n.selected())},features:[xe([Zb({appearance:()=>"action"})]),Le([dd])],decls:1,vars:1,consts:[["aria-hidden","true","checked","","tuiCheckbox","","type","checkbox",1,"t-check",3,"size"]],template:function(i,n){i&1&&ne(0,w2,1,1,"input",0),i&2&&ae(n.selected()?0:-1)},dependencies:[Xb],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})(),nf=(()=>{class t extends vn{constructor(){super(...arguments),this.input=C(Zu),this.open=C(sa).open,this.itemsHandlers=C(Si),this.dropdownEnabled=c1(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=re({type:t,selectors:[["input","tuiSelect",""]],hostVars:1,hostBindings:function(i,n){i&1&&ge("input",function(o){return(o.inputType==null?null:o.inputType.includes("delete"))&&n.setValue(null)}),i&2&&Fr("disabled",n.disabled())},features:[xe([h1(_2),xd(t),g1(t)]),Le([_1,w1]),Ae]})}}return t})();var Gv=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)}},Io=(()=>{class t{_document=C(Dt);copy(r){let i=this.beginCopy(r),n=i.copy();return i.destroy(),n}beginCopy(r){return new Gv(r,this._document)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=$t({token:t,factory:t.\u0275fac})}return t})(),x2=new te("CDK_COPY_TO_CLIPBOARD_CONFIG"),UC=(()=>{class t{_clipboard=C(Io);_ngZone=C(gr);text="";attempts=1;copied=new yi;_pending=new Set;_destroyed=!1;_currentTimeout;constructor(){let r=C(x2,{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=re({type:t,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(i,n){i&1&&ge("click",function(){return n.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}})}return t})(),jC=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Xn({type:t});static \u0275inj=Kn({})}return t})();var $C=["*"];function S2(t,e){if(t&1&&j(0),t&2){let r=$();we(" ",r.copiedText()," ")}}function D2(t,e){t&1&&Xe(0)}function E2(t,e){if(t&1&&(be(0,"tui-icon",4),j(1)),t&2){let r=$();X("icon",r.check),O(),we(" ",r.texts()[1],`
|
|
24
|
+
`)}}var[qC,jK]=ut({icon:"@tui.copy"}),WC=(()=>{class t{constructor(){this.el=Be(),this.clipboard=C(Io),this.options=C(qC),this.copyTexts=C(Wv),this.notification=C(Es),this.check=En(this.notification.icon)?this.notification.icon:this.notification.icon("positive"),this.copied=ye(!1),this.copiedText=J(()=>this.copyTexts()[1]),this.icon=ys(J(()=>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=Z({type:t,selectors:[["","tuiButtonCopy",""]],hostAttrs:["tuiButton","","type","button"],hostBindings:function(i,n){i&1&&ge("click.capture",function(o){return n.copy(o.target)},ts)},inputs:{tuiButtonCopy:[1,"tuiButtonCopy"]},features:[xe([Gr({appearance:"flat-grayscale",size:"s"})]),Le([ti])],ngContentSelectors:$C,decls:2,vars:1,template:function(i,n){i&1&&(It(),ne(0,S2,1,1)(1,D2,1,0)),i&2&&ae(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})(),af=(()=>{class t{constructor(){this.notification=C(Es),this.options=C(qC),this.copied$=new xr(!1),this.texts=C(Wv),this.hint=Wi(this.copied$.pipe(mt(r=>Ii(2e3).pipe(Ie(ta),Ut(r))))),this.size=U("m")}get check(){return En(this.notification.icon)?this.notification.icon:this.notification.icon("positive")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["tui-copy"]],hostVars:1,hostBindings:function(i,n){i&1&&ge("pointerdown",function(){return n.copied$.next(!1)}),i&2&&Ve("data-size",n.size())},inputs:{size:[1,"size"]},ngContentSelectors:$C,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&&(It(),B(0,"span",2,0),ge("cdkCopyToClipboardCopied",function(o){return n.copied$.next(o)}),Xe(2),F(),B(3,"button",3),ge("cdkCopyToClipboardCopied",function(o){return n.copied$.next(o)}),F(),Me(4,E2,2,2,"ng-template",null,1,Ri)),i&2){let a=pr(1),o=pr(5);X("cdkCopyToClipboard",a.textContent??"")("tuiHint",o)("tuiHintManual",!!n.hint()),O(3),X("cdkCopyToClipboard",a.textContent??"")("iconStart",n.options.icon),Ve("aria-label",n.texts()[0])}},dependencies:[jC,UC,ti,mn,P1,Fi],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 k2=t=>({$implicit:t});function M2(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}function I2(t,e){if(t&1){let r=Pt();B(0,"button",3),ge("click.capture",function(){let n=Ct(r).$implicit,a=$(2);return wt(a.itemClick.emit(n))}),Me(1,M2,2,1,"ng-container",4),F()}if(t&2){let r=e.$implicit,i=$(2);X("disabled",i.handlers.disabledItemHandler()(r))("value",r),O(),X("polymorpheusOutlet",i.content())("polymorpheusOutletContext",Oi(4,k2,r))}}function A2(t,e){if(t&1&&(B(0,"tui-data-list",0),dt(1,I2,2,6,"button",2,bi),F()),t&2){let r=$();X("emptyContent",r.emptyContent())("size",r.size()),O(),ft(r.$cast(r.items()))}}function O2(t,e){t&1&&be(0,"tui-loader",1)}var of=(()=>{class t{constructor(){this.handlers=C(Si),this.datalist=Ti(Pn),this.content=J(()=>this.itemContent()??(({$implicit:r})=>this.handlers.stringify()(r))),this.options=J(()=>this.datalist()?.options()??[]),this.items=U([]),this.emptyContent=U(),this.size=U(lv()),this.itemContent=U(),this.itemClick=xi()}$cast(r){return r}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["tui-data-list-wrapper",3,"labels",""]],viewQuery:function(i,n){i&1&&_i(n.datalist,Pn,5),i&2&&Wt()},inputs:{items:[1,"items"],emptyContent:[1,"emptyContent"],size:[1,"size"],itemContent:[1,"itemContent"]},outputs:{itemClick:"itemClick"},features:[xe([Qc(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&&ne(0,A2,3,2,"tui-data-list",0)(1,O2,1,0,"tui-loader",1),i&2&&ae(n.items()?0:1)},dependencies:[Er,Pn,p1,Ss,Td],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 R2={color:null,size:"m"},[iZ,GC]=ut(R2);var P2=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),YC=(()=>{class t{constructor(){this.nothing=Gt(P2),this.tuiStatus=U("")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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 Xv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ro=Xv();function rw(t){Ro=t}var Ao={exec:()=>null};function qs(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 xt(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(ni.caret,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,e)};return i}var N2=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),ni={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:qs(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:qs(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:qs(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:qs(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:qs(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:qs(t=>new RegExp(`^ {0,${t}}>`))},F2=/^(?:[ \t]*(?:\n|$))+/,B2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,L2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,z2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Qv=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,iw=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,nw=xt(iw).replace(/bull/g,Qv).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(),V2=xt(iw).replace(/bull/g,Qv).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(),Jv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,H2=/^[^\n]+/,em=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,U2=xt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",em).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),j2=xt(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Qv).getRegex(),df="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",tm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$2=xt("^ {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",tm).replace("tag",df).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),aw=t=>xt(Jv).replace("hr",yl).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",df).getRegex(),q2=aw(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),W2=aw(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),G2=xt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",W2).getRegex(),rm={blockquote:G2,code:B2,def:U2,fences:L2,heading:z2,hr:yl,html:$2,lheading:nw,list:j2,newline:F2,paragraph:q2,table:Ao,text:H2},KC=xt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yl).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",df).getRegex(),Y2=Ke(se({},rm),{lheading:V2,table:KC,paragraph:xt(Jv).replace("hr",yl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",KC).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",df).getRegex()}),K2=Ke(se({},rm),{html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tm).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:Ao,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(Jv).replace("hr",yl).replace("heading",` *#{1,6} *[^
|
|
27
|
+
]`).replace("lheading",nw).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Z2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,X2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ow=/^( {2,}|\\)\n(?!\s*$)/,Q2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ws=/[\p{P}\p{S}]/u,ff=/[\s\p{P}\p{S}]/u,im=/[^\s\p{P}\p{S}]/u,J2=xt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ff).getRegex(),sw=/(?!~)[\p{P}\p{S}]/u,eO=/(?!~)[\s\p{P}\p{S}]/u,tO=/(?:[^\s\p{P}\p{S}]|~)/u,rO=xt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",N2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),uw=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,iO=xt(uw,"u").replace(/punct/g,Ws).getRegex(),nO=xt(uw,"u").replace(/punct/g,sw).getRegex(),lw="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",aO=xt(lw,"gu").replace(/notPunctSpace/g,im).replace(/punctSpace/g,ff).replace(/punct/g,Ws).getRegex(),oO=xt(lw,"gu").replace(/notPunctSpace/g,tO).replace(/punctSpace/g,eO).replace(/punct/g,sw).getRegex(),sO=xt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,im).replace(/punctSpace/g,ff).replace(/punct/g,Ws).getRegex(),uO=xt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ws).getRegex(),lO="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",cO=xt(lO,"gu").replace(/notPunctSpace/g,im).replace(/punctSpace/g,ff).replace(/punct/g,Ws).getRegex(),dO=xt(/\\(punct)/,"gu").replace(/punct/g,Ws).getRegex(),fO=xt(/^<(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(),hO=xt(tm).replace("(?:-->|$)","-->").getRegex(),pO=xt("^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",hO).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),uf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,vO=xt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",uf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cw=xt(/^!?\[(label)\]\[(ref)\]/).replace("label",uf).replace("ref",em).getRegex(),dw=xt(/^!?\[(ref)\](?:\[\])?/).replace("ref",em).getRegex(),mO=xt("reflink|nolink(?!\\()","g").replace("reflink",cw).replace("nolink",dw).getRegex(),ZC=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,nm={_backpedal:Ao,anyPunctuation:dO,autolink:fO,blockSkip:rO,br:ow,code:X2,del:Ao,delLDelim:Ao,delRDelim:Ao,emStrongLDelim:iO,emStrongRDelimAst:aO,emStrongRDelimUnd:sO,escape:Z2,link:vO,nolink:dw,punctuation:J2,reflink:cw,reflinkSearch:mO,tag:pO,text:Q2,url:Ao},gO=Ke(se({},nm),{link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",uf).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",uf).getRegex()}),Yv=Ke(se({},nm),{emStrongRDelimAst:oO,emStrongLDelim:nO,delLDelim:uO,delRDelim:cO,url:xt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ZC).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:xt(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ZC).getRegex()}),yO=Ke(se({},Yv),{br:xt(ow).replace("{2,}","*").getRegex(),text:xt(Yv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),sf={normal:rm,gfm:Y2,pedantic:K2},ml={normal:nm,gfm:Yv,breaks:yO,pedantic:gO},bO={"&":"&","<":"<",">":">",'"':""","'":"'"},XC=t=>bO[t];function Bn(t,e){if(e){if(ni.escapeTest.test(t))return t.replace(ni.escapeReplace,XC)}else if(ni.escapeTestNoEncode.test(t))return t.replace(ni.escapeReplaceNoEncode,XC);return t}function QC(t){try{t=encodeURI(t).replace(ni.percentDecode,"%")}catch{return null}return t}function JC(t,e){let r=t.replace(ni.findPipe,(a,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),i=r.split(ni.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(ni.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 ew(t){let e=t.split(`
|
|
28
|
+
`),r=e.length-1;for(;r>=0&&ni.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
|
|
29
|
+
`)}function CO(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 wO(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 tw(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 _O(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 lf=class{options;rules;lexer;constructor(t){this.options=t||Ro}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]:ew(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=_O(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=wO(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=ew(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=JC(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(JC(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=CO(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)),tw(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 tw(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}}}},yn=class Kv{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ro,this.options.tokenizer=this.options.tokenizer||new lf,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:ni,block:sf.normal,inline:ml.normal};this.options.pedantic?(r.block=sf.pedantic,r.inline=ml.pedantic):this.options.gfm&&(r.block=sf.gfm,this.options.breaks?r.inline=ml.breaks:r.inline=ml.gfm),this.tokenizer.rules=r}static get rules(){return{block:sf,inline:ml}}static lex(e,r){return new Kv(r).lex(e)}static lexInline(e,r){return new Kv(r).inlineTokens(e)}lex(e){e=e.replace(ni.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(ni.tabCharGlobal," ").replace(ni.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)}},cf=class{options;parser;constructor(t){this.options=t||Ro}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(ni.notSpaceStart)?.[0],n=t.replace(ni.endingNewline,"")+`
|
|
71
|
+
`;return i?'<pre><code class="language-'+Bn(i)+'">'+(r?n:Bn(n,!0))+`</code></pre>
|
|
72
|
+
`:"<pre><code>"+(r?n:Bn(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>${Bn(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=QC(t);if(n===null)return i;t=n;let a='<a href="'+t+'"';return e&&(a+=' title="'+Bn(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=QC(t);if(n===null)return Bn(r);t=n;let a=`<img src="${t}" alt="${Bn(r)}"`;return e&&(a+=` title="${Bn(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Bn(t.text)}},am=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}},bn=class Zv{options;renderer;textRenderer;constructor(e){this.options=e||Ro,this.options.renderer=this.options.renderer||new cf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new am}static parse(e,r){return new Zv(r).parse(e)}static parseInline(e,r){return new Zv(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}},gl=class{options;block;constructor(t){this.options=t||Ro}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?yn.lex:yn.lexInline}provideParser(t=this.block){return t?bn.parse:bn.parseInline}},xO=class{defaults=Xv();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=bn;Renderer=cf;TextRenderer=am;Lexer=yn;Tokenizer=lf;Hooks=gl;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=se({},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 cf(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 lf(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 gl;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];gl.passThroughHooks.has(a)?n[o]=l=>{if(this.defaults.async&&gl.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=se(se({},this.defaults),i)}),this}setOptions(t){return this.defaults=se(se({},this.defaults),t),this}lexer(t,e){return yn.lex(t,e??this.defaults)}parser(t,e){return bn.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i=se({},r),n=se(se({},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?yn.lex:yn.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?bn.parse:bn.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?yn.lex:yn.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?bn.parse:bn.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>"+Bn(r.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(r);throw r}}},Oo=new xO;function Ft(t,e){return Oo.parse(t,e)}Ft.options=Ft.setOptions=function(t){return Oo.setOptions(t),Ft.defaults=Oo.defaults,rw(Ft.defaults),Ft};Ft.getDefaults=Xv;Ft.defaults=Ro;Ft.use=function(...t){return Oo.use(...t),Ft.defaults=Oo.defaults,rw(Ft.defaults),Ft};Ft.walkTokens=function(t,e){return Oo.walkTokens(t,e)};Ft.parseInline=Oo.parseInline;Ft.Parser=bn;Ft.parser=bn.parse;Ft.Renderer=cf;Ft.TextRenderer=am;Ft.Lexer=yn;Ft.lexer=yn.lex;Ft.Tokenizer=lf;Ft.Hooks=gl;Ft.parse=Ft;var fZ=Ft.options,hZ=Ft.setOptions,pZ=Ft.use,vZ=Ft.walkTokens,mZ=Ft.parseInline;var gZ=bn.parse,yZ=yn.lex;var fw={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 Gs=class t{constructor(){Ft.use({extensions:[fw]})}parse(e){return Ft.lexer(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=Ze({token:t,factory:t.\u0275fac})};var zt=class t{token=U.required();static \u0275fac=function(r){return new(r||t)};static \u0275dir=re({type:t,inputs:{token:[1,"token"]}})};var hf=class t extends zt{sanitizer=C(Mc);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=Z({type:t,selectors:[["md-generic-renderer"]],hostVars:1,hostBindings:function(r,i){r&2&&Fr("innerHTML",i.htmlContent,es)},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 om=new te("TOKEN_RENDERERS"),Qt=class t{constructor(e){this.viewContainerRef=e}viewContainerRef;injector=C(li);renderers=C(om);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]??hf;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=re({type:t,selectors:[["","forToken",""]],inputs:{tokens:[0,"forToken","tokens"]},features:[$r]})};function TO(t,e){t&1&&rt(0)}var pf=class t extends zt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["blockquote","mdBlockquote",""]],features:[Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,TO,1,0,"ng-container",0),r&2&&X("forToken",i.token().tokens)},dependencies:[Qt],styles:["[_nghost-%COMP%]{border-left:.2rem solid var(--tui-text-action);padding-left:.5rem;margin-left:.8rem}"]})};var Ys=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)),Xo(1));runMermaid(e){this.mermaid$.subscribe(r=>{r.run({nodes:e})})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=$t({token:t,factory:t.\u0275fac})};var vf=class t{constructor(e){this.elementRef=e}elementRef;mermaidService=C(Ys);code=U.required();ngAfterViewInit(){this.elementRef.nativeElement.querySelectorAll("code")&&this.mermaidService.runMermaid([this.elementRef.nativeElement])}static \u0275fac=function(r){return new(r||t)(qt(Rt))};static \u0275cmp=Z({type:t,selectors:[["md-mermaid"]],inputs:{code:[1,"code"]},decls:1,vars:1,template:function(r,i){r&1&&j(0),r&2&&we("",i.code(),`
|
|
90
|
+
`)},styles:['svg[_ngcontent-%COMP%] rect.note[_ngcontent-%COMP%]{fill:"red"}']})};function SO(t,e){if(t&1&&be(0,"md-mermaid",0),t&2){let r=$();X("code",r.token().text)}}function DO(t,e){if(t&1&&(B(0,"pre"),j(1," "),B(2,"code",1),j(3,`
|
|
91
|
+
`),F(),j(4,`
|
|
92
|
+
`),B(5,"button",2),j(6,`
|
|
93
|
+
\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C
|
|
94
|
+
`),F(),j(7,`
|
|
95
|
+
`),F()),t&2){let r=$();O(2),X("highlight",r.token().text)("language",r.token().lang??"text"),O(3),X("tuiButtonCopy",r.token().text)}}var mf=class t extends zt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({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&&ne(0,SO,1,1,"md-mermaid",0)(1,DO,8,3,"pre"),r&2&&ae(i.token().lang==="mermaid"?0:1)},dependencies:[Cy,vf,wy,WC],styles:["[_nghost-%COMP%]{position:relative;margin:.6em 0}.copy[_ngcontent-%COMP%]{position:absolute;top:.4em;right:.4em}"]})};function EO(t,e){t&1&&rt(0)}function kO(t,e){if(t&1&&(B(0,"h1"),Me(1,EO,1,0,"ng-container",0),F()),t&2){let r=$();O(),X("forToken",r.token().tokens)}}function MO(t,e){t&1&&rt(0)}function IO(t,e){if(t&1&&(B(0,"h2"),Me(1,MO,1,0,"ng-container",0),F()),t&2){let r=$();O(),X("forToken",r.token().tokens)}}function AO(t,e){t&1&&rt(0)}function OO(t,e){if(t&1&&(B(0,"h3"),Me(1,AO,1,0,"ng-container",0),F()),t&2){let r=$();O(),X("forToken",r.token().tokens)}}function RO(t,e){t&1&&rt(0)}function PO(t,e){if(t&1&&(B(0,"h4"),Me(1,RO,1,0,"ng-container",0),F()),t&2){let r=$();O(),X("forToken",r.token().tokens)}}function NO(t,e){t&1&&rt(0)}function FO(t,e){if(t&1&&(B(0,"h5"),Me(1,NO,1,0,"ng-container",0),F()),t&2){let r=$();O(),X("forToken",r.token().tokens)}}function BO(t,e){t&1&&rt(0)}function LO(t,e){if(t&1&&(B(0,"h6"),Me(1,BO,1,0,"ng-container",0),F()),t&2){let r=$();O(),X("forToken",r.token().tokens)}}var gf=class t extends zt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["md-heading"]],features:[Ae],decls:6,vars:1,consts:[[4,"forToken"]],template:function(r,i){if(r&1&&ne(0,kO,2,1,"h1")(1,IO,2,1,"h2")(2,OO,2,1,"h3")(3,PO,2,1,"h4")(4,FO,2,1,"h5")(5,LO,2,1,"h6"),r&2){let n;ae((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 yf=class t extends zt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["hr","mdHr",""]],features:[Ae],decls:0,vars:0,template:function(r,i){},encapsulation:2})};var hw=t=>/^https?:\/\//i.test(t),bf=t=>hw(t)?t:`/api/files?path=${encodeURIComponent(t)}`,pw=t=>{if(!hw(t))return/\.html$/i.test(t);try{return/\.html$/i.test(new URL(t).pathname)}catch{return!1}};function zO(t,e){if(t&1&&Ta(0,"iframe",0),t&2){let r=$();Fr("src",r.frameSrc(),ny)("title",r.title||r.text)}}function VO(t,e){if(t&1&&Ta(0,"img",1),t&2){let r=$();Fr("src",r.src,mc)("alt",r.text)("title",r.title)}}var Cf=class t extends zt{sanitizer=C(Mc);isHtml=J(()=>pw(this.token().href));frameSrc=J(()=>this.sanitizer.bypassSecurityTrustResourceUrl(this.src));get src(){return bf(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=Z({type:t,selectors:[["md-image"]],features:[Ae],decls:2,vars:1,consts:[["sandbox","",3,"src","title"],[3,"src","alt","title"]],template:function(r,i){r&1&&ne(0,zO,1,2,"iframe",0)(1,VO,1,3,"img",1),r&2&&ae(i.isHtml()?0:1)},styles:["[_nghost-%COMP%]{display:contents}img[_ngcontent-%COMP%], iframe[_ngcontent-%COMP%]{max-width:100%}iframe[_ngcontent-%COMP%]{width:100%;height:auto;aspect-ratio:16/9}"]})};var wf=class t extends zt{clipboard=C(Io);text=J(()=>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=Z({type:t,selectors:[["span","mdInlineCode",""]],hostBindings:function(r,i){r&1&&ge("click",function(){return i.copyToClipboard()})},features:[Ae],decls:2,vars:1,template:function(r,i){r&1&&(B(0,"tui-copy"),j(1),F()),r&2&&(O(),Br(i.text()))},dependencies:[af],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 HO=()=>[],UO=t=>({feature:t}),xf=class t extends zt{featureCode=J(()=>this.token().identifier.slice(1));static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({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&&(B(0,"a",0),j(1),F()),r&2&&(X("routerLink",Ai(3,HO))("queryParams",Oi(4,UO,i.featureCode())),O(),we(" ",i.token().identifier,`
|
|
96
|
+
`))},dependencies:[Hs,fd],encapsulation:2})};function jO(t,e){t&1&&rt(0)}var Tf=class t extends zt{get href(){return bf(this.token().href)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["a","mdLink",""]],hostVars:1,hostBindings:function(r,i){r&2&&Fr("href",i.href,mc)},features:[Le([fd]),Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,jO,1,0,"ng-container",0),r&2&&X("forToken",i.token().tokens)},dependencies:[Qt],encapsulation:2})};function $O(t,e){t&1&&rt(0)}var Df=class t extends zt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["li","mdListItem",""]],features:[Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,$O,1,0,"ng-container",0),r&2&&X("forToken",i.token().tokens)},dependencies:[Qt],styles:["[_nghost-%COMP%]{margin:.4rem 0rem}"]})};function qO(t,e){t&1&&rt(0)}var Ef=class t extends zt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["p","mdParagraph",""]],features:[Ae],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,qO,1,0,"ng-container",0),r&2&&X("forToken",i.token().tokens)},dependencies:[Qt],encapsulation:2})};var Cl=["*"];function WO(t,e){if(t&1){let r=Pt();B(0,"button",4),ge("click",function(){Ct(r);let n=$();return wt(n.updateSorterAndDirection())}),rt(1,2),be(2,"tui-icon",5),F()}if(t&2){let r=$(),i=pr(3);Qe("t-sort_sorted",r.isCurrent),O(),X("ngTemplateOutlet",i),O(),X("icon",r.icon)}}function GO(t,e){if(t&1&&rt(0,2),t&2){$();let r=pr(3);X("ngTemplateOutlet",r)}}function YO(t,e){t&1&&Xe(0)}function KO(t,e){if(t&1){let r=Pt();B(0,"div",6),ge("tuiResized",function(n){Ct(r);let a=$();return wt(a.onResized(n))}),F()}}function ZO(t,e){if(t&1&&(B(0,"td",2),j(1),F()),t&2){let r=$().$implicit,i=$(2);O(),we(" ",i.item()[r]," ")}}function XO(t,e){if(t&1&&(rt(0,1),Me(1,ZO,2,1,"ng-template",null,0,Ri)),t&2){let r=e.$implicit,i=pr(2),n=$();X("ngTemplateOutlet",n[r]&&n[r].template||i)}}function QO(t,e){if(t&1&&dt(0,XO,3,1,null,null,bi),t&2){let r=$();ft(r.table.columns())}}function JO(t,e){t&1&&be(0,"td")}function eR(t,e){if(t&1&&(Ci(0),j(1),wi()),t&2){let r=e.polymorpheusOutlet;O(),we(" ",r," ")}}function tR(t,e){if(t&1){let r=Pt();B(0,"tr")(1,"th",0)(2,"button",1),ge("click",function(){Ct(r);let n=$();return wt(n.onClick())}),B(3,"span",2),Me(4,eR,2,1,"ng-container",3),F(),be(5,"tui-icon",4),F()()()}if(t&2){let r=$();O(),X("colSpan",r.table.columns().length),O(3),X("polymorpheusOutlet",r.heading()),O(),X("tuiChevron",r.open())}}function rR(t,e){t&1&&Xe(0)}var iR=t=>({$implicit:t});function nR(t,e){if(t&1&&rt(0,1),t&2){let r=e.$implicit,i=$(),n=pr(3);X("ngTemplateOutlet",(i==null||i[r]==null?null:i[r].template)||n)("ngTemplateOutletContext",Oi(2,iR,r))}}function aR(t,e){if(t&1&&(B(0,"th",2),j(1),F()),t&2){let r=$().$implicit;O(),we(" ",r.toString()," ")}}function oR(t,e){if(t&1&&ne(0,aR,2,1,"th",2),t&2){let r=$(2);ae(!r.th()&&!r.heads().length?0:-1)}}function sR(t,e){if(t&1&&(dt(0,nR,1,4,"ng-container",1,bi),Me(2,oR,1,1,"ng-template",null,0,Ri)),t&2){let r=$();ft(r.table.columns())}}var kf=(()=>{class t{constructor(){this.tuiCell=U(""),this.template=C(yr)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["ng-template","tuiCell",""]],inputs:{tuiCell:[1,"tuiCell"]}})}}return t})(),sm=(()=>{class t{constructor(){this.tuiHead=U.required(),this.template=C(yr)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiHead",""]],inputs:{tuiHead:[1,"tuiHead"]}})}}return t})(),uR=(()=>{class t{constructor(){this.doc=C(Dt),this.el=Be(),this.tuiResized$=Yt(this.el,"mousedown").pipe(fb(),mt(()=>{let{width:r,right:i}=this.el.closest("th")?.getBoundingClientRect()||ea;return Yt(this.doc,"mousemove").pipe(rr(),Ie(({clientX:n})=>r+n-i),lr(Yt(this.doc,"mouseup")))})),this.tuiResized=kn(this.tuiResized$)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["","tuiResized",""]],outputs:{tuiResized:"tuiResized"}})}}return t})(),Po={Asc:1,Desc:-1},lR={sticky:!1,resizable:!1,open:!0,size:"m",direction:Po.Asc,requiredSort:!1,sortIcons:{asc:"@tui.chevron-up",desc:"@tui.chevron-down",off:"@tui.chevrons-up-down"}},[lm,SQ]=ut(lR),mw=(()=>{class t{constructor(){this.stuck=Wi(C(Up).pipe(Ie(r=>(r[r.length-1]?.intersectionRatio??0)<1),rr(),Np(),uo(()=>sr)))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,hostVars:2,hostBindings:function(i,n){i&2&&Qe("_stuck",n.stuck())},features:[xe([Up,{provide:Hp,useValue:[0,1]}])]})}}return t})(),vw=()=>0,cR=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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})(),Ks=(()=>{class t{constructor(){this.options=C(lm),this.nothing=Gt(cR),this.computedSortChange=J(()=>({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=qi(this.options.direction),this.sorter=qi(vw),this.sortChange=xi(),this.appearance=ye("table"),this.cleaner=ye(!1)}updateSorterAndDirection(r){this.sorter()===r?this.updateSorter(this.sorter(),this.direction()===Po.Asc?Po.Desc:Po.Asc):this.updateSorter(r)}updateSorter(r,i=Po.Asc){this.sorter.set(r||vw.bind({})),this.direction.set(i)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({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:[xe([{provide:hd,useValue:"10000px 10000px 10000px 0px"},_t(Pa,t),Gr({size:"s"}),FC({size:"m",appearance:"neutral"}),VC({size:"xxs",appearance:"neutral"}),GC({size:"s",color:"var(--tui-text-action)"})]),Le([mw])]})}}return t})(),bl=(()=>{class t{constructor(){this.options=C(lm),this.head=C(sm,{optional:!0}),this.width=ye(null),this.table=C(jt(()=>Ks),{optional:!0}),this.minWidth=U(-1/0),this.maxWidth=U(1/0),this.sorter=qi(this.head?(r,i)=>qy(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 um;return this.head.tuiHead()}get isCurrent(){return!!this.sorter()&&!!this.table&&this.sorter()===this.table.sorter()}get icon(){return this.isCurrent?this.table?.direction()===Po.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()===Po.Desc}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({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"),Qe("_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:Cl,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&&(It(),ne(0,WO,3,4,"button",1)(1,GO,1,1,"ng-container",2),Me(2,YO,1,0,"ng-template",null,0,Ri),ne(4,KO,1,0,"div",3)),i&2&&(ae(n.sorter()&&n.table?0:1),O(4),ae(n.resizable()?4:-1))},dependencies:[as,Fi,uR],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})(),um=class extends Error{constructor(){super("")}};var gw=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,selectors:[["thead","tuiThead",""]],features:[xe([{provide:hd,useValue:"0px 10000px 10000px 10000px"}]),Le([mw])]})}}return t})();var cm=(()=>{class t{constructor(){this.control=Lr(vn),this.textfield=Lr(di)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["th","tuiTd",""],["td","tuiTd",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.control,vn,5)(a,n.textfield,di,5),i&2&&Wt(2)},hostVars:2,hostBindings:function(i,n){i&2&&Qe("_editable",n.control()||n.textfield())},ngContentSelectors:Cl,decls:1,vars:0,template:function(i,n){i&1&&(It(),Xe(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})(),Mf=(()=>{class t{constructor(){this.cells=Sa(jt(()=>kf)),this.body=C(jt(()=>yw)),this.table=C(jt(()=>Ks)),this.items=J(()=>this.cells().reduce((r,i)=>Ke(se({},r),{[i.tuiCell()]:i}),{})),this.item=J(()=>this.body.data()[this.body.rows().findIndex(r=>r===this)])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["tr","tuiTr",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.cells,kf,4),i&2&&Wt()},ngContentSelectors:Cl,decls:3,vars:1,consts:[["plain",""],[3,"ngTemplateOutlet"],["tuiTd",""]],template:function(i,n){if(i&1&&(It(),ne(0,QO,2,0)(1,JO,1,0,"td"),Xe(2)),i&2){let a;ae((a=n.items())?0:1,a)}},dependencies:[as,cm],encapsulation:2})}}return t})(),yw=(()=>{class t{constructor(){this.rows=Sa(jt(()=>Mf)),this.data=U([])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275dir=re({type:t,contentQueries:function(i,n,a){i&1&&ei(a,n.rows,Mf,4),i&2&&Wt()},inputs:{data:[1,"data"]}})}}return t})(),bw=(()=>{class t{constructor(){this.options=C(lm),this.table=C(jt(()=>Ks)),this.heading=U(),this.open=qi(this.options.open),this.onClick=()=>{this.open.set(!this.open())}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["tbody","tuiTbody",""]],inputs:{heading:[1,"heading"],open:[1,"open"]},outputs:{open:"openChange"},features:[Le([{directive:yw,inputs:["data","data"]}])],ngContentSelectors:Cl,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&&(It(),ne(0,tR,6,3,"tr"),ne(1,rR,1,0)),i&2&&(ae(n.heading()?0:-1),O(),ae(n.open()?1:-1))},dependencies:[Er,js,Fi],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 Cw=(()=>{class t{constructor(){this.th=Lr(jt(()=>bl)),this.heads=Sa(jt(()=>sm)),this.computedHeads=J(()=>this.heads().reduce((r,i)=>Ke(se({},r),{[i.tuiHead()]:i}),{})),this.table=C(jt(()=>Ks))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=Z({type:t,selectors:[["tr","tuiThGroup",""]],contentQueries:function(i,n,a){i&1&&ei(a,n.th,bl,5)(a,n.heads,sm,4),i&2&&Wt(2)},ngContentSelectors:Cl,decls:2,vars:1,consts:[["plain",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["tuiTh",""]],template:function(i,n){if(i&1&&(It(),Xe(0),ne(1,sR,4,0)),i&2){let a;O(),ae((a=n.computedHeads())?1:-1,a)}},dependencies:[as,bl],encapsulation:2})}}return t})();function dR(t,e){t&1&&rt(0)}function fR(t,e){if(t&1&&(B(0,"th",3)(1,"span"),Me(2,dR,1,0,"ng-container",6),F()()),t&2){let r=e.$implicit;X("resizable",!0)("sticky",!0),O(2),X("forToken",r.tokens)}}function hR(t,e){t&1&&rt(0)}function pR(t,e){if(t&1&&(B(0,"td",7),Me(1,hR,1,0,"ng-container",6),F()),t&2){let r=$().$implicit;O(),X("forToken",r.tokens)}}function vR(t,e){if(t&1&&Me(0,pR,2,1,"td",8),t&2){let r=e.$index,i=$(2);X("tuiCell",i.columns()[r])}}function mR(t,e){if(t&1&&(B(0,"tr",5),dt(1,vR,1,1,"td",7,on),F()),t&2){let r=e.$implicit;O(),ft(r)}}var If=class t extends zt{columns=J(()=>this.token().header.map(r=>r.text));columnTokens=J(()=>this.token().header);rows=J(()=>this.token().rows);static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({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&&(B(0,"table",0)(1,"thead",1)(2,"tr",2),dt(3,fR,3,3,"th",3,on),F()(),B(5,"tbody",4),dt(6,mR,3,0,"tr",5,bi),F()()),r&2&&(X("columns",i.columns()),O(3),ft(i.columnTokens()),O(2),X("data",i.rows()),O(),ft(i.rows()))},dependencies:[Qt,Ks,bw,Cw,bl,cm,Mf,kf,gw],encapsulation:2})};var Ln=class extends zt{tokens=J(()=>{let e=this.token();if("tokens"in e)return e.tokens})};function gR(t,e){t&1&&rt(0)}function yR(t,e){if(t&1&&Me(0,gR,1,0,"ng-container",0),t&2){let r=$();X("forToken",r.tokens())}}function bR(t,e){if(t&1&&j(0),t&2){let r=$();we(`
|
|
98
|
+
`,r.token().text,`
|
|
99
|
+
`)}}var wl=class t extends Ln{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["span","mdText",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&ne(0,yR,1,1,"ng-container")(1,bR,1,1),r&2&&ae(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function CR(t,e){t&1&&rt(0)}var Af=class t extends zt{get start(){return this.token().start}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({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,CR,1,0,"ng-container",0),r&2&&X("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 wR(t,e){t&1&&rt(0)}function _R(t,e){if(t&1&&Me(0,wR,1,0,"ng-container",0),t&2){let r=$();X("forToken",r.tokens())}}function xR(t,e){if(t&1&&j(0),t&2){let r=$();we(`
|
|
100
|
+
`,r.token().text,`
|
|
101
|
+
`)}}var Of=class t extends Ln{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["i","mdItalic",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&ne(0,_R,1,1,"ng-container")(1,xR,1,1),r&2&&ae(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function TR(t,e){t&1&&rt(0)}function SR(t,e){if(t&1&&Me(0,TR,1,0,"ng-container",0),t&2){let r=$();X("forToken",r.tokens())}}function DR(t,e){if(t&1&&j(0),t&2){let r=$();we(`
|
|
102
|
+
`,r.token().text,`
|
|
103
|
+
`)}}var Rf=class t extends Ln{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["del","mdDel",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&ne(0,SR,1,1,"ng-container")(1,DR,1,1),r&2&&ae(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function ER(t,e){t&1&&rt(0)}function kR(t,e){if(t&1&&Me(0,ER,1,0,"ng-container",0),t&2){let r=$();X("forToken",r.tokens())}}function MR(t,e){if(t&1&&j(0),t&2){let r=$();we(`
|
|
104
|
+
`,r.token().text,`
|
|
105
|
+
`)}}var Pf=class t extends Ln{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Pe(t)))(i||t)}})();static \u0275cmp=Z({type:t,selectors:[["strong","mdStrong",""]],features:[Ae],decls:2,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&ne(0,kR,1,1,"ng-container")(1,MR,1,1),r&2&&ae(i.tokens()?0:1)},dependencies:[Qt],encapsulation:2})};function ww(){return[{provide:om,useValue:{heading:gf,paragraph:Ef,blockquote:pf,table:If,code:mf,list:Af,list_item:Df,hr:yf,image:Cf,link:Tf,codespan:wf,text:wl,escape:wl,strong:Pf,em:Of,del:Rf,internalLink:xf}},Gs,Ys]}function IR(t,e){t&1&&rt(0)}var za=class t{myMarkdownService=C(Gs);value=U.required();tokens=J(()=>this.myMarkdownService.parse(this.value()));static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["markdown"]],inputs:{value:[1,"value"]},features:[xe([...ww()])],decls:1,vars:1,consts:[[4,"forToken"]],template:function(r,i){r&1&&Me(0,IR,1,0,"ng-container",0),r&2&&X("forToken",i.tokens())},dependencies:[Qt],encapsulation:2})};var dm=(t,e)=>e.code,fm=(t,e)=>e.groupTitle+e.assertion.title;function AR(t,e){if(t&1&&(B(0,"span",4),j(1),F()),t&2){let r=$(2);O(),we("\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 +",r.addedAssertions())}}function OR(t,e){if(t&1&&(B(0,"span",4),j(1),F()),t&2){let r=$(2);O(),we("\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B +",r.addedAttributes())}}function RR(t,e){if(t&1&&(B(0,"span",5),j(1),F()),t&2){let r=$(2);O(),we("\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u2212",r.removedAssertions())}}function PR(t,e){if(t&1&&(B(0,"span",5),j(1),F()),t&2){let r=$(2);O(),we("\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B \u2212",r.removedAttributes())}}function NR(t,e){if(t&1&&(B(0,"span",6),j(1),F()),t&2){let r=$(2);O(),we("\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B: ",r.changedAssertions())}}function FR(t,e){if(t&1&&(B(0,"span",6),j(1),F()),t&2){let r=$(2);O(),we("\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B: ",r.changedAttributes())}}function BR(t,e){t&1&&(B(0,"span",6),j(1,"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0438\u0437\u043C\u0435\u043D\u0451\u043D"),F())}function LR(t,e){t&1&&(B(0,"span",6),j(1,"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E"),F())}function zR(t,e){if(t&1&&(B(0,"section",8)(1,"h3"),j(2,"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A"),F(),B(3,"div",9),j(4),F(),B(5,"div",10),j(6),F()()),t&2){let r=$(),i=$();O(4),Br(r.title),O(2),Br(i.feature().title)}}function VR(t,e){if(t&1&&be(0,"markdown",11),t&2){let r=$(2);X("value",r.description)}}function HR(t,e){t&1&&j(0," - ")}function UR(t,e){t&1&&be(0,"markdown",11),t&2&&X("value",e)}function jR(t,e){t&1&&j(0," - ")}function $R(t,e){if(t&1&&(B(0,"section",8)(1,"h3"),j(2,"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435"),F(),B(3,"div",9),ne(4,VR,1,1,"markdown",11)(5,HR,1,0),F(),B(6,"div",10),ne(7,UR,1,1,"markdown",11)(8,jR,1,0),F()()),t&2){let r,i=$(),n=$();O(4),ae(i.description?4:5),O(3),ae((r=n.feature().description)?7:8,r)}}function qR(t,e){if(t&1&&(B(0,"article",12)(1,"h4"),j(2),F(),B(3,"div",10),j(4),F()()),t&2){let r=e.$implicit;O(2),Br(r.code),O(2),Iu("+ ",r.code,": ",r.values.join(", "))}}function WR(t,e){if(t&1&&(B(0,"article",12)(1,"h4"),j(2),F(),B(3,"div",9),j(4),F(),B(5,"div",10),j(6),F()()),t&2){let r=e.$implicit;O(2),Br(r.code),O(2),Iu("\u2212 ",r.code,": ",r.origin.join(", ")),O(2),Iu("+ ",r.code,": ",r.values.join(", "))}}function GR(t,e){if(t&1&&(B(0,"article",12)(1,"h4"),j(2),F(),B(3,"div",9),j(4),F()()),t&2){let r=e.$implicit;O(2),Br(r.code),O(2),Iu("\u2212 ",r.code,": ",r.values.join(", "))}}function YR(t,e){if(t&1&&(B(0,"section",8)(1,"h3"),j(2,"\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044B"),F(),dt(3,qR,5,3,"article",12,dm),dt(5,WR,7,5,"article",12,dm),dt(7,GR,5,3,"article",12,dm),F()),t&2){let r=$(2);O(3),ft(r.addedAttributeItems()),O(2),ft(r.changedAttributeItems()),O(2),ft(r.removedAttributeItems())}}function KR(t,e){if(t&1&&(j(0," \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435: "),B(1,"div",10),be(2,"markdown",11),F()),t&2){let r=$().$implicit;O(2),X("value",r.assertion.description)}}function ZR(t,e){if(t&1&&(B(0,"article",12)(1,"h4"),j(2),F(),B(3,"div",10),be(4,"markdown",11),F(),ne(5,KR,3,1),F()),t&2){let r=e.$implicit;O(2),we("",r.groupTitle,":"),O(2),X("value",r.assertion.title),O(),ae(r.assertion.description?5:-1)}}function XR(t,e){if(t&1&&(j(0," \u0422\u0438\u043F: "),B(1,"div",9),j(2),F(),B(3,"div",10),j(4),F()),t&2){let r=$().$implicit,i=$(3);O(2),we("\u2212 ",i.statementTypeTitle(r.origin.type)),O(2),we("+ ",i.statementTypeTitle(r.assertion.type))}}function QR(t,e){if(t&1&&be(0,"markdown",11),t&2){let r=$(2).$implicit;X("value",r.origin.description)}}function JR(t,e){t&1&&j(0," - ")}function eP(t,e){if(t&1&&be(0,"markdown",11),t&2){let r=$(2).$implicit;X("value",r.assertion.description)}}function tP(t,e){t&1&&j(0," - ")}function rP(t,e){if(t&1&&(j(0," \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435: "),B(1,"div",9),ne(2,QR,1,1,"markdown",11)(3,JR,1,0),F(),B(4,"div",10),ne(5,eP,1,1,"markdown",11)(6,tP,1,0),F()),t&2){let r=$().$implicit;O(2),ae(r.origin.description?2:3),O(3),ae(r.assertion.description?5:6)}}function iP(t,e){if(t&1&&(B(0,"article",12)(1,"h4"),j(2),F(),be(3,"markdown",11),ne(4,XR,5,2),ne(5,rP,7,2),F()),t&2){let r=e.$implicit;O(2),we("",r.groupTitle,":"),O(),X("value",r.assertion.title),O(),ae(r.origin.type!==r.assertion.type?4:-1),O(),ae(r.origin.description!==r.assertion.description?5:-1)}}function nP(t,e){if(t&1&&be(0,"markdown",11),t&2){let r=$().$implicit;X("value",r.assertion.description)}}function aP(t,e){t&1&&j(0," - ")}function oP(t,e){if(t&1&&(B(0,"article",12)(1,"h4"),j(2),F(),be(3,"markdown",11),B(4,"div",9),ne(5,nP,1,1,"markdown",11)(6,aP,1,0),F()()),t&2){let r=e.$implicit;O(2),we("",r.groupTitle,":"),O(),X("value",r.assertion.title),O(2),ae(r.assertion.description?5:6)}}function sP(t,e){if(t&1&&(B(0,"section",8)(1,"h3"),j(2,"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438"),F(),dt(3,ZR,6,3,"article",12,fm),dt(5,iP,6,4,"article",12,fm),dt(7,oP,7,3,"article",12,fm),F()),t&2){let r=$(2);O(3),ft(r.addedAssertionItems()),O(2),ft(r.changedAssertionItems()),O(2),ft(r.removedAssertionItems())}}function uP(t,e){if(t&1&&(B(0,"div",3),ne(1,AR,2,1,"span",4),ne(2,OR,2,1,"span",4),ne(3,RR,2,1,"span",5),ne(4,PR,2,1,"span",5),ne(5,NR,2,1,"span",6),ne(6,FR,2,1,"span",6),ne(7,BR,2,0,"span",6),ne(8,LR,2,0,"span",6),F(),B(9,"div",7),ne(10,zR,7,2,"section",8),ne(11,$R,9,2,"section",8),ne(12,YR,9,0,"section",8),ne(13,sP,9,0,"section",8),F()),t&2){let r=$();O(),ae(r.addedAssertions()?1:-1),O(),ae(r.addedAttributes()?2:-1),O(),ae(r.removedAssertions()?3:-1),O(),ae(r.removedAttributes()?4:-1),O(),ae(r.changedAssertions()?5:-1),O(),ae(r.changedAttributes()?6:-1),O(),ae(r.titleChanged()?7:-1),O(),ae(r.descriptionChanged()?8:-1),O(2),ae(r.titleChanged()?10:-1),O(),ae(r.descriptionChanged()?11:-1),O(),ae(r.addedAttributes()||r.changedAttributes()||r.removedAttributes()?12:-1),O(),ae(r.addedAssertions()||r.changedAssertions()||r.removedAssertions()?13:-1)}}var Zs=t=>new Map(t.groups.flatMap(e=>e.assertions.map(r=>[`${e.title}\0${r.title}`,{groupTitle:e.title,assertion:r}]))),Nf=class t{feature=U.required();origin=U.required();shortOriginCommit=J(()=>this.origin().commit.slice(0,7));originFeatureResource=Ea(()=>`/api/features/${this.feature().code}?revision=${this.origin().commit}`);originFeature=J(()=>this.originFeatureResource.hasValue()?this.originFeatureResource.value():null);addedAssertionItems=J(()=>{let e=this.originFeature();if(!e)return[];let r=Zs(e);return[...Zs(this.feature()).entries()].filter(([i])=>!r.has(i)).map(([,i])=>i)});removedAssertionItems=J(()=>{let e=this.originFeature();if(!e)return[];let r=Zs(this.feature());return[...Zs(e).entries()].filter(([i])=>!r.has(i)).map(([,i])=>i)});changedAssertionItems=J(()=>{let e=this.originFeature();if(!e)return[];let r=Zs(e);return[...Zs(this.feature()).values()].flatMap(i=>{let n=r.get(`${i.groupTitle}\0${i.assertion.title}`);return!n||i.assertion.description===n.assertion.description&&i.assertion.type===n.assertion.type?[]:[Ke(se({},i),{origin:n.assertion})]})});addedAttributeItems=J(()=>{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=J(()=>{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=J(()=>{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=J(()=>this.addedAssertionItems().length);removedAssertions=J(()=>this.removedAssertionItems().length);changedAssertions=J(()=>this.changedAssertionItems().length);addedAttributes=J(()=>this.addedAttributeItems().length);removedAttributes=J(()=>this.removedAttributeItems().length);changedAttributes=J(()=>this.changedAttributeItems().length);titleChanged=J(()=>{let e=this.originFeature();return e!==null&&e.title!==this.feature().title});descriptionChanged=J(()=>{let e=this.originFeature();return e!==null&&e.description!==this.feature().description});statementTypeTitle(e){return e==="propose"?"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435":"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430"}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({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&&(B(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"),F(),B(4,"div"),j(5),F()(),B(6,"div",2)(7,"code"),j(8),F(),B(9,"span"),j(10),F(),B(11,"time"),j(12),Qn(13,"date"),F()()(),ne(14,uP,14,12)),r&2){let n;O(5),Br(i.origin().message),O(3),Br(i.shortOriginCommit()),O(2),Br(i.origin().author),O(),Ve("datetime",i.origin().date),O(),Br(_c(13,6,i.origin().date,"dd.MM.yyyy HH:mm")),O(2),ae((n=i.originFeature())?14:-1,n)}},dependencies:[$s,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 Ff=class t{projectService=C(ii);attributeCode=U.required();attributeValues=U.required();attribute=J(()=>{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=J(()=>this.attribute()?.title??this.attributeCode());attributeValue=J(()=>{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=Z({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&&(B(0,"div",0)(1,"b"),j(2),F(),j(3),F()),r&2&&(O(2),we("",i.attributeTitle(),":"),O(),we(" ",i.attributeValue(),`
|
|
106
|
+
`))},dependencies:[$s],encapsulation:2})};function lP(t,e){t&1&&(B(0,"div",3),be(1,"tui-icon",9),F())}function cP(t,e){t&1&&be(0,"div",4)}function dP(t,e){t&1&&be(0,"div",5)}function fP(t,e){t&1&&be(0,"div",6)}function hP(t,e){t&1&&be(0,"div",7)}function pP(t,e){t&1&&be(0,"tui-icon",16),t&2&&st("font-size",16,"px")}function vP(t,e){t&1&&be(0,"tui-icon",17),t&2&&st("font-size",16,"px")}function mP(t,e){if(t&1&&be(0,"markdown",8),t&2){let r=$();X("value",r)}}function gP(t,e){if(t&1){let r=Pt();B(0,"div",10),ge("click",function(){Ct(r);let n=$();return wt(n.toggleExpanded())}),ne(1,pP,1,2,"tui-icon",11)(2,vP,1,2,"tui-icon",12),j(3," \u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 "),F(),B(4,"div",13)(5,"tui-expand",14),Me(6,mP,1,1,"markdown",15),F()()}if(t&2){let r=$();O(),ae(r.expanded()?1:2),O(4),X("expanded",r.expanded())}}var Bf=class t{clipboardService=C(Io);feature=U.required();group=U.required();assertion=U.required();expanded=ye(!1);title=J(()=>this.assertion().title);description=J(()=>this.assertion().description);path=J(()=>`$${this.feature().code} / ${this.group().title} / ${this.title()}`);status=J(()=>{let e=this.assertion();return e.type==="assert"?e.status:null});toggleExpanded(){this.expanded.update(e=>!e)}copyPath(){this.clipboardService.copy(this.path())}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["assert"]],inputs:{feature:[1,"feature"],group:[1,"group"],assertion:[1,"assertion"]},decls:10,vars:5,consts:[[1,"status"],[1,"copy-path"],["iconStart","@tui.link","size","xs","tuiIconButton","","appearance","flat",3,"click"],["tuiBadge","","appearance","neutral","size","m","tuiHint","\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435"],["tuiBadge","","appearance","negative","tuiStatus","","size","m","tuiHint","\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043D\u0435 \u043F\u0440\u043E\u0439\u0434\u0435\u043D\u0430"],["tuiBadge","","appearance","positive","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"],["tuiBadge","","appearance","warning","tuiStatus","","size","m","tuiHint","\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u0430"],["tuiBadge","","appearance","neutral","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"],["icon","@tui.circle-dashed","size","m"],[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&&(B(0,"div",0)(1,"div",1)(2,"button",2),ge("click",function(){return i.copyPath()}),F()(),ne(3,lP,2,0,"div",3)(4,cP,1,0,"div",4)(5,dP,1,0,"div",5)(6,fP,1,0,"div",6)(7,hP,1,0,"div",7),be(8,"markdown",8),F(),ne(9,gP,7,2)),r&2){let n;O(2),st("border-radius",100,"%"),O(),ae(i.assertion().type==="propose"?3:i.status()==="failed"?4:i.status()==="automated"?5:i.status()==="skipped"?6:7),O(5),X("value",i.title()),O(),ae((n=i.description())?9:-1,n)}},dependencies:[ka,za,$s,YC,Fi,ti,b1,Oa,mn],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] tui-expand .t-wrapper{overflow-x:hidden!important}.status[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:.8em;margin-top:-1em;gap:.4rem}.status[_ngcontent-%COMP%] .copy-path[_ngcontent-%COMP%]{opacity:0;transition:ease-in-out .3s opacity}.status[_ngcontent-%COMP%]:hover .copy-path[_ngcontent-%COMP%]{opacity:1}.description[_ngcontent-%COMP%]{margin-left:4em;margin-bottom:1em}.expander[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:4rem;cursor:pointer}"]})};var yP=(t,e)=>e.title;function bP(t,e){if(t&1&&be(0,"assert",0),t&2){let r=e.$implicit,i=$();X("assertion",r)("group",i.group())("feature",i.feature())}}var Lf=class t{feature=U.required();group=U.required();static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["feature-group"]],inputs:{feature:[1,"feature"],group:[1,"group"]},decls:4,vars:1,consts:[[3,"assertion","group","feature"]],template:function(r,i){r&1&&(B(0,"h3"),j(1),F(),dt(2,bP,1,3,"assert",0,yP)),r&2&&(O(),we(" ",i.group().title,`
|
|
107
|
+
`),O(),ft(i.group().assertions))},dependencies:[Bf],encapsulation:2})};var CP=(t,e)=>e.code,wP=(t,e)=>e.title;function _P(t,e){if(t&1&&be(0,"attribute",1),t&2){let r=e.$implicit;X("attributeCode",r.code)("attributeValues",r.values)}}function xP(t,e){t&1&&be(0,"markdown",2),t&2&&X("value",e)}function TP(t,e){if(t&1&&be(0,"feature-group",3),t&2){let r=e.$implicit,i=$();X("group",r)("feature",i.feature())}}var zf=class t{feature=U.required();attributes=J(()=>{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=Z({type:t,selectors:[["feature-content"]],inputs:{feature:[1,"feature"]},decls:6,vars:1,consts:[[1,"meta"],[3,"attributeCode","attributeValues"],[3,"value"],[3,"group","feature"]],template:function(r,i){if(r&1&&(B(0,"div",0),dt(1,_P,1,2,"attribute",1,CP),F(),ne(3,xP,1,1,"markdown",2),dt(4,TP,1,2,"feature-group",3,wP)),r&2){let n;O(),ft(i.attributes()),O(2),ae((n=i.feature().description)?3:-1,n),O(),ft(i.feature().groups)}},dependencies:[za,Ff,Lf],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.meta[_ngcontent-%COMP%]{display:flex;gap:1em;margin-bottom:1em}"]})};var SP=["editorContainer"];var hm=new te("NGX_MONACO_EDITOR_CONFIG"),_w=!1,xw,DP=(()=>{class t{constructor(){this.config=C(hm),this.insideNg=U(!1),this.onInit=xi(),this.editorContainer=Ti.required("editorContainer"),this._models=[],this._listeners=[],ot(()=>{this.insideNg(),this._editor&&this.reinit()})}ngAfterViewInit(){_w?xw.then(()=>{this.initMonaco()}):(_w=!0,xw=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=Z({type:t,selectors:[["ng-component"]],viewQuery:function(i,n){i&1&&_i(n.editorContainer,SP,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})(),Tw=(()=>{class t extends DP{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=se(se({},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=Z({type:t,selectors:[["ngx-monaco-editor"]],inputs:{options:[1,"options"],model:[1,"model"]},features:[xe([{provide:Nc,useExisting:jt(()=>t),multi:!0}]),Ae],decls:2,vars:0,consts:[["editorContainer",""],[1,"editor-container"]],template:function(i,n){i&1&&Ta(0,"div",1,0)},styles:["[_nghost-%COMP%]{display:block;height:200px}.editor-container[_ngcontent-%COMP%]{width:100%;height:98%}"]})}}return t})();var Sw=(()=>{class t{static forRoot(r={}){return{ngModule:t,providers:[{provide:hm,useValue:r}]}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=Xn({type:t})}static{this.\u0275inj=Kn({imports:[py]})}}return t})();function Dw(t={}){return pc([{provide:hm,useValue:t}])}var Xs=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=Ze({token:t,factory:t.\u0275fac,providedIn:"root"})};var Qs=()=>null;function pm(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],Qs)}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)?pm(t,e,f,i):pm(t,e,{startLineNumber:u,endLineNumber:l,startColumn:c,endColumn:d},i)}else{let l={range:n,text:`${t}${e}`};i.pushEditOperations([n],[l],Qs)}}else pm(t,e,n,i)}function _l(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,Qs)}function Ew(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,Qs)}function Vf(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,Qs)}function kw(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,Qs)}var kP=`
|
|
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
|
+
`,Hf=class t{editor=U.required();heading(){_l("# ",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(){Vf("> ",this.editor())}horizontalRuler(){_l(`
|
|
113
|
+
---
|
|
114
|
+
`,this.editor())}ul(){Vf("- ",this.editor())}ol(){kw(this.editor())}checkList(){Vf("- [ ] ",this.editor())}indentIncrease(){_l(" ",this.editor())}indentDecrease(){Ew(" ",this.editor())}table(){_l(kP,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=Z({type:t,selectors:[["markdown-editor-toolbar"]],inputs:{editor:[1,"editor"]},features:[xe([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&&(B(0,"button",0),ge("click",function(){return i.undo()}),j(1," Undo "),F(),B(2,"button",1),ge("click",function(){return i.redo()}),j(3," Redo "),F(),be(4,"span",2),B(5,"button",3),ge("click",function(){return i.heading()}),j(6," Heading "),F(),B(7,"button",4),ge("click",function(){return i.bold()}),j(8," Bold "),F(),B(9,"button",5),ge("click",function(){return i.italic()}),j(10," Italic "),F(),B(11,"button",6),ge("click",function(){return i.strikethrough()}),j(12," Strikethrough "),F(),be(13,"span",2),B(14,"button",7),ge("click",function(){return i.inlineCode()}),j(15," Code "),F(),B(16,"button",8),ge("click",function(){return i.codeBlock()}),j(17," Code block "),F(),be(18,"span",2),B(19,"button",9),ge("click",function(){return i.link()}),j(20," Link "),F(),B(21,"button",10),ge("click",function(){return i.image()}),j(22," Image "),F(),B(23,"button",11),ge("click",function(){return i.horizontalRuler()}),j(24," Horizontal ruler "),F(),be(25,"span",2),B(26,"button",12),ge("click",function(){return i.blockquote()}),j(27," Blockquote "),F(),be(28,"span",2),B(29,"button",13),ge("click",function(){return i.ul()}),j(30," List unordered "),F(),B(31,"button",14),ge("click",function(){return i.ol()}),j(32," List ordered "),F(),B(33,"button",15),ge("click",function(){return i.checkList()}),j(34," Check list "),F(),be(35,"span",2),B(36,"button",16),ge("click",function(){return i.indentIncrease()}),j(37," Indent increase "),F(),B(38,"button",17),ge("click",function(){return i.indentDecrease()}),j(39," Indent decrease "),F(),be(40,"span",2),B(41,"button",18),ge("click",function(){return i.table()}),j(42," Table "),F())},dependencies:[ti],styles:["[_nghost-%COMP%]{display:flex;gap:.2em;padding:.5em;border-bottom:1px solid var(--tui-border-normal);margin-bottom:.5em}"]})};function MP(t,e){t&1&&be(0,"markdown-editor-toolbar",0),t&2&&X("editor",e)}var Uf=class t{completionProviderService=C(Xs,{optional:!0});editor=ye(null);value=U.required();valueChange=xi();editValue=ye("");editorOptions={theme:"vs-dark",language:"yaml",minimap:{enabled:!1},automaticLayout:!0};constructor(){ot(()=>{let e=this.value();it(()=>this.editValue.set(e))}),ot(()=>{let e=this.editValue();it(()=>this.valueChange.emit(e))})}initEditor(e){this.editor.set(e),this.completionProviderService?.initialize()}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({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&&(ne(0,MP,1,1,"markdown-editor-toolbar",0),B(1,"ngx-monaco-editor",1),ln("ngModelChange",function(a){return un(i.editValue,a)||(i.editValue=a),a}),ge("onInit",function(a){return i.initEditor(a)}),F(),fo()),r&2){let n;ae((n=i.editor())?0:-1,n),O(),sn("ngModel",i.editValue),X("options",i.editorOptions),ho()}},dependencies:[Sw,Tw,ka,ls,cn,Hf],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 jf=class t{mdCompletionProviderService=C(Xs);projectService=C(ii);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=$t({token:t,factory:t.\u0275fac})};function IP(t,e){if(t&1){let r=Pt();B(0,"markdown-editor",1),ge("valueChange",function(n){Ct(r);let a=$();return wt(a.updateYaml(n))}),F()}if(t&2){let r=$();X("value",r.editYaml())}}var $f=class t{notifications=C(D1);featureCode=U.required();featureYamlResource=Ea.text(()=>`/api/features/${this.featureCode()}/yaml`);featureYaml=J(()=>this.featureYamlResource.hasValue()?this.featureYamlResource.value():null);featureYamlHash=J(()=>this.featureYamlResource.hasValue()?this.featureYamlResource.headers()?.get("ETag")??null:null);hasChanges=J(()=>this.featureYaml()&&this.featureYaml()!==this.editYaml());editYaml=ns(()=>{let e=this.featureYaml();if(e==null)throw new Error("Yaml should be defined");return e});canClose=xi();constructor(){C(jf)}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=Z({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&&ne(0,IP,1,1,"markdown-editor",0),r&2&&ae(i.featureYaml()!=null?0:-1)},dependencies:[Uf],styles:["[_nghost-%COMP%]{display:contents}"]})};function AP(t,e){if(t&1&&be(0,"tui-data-list-wrapper",4),t&2){let r=$(),i=pr(4);X("items",r.featureHistory())("itemContent",i)}}function OP(t,e){if(t&1&&(B(0,"div",5)(1,"div"),j(2),F(),B(3,"div",6)(4,"span"),j(5),F(),B(6,"span"),j(7),Qn(8,"date"),F()()()),t&2){let r=e.$implicit;O(2),we(" ",r.message," "),O(3),we(" ",r.author," "),O(2),we(" ",_c(8,3,r.date,"dd.MM.yyyy HH:mm")," ")}}var qf=class t{featureCode=U.required();featureHistoryResource=Ea(()=>`/api/features/${this.featureCode()}/history`);featureHistory=J(()=>this.featureHistoryResource.hasValue()?this.featureHistoryResource.value():null);value=qi(null);static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["feature-history-selector"]],inputs:{featureCode:[1,"featureCode"],value:[1,"value"]},outputs:{value:"valueChange"},features:[xe([ad({stringify:ye(e=>e.message),identityMatcher:ye((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=Pt();B(0,"tui-textfield",1)(1,"input",2),ln("ngModelChange",function(o){return Ct(n),un(i.value,o)||(i.value=o),wt(o)}),F(),fo(),Me(2,AP,1,2,"tui-data-list-wrapper",3),F(),Me(3,OP,9,6,"ng-template",null,0,Ri)}r&2&&(X("tuiTextfieldCleaner",!0),O(),sn("ngModel",i.value),ho())},dependencies:[ka,us,ls,cn,js,of,nf,di,Ds,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 qg(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 RP(t){if(Array.isArray(t))return t}function PP(t){if(Array.isArray(t))return qg(t)}function ro(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NP(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,nT(i.key),i)}}function io(t,e,r){return e&&NP(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Mi(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=d0(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 iT(t,e,r){return(e=nT(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function FP(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function BP(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 LP(){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 zP(){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 RP(t)||BP(t,e)||d0(t,e)||LP()}function mh(t){return PP(t)||FP(t)||d0(t)||zP()}function VP(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 nT(t){var e=VP(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 d0(t,e){if(t){if(typeof t=="string")return qg(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)?qg(t,e):void 0}}var Ir=typeof window>"u"?null:window,Mw=Ir?Ir.navigator:null;Ir&&Ir.document;var HP=Or(""),aT=Or({}),UP=Or(function(){}),jP=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)==HP},cr=function(e){return e!=null&&Or(e)===UP},Zt=function(e){return!Hi(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},kt=function(e){return e!=null&&Or(e)===aT&&!Zt(e)&&e.constructor===Object},$P=function(e){return e!=null&&Or(e)===aT},Te=function(e){return e!=null&&Or(e)===Or(1)&&!isNaN(e)},qP=function(e){return Te(e)&&Math.floor(e)===e},gh=function(e){if(jP!=="undefined")return e!=null&&e instanceof HTMLElement},Hi=function(e){return Gl(e)||oT(e)},Gl=function(e){return Wl(e)==="collection"&&e._private.single},oT=function(e){return Wl(e)==="collection"&&!e._private.single},f0=function(e){return Wl(e)==="core"},sT=function(e){return Wl(e)==="stylesheet"},WP=function(e){return Wl(e)==="event"},Ka=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},GP=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},YP=function(e){return kt(e)&&Te(e.x1)&&Te(e.x2)&&Te(e.y1)&&Te(e.y2)},KP=function(e){return $P(e)&&cr(e.then)},ZP=function(){return Mw&&Mw.userAgent.match(/msie|trident|edge/i)},pu=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},h0=pu(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),Ih=pu(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),uT=pu(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Iw=function(e){return Ka(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},$a=function(e,r){return e.slice(-1*r.length)===r},Ar="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",XP="rgb[a]?\\(("+Ar+"[%]?)\\s*,\\s*("+Ar+"[%]?)\\s*,\\s*("+Ar+"[%]?)(?:\\s*,\\s*("+Ar+"))?\\)",QP="rgb[a]?\\((?:"+Ar+"[%]?)\\s*,\\s*(?:"+Ar+"[%]?)\\s*,\\s*(?:"+Ar+"[%]?)(?:\\s*,\\s*(?:"+Ar+"))?\\)",JP="hsl[a]?\\(("+Ar+")\\s*,\\s*("+Ar+"[%])\\s*,\\s*("+Ar+"[%])(?:\\s*,\\s*("+Ar+"))?\\)",eN="hsl[a]?\\((?:"+Ar+")\\s*,\\s*(?:"+Ar+"[%])\\s*,\\s*(?:"+Ar+"[%])(?:\\s*,\\s*(?:"+Ar+"))?\\)",tN="\\#[0-9a-fA-F]{3}",rN="\\#[0-9a-fA-F]{6}",lT=function(e,r){return e<r?-1:e>r?1:0},iN=function(e,r){return-1*lT(e,r)},We=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},nN=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]}},aN=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("^"+JP+"$").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},oN=function(e){var r,i=new RegExp("^"+XP+"$").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},sN=function(e){return uN[e.toLowerCase()]},cT=function(e){return(Zt(e)?e:null)||sN(e)||nN(e)||oN(e)||aN(e)},uN={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]},dT=function(e){for(var r=e.map,i=e.keys,n=i.length,a=0;a<n;a++){var o=i[a];if(kt(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}},fT=function(e){for(var r=e.map,i=e.keys,n=i.length,a=0;a<n;a++){var o=i[a];if(kt(o))throw Error("Tried to get map with object key");if(r=r[o],r==null)return r}return r},Wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vm,Aw;function Kl(){if(Aw)return vm;Aw=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return vm=t,vm}var mm,Ow;function lN(){if(Ow)return mm;Ow=1;var t=typeof Wf=="object"&&Wf&&Wf.Object===Object&&Wf;return mm=t,mm}var gm,Rw;function Ah(){if(Rw)return gm;Rw=1;var t=lN(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return gm=r,gm}var ym,Pw;function cN(){if(Pw)return ym;Pw=1;var t=Ah(),e=function(){return t.Date.now()};return ym=e,ym}var bm,Nw;function dN(){if(Nw)return bm;Nw=1;var t=/\s/;function e(r){for(var i=r.length;i--&&t.test(r.charAt(i)););return i}return bm=e,bm}var Cm,Fw;function fN(){if(Fw)return Cm;Fw=1;var t=dN(),e=/^\s+/;function r(i){return i&&i.slice(0,t(i)+1).replace(e,"")}return Cm=r,Cm}var wm,Bw;function p0(){if(Bw)return wm;Bw=1;var t=Ah(),e=t.Symbol;return wm=e,wm}var _m,Lw;function hN(){if(Lw)return _m;Lw=1;var t=p0(),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 _m=a,_m}var xm,zw;function pN(){if(zw)return xm;zw=1;var t=Object.prototype,e=t.toString;function r(i){return e.call(i)}return xm=r,xm}var Tm,Vw;function hT(){if(Vw)return Tm;Vw=1;var t=p0(),e=hN(),r=pN(),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 Tm=o,Tm}var Sm,Hw;function vN(){if(Hw)return Sm;Hw=1;function t(e){return e!=null&&typeof e=="object"}return Sm=t,Sm}var Dm,Uw;function Zl(){if(Uw)return Dm;Uw=1;var t=hT(),e=vN(),r="[object Symbol]";function i(n){return typeof n=="symbol"||e(n)&&t(n)==r}return Dm=i,Dm}var Em,jw;function mN(){if(jw)return Em;jw=1;var t=fN(),e=Kl(),r=Zl(),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 Em=u,Em}var km,$w;function gN(){if($w)return km;$w=1;var t=Kl(),e=cN(),r=mN(),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 R=c,N=d;return c=d=void 0,v=A,p=s.apply(N,R),p}function T(A){return v=A,h=setTimeout(D,u),m?w(A):p}function x(A){var R=A-g,N=A-v,L=u-R;return y?a(L,f-N):L}function _(A){var R=A-g,N=A-v;return g===void 0||R>=u||R<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(),R=_(A);if(c=arguments,d=this,g=A,R){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 km=o,km}var yN=gN(),Xl=Yl(yN),Mm=Ir?Ir.performance:null,pT=Mm&&Mm.now?function(){return Mm.now()}:function(){return Date.now()},bN=(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(pT())},1e3/60)}})(),yh=function(e){return bN(e)},ha=pT,Vo=9261,vT=65599,ou=5381,mT=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vo,i=r,n;n=e.next(),!n.done;)i=i*vT+n.value|0;return i},Fl=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vo;return r*vT+e|0},Bl=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ou;return(r<<5)+r+e|0},CN=function(e,r){return e*2097152+r},Ha=function(e){return e[0]*2097152+e[1]},Gf=function(e,r){return[Fl(e[0],r[0]),Bl(e[1],r[1])]},qw=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 mT(o,r)},jo=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 mT(o,r)},gT=function(){return wN(arguments)},wN=function(e){for(var r,i=0;i<e.length;i++){var n=e[i];i===0?r=jo(n):r=jo(n,r)}return r};function _N(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 xN=function(e,r,i,n,a,o){return{x:(e-i)*a+i,y:(r-n)*o+n}};function TN(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=_N(t.x,t.y,i,n,r),u=xN(s.x,s.y,i,n,a,o);return{x:u.x,y:u.y}}var Ww=!0,SN=console.warn!=null,DN=console.trace!=null,v0=Number.MAX_SAFE_INTEGER||9007199254740991,yT=function(){return!0},bh=function(){return!1},Gw=function(){return 0},m0=function(){},ar=function(e){throw new Error(e)},bT=function(e){if(e!==void 0)Ww=!!e;else return Ww},Ht=function(e){bT()&&(SN?console.warn(e):(console.log(e),DN&&console.trace()))},EN=function(e){return We({},e)},jn=function(e){return e==null?e:Zt(e)?e.slice():kt(e)?EN(e):e},kN=function(e){return e.slice()},CT=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},MN={},wT=function(){return MN},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)},g0=function(e){e.splice(0,e.length)},IN=function(e,r){for(var i=0;i<r.length;i++){var n=r[i];e.push(n)}},hi=function(e,r,i){return i&&(r=uT(i,r)),e[r]},Un=function(e,r,i,n){i&&(r=uT(i,r)),e[r]=n},AN=(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]}}])})(),fa=typeof Map<"u"?Map:AN,ON="undefined",RN=(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)}}])})(),bu=(typeof Set>"u"?"undefined":Or(Set))!==ON?Set:RN,Oh=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!f0(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 bu,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&&(Ht("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(p))},Yw=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(i,n,a){var o;kt(i)&&!Hi(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(),R=A.id();if(e.dfs){if(p[R])return 0;p[R]=!0,c.push(A)}var N=f[R],L=d[R],P=L!=null?L.source():null,z=L!=null?L.target():null,G=L==null?void 0:A.same(P)?z[0]:P[0],Y;if(Y=n(A,L,G,h++,N),Y===!0)return g=A,1;if(Y===!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 ce=V[W],he=ce.connectedNodes().filter(function(me){return!me.same(A)&&m.has(me)}),de=he.id();he.length!==0&&!p[de]&&(he=he[0],l.push(he),e.bfs&&(p[de]=!0,c.push(he)),d[de]=ce,f[de]=f[R]+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)}}},Ll={breadthFirstSearch:Yw({bfs:!0}),depthFirstSearch:Yw({dfs:!0})};Ll.bfs=Ll.breadthFirstSearch;Ll.dfs=Ll.depthFirstSearch;var ah={exports:{}},PN=ah.exports,Kw;function NN(){return Kw||(Kw=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(PN)})(ah)),ah.exports}var Im,Zw;function FN(){return Zw||(Zw=1,Im=NN()),Im}var BN=FN(),Ql=Yl(BN),LN=Zr({root:null,weight:function(e){return 1},directed:!1}),zN={dijkstra:function(e){if(!kt(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var i=LN(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(L){return c[L.id()]},m=function(L,P){c[L.id()]=P,y.updateItem(L)},y=new Ql(function(N,L){return v(N)-v(L)}),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(L,P){for(var z=(o?L.edgesTo(P):L.edgesWith(P)).intersect(g),G=1/0,Y,V=0;V<z.length;V++){var W=z[V],ce=u(W);(ce<G||!Y)&&(G=ce,Y=W)}return{edge:Y,dist:G}};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),R=_+A.dist;R<v(k)&&(m(k,R),d[I]={node:x,edge:A.edge})}}return{distanceTo:function(L){var P=Ue(L)?h.filter(L)[0]:L[0];return f[P.id()]},pathTo:function(L){var P=Ue(L)?h.filter(L)[0]:L[0],z=[],G=P,Y=G.id();if(P.length>0)for(z.unshift(P);d[Y];){var V=d[Y];z.unshift(V.edge),z.unshift(V.node),G=V.node,Y=G.id()}return s.spawn(z)}}}},VN={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}},HN=Zr({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),UN={aStar:function(e){var r=this.cy(),i=HN(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 Ql(function(Y,V){return f[Y.id()]-f[V.id()]}),g=new bu,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 R=I[A];if(this.hasElementWithId(R.id())&&!(s&&R.data("source")!==w)){var N=R.source(),L=R.target(),P=N.id()!==w?N:L,z=P.id();if(this.hasElementWithId(z)&&!p[z]){var G=d[w]+u(R);if(!x(z)){d[z]=G,f[z]=G+o(P),y(P,z),v[z]=b,m[z]=R;continue}G<d[z]&&(d[z]=G,f[z]=G+o(P),v[z]=b,m[z]=R)}}}}return{found:!1,distance:void 0,path:void 0,steps:_}}},jN=Zr({weight:function(e){return 1},directed:!1}),$N={floydWarshall:function(e){for(var r=this.cy(),i=jN(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(ce){return u.indexOf(ce)},p=function(ce){return u[ce]},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 R=0;R<c;R++)for(var N=R*c+A,L=0;L<c;L++){var P=R*c+L,z=A*c+L;h[N]+h[z]<h[P]&&(h[P]=h[N]+h[z],y[P]=y[N])}var G=function(ce){return(Ue(ce)?r.filter(ce):ce)[0]},Y=function(ce){return f(G(ce))},V={distance:function(ce,he){var de=Y(ce),me=Y(he);return h[de*c+me]},path:function(ce,he){var de=Y(ce),me=Y(he),Ce=p(de);if(de===me)return Ce.collection();if(y[de*c+me]==null)return r.collection();var Se=r.collection(),le=de,q;for(Se.merge(Ce);de!==me;)le=de,de=y[de*c+me],q=b[le*c+de],Se.merge(q),Se.merge(p(de));return Se}};return V}},qN=Zr({weight:function(e){return 1},directed:!1,root:null}),WN={bellmanFord:function(e){var r=this,i=qN(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 fa,g=!1,v=[];o=l.collection(o)[0],d.unmergeBy(function(Je){return Je.isLoop()});for(var m=d.length,y=function(Ge){var $e=h.get(Ge.id());return $e||($e={},h.set(Ge.id(),$e)),$e},b=function(Ge){return(Ue(Ge)?l.$(Ge):Ge)[0]},w=function(Ge){return y(b(Ge)).dist},T=function(Ge){for(var $e=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($e)&&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,$e,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],R=A.source(),N=A.target(),L=s(A),P=y(R),z=y(N);M(R,N,A,P,z,L),a||M(N,R,A,z,P,L)}if(!E)break}if(E)for(var G=[],Y=0;Y<m;Y++){var V=d[Y],W=V.source(),ce=V.target(),he=s(V),de=y(W).dist,me=y(ce).dist;if(de+he<me||!a&&me+he<de)if(g||(Ht("Graph contains a negative weight cycle for Bellman-Ford"),g=!0),e.findNegativeWeightCycles!==!1){var Ce=[];de+he<me&&Ce.push(W),!a&&me+he<de&&Ce.push(ce);for(var Se=Ce.length,le=0;le<Se;le++){var q=Ce[le],Q=[q];Q.push(y(q).edge);for(var ee=y(q).pred;Q.indexOf(ee)===-1;)Q.push(ee),Q.push(y(ee).edge),ee=y(ee).pred;Q=Q.slice(Q.indexOf(ee));for(var oe=Q[0].id(),_e=0,Re=2;Re<Q.length;Re+=2)Q[Re].id()<oe&&(oe=Q[Re].id(),_e=Re);Q=Q.slice(_e).concat(Q.slice(0,_e)),Q.push(Q[0]);var vt=Q.map(function(Je){return Je.id()}).join(",");G.indexOf(vt)===-1&&(v.push(u.spawn(Q)),G.push(vt))}}else break}return{distanceTo:w,pathTo:T,hasNegativeWeightCycle:g,negativeWeightCycles:v}}},GN=Math.sqrt(2),YN=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},Am=function(e,r,i,n){for(;i>n;){var a=Math.floor(Math.random()*r.length);r=YN(a,e,r),i--}return r},KN={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/GN);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,Y){for(var V=0;V<a;V++)Y[V]=G[V]},y=0;y<=s;y++){for(var b=0;b<a;b++)g[b]=b;var w=Am(g,l.slice(),a,u),T=w.slice();m(g,v);var x=Am(g,w,u,2),_=Am(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],R=i[I];A===k?E.merge(R):M.merge(R)}var N=function(G){var Y=e.spawn();return G.forEach(function(V){Y.merge(V),V.connectedEdges().forEach(function(W){e.contains(W)&&!D.contains(W)&&Y.merge(W)})}),Y},L=[N(E),N(M)],P={cut:D,components:L,partition1:E,partition2:M};return P}},Om,ZN=function(e){return{x:e.x,y:e.y}},Rh=function(e,r,i){return{x:e.x*r+i.x,y:e.y*r+i.y}},_T=function(e,r,i){return{x:(e.x-i.x)/r,y:(e.y-i.y)/r}},su=function(e){return{x:e[0],y:e[1]}},XN=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},QN=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},JN=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},eF=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},tF=function(e){return Math.PI*e/180},Yf=function(e,r){return Math.atan2(r,e)-Math.PI/2},y0=Math.log2||function(t){return Math.log(t)/Math.log(2)},b0=function(e){return e>0?1:e<0?-1:0},$o=function(e,r){return Math.sqrt(Lo(e,r))},Lo=function(e,r){var i=r.x-e.x,n=r.y-e.y;return i*i+n*n},rF=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},Vr=function(e,r,i,n){return(1-n)*(1-n)*e+2*(1-n)*n*r+n*n*i},cu=function(e,r,i,n){return{x:Vr(e.x,r.x,i.x,n),y:Vr(e.y,r.y,i.y,n)}},iF=function(e,r,i,n){var a={x:r.x-e.x,y:r.y-e.y},o=$o(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}},zl=function(e,r,i){return Math.max(e,Math.min(i,r))},pi=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}}},nF=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},aF=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},oF=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},xT=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},oh=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},sh=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},Xw=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},C0=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)},qa=function(e,r,i){return e.x1<=r&&r<=e.x2&&e.y1<=i&&i<=e.y2},Qw=function(e,r){return qa(e,r.x,r.y)},TT=function(e,r){return qa(e,r.x1,r.y1)&&qa(e,r.x2,r.y2)},sF=(Om=Math.hypot)!==null&&Om!==void 0?Om:function(t,e){return Math.sqrt(t*t+e*e)};function uF(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=sF(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),R=a(I,A);if(Math.abs(R)<1e-9)return r(D,n(I,.5));var N=a(i(M,D),A)/R;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 lF(t,e,r,i,n,a){var o=yF(t,e,r,i,n),s=uF(o,a),u=pi();return s.forEach(function(l){return xT(u,l.x,l.y)}),u}var ST=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=Wa(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=Wa(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=Wa(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,R=n+d-l+s;if(h=Wa(e,r,i,n,k,I,A,R,!1),h.length>0)return h}var N;{var L=i-c+l,P=n-d+l;if(N=Il(e,r,i,n,L,P,l+s),N.length>0&&N[0]<=L&&N[1]<=P)return[N[0],N[1]]}{var z=i+c-l,G=n-d+l;if(N=Il(e,r,i,n,z,G,l+s),N.length>0&&N[0]>=z&&N[1]<=G)return[N[0],N[1]]}{var Y=i+c-l,V=n+d-l;if(N=Il(e,r,i,n,Y,V,l+s),N.length>0&&N[0]>=Y&&N[1]>=V)return[N[0],N[1]]}{var W=i-c+l,ce=n+d-l;if(N=Il(e,r,i,n,W,ce,l+s),N.length>0&&N[0]<=W&&N[1]>=ce)return[N[0],N[1]]}return[]},cF=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},dF=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)},fF=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]},hF=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)},pF=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=[];hF(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},vF=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},ki=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},pa=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=wh(c,-l);g=Ch(v)}else g=c;return ki(e,r,g)},mF=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 ki(e,r,l)},Ch=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=Wa(i,n,a,o,s,u,l,c,!0);r[d*2]=f[0],r[d*2+1]=f[1]}return r},wh=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},gF=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]},Uo=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},Il=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]},Rm=function(e,r,i){return r<=e&&e<=i||i<=e&&e<=r?e:e<=r&&r<=i||i<=r&&r<=e?r:i},Wa=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?Rm(e,i,s)===s?[s,u]:Rm(e,i,a)===a?[a,o]:Rm(a,s,i)===i?[i,n]:[]:[]},yF=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},Vl=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=wh(d,-u);p=Ch(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=Wa(e,r,n,a,v,m,y,b),c.length!==0&&l.push(c[0],c[1]);return l},bF=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=Il(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=Wa(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},Kf=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]]},fi=function(e,r){var i=Wg(e,r);return i=DT(i),i},DT=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},Wg=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)},ET=function(e,r){return Math.min(e/10,r/10,8)},w0=function(){return 8},CF=function(e,r,i){return[e-2*r+i,2*(r-e),e]},Gg=function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}};function Pm(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=Mi(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(mh(r(t)),mh(r(e))),o=Mi(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 wF=Zr({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),_F={pageRank:function(e){for(var r=wF(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 R=0;R<d;R++){var N=R*d+A;h[N]=I}else for(var L=0;L<d;L++){var P=L*d+A;h[P]=h[P]/g[A]+v}for(var z=new Array(d),G=new Array(d),Y,V=0;V<d;V++)z[V]=1;for(var W=0;W<a;W++){for(var ce=0;ce<d;ce++)G[ce]=0;for(var he=0;he<d;he++)for(var de=0;de<d;de++){var me=he*d+de;G[he]+=h[me]*z[de]}rF(G),Y=z,z=G,G=Y;for(var Ce=0,Se=0;Se<d;Se++){var le=Y[Se]-z[Se];Ce+=le*le}if(Ce<n)break}var q={rank:function(ee){return ee=s.collection(ee)[0],z[l.indexOf(ee)]}};return q}},Jw=Zr({root:null,weight:function(e){return 1},directed:!1,alpha:0}),du={degreeCentralityNormalized:function(e){e=Jw(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=Jw(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)}}}};du.dc=du.degreeCentrality;du.dcn=du.degreeCentralityNormalised=du.degreeCentralityNormalized;var e_=Zr({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),fu={closenessCentralityNormalized:function(e){for(var r=e_(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=e_(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}};fu.cc=fu.closenessCentrality;fu.ccn=fu.closenessCentralityNormalised=fu.closenessCentralityNormalized;var xF=Zr({weight:null,directed:!1}),Yg={betweennessCentrality:function(e){for(var r=xF(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 Ql(function(he,de){return _[he]-_[de]}),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],R=o.getElementById(k),N=void 0;R.edgesTo(A).length>0?N=R.edgesTo(A)[0]:N=A.edgesTo(R)[0];var L=n(N);A=A.id(),_[A]>_[k]+L&&(_[A]=_[k]+L,D.nodes.indexOf(A)<0?D.push(A):D.updateItem(A),x[A]=0,T[A]=[]),_[A]==_[k]+L&&(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={},Y=0;Y<s.length;Y++)G[s[Y].id()]=0;for(;w.length>0;){for(var V=w.pop(),W=0;W<T[V].length;W++){var ce=T[V][W];G[ce]=G[ce]+x[ce]/x[V]*(1+G[V])}V!=s[v].id()&&d.set(V,d.get(V)+G[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}};Yg.bc=Yg.betweennessCentrality;var TF=Zr({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),SF=function(e){return TF(e)},DF=function(e,r){for(var i=0,n=0;n<r.length;n++)i+=r[n](e);return i},EF=function(e,r,i){for(var n=0;n<r;n++)e[n*r+n]=i},kT=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}},kF=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},MF=function(e,r,i){for(var n=e.slice(0),a=1;a<i;a++)e=kF(e,n,r);return e},IF=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 kT(n,r),n},AF=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},OF=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},RF=function(e,r){for(var i=0;i<e.length;i++)if(!r[i]||e[i].id()!==r[i].id())return!1;return!0},PF=function(e){for(var r=0;r<e.length;r++)for(var i=0;i<e.length;i++)r!=i&&RF(e[r],e[i])&&e.splice(i,1);return e},t_=function(e){for(var r=this.nodes(),i=this.edges(),n=this.cy(),a=SF(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=DF(h,a.attributes);c[g*u+v]+=m,c[v*u+g]+=m}EF(c,u,a.multFactor),kT(c,u);for(var y=!0,b=0;y&&b<a.maxIterations;)y=!1,d=MF(c,u,a.expandFactor),c=IF(d,u,a.inflateFactor),AF(c,d,l,4)||(y=!0),b++;var w=OF(c,u,r,n);return w=PF(w),w},NF={markovClustering:t_,mcl:t_},FF=function(e){return e},MT=function(e,r){return Math.abs(r-e)},r_=function(e,r,i){return e+MT(r,i)},i_=function(e,r,i){return e+Math.pow(i-r,2)},BF=function(e){return Math.sqrt(e)},LF=function(e,r,i){return Math.max(e,MT(r,i))},xl=function(e,r,i,n,a){for(var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:FF,s=n,u,l,c=0;c<e;c++)u=r(c),l=i(c),s=a(s,u,l);return o(s)},vu={euclidean:function(e,r,i){return e>=2?xl(e,r,i,0,i_,BF):xl(e,r,i,0,r_)},squaredEuclidean:function(e,r,i){return xl(e,r,i,0,i_)},manhattan:function(e,r,i){return xl(e,r,i,0,r_)},max:function(e,r,i){return xl(e,r,i,-1/0,LF)}};vu["squared-euclidean"]=vu.squaredEuclidean;vu.squaredeuclidean=vu.squaredEuclidean;function Ph(t,e,r,i,n,a){var o;return cr(t)?o=t:o=vu[t]||vu.euclidean,e===0&&cr(t)?o(n,a):o(e,r,i,n,a)}var zF=Zr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),_0=function(e){return zF(e)},_h=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 Ph(e,n.length,s,u,l,c)},Nm=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},IT=function(e,r,i,n,a){for(var o=1/0,s=0,u=0;u<r.length;u++){var l=_h(i,e,r[u],n,a);l<o&&(o=l,s=u)}return s},AT=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},VF=function(e,r,i){return Math.abs(r-e)<=i},HF=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},UF=function(e,r,i){for(var n=0;n<i;n++)if(e===r[n])return!0;return!1},n_=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)];UF(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},a_=function(e,r,i){for(var n=0,a=0;a<r.length;a++)n+=_h("manhattan",r[a],e,i,"kMedoids");return n},jF=function(e){var r=this.cy(),i=this.nodes(),n=null,a=_0(e),o=new Array(a.k),s={},u;a.testMode?typeof a.testCentroids=="number"?(a.testCentroids,u=Nm(i,a.k,a.attributes)):Or(a.testCentroids)==="object"?u=a.testCentroids:u=Nm(i,a.k,a.attributes):u=Nm(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()]=IT(n,u,a.distance,a.attributes,"kMeans");l=!1;for(var f=0;f<a.k;f++){var p=AT(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,VF(v[y],g[y],a.sensitivityThreshold)||(l=!0)}u[f]=v,o[f]=r.collection(p)}}c++}return o},$F=function(e){var r=this.cy(),i=this.nodes(),n=null,a=_0(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=n_(i,a.k)):s=n_(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()]=IT(n,s,a.distance,a.attributes,"kMedoids");d=!1;for(var h=0;h<s.length;h++){var g=AT(h,i,u);if(g.length!==0){c[h]=a_(s[h],g,a.attributes);for(var v=0;v<g.length;v++)l=a_(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},qF=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}},WF=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=_h(a.distance,n[f],i[d],a.attributes,"cmeans"),l=_h(a.distance,n[f],i[p],a.attributes,"cmeans"),s+=Math.pow(u/l,c);e[f][d]=1/s}},GF=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},o_=function(e){var r=this.cy(),i=this.nodes(),n=_0(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,qF(o,i,s,l,n),WF(s,u,o,i,n),HF(s,u,n.sensitivityThreshold)||(y=!0),b++;return a=GF(i,s,n,r),{clusters:a,degreeOfMembership:s}},YF={kMeans:jF,kMedoids:$F,fuzzyCMeans:o_,fcm:o_},KF=Zr({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),ZF={single:"min",complete:"max"},XF=function(e){var r=KF(e),i=ZF[r.linkage];return i!=null&&(r.linkage=i),r},s_=function(e,r,i,n,a){for(var o=0,s=1/0,u,l=a.attributes,c=function(E,M){return Ph(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},uu=function(e,r,i){e&&(e.value?r.push(e.value):(e.left&&uu(e.left,r),e.right&&uu(e.right,r)))},Kg=function(e,r){if(!e)return"";if(e.left&&e.right){var i=Kg(e.left,r),n=Kg(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()},Zg=function(e,r,i){if(!e)return[];var n=[],a=[],o=[];return r===0?(e.left&&uu(e.left,n),e.right&&uu(e.right,a),o=n.concat(a),[i.collection(o)]):r===1?e.value?[i.collection(e.value)]:(e.left&&uu(e.left,n),e.right&&uu(e.right,a),[i.collection(n),i.collection(a)]):e.value?[i.collection(e.value)]:(e.left&&(n=Zg(e.left,r-1,i)),e.right&&(a=Zg(e.right,r-1,i)),n.concat(a))},u_=function(e){for(var r=this.cy(),i=this.nodes(),n=XF(e),a=n.attributes,o=function(b,w){return Ph(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=s_(s,c,u,l,n);v;)v=s_(s,c,u,l,n);var m;return n.mode==="dendrogram"?(m=Zg(s[0],n.dendrogramDepth,r),n.addDendrogram&&Kg(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},QF={hierarchicalClustering:u_,hca:u_},JF=Zr({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),e5=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)),JF(e)},t5=function(e,r,i,n){var a=function(s,u){return n[u](s)};return-Ph(e,n.length,function(o){return a(r,o)},function(o){return a(i,o)},r,i)},r5=function(e,r){var i=null;return r==="median"?i=eF(e):r==="mean"?i=JN(e):r==="min"?i=XN(e):r==="max"?i=QN(e):i=r,i},i5=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},l_=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},n5=function(e,r,i){for(var n=l_(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=l_(e,r,i),n},c_=function(e){for(var r=this.cy(),i=this.nodes(),n=e5(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]=t5(n.distance,i[h],i[g],n.attributes));c=r5(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,R=0,N=0;N<s;N++)b[N]=d[M*s+N],R=f[M*s+N]+l[M*s+N],R>=k?(I=k,k=R,A=N):R>I&&(I=R);for(var L=0;L<s;L++)d[M*s+L]=(1-n.damping)*(l[M*s+L]-k)+n.damping*b[L];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,G=0;G<s;G++)b[G]=f[G*s+P],w[G]=Math.max(0,d[G*s+P]),z+=w[G];z-=w[P],w[P]=d[P*s+P],z+=w[P];for(var Y=0;Y<s;Y++)f[Y*s+P]=(1-n.damping)*Math.min(0,z-w[Y])+n.damping*b[Y];f[P*s+P]=(1-n.damping)*(z-w[P])+n.damping*b[P]}for(var V=0,W=0;W<s;W++){var ce=f[W*s+W]+d[W*s+W]>0?1:0;_[E%n.minIterations*s+W]=ce,V+=ce}if(V>0&&(E>=n.minIterations-1||E==n.maxIterations-1)){for(var he=0,de=0;de<s;de++){T[de]=0;for(var me=0;me<n.minIterations;me++)T[de]+=_[me*s+de];(T[de]===0||T[de]===n.minIterations)&&he++}if(he===s)break}}for(var Ce=i5(s,d,f),Se=n5(s,l,Ce),le={},q=0;q<Ce.length;q++)le[Ce[q]]=[];for(var Q=0;Q<i.length;Q++){var ee=a[i[Q].id()],oe=Se[ee];oe!=null&&le[oe].push(i[Q])}for(var _e=new Array(Ce.length),Re=0;Re<Ce.length;Re++)_e[Re]=r.collection(le[Ce[Re]]);return _e},a5={affinityPropagation:c_,ap:c_},o5=Zr({root:void 0,directed:!1}),s5={hierholzer:function(e){if(!kt(e)){var r=arguments;e={root:r[0],directed:r[1]}}var i=o5(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}},Zf=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}},u5={hopcroftTarjanBiconnected:Zf,htbc:Zf,htb:Zf,hopcroftTarjanBiconnectedComponents:Zf},Xf=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}},l5={tarjanStronglyConnected:Xf,tsc:Xf,tscc:Xf,tarjanStronglyConnectedComponents:Xf},OT={};[Ll,zN,VN,UN,$N,WN,KN,_F,du,fu,Yg,NF,YF,QF,a5,s5,u5,l5].forEach(function(t){We(OT,t)});var RT=0,PT=1,NT=2,_n=function(e){if(!(this instanceof _n))return new _n(e);this.id="Thenable/1.0.7",this.state=RT,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))};_n.prototype={fulfill:function(e){return d_(this,PT,"fulfillValue",e)},reject:function(e){return d_(this,NT,"rejectReason",e)},then:function(e,r){var i=this,n=new _n;return i.onFulfilled.push(h_(e,n,"fulfill")),i.onRejected.push(h_(r,n,"reject")),FT(i),n.proxy}};var d_=function(e,r,i,n){return e.state===RT&&(e.state=r,e[i]=n,FT(e)),e},FT=function(e){e.state===PT?f_(e,"onFulfilled",e.fulfillValue):e.state===NT&&f_(e,"onRejected",e.rejectReason)},f_=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)}},h_=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}BT(r,a)}}},BT=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")):BT(e,a))},function(a){n||(n=!0,e.reject(a))})}catch(a){n||e.reject(a)}return}e.fulfill(r)};_n.all=function(t){return new _n(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)})};_n.resolve=function(t){return new _n(function(e,r){e(t)})};_n.reject=function(t){return new _n(function(e,r){r(t)})};var Cu=typeof Promise<"u"?Promise:_n,Xg=function(e,r,i){var n=f0(e),a=!n,o=this._private=We({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=Xg.prototype;We(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),Hi(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 Cu(function(n,a){i.push(function(){n()})})}});qo.complete=qo.completed;qo.run=qo.play;qo.running=qo.playing;var c5={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=We({},r,i);var d=Object.keys(r).length===0;if(d)return new Xg(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=_T(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&&kt(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 Xg(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=We({},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}}},Fm,p_;function Nh(){if(p_)return Fm;p_=1;var t=Array.isArray;return Fm=t,Fm}var Bm,v_;function d5(){if(v_)return Bm;v_=1;var t=Nh(),e=Zl(),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 Bm=n,Bm}var Lm,m_;function f5(){if(m_)return Lm;m_=1;var t=hT(),e=Kl(),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 Lm=o,Lm}var zm,g_;function h5(){if(g_)return zm;g_=1;var t=Ah(),e=t["__core-js_shared__"];return zm=e,zm}var Vm,y_;function p5(){if(y_)return Vm;y_=1;var t=h5(),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 Vm=r,Vm}var Hm,b_;function v5(){if(b_)return Hm;b_=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 Hm=r,Hm}var Um,C_;function m5(){if(C_)return Um;C_=1;var t=f5(),e=p5(),r=Kl(),i=v5(),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 Um=d,Um}var jm,w_;function g5(){if(w_)return jm;w_=1;function t(e,r){return e?.[r]}return jm=t,jm}var $m,__;function x0(){if(__)return $m;__=1;var t=m5(),e=g5();function r(i,n){var a=e(i,n);return t(a)?a:void 0}return $m=r,$m}var qm,x_;function Fh(){if(x_)return qm;x_=1;var t=x0(),e=t(Object,"create");return qm=e,qm}var Wm,T_;function y5(){if(T_)return Wm;T_=1;var t=Fh();function e(){this.__data__=t?t(null):{},this.size=0}return Wm=e,Wm}var Gm,S_;function b5(){if(S_)return Gm;S_=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return Gm=t,Gm}var Ym,D_;function C5(){if(D_)return Ym;D_=1;var t=Fh(),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 Ym=n,Ym}var Km,E_;function w5(){if(E_)return Km;E_=1;var t=Fh(),e=Object.prototype,r=e.hasOwnProperty;function i(n){var a=this.__data__;return t?a[n]!==void 0:r.call(a,n)}return Km=i,Km}var Zm,k_;function _5(){if(k_)return Zm;k_=1;var t=Fh(),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 Zm=r,Zm}var Xm,M_;function x5(){if(M_)return Xm;M_=1;var t=y5(),e=b5(),r=C5(),i=w5(),n=_5();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,Xm=a,Xm}var Qm,I_;function T5(){if(I_)return Qm;I_=1;function t(){this.__data__=[],this.size=0}return Qm=t,Qm}var Jm,A_;function LT(){if(A_)return Jm;A_=1;function t(e,r){return e===r||e!==e&&r!==r}return Jm=t,Jm}var eg,O_;function Bh(){if(O_)return eg;O_=1;var t=LT();function e(r,i){for(var n=r.length;n--;)if(t(r[n][0],i))return n;return-1}return eg=e,eg}var tg,R_;function S5(){if(R_)return tg;R_=1;var t=Bh(),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 tg=i,tg}var rg,P_;function D5(){if(P_)return rg;P_=1;var t=Bh();function e(r){var i=this.__data__,n=t(i,r);return n<0?void 0:i[n][1]}return rg=e,rg}var ig,N_;function E5(){if(N_)return ig;N_=1;var t=Bh();function e(r){return t(this.__data__,r)>-1}return ig=e,ig}var ng,F_;function k5(){if(F_)return ng;F_=1;var t=Bh();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 ng=e,ng}var ag,B_;function M5(){if(B_)return ag;B_=1;var t=T5(),e=S5(),r=D5(),i=E5(),n=k5();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,ag=a,ag}var og,L_;function I5(){if(L_)return og;L_=1;var t=x0(),e=Ah(),r=t(e,"Map");return og=r,og}var sg,z_;function A5(){if(z_)return sg;z_=1;var t=x5(),e=M5(),r=I5();function i(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return sg=i,sg}var ug,V_;function O5(){if(V_)return ug;V_=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return ug=t,ug}var lg,H_;function Lh(){if(H_)return lg;H_=1;var t=O5();function e(r,i){var n=r.__data__;return t(i)?n[typeof i=="string"?"string":"hash"]:n.map}return lg=e,lg}var cg,U_;function R5(){if(U_)return cg;U_=1;var t=Lh();function e(r){var i=t(this,r).delete(r);return this.size-=i?1:0,i}return cg=e,cg}var dg,j_;function P5(){if(j_)return dg;j_=1;var t=Lh();function e(r){return t(this,r).get(r)}return dg=e,dg}var fg,$_;function N5(){if($_)return fg;$_=1;var t=Lh();function e(r){return t(this,r).has(r)}return fg=e,fg}var hg,q_;function F5(){if(q_)return hg;q_=1;var t=Lh();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 hg=e,hg}var pg,W_;function B5(){if(W_)return pg;W_=1;var t=A5(),e=R5(),r=P5(),i=N5(),n=F5();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,pg=a,pg}var vg,G_;function L5(){if(G_)return vg;G_=1;var t=B5(),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,vg=r,vg}var mg,Y_;function z5(){if(Y_)return mg;Y_=1;var t=L5(),e=500;function r(i){var n=t(i,function(o){return a.size===e&&a.clear(),o}),a=n.cache;return n}return mg=r,mg}var gg,K_;function zT(){if(K_)return gg;K_=1;var t=z5(),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 gg=i,gg}var yg,Z_;function VT(){if(Z_)return yg;Z_=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 yg=t,yg}var bg,X_;function V5(){if(X_)return bg;X_=1;var t=p0(),e=VT(),r=Nh(),i=Zl(),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 bg=o,bg}var Cg,Q_;function HT(){if(Q_)return Cg;Q_=1;var t=V5();function e(r){return r==null?"":t(r)}return Cg=e,Cg}var wg,J_;function UT(){if(J_)return wg;J_=1;var t=Nh(),e=d5(),r=zT(),i=HT();function n(a,o){return t(a)?a:e(a,o)?[a]:r(i(a))}return wg=n,wg}var _g,ex;function T0(){if(ex)return _g;ex=1;var t=Zl();function e(r){if(typeof r=="string"||t(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}return _g=e,_g}var xg,tx;function H5(){if(tx)return xg;tx=1;var t=UT(),e=T0();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 xg=r,xg}var Tg,rx;function U5(){if(rx)return Tg;rx=1;var t=H5();function e(r,i,n){var a=r==null?void 0:t(r,i);return a===void 0?n:a}return Tg=e,Tg}var j5=U5(),$5=Yl(j5),Sg,ix;function q5(){if(ix)return Sg;ix=1;var t=x0(),e=(function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Sg=e,Sg}var Dg,nx;function W5(){if(nx)return Dg;nx=1;var t=q5();function e(r,i,n){i=="__proto__"&&t?t(r,i,{configurable:!0,enumerable:!0,value:n,writable:!0}):r[i]=n}return Dg=e,Dg}var Eg,ax;function G5(){if(ax)return Eg;ax=1;var t=W5(),e=LT(),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 Eg=n,Eg}var kg,ox;function Y5(){if(ox)return kg;ox=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 kg=r,kg}var Mg,sx;function K5(){if(sx)return Mg;sx=1;var t=G5(),e=UT(),r=Y5(),i=Kl(),n=T0();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 Mg=a,Mg}var Ig,ux;function Z5(){if(ux)return Ig;ux=1;var t=K5();function e(r,i,n){return r==null?r:t(r,i,n)}return Ig=e,Ig}var X5=Z5(),Q5=Yl(X5),Ag,lx;function J5(){if(lx)return Ag;lx=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 Ag=t,Ag}var Og,cx;function eB(){if(cx)return Og;cx=1;var t=VT(),e=J5(),r=Nh(),i=Zl(),n=zT(),a=T0(),o=HT();function s(u){return r(u)?t(u,a):i(u)?[u]:e(n(o(u)))}return Og=s,Og}var tB=eB(),rB=Yl(tB),iB={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=We({},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&&rB(n);if(o.allowGetting&&a===void 0){var p;return c&&(o.beforeGet(c),f&&c._private[o.field][n]===void 0?p=$5(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=iT({},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?Q5(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&&kt(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=We({},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}}},nB={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 Cu(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)})}}},Vt={};[c5,iB,nB].forEach(function(t){We(Vt,t)});var aB={animate:Vt.animate(),animation:Vt.animation(),animated:Vt.animated(),clearQueue:Vt.clearQueue(),delay:Vt.delay(),delayAnimation:Vt.delayAnimation(),stop:Vt.stop()},uh={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 bu(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}};uh.className=uh.classNames=uh.classes;var Et={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+"};Et.variable="(?:[\\w-.]|(?:\\\\"+Et.metaChar+"))+";Et.className="(?:[\\w-]|(?:\\\\"+Et.metaChar+"))+";Et.value=Et.string+"|"+Et.number;Et.id=Et.variable;(function(){var t,e,r;for(t=Et.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Et.comparatorOp+="|@"+e;for(t=Et.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Et.comparatorOp+="|\\!"+e)})();var Kt=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},Qg=[{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 iN(t.selector,e.selector)}),oB=(function(){for(var t={},e,r=0;r<Qg.length;r++)e=Qg[r],t[e.selector]=e.matches;return t})(),sB=function(e,r){return oB[e](r)},uB="("+Qg.map(function(t){return t.selector}).join("|")+")",Js=function(e){return e.replace(new RegExp("\\\\("+Et.metaChar+")","g"),function(r,i){return i})},Ua=function(e,r,i){e[e.length-1]=i},Jg=[{name:"group",query:!0,regex:"("+Et.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:uB,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:"\\#("+Et.id+")",populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.ID,value:Js(a)})}},{name:"className",query:!0,regex:"\\.("+Et.className+")",populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.CLASS,value:Js(a)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Et.variable+")\\s*\\]",populate:function(e,r,i){var n=Sr(i,1),a=n[0];r.checks.push({type:Oe.DATA_EXIST,field:Js(a)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Et.variable+")\\s*("+Et.comparatorOp+")\\s*("+Et.value+")\\s*\\]",populate:function(e,r,i){var n=Sr(i,3),a=n[0],o=n[1],s=n[2],u=new RegExp("^"+Et.string+"$").exec(s)!=null;u?s=s.substring(1,s.length-1):s=parseFloat(s),r.checks.push({type:Oe.DATA_COMPARE,field:Js(a),operator:o,value:s})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Et.boolOp+")\\s*("+Et.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:Js(o),operator:a})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Et.meta+")\\s*("+Et.comparatorOp+")\\s*("+Et.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:Js(a),operator:o,value:parseFloat(s)})}},{name:"nextQuery",separator:!0,regex:Et.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++]=Kt();return s}},{name:"directedEdge",separator:!0,regex:Et.directedEdge,populate:function(e,r){if(e.currentSubject==null){var i=Kt(),n=r,a=Kt();return i.checks.push({type:Oe.DIRECTED_EDGE,source:n,target:a}),Ua(e,r,i),e.edgeCount++,a}else{var o=Kt(),s=r,u=Kt();return o.checks.push({type:Oe.NODE_SOURCE,source:s,target:u}),Ua(e,r,o),e.edgeCount++,u}}},{name:"undirectedEdge",separator:!0,regex:Et.undirectedEdge,populate:function(e,r){if(e.currentSubject==null){var i=Kt(),n=r,a=Kt();return i.checks.push({type:Oe.UNDIRECTED_EDGE,nodes:[n,a]}),Ua(e,r,i),e.edgeCount++,a}else{var o=Kt(),s=r,u=Kt();return o.checks.push({type:Oe.NODE_NEIGHBOR,node:s,neighbor:u}),Ua(e,r,o),u}}},{name:"child",separator:!0,regex:Et.child,populate:function(e,r){if(e.currentSubject==null){var i=Kt(),n=Kt(),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=Kt(),s=e[e.length-1],u=Kt(),l=Kt(),c=Kt(),d=Kt();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=Kt(),p=Kt(),h=[{type:Oe.PARENT,parent:f,child:p}];return f.checks=r.checks,r.checks=h,e.compoundCount++,p}}},{name:"descendant",separator:!0,regex:Et.descendant,populate:function(e,r){if(e.currentSubject==null){var i=Kt(),n=Kt(),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=Kt(),s=e[e.length-1],u=Kt(),l=Kt(),c=Kt(),d=Kt();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=Kt(),p=Kt(),h=[{type:Oe.ANCESTOR,ancestor:f,descendant:p}];return f.checks=r.checks,r.checks=h,e.compoundCount++,p}}},{name:"subject",modifier:!0,regex:Et.subject,populate:function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return Ht("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)}}];Jg.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var lB=function(e){for(var r,i,n,a=0;a<Jg.length;a++){var o=Jg[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}},cB=function(e){var r=e.match(/^\s+/);if(r){var i=r[0];e=e.substring(i.length)}return e},dB=function(e){var r=this,i=r.inputText=e,n=r[0]=Kt();for(r.length=1,i=cB(i);;){var a=lB(i);if(a.expr==null)return Ht("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 Ht("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(c.edgeCount>1)return Ht("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;c.edgeCount===1&&Ht("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},fB=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},hB={parse:dB,toString:fB},jT=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},pB=function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},vB=function(e){return e!==void 0},S0=function(e,r){return e.data(r)},mB=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 sB(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 jT(mB(e,r),i,n)};mr[Oe.DATA_COMPARE]=function(t,e){var r=t.field,i=t.operator,n=t.value;return jT(S0(e,r),i,n)};mr[Oe.DATA_BOOL]=function(t,e){var r=t.field,i=t.operator;return pB(S0(e,r),i)};mr[Oe.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,vB(S0(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 gB=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)},yB=function(e){for(var r=this,i=0;i<r.length;i++){var n=r[i];if(ir(n,e))return!0}return!1},bB={matches:yB,filter:gB},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*$/)||(Hi(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;[hB,bB].forEach(function(t){return We(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="":Hi(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=jo(c),g=p[h];return g||(p[h]=e.call(l,n,a,o,s))}else return e.call(l,n,a,o,s)}},mu={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 D0(t,e,r,i){for(var n=[],a=new bu,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 $T(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)}}mu.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return D0(this,t,e,$T)};function qT(t,e,r){if(r.isChild()){var i=r._private.parent;e.has(i.id())||t.push(i)}}mu.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return D0(this,t,e,qT)};function CB(t,e,r){qT(t,e,r),$T(t,e,r)}mu.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return D0(this,t,e,CB)};mu.ancestors=mu.parents;var Hl,WT;Hl=WT={data:Vt.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:Vt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Vt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Vt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Vt.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Vt.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Hl.attr=Hl.data;Hl.removeAttr=Hl.removeData;var wB=WT,zh={};function Rg(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}}We(zh,{degree:Rg(function(t,e){return e.source().same(e.target())?2:1}),indegree:Rg(function(t,e){return e.target().same(t)?1:0}),outdegree:Rg(function(t,e){return e.source().same(t)?1:0})});function eu(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}}We(zh,{minDegree:eu("degree",function(t,e){return t<e}),maxDegree:eu("degree",function(t,e){return t>e}),minIndegree:eu("indegree",function(t,e){return t<e}),maxIndegree:eu("indegree",function(t,e){return t>e}),minOutdegree:eu("outdegree",function(t,e){return t<e}),maxOutdegree:eu("outdegree",function(t,e){return t>e})});We(zh,{totalDegree:function(e){for(var r=0,i=this.nodes(),n=0;n<i.length;n++)r+=i[n].degree(e);return r}});var wn,GT,YT=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()}}},dx={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){YT(e,r,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};wn=GT={position:Vt.data(dx),silentPosition:Vt.data(We({},dx,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,r){YT(e,r,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,r){if(kt(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(kt(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 kt(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=kt(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(_T(s,a,o))}else{var d=i.position();return s=Rh(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=kt(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}};wn.modelPosition=wn.point=wn.position;wn.modelPositions=wn.points=wn.positions;wn.renderedPoint=wn.renderedPosition;wn.relativePoint=wn.relativePosition;var _B=GT,gu=function(e){switch(e){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},yu=function(e){switch(e){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}},xB=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"}},hu,no;hu=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,R=M+k;return E>0&&R>0&&(I=M/R*E,A=k/R*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},Cn=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:Cn(e,r.x1,r.y1,r.x2,r.y2)},Tl=function(e,r,i){return hi(e,r,i)},Qf=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,oh(d,1),Cn(e,d.x1,d.y1,d.x2,d.y2)}}},Pg=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=Tl(o,"labelWidth",i),d=Tl(o,"labelHeight",i),f=Tl(o,"labelX",i),p=Tl(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,R;if(v)k=f-E,I=f+E,A=p-M,R=p+M;else{switch(gu(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(yu(l.value)){case"top":A=p-_,R=p;break;case"center":A=p-M,R=p+M;break;case"bottom":A=p,R=p+_;break}}var N=h-Math.max(y,w)-T-x,L=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+=L,A+=P,R+=z;var G=i||"main",Y=a.labelBounds,V=Y[G]=Y[G]||{};V.x1=k,V.y1=A,V.x2=I,V.y2=R,V.w=I-k,V.h=R-A,V.leftPad=N,V.rightPad=L,V.topPad=P,V.botPad=z;var W=v&&m.strValue==="autorotate",ce=m.pfValue!=null&&m.pfValue!==0;if(W||ce){var he=W?Tl(a.rstyle,"labelAngle",i):m.pfValue,de=Math.cos(he),me=Math.sin(he),Ce=(k+I)/2,Se=(A+R)/2;if(!v){switch(gu(u.value)){case"left":Ce=I;break;case"right":Ce=k;break}switch(yu(l.value)){case"top":Se=R;break;case"bottom":Se=A;break}}var le=function(Je,Ge){return Je=Je-Ce,Ge=Ge-Se,{x:Je*de-Ge*me+Ce,y:Je*me+Ge*de+Se}},q=le(k,A),Q=le(k,R),ee=le(I,A),oe=le(I,R);k=Math.min(q.x,Q.x,ee.x,oe.x),I=Math.max(q.x,Q.x,ee.x,oe.x),A=Math.min(q.y,Q.y,ee.y,oe.y),R=Math.max(q.y,Q.y,ee.y,oe.y)}var _e=G+"Rot",Re=Y[_e]=Y[_e]||{};Re.x1=k,Re.y1=A,Re.x2=I,Re.y2=R,Re.w=I-k,Re.h=R-A,Cn(e,k,A,I,R),Cn(a.labelBounds.all,k,A,I,R)}return e}},fx=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;KT(e,r,i,o,"outside",o/2)}},KT=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&&sh(e,[o,o,o,o])}}},TB=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;KT(e,r,i,n,a)}},SB=function(e,r){var i=e._private.cy,n=i.styleEnabled(),a=i.headless(),o=pi(),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,R=e.outerHeight(),N=R/2;c=h-A,d=h+A,f=g-N,p=g+N,Cn(o,c,f,d,p),n&&fx(o,e),n&&r.includeOutlines&&!a&&fx(o,e),n&&TB(o,e)}else if(l&&r.includeEdges)if(n&&!a){var L=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,Cn(o,c,f,d,p),L==="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 G=f;f=p,p=G}Cn(o,c-M,f-M,d+M,p+M)}}else if(L==="bezier"||L==="unbundled-bezier"||$a(L,"segments")||$a(L,"taxi")){var Y;switch(L){case"bezier":case"unbundled-bezier":Y=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":Y=v.linePts;break}if(Y!=null)for(var V=0;V<Y.length;V++){var W=Y[V];c=W.x-M,d=W.x+M,f=W.y-M,p=W.y+M,Cn(o,c,f,d,p)}}}else{var ce=e.source(),he=ce.position(),de=e.target(),me=de.position();if(c=he.x,d=me.x,f=he.y,p=me.y,c>d){var Ce=c;c=d,d=Ce}if(f>p){var Se=f;f=p,p=Se}c-=M,d+=M,f-=M,p+=M,Cn(o,c,f,d,p)}if(n&&r.includeEdges&&l&&(Qf(o,e,"mid-source"),Qf(o,e,"mid-target"),Qf(o,e,"source"),Qf(o,e,"target")),n){var le=e.pstyle("ghost").value==="yes";if(le){var q=e.pstyle("ghost-offset-x").pfValue,Q=e.pstyle("ghost-offset-y").pfValue;Cn(o,o.x1+q,o.y1+Q,o.x2+q,o.y2+Q)}}var ee=s.bodyBounds=s.bodyBounds||{};Xw(ee,o),sh(ee,m),oh(ee,1),n&&(c=o.x1,d=o.x2,f=o.y1,p=o.y2,Cn(o,c-D,f-D,d+D,p+D));var oe=s.overlayBounds=s.overlayBounds||{};Xw(oe,o),sh(oe,m),oh(oe,1);var _e=s.labelBounds=s.labelBounds||{};_e.all!=null?aF(_e.all):_e.all=pi(),n&&r.includeLabels&&(r.includeMainLabels&&Pg(o,e,null),l&&(r.includeSourceLabels&&Pg(o,e,"source"),r.includeTargetLabels&&Pg(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&&(sh(o,m),oh(o,1)),o},ZT=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},XT=function(e){var r=function(s){return Math.round(s)};if(e.isEdge()){var i=e.source().position(),n=e.target().position();return qw([r(i.x),r(i.y),r(n.x),r(n.y)])}else{var a=e.position();return qw([r(a.x),r(a.y)])}},hx=function(e,r){var i=e._private,n,a=e.isEdge(),o=r==null?px:ZT(r),s=o===px;if(i.bbCache==null?(n=SB(e,Ul),i.bbCache=n,i.bbCachePosKey=XT(e)):n=i.bbCache,!s){var u=e.isNode();n=pi(),(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},Ul={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},px=ZT(Ul),vx=Zr(Ul);no.boundingBox=function(t){var e,r=t===void 0||t.useCache===void 0||t.useCache===!0,i=pu(function(c){var d=c._private;return d.bbCache==null||d.styleDirty||d.bbCachePosKey!==XT(c)},function(c){return c.id()});if(r&&this.length===1&&!i(this[0]))t===void 0?t=Ul:t=vx(t),e=hx(this[0],t);else{e=pi(),t=t||Ul;var n=vx(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,hx(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)),kt(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=nF(this.boundingBox({useCache:!1}));return e.silentPositions(s),i&&(n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),n.updateCompoundBounds(!0)),r.endBatch(),u};hu.boundingbox=hu.bb=hu.boundingBox;hu.renderedBoundingbox=hu.renderedBoundingBox;var DB=no,Al,Jl;Al=Jl={};var QT=function(e){e.uppercaseName=Iw(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=Iw(e.outerName),Al[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},Al["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},Al["rendered"+e.uppercaseName]=function(){var i=this[0];if(i){var n=i[e.name]();return n*this.cy().zoom()}},Al["rendered"+e.uppercaseOuterName]=function(){var i=this[0];if(i){var n=i[e.outerName]();return n*this.cy().zoom()}}};QT({name:"width"});QT({name:"height"});Jl.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};Jl.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()};Jl.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var EB=Jl,kB=function(e,r){if(e.isEdge()&&e.takesUpSpace())return r(e)},MB=function(e,r){if(e.isEdge()&&e.takesUpSpace()){var i=e.cy();return Rh(r(e),i.zoom(),i.pan())}},IB=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 Rh(o,a,n)})}},AB=function(e){return e.renderer().getControlPoints(e)},OB=function(e){return e.renderer().getSegmentPoints(e)},RB=function(e){return e.renderer().getSourceEndpoint(e)},PB=function(e){return e.renderer().getTargetEndpoint(e)},NB=function(e){return e.renderer().getEdgeMidpoint(e)},mx={controlPoints:{get:AB,mult:!0},segmentPoints:{get:OB,mult:!0},sourceEndpoint:{get:RB},targetEndpoint:{get:PB},midpoint:{get:NB}},FB=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},BB=Object.keys(mx).reduce(function(t,e){var r=mx[e],i=FB(e);return t[e]=function(){return kB(this,r.get)},r.mult?t[i]=function(){return IB(this,r.get)}:t[i]=function(){return MB(this,r.get)},t},{}),LB=We({},_B,DB,EB,BB);var JT=function(e,r){this.recycle(e,r)};function Sl(){return!1}function Jf(){return!0}JT.prototype={instanceString:function(){return"event"},recycle:function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Sl,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Jf:Sl):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=Jf;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Jf;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Jf,this.stopPropagation()},isDefaultPrevented:Sl,isPropagationStopped:Sl,isImmediatePropagationStopped:Sl};var eS=/^([^.]+)(\.(?:[^.]+))?$/,zB=".*",tS={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},gx=Object.keys(tS),VB={};function Vh(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:VB,e=arguments.length>1?arguments[1]:void 0,r=0;r<gx.length;r++){var i=gx[r];this[i]=t[i]||tS[i]}this.context=e||this.context,this.listeners=[],this.emitting=0}var eo=Vh.prototype,rS=function(e,r,i,n,a,o,s){cr(n)&&(a=n,n=null),s&&(o==null?o=s:o=We({},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(eS);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}}}},yx=function(e,r){return e.addEventFields(e.context,r),new JT(r.type,r)},HB=function(e,r,i){if(WP(i)){r(e,i);return}else if(kt(i)){r(e,yx(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(eS);if(s){var u=s[1],l=s[2]?s[2]:null,c=yx(e,{type:u,namespace:l,target:e.context});r(e,c)}}}};eo.on=eo.addListener=function(t,e,r,i,n){return rS(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=kN(this.listeners));for(var a=this.listeners,o=function(l){var c=a[l];rS(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]),HB(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===zB)&&a.eventMatches(a.context,c,o)){var d=[o];e!=null&&IN(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 UB={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&&Gl(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()}},eh=function(e){return Ue(e)?new Qa(e):e},iS={createEmitter:function(){for(var e=0;e<this.length;e++){var r=this[e],i=r._private;i.emitter||(i.emitter=new Vh(UB,r))}return this},emitter:function(){return this._private.emitter},on:function(e,r,i){for(var n=eh(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=eh(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=eh(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=eh(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}};Vt.eventAliasesOn(iS);var nS={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)||Hi(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}}},At=nS;At.u=At["|"]=At["+"]=At.union=At.or=At.add;At["\\"]=At["!"]=At["-"]=At.difference=At.relativeComplement=At.subtract=At.not;At.n=At["&"]=At["."]=At.and=At.intersection=At.intersect;At["^"]=At["(+)"]=At["(-)"]=At.symmetricDifference=At.symdiff=At.xor;At.fnFilter=At.filterFn=At.stdFilter=At.filter;At.complement=At.abscomp=At.absoluteComplement;var jB={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}},aS=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"?v0: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()},xh={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(aS)},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:v0-1}else{var a=r.source,o=r.target,s=a.zDepth(),u=o.zDepth();return Math.max(s,u,0)}}}};xh.each=xh.forEach;var $B=function(){var e="undefined",r=(typeof Symbol>"u"?"undefined":Or(Symbol))!=e&&Or(Symbol.iterator)!=e;r&&(xh[Symbol.iterator]=function(){var i=this,n={value:void 0,done:!1},a=0,o=this.length;return iT({next:function(){return a<o?n.value=i[a++]:(n.value=void 0,n.done=!0),n}},Symbol.iterator,function(){return this})})};$B();var qB=Zr({nodeDimensionsIncludeLabels:!1}),lh={layoutDimensions:function(e){e=qB(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=pu(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=pi(),_=0;_<n.length;_++){var D=n[_],E=u(D,_);xT(x,E.x,E.y)}return x},f=d(),p=pu(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}),Cu.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(We({},e,{eles:this}))}};lh.createLayout=lh.makeLayout=lh.layout;function oS(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 Hh(t,e){return t=jo(t),function(i){return oS(t,e,i)}}function Uh(t,e){t=jo(t);var r=function(n){return e.call(n)};return function(){var n=this[0];if(n)return oS(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(kt(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 Ng(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 E0(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||Ng(a,i);var u=s.source,l=s.target;return r(u)&&(!o||Ng(u,r))&&(u===l||r(l)&&(!o||Ng(l,r)))}}}var wu=Hh("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});Yr.takesUpSpace=Uh("takesUpSpace",E0({ok:wu}));var WB=Hh("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&wu(t)}),GB=Hh("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&wu(t)});Yr.interactive=Uh("interactive",E0({ok:WB,parentOk:GB,edgeOkViaNode:wu}));Yr.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var YB=Hh("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&wu(t)}),KB=wu;Yr.visible=Uh("visible",E0({ok:YB,edgeOkViaNode:KB}));Yr.hidden=function(){var t=this[0];if(t)return!t.visible()};Yr.isBundledBezier=Uh("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 bx(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 _u(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]=bx({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Ya[t.off]=bx({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}_u({field:"locked",overrideField:function(e){return e.cy().autolock()?!0:void 0},on:"lock",off:"unlock"});_u({field:"grabbable",overrideField:function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},on:"grabify",off:"ungrabify"});_u({field:"selected",ableField:"selectable",overrideAble:function(e){return e.cy().autounselectify()?!1:void 0},on:"select",off:"unselect"});_u({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};_u({field:"active",on:"activate",off:"unactivate"});_u({field:"pannable",on:"panify",off:"unpanify"});Ya.inactive=function(){var t=this[0];if(t)return!t._private.active};var ai={},Cx=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)}},wx=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)}},_x=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)}};ai.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null};We(ai,{roots:Cx({noIncomingEdges:!0}),leaves:Cx({noOutgoingEdges:!0}),outgoers:Qi(wx({outgoing:!0}),"outgoers"),successors:_x({outgoing:!0}),incomers:Qi(wx({incoming:!0}),"incomers"),predecessors:_x({})});We(ai,{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)}});ai.neighbourhood=ai.neighborhood;ai.closedNeighbourhood=ai.closedNeighborhood;ai.openNeighbourhood=ai.openNeighborhood;We(ai,{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:xx({attr:"source"}),targets:xx({attr:"target"})});function xx(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)}}We(ai,{edgesWith:Qi(Tx(),"edgesWith"),edgesTo:Qi(Tx({thisIsSrc:!0}),"edgesTo")});function Tx(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)}}We(ai,{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(Sx(),"parallelEdges"),codirectedEdges:Qi(Sx({codirected:!0}),"codirectedEdges")});function Sx(t){var e={codirected:!1};return t=We({},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)}}We(ai,{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]}});ai.componentsOf=ai.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 fa,o=!1;if(!r)r=[];else if(r.length>0&&kt(r[0])&&!Gl(r[0])){o=!0;for(var s=[],u=new bu,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=CT();else if(e.hasElementWithId(f.id)||u.has(f.id))continue;var p=new Oh(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 fa,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=Oh.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 oT(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(kt(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:jn(i.data),position:jn(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 Oh(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=CT();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 fa,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 R=A.parent,N=R!=null;if(N||I._private.parent){var L=I._private.parent?i.collection().merge(I._private.parent):i.getElementById(R);if(L.empty())A.parent=void 0;else if(L[0].removed())Ht("Node added with missing parent, reference to parent removed"),A.parent=void 0,I._private.parent=null;else{for(var P=!1,z=L;!z.empty();){if(I.same(z)){P=!0,A.parent=void 0;break}z=z.parent()}P||(L[0]._private.children.push(I),I._private.parent=L[0],n.hasCompoundNodes=!0)}}}if(s.length>0){for(var G=s.length===r.length?r:new Kr(i,s),Y=0;Y<G.length;Y++){var V=G[Y];V.isNode()||(V.parallelEdges().clearTraversalCache(),V.source().clearTraversalCache(),V.target().clearTraversalCache())}var W;n.hasCompoundNodes?W=i.collection().merge(G).merge(G.connectedNodes()).merge(G.parent()):W=G,W.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?G.emitAndNotify("add"):e&&G.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(R){for(var N=R._private.edges,L=0;L<N.length;L++)u(N[L])}function s(R){for(var N=R._private.children,L=0;L<N.length;L++)u(N[L])}function u(R){var N=n[R.id()];e&&R.removed()||N||(n[R.id()]=!0,R.isNode()?(i.push(R),o(R),s(R)):i.unshift(R))}for(var l=0,c=r.length;l<c;l++){var d=r[l];u(d)}function f(R,N){var L=R._private.edges;Za(L,N),R.clearTraversalCache()}function p(R){R.clearTraversalCache()}var h=[];h.ids={};function g(R,N){N=N[0],R=R[0];var L=R._private.children,P=R.id();Za(L,N),N._private.parent=null,h.ids[P]||(h.ids[P]=!0,h.push(R))}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};[OT,aB,uh,Ga,mu,wB,zh,LB,iS,nS,jB,xh,lh,Yr,Ya,ai].forEach(function(t){We(er,t)});var ZB={add:function(e){var r,i=this;if(Hi(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(kt(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=We({group:h},g[v]);c.push(y)}}r=new Kr(i,c)}else{var b=e;r=new Oh(i,b).collection()}return r},remove:function(e){if(!Hi(e)){if(Ue(e)){var r=e;e=this.$(r)}}return e.remove()}};function XB(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 R=v(k,t,r)-M;k-=R/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,R,N=0;do R=k+(I-k)/2,A=v(R,t,r)-M,A>0?I=R:k=R;while(Math.abs(A)>o&&++N<s);return R}function T(M){for(var k=0,I=1,A=u-1;I!==A&&f[I]<=M;++I)k+=l;--I;var R=(M-f[I])/(f[I+1]-f[I]),N=k+R*l,L=m(N,t,r);return L>=a?y(M,N):L===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 QB=(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=XB(e,r,i,n);return function(o,s,u){return o+(s-o)*a(u)}},ch={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 ch.linear;var n=QB(e,r,i);return function(a,o,s){return a+(o-a)*n(s)}},"cubic-bezier":Jt};function Dx(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 Ex(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function tu(t,e,r,i,n){var a=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var o=Ex(t,n),s=Ex(e,n);if(Te(o)&&Te(s))return Dx(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=Dx(a,c,d,r,i);u.push(f)}else u.push(d)}return u}}function JB(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=ch.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(G){return+G})),h.length>0?(p==="spring"&&h.push(o.duration),o.easingImpl=ch[p].apply(null,h)):o.easingImpl=ch[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={};Dl(m.x,y.x)&&(b.x=tu(m.x,y.x,v,g)),Dl(m.y,y.y)&&(b.y=tu(m.y,y.y,v,g)),t.position(b)}var w=o.startPan,T=o.pan,x=a.pan,_=T!=null&&i;_&&(Dl(w.x,T.x)&&(x.x=tu(w.x,T.x,v,g)),Dl(w.y,T.y)&&(x.y=tu(w.y,T.y,v,g)),t.emit("pan"));var D=o.startZoom,E=o.zoom,M=E!=null&&i;M&&(Dl(D,E)&&(a.zoom=zl(a.minZoom,tu(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],R=A.name,N=A,L=o.startStyle[R],P=c.properties[L.name],z=tu(L,N,v,g,P);c.overrideBypass(t,R,z)}t.emit("style")}}return o.progress=v,v}function Dl(t,e){return t==null||e==null?!1:Te(t)&&Te(e)?!0:!!(t&&e)}function eL(t,e,r,i){var n=e._private;n.started=!0,n.startTime=r-n.progress*n.duration}function kx(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||eL(c,b,t),JB(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 tL={animate:Vt.animate(),animation:Vt.animation(),animated:Vt.animated(),clearQueue:Vt.clearQueue(),delay:Vt.delay(),delayAnimation:Vt.delayAnimation(),stop:Vt.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&&yh(function(a){kx(a,e),r()})}var i=e.renderer();i&&i.beforeRender?i.beforeRender(function(a,o){kx(o,e)},i.beforeRenderPriorities.animations):r()}},rL={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&&Gl(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}},th=function(e){return Ue(e)?new Qa(e):e},sS={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Vh(rL,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,i){return this.emitter().on(e,th(r),i),this},removeListener:function(e,r,i){return this.emitter().removeListener(e,th(r),i),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,i){return this.emitter().one(e,th(r),i),this},once:function(e,r,i){return this.emitter().one(e,th(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}};Vt.eventAliasesOn(sS);var e0={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)}};e0.jpeg=e0.jpg;var dh={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(We({},e,{cy:r,eles:a}));return o}};dh.createLayout=dh.makeLayout=dh.layout;var iL={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)}})}},nL=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]}),t0={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&&Ht("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=nL(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)}};t0.invalidateDimensions=t0.resize;var fh={collection:function(e,r){return Ue(e)?this.$(e):Hi(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}};fh.elements=fh.filter=fh.$;var Ur={},Rl="t",aL="f";Ur.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};Ur.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]===Rl,d=e[u]===Rl,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]===Rl;if(T&&(y=w.properties[v.name]!=null,y))break}!s[m]&&!y&&(s[m]=!0,o.push(m))}}}return i[n]=o,o};Ur.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+=Rl:r+=aL}return i=e.getPropertiesDiff(n,r),t._private.styleCxtKey=r,{key:r,diffPropNames:i,empty:i.length===0}};Ur.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]===Rl;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};Ur.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}};Ur.updateStyleHints=function(t){var e=t._private,r=this,i=r.propertyGroupNames,n=r.propertyGroupKeys,a=function(ee,oe,_e){return r.getPropertiesHash(ee,oe,_e)},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]=[Vo,ou]}for(var d=function(ee,oe){return e.styleKeys[oe][0]=Fl(ee,e.styleKeys[oe][0])},f=function(ee,oe){return e.styleKeys[oe][1]=Bl(ee,e.styleKeys[oe][1])},p=function(ee,oe){d(ee,oe),f(ee,oe)},h=function(ee,oe){for(var _e=0;_e<ee.length;_e++){var Re=ee.charCodeAt(_e);d(Re,oe),f(Re,oe)}},g=2e9,v=function(ee){return-128<ee&&ee<128&&Math.floor(ee)!==ee?g-(ee*1024|0):ee},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 R=[Vo,ou],N=0;N<n.length;N++){var L=n[N],P=e.styleKeys[L];R[0]=Fl(P[0],R[0]),R[1]=Bl(P[1],R[1])}e.styleKey=CN(R[0],R[1]);var z=e.styleKeys;e.labelDimsKey=Ha(z.labelDimensions);var G=a(t,["label"],z.labelDimensions);if(e.labelKey=Ha(G),e.labelStyleKey=Ha(Gf(z.commonLabel,G)),!s){var Y=a(t,["source-label"],z.labelDimensions);e.sourceLabelKey=Ha(Y),e.sourceLabelStyleKey=Ha(Gf(z.commonLabel,Y));var V=a(t,["target-label"],z.labelDimensions);e.targetLabelKey=Ha(V),e.targetLabelStyleKey=Ha(Gf(z.commonLabel,V))}if(s){var W=e.styleKeys,ce=W.nodeBody,he=W.nodeBorder,de=W.nodeOutline,me=W.backgroundImage,Ce=W.compound,Se=W.pie,le=W.stripe,q=[ce,he,de,me,Ce,Se,le].filter(function(Q){return Q!=null}).reduce(Gf,[Vo,ou]);e.nodeKey=Ha(q),e.hasPie=Se!=null&&Se[0]!==Vo&&Se[1]!==ou,e.hasStripe=le!=null&&le[0]!==Vo&&le[1]!==ou}return o!==e.styleKey};Ur.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};Ur.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(ce){return ce==null?null:ce.pfValue!=null?ce.pfValue:ce.value},h=function(){var ce=p(l),he=p(i);r.checkTriggers(t,i.name,ce,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(){Ht("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 Ht("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],R=[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:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[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 L=i.field.split("."),P=d.data,z=0;z<L.length&&P;z++){var G=L[z];P=P[G]}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 Y=i.value,V=i.fnValue!=null?i.fnValue:Y(t);if(i.prevFnValue=V,V==null)return Ht("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 Ht("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=jn(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};Ur.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)}}};Ur.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()};Ur.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 Cu(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)};Ur.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)};Ur.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)})};Ur.checkBoundsTrigger=function(t,e,r,i){this.checkTrigger(t,e,r,i,function(n){return n.triggersBounds},function(n){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};Ur.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()})})};Ur.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()})})};Ur.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 ec={};ec.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(kt(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[Ih(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,jn(D))||y,i&&(x.next=w.pstyle(D.name))}y&&this.updateStyleHints(w),i&&this.updateTransitions(w,T,o)}return y};ec.overrideBypass=function(t,e,r){e=h0(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)}};ec.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)};ec.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 k0={};k0.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1};k0.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 $n={};$n.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)};$n.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[Ih(a.name)]=o)}return i}};$n.getIndexedStyle=function(t,e,r,i){var n=t.pstyle(e)[r][i];return n??t.cy().style().getDefaultProperty(e)[r][0]};$n.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}};$n.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&&(kt(o)?o=this.parse(a,o.strValue):o=this.parse(a,o)),o&&(r[a]=o)}return r};$n.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[h0(s)],c=this.parse(l.name,u);c&&r.push(c)}return r};$n.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]=Fl(s,i[0]),i[1]=Bl(s,i[1]);else for(o=a.strValue,l=0;l<o.length;l++)s=o.charCodeAt(l),i[0]=Fl(s,i[0]),i[1]=Bl(s,i[1]);return i};$n.getPropertiesHash=$n.getNonDefaultPropertiesHash;var jh={};jh.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};jh.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e};jh.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 M0={};M0.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){Ht("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){Ht("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){Ht("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){Ht("Skipping property: Invalid property name in: "+o),u();continue}var T=r.parse(y,b);if(!T){Ht("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};M0.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};var Tr={};(function(){var t=Ar,e=QP,r=eN,i=tN,n=rN,a=function(Q){return"^"+Q+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},o=function(Q){var ee=t+"|\\w+|"+e+"|"+r+"|"+i+"|"+n;return"^"+Q+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+ee+")\\s*\\,\\s*("+ee+")\\)$"},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(Q,ee){switch(Q.length){case 2:return ee[0]!=="deg"&&ee[0]!=="rad"&&ee[1]!=="deg"&&ee[1]!=="rad";case 1:return Ue(Q[0])||ee[0]==="deg"||ee[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(Q){var ee=Q.length;return ee===1||ee===2||ee===4}}};var u={zeroNonZero:function(Q,ee){return(Q==null||ee==null)&&Q!==ee||Q==0&&ee!=0?!0:Q!=0&&ee==0},any:function(Q,ee){return Q!=ee},emptyNonEmpty:function(Q,ee){var oe=Ka(Q),_e=Ka(ee);return oe&&!_e||!oe&&_e}},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(Q,ee,oe){return Q===ee?!1:oe.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(Q,ee){return ee.value==="label"?-Q.poolIndex():ee.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(Q,ee){return Q===ee?!1:Q==="bezier"||ee==="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 R=1;R<=Tr.pieBackgroundN;R++)A.push({name:"pie-"+R+"-background-color",type:l.color}),A.push({name:"pie-"+R+"-background-size",type:l.percent}),A.push({name:"pie-"+R+"-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 L=1;L<=Tr.stripeBackgroundN;L++)N.push({name:"stripe-"+L+"-background-color",type:l.color}),N.push({name:"stripe-"+L+"-background-size",type:l.percent}),N.push({name:"stripe-"+L+"-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(Q){var ee=Q+"-"+q.name,oe=q.type,_e=q.triggersBounds;P.push({name:ee,type:oe,triggersBounds:_e})})},{});var G=Tr.properties=[].concat(g,b,v,m,y,k,h,p,c,d,f,T,x,_,D,A,N,E,M,P,I),Y=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(Y);W.forEach(function(q){V[q]=Y[q].map(function(Q){return Q.name}),Y[q].forEach(function(Q){return Q.groupKey=q})});var ce=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=G.map(function(q){return q.name});for(var he=0;he<G.length;he++){var de=G[he];G[de.name]=de}for(var me=0;me<ce.length;me++){var Ce=ce[me],Se=G[Ce.pointsTo],le={name:Ce.name,alias:!0,pointsTo:Se};G.push(le),G[Ce.name]=le}})();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=We({"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 $h={};$h.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=gT(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=jn(c),c&&(c.value=jn(c.value))),c};$h.parseImplWarn=function(t,e,r,i){var n=this.parseImpl(t,e,r,i);return!n&&e!=null&&Ht("The style property `".concat(t,": ").concat(e,"` is invalid")),n&&(n.name==="width"||n.name==="height")&&e==="label"&&Ht("The style value of `label` is deprecated for `"+n.name+"`"),n};$h.parseImpl=function(t,e,r,i){var n=this;t=h0(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 Ht("`"+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 le=0;le<l.enums.length;le++){var q=l.enums[le];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 R="px|em"+(l.allowPercent?"|\\%":"");I&&(R=I);var N=e.match("^("+Ar+")("+R+")?$");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&&!qP(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 L={name:t,value:e,strValue:""+e+(I||""),units:I,bypass:r};return l.unitless||I!=="px"&&I!=="em"?L.pfValue=e:L.pfValue=I==="px"||!I?e:this.getEmSizeInPixels()*e,(I==="ms"||I==="s")&&(L.pfValue=I==="ms"?e:1e3*e),(I==="deg"||I==="rad")&&(L.pfValue=I==="rad"?e:tF(e)),I==="%"&&(L.pfValue=e/100),L}else if(l.propList){var P=[],z=""+e;if(z!=="none"){for(var G=z.split(/\s*,\s*|\s+/),Y=0;Y<G.length;Y++){var V=G[Y].trim();n.properties[V]?P.push(V):Ht("`"+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=cT(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 ce=k();if(ce)return ce}for(var he=l.regexes?l.regexes:[l.regex],de=0;de<he.length;de++){var me=new RegExp(he[de]),Ce=me.exec(e);if(Ce)return{name:t,value:l.singleRegexMatchValue?Ce[1]:Ce,strValue:""+e,bypass:r}}return null}else return l.string?{name:t,value:""+e,strValue:""+e,bypass:r}:l.enums?k():null};var Hr=function(e){if(!(this instanceof Hr))return new Hr(e);if(!f0(e)){ar("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},oi=Hr.prototype;oi.instanceString=function(){return"style"};oi.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};oi.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this};oi.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)};oi.selector=function(t){var e=t==="core"?null:new Qa(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this};oi.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[Ih(n.name)]),a!==void 0&&this.cssRule(n.name,a)}else e.length===2&&this.cssRule(e[0],e[1]);return this};oi.style=oi.css;oi.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};oi.append=function(t){return sT(t)?t.appendToStyle(this):Zt(t)?this.appendFromJson(t):Ue(t)&&this.appendFromString(t),this};Hr.fromJson=function(t,e){var r=new Hr(t);return r.fromJson(e),r};Hr.fromString=function(t,e){return new Hr(t).fromString(e)};[Ur,ec,k0,$n,jh,M0,Tr,$h].forEach(function(t){We(oi,t)});Hr.types=oi.types;Hr.properties=oi.properties;Hr.propertyGroups=oi.propertyGroups;Hr.propertyGroupNames=oi.propertyGroupNames;Hr.propertyGroupKeys=oi.propertyGroupKeys;var oL={style:function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},setStyle:function(e){var r=this._private;return sT(e)?r.style=e.generateStyle(this):Zt(e)?r.style=Hr.fromJson(this,e):Ue(e)?r.style=Hr.fromString(this,e):r.style=Hr(this),r.style},updateStyle:function(){this.mutableElements().updateStyle()}},sL="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=sL),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(kt(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:kt(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(YP(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 Hi(e)||(e=this.mutableElements());if(!(Hi(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:kt(e)&&(o=e.level,e.position!=null?a=Rh(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),kt(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 Hi(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 jl={data:Vt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Vt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Vt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Vt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};jl.attr=jl.data;jl.removeAttr=jl.removeData;var $l=function(e){var r=this;e=We({},e);var i=e.container;i&&!gh(i)&&gh(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=We({name:o?"grid":"null"},s.layout),s.renderer=We({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:kt(s.pan)&&Te(s.pan.x)?s.pan.x:0,y:kt(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(KP);if(v)return Cu.all(h).then(g);g(h)};l.styleEnabled&&r.setStyle([]);var d=We({},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&&(kt(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=We({},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)})},Th=$l.prototype;We(Th,{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!gh(e)&&gh(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),i.container=e,i.styleEnabled=!0,r.invalidateSize(),r.initRenderer(We({},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 jn(this._private.options)},json:function(e){var r=this,i=r._private,n=r.mutableElements(),a=function(w){return r.getElementById(w.id())};if(kt(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){Ht("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],R=A.ele,N=A.json;R.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=jn(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=jn(i.pan),m.boxSelectionEnabled=i.boxSelectionEnabled,m.renderer=jn(y.renderer),m.hideEdgesOnViewport=y.hideEdgesOnViewport,m.textureOnViewport=y.textureOnViewport,m.wheelSensitivity=y.wheelSensitivity,m.motionBlur=y.motionBlur,m.multiClickDebounceTime=y.multiClickDebounceTime,m}}});Th.$id=Th.getElementById;[ZB,tL,sS,e0,dh,iL,t0,fh,oL,Wo,jl].forEach(function(t){We(Th,t)});var uL={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}},lL={maximal:!1,acyclic:!1},ru=function(e){return e.scratch("breadthfirst")},Mx=function(e,r){return e.scratch("breadthfirst",r)};function uS(t){this.options=We({},uL,lL,t)}uS.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,i=r.nodes().filter(function($e){return $e.isChildless()}),n=r,a=t.directed,o=t.acyclic||t.maximal||t.maximalAdjustments>0,s=!!t.boundingBox,u=pi(s?t.boundingBox:structuredClone(e.extent())),l;if(Hi(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),Mx(Ee,{index:ze,depth:He})},w=function(Ee,He){var ze=ru(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}Mx(et,{depth:Ee,index:ze})}},E=function(Ee,He){for(var ze=ru(Ee),et=Ee.incomers().filter(function(fe){return fe.isNode()&&r.has(fe)}),Ye=-1,ct=Ee.id(),gt=0;gt<et.length;gt++){var Bt=et[gt],Mt=ru(Bt);Ye=Math.max(Ye,Mt.depth)}if(ze.depth<=Ye){if(!t.acyclic&&He[ct])return null;var Tt=Ye+1;return w(Ee,Tt),He[ct]=Tt,!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($e){return M.push($e)});M.length>0;){var R=A(),N=E(R,k);if(N)R.outgoers().filter(function($e){return $e.isNode()&&r.has($e)}).forEach(I);else if(N===null){Ht("Detected double maximal shift for node `"+R.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var L=0;if(t.avoidOverlap)for(var P=0;P<i.length;P++){var z=i[P],G=z.layoutDimensions(t),Y=G.w,V=G.h;L=Math.max(L,Y,V)}var W={},ce=function(Ee){if(W[Ee.id()])return W[Ee.id()];for(var He=ru(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 Bt=ru(gt);if(Bt!=null){var Mt=Bt.index,Tt=Bt.depth;if(!(Mt==null||Tt==null)){var fe=m[Tt].length;Tt<He&&(et+=Mt/fe,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=ce(Ee),et=ce(He),Ye=ze-et;return Ye===0?lT(Ee.id(),He.id()):Ye};t.depthSort!==void 0&&(he=t.depthSort);for(var de=m.length,me=0;me<de;me++)m[me].sort(he),D(me);for(var Ce=[],Se=0;Se<T.length;Se++)Ce.push(T[Se]);var le=function(){for(var Ee=0;Ee<de;Ee++)D(Ee)};Ce.length&&(m.unshift(Ce),de=m.length,le());for(var q=0,Q=0;Q<de;Q++)q=Math.max(m[Q].length,q);var ee={x:u.x1+u.w/2,y:u.y1+u.h/2},oe=i.reduce(function($e,Ee){return(function(He){return{w:$e.w===-1?He.w:($e.w+He.w)/2,h:$e.h===-1?He.h:($e.h+He.h)/2}})(Ee.boundingBox({includeLabels:t.nodeDimensionsIncludeLabels}))},{w:-1,h:-1}),_e=Math.max(de===1?0:s?(u.h-t.padding*2-oe.h)/(de-1):(u.h-t.padding*2-oe.h)/(de+1),L),Re=m.reduce(function($e,Ee){return Math.max($e,Ee.length)},0),vt=function(Ee){var He=ru(Ee),ze=He.depth,et=He.index;if(t.circle){var Ye=Math.min(u.w/2/de,u.h/2/de);Ye=Math.max(Ye,L);var ct=Ye*ze+Ye-(de>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:ee.x+ct*Math.cos(gt),y:ee.y+ct*Math.sin(gt)}}else{var Bt=m[ze].length,Mt=Math.max(Bt===1?0:s?(u.w-t.padding*2-oe.w)/((t.grid?Re:Bt)-1):(u.w-t.padding*2-oe.w)/((t.grid?Re:Bt)+1),L),Tt={x:ee.x+(et+1-(Bt+1)/2)*Mt,y:ee.y+(ze+1-(de+1)/2)*_e};return Tt}},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 TN(vt(Ee),u,Je[t.direction])};return r.nodes().layoutPositions(this,t,Ge),this};var cL={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 lS(t){this.options=We({},cL,t)}lS.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=pi(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 dL={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 cS(t){this.options=We({},dL,t)}cS.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=pi(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(_e,Re){return Re.value-_e.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,R=I.dTheta=A/Math.max(1,I.length-1);if(I.length>1&&e.avoidOverlap){var N=Math.cos(R)-Math.cos(0),L=Math.sin(R)-Math.sin(0),P=Math.sqrt(x*x/(N*N+L*L));M=Math.max(P,M)}I.r=M,M+=x}if(e.equidistant){for(var z=0,G=0,Y=0;Y<m.length;Y++){var V=m[Y],W=V.r-G;z=Math.max(z,W)}G=0;for(var ce=0;ce<m.length;ce++){var he=m[ce];ce===0&&(G=he.r),he.r=G,G+=z}}for(var de={},me=0;me<m.length;me++)for(var Ce=m[me],Se=Ce.dTheta,le=Ce.r,q=0;q<Ce.length;q++){var Q=Ce[q],ee=e.startAngle+(r?1:-1)*Se*q,oe={x:s.x+le*Math.cos(ee),y:s.y+le*Math.sin(ee)};de[Q.node.id()]=oe}return n.nodes().layoutPositions(this,e,function(_e){var Re=_e.id();return de[Re]}),this};var Fg,fL={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 qh(t){this.options=We({},fL,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)}qh.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?Fg=!0:Fg=!1;var i=hL(e,r,t);Fg&&vL(i),t.randomize&&mL(i);var n=ha(),a=function(){gL(i,e,t),t.fit===!0&&e.fit(t.padding)},o=function(f){return!(r.stopped||f>=t.numIter||(yL(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=fS(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)Ax(i,t),s();else{var p=ha();p-n>=t.animationThreshold&&a(),yh(c)}};c()}else{for(;l;)l=o(u),u++;Ax(i,t),s()}return this};qh.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};qh.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var hL=function(e,r,i){for(var n=i.eles.edges(),a=i.eles.nodes(),o=pi(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,R=cr(i.edgeElasticity)?i.edgeElasticity(k):i.edgeElasticity,N=s.idToIndex[I.sourceId],L=s.idToIndex[I.targetId],P=s.indexToGraph[N],z=s.indexToGraph[L];if(P!=z){for(var G=pL(I.sourceId,I.targetId,s),Y=s.graphSet[G],V=0,v=s.layoutNodes[N];Y.indexOf(v.id)===-1;)v=s.layoutNodes[s.idToIndex[v.parentId]],V++;for(v=s.layoutNodes[L];Y.indexOf(v.id)===-1;)v=s.layoutNodes[s.idToIndex[v.parentId]],V++;A*=V*i.nestingFactor}I.idealLength=A,I.elasticity=R,s.layoutEdges.push(I)}return s},pL=function(e,r,i){var n=dS(e,r,0,i);return 2>n.count?0:n.graph},dS=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=dS(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}},vL,mL=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)}},fS=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}}},gL=function(e,r,i){var n=i.layout,a=i.eles.nodes(),o=fS(e,i,a);a.positions(o),e.ready!==!0&&(e.ready=!0,n.one("layoutready",i.ready),n.emit({type:"layoutready",layout:this}))},yL=function(e,r,i){bL(e,r),_L(e),xL(e,r),TL(e),SL(e)},bL=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]]];CL(s,l,e,r)}},Ix=function(e){return-e+2*e*Math.random()},CL=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=Ix(l),u=Ix(l));var c=wL(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=Sh(e,s,u),v=Sh(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)}},wL=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},Sh=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)},_L=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=Sh(o,l,c),f=Sh(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)}}},xL=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}}}}},TL=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}}},SL=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=DL(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,hS(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)}},DL=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},hS=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 hS(n,r)}},Ax=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)}}},EL={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 pS(t){this.options=We({},EL,t)}pS.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=pi(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(ce){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 de=Math.min(u,l);de==u?u=he:l=he},d=function(he){if(he==null)return Math.max(u,l);var de=Math.max(u,l);de==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,de){return!!k["c-"+he+"-"+de]},A=function(he,de){k["c-"+he+"-"+de]=!0},R=0,N=0,L=function(){N++,N>=l&&(N=0,R++)},P={},z=0;z<n.length;z++){var G=n[z],Y=e.position(G);if(Y&&(Y.row!==void 0||Y.col!==void 0)){var V={row:Y.row,col:Y.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[G.id()]=V,A(V.row,V.col)}}var W=function(he,de){var me,Ce;if(he.locked()||he.isParent())return!1;var Se=P[he.id()];if(Se)me=Se.col*y+y/2+a.x1,Ce=Se.row*b+b/2+a.y1;else{for(;I(R,N);)L();me=N*y+y/2+a.x1,Ce=R*b+b/2+a.y1,A(R,N),L()}return{x:me,y:Ce}};n.layoutPositions(this,e,W)}return this};var kL={ready:function(){},stop:function(){}};function I0(t){this.options=We({},kL,t)}I0.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};I0.prototype.stop=function(){return this};var ML={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 vS(t){this.options=We({},ML,t)}vS.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 ZN(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 IL={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 mS(t){this.options=We({},IL,t)}mS.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,i=pi(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 AL=[{name:"breadthfirst",impl:uS},{name:"circle",impl:lS},{name:"concentric",impl:cS},{name:"cose",impl:qh},{name:"grid",impl:pS},{name:"null",impl:I0},{name:"preset",impl:vS},{name:"random",impl:mS}];function gS(t){this.options=t,this.notifications=0}var Ox=function(){},Rx=function(){throw new Error("A headless instance can not render images")};gS.prototype={recalculateRenderedStyle:Ox,notify:function(){this.notifications++},init:Ox,isHeadless:function(){return!0},png:Rx,jpg:Rx};var A0={};A0.arrowShapeWidth=.3;A0.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]=We({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=ki(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:bh,roughCollide:bh,draw:m0,spacing:Gw,gap:Gw}),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=ki(l,c,v)||ki(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 ki(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=ki(l,c,v)||ki(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 Yo={};Yo.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]};Yo.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]};Yo.invalidateContainerClientCoordsCache=function(){this.containerBB=null};Yo.findNearestElement=function(t,e,r,i){return this.findNearestElements(t,e,r,i)[0]};Yo.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,R=_._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,R))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,R=I*2,z=D.source,G=D.target,N;if(E.edgeType==="segments"||E.edgeType==="straight"||E.edgeType==="haystack"){for(var L=E.allpts,P=0;P+3<L.length;P+=2)if(cF(t,e,L[P],L[P+1],L[P+2],L[P+3],R)&&A>(N=vF(t,e,L[P],L[P+1],L[P+2],L[P+3])))return v(_,N),!0}else if(E.edgeType==="bezier"||E.edgeType==="multibezier"||E.edgeType==="self"||E.edgeType==="compound"){for(var L=E.allpts,P=0;P+5<E.allpts.length;P+=4)if(dF(t,e,L[P],L[P+1],L[P+2],L[P+3],L[P+4],L[P+5],R)&&A>(N=pF(t,e,L[P],L[P+1],L[P+2],L[P+3],L[P+4],L[P+5])))return v(_,N),!0}for(var z=z||D.source,G=G||D.target,Y=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],ce=a.arrowShapes[_.pstyle(W.name+"-arrow-shape").value],he=_.pstyle("width").pfValue;if(ce.roughCollide(t,e,Y,W.angle,{x:W.x,y:W.y},he,c)&&ce.collide(t,e,Y,W.angle,{x:W.x,y:W.y},he,c))return v(_),!0}l&&s.length>0&&(m(z),m(G))}function b(_,D,E){return hi(_,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,R=_.pstyle("text-events").strValue==="yes";if(!(!R||!A)){var N=b(E.rscratch,"labelX",D),L=b(E.rscratch,"labelY",D),P=b(E.rscratch,"labelAngle",D),z=_.pstyle(k+"text-margin-x").pfValue,G=_.pstyle(k+"text-margin-y").pfValue,Y=I.x1-M-z,V=I.x2+M-z,W=I.y1-M-G,ce=I.y2+M-G;if(P){var he=Math.cos(P),de=Math.sin(P),me=function(oe,_e){return oe=oe-N,_e=_e-L,{x:oe*he-_e*de+N,y:oe*de+_e*he+L}},Ce=me(Y,W),Se=me(Y,ce),le=me(V,W),q=me(V,ce),Q=[Ce.x+z,Ce.y+G,le.x+z,le.y+G,q.x+z,q.y+G,Se.x+z,Se.y+G];if(ki(t,e,Q))return v(_),!0}else if(qa(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};Yo.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=pi({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(oe,_e,Re){return hi(oe,_e,Re)}function v(oe,_e){var Re=oe._private,vt=o,Je="";oe.boundingBox();var Ge=Re.labelBounds.main;if(!Ge)return null;var $e=g(Re.rscratch,"labelX",_e),Ee=g(Re.rscratch,"labelY",_e),He=g(Re.rscratch,"labelAngle",_e),ze=oe.pstyle(Je+"text-margin-x").pfValue,et=oe.pstyle(Je+"text-margin-y").pfValue,Ye=Ge.x1-vt-ze,ct=Ge.x2+vt-ze,gt=Ge.y1-vt-et,Bt=Ge.y2+vt-et;if(He){var Mt=Math.cos(He),Tt=Math.sin(He),fe=function(H,K){return H=H-$e,K=K-Ee,{x:H*Mt-K*Tt+$e,y:H*Tt+K*Mt+Ee}};return[fe(Ye,gt),fe(ct,gt),fe(ct,Bt),fe(Ye,Bt)]}else return[{x:Ye,y:gt},{x:ct,y:gt},{x:ct,y:Bt},{x:Ye,y:Bt}]}function m(oe,_e,Re,vt){function Je(Ge,$e,Ee){return(Ee.y-Ge.y)*($e.x-Ge.x)>($e.y-Ge.y)*(Ee.x-Ge.x)}return Je(oe,Re,vt)!==Je(_e,Re,vt)&&Je(oe,_e,Re)!==Je(oe,_e,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&&Pm(k,p)&&(s.push(w),M=!0)}!M&&TT(f,E)&&s.push(w)}else if(x==="overlap"&&C0(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(Pm(A,p))s.push(w);else{var R=v(w);R&&Pm(R,p)&&s.push(w)}}}else{var N=b,L=N._private,P=L.rscratch,z=N.pstyle("box-selection").strValue;if(z==="none")continue;if(z==="contain"){if(P.startX!=null&&P.startY!=null&&!qa(f,P.startX,P.startY)||P.endX!=null&&P.endY!=null&&!qa(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 G=L.rstyle.bezierPts||L.rstyle.linePts||L.rstyle.haystackPts,Y=!0,V=0;V<G.length;V++)if(!Qw(f,G[V])){Y=!1;break}Y&&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&&(qa(f,P.startX,P.startY)||qa(f,P.endX,P.endY)))s.push(N),W=!0;else if(!W&&P.edgeType==="haystack"){for(var ce=L.rstyle.haystackPts,he=0;he<ce.length;he++)if(Qw(f,ce[he])){s.push(N),W=!0;break}}if(!W){var de=L.rstyle.bezierPts||L.rstyle.linePts||L.rstyle.haystackPts;if((!de||de.length<2)&&P.edgeType==="straight"&&P.startX!=null&&P.startY!=null&&P.endX!=null&&P.endY!=null&&(de=[{x:P.startX,y:P.startY},{x:P.endX,y:P.endY}]),!de||de.length<2)continue;for(var me=0;me<de.length-1;me++){for(var Ce=de[me],Se=de[me+1],le=0;le<h.length;le++){var q=Sr(h[le],2),Q=q[0],ee=q[1];if(m(Ce,Se,Q,ee)){s.push(N),W=!0;break}}if(W)break}}}}}return s};var Dh={};Dh.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=Vr(h[0],h[2],h[4],.1),v=Vr(h[1],h[3],h[5],.1);u=c-g,l=d-v}else u=c-m,l=d-y;e.srcArrowAngle=Yf(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=Vr(h[M],h[k],h[I],0),_=Vr(h[M+1],h[k+1],h[I+1],0),D=Vr(h[M],h[k],h[I],1e-4),E=Vr(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=Vr(h[M],h[k],h[I],.4999),_=Vr(h[M+1],h[k+1],h[I+1],.4999),D=Vr(h[M],h[k],h[I],.5),E=Vr(h[M+1],h[k+1],h[I+1],.5)}u=D-x,l=E-_}if(e.midtgtArrowAngle=Yf(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=Yf(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,R=h.length,g=Vr(h[R-6],h[R-4],h[R-2],.9),v=Vr(h[R-5],h[R-3],h[R-1],.9);u=f-g,l=p-v}else u=f-m,l=p-y;e.tgtArrowAngle=Yf(u,l)};Dh.getArrowWidth=Dh.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 r0,i0,Hn={},Zi={},Px,Nx,Ho,hh,da,No,zo,zn,iu,rh,yS,bS,n0,a0,Fx,Bx=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)},OL=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},RL=function(e,r,i,n,a){if(e!==Fx?Bx(r,e,Hn):OL(Zi,Hn),Bx(r,i,Zi),Px=Hn.nx*Zi.ny-Hn.ny*Zi.nx,Nx=Hn.nx*Zi.nx-Hn.ny*-Zi.ny,da=Math.asin(Math.max(-1,Math.min(1,Px))),Math.abs(da)<1e-6){r0=r.x,i0=r.y,zo=iu=0;return}Ho=1,hh=!1,Nx<0?da<0?da=Math.PI+da:(da=Math.PI-da,Ho=-1,hh=!0):da>0&&(Ho=-1,hh=!0),r.radius!==void 0?iu=r.radius:iu=n,No=da/2,rh=Math.min(Hn.len/2,Zi.len/2),a?(zn=Math.abs(Math.cos(No)*iu/Math.sin(No)),zn>rh?(zn=rh,zo=Math.abs(zn*Math.sin(No)/Math.cos(No))):zo=iu):(zn=Math.min(rh,iu),zo=Math.abs(zn*Math.sin(No)/Math.cos(No))),n0=r.x+Zi.nx*zn,a0=r.y+Zi.ny*zn,r0=n0-Zi.ny*zo*Ho,i0=a0+Zi.nx*zo*Ho,yS=r.x+Hn.nx*zn,bS=r.y+Hn.ny*zn,Fx=r};function CS(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 O0(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}:(RL(t,e,r,i,n),{cx:r0,cy:i0,radius:zo,startX:yS,startY:bS,stopX:n0,stopY:a0,startAngle:Hn.ang+Math.PI/2*Ho,endAngle:Zi.ang-Math.PI/2*Ho,counterClockwise:hh})}var ql=.01,PL=Math.sqrt(2*ql),si={};si.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 Ht("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}};si.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)}};si.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")}};si.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)]};si.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]};si.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"};si.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=b0(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)}};si.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(K,ie){return K>0?Math.max(K-ie,0):Math.min(K+ie,0)},A=I(M,D),R=I(k,E),N=!1;y===l?m=Math.abs(A)>Math.abs(R)?n:i:y===u||y===s?(m=i,N=!0):(y===a||y===o)&&(m=n,N=!0);var L=m===i,P=L?R:A,z=L?k:M,G=b0(z),Y=!1;!(N&&(w||x))&&(y===s&&z<0||y===u&&z>0||y===a&&z>0||y===o&&z<0)&&(G*=-1,P=G*Math.abs(P),Y=!0);var V;if(w){var W=T<0?1+T:T;V=W*P}else{var ce=T<0?P:0;V=ce+T*G}var he=function(K){return Math.abs(K)<_||Math.abs(K)>=Math.abs(P)},de=he(V),me=he(Math.abs(P)-Math.abs(V)),Ce=de||me;if(Ce&&!Y)if(L){var Se=Math.abs(z)<=f/2,le=Math.abs(M)<=p/2;if(Se){var q=(c.x1+c.x2)/2,Q=c.y1,ee=c.y2;r.segpts=[q,Q,q,ee]}else if(le){var oe=(c.y1+c.y2)/2,_e=c.x1,Re=c.x2;r.segpts=[_e,oe,Re,oe]}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,$e=c.x1,Ee=c.x2;r.segpts=[$e,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(L){var Ye=c.y1+V+(v?f/2*G:0),ct=c.x1,gt=c.x2;r.segpts=[ct,Ye,gt,Ye]}else{var Bt=c.x1+V+(v?d/2*G:0),Mt=c.y1,Tt=c.y2;r.segpts=[Bt,Mt,Bt,Tt]}if(r.isRound){var fe=t.pstyle("taxi-radius").value,S=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(fe),r.isArcRadius=new Array(r.segpts.length/2).fill(S)}};si.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=$o({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),_=x<T,D=$o({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},R=Math.max(a,o),N={x:r.ctrlpts[0]+A.x*2*R,y:r.ctrlpts[1]+A.y*2*R},L=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]=L[0]+A.x*T,r.ctrlpts[1]=L[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),G={x:P.x/z,y:P.y/z},Y=Math.max(a,o),V={x:r.ctrlpts[0]+G.x*2*Y,y:r.ctrlpts[1]+G.y*2*Y},W=c.intersectLine(n.x,n.y,s,u,V.x,V.y,0,f,h);E?(r.ctrlpts[0]=r.ctrlpts[0]+G.x*(T-D),r.ctrlpts[1]=r.ctrlpts[1]+G.y*(T-D)):(r.ctrlpts[0]=W[0]+G.x*T,r.ctrlpts[1]=W[1]+G.y*T)}M&&this.findEndpoints(t)}};si.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=Vr(e.allpts[i],e.allpts[i+2],e.allpts[i+4],n),e.midY=Vr(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(O0({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}}}}};si.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,Ht("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."))};si.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,i=r.cy,n=i.hasCompoundNodes(),a=new fa,o=function(E,M){return[].concat(mh(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"||$a(f,"segments")||f==="straight"||f==="straight-triangle"||$a(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),R;if(!A.hasUnbundled){var N=A.eles[0].parallelEdges().filter(function(S){return S.isBundledBezier()});g0(A.eles),N.forEach(function(S){return A.eles.push(S)}),A.eles.sort(function(S,H){return S.poolIndex()-H.poolIndex()})}var L=A.eles[0],P=L.source(),z=L.target();if(P.poolIndex()>z.poolIndex()){var G=P;P=z,z=G}var Y=A.srcPos=P.position(),V=A.tgtPos=z.position(),W=A.srcW=P.outerWidth(),ce=A.srcH=P.outerHeight(),he=A.tgtW=z.outerWidth(),de=A.tgtH=z.outerHeight(),me=A.srcShape=r.nodeShapes[e.getNodeShape(P)],Ce=A.tgtShape=r.nodeShapes[e.getNodeShape(z)],Se=A.srcCornerRadius=P.pstyle("corner-radius").value==="auto"?"auto":P.pstyle("corner-radius").pfValue,le=A.tgtCornerRadius=z.pstyle("corner-radius").value==="auto"?"auto":z.pstyle("corner-radius").pfValue,q=A.tgtRs=z._private.rscratch,Q=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 ee=0;ee<A.eles.length;ee++){var oe=A.eles[ee],_e=oe[0]._private.rscratch,Re=oe.pstyle("curve-style").value,vt=Re==="unbundled-bezier"||$a(Re,"segments")||$a(Re,"taxi"),Je=!P.same(oe.source());if(!A.calculatedIntersection&&P!==z&&(A.hasBezier||A.hasUnbundled)){A.calculatedIntersection=!0;var Ge=me.intersectLine(Y.x,Y.y,W,ce,V.x,V.y,0,Se,Q),$e=A.srcIntn=Ge,Ee=Ce.intersectLine(V.x,V.y,he,de,Y.x,Y.y,0,le,q),He=A.tgtIntn=Ee,ze=A.intersectionPts={x1:Ge[0],x2:Ee[0],y1:Ge[1],y2:Ee[1]},et=A.posPts={x1:Y.x,x2:V.x,y1:Y.y,y2:V.y},Ye=Ee[1]-Ge[1],ct=Ee[0]-Ge[0],gt=Math.sqrt(ct*ct+Ye*Ye);Te(gt)&>>=PL||(gt=Math.sqrt(Math.max(ct*ct,ql)+Math.max(Ye*Ye,ql)));var Bt=A.vector={x:ct,y:Ye},Mt=A.vectorNorm={x:Bt.x/gt,y:Bt.y/gt},Tt={x:-Mt.y,y:Mt.x};A.nodesOverlap=!Te(gt)||Ce.checkPoint(Ge[0],Ge[1],0,he,de,V.x,V.y,le,q)||me.checkPoint(Ee[0],Ee[1],0,W,ce,Y.x,Y.y,Se,Q),A.vectorNormInverse=Tt,R={nodesOverlap:A.nodesOverlap,dirCounts:A.dirCounts,calculatedIntersection:!0,hasBezier:A.hasBezier,hasUnbundled:A.hasUnbundled,eles:A.eles,srcPos:V,srcRs:q,tgtPos:Y,tgtRs:Q,srcW:he,srcH:de,tgtW:W,tgtH:ce,srcIntn:He,tgtIntn:$e,srcShape:Ce,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:-Bt.x,y:-Bt.y},vectorNorm:{x:-Mt.x,y:-Mt.y},vectorNormInverse:{x:-Tt.x,y:-Tt.y}}}var fe=Je?R:A;_e.nodesOverlap=fe.nodesOverlap,_e.srcIntn=fe.srcIntn,_e.tgtIntn=fe.tgtIntn,_e.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(oe,fe,ee,vt):P===z?e.findLoopPoints(oe,fe,ee,vt):Re.endsWith("segments")?e.findSegmentsPoints(oe,fe):Re.endsWith("taxi")?e.findTaxiPoints(oe,fe):Re==="straight"||!vt&&A.eles.length%2===1&&ee===Math.floor(A.eles.length/2)?e.findStraightEdgePoints(oe):e.findBezierPoints(oe,fe,ee,vt,Je),e.findEndpoints(oe),e.tryToCorrectInvalidPoints(oe,fe),e.checkForInvalidEdgeWarning(oe),e.storeAllpts(oe),e.storeEdgeProjections(oe),e.calculateArrowAngles(oe),e.recalculateEdgeLabelProjections(oe),e.calculateLabelAngles(oe)}},_=0;_<s.length;_++)x();this.findHaystackPoints(u)}};function wS(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}}si.getSegmentPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="segments")return wS(e.segpts)};si.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 wS(e.ctrlpts)};si.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var tc={};tc.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)}};tc.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=$a(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,R=s.pstyle("corner-radius").value==="auto"?"auto":s.pstyle("corner-radius").pfValue,N=t.pstyle("target-endpoint"),L=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,Y,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],ce=(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]],de=_?[y.ctrlpts[y.ctrlpts.length-2],y.ctrlpts[y.ctrlpts.length-1]]:he;z=de,G=he}else if(D){var me=E?y.segpts.slice(0,2):[c.x+W[0],c.y+W[1]],Ce=E?y.segpts.slice(y.segpts.length-2):[l.x+ce[0],l.y+ce[1]];z=Ce,G=me}if(L==="inside-to-node")o=[c.x,c.y];else if(N.units)o=this.manualEndptToPx(u,N);else if(L==="outside-to-line")o=y.tgtIntn;else if(L==="outside-to-node"||L==="outside-to-node-or-label"?Y=z:(L==="outside-to-line"||L==="outside-to-line-or-label")&&(Y=[l.x,l.y]),o=a.nodeShapes[this.getNodeShape(u)].intersectLine(c.x,c.y,u.outerWidth(),u.outerHeight(),Y[0],Y[1],0,P,v),L==="outside-to-node-or-label"||L==="outside-to-line-or-label"){var Se=u._private.rscratch,le=Se.labelWidth,q=Se.labelHeight,Q=Se.labelX,ee=Se.labelY,oe=le/2,_e=q/2,Re=u.pstyle("text-valign").value;Re=yu(Re),Re==="top"?ee-=_e:Re==="bottom"&&(ee+=_e);var vt=u.pstyle("text-halign").value;vt=gu(vt),vt==="left"?Q-=oe:vt==="right"&&(Q+=oe);var Je=Vl(Y[0],Y[1],[Q-oe,ee-_e,Q+oe,ee-_e,Q+oe,ee+_e,Q-oe,ee+_e],c.x,c.y);if(Je.length>0){var Ge=l,$e=Lo(Ge,su(o)),Ee=Lo(Ge,su(Je)),He=$e;if(Ee<$e&&(o=Je,He=Ee),Je.length>2){var ze=Lo(Ge,{x:Je[2],y:Je[3]});ze<He&&(o=[Je[2],Je[3]])}}}var et=Kf(o,z,a.arrowShapes[d].spacing(t)+p),Ye=Kf(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=G:(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,R,g),A==="outside-to-node-or-label"||A==="outside-to-line-or-label"){var ct=s._private.rscratch,gt=ct.labelWidth,Bt=ct.labelHeight,Mt=ct.labelX,Tt=ct.labelY,fe=gt/2,S=Bt/2,H=s.pstyle("text-valign").value;H=yu(H),H==="top"?Tt-=S:H==="bottom"&&(Tt+=S);var K=s.pstyle("text-halign").value;K=gu(K),K==="left"?Mt-=fe:K==="right"&&(Mt+=fe);var ie=Vl(V[0],V[1],[Mt-fe,Tt-S,Mt+fe,Tt-S,Mt+fe,Tt+S,Mt-fe,Tt+S],l.x,l.y);if(ie.length>0){var ue=c,Ne=Lo(ue,su(o)),ve=Lo(ue,su(ie)),De=Ne;if(ve<Ne&&(o=[ie[0],ie[1]],De=ve),ie.length>2){var ke=Lo(ue,{x:ie[2],y:ie[3]});ke<De&&(o=[ie[2],ie[3]])}}}var qe=Kf(o,G,a.arrowShapes[f].spacing(t)+h),tt=Kf(o,G,a.arrowShapes[f].gap(t)+h);y.startX=tt[0],y.startY=tt[1],y.arrowStartX=qe[0],y.arrowStartY=qe[1],M&&(!Te(y.startX)||!Te(y.startY)||!Te(y.endX)||!Te(y.endY)?y.badLine=!0:y.badLine=!1)};tc.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}};tc.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 R0={};function NL(t,e,r){for(var i=function(l,c,d,f){return Vr(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)})}}R0.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)NL(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};R0.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 _S=function(e,r){var i=Math.atan(r/e);return e===0&&i<0&&(i=i*-1),i},xS=function(e,r){var i=r.x-e.x,n=r.y-e.y;return _S(i,n)},FL=function(e,r,i,n){var a=zl(0,n-.001,1),o=zl(0,n+.001,1),s=cu(e,r,i,a),u=cu(e,r,i,o);return xS(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){Un(r.rscratch,d,f,p),Un(r.rstyle,d,f,p)};o("labelX",null,e.x),o("labelY",null,e.y);var s=_S(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=$o(D,E),A=_.segments[_.segments.length-1],R={p0:D,p1:E,t0:M,t1:k,startDist:A?A.startDist+A.length:0,length:I};_.segments.push(R),_.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=zl(0,I,1),e=cu(D.p0,D.p1,D.p2,I),f=FL(D.p0,D.p1,D.p2,I);break}case"straight":case"segments":case"haystack":{for(var A=0,R,N,L,P,z=i.allpts.length,G=0;G+3<z&&(p?(L={x:i.allpts[G],y:i.allpts[G+1]},P={x:i.allpts[G+2],y:i.allpts[G+3]}):(L={x:i.allpts[z-2-G],y:i.allpts[z-1-G]},P={x:i.allpts[z-4-G],y:i.allpts[z-3-G]}),R=$o(L,P),N=A,A+=R,!(A>=h));G+=2);var Y=h-N,V=Y/R;V=zl(0,V,1),e=iF(L,P,V),f=xS(L,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=jo(i,t._private.labelDimsKey);if(hi(r.rscratch,"prefixedLabelDimsKey",e)!==n){Un(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=hi(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;Un(r.rstyle,"labelWidth",e,f),Un(r.rscratch,"labelWidth",e,f),Un(r.rstyle,"labelHeight",e,p),Un(r.rscratch,"labelHeight",e,p),Un(r.rscratch,"labelLineHeight",e,d),Un(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(ce,he){return he?(Un(r.rscratch,ce,e,he),he):hi(r.rscratch,ce,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=Mi(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,R=this.calculateLabelDimensions(t,A),N=R.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 L=t.pstyle("text-max-width").pfValue,P="",z="\u2026",G=!1;if(this.calculateLabelDimensions(t,n).width<L)return n;for(var Y=0;Y<n.length;Y++){var V=this.calculateLabelDimensions(t,P+n[Y]+z).width;if(V>L)break;P+=n[Y],Y===n.length-1&&(G=!0)}return G||(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()?xB(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 TS={},Lx=28,zx=!1;TS.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<Lx||t.height()<Lx))return zx||(Ht("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),zx=!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 Wh={};Wh.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)};Wh.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)};Wh.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 Gh={};Gh.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)}}};Gh.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};Gh.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(aS),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var SS={};[Yo,Dh,si,tc,R0,qn,TS,Wh,Gh].forEach(function(t){We(SS,t)});var DS={};DS.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 ES=function(e,r){var i=e[0];!i||i._private.grabbed===r||(i._private.grabbed=r,e.updateStyle(!1))},BL=function(e){ES(e,!0)},LL=function(e){ES(e,!1)},xu={};xu.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)};xu.binder=function(t){var e=this,r=e.cy.window(),i=t===r||t===r.document||t===r.document.body||GP(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}};xu.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()};xu.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()};xu.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,K,ie){S==null&&(S=t.cy);for(var ue=0;ue<H.length;ue++){var Ne=H[ue];S.emit({originalEvent:K,type:Ne,position:ie})}},a=function(S){return S.shiftKey||S.metaKey||S.ctrlKey},o=function(S,H){var K=!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()){K=!1;break}}else K=!0;return K},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 K=H.addToList,ie=K.has(S);!ie&&S.grabbable()&&!S.locked()&&(K.merge(S),BL(S))},f=function(S,H){if(S.cy().hasCompoundNodes()&&!(H.inDragLayer==null&&H.addToList==null)){var K=S.descendants();H.inDragLayer&&(K.forEach(s),K.connectedEdges().forEach(s)),H.addToList&&d(K,H)}},p=function(S,H){H=H||{};var K=S.cy().hasCompoundNodes();H.inDragLayer&&(S.forEach(s),S.neighborhood().stdFilter(function(ie){return!K||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){LL(H),u(H),c(H)}),t.updateCachedGrabbedEles())},v=function(S,H){if(!(H.inDragLayer==null&&H.addToList==null)&&S.cy().hasCompoundNodes()){var K=S.ancestors().orphans();if(!K.same(S)){var ie=K.descendants().spawnSelf().merge(K).unmerge(S).unmerge(S.descendants()),ue=ie.connectedEdges();H.inDragLayer&&(ue.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(fe){for(var S=0;S<fe.length;S++){var H=fe[S],K=H.removedNodes;if(K)for(var ie=0;ie<K.length;ie++){var ue=K[ie];if(ue===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(fe){t.destroy()});var w=Xl(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(fe){t.registerBinding(fe,"transitionend",x),t.registerBinding(fe,"animationend",x),t.registerBinding(fe,"scroll",x)}),t.registerBinding(t.container,"contextmenu",function(fe){fe.preventDefault()});var _=function(){return t.selection[4]!==0},D=function(S){for(var H=t.findContainerClientCoords(),K=H[0],ie=H[1],ue=H[2],Ne=H[3],ve=S.touches?S.touches:[S],De=!1,ke=0;ke<ve.length;ke++){var qe=ve[ke];if(K<=qe.clientX&&qe.clientX<=K+ue&&ie<=qe.clientY&&qe.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,K=[S.clientX,S.clientY],ie=t.projectIntoViewport(K[0],K[1]),ue=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=K;var ke=function(bt){return{originalEvent:S,type:bt,position:{x:ie[0],y:ie[1]}}},qe=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?(ue[4]=1,t.data.bgActivePosistion={x:ie[0],y:ie[1]},t.redrawHint("select",!0),t.redraw()):ve.pannable()&&(ue[4]=1),qe()}ue[0]=ue[2]=ie[0],ue[1]=ue[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 K=!1,ie=t.cy,ue=ie.zoom(),Ne=[S.clientX,S.clientY],ve=t.projectIntoViewport(Ne[0],Ne[1]),De=t.hoverData.mdownPos,ke=t.hoverData.mdownGPos,qe=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]-qe[2],ve[1]-qe[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 jr=a(S);Pr&&(t.hoverData.tapholdCancelled=!0);var xn=function(){var Ui=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Ui.length===0?(Ui.push(pt[0]),Ui.push(pt[1])):(Ui[0]+=pt[0],Ui[1]+=pt[1])};K=!0,n(tt,["mousemove","vmousemove","tapdrag"],S,{x:ve[0],y:ve[1]});var or=function(Ui){return{originalEvent:S,type:Ui,position:{x:ve[0],y:ve[1]}}},Gn=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||ie.emit(or("boxstart")),qe[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(K=!0,ie.panningEnabled()&&ie.userPanningEnabled()){var ga;if(t.hoverData.justStartedPan){var ac=t.hoverData.mdownPos;ga={x:(ve[0]-ac[0])*ue,y:(ve[1]-ac[1])*ue},t.hoverData.justStartedPan=!1}else ga={x:pt[0]*ue,y:pt[1]*ue};ie.panBy(ga),ie.emit(or("dragpan")),t.hoverData.dragged=!0}ve=t.projectIntoViewport(S.clientX,S.clientY)}else if(qe[4]==1&&(Fe==null||Fe.pannable())){if(Pr){if(!t.hoverData.dragging&&ie.boxSelectionEnabled()&&(jr||!ie.panningEnabled()||!ie.userPanningEnabled()))Gn();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,qe[4]=0,t.data.bgActivePosistion=su(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()&&jr)Fe&&Fe.grabbed()&&(g(bt),Fe.emit(or("freeon")),bt.emit(or("free")),t.dragData.didDrag&&(Fe.emit(or("dragfreeon")),bt.emit(or("dragfree")))),Gn();else if(Fe&&Fe.grabbed()&&t.nodeIsDraggable(Fe)){var mi=!t.dragData.didDrag;mi&&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],mi)){var gi=t.hoverData.dragDelta;gi&&Te(gi[0])&&Te(gi[1])&&(Qr.x+=gi[0],Qr.y+=gi[1])}t.hoverData.draggingEles=!0,bt.silentShift(Qr).emit(or("position")).emit(or("drag")),t.redrawHint("drag",!0),t.redraw()}}else xn();K=!0}if(qe[2]=ve[0],qe[3]=ve[1],K)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 K=t.cy,ie=t.projectIntoViewport(S.clientX,S.clientY),ue=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 qe=function(dr){return{originalEvent:S,type:dr,position:{x:ie[0],y:ie[1]}}};if(t.hoverData.which===3){var tt=qe("cxttapend");if(De?De.emit(tt):K.emit(tt),!t.hoverData.cxtDragged){var at=qe("cxttap");De?De.emit(at):K.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<=K.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]})},K.multiClickDebounceTime()),I=S.timeStamp)),De==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!a(S)&&(K.$(r).unselect(["tapunselect"]),ve.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=ve=K.collection()),Ne==De&&!t.dragData.didDrag&&!t.hoverData.selecting&&Ne!=null&&Ne._private.selectable&&(t.hoverData.dragging||(K.selectionType()==="additive"||ke?Ne.selected()?Ne.unselect(["tapunselect"]):Ne.select(["tapselect"]):ke||(K.$(r).unmerge(Ne).unselect(["tapunselect"]),Ne.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Fe=K.collection(t.getAllInBox(ue[0],ue[1],ue[2],ue[3]));t.redrawHint("select",!0),Fe.length>0&&t.redrawHint("eles",!0),K.emit(qe("boxend"));var pt=function(dr){return dr.selectable()&&!dr.selected()};K.selectionType()==="additive"||ke||K.$(r).unmerge(Fe).unselect(),Fe.emit(qe("box")).stdFilter(pt).select().emit(qe("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!ue[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var bt=De&&De.grabbed();g(ve),bt&&(De.emit(qe("freeon")),ve.emit(qe("free")),t.dragData.didDrag&&(De.emit(qe("dragfreeon")),ve.emit(qe("dragfree"))))}}ue[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=[],R=4,N,L=1e5,P=function(S,H){for(var K=0;K<S.length;K++)if(S[K]%H!==0)return!1;return!0},z=function(S){for(var H=Math.abs(S[0]),K=1;K<S.length;K++)if(Math.abs(S[K])!==H)return!1;return!0},G=function(S){var H=!1,K=S.deltaY;if(K==null&&(S.wheelDeltaY!=null?K=S.wheelDeltaY/4:S.wheelDelta!=null&&(K=S.wheelDelta/4)),K!==0){if(N==null)if(A.length>=R){var ie=A;if(N=P(ie,5),!N){var ue=Math.abs(ie[0]);N=z(ie)&&ue>5}if(N)for(var Ne=0;Ne<ie.length;Ne++)L=Math.min(Math.abs(ie[Ne]),L)}else A.push(K),H=!0;else N&&(L=Math.min(Math.abs(K),L));if(!t.scrollingPage){var ve=t.cy,De=ve.zoom(),ke=ve.pan(),qe=t.projectIntoViewport(S.clientX,S.clientY),tt=[qe[0]*De+ke.x,qe[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(K)>5&&(K=b0(K)*5),at=K/-250,N&&(at/=L,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:qe[0],y:qe[1]}})}}}};t.registerBinding(t.container,"wheel",G,!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(fe){t.hasTouchStarted||G(fe)},!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 Y,V,W,ce,he,de,me,Ce,Se,le,q,Q,ee,oe=function(S,H,K,ie){return Math.sqrt((K-S)*(K-S)+(ie-H)*(ie-H))},_e=function(S,H,K,ie){return(K-S)*(K-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,K=t.touchData.now,ie=t.touchData.earlier;if(S.touches[0]){var ue=t.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);K[0]=ue[0],K[1]=ue[1]}if(S.touches[1]){var ue=t.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);K[2]=ue[0],K[3]=ue[1]}if(S.touches[2]){var ue=t.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);K[4]=ue[0],K[5]=ue[1]}var Ne=function(jr){return{originalEvent:S,type:jr,position:{x:K[0],y:K[1]}}};if(S.touches[1]){t.touchData.singleTouchMoved=!0,g(t.dragData.touchDragEles);var ve=t.findContainerClientCoords();Se=ve[0],le=ve[1],q=ve[2],Q=ve[3],Y=S.touches[0].clientX-Se,V=S.touches[0].clientY-le,W=S.touches[1].clientX-Se,ce=S.touches[1].clientY-le,ee=0<=Y&&Y<=q&&0<=W&&W<=q&&0<=V&&V<=Q&&0<=ce&&ce<=Q;var De=H.pan(),ke=H.zoom();he=oe(Y,V,W,ce),de=_e(Y,V,W,ce),me=[(Y+W)/2,(V+ce)/2],Ce=[(me[0]-De.x)/ke,(me[1]-De.y)/ke];var qe=200,tt=qe*qe;if(de<tt&&!S.touches[2]){var at=t.findNearestElement(K[0],K[1],!0,!0),Fe=t.findNearestElement(K[2],K[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(K[0],K[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:K[0],y:K[1]}),bt==null&&(t.data.bgActivePosistion={x:ue[0],y:ue[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:K[0],y:K[1]})},t.tapholdDuration)}}if(S.touches.length>=1){for(var Ji=t.touchData.startPosition=[null,null,null,null,null,null],fr=0;fr<K.length;fr++)Ji[fr]=ie[fr]=K[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 K=t.selection,ie=t.cy,ue=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);ue[0]=De[0],ue[1]=De[1]}if(S.touches[1]){var De=t.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);ue[2]=De[0],ue[3]=De[1]}if(S.touches[2]){var De=t.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);ue[4]=De[0],ue[5]=De[1]}var ke=function(sD){return{originalEvent:S,type:sD,position:{x:ue[0],y:ue[1]}}},qe=t.touchData.startGPosition,tt;if(H&&S.touches[0]&&qe){for(var at=[],Fe=0;Fe<ue.length;Fe++)at[Fe]=ue[Fe]-Ne[Fe];var pt=S.touches[0].clientX-qe[0],bt=pt*pt,Pr=S.touches[0].clientY-qe[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-le,Dr=S.touches[1].clientX-Se,jr=S.touches[1].clientY-le,xn=_e(fr,_r,Dr,jr),or=xn/de,Gn=150,en=Gn*Gn,ga=1.5,ac=ga*ga;if(or>=ac||xn>=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 mi=t.findNearestElement(ue[0],ue[1],!0,!0);(!t.touchData.cxtOver||mi!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(ke("cxtdragout")),t.touchData.cxtOver=mi,mi&&mi.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,K[4]=1,!K||K.length===0||K[0]===void 0?(K[0]=(ue[0]+ue[2]+ue[4])/3,K[1]=(ue[1]+ue[3]+ue[5])/3,K[2]=(ue[0]+ue[2]+ue[4])/3+1,K[3]=(ue[1]+ue[3]+ue[5])/3+1):(K[2]=(ue[0]+ue[2]+ue[4])/3,K[3]=(ue[1]+ue[3]+ue[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 gi=0;gi<Qr.length;gi++){var Su=Qr[gi]._private;Su.grabbed=!1,Su.rscratch.inDragLayer=!1}}var Ui=t.touchData.start,fr=S.touches[0].clientX-Se,_r=S.touches[0].clientY-le,Dr=S.touches[1].clientX-Se,jr=S.touches[1].clientY-le,B0=oe(fr,_r,Dr,jr),QS=B0/he;if(ee){var JS=fr-Y,eD=_r-V,tD=Dr-W,rD=jr-ce,iD=(JS+tD)/2,nD=(eD+rD)/2,Du=ie.zoom(),ip=Du*QS,oc=ie.pan(),L0=Ce[0]*Du+oc.x,z0=Ce[1]*Du+oc.y,aD={x:-ip/Du*(L0-oc.x-iD)+L0,y:-ip/Du*(z0-oc.y-nD)+z0};if(Ui&&Ui.active()){var Qr=t.dragData.touchDragEles;g(Qr),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Ui.unactivate().emit(ke("freeon")),Qr.emit(ke("free")),t.dragData.didDrag&&(Ui.emit(ke("dragfreeon")),Qr.emit(ke("dragfree")))}ie.viewport({zoom:ip,pan:aD,cancelOnFailedZoom:!0}),ie.emit(ke("pinchzoom")),he=B0,Y=fr,V=_r,W=Dr,ce=jr,t.pinching=!0}if(S.touches[0]){var De=t.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);ue[0]=De[0],ue[1]=De[1]}if(S.touches[1]){var De=t.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);ue[2]=De[0],ue[3]=De[1]}if(S.touches[2]){var De=t.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);ue[4]=De[0],ue[5]=De[1]}}else if(S.touches[0]&&!t.touchData.didSelect){var tn=t.touchData.start,np=t.touchData.last,mi;if(!t.hoverData.draggingEles&&!t.swipePanning&&(mi=t.findNearestElement(ue[0],ue[1],!0,!0)),H&&tn!=null&&S.preventDefault(),H&&tn!=null&&t.nodeIsDraggable(tn))if(tt){var Qr=t.dragData.touchDragEles,V0=!t.dragData.didDrag;V0&&p(Qr,{inDragLayer:!0}),t.dragData.didDrag=!0;var Eu={x:0,y:0};if(Te(at[0])&&Te(at[1])&&(Eu.x+=at[0],Eu.y+=at[1],V0)){t.redrawHint("eles",!0);var rn=t.touchData.dragDelta;rn&&Te(rn[0])&&Te(rn[1])&&(Eu.x+=rn[0],Eu.y+=rn[1])}t.hoverData.draggingEles=!0,Qr.silentShift(Eu).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||mi,["touchmove","tapdrag","vmousemove"],S,{x:ue[0],y:ue[1]}),(!tn||!tn.grabbed())&&mi!=np&&(np&&np.emit(ke("tapdragout")),mi&&mi.emit(ke("tapdragover"))),t.touchData.last=mi,H)for(var gi=0;gi<ue.length;gi++)ue[gi]&&t.touchData.startPosition[gi]&&tt&&(t.touchData.singleTouchMoved=!0);if(H&&(tn==null||tn.pannable())&&ie.panningEnabled()&&ie.userPanningEnabled()){var oD=o(tn,t.touchData.starts);oD&&(S.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=su(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);ue[0]=De[0],ue[1]=De[1]}}for(var Fe=0;Fe<ue.length;Fe++)Ne[Fe]=ue[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,$e,Ee,He;if(t.registerBinding(e,"touchend",Ge=function(S){var H=t.touchData.start,K=t.touchData.capture;if(K)S.touches.length===0&&(t.touchData.capture=!1),S.preventDefault();else return;var ie=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var ue=t.cy,Ne=ue.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 qe=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=qe("cxttapend"),H?H.emit(tt):ue.emit(tt),!t.touchData.cxtDragged){var at=qe("cxttap");H?H.emit(at):ue.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]&&ue.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Fe=ue.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),ue.emit(qe("boxend"));var pt=function(en){return en.selectable()&&!en.selected()};Fe.emit(qe("box")).stdFilter(pt).select().emit(qe("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(qe("freeon")),bt.emit(qe("free")),t.dragData.didDrag&&(H.emit(qe("dragfreeon")),bt.emit(qe("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,jr=fr+Dr,xn=jr*Ne*Ne;t.touchData.singleTouchMoved||(H||ue.$(":selected").unselect(["tapunselect"]),n(H,["tap","vclick"],S,{x:ve[0],y:ve[1]}),$e=!1,S.timeStamp-He<=ue.multiClickDebounceTime()?(Ee&&clearTimeout(Ee),$e=!0,He=null,n(H,["dbltap","vdblclick"],S,{x:ve[0],y:ve[1]})):(Ee=setTimeout(function(){$e||n(H,["onetap","voneclick"],S,{x:ve[0],y:ve[1]})},ue.multiClickDebounceTime()),He=S.timeStamp)),H!=null&&!t.dragData.didDrag&&H._private.selectable&&xn<t.touchTapThreshold2&&!t.pinching&&(ue.selectionType()==="single"?(ue.$(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 K=ze[H];if(K.event.pointerId===S.pointerId){ze.splice(H,1);return}}},Bt=function(S){var H=ze.filter(function(K){return K.event.pointerId===S.pointerId})[0];H.event=S,H.touch=et(S)},Mt=function(S){S.touches=ze.map(function(H){return H.touch})},Tt=function(S){return S.pointerType==="mouse"||S.pointerType===4};t.registerBinding(t.container,"pointerdown",function(fe){Tt(fe)||(fe.preventDefault(),ct(fe),Mt(fe),Re(fe))}),t.registerBinding(t.container,"pointerup",function(fe){Tt(fe)||(gt(fe),Mt(fe),Ge(fe))}),t.registerBinding(t.container,"pointercancel",function(fe){Tt(fe)||(gt(fe),Mt(fe),Je(fe))}),t.registerBinding(t.container,"pointermove",function(fe){Tt(fe)||(fe.preventDefault(),Bt(fe),Mt(fe),vt(fe))})}};var va={};va.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 Vl(s,u,this.points,i,n,a/2,o/2,l)},checkPoint:function(i,n,a,o,s,u,l,c){return pa(i,n,this.points,u,l,o,s,[0,-1],a)},hasMiterBounds:t!=="rectangle",miterBounds:function(i,n,a,o,s,u){return lF(this.points,i,n,a,o,s)}}};va.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 gF(a,o,e,r,i/2+s,n/2+s)},checkPoint:function(e,r,i,n,a,o,s,u){return Uo(e,r,n,a,o,s,i)}}};va.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"?ET(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]=O0(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 bF(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 mF(i,n,this.points,u,l,o,s,this.getOrCreateCorners(u,l,o,s,c,d,"corners"))}}};va.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:fi(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 ST(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!!(pa(e,r,this.points,o,s,n,a-d,[0,-1],i)||pa(e,r,this.points,o,s,n-d,a,[0,-1],i)||Uo(e,r,d,d,o-l+u,s-c+u,i)||Uo(e,r,d,d,o+l-u,s-c+u,i)||Uo(e,r,d,d,o+l-u,s+c-u,i)||Uo(e,r,d,d,o-l+u,s+c-u,i))}}};va.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:w0(),points:fi(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 Vl(a,o,c,e,r)},checkPoint:function(e,r,i,n,a,o,s,u){var l=u==="auto"?this.cornerLength:u;if(pa(e,r,this.points,o,s,n,a-2*l,[0,-1],i)||pa(e,r,this.points,o,s,n-2*l,a,[0,-1],i))return!0;var c=this.generateCutTrianglePts(n,a,o,s);return ki(e,r,c.topLeft)||ki(e,r,c.topRight)||ki(e,r,c.bottomRight)||ki(e,r,c.bottomLeft)}}};va.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:fi(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=cu({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},l),y=cu({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},c),b=cu({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 Vl(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=Gg(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=Gg(n,a),c=l.heightOffset,d=l.widthOffset;if(pa(e,r,this.points,o,s,n,a-2*c,[0,-1],i)||pa(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],R=M[5],N=M[1],L=Math.min(k,A),P=Math.max(k,A),z=Math.min(R,N),G=Math.max(R,N);if(L<=D&&D<=P&&z<=E&&E<=G){var Y=CF(k,I,A),V=fF(Y[0],Y[1],Y[2],D),W=V.filter(function(ce){return 0<=ce&&ce<=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=Vr(b,w,T,y);if(m.isTop&&x<=r||m.isBottom&&r<=x)return!0}}return!1}}};va.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:fi(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=Wa(a,o,e,r,l,c,f,d,!1);return p.length>0?p:ST(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(pa(e,r,this.points,o,s,n,a-l,[0,-1],i)||pa(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!!(ki(e,r,f)||Uo(e,r,l,l,o+n/2-u,s+a/2-u,i)||Uo(e,r,l,l,o-n/2+u,s+a/2-u,i))}}};va.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",fi(3,0)),this.generateRoundPolygon("round-triangle",fi(3,0)),this.generatePolygon("rectangle",fi(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",fi(5,0)),this.generateRoundPolygon("round-pentagon",fi(5,0)),this.generatePolygon("hexagon",fi(6,0)),this.generateRoundPolygon("round-hexagon",fi(6,0)),this.generatePolygon("heptagon",fi(7,0)),this.generateRoundPolygon("round-heptagon",fi(7,0)),this.generatePolygon("octagon",fi(8,0)),this.generateRoundPolygon("round-octagon",fi(8,0));var i=new Array(20);{var n=Wg(5,0),a=Wg(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=DT(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 rc={};rc.timeToRender=function(){return this.redrawTotalTime/this.redrawCount};rc.redraw=function(t){t=t||wT();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};rc.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 Vx=function(e,r,i){for(var n=e.beforeRenderCallbacks,a=0;a<n.length;a++)n[a].fn(r,i)};rc.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){Vx(t,!0,n);var a=ha();t.render(t.renderOptions);var o=t.lastDrawTime=ha();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 Vx(t,!1,n);t.skipFrame=!1,yh(r)}};yh(r)}};var zL=function(e){this.init(e)},kS=zL,Tu=kS.prototype;Tu.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"];Tu.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"&&Ht("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()};Tu.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()}};Tu.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{}};Tu.isHeadless=function(){return!1};[A0,SS,DS,xu,va,rc].forEach(function(t){We(Tu,t)});var Bg=1e3/60,MS={setupDequeueing:function(e){return function(){var i=this,n=this.renderer;if(!i.dequeueingSetup){i.dequeueingSetup=!0;var a=Xl(function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()},e.deqRedrawThreshold),o=function(l,c){var d=ha(),f=n.averageRedrawTime,p=n.lastRedrawTime,h=[],g=n.cy.extent(),v=n.getPixelRatio();for(l||n.flushRenderedStyleQueue();;){var m=ha(),y=m-d,b=m-c;if(p<Bg){var w=Bg-(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*Bg)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||m0;n.beforeRender(o,s(i))}}}},VL=(function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bh;ro(this,t),this.idsByKey=new fa,this.keyForId=new fa,this.cachesByLvl=new fa,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 bu,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 fa,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}}])})(),Hx=25,ih=50,ph=-4,o0=3,IS=7.99,HL=8,UL=1024,jL=1024,$L=1024,qL=.2,WL=.8,GL=10,YL=.15,KL=.1,ZL=.9,XL=.9,QL=100,JL=1,lu={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},ez=Zr({getKey:null,doesEleInvalidateKey:bh,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:yT,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Ol=function(e,r){var i=this;i.renderer=e,i.onDequeues=[];var n=ez(r);We(i,n),i.lookup=new VL(n.getKey,n.doesEleInvalidateKey),i.setupDequeueing()},Rr=Ol.prototype;Rr.reasons=lu;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 Ql(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(y0(s*r))),i<ph)i=ph;else if(s>=IS||i>o0)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<=Hx?h=Hx:c<=ih?h=ih:h=Math.ceil(c/ih)*ih,c>$L||d>jL)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(L){return L&&L.scaledLabelShown===f},b=n&&n===lu.dequeue,w=n&&n===lu.highQuality,T=n&&n===lu.downscale,x,_=i+1;_<=o0;_++){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,lu.downscale);M()}else return a.queueElement(t,x.level-1),x;else{var I;if(!b&&!w&&!T)for(var A=i-1;A>=ph;A--){var R=u.get(t,A);if(R){I=R;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+HL),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=ph;a<=o0;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>=qL*t.width&&this.retireTexture(t)};Rr.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>WL&&t.fullnessChecks>=GL?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)}g0(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(UL,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,g0(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<JL&&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,lu.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=v0,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=MS.setupDequeueing({deqRedrawThreshold:QL,deqCost:YL,deqAvgCost:KL,deqNoDrawCost:ZL,deqFastCost:XL,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(C0(u,n))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var tz=1,Pl=-4,Eh=2,rz=3.99,iz=50,nz=50,az=.15,oz=.1,sz=.9,uz=.9,lz=1,Ux=250,cz=4e3*4e3,jx=32767,dz=!0,AS=function(e){var r=this,i=r.renderer=e,n=i.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=ha()-2*Ux,r.skipping=!1,r.eleTxrDeqs=n.collection(),r.scheduleElementRefinement=Xl(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},nz),i.beforeRender(function(o,s){s-r.lastInvalidationTime<=Ux?r.skipping=!0:r.skipping=!1},i.beforeRenderPriorities.lyrTxrSkip);var a=function(s,u){return u.reqs-s.reqs};r.layersQueue=new Ql(a),r.setupDequeueing()},Xr=AS.prototype,$x=0,fz=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:$x=++$x%fz,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(y0(o*e)),r<Pl)r=Pl;else if(o>=rz||r>Eh)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 L=r+N;Pl<=L&&L<=Eh&&!M(L);L+=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=pi();for(var M=0;M<t.length;M++)oF(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>jx||A>jx)return null;var R=I*A;if(R>cz)return null;var N=i.makeLayer(d,r);if(k!=null){var L=c.indexOf(k)+1;c.splice(L,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/tz,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||!TT(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,dz),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=Gl(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=Pl;l<=Eh;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=Pl;r<=Eh;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=ha(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(i,n,a){e.invalidateLayer(i)}))};Xr.invalidateLayer=function(t){if(this.lastInvalidationTime=ha(),!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<lz&&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=Xl(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100);Xr.setupDequeueing=MS.setupDequeueing({deqRedrawThreshold:iz,deqCost:az,deqAvgCost:oz,deqNoDrawCost:sz,deqFastCost:uz,deq:function(e,r){return e.dequeue(r)},onDeqd:m0,shouldRedraw:yT,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var OS={},qx;function hz(t,e){for(var r=0;r<e.length;r++){var i=e[r];t.lineTo(i.x,i.y)}}function pz(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 Wx(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 vz(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 mz(t,e,r,i){t.arc(e,r,i,0,Math.PI*2,!1)}OS.arrowShapeImpl=function(t){return(qx||(qx={polygon:hz,"triangle-backcurve":pz,"triangle-tee":Wx,"circle-triangle":vz,"triangle-cross":Wx,circle:mz}))[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 gz=function(){return 0},yz=function(e,r){return e.getTextAngle(r,null)},bz=function(e,r){return e.getTextAngle(r,"source")},Cz=function(e,r){return e.getTextAngle(r,"target")},wz=function(e,r){return r.effectiveOpacity()},Lg=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||C0(f,i))){var h=e.isEdge(),g=e.element()._private.rscratch.badLine;o.drawElementUnderlay(t,e),o.drawCachedElementPortion(t,e,u,r,n,p,gz,wz),(!h||!g)&&o.drawCachedElementPortion(t,e,l,r,n,p,yz,Lg),h&&!g&&(o.drawCachedElementPortion(t,e,c,r,n,p,bz,Lg),o.drawCachedElementPortion(t,e,d,r,n,p,Cz,Lg)),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 ma={};ma.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 RS=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")}}}};ma.drawEdgeOverlay=RS("overlay");ma.drawEdgeUnderlay=RS("underlay");ma.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=Mi(n.roundCorners),v;try{for(g.s();!(v=g.n()).done;){var m=v.value;CS(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([])};ma.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()}};ma.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)};ma.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)}}};ma.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=jo(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 P0={};P0.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){Ht(c)}};P0.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,R=c(r,"background-position-x","units",i),N=c(r,"background-position-x","pfValue",i);R==="%"?A+=(v-M)*N:A+=N;var L=c(r,"background-offset-x","units",i),P=c(r,"background-offset-x","pfValue",i);L==="%"?A+=(v-M)*P:A+=P;var z=u-m/2,G=c(r,"background-position-y","units",i),Y=c(r,"background-position-y","pfValue",i);G==="%"?z+=(m-k)*Y:z+=Y;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 ce=t.globalAlpha;t.globalAlpha=T;var he=a.getImgSmoothing(t),de=!1;if(x==="no"&&he?(a.setImgSmoothing(t,!1),de=!0):x==="yes"&&!he&&(a.setImgSmoothing(t,!0),de=!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=ce,de&&a.setImgSmoothing(t,he)}};var Ko={};Ko.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),i=this.getPixelRatio(),n=Math.ceil(y0(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)};Ko.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)};Ko.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};Ko.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 _z(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 Gx(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()}Ko.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=hi(n,"labelAngle",e);r=t.isEdge()?s:0}else o.strValue==="none"?r=0:r=o.pfValue;return r};Ko.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=hi(o,"labelX",r),l=hi(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=hi(o,"labelWidth",r),g=hi(o,"labelHeight",r),v=hi(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 _=gu(w),D=yu(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,R=A==="round-rectangle"||A==="roundrectangle",N=A==="circle",L=2;if(E>0||k>0&&M>0){var P=t.fillStyle,z=t.strokeStyle,G=t.lineWidth,Y=e.pstyle("text-background-color").value,V=e.pstyle("text-border-color").value,W=e.pstyle("text-border-style").value,ce=E>0,he=k>0&&M>0,de=u-I;switch(_){case"left":de-=h;break;case"center":de-=h/2;break}var me=l-g-I,Ce=h+2*I,Se=g+2*I;if(ce&&(t.fillStyle="rgba(".concat(Y[0],",").concat(Y[1],",").concat(Y[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(R?(t.beginPath(),Gx(t,de,me,Ce,Se,L)):N?(t.beginPath(),_z(t,de,me,Ce,Se)):(t.beginPath(),t.rect(de,me,Ce,Se)),ce&&t.fill(),he&&t.stroke(),he&&W==="double"){var le=k/2;t.beginPath(),R?Gx(t,de+le,me+le,Ce-2*le,Se-2*le,L):t.rect(de+le,me+le,Ce-2*le,Se-2*le),t.stroke()}t.fillStyle=P,t.strokeStyle=z,t.lineWidth=G,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 Q=hi(o,"labelWrapCachedLines",r),ee=hi(o,"labelLineHeight",r),oe=h/2,_e=this.getLabelJustification(e);switch(_e==="auto"||(_==="left"?_e==="left"?u+=-h:_e==="center"&&(u+=-oe):_==="center"?_e==="left"?u+=-oe:_e==="right"&&(u+=oe):_==="right"&&(_e==="center"?u+=oe:_e==="right"&&(u+=h))),D){case"top":l-=(Q.length-1)*ee;break;case"center":case"bottom":l-=(Q.length-1)*ee;break}for(var Re=0;Re<Q.length;Re++)q>0&&t.strokeText(Q[Re],u,l),t.fillText(Q[Re],u,l),l+=ee}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,R=e.pstyle("border-color").value,N=e.pstyle("border-style").value,L=e.pstyle("border-join").value,P=e.pstyle("border-cap").value,z=e.pstyle("border-position").value,G=e.pstyle("border-dash-pattern").pfValue,Y=e.pstyle("border-dash-offset").pfValue,V=e.pstyle("border-opacity").value*f,W=e.pstyle("outline-width").pfValue,ce=e.pstyle("outline-color").value,he=e.pstyle("outline-style").value,de=e.pstyle("outline-opacity").value*f,me=e.pstyle("outline-offset").value,Ce=e.pstyle("corner-radius").value;Ce!=="auto"&&(Ce=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)},le=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;o.colorStrokeStyle(t,R[0],R[1],R[2],S)},q=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:de;o.colorStrokeStyle(t,ce[0],ce[1],ce[2],S)},Q=function(S,H,K,ie){var ue=o.nodePathCache=o.nodePathCache||[],Ne=gT(K==="polygon"?K+","+ie.join(","):K,""+H,""+S,""+Ce),ve=ue[Ne],De,ke=!1;return ve!=null?(De=ve,ke=!0,c.pathCache=De):(De=new Path2D,ue[Ne]=c.pathCache=De),{path:De,cacheHit:ke}},ee=e.pstyle("shape").strValue,oe=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(d.x,d.y);var _e=Q(s,u,ee,oe);h=_e.path,g=_e.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,Ce,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,K=l.backgrounding,ie=0,ue=0;ue<T.length;ue++){var Ne=e.cy().style().getIndexedStyle(e,"background-image-containment","value",ue);if(H&&Ne==="over"||!H&&Ne==="inside"){ie++;continue}w[ue]&&T[ue].complete&&!T[ue].error&&(ie++,o.drawInscribedImage(t,T[ue],e,ue,S))}l.backgrounding=ie!==x,K!==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,Ce,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,Ce,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,Ce,c)))},$e=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,H=(k>0?k:-k)*S,K=k>0?0:255;k!==0&&(o.colorFillStyle(t,K,K,K,H),p?t.fill(h):t.fill())},Ee=function(){if(I>0){if(t.lineWidth=I,t.lineCap=P,t.lineJoin=L,t.setLineDash)switch(N){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(G),t.lineDashOffset=Y;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),K=I;z==="inside"&&(K=0),z==="outside"&&(K*=2);var ie=(s+K+(W+me))/s,ue=(u+K+(W+me))/u,Ne=s*ie,ve=u*ue,De=o.nodeShapes[H].points,ke;if(p){var qe=Q(Ne,ve,H,De);ke=qe.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=(K+me+W)*1.4:H==="round-heptagon"?(tt=(K+me+W)*1.075,Fe=-(K/2+me+W)/35):H==="round-hexagon"?tt=(K+me+W)*1.12:H==="round-pentagon"?(tt=(K+me+W)*1.13,Fe=-(K/2+me+W)/15):H==="round-tag"?(tt=(K+me+W)*1.12,at=(K/2+W+me)*.07):H==="round-triangle"&&(tt=(K+me+W)*(Math.PI/2),Fe=-(K+me/2+W)/Math.PI),tt!==0&&(ie=(s+tt)/s,Ne=s*ie,["round-hexagon","round-tag"].includes(H)||(ue=(u+tt)/u,ve=u*ue)),Ce=Ce==="auto"?ET(Ne,ve):Ce;for(var pt=Ne/2,bt=ve/2,Pr=Ce+(K+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,jr,xn,or=dr.length;for(Dr=dr[or-1],_r=0;_r<or;_r++)jr=dr[_r%or],xn=dr[(_r+1)%or],Ji[_r]=O0(Dr,jr,xn,Pr),Dr=jr,jr=xn;o.drawRoundPolygonPath(ke||t,S.x+at,S.y+Fe,s*ie,u*ue,De,Ji)}else if(["roundrectangle","round-rectangle"].includes(H))Ce=Ce==="auto"?Xa(Ne,ve):Ce,o.drawRoundRectanglePath(ke||t,S.x,S.y,Ne,ve,Ce+(K+W+me)/2);else if(["cutrectangle","cut-rectangle"].includes(H))Ce=Ce==="auto"?w0():Ce,o.drawCutRectanglePath(ke||t,S.x,S.y,Ne,ve,null,Ce+(K+W+me)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(H))Ce=Ce==="auto"?Xa(Ne,ve):Ce,o.drawBottomRoundRectanglePath(ke||t,S.x,S.y,Ne,ve,Ce+(K+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 Gn=(K+W+me)/s;De=Ch(wh(De,Gn)),o.drawPolygonPath(ke||t,S.x,S.y,s,u,De)}else{var en=(K+W+me)/s;De=Ch(wh(De,-en)),o.drawPolygonPath(ke||t,S.x,S.y,s,u,De)}if(p?t.stroke(ke):t.stroke(),he==="double"){t.lineWidth=K/3;var ga=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(ke):t.stroke(),t.globalCompositeOperation=ga}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,Bt=e.pstyle("ghost-offset-y").pfValue,Mt=e.pstyle("ghost-opacity").value,Tt=Mt*f;t.translate(gt,Bt),q(),He(),Se(Mt*A),Re(),vt(Tt,!0),le(Mt*V),Ee(),Je(k!==0||I!==0),Ge(k!==0||I!==0),vt(Tt,!1),$e(Tt),t.translate(-gt,-Bt)}p&&t.translate(-d.x,-d.y),et(),p&&t.translate(d.x,d.y),q(),He(),Se(),Re(),vt(f,!0),le(),Ee(),Je(k!==0||I!==0),Ge(k!==0||I!==0),vt(f,!1),$e(),p&&t.translate(-d.x,-d.y),Ye(),ze(),r&&t.translate(m.x1,m.y1)}};var PS=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=PS("overlay");ao.drawNodeUnderlay=PS("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 vi={},xz=100;vi.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};vi.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};vi.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=$o(l,d),p=$o(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};vi.gradientFillStyle=function(t,e,r,i){var n=this.createGradientStyleFor(t,"background",e,r,i);if(!n)return null;t.fillStyle=n};vi.colorFillStyle=function(t,e,r,i,n){t.fillStyle="rgba("+e+","+r+","+i+","+n+")"};vi.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)}};vi.gradientStrokeStyle=function(t,e,r,i){var n=this.createGradientStyleFor(t,"line",e,r,i);if(!n)return null;t.strokeStyle=n};vi.colorStrokeStyle=function(t,e,r,i,n){t.strokeStyle="rgba("+e+","+r+","+i+","+n+")"};vi.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)}};vi.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}};vi.renderTo=function(t,e,r,i){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:i})};vi.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])};vi.render=function(t){var e=this;t=t||wT();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(le,q,Q,ee,oe){var _e=le.globalCompositeOperation;le.globalCompositeOperation="destination-out",e.colorFillStyle(le,255,255,255,e.motionBlurTransparency),le.fillRect(q,Q,ee,oe),le.globalCompositeOperation=_e}function I(le,q){var Q,ee,oe,_e;!e.clearingMotionBlur&&(le===l.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||le===l.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(Q={x:T.x*p,y:T.y*p},ee=b*p,oe=e.canvasWidth*p,_e=e.canvasHeight*p):(Q=x,ee=w,oe=e.canvasWidth,_e=e.canvasHeight),le.setTransform(1,0,0,1,0,0),q==="motionBlur"?k(le,0,0,oe,_e):!i&&(q===void 0||q)&&le.clearRect(0,0,oe,_e),n||(le.translate(Q.x,Q.y),le.scale(ee,ee)),s&&le.translate(s.x,s.y),o&&le.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 R=l.contexts[e.NODE],N=e.textureCache.texture,_=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),f?k(R,0,0,_.width,_.height):R.clearRect(0,0,_.width,_.height);var L=y.core("outside-texture-bg-color").value,P=y.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,L[0],L[1],L[2],P),R.fillRect(0,0,_.width,_.height);var b=r.zoom();I(R,!1),R.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/u,_.height/_.zoom/u),R.drawImage(N,_.mpan.x,_.mpan.y,_.width/_.zoom/u,_.height/_.zoom/u)}else e.textureOnViewport&&!i&&(e.textureCache=null);var z=r.extent(),G=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),Y=e.hideEdgesOnViewport&&G,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,R=i||(W?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:l.contexts[e.NODE]),ce=f&&!W?"motionBlur":void 0;I(R,ce),Y?e.drawCachedNodes(R,M.nondrag,u,z):e.drawLayeredElements(R,M.nondrag,u,z),e.debug&&e.drawDebugPoints(R,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,R=i||(W?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:l.contexts[e.DRAG]);I(R,f&&!W?"motionBlur":void 0),Y?e.drawCachedNodes(R,M.drag,u,z):e.drawCachedElements(R,M.drag,u,z),e.debug&&e.drawDebugPoints(R,M.drag),!n&&!f&&(c[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,I),f&&p!==1){var he=l.contexts[e.NODE],de=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],me=l.contexts[e.DRAG],Ce=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],Se=function(q,Q,ee){q.setTransform(1,0,0,1,0,0),ee||!m?q.clearRect(0,0,e.canvasWidth,e.canvasHeight):k(q,0,0,e.canvasWidth,e.canvasHeight);var oe=p;q.drawImage(Q,0,0,e.canvasWidth*oe,e.canvasHeight*oe,0,0,e.canvasWidth,e.canvasHeight)};(c[e.NODE]||V[e.NODE])&&(Se(he,de,V[e.NODE]),c[e.NODE]=!1),(c[e.DRAG]||V[e.DRAG])&&(Se(me,Ce,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()},xz)),i||r.emit("render")};var El;vi.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",!El){var m=c.measureText(v);El=m.actualBoundingBoxAscent}c.fillText(v,0,El);var y=60;c.strokeRect(0,El+10,250,20),c.fillRect(0,El+10,250*Math.min(g/y,1),20)}s||(u[r.SELECT_BOX]=!1)}};function Yx(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 Tz(t,e,r){var i=Yx(t,t.VERTEX_SHADER,e),n=Yx(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 Sz(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 N0(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 Dz(t){var e=t.pixelRatio,r=t.cy.zoom();return r*e}function Ez(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 kz(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 Mz(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 Fo(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 nu(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 Iz(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function Az(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 NS(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 FS(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function Oz(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 Rz(t,e,r,i){var n=NS(t,e),a=Sr(n,2),o=a[0],s=a[1],u=FS(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 Vn(t,e,r,i){var n=NS(t,r),a=Sr(n,3),o=a[0],s=a[1],u=a[2],l=FS(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]=Oz(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 Pz(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 Nz(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 Kx=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 zg(){var t=new Kx(9);return Kx!=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 Zx(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 Fz(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 vh(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 Xx(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 s0(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 Bz(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 Lz=(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=Az(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}}])})(),zz=(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 Lz(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=Mi(this.atlases),u;try{var l=function(){var d=u.value,f=d.getKeys(),p=Vz(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=Mi(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 Vz(t,e){return t.intersection?t.intersection(e):new Set(mh(t).filter(function(r){return e.has(r)}))}var Hz=(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 zz(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=We({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=Mi(r),h;try{for(p.s();!(h=p.n()).done;){var g=h.value;if(u(g)){var v=Mi(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&&!Mz(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=Mi(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=Mi(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}}])})(),Uz=(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}}])})(),jz=`
|
|
121
|
+
float circleSD(vec2 p, float r) {
|
|
122
|
+
return distance(vec2(0), p) - r; // signed distance
|
|
123
|
+
}
|
|
124
|
+
`,$z=`
|
|
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
|
+
`,qz=`
|
|
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
|
+
`,Wz=`
|
|
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
|
+
`,Nl={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},kh={IGNORE:1,USE_BB:2},Vg=0,Qx=1,Jx=2,Hg=3,au=4,nh=5,kl=6,Ml=7,Gz=(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=Sz,this.atlasManager=new Hz(e,i),this.batchManager=new Uz(i),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Nl.SCREEN),this.pickingProgram=this._createShaderProgram(Nl.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(Vg,`) {
|
|
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(au," || aVertType == ").concat(Ml,`
|
|
222
|
+
|| aVertType == `).concat(nh," || aVertType == ").concat(kl,`) { // 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(Qx,`) {
|
|
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(Jx,`) {
|
|
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(Hg,` && 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(jz,`
|
|
347
|
+
`).concat($z,`
|
|
348
|
+
`).concat(qz,`
|
|
349
|
+
`).concat(Wz,`
|
|
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(Vg,`) {
|
|
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(Hg,`) {
|
|
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(au,` && 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(au," || vVertType == ").concat(Ml,`
|
|
379
|
+
|| vVertType == `).concat(nh," || vVertType == ").concat(kl,`) { // 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(au,`) {
|
|
391
|
+
d = rectangleSD(p, b);
|
|
392
|
+
} else if(vVertType == `).concat(Ml,` && w == h) {
|
|
393
|
+
d = circleSD(p, b.x); // faster than ellipse
|
|
394
|
+
} else if(vVertType == `).concat(Ml,`) {
|
|
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=Tz(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),Rz(n,"vec2",a.aPosition,r),this.transformBuffer=Pz(n,i,a.aTransform),this.indexBuffer=Vn(n,i,"vec4",a.aIndex),this.vertTypeBuffer=Vn(n,i,"int",a.aVertType),this.atlasIdBuffer=Vn(n,i,"int",a.aAtlasId),this.texBuffer=Vn(n,i,"vec4",a.aTex),this.pointAPointBBuffer=Vn(n,i,"vec4",a.aPointAPointB),this.pointCPointDBuffer=Vn(n,i,"vec4",a.aPointCPointD),this.lineWidthBuffer=Vn(n,i,"vec2",a.aLineWidth),this.colorBuffer=Vn(n,i,"vec4",a.aColor),this.cornerRadiusBuffer=Vn(n,i,"vec4",a.aCornerRadius),this.borderColorBuffer=Vn(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 $a(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]:Nl.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===kh.IGNORE)return;if(u==kh.USE_BB){this.drawPickingRectangle(r,i,n);return}}var l=a.getAtlasInfo(r,n),c=Mi(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]=Vg;var _=this.indexBuffer.getView(x);nu(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;Zx(r);var u=n.getRotation?n.getRotation(a):0;if(u!==0){var l=n.getRotationPoint(a),c=l.x,d=l.y;vh(r,r,[c,d]),Xx(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;vh(r,r,[o,s]),s0(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]=au;var s=this.indexBuffer.getView(o);nu(i,s);var u=this.colorBuffer.getView(o);Fo([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===nh||s===kl){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===kl&&(d[0]=0,d[2]=0)}var f=this.indexBuffer.getView(u);nu(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);Fo(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);Fo(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 au;case"ellipse":return Ml;case"roundrectangle":case"round-rectangle":return nh;case"bottom-round-rectangle":return kl;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);Zx(y),vh(y,y,[o,s]),s0(y,y,[v,v]),Xx(y,y,u),this.vertTypeBuffer.getView(m)[0]=Hg;var b=this.indexBuffer.getView(m);nu(i,b);var w=this.colorBuffer.getView(m);Fo(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]=Qx;var d=this.indexBuffer.getView(c);nu(i,d);var f=this.colorBuffer.getView(c);Fo(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]=Jx;var m=this.indexBuffer.getView(v);nu(i,m);var y=this.colorBuffer.getView(v);Fo(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=Mi(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,Dz(this.r)),r.uniformMatrix3fv(o.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(o.uAtlasSize,this.batchManager.getAtlasSize());var p=Fo(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}}}])})(),BS={};BS.initWebgl=function(t,e){var r=this,i=r.data.contexts[r.WEBGL];t.bgColor=Yz(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=Nz(i),r.pickingFrameBuffer.needsDraw=!0,r.drawing=new Gz(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?kh.USE_BB:kh.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:kz,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:Ug(e.getLabelKey,null),getBoundingBox:jg(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:Ug(e.getSourceLabelKey,"source"),getBoundingBox:jg(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:Ug(e.getTargetLabelKey,"target"),getBoundingBox:jg(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:a("target-label")});var l=Xl(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()}),Kz(r)};function Yz(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return cT(r)}function LS(t,e){var r=t._private.rscratch;return hi(r,"labelWrapCachedLines",e)||[]}var Ug=function(e,r){return function(i){var n=e(i),a=LS(i,r);return a.length>1?a.map(function(o,s){return"".concat(n,"_").concat(s)}):n}},jg=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=LS(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 Kz(t){{var e=t.render;t.render=function(a){a=a||{};var o=t.cy;t.webgl&&(o.zoom()>IS?(Zz(t),e.call(t,a)):(Xz(t),VS(t,a,Nl.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 i4(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 Zz(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function Xz(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 Qz(t){var e=t.canvasWidth,r=t.canvasHeight,i=N0(t),n=i.pan,a=i.zoom,o=zg();vh(o,o,[n.x,n.y]),s0(o,o,[a,a]);var s=zg();Bz(s,e,r);var u=zg();return Fz(u,s,o),u}function zS(t,e){var r=t.canvasWidth,i=t.canvasHeight,n=N0(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 Jz(t,e){t.drawSelectionRectangle(e,function(r){return zS(t,r)})}function e4(t){var e=t.data.contexts[t.NODE];e.save(),zS(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 t4(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 r4(t,e,r,i,n){var a,o,s,u,l=N0(t),c=l.pan,d=l.zoom;{var f=Ez(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),VS(t,null,Nl.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),_=Iz(x)-1;_>=0&&w.add(_)}return w}function i4(t,e,r){var i=r4(t,e,r),n=t.getCachedZSortedEles(),a,o,s=Mi(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 $g(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 VS(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]&&Jz(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=Qz(t),u=t.getCachedZSortedEles();if(a=u.length,n.startFrame(s,r),r.screen){for(var l=0;l<u.nondrag.length;l++)$g(t,l,u.nondrag[l]);for(var c=0;c<u.drag.length;c++)$g(t,c,u.drag[c])}else if(r.picking)for(var d=0;d<u.length;d++)$g(t,d,u[d]);n.endFrame(),r.screen&&t.webglDebugShowAtlases&&(e4(t),t4(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=Mi(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 CS(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"?w0():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=Gg(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 eT=Math.sin(0),tT=Math.cos(0),u0={},l0={},HS=Math.PI/40;for(Bo=0*Math.PI;Bo<2*Math.PI;Bo+=HS)u0[Bo]=Math.sin(Bo),l0[Bo]=Math.cos(Bo);var Bo;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+=HS)a=e-s*u0[l]*eT+s*l0[l]*tT,o=r+u*l0[l]*eT+u*u0[l]*tT,l===0?t.moveTo(a,o):t.lineTo(a,o);t.closePath()};var ic={};ic.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]};ic.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 n4(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 rT(t){var e=t.indexOf(",");return t.substr(e+1)}function US(t,e,r){var i=function(){return e.toDataURL(r,t.quality)};switch(t.output){case"blob-promise":return new Cu(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 n4(rT(i()),r);case"base64":return rT(i());default:return i()}}ic.png=function(t){return US(t,this.bufferCanvasImage(t),"image/png")};ic.jpg=function(t){return US(t,this.bufferCanvasImage(t),"image/jpeg")};var jS={};jS.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 a4=$S,lt=$S.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 $S(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"};ZP()&&(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(le){c.style[le]=u[le]}),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=pi(),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 Q=q[0]._private,ee=Q.oldBackgroundTimestamp===Q.backgroundTimestamp;return!ee},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,Q,ee,oe,_e){return e.drawElement(q,Q,ee,!1,!1,_e)},T=function(q,Q,ee,oe,_e){return e.drawElementText(q,Q,ee,oe,"main",_e)},x=function(q,Q,ee,oe,_e){return e.drawElementText(q,Q,ee,oe,"source",_e)},_=function(q,Q,ee,oe,_e){return e.drawElementText(q,Q,ee,oe,"target",_e)},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,Q){return Q},A=function(q){return p(D(q))},R=function(q,Q,ee){var oe=q?q+"-":"";return{x:Q.x+ee.pstyle(oe+"text-margin-x").pfValue,y:Q.y+ee.pstyle(oe+"text-margin-y").pfValue}},N=function(q,Q,ee){var oe=q[0]._private.rscratch;return{x:oe[Q],y:oe[ee]}},L=function(q){return R("",N(q,"labelX","labelY"),q)},P=function(q){return R("source",N(q,"sourceLabelX","sourceLabelY"),q)},z=function(q){return R("target",N(q,"targetLabelX","targetLabelY"),q)},G=function(q){return h(D(q))},Y=function(q){return h(M(q))},V=function(q){return h(k(q))},W=function(q){var Q=E(q),ee=h(E(q));if(q.isNode()){switch(gu(q.pstyle("text-halign").value)){case"left":ee.x=-Q.w-(Q.leftPad||0);break;case"right":ee.x=-(Q.rightPad||0);break}switch(yu(q.pstyle("text-valign").value)){case"top":ee.y=-Q.h-(Q.topPad||0);break;case"bottom":ee.y=-(Q.botPad||0);break}}return ee},ce=e.data.eleTxrCache=new Ol(e,{getKey:v,doesEleInvalidateKey:g,drawElement:w,getBoundingBox:D,getRotationPoint:A,getRotationOffset:G,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),he=e.data.lblTxrCache=new Ol(e,{getKey:m,drawElement:T,getBoundingBox:E,getRotationPoint:L,getRotationOffset:W,isVisible:I}),de=e.data.slbTxrCache=new Ol(e,{getKey:y,drawElement:x,getBoundingBox:M,getRotationPoint:P,getRotationOffset:Y,isVisible:I}),me=e.data.tlbTxrCache=new Ol(e,{getKey:b,drawElement:_,getBoundingBox:k,getRotationPoint:z,getRotationOffset:V,isVisible:I}),Ce=e.data.lyrTxrCache=new AS(e);e.onUpdateEleCalcs(function(q,Q){ce.invalidateElements(Q),he.invalidateElements(Q),de.invalidateElements(Q),me.invalidateElements(Q),Ce.invalidateElements(Q);for(var ee=0;ee<Q.length;ee++){var oe=Q[ee]._private;oe.oldBackgroundTimestamp=oe.backgroundTimestamp}});var Se=function(q){for(var Q=0;Q<q.length;Q++)Ce.enqueueElementRefinement(q[Q].ele)};ce.onDequeue(Se),he.onDequeue(Se),de.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:G,getLabelRotationPoint:L,getSourceLabelRotationPoint:P,getTargetLabelRotationPoint:z,getLabelRotationOffset:W,getSourceLabelRotationOffset:Y,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 o4=typeof Path2D<"u";lt.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t};lt.usePaths=function(){return o4&&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};[OS,Wn,ma,P0,Ko,ao,vi,BS,oo,ic,jS].forEach(function(t){We(lt,t)});var s4=[{name:"null",impl:gS},{name:"base",impl:kS},{name:"canvas",impl:a4}],u4=[{type:"layout",extensions:AL},{type:"renderer",extensions:s4}],qS={},WS={};function GS(t,e,r){var i=r,n=function(D){Ht("Can not register `"+e+"` for `"+t+"` since `"+D+"` already exists in the prototype and can not be overridden")};if(t==="core"){if($l.prototype[e])return n(e);$l.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),kt(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)}};We(o,{createEmitter:function(){return this._private.emitter=new Vh(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}}),Vt.eventAliasesOn(o),i=a}else if(t==="renderer"&&e!=="null"&&e!=="base"){var p=YS("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 dT({map:qS,keys:[t,e],value:i})}function YS(t,e){return fT({map:qS,keys:[t,e]})}function l4(t,e,r,i,n){return dT({map:WS,keys:[t,e,r,i],value:n})}function c4(t,e,r,i){return fT({map:WS,keys:[t,e,r,i]})}var c0=function(){if(arguments.length===2)return YS.apply(null,arguments);if(arguments.length===3)return GS.apply(null,arguments);if(arguments.length===4)return c4.apply(null,arguments);if(arguments.length===5)return l4.apply(null,arguments);ar("Invalid extension access syntax")};$l.prototype.extension=c0;u4.forEach(function(t){t.extensions.forEach(function(e){GS(t.type,e.name,e.impl)})});var Mh=function(){if(!(this instanceof Mh))return new Mh;this.length=0},Go=Mh.prototype;Go.instanceString=function(){return"stylesheet"};Go.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this};Go.css=function(t,e){var r=this.length-1;if(Ue(t))this[r].properties.push({name:t,value:e});else if(kt(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=Hr.properties[o]||Hr.properties[Ih(o)];if(u!=null){var l=u.name,c=s;this[r].properties.push({name:l,value:c})}}}return this};Go.style=Go.css;Go.generateStyle=function(t){var e=new Hr(t);return this.appendToStyle(e)};Go.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 d4="3.34.0",to=function(e){if(e===void 0&&(e={}),kt(e))return new $l(e);if(Ue(e))return c0.apply(c0,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 bT(t)};to.version=d4;to.stylesheet=to.Stylesheet=Mh;var f4=["graph"],Yh=class t{injector=C(li);route=C(Vi);router=C(Ei);graphHost=Ti.required("graph");graph;selectedNodeId;hoveredNodeId;project=U.required();featureCode=U(null);layout=ye("breadthfirst");generations=ye(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=Z({type:t,selectors:[["graph"]],viewQuery:function(r,i){r&1&&_i(i.graphHost,f4,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&&(Ta(0,"div",1,0),ci(2,"div",2)(3,"label"),j(4," \u0412\u0438\u0434 \u0433\u0440\u0430\u0444\u0430 "),ci(5,"select",3),rs("change",function(a){return i.onLayoutChange(a)}),ci(6,"option",4),j(7,"\u0417\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438"),Sn(),ci(8,"option",5),j(9,"\u041A\u0440\u0443\u0433"),Sn(),ci(10,"option",6),j(11,"\u041A\u043E\u043D\u0446\u0435\u043D\u0442\u0440\u0438\u0447\u0435\u0441\u043A\u0438\u0439"),Sn(),ci(12,"option",7),j(13,"\u0412\u0435\u0441\u043E\u0432\u043E\u0439"),Sn()()(),ci(14,"label"),j(15," \u041F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0439 "),ci(16,"input",8),rs("input",function(a){return i.onGenerationsChange(a)}),Sn()()()),r&2&&(O(5),Fr("value",i.layout()),O(11),Fr("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 h4=["editor"],nc=()=>[],p4=()=>({mode:"graph"}),v4=()=>({mode:"edit"}),F0=()=>({mode:"view"});function m4(t,e){t&1&&(B(0,"a",5),be(1,"tui-icon",12),j(2,"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C "),F()),t&2&&X("routerLink",Ai(2,nc))("queryParams",Ai(3,v4))}function g4(t,e){if(t&1&&(B(0,"a",10),be(1,"tui-icon",11),j(2," \u0417\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438 "),F(),ne(3,m4,3,4,"a",5)),t&2){let r=$(2);X("routerLink",Ai(3,nc))("queryParams",Ai(4,p4)),O(3),ae(r.readOnly()?-1:3)}}function y4(t,e){if(t&1){let r=Pt();B(0,"a",13),j(1," \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "),F(),B(2,"button",14),ge("click",function(){Ct(r);let n=$(2);return wt(n.saveChanges())}),j(3," \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C "),F()}if(t&2){let r=$(2);X("routerLink",Ai(3,nc))("queryParams",Ai(4,F0)),O(2),X("disabled",!r.hasChanges())}}function b4(t,e){t&1&&(B(0,"a",5),j(1,"\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044F"),F()),t&2&&X("routerLink",Ai(2,nc))("queryParams",Ai(3,F0))}function C4(t,e){t&1&&(B(0,"a",5),j(1,"\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0435\u0439"),F()),t&2&&X("routerLink",Ai(2,nc))("queryParams",Ai(3,F0))}function w4(t,e){if(t&1&&(B(0,"div",9)(1,"tui-scrollbar"),be(2,"feature-compare",15),F()()),t&2){let r=$(2);O(2),X("feature",r)("origin",e)}}function _4(t,e){if(t&1&&ne(0,w4,3,2,"div",9),t&2){let r,i=$(2);ae((r=i.compareWith())?0:-1,r)}}function x4(t,e){if(t&1){let r=Pt();B(0,"div",8)(1,"feature-editor",16,0),ge("canClose",function(){Ct(r);let n=$(2);return wt(n.enterView())}),F()()}if(t&2){let r=$();O(),X("featureCode",r.code)}}function T4(t,e){if(t&1&&(B(0,"div",9),be(1,"graph",17),F()),t&2){let r=$(),i=$();O(),X("project",i.project())("featureCode",r.code)}}function S4(t,e){if(t&1&&(B(0,"div",9)(1,"tui-scrollbar"),be(2,"feature-content",18),F()()),t&2){let r=$();O(2),X("feature",r)}}function D4(t,e){if(t&1){let r=Pt();B(0,"div",3)(1,"h2"),j(2),F(),B(3,"div",4),ne(4,g4,4,5)(5,y4,4,5)(6,b4,2,4,"a",5)(7,C4,2,4,"a",5),F()(),be(8,"div",6),B(9,"div",6)(10,"div")(11,"b"),j(12,"\u041A\u043E\u0434:"),F(),B(13,"tui-copy"),j(14),F()(),B(15,"feature-history-selector",7),ge("valueChange",function(n){Ct(r);let a=$();return wt(a.onCompareWithChange(n))}),F()(),ne(16,_4,1,1)(17,x4,3,1,"div",8)(18,T4,2,2,"div",9)(19,S4,3,1,"div",9)}if(t&2){let r,i,n=e,a=$();O(2),Br(n.title),O(2),ae((r=a.mode())==="view"?4:r==="edit"?5:r==="compare"?6:r==="graph"?7:-1),O(10),we(" ",n.code," "),O(),X("featureCode",n.code)("value",a.compareWith()),O(),ae((i=a.mode())==="compare"?16:i==="edit"?17:i==="graph"?18:i==="view"?19:-1)}}function E4(t,e){t&1&&(B(0,"div",2),j(1,"\u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043E"),F())}var Kh=class t{router=C(Ei);readOnly=C(ii).readOnly;mode=U.required({transform:e=>e==="edit"?"edit":e==="compare"?"compare":e==="graph"?"graph":"view"});project=U.required();feature=U.required();editor=Ti("editor");compareWith=ye(null);graphMode=ye(!1);hasChanges=J(()=>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=Z({type:t,selectors:[["feature-presenter"]],viewQuery:function(r,i){r&1&&_i(i.editor,h4,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&&(B(0,"div",1),ne(1,D4,20,6)(2,E4,2,0,"div",2),F()),r&2){let n;O(),ae((n=i.feature())?1:2,n)}},dependencies:[af,ws,qf,zf,ti,Fi,$f,Nf,Yh,Hs],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 k4=(t,e)=>e.valueCode;function M4(t,e){t&1&&be(0,"tui-icon",8),t&2&&st("font-size",16,"px")}function I4(t,e){t&1&&be(0,"tui-icon",9),t&2&&st("font-size",16,"px")}function A4(t,e){if(t&1&&(B(0,"span",11),j(1),F()),t&2){let r=$(2);O(),we(" ",r.node().counters.skipped," / ")}}function O4(t,e){if(t&1&&(B(0,"span",12),j(1),F()),t&2){let r=$(2);O(),we(" ",r.node().counters.failed," / ")}}function R4(t,e){if(t&1&&(B(0,"div",5)(1,"span",10),j(2),F(),ne(3,A4,2,1,"span",11),ne(4,O4,2,1,"span",12),B(5,"span",13),j(6),F()()),t&2){let r=$();O(2),we(" ",r.node().automatedCount," / "),O(),ae(r.node().counters.skipped?3:-1),O(),ae(r.node().counters.failed?4:-1),O(2),we(" ",r.node().totalCount," ")}}function P4(t,e){if(t&1){let r=Pt();B(0,"feature-tree-node",16),ge("expandedChange",function(n){Ct(r);let a=$(2);return wt(a.expandedChange.emit(n))}),F()}if(t&2){let r=e.$implicit,i=$(2);X("node",r)("nodePath",i.nodePath()+"/"+r.valueCode)("expandedNodes",i.expandedNodes())}}function N4(t,e){if(t&1&&be(0,"feature-item",15),t&2){let r=e.$implicit;X("featureCode",r)}}function F4(t,e){if(t&1&&(dt(0,P4,1,3,"feature-tree-node",14,k4),dt(2,N4,1,1,"feature-item",15,bi)),t&2){let r=$();ft(r.node().children),O(2),ft(r.node().features)}}var Zh=class t{node=U.required();nodePath=U.required();expandedNodes=U(new Set);expandedChange=xi();expanded=J(()=>this.expandedNodes().has(this.nodePath()));toggleExpanded(){this.expandedChange.emit(this.nodePath())}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["feature-tree-node"]],inputs:{node:[1,"node"],nodePath:[1,"nodePath"],expandedNodes:[1,"expandedNodes"]},outputs:{expandedChange:"expandedChange"},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"],[1,"status"],[1,"children"],["icon","@tui.chevron-down"],["icon","@tui.chevron-right"],["tuiHint","\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u043E","tuiHintAppearance","floating"],["tuiHint","\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E","tuiHintAppearance","floating",1,"skipped"],["tuiHint","\u041F\u0440\u043E\u0432\u0430\u043B\u0435\u043D\u043E","tuiHintAppearance","floating",1,"failed"],["tuiHint","\u0412\u0441\u0435\u0433\u043E","tuiHintAppearance","floating"],[3,"node","nodePath","expandedNodes"],[3,"featureCode"],[3,"expandedChange","node","nodePath","expandedNodes"]],template:function(r,i){r&1&&(B(0,"div",0),ge("click",function(){return i.toggleExpanded()}),B(1,"div",1),ne(2,M4,1,2,"tui-icon",2)(3,I4,1,2,"tui-icon",3),B(4,"span"),j(5),F()(),B(6,"div",4),ne(7,R4,7,4,"div",5),be(8,"div",6),F()(),B(9,"div",7),ne(10,F4,4,0),F()),r&2&&(O(2),ae(i.expanded()?2:3),O(2),is(i.node().gitStatus),O(),we(" ",i.node().valueTitle??i.node().valueCode," "),O(2),ae(i.node().totalCount>0?7:-1),O(),is(i.node().gitStatus),O(),Qe("expanded",i.expanded()),O(),ae(i.expanded()?10:-1))},dependencies:[t,Us,Fi,mn],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[_ngcontent-%COMP%] .skipped[_ngcontent-%COMP%]{color:var(--tui-status-warning)}.counters[_ngcontent-%COMP%] .failed[_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 B4=(t,e)=>e.valueCode;function L4(t,e){if(t&1){let r=Pt();B(0,"feature-tree-node",1),ge("expandedChange",function(n){Ct(r);let a=$();return wt(a.toggleExpanded(n))}),F()}if(t&2){let r=e.$implicit,i=$();X("node",r)("nodePath",r.valueCode)("expandedNodes",i.expandedNodes())}}var Xh=class t{tree=U.required();activeFeatureCode=U(null);expandedNodes=ns({source:J(()=>this.activeFeatureCode()),computation:(e,r)=>{let i=new Set(r?.value??[]);return e&&this.nodesContainingFeature(it(()=>this.tree()).root,e).forEach(n=>i.add(n)),i}});toggleExpanded(e){this.expandedNodes.update(r=>{let i=new Set(r);return i.has(e)?i.delete(e):i.add(e),i})}nodesContainingFeature(e,r){let i=new Set,n=(a,o)=>{let s=a.children.map(l=>n(l,o?`${o}/${l.valueCode}`:l.valueCode)).some(Boolean),u=a.features.includes(r)||s;return u&&o&&i.add(o),u};return n(e,""),i}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["feature-tree"]],inputs:{tree:[1,"tree"],activeFeatureCode:[1,"activeFeatureCode"]},decls:2,vars:0,consts:[[3,"node","nodePath","expandedNodes"],[3,"expandedChange","node","nodePath","expandedNodes"]],template:function(r,i){r&1&&dt(0,L4,1,3,"feature-tree-node",0,B4),r&2&&ft(i.tree().root.children)},dependencies:[Zh],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}"]})};function z4(t,e){if(t&1&&be(0,"tui-data-list-wrapper",5),t&2){let r=$();X("items",r.projectSnapshot().trees)}}var Qh=class t{projectSnapshot=U.required();search=qi();activeTree=qi(null);featureCodes=xi();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=Z({type:t,selectors:[["nav-controls"]],inputs:{projectSnapshot:[1,"projectSnapshot"],search:[1,"search"],activeTree:[1,"activeTree"]},outputs:{search:"searchChange",activeTree:"activeTreeChange",featureCodes:"featureCodes"},features:[xe([ad({stringify:ye(e=>e.title),identityMatcher:ye((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&&(B(0,"tui-textfield",0)(1,"input",1),ln("ngModelChange",function(a){return un(i.search,a)||(i.search=a),a}),F(),fo(),F(),B(2,"tui-textfield",2)(3,"input",3),ln("ngModelChange",function(a){return un(i.activeTree,a)||(i.activeTree=a),a}),F(),fo(),Me(4,z4,1,1,"tui-data-list-wrapper",4),F()),r&2&&(O(),sn("ngModel",i.search),ho(),O(2),sn("ngModel",i.activeTree),ho())},dependencies:[ka,us,ls,cn,js,of,nf,di,Ds,xo,Zu],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1em}"]})};function V4(t,e){if(t&1&&be(0,"feature-tree",2),t&2){let r=$();X("tree",e)("activeFeatureCode",r.activeFeature()?.code??null)}}function H4(t,e){if(t&1&&be(0,"feature-list",3),t&2){let r=$();X("featureCodes",r.featureCodes())}}var Jh=class t{router=C(Ei);activeFeatureService=C(ca);projectSnapshot=U.required();activeTree=U.required();activeFeature=U.required();mode=U.required();featureCodes=ye([]);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=Z({type:t,selectors:[["feature-page-presenter"]],inputs:{projectSnapshot:[1,"projectSnapshot"],activeTree:[1,"activeTree"],activeFeature:[1,"activeFeature"],mode:[1,"mode"]},features:[xe([ca])],decls:7,vars:6,consts:[[1,"tree-container"],[3,"featureCodes","activeTreeChange","projectSnapshot","activeTree"],[3,"tree","activeFeatureCode"],[3,"featureCodes"],[1,"content"],[3,"feature","project","mode"]],template:function(r,i){if(r&1&&(B(0,"section",0)(1,"nav-controls",1),ge("featureCodes",function(a){return i.setFeatureCodes(a)})("activeTreeChange",function(a){return i.setActiveTree(a)}),F(),B(2,"tui-scrollbar"),ne(3,V4,1,2,"feature-tree",2)(4,H4,1,1,"feature-list",3),F()(),B(5,"section",4),be(6,"feature-presenter",5),F()),r&2){let n;O(),X("projectSnapshot",i.projectSnapshot())("activeTree",i.activeTree()),O(2),ae((n=i.activeTree())?3:4,n),O(3),X("feature",i.activeFeature())("project",i.projectSnapshot())("mode",i.mode())}},dependencies:[Xh,rf,Qh,Kh,ws],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 U4(t,e){if(t&1&&(B(0,"div",2)(1,"div",3),j(2),F(),j(3),B(4,"div",4),j(5),F()()),t&2){let r=e.$implicit,i=$(3);X("appearance",i.severityToAppearance(r.severity)),O(2),we(" ",r.code," "),O(),we(" ",r.message," "),O(2),we(" ",r.path," ")}}function j4(t,e){t&1&&(B(0,"div",0),dt(1,U4,6,4,"div",2,on),F()),t&2&&(O(),ft(e))}function $4(t,e){if(t&1&&be(0,"feature-page-presenter",1),t&2){let r=$(2);X("projectSnapshot",r.projectSnapshotResource.value())("activeFeature",r.activeFeature())("activeTree",r.activeTree())("mode",r.mode())}}function q4(t,e){if(t&1&&ne(0,j4,3,0,"div",0)(1,$4,1,4,"feature-page-presenter",1),t&2){let r,i=$();ae((r=i.errors())?0:1,r)}}function W4(t,e){t&1&&j(0,` \u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...
|
|
436
|
+
`)}var ep=class t{titleService=C(kc);activatedRoute=C(Vi);projectService=C(ii);queryParams=Wi(this.activatedRoute.queryParams);queryTree=J(()=>this.queryParams()?.tree??null);queryFeature=J(()=>this.queryParams()?.feature??null);queryMode=J(()=>this.queryParams()?.mode??null);readOnly=this.projectService.readOnly;mode=J(()=>{let e=this.readOnly(),r=this.queryMode();return e&&r==="edit"?"view":r});projectSnapshotResource=this.projectService.projectResource;errors=J(()=>{if(this.projectSnapshotResource.hasValue()){let r=this.projectSnapshotResource.value().diagnostics.filter(i=>i.severity==="error");if(r.length)return r}return null});activeFeature=J(()=>{let e=this.queryFeature();return e&&this.projectSnapshotResource.hasValue()?this.projectSnapshotResource.value().features.find(r=>r.code===e)??null:null});activeTree=J(()=>{let e=this.queryTree();return e&&this.projectSnapshotResource.hasValue()?this.projectSnapshotResource.value().trees.find(r=>r.code===e)??null:null});featureCodes=ye([]);constructor(){ot(()=>{if(this.projectSnapshotResource.hasValue()){let e=this.activeFeature(),r=this.projectSnapshotResource.value();e?this.titleService.setTitle(`${r.project?.title??"SpecBoxTMS"} - ${e.title}`):this.titleService.setTitle(`${r.project?.title??"SpecBoxTMS"}`)}else this.titleService.setTitle("SpecBoxTMS")})}severityToAppearance(e){return e==="error"?"negative":"info"}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Z({type:t,selectors:[["features-page"]],features:[xe([ca])],decls:2,vars:1,consts:[[1,"error-container"],[3,"projectSnapshot","activeFeature","activeTree","mode"],["tuiNotification","",3,"appearance"],["tuiTitle",""],[1,""]],template:function(r,i){r&1&&ne(0,q4,2,1)(1,W4,1,0),r&2&&ae(i.projectSnapshotResource.hasValue()?0:1)},dependencies:[Jh,Xu],styles:["[_nghost-%COMP%]{display:contents}.error-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:4em;gap:1em}"]})};var KS=[{path:"",component:ep}];var G4={baseUrl:"assets",defaultOptions:{scrollBeyondLastLine:!1},requireConfig:{preferScriptTags:!0},monacoRequire:window.monacoRequire},ZS=()=>Dw(G4);var XS={providers:[ty(),jv(KS,$v()),qb(),{provide:tf,useValue:""},by({fullLibraryLoader:()=>import("./chunk-DLDSQNZX.js"),lineNumbersLoader:()=>import("./chunk-KOYISRC6.js")}),ZS()]};function Y4(t,e){t&1&&be(0,"tui-loader")}function K4(t,e){if(t&1){let r=Pt();B(0,"tui-badged-content")(1,"tui-badge-notification",4),j(2),F(),B(3,"div",5),ln("tuiDropdownOpenChange",function(n){Ct(r);let a=$(3);return un(a.infoOpen,n)||(a.infoOpen=n),wt(n)}),F()()}if(t&2){let r=$(3),i=pr(3);O(2),we(" ",r.info().length," "),O(),X("round",!1)("tuiDropdown",i),sn("tuiDropdownOpen",r.infoOpen)}}function Z4(t,e){if(t&1){let r=Pt();B(0,"tui-badged-content")(1,"tui-badge-notification",4),j(2),F(),B(3,"div",6),ln("tuiDropdownOpenChange",function(n){Ct(r);let a=$(3);return un(a.warningsOpen,n)||(a.warningsOpen=n),wt(n)}),F()()}if(t&2){let r=$(3),i=pr(5);O(2),we(" ",r.warnings().length," "),O(),X("round",!1)("tuiDropdown",i),sn("tuiDropdownOpen",r.warningsOpen)}}function X4(t,e){if(t&1){let r=Pt();B(0,"tui-badged-content")(1,"tui-badge-notification",4),j(2),F(),B(3,"div",7),ln("tuiDropdownOpenChange",function(n){Ct(r);let a=$(3);return un(a.errorsOpen,n)||(a.errorsOpen=n),wt(n)}),F()()}if(t&2){let r=$(3),i=pr(7);O(2),we(" ",r.errors().length," "),O(),X("round",!1)("tuiDropdown",i),sn("tuiDropdownOpen",r.errorsOpen)}}function Q4(t,e){if(t&1&&(ne(0,K4,4,4,"tui-badged-content"),ne(1,Z4,4,4,"tui-badged-content"),ne(2,X4,4,4,"tui-badged-content")),t&2){let r=$(2);ae(r.info().length?0:-1),O(),ae(r.warnings().length?1:-1),O(),ae(r.errors().length?2:-1)}}function J4(t,e){t&1&&be(0,"div",3),t&2&&X("round",!1)}function e3(t,e){if(t&1&&ne(0,Q4,3,3)(1,J4,1,1,"div",3),t&2){let r=$();ae(r.hasErrors()?0:1)}}function t3(t,e){if(t&1&&(B(0,"div",8)(1,"div",9),j(2),F(),j(3),B(4,"div",10),j(5),F()()),t&2){let r=e.$implicit,i=$(2);X("appearance",i.severityToAppearance(r.severity)),O(2),we(" ",r.code," "),O(),we(" ",r.message," "),O(2),we(" ",r.path," ")}}function r3(t,e){if(t&1&&(B(0,"tui-data-list"),dt(1,t3,6,4,"div",8,on),F()),t&2){let r=$();st("max-inline-size",35,"rem"),O(),ft(r.info())}}function i3(t,e){if(t&1&&(B(0,"div",11)(1,"div",9),j(2),F(),j(3),B(4,"div",10),j(5),F()()),t&2){let r=e.$implicit,i=$(2);X("appearance",i.severityToAppearance(r.severity)),O(2),we(" ",r.code," "),O(),we(" ",r.message," "),O(2),we(" ",r.path," ")}}function n3(t,e){if(t&1&&(B(0,"tui-data-list"),dt(1,i3,6,4,"div",11,on),F()),t&2){let r=$();st("max-inline-size",35,"rem"),O(),ft(r.warnings())}}function a3(t,e){if(t&1&&(B(0,"div",11)(1,"div",9),j(2),F(),j(3),B(4,"div",10),j(5),F()()),t&2){let r=e.$implicit,i=$(2);X("appearance",i.severityToAppearance(r.severity)),O(2),we(" ",r.code," "),O(),we(" ",r.message," "),O(2),we(" ",r.path," ")}}function o3(t,e){if(t&1&&(B(0,"tui-data-list"),dt(1,a3,6,4,"div",11,on),F()),t&2){let r=$();st("max-inline-size",35,"rem"),O(),ft(r.errors())}}var tp=class t{projectResource=C(ii).projectResource;diagnostics=J(()=>this.projectResource.hasValue()?this.projectResource.value().diagnostics:null);hasErrors=J(()=>{let e=this.diagnostics();return e==null?!1:e.length>0});info=J(()=>this.diagnostics()?.filter(e=>e.severity==="info")??[]);warnings=J(()=>this.diagnostics()?.filter(e=>e.severity==="warning")??[]);errors=J(()=>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=Z({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&&(ne(0,Y4,1,0,"tui-loader")(1,e3,2,1),Me(2,r3,3,2,"ng-template",null,0,Ri)(4,n3,3,2,"ng-template",null,1,Ri)(6,o3,3,2,"ng-template",null,2,Ri)),r&2&&ae(i.projectResource.isLoading()?0:1)},dependencies:[Td,zC,LC,BC,Xu,PC,Pn,av,kr,sa,mn],styles:["[_nghost-%COMP%]{display:flex;gap:.4em}"]})};function s3(t,e){t&1&&j(0),t&2&&we(" - ",e," ")}var rp=class t{projectService=C(ii);theme=ye(this.savedTheme());themeButtonIcon=J(()=>{let e=this.theme();return e==="dark"?"@tui.moon":e==="light"?"@tui.sun":"@tui.sun-moon"});title=J(()=>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=Z({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&&(B(0,"tui-root")(1,"div",0)(2,"div",1),be(3,"img",2),B(4,"h2"),j(5," SpecBoxTMS "),ne(6,s3,1,1),F()(),B(7,"div",3),be(8,"diagnostics"),B(9,"button",4),ge("click",function(){return i.toggleTheme()}),j(10," \u0422\u0435\u043C\u0430 "),F()()(),B(11,"main"),be(12,"router-outlet"),F()()),r&2){let n;Ve("tuiTheme",i.theme()),O(6),ae((n=i.title())?6:-1,n),O(3),st("border-radius",100,"%"),X("iconStart",i.themeButtonIcon())}},dependencies:[fl,I1,ti,tp],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}"]})};gy(rp,XS).catch(t=>console.error(t));
|