@keadex/mina-react 2.5.0 → 2.7.0
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.
|
Binary file
|
|
Binary file
|
package/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _,e,t,n,r={196:(_,e,t)=>{var n=t(457);_.exports=t.v(e,_.id,"a527290d042c82f3ecdb",{"./mina_react_bg.js":{__wbg_debug_3cb59063b29f58c1:n.F$t,__wbg_error_524f506f44df1645:n.pWA,__wbg_info_3daf2e093e091b66:n.ZrD,__wbg_log_c222819a41e063d3:n.pR9,__wbg_warn_4ca3906c248c47c4:n.jwJ,__wbindgen_string_new:n.ycJ,__wbindgen_string_get:n.qNE,__wbindgen_bigint_get_as_i64:n.DMD,__wbindgen_debug_string:n.rl,__wbindgen_throw:n.Qnr,__wbindgen_memory:n.Py0,__wbg_get_b9b93047fe3cf45b:n.RKz,__wbg_length_e2d2a49132c1b256:n.Ry,__wbg_new_78feb108b6472713:n.M2,__wbindgen_number_new:n.QRK,__wbindgen_is_function:n.PRY,__wbg_newnoargs_105ed471475aaf50:n.VrZ,__wbg_new_5e0be73521bc8c17:n.aIY,__wbindgen_is_object:n.qvD,__wbg_next_25feadfc0913fea9:n.yqB,__wbg_next_6574e1a8a62d1055:n.Dn4,__wbg_done_769e5ede4b31c67b:n.Xb8,__wbg_value_cd1ffa7b1ab794f1:n.LMq,__wbg_iterator_9a24c88df860dc65:n.eW0,__wbg_get_67b2ba62fc30de12:n.dzD,__wbg_call_672a4d21634d4a24:n.wHY,__wbg_new_405e22f390576ce2:n.va5,__wbindgen_is_string:n.GuA,__wbindgen_number_get:n.sWe,__wbg_stringify_f7ed6987935b4a24:n.Y6F,__wbindgen_is_undefined:n.vUM,__wbg_set_37837023f3d740e8:n.p8e,__wbg_isArray_a1eab7e0d067391b:n.uod,__wbg_push_737cfc8c1432c2c6:n.tZf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:n.gGA,__wbg_instanceof_Error_4d54113b22d20306:n.fcg,__wbg_new_c68d7209be747379:n.wd3,__wbg_message_97a2af9b89d693a3:n.oGe,__wbg_call_7cccdd69e0791ae2:n.w9h,__wbg_set_8fc6bf8a5b1071d1:n.iAh,__wbg_next_c3ab0d59847b3b5c:n.tER,__wbg_isSafeInteger_343e2beeeece1bb0:n.Yb6,__wbg_entries_3265d4158b33e5dc:n.gHg,__wbg_new_23a2665fac83c611:n.c6u,__wbg_resolve_4851785c9c5f573d:n.wJz,__wbg_then_44b73946d2fb3e7d:n.GQG,__wbg_then_48b406749878a531:n.xV_,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:n.w6e,__wbg_static_accessor_SELF_37c5d418e4bf5819:n.fb$,__wbg_static_accessor_WINDOW_5de37043a91a9c40:n.x0C,__wbg_static_accessor_GLOBAL_88a902d13a557d07:n.ii7,__wbg_buffer_609cc3eee51ed158:n.FHK,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:n.hI8,__wbg_new_a12002a7f91c75be:n.vVD,__wbg_set_65595bdd868b3009:n.HBq,__wbg_length_a446193dc22c12f8:n.eIr,__wbg_instanceof_Uint8Array_17156bcf118086a9:n.SJf,__wbg_newwithlength_a381634e90c276d4:n.HtP,__wbg_buffer_09165b52af8c5237:n._Ue,__wbg_subarray_aa9065fa9dc5df96:n.TOc,__wbg_byteLength_e674b853d9c77e1d:n.x6W,__wbg_byteOffset_fd862df290ef848d:n.cyg,__wbg_setkeepexistingdata_ee7c8cb466e9477f:n.aKt,__wbg_signal_aaf9ad74119f20a4:n.CF8,__wbg_new_e25e5aab09ff45db:n.RG9,__wbg_abort_775ef1d17fc65868:n.gMQ,__wbg_setcreate_4ca762e23d9f78da:n.N9Q,__wbg_setbody_5923b78a95eedf29:n.Nhd,__wbg_setcredentials_c3a22f1cd105a2c6:n.uw1,__wbg_setheaders_834c0bdb6a8949ad:n.rk2,__wbg_setmethod_3c5280fe5d890842:n._hX,__wbg_setmode_5dc300b865044b65:n.BFX,__wbg_setsignal_75b21ef3a81de905:n.l0x,__wbg_settype_39ed370d3edd403c:n.a4S,__wbg_setrecursive_536113a081d6177a:n.ugc,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:n.KA3,__wbg_createWritable_b4ed240dc879905e:n.kPb,__wbg_getFile_2607bc0123c724e0:n.ycy,__wbg_byobRequest_77d9adf63337edfb:n.JpR,__wbg_close_5ce03e29be453811:n.sQY,__wbg_view_fd8a56e8983f448d:n.NgT,__wbg_respond_1f279fa9f8edcb1c:n.dSQ,__wbg_close_24caca68e93b9c03:n.jeC,__wbg_setcreate_139bad94b2874fb5:n.kF0,__wbg_close_304cc1fef3466669:n.oaw,__wbg_enqueue_bb16ba72f537dc9e:n.QHd,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:n.Cjr,__wbg_entries_19efe296f7d36df9:n.RCF,__wbg_getDirectoryHandle_c48a138373d79b3d:n.kTu,__wbg_getFileHandle_5fb877d1ecc74d52:n.Wkh,__wbg_removeEntry_9f6bc325e3383e59:n.m_N,__wbg_removeEntry_a424e90dff229b19:n.lkn,__wbg_name_e4a115def9e2bbaa:n.Yeo,__wbg_new_018dcc2d6c8c2f6a:n.RR8,__wbg_append_8c7dd8d641a5f01b:n.Tbm,__wbg_newwithstrandinit_06c535e0a867c635:n.heb,__wbg_seek_3f0f8d7591f648d7:n.Zk3,__wbg_write_3e4e8c264c8bf357:n.aR4,__wbg_new_9fd39a253424609a:n.z09,__wbg_append_b44785ebeb668479:n.d_N,__wbg_append_b2d1fc16de2a0e81:n.WqA,__wbg_append_299d5d48292c0495:n.cVx,__wbg_has_a5ea9117f258a0ec:n.HSm,__wbg_fetch_509096533071c657:n.gRe,__wbg_fetch_4465c2b10f21a927:n.o0R,__wbg_size_3808d41635a9c259:n.$CF,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:n.qe7,__wbg_arrayBuffer_f18c144cd0125f07:n.RGi,__wbg_text_1f39a8afe3c70a99:n.CFe,__wbindgen_cb_drop:n.LCp,__wbg_queueMicrotask_97d92b4fcc8a61c5:n._mt,__wbg_queueMicrotask_d3219def82552485:n.k2R,__wbindgen_jsval_loose_eq:n.U8c,__wbindgen_boolean_get:n.NhE,__wbindgen_as_number:n.qmw,__wbg_String_1b2069caba3b9783:n.JF5,__wbindgen_error_new:n.RjG,__wbindgen_bigint_from_u64:n.Qg3,__wbg_getwithrefkey_2d7fdfea9645a25b:n.A2U,__wbg_set_2873a5cee2324875:n.v1k,__wbg_new_8a6f238a6ece86ea:n.$Pc,__wbg_stack_0ed75d68575b0f3c:n.x$X,__wbg_error_7534b8e9a36f1ab4:n.WYM,__wbg_crypto_ed58b8e10a292839:n.ilI,__wbg_process_5c1d670bc53614b8:n.Evb,__wbg_versions_c71aa1626a93e0a1:n.ooJ,__wbg_node_02999533c4ea02e3:n.OtZ,__wbg_require_79b1e9274cde3c87:n.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:n.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:n.NNx,__wbg_getRandomValues_bcb4912f16000dc4:n.FGp,__wbg_softwaresystem_unwrap:n.qre,__wbg_point_new:n.nA9,__wbg_boundary_new:n.HCo,__wbg_person_new:n.c1W,__wbg_diagram_new:n.YLb,__wbg_component_new:n.WJm,__wbg_minaerror_new:n.EkI,__wbg_relationship_new:n.NpJ,__wbg_deploymentnode_new:n.ezj,__wbg_shape_new:n._cl,__wbg_container_new:n.e57,__wbg_diagramelementspec_new:n.Dr_,__wbg_softwaresystem_new:n.dM0,__wbg_diagramelementspec_unwrap:n.W3f,__wbg_point_unwrap:n._QJ,__wbg_container_unwrap:n.xB8,__wbg_relationship_unwrap:n.KM7,__wbg_component_unwrap:n.dT0,__wbg_deploymentnode_unwrap:n._Zx,__wbg_person_unwrap:n.Xv$,__wbg_shape_unwrap:n.D7n,__wbg_boundary_unwrap:n.Wq,__wbg_instanceof_File_a4e2256bf71955a9:n.gjJ,__wbg_lastModified_7a9e61b3961224b8:n.gvw,__wbg_instanceof_Response_f2cc20d9f7dfd644:n.Hzn,__wbg_url_ae10c34ca209681d:n.Tp3,__wbg_status_f6360336ca686bf0:n.kK3,__wbg_headers_9cb51cfd2ac780a4:n.Moj,__wbg_arrayBuffer_d1b44c4390db422f:n._iy,__wbindgen_is_bigint:n.YkQ,__wbindgen_jsval_eq:n.BGI,__wbindgen_in:n.zEy,__wbindgen_closure_wrapper1864:n.kIB,__wbindgen_init_externref_table:n.bLn}})},457:(_,e,t)=>{let n;function r(_){n=_}t.d(e,{$CF:()=>xt,$Pc:()=>Ie,A2U:()=>ne,BFX:()=>yt,BGI:()=>sn,CF8:()=>zt,CFe:()=>Jt,Cjr:()=>ge,D7n:()=>Ft,DMD:()=>$t,Dn4:()=>Ce,Dr_:()=>C_,EkI:()=>Re,Evb:()=>Te,F$t:()=>M_,FGp:()=>_e,FHK:()=>R_,GQG:()=>Mt,GuA:()=>rn,HBq:()=>gt,HCo:()=>m_,HOd:()=>Fe,HSm:()=>re,HtP:()=>Me,Hzn:()=>we,JD7:()=>j,JF5:()=>b_,JpR:()=>F_,KA3:()=>ce,KM7:()=>_t,LCp:()=>Pt,LMq:()=>Wt,Llp:()=>k,Ltb:()=>nt,M2:()=>De,Moj:()=>ie,N9Q:()=>ut,NNx:()=>Ve,NgT:()=>Lt,NhE:()=>Tt,Nhd:()=>bt,NpJ:()=>Xe,OtZ:()=>Ne,Oxg:()=>z,PRY:()=>tn,Py0:()=>gn,QHd:()=>U_,QRK:()=>bn,Qg3:()=>Yt,Qnr:()=>dn,RCF:()=>Q_,RG9:()=>Ee,RGi:()=>y_,RKz:()=>te,RR8:()=>xe,RjG:()=>Vt,Ry:()=>me,SJf:()=>ue,TOc:()=>Ht,Tbm:()=>d_,Tp3:()=>Gt,U8c:()=>on,VrZ:()=>He,W3f:()=>L_,WJm:()=>S_,WYM:()=>T_,Wkh:()=>V_,Wq:()=>h_,WqA:()=>l_,Xb8:()=>N_,Xv$:()=>Qe,Y6F:()=>Et,YLb:()=>W_,Yb6:()=>le,Yeo:()=>ze,YkQ:()=>en,Zk3:()=>at,ZrD:()=>ae,_Cc:()=>F,_QJ:()=>$e,_Ue:()=>v_,_Zx:()=>G_,_cl:()=>Rt,_hX:()=>ft,_iy:()=>f_,_mt:()=>Ke,a4S:()=>vt,aIY:()=>Oe,aKt:()=>pt,aR4:()=>Ut,bLn:()=>_n,c1W:()=>Ue,c6u:()=>ke,cVx:()=>u_,cyg:()=>x_,dM0:()=>kt,dSQ:()=>it,dT0:()=>q_,d_N:()=>p_,dzD:()=>ee,e57:()=>A_,eIr:()=>ye,eW0:()=>pe,ezj:()=>B_,fb$:()=>St,fcg:()=>oe,gGA:()=>se,gHg:()=>Y_,gMQ:()=>w_,gRe:()=>K_,gjJ:()=>be,gvw:()=>fe,hI8:()=>Je,heb:()=>Be,iAh:()=>ct,ii7:()=>Dt,ilI:()=>J_,jeC:()=>O_,jwJ:()=>Nt,k2R:()=>Ze,kF0:()=>wt,kIB:()=>Kt,kK3:()=>At,kPb:()=>H_,kTu:()=>Z_,l0x:()=>ht,lIU:()=>r,lkn:()=>tt,m_N:()=>et,nA9:()=>Ye,o0R:()=>P_,oGe:()=>ve,oaw:()=>D_,ooJ:()=>Ct,p8e:()=>ot,pR9:()=>he,pWA:()=>$_,qNE:()=>wn,qe7:()=>Ge,qmw:()=>Qt,qre:()=>jt,qvD:()=>nn,rk2:()=>lt,rl:()=>Zt,sQY:()=>I_,sWe:()=>cn,tER:()=>Le,tZf:()=>Pe,ugc:()=>mt,uod:()=>de,uw1:()=>dt,v1k:()=>st,vUM:()=>an,vVD:()=>qe,va5:()=>je,w6e:()=>It,w9h:()=>j_,wHY:()=>k_,wJz:()=>rt,wd3:()=>Ae,x$X:()=>Ot,x0C:()=>qt,x6W:()=>z_,xB8:()=>E_,xV_:()=>Bt,ycJ:()=>un,ycy:()=>X_,yqB:()=>We,z09:()=>Se,zEy:()=>Xt}),_=t.hmd(_);let i=0,a=null;function s(){return null!==a&&0!==a.byteLength||(a=new Uint8Array(n.memory.buffer)),a}let o=new("undefined"==typeof TextEncoder?(0,_.require)("util").TextEncoder:TextEncoder)("utf-8");const g="function"==typeof o.encodeInto?function(_,e){return o.encodeInto(_,e)}:function(_,e){const t=o.encode(_);return e.set(t),{read:_.length,written:t.length}};function c(_,e,t){if(void 0===t){const t=o.encode(_),n=e(t.length,1)>>>0;return s().subarray(n,n+t.length).set(t),i=t.length,n}let n=_.length,r=e(n,1)>>>0;const a=s();let c=0;for(;c<n;c++){const e=_.charCodeAt(c);if(e>127)break;a[r+c]=e}if(c!==n){0!==c&&(_=_.slice(c)),r=t(r,n,n=c+3*_.length,1)>>>0;const e=s().subarray(r+c,r+n);c+=g(_,e).written,r=t(r,n,c,1)>>>0}return i=c,r}let b=null;function w(){return(null===b||!0===b.buffer.detached||void 0===b.buffer.detached&&b.buffer!==n.memory.buffer)&&(b=new DataView(n.memory.buffer)),b}let u=new("undefined"==typeof TextDecoder?(0,_.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function d(_,e){return _>>>=0,u.decode(s().subarray(_,_+e))}function l(_){const e=n.__externref_table_alloc();return n.__wbindgen_export_4.set(e,_),e}function p(_,e){try{return _.apply(this,e)}catch(_){const e=l(_);n.__wbindgen_exn_store(e)}}function f(_){return null==_}u.decode();const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{n.__wbindgen_export_6.get(_.dtor)(_.a,_.b)}));function m(_){const e=typeof _;if("number"==e||"boolean"==e||null==_)return`${_}`;if("string"==e)return`"${_}"`;if("symbol"==e){const e=_.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=_.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(_)){const e=_.length;let t="[";e>0&&(t+=m(_[0]));for(let n=1;n<e;n++)t+=", "+m(_[n]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(_));let n;if(!(t&&t.length>1))return toString.call(_);if(n=t[1],"Object"==n)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:n}function h(_,e){_>>>=0;const t=w(),r=[];for(let i=_;i<_+4*e;i+=4)r.push(n.__wbindgen_export_4.get(t.getUint32(i,!0)));return n.__externref_drop_slice(_,e),r}function v(_,e){const t=e(4*_.length,4)>>>0;for(let e=0;e<_.length;e++){const n=l(_[e]);w().setUint32(t+4*e,n,!0)}return i=_.length,t}function R(_,e){if(!(_ instanceof e))throw new Error(`expected instance of ${e.name}`)}function F(_){let e,t;try{const r=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),a=i,s=n.project_settings_url(r,a);return e=s[0],t=s[1],d(s[0],s[1])}finally{n.__wbindgen_free(e,t,1)}}function z(_,e,t,r){const a=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),s=i,o=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(t,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=c(r,n.__wbindgen_malloc,n.__wbindgen_realloc),d=i;return n.open_remote_diagram(a,s,o,g,b,w,u,d)}function x(_){const e=n.__wbindgen_export_4.get(_);return n.__externref_table_dealloc(_),e}function k(_,e){let t,r;try{const o=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_plantuml_url_from_diagram_url(o,g,b,w);var a=u[0],s=u[1];if(u[3])throw a=0,s=0,x(u[2]);return t=a,r=s,d(a,s)}finally{n.__wbindgen_free(t,r,1)}}function j(_,e){let t,r;try{const o=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_spec_url_from_diagram_url(o,g,b,w);var a=u[0],s=u[1];if(u[3])throw a=0,s=0,x(u[2]);return t=a,r=s,d(a,s)}finally{n.__wbindgen_free(t,r,1)}}function O(_,e,t){n.closure263_externref_shim(_,e,t)}const D=["omit","same-origin","include"],I=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_aisettings_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_addelementtag_free(_>>>0,1)));const S="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_baseelement_free(_>>>0,1)));class q{static __wrap(_){_>>>=0;const e=Object.create(q.prototype);return e.__wbg_ptr=_,S.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,S.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_baseelement_free(_,0)}get alias(){const _=n.__wbg_get_baseelement_alias(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set alias(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_alias(this.__wbg_ptr,e,t)}get label(){const _=n.__wbg_get_baseelement_label(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set label(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_label(this.__wbg_ptr,e,t)}get description(){const _=n.__wbg_get_baseelement_description(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set description(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_description(this.__wbg_ptr,e,t)}get sprite(){const _=n.__wbg_get_baseelement_sprite(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set sprite(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_sprite(this.__wbg_ptr,e,t)}get tags(){const _=n.__wbg_get_baseelement_tags(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set tags(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_tags(this.__wbg_ptr,e,t)}get link(){const _=n.__wbg_get_baseelement_link(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set link(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_link(this.__wbg_ptr,e,t)}get uuid(){const _=n.__wbg_get_baseelement_uuid(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set uuid(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_uuid(this.__wbg_ptr,e,t)}get notes(){const _=n.__wbg_get_baseelement_notes(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set notes(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_notes(this.__wbg_ptr,e,t)}}const A="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_boundary_free(_>>>0,1)));class E{static __wrap(_){_>>>=0;const e=Object.create(E.prototype);return e.__wbg_ptr=_,A.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof E?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,A.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_boundary_free(_,0)}get base_data(){const _=n.__wbg_get_boundary_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){R(_,q);var e=_.__destroy_into_raw();n.__wbg_set_boundary_base_data(this.__wbg_ptr,e)}get boundary_type(){return n.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(_){n.__wbg_set_boundary_boundary_type(this.__wbg_ptr,f(_)?0:l(_))}get boundary_custom_type(){const _=n.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set boundary_custom_type(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_boundary_boundary_custom_type(this.__wbg_ptr,e,t)}get sub_elements(){const _=n.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var e=h(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set sub_elements(_){const e=v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_boundary_sub_elements(this.__wbg_ptr,e,t)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_c4elements_free(_>>>0,1)));const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_component_free(_>>>0,1)));class J{static __wrap(_){_>>>=0;const e=Object.create(J.prototype);return e.__wbg_ptr=_,H.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof J?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_component_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){R(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get technology(){const _=n.__wbg_get_component_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_component_technology(this.__wbg_ptr,e,t)}get component_type(){return n.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(_){n.__wbg_set_component_component_type(this.__wbg_ptr,f(_)?0:l(_))}}const M="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_container_free(_>>>0,1)));class B{static __wrap(_){_>>>=0;const e=Object.create(B.prototype);return e.__wbg_ptr=_,M.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof B?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,M.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_container_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){R(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get technology(){const _=n.__wbg_get_container_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_component_technology(this.__wbg_ptr,e,t)}get container_type(){return n.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(_){n.__wbg_set_container_container_type(this.__wbg_ptr,f(_)?0:l(_))}}const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_deploymentnode_free(_>>>0,1)));class W{static __wrap(_){_>>>=0;const e=Object.create(W.prototype);return e.__wbg_ptr=_,G.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof W?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_deploymentnode_free(_,0)}get base_data(){const _=n.__wbg_get_deploymentnode_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){R(_,q);var e=_.__destroy_into_raw();n.__wbg_set_deploymentnode_base_data(this.__wbg_ptr,e)}get deploymeny_node_custom_type(){const _=n.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set deploymeny_node_custom_type(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,e,t)}get deployment_node_type(){return n.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(_){n.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,f(_)?0:l(_))}get sub_elements(){const _=n.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var e=h(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set sub_elements(_){const e=v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_deploymentnode_sub_elements(this.__wbg_ptr,e,t)}}const C="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagram_free(_>>>0,1)));class L{static __wrap(_){_>>>=0;const e=Object.create(L.prototype);return e.__wbg_ptr=_,C.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,C.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagram_free(_,0)}get diagram_name(){const _=n.__wbg_get_diagram_diagram_name(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set diagram_name(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_diagram_name(this.__wbg_ptr,e,t)}get diagram_type(){return n.__wbg_get_diagram_diagram_type(this.__wbg_ptr)}set diagram_type(_){n.__wbg_set_diagram_diagram_type(this.__wbg_ptr,f(_)?0:l(_))}get diagram_spec(){const _=n.__wbg_get_diagram_diagram_spec(this.__wbg_ptr);return 0===_?void 0:T.__wrap(_)}set diagram_spec(_){let e=0;f(_)||(R(_,T),e=_.__destroy_into_raw()),n.__wbg_set_diagram_diagram_spec(this.__wbg_ptr,e)}get diagram_plantuml(){const _=n.__wbg_get_diagram_diagram_plantuml(this.__wbg_ptr);return 0===_?void 0:Y.__wrap(_)}set diagram_plantuml(_){let e=0;f(_)||(R(_,Y),e=_.__destroy_into_raw()),n.__wbg_set_diagram_diagram_plantuml(this.__wbg_ptr,e)}get raw_plantuml(){const _=n.__wbg_get_diagram_raw_plantuml(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set raw_plantuml(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_raw_plantuml(this.__wbg_ptr,e,t)}get last_modified(){const _=n.__wbg_get_diagram_last_modified(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set last_modified(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_last_modified(this.__wbg_ptr,e,t)}get auto_layout_errors(){const _=n.__wbg_get_diagram_auto_layout_errors(this.__wbg_ptr);let e;return 0!==_[0]&&(e=h(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set auto_layout_errors(_){var e=f(_)?0:v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagram_auto_layout_errors(this.__wbg_ptr,e,t)}get auto_layout(){return n.diagram_auto_layout(this.__wbg_ptr)}set auto_layout(_){n.diagram_set_auto_layout(this.__wbg_ptr,_)}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramelementspec_free(_>>>0,1)));class U{static __wrap(_){_>>>=0;const e=Object.create(U.prototype);return e.__wbg_ptr=_,N.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof U?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramelementspec_free(_,0)}get alias(){const _=n.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set alias(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,e,t)}get from(){const _=n.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set from(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_from(this.__wbg_ptr,e,t)}get to(){const _=n.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set to(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_to(this.__wbg_ptr,e,t)}get shapes(){const _=n.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let e;return 0!==_[0]&&(e=h(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set shapes(_){var e=f(_)?0:v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,e,t)}get element_type(){return n.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(_){n.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,f(_)?0:l(_))}get position(){const _=n.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===_?void 0:t_.__wrap(_)}set position(_){let e=0;f(_)||(R(_,t_),e=_.__destroy_into_raw()),n.__wbg_set_diagramelementspec_position(this.__wbg_ptr,e)}get size(){const _=n.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===_?void 0:o_.__wrap(_)}set size(_){let e=0;f(_)||(R(_,o_),e=_.__destroy_into_raw()),n.__wbg_set_diagramelementspec_size(this.__wbg_ptr,e)}get inner_specs(){const _=n.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let e;return 0!==_[0]&&(e=h(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set inner_specs(_){var e=f(_)?0:v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,e,t)}}const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramplantuml_free(_>>>0,1)));class Y{static __wrap(_){_>>>=0;const e=Object.create(Y.prototype);return e.__wbg_ptr=_,Q.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramplantuml_free(_,0)}get diagram_id(){const _=n.__wbg_get_diagramplantuml_diagram_id(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set diagram_id(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramplantuml_diagram_id(this.__wbg_ptr,e,t)}get elements(){const _=n.__wbg_get_diagramplantuml_elements(this.__wbg_ptr);var e=h(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set elements(_){const e=v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramplantuml_elements(this.__wbg_ptr,e,t)}get aliases(){const _=n.__wbg_get_diagramplantuml_aliases(this.__wbg_ptr);var e=h(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set aliases(_){const e=v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramplantuml_aliases(this.__wbg_ptr,e,t)}get tags(){return n.diagramplantuml_tags(this.__wbg_ptr)}set tags(_){n.diagramplantuml_set_tags(this.__wbg_ptr,_)}}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramspec_free(_>>>0,1)));class T{static __wrap(_){_>>>=0;const e=Object.create(T.prototype);return e.__wbg_ptr=_,$.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramspec_free(_,0)}get uuid(){let _,e;try{const t=n.__wbg_get_diagramspec_uuid(this.__wbg_ptr);return _=t[0],e=t[1],d(t[0],t[1])}finally{n.__wbindgen_free(_,e,1)}}set uuid(_){const e=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramspec_uuid(this.__wbg_ptr,e,t)}get description(){const _=n.__wbg_get_diagramspec_description(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set description(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramspec_description(this.__wbg_ptr,e,t)}get tags(){const _=n.__wbg_get_diagramspec_tags(this.__wbg_ptr);let e;return 0!==_[0]&&(e=h(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set tags(_){var e=f(_)?0:v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_tags(this.__wbg_ptr,e,t)}get elements_specs(){const _=n.__wbg_get_diagramspec_elements_specs(this.__wbg_ptr);var e=h(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set elements_specs(_){const e=v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_elements_specs(this.__wbg_ptr,e,t)}get shapes(){const _=n.__wbg_get_diagramspec_shapes(this.__wbg_ptr);var e=h(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set shapes(_){const e=v(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_shapes(this.__wbg_ptr,e,t)}get auto_layout_enabled(){return 0!==n.__wbg_get_diagramspec_auto_layout_enabled(this.__wbg_ptr)}set auto_layout_enabled(_){n.__wbg_set_diagramspec_auto_layout_enabled(this.__wbg_ptr,_)}get auto_layout_orientation(){return n.__wbg_get_diagramspec_auto_layout_orientation(this.__wbg_ptr)}set auto_layout_orientation(_){n.__wbg_set_diagramspec_auto_layout_orientation(this.__wbg_ptr,_)}get auto_layout_only_straight_arrows(){return 0!==n.__wbg_get_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr)}set auto_layout_only_straight_arrows(_){n.__wbg_set_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr,_)}get auto_layout_ranksep(){return n.__wbg_get_diagramspec_auto_layout_ranksep(this.__wbg_ptr)}set auto_layout_ranksep(_){n.__wbg_set_diagramspec_auto_layout_ranksep(this.__wbg_ptr,_)}get auto_layout_subgraph_inner_margin(){return n.__wbg_get_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr)}set auto_layout_subgraph_inner_margin(_){n.__wbg_set_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr,_)}get auto_layout_subgraph_outer_margin(){return n.__wbg_get_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr)}set auto_layout_subgraph_outer_margin(_){n.__wbg_set_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr,_)}get grid_enabled(){return 0!==n.__wbg_get_diagramspec_grid_enabled(this.__wbg_ptr)}set grid_enabled(_){n.__wbg_set_diagramspec_grid_enabled(this.__wbg_ptr,_)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_diagramsthemesettings_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_elementdata_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_hookpayload_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingbytesource_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingsink_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingsource_free(_>>>0,1)));const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_minaerror_free(_>>>0,1)));class K{static __wrap(_){_>>>=0;const e=Object.create(K.prototype);return e.__wbg_ptr=_,P.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_minaerror_free(_,0)}get code(){return n.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(_){n.__wbg_set_minaerror_code(this.__wbg_ptr,_)}get msg(){let _,e;try{const t=n.__wbg_get_minaerror_msg(this.__wbg_ptr);return _=t[0],e=t[1],d(t[0],t[1])}finally{n.__wbindgen_free(_,e,1)}}set msg(_){const e=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_minaerror_msg(this.__wbg_ptr,e,t)}}const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_person_free(_>>>0,1)));class V{static __wrap(_){_>>>=0;const e=Object.create(V.prototype);return e.__wbg_ptr=_,Z.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof V?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_person_free(_,0)}get base_data(){const _=n.__wbg_get_person_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){R(_,q);var e=_.__destroy_into_raw();n.__wbg_set_person_base_data(this.__wbg_ptr,e)}get person_type(){return n.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(_){n.__wbg_set_person_person_type(this.__wbg_ptr,f(_)?0:l(_))}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_point_free(_>>>0,1)));class __{static __wrap(_){_>>>=0;const e=Object.create(__.prototype);return e.__wbg_ptr=_,X.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof __?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_point_free(_,0)}get x(){return n.__wbg_get_point_x(this.__wbg_ptr)}set x(_){n.__wbg_set_point_x(this.__wbg_ptr,_)}get y(){return n.__wbg_get_point_y(this.__wbg_ptr)}set y(_){n.__wbg_set_point_y(this.__wbg_ptr,_)}}const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_position_free(_>>>0,1)));class t_{static __wrap(_){_>>>=0;const e=Object.create(t_.prototype);return e.__wbg_ptr=_,e_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_position_free(_,0)}get left(){const _=n.__wbg_get_position_left(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set left(_){n.__wbg_set_position_left(this.__wbg_ptr,!f(_),f(_)?0:_)}get top(){const _=n.__wbg_get_position_top(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set top(_){n.__wbg_set_position_top(this.__wbg_ptr,!f(_),f(_)?0:_)}get z_index(){const _=n.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===_?void 0:_}set z_index(_){n.__wbg_set_position_z_index(this.__wbg_ptr,f(_)?4294967297:0|_)}get angle(){const _=n.__wbg_get_position_angle(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set angle(_){n.__wbg_set_position_angle(this.__wbg_ptr,!f(_),f(_)?0:_)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_project_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_projectlibrary_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_projectsettings_free(_>>>0,1)));const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_relationship_free(_>>>0,1)));class r_{static __wrap(_){_>>>=0;const e=Object.create(r_.prototype);return e.__wbg_ptr=_,n_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof r_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_relationship_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){R(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get from(){const _=n.__wbg_get_relationship_from(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set from(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_component_technology(this.__wbg_ptr,e,t)}get to(){const _=n.__wbg_get_relationship_to(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set to(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_relationship_to(this.__wbg_ptr,e,t)}get technology(){const _=n.__wbg_get_relationship_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_relationship_technology(this.__wbg_ptr,e,t)}get relationship_type(){return n.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(_){n.__wbg_set_relationship_relationship_type(this.__wbg_ptr,f(_)?0:l(_))}}const i_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_shape_free(_>>>0,1)));class a_{static __wrap(_){_>>>=0;const e=Object.create(a_.prototype);return e.__wbg_ptr=_,i_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof a_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,i_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_shape_free(_,0)}get shape_type(){return n.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(_){n.__wbg_set_shape_shape_type(this.__wbg_ptr,f(_)?0:l(_))}get position(){const _=n.__wbg_get_shape_position(this.__wbg_ptr);return 0===_?void 0:t_.__wrap(_)}set position(_){let e=0;f(_)||(R(_,t_),e=_.__destroy_into_raw()),n.__wbg_set_shape_position(this.__wbg_ptr,e)}get size(){const _=n.__wbg_get_shape_size(this.__wbg_ptr);return 0===_?void 0:o_.__wrap(_)}set size(_){let e=0;f(_)||(R(_,o_),e=_.__destroy_into_raw()),n.__wbg_set_shape_size(this.__wbg_ptr,e)}}const s_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_size_free(_>>>0,1)));class o_{static __wrap(_){_>>>=0;const e=Object.create(o_.prototype);return e.__wbg_ptr=_,s_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,s_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_size_free(_,0)}get width(){const _=n.__wbg_get_size_width(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set width(_){n.__wbg_set_size_width(this.__wbg_ptr,!f(_),f(_)?0:_)}get height(){const _=n.__wbg_get_size_height(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set height(_){n.__wbg_set_size_height(this.__wbg_ptr,!f(_),f(_)?0:_)}get scale_x(){const _=n.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set scale_x(_){n.__wbg_set_size_scale_x(this.__wbg_ptr,!f(_),f(_)?0:_)}get scale_y(){const _=n.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set scale_y(_){n.__wbg_set_size_scale_y(this.__wbg_ptr,!f(_),f(_)?0:_)}}const g_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_softwaresystem_free(_>>>0,1)));class c_{static __wrap(_){_>>>=0;const e=Object.create(c_.prototype);return e.__wbg_ptr=_,g_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof c_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,g_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_softwaresystem_free(_,0)}get base_data(){const _=n.__wbg_get_softwaresystem_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){R(_,q);var e=_.__destroy_into_raw();n.__wbg_set_softwaresystem_base_data(this.__wbg_ptr,e)}get system_type(){return n.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(_){n.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,f(_)?0:l(_))}}function b_(_,e){const t=c(String(e),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function w_(_){_.abort()}function u_(){return p((function(_,e,t,n,r){_.append(d(e,t),d(n,r))}),arguments)}function d_(){return p((function(_,e,t,n,r){_.append(d(e,t),d(n,r))}),arguments)}function l_(){return p((function(_,e,t,n,r,i){_.append(d(e,t),n,d(r,i))}),arguments)}function p_(){return p((function(_,e,t,n){_.append(d(e,t),n)}),arguments)}function f_(){return p((function(_){return _.arrayBuffer()}),arguments)}function y_(_){return _.arrayBuffer()}function m_(_){return E.__wrap(_)}function h_(_){return E.__unwrap(_)}function v_(_){return _.buffer}function R_(_){return _.buffer}function F_(_){const e=_.byobRequest;return f(e)?0:l(e)}function z_(_){return _.byteLength}function x_(_){return _.byteOffset}function k_(){return p((function(_,e){return _.call(e)}),arguments)}function j_(){return p((function(_,e,t){return _.call(e,t)}),arguments)}function O_(_){return _.close()}function D_(){return p((function(_){_.close()}),arguments)}function I_(){return p((function(_){_.close()}),arguments)}function S_(_){return J.__wrap(_)}function q_(_){return J.__unwrap(_)}function A_(_){return B.__wrap(_)}function E_(_){return B.__unwrap(_)}function H_(_,e){return _.createWritable(e)}function J_(_){return _.crypto}function M_(_){console.debug(_)}function B_(_){return W.__wrap(_)}function G_(_){return W.__unwrap(_)}function W_(_){return L.__wrap(_)}function C_(_){return U.__wrap(_)}function L_(_){return U.__unwrap(_)}function N_(_){return _.done}function U_(){return p((function(_,e){_.enqueue(e)}),arguments)}function Q_(_){return _.entries()}function Y_(_){return Object.entries(_)}function $_(_){console.error(_)}function T_(_,e){let t,r;try{t=_,r=e,console.error(d(_,e))}finally{n.__wbindgen_free(t,r,1)}}function P_(_){return fetch(_)}function K_(_,e){return _.fetch(e)}function Z_(_,e,t,n){return _.getDirectoryHandle(d(e,t),n)}function V_(_,e,t,n){return _.getFileHandle(d(e,t),n)}function X_(_){return _.getFile()}function _e(){return p((function(_,e){_.getRandomValues(e)}),arguments)}function ee(){return p((function(_,e){return Reflect.get(_,e)}),arguments)}function te(_,e){return _[e>>>0]}function ne(_,e){return _[e]}function re(){return p((function(_,e){return Reflect.has(_,e)}),arguments)}function ie(_){return _.headers}function ae(_){console.info(_)}function se(_){let e;try{e=_ instanceof ArrayBuffer}catch(_){e=!1}return e}function oe(_){let e;try{e=_ instanceof Error}catch(_){e=!1}return e}function ge(_){let e;try{e=_ instanceof FileSystemDirectoryHandle}catch(_){e=!1}return e}function ce(_){let e;try{e=_ instanceof FileSystemFileHandle}catch(_){e=!1}return e}function be(_){let e;try{e=_ instanceof File}catch(_){e=!1}return e}function we(_){let e;try{e=_ instanceof Response}catch(_){e=!1}return e}function ue(_){let e;try{e=_ instanceof Uint8Array}catch(_){e=!1}return e}function de(_){return Array.isArray(_)}function le(_){return Number.isSafeInteger(_)}function pe(){return Symbol.iterator}function fe(_){return _.lastModified}function ye(_){return _.length}function me(_){return _.length}function he(_){console.log(_)}function ve(_){return _.message}function Re(_){return K.__wrap(_)}function Fe(_){return _.msCrypto}function ze(_,e){const t=c(e.name,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function xe(){return p((function(){return new Headers}),arguments)}function ke(_,e){try{var t={a:_,b:e};const r=new Promise(((_,e)=>{const r=t.a;t.a=0;try{return function(_,e,t,r){n.closure73_externref_shim(_,e,t,r)}(r,t.b,_,e)}finally{t.a=r}}));return r}finally{t.a=t.b=0}}function je(){return new Object}function Oe(){return new Map}function De(){return new Array}function Ie(){return new Error}function Se(){return p((function(){return new FormData}),arguments)}function qe(_){return new Uint8Array(_)}function Ae(_,e){return new Error(d(_,e))}function Ee(){return p((function(){return new AbortController}),arguments)}function He(_,e){return new Function(d(_,e))}function Je(_,e,t){return new Uint8Array(_,e>>>0,t>>>0)}function Me(_){return new Uint8Array(_>>>0)}function Be(){return p((function(_,e,t){return new Request(d(_,e),t)}),arguments)}function Ge(){return p((function(_,e){return new Blob(_,e)}),arguments)}function We(_){return _.next}function Ce(){return p((function(_){return _.next()}),arguments)}function Le(){return p((function(_){return _.next()}),arguments)}function Ne(_){return _.node}function Ue(_){return V.__wrap(_)}function Qe(_){return V.__unwrap(_)}function Ye(_){return __.__wrap(_)}function $e(_){return __.__unwrap(_)}function Te(_){return _.process}function Pe(_,e){return _.push(e)}function Ke(_){queueMicrotask(_)}function Ze(_){return _.queueMicrotask}function Ve(){return p((function(_,e){_.randomFillSync(e)}),arguments)}function Xe(_){return r_.__wrap(_)}function _t(_){return r_.__unwrap(_)}function et(_,e,t){return _.removeEntry(d(e,t))}function tt(_,e,t,n){return _.removeEntry(d(e,t),n)}function nt(){return p((function(){return _.require}),arguments)}function rt(_){return Promise.resolve(_)}function it(){return p((function(_,e){_.respond(e>>>0)}),arguments)}function at(){return p((function(_,e){return _.seek(e)}),arguments)}function st(_,e,t){_[e]=t}function ot(_,e,t){_[e>>>0]=t}function gt(_,e,t){_.set(e,t>>>0)}function ct(_,e,t){return _.set(e,t)}function bt(_,e){_.body=e}function wt(_,e){_.create=0!==e}function ut(_,e){_.create=0!==e}function dt(_,e){_.credentials=D[e]}function lt(_,e){_.headers=e}function pt(_,e){_.keepExistingData=0!==e}function ft(_,e,t){_.method=d(e,t)}function yt(_,e){_.mode=I[e]}function mt(_,e){_.recursive=0!==e}function ht(_,e){_.signal=e}function vt(_,e,t){_.type=d(e,t)}function Rt(_){return a_.__wrap(_)}function Ft(_){return a_.__unwrap(_)}function zt(_){return _.signal}function xt(_){return _.size}function kt(_){return c_.__wrap(_)}function jt(_){return c_.__unwrap(_)}function Ot(_,e){const t=c(e.stack,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Dt(){const _="undefined"==typeof global?null:global;return f(_)?0:l(_)}function It(){const _="undefined"==typeof globalThis?null:globalThis;return f(_)?0:l(_)}function St(){const _="undefined"==typeof self?null:self;return f(_)?0:l(_)}function qt(){const _="undefined"==typeof window?null:window;return f(_)?0:l(_)}function At(_){return _.status}function Et(){return p((function(_){return JSON.stringify(_)}),arguments)}function Ht(_,e,t){return _.subarray(e>>>0,t>>>0)}function Jt(_){return _.text()}function Mt(_,e){return _.then(e)}function Bt(_,e,t){return _.then(e,t)}function Gt(_,e){const t=c(e.url,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Wt(_){return _.value}function Ct(_){return _.versions}function Lt(_){const e=_.view;return f(e)?0:l(e)}function Nt(_){console.warn(_)}function Ut(){return p((function(_,e,t){var n,r;return _.write((n=e,r=t,n>>>=0,s().subarray(n/1,n/1+r)))}),arguments)}function Qt(_){return+_}function Yt(_){return BigInt.asUintN(64,_)}function $t(_,e){const t="bigint"==typeof e?e:void 0;w().setBigInt64(_+8,f(t)?BigInt(0):t,!0),w().setInt32(_+0,!f(t),!0)}function Tt(_){return"boolean"==typeof _?_?1:0:2}function Pt(_){const e=_.original;return 1==e.cnt--&&(e.a=0,!0)}function Kt(_,e,t){const r=function(_,e,t,r){const i={a:_,b:e,cnt:1,dtor:264},a=(..._)=>{i.cnt++;const e=i.a;i.a=0;try{return r(e,i.b,..._)}finally{0==--i.cnt?(n.__wbindgen_export_6.get(i.dtor)(e,i.b),y.unregister(i)):i.a=e}};return a.original=i,y.register(a,i,i),a}(_,e,0,O);return r}function Zt(_,e){const t=c(m(e),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Vt(_,e){return new Error(d(_,e))}function Xt(_,e){return _ in e}function _n(){const _=n.__wbindgen_export_4,e=_.grow(4);_.set(0,void 0),_.set(e+0,void 0),_.set(e+1,null),_.set(e+2,!0),_.set(e+3,!1)}function en(_){return"bigint"==typeof _}function tn(_){return"function"==typeof _}function nn(_){return"object"==typeof _&&null!==_}function rn(_){return"string"==typeof _}function an(_){return void 0===_}function sn(_,e){return _===e}function on(_,e){return _==e}function gn(){return n.memory}function cn(_,e){const t="number"==typeof e?e:void 0;w().setFloat64(_+8,f(t)?0:t,!0),w().setInt32(_+0,!f(t),!0)}function bn(_){return _}function wn(_,e){const t="string"==typeof e?e:void 0;var r=f(t)?0:c(t,n.__wbindgen_malloc,n.__wbindgen_realloc),a=i;w().setInt32(_+4,a,!0),w().setInt32(_+0,r,!0)}function un(_,e){return d(_,e)}function dn(_,e){throw new Error(d(_,e))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_themessettings_free(_>>>0,1)))},507:(_,e,t)=>{t.a(_,(async(_,n)=>{try{t.d(e,{Ay:()=>g,Oc:()=>o,Y$:()=>a,wS:()=>s});var r=t(519),i=_([r]);async function a(_,e){if(e){const t="https://keadex.dev/api/download-gh-raw-file",n={headers:{"Keadex-Gh-Url":_}};return e&&(n.headers["Keadex-Gh-Authorization"]=e),await fetch(t,n)}return await fetch(_)}async function s(_,e,t){let n,i,s;try{n=(0,r._Cc)(_),i=(0,r.Llp)(_,e),s=(0,r.JD7)(_,e)}catch(_){throw console.error(_),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(n&&i&&s){let _,e,r;try{const o=await a(n,t),g=await a(i,t),c=await a(s,t);if(o.ok&&g.ok&&c.ok)return _=await o.text(),e=await g.text(),r=await c.text(),{projectSettingsJson:_,plantuml:e,spec:r};throw new Error}catch(_){throw console.error(_),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}async function o(_,e,t){try{const n=await s(_,e,t);if(n)return await(0,r.Oxg)(_,e,n.plantuml,n.spec)}catch(_){console.error(_)}}r=(i.then?(await i)():i)[0];const g={fetchGhRawFile:a,downloadDiagramData:s,openRemoteDiagram:o};n()}catch(c){n(c)}}))},519:(_,e,t)=>{t.a(_,(async(_,n)=>{try{t.d(e,{JD7:()=>i.JD7,Llp:()=>i.Llp,Oxg:()=>i.Oxg,_Cc:()=>i._Cc});var r=t(196),i=t(457),a=_([r]);r=(a.then?(await a)():a)[0],(0,i.lIU)(r),r.__wbindgen_start(),n()}catch(_){n(_)}}))}},i={};function a(_){var e=i[_];if(void 0!==e)return e.exports;var t=i[_]={id:_,loaded:!1,exports:{}};return r[_](t,t.exports,a),t.loaded=!0,t.exports}_="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=_=>{_&&_.d<1&&(_.d=1,_.forEach((_=>_.r--)),_.forEach((_=>_.r--?_.r++:_())))},a.a=(r,i,a)=>{var s;a&&((s=[]).d=-1);var o,g,c,b=new Set,w=r.exports,u=new Promise(((_,e)=>{c=e,g=_}));u[e]=w,u[_]=_=>(s&&_(s),b.forEach(_),u.catch((_=>{}))),r.exports=u,i((r=>{var i;o=(r=>r.map((r=>{if(null!==r&&"object"==typeof r){if(r[_])return r;if(r.then){var i=[];i.d=0,r.then((_=>{a[e]=_,n(i)}),(_=>{a[t]=_,n(i)}));var a={};return a[_]=_=>_(i),a}}var s={};return s[_]=_=>{},s[e]=r,s})))(r);var a=()=>o.map((_=>{if(_[t])throw _[t];return _[e]})),g=new Promise((e=>{(i=()=>e(a)).r=0;var t=_=>_!==s&&!b.has(_)&&(b.add(_),_&&!_.d&&(i.r++,_.push(i)));o.map((e=>e[_](t)))}));return i.r?g:a()}),(_=>(_?c(u[t]=_):g(w),n(s)))),s&&s.d<0&&(s.d=0)},a.d=(_,e)=>{for(var t in e)a.o(e,t)&&!a.o(_,t)&&Object.defineProperty(_,t,{enumerable:!0,get:e[t]})},a.hmd=_=>((_=Object.create(_)).children||(_.children=[]),Object.defineProperty(_,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+_.id)}}),_),a.o=(_,e)=>Object.prototype.hasOwnProperty.call(_,e),a.v=(_,e,t,n)=>Promise.all([import("fs"),import("url")]).then((([{readFile:_},{URL:e}])=>new Promise(((n,r)=>{_(new e(t+".module.wasm",import.meta.url),((_,e)=>{if(_)return r(_);n({arrayBuffer:()=>e})}))})))).then((_=>_.arrayBuffer())).then((_=>WebAssembly.instantiate(_,n))).then((e=>Object.assign(_,e.instance.exports)));var s=a(507),o=(s=await s).Ay,g=s.wS,c=s.Y$,b=s.Oc;export{o as default,g as downloadDiagramData,c as fetchGhRawFile,b as openRemoteDiagram};
|
|
1
|
+
var _,e,t,n,r={196:(_,e,t)=>{var n=t(457);_.exports=t.v(e,_.id,"3dd2705d0533b22ef25f",{"./mina_react_bg.js":{__wbg_log_c222819a41e063d3:n.pR9,__wbg_info_3daf2e093e091b66:n.ZrD,__wbg_warn_4ca3906c248c47c4:n.jwJ,__wbg_debug_3cb59063b29f58c1:n.F$t,__wbg_error_524f506f44df1645:n.pWA,__wbindgen_string_new:n.ycJ,__wbindgen_string_get:n.qNE,__wbindgen_bigint_get_as_i64:n.DMD,__wbindgen_memory:n.Py0,__wbindgen_throw:n.Qnr,__wbindgen_debug_string:n.rl,__wbg_new_5e0be73521bc8c17:n.aIY,__wbg_new_78feb108b6472713:n.M2,__wbindgen_number_new:n.QRK,__wbg_new_405e22f390576ce2:n.va5,__wbg_newnoargs_105ed471475aaf50:n.VrZ,__wbg_new_a12002a7f91c75be:n.vVD,__wbg_stringify_f7ed6987935b4a24:n.Y6F,__wbindgen_is_string:n.GuA,__wbindgen_is_function:n.PRY,__wbindgen_is_object:n.qvD,__wbg_next_25feadfc0913fea9:n.yqB,__wbg_buffer_609cc3eee51ed158:n.FHK,__wbg_byteLength_e674b853d9c77e1d:n.x6W,__wbg_byteOffset_fd862df290ef848d:n.cyg,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:n.hI8,__wbg_length_a446193dc22c12f8:n.eIr,__wbg_set_65595bdd868b3009:n.HBq,__wbg_newwithlength_a381634e90c276d4:n.HtP,__wbg_buffer_09165b52af8c5237:n._Ue,__wbg_subarray_aa9065fa9dc5df96:n.TOc,__wbg_done_769e5ede4b31c67b:n.Xb8,__wbg_value_cd1ffa7b1ab794f1:n.LMq,__wbg_next_c3ab0d59847b3b5c:n.tER,__wbg_instanceof_Error_4d54113b22d20306:n.fcg,__wbg_instanceof_Uint8Array_17156bcf118086a9:n.SJf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:n.gGA,__wbg_set_8fc6bf8a5b1071d1:n.iAh,__wbg_get_b9b93047fe3cf45b:n.RKz,__wbg_set_37837023f3d740e8:n.p8e,__wbg_length_e2d2a49132c1b256:n.Ry,__wbg_push_737cfc8c1432c2c6:n.tZf,__wbg_isArray_a1eab7e0d067391b:n.uod,__wbg_new_c68d7209be747379:n.wd3,__wbg_message_97a2af9b89d693a3:n.oGe,__wbg_isSafeInteger_343e2beeeece1bb0:n.Yb6,__wbg_entries_3265d4158b33e5dc:n.gHg,__wbg_iterator_9a24c88df860dc65:n.eW0,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:n.w6e,__wbindgen_is_undefined:n.vUM,__wbg_call_672a4d21634d4a24:n.wHY,__wbg_static_accessor_SELF_37c5d418e4bf5819:n.fb$,__wbg_static_accessor_GLOBAL_88a902d13a557d07:n.ii7,__wbg_static_accessor_WINDOW_5de37043a91a9c40:n.x0C,__wbg_new_23a2665fac83c611:n.c6u,__wbg_then_44b73946d2fb3e7d:n.GQG,__wbg_then_48b406749878a531:n.xV_,__wbg_resolve_4851785c9c5f573d:n.wJz,__wbg_call_7cccdd69e0791ae2:n.w9h,__wbg_next_6574e1a8a62d1055:n.Dn4,__wbindgen_number_get:n.sWe,__wbg_get_67b2ba62fc30de12:n.dzD,__wbg_postMessage_83a8d58d3fcb6c13:n.A2$,__wbg_setkeepexistingdata_ee7c8cb466e9477f:n.aKt,__wbg_enqueue_bb16ba72f537dc9e:n.QHd,__wbg_close_304cc1fef3466669:n.oaw,__wbg_seek_3f0f8d7591f648d7:n.Zk3,__wbg_write_397d977609afc729:n.Vob,__wbg_close_24caca68e93b9c03:n.jeC,__wbg_name_e4a115def9e2bbaa:n.Yeo,__wbg_setcreate_4ca762e23d9f78da:n.N9Q,__wbg_setrecursive_536113a081d6177a:n.ugc,__wbg_instanceof_File_a4e2256bf71955a9:n.gjJ,__wbg_lastModified_7a9e61b3961224b8:n.gvw,__wbg_point_new:n.nA9,__wbg_diagram_new:n.YLb,__wbg_diagramelementspec_new:n.Dr_,__wbg_shape_new:n._cl,__wbg_container_new:n.e57,__wbg_component_new:n.WJm,__wbg_minaerror_new:n.EkI,__wbg_relationship_new:n.NpJ,__wbg_softwaresystem_new:n.dM0,__wbg_person_new:n.c1W,__wbg_deploymentnode_new:n.ezj,__wbg_boundary_new:n.HCo,__wbg_boundary_unwrap:n.Wq,__wbg_container_unwrap:n.xB8,__wbindgen_jsval_loose_eq:n.U8c,__wbindgen_boolean_get:n.NhE,__wbindgen_as_number:n.qmw,__wbindgen_error_new:n.RjG,__wbg_getwithrefkey_2d7fdfea9645a25b:n.A2U,__wbg_set_2873a5cee2324875:n.v1k,__wbg_String_1b2069caba3b9783:n.JF5,__wbindgen_bigint_from_u64:n.Qg3,__wbg_crypto_ed58b8e10a292839:n.ilI,__wbg_process_5c1d670bc53614b8:n.Evb,__wbg_versions_c71aa1626a93e0a1:n.ooJ,__wbg_node_02999533c4ea02e3:n.OtZ,__wbg_require_79b1e9274cde3c87:n.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:n.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:n.NNx,__wbg_getRandomValues_bcb4912f16000dc4:n.FGp,__wbg_deploymentnode_unwrap:n._Zx,__wbg_softwaresystem_unwrap:n.qre,__wbg_new_e25e5aab09ff45db:n.RG9,__wbg_abort_775ef1d17fc65868:n.gMQ,__wbg_signal_aaf9ad74119f20a4:n.CF8,__wbg_newwithstrandinit_06c535e0a867c635:n.heb,__wbg_has_a5ea9117f258a0ec:n.HSm,__wbg_fetch_4465c2b10f21a927:n.o0R,__wbg_fetch_509096533071c657:n.gRe,__wbg_append_299d5d48292c0495:n.cVx,__wbg_append_b44785ebeb668479:n.d_N,__wbg_append_b2d1fc16de2a0e81:n.WqA,__wbg_new_9fd39a253424609a:n.z09,__wbg_respond_1f279fa9f8edcb1c:n.dSQ,__wbg_view_fd8a56e8983f448d:n.NgT,__wbg_setmethod_3c5280fe5d890842:n._hX,__wbg_setsignal_75b21ef3a81de905:n.l0x,__wbg_setcredentials_c3a22f1cd105a2c6:n.uw1,__wbg_setheaders_834c0bdb6a8949ad:n.rk2,__wbg_setbody_5923b78a95eedf29:n.Nhd,__wbg_setmode_5dc300b865044b65:n.BFX,__wbg_settype_39ed370d3edd403c:n.a4S,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:n.Cjr,__wbg_removeEntry_9f6bc325e3383e59:n.m_N,__wbg_removeEntry_a424e90dff229b19:n.lkn,__wbg_getFileHandle_5fb877d1ecc74d52:n.Wkh,__wbg_getDirectoryHandle_c48a138373d79b3d:n.kTu,__wbg_entries_19efe296f7d36df9:n.RCF,__wbg_arrayBuffer_f18c144cd0125f07:n.RGi,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:n.qe7,__wbg_size_3808d41635a9c259:n.$CF,__wbg_text_1f39a8afe3c70a99:n.CFe,__wbg_queueMicrotask_97d92b4fcc8a61c5:n._mt,__wbg_queueMicrotask_d3219def82552485:n.k2R,__wbindgen_cb_drop:n.LCp,__wbg_new_018dcc2d6c8c2f6a:n.RR8,__wbg_append_8c7dd8d641a5f01b:n.Tbm,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:n.KA3,__wbg_createWritable_b4ed240dc879905e:n.kPb,__wbg_getFile_2607bc0123c724e0:n.ycy,__wbg_setcreate_139bad94b2874fb5:n.kF0,__wbg_byobRequest_77d9adf63337edfb:n.JpR,__wbg_close_5ce03e29be453811:n.sQY,__wbg_instanceof_Response_f2cc20d9f7dfd644:n.Hzn,__wbg_arrayBuffer_d1b44c4390db422f:n._iy,__wbg_url_ae10c34ca209681d:n.Tp3,__wbg_status_f6360336ca686bf0:n.kK3,__wbg_headers_9cb51cfd2ac780a4:n.Moj,__wbg_new_8a6f238a6ece86ea:n.$Pc,__wbg_stack_0ed75d68575b0f3c:n.x$X,__wbg_error_7534b8e9a36f1ab4:n.WYM,__wbg_relationship_unwrap:n.KM7,__wbindgen_in:n.zEy,__wbindgen_is_bigint:n.YkQ,__wbindgen_jsval_eq:n.BGI,__wbg_point_unwrap:n._QJ,__wbg_person_unwrap:n.Xv$,__wbg_component_unwrap:n.dT0,__wbg_shape_unwrap:n.D7n,__wbg_diagramelementspec_unwrap:n.W3f,__wbindgen_closure_wrapper2506:n.ONC,__wbindgen_init_externref_table:n.bLn}})},457:(_,e,t)=>{let n;function r(_){n=_}t.d(e,{$CF:()=>kt,$Pc:()=>De,A2$:()=>Te,A2U:()=>ne,BFX:()=>ht,BGI:()=>on,CF8:()=>xt,CFe:()=>Jt,Cjr:()=>ge,D7n:()=>zt,DMD:()=>Tt,Dn4:()=>We,Dr_:()=>W_,EkI:()=>Re,Evb:()=>Pe,F$t:()=>J_,FGp:()=>_e,FHK:()=>R_,GQG:()=>Ct,GuA:()=>an,HBq:()=>ct,HCo:()=>h_,HOd:()=>Fe,HSm:()=>re,HtP:()=>Je,Hzn:()=>we,JD7:()=>z,JF5:()=>b_,JpR:()=>F_,KA3:()=>ce,KM7:()=>et,LCp:()=>Kt,LMq:()=>Wt,Llp:()=>x,Ltb:()=>rt,M2:()=>Ae,Moj:()=>ie,N9Q:()=>dt,NNx:()=>Xe,NgT:()=>Bt,NhE:()=>Pt,Nhd:()=>wt,NpJ:()=>_t,ONC:()=>Vt,OtZ:()=>Be,Oxg:()=>j,PRY:()=>nn,Py0:()=>cn,QHd:()=>U_,QRK:()=>wn,Qg3:()=>Yt,Qnr:()=>ln,RCF:()=>$_,RG9:()=>Ie,RGi:()=>y_,RKz:()=>te,RR8:()=>xe,RjG:()=>Xt,Ry:()=>he,SJf:()=>ue,TOc:()=>Mt,Tbm:()=>d_,Tp3:()=>Nt,U8c:()=>gn,Vob:()=>$t,VrZ:()=>He,W3f:()=>L_,WJm:()=>S_,WYM:()=>T_,Wkh:()=>Z_,Wq:()=>m_,WqA:()=>l_,Xb8:()=>B_,Xv$:()=>$e,Y6F:()=>Ht,YLb:()=>N_,Yb6:()=>le,Yeo:()=>ze,YkQ:()=>tn,Zk3:()=>st,ZrD:()=>ae,_Cc:()=>k,_QJ:()=>Ye,_Ue:()=>v_,_Zx:()=>G_,_cl:()=>Ft,_hX:()=>yt,_iy:()=>f_,_mt:()=>Ve,a4S:()=>Rt,aIY:()=>Oe,aKt:()=>ft,bLn:()=>en,c1W:()=>Ue,c6u:()=>ke,cVx:()=>u_,cyg:()=>x_,dM0:()=>jt,dSQ:()=>at,dT0:()=>q_,d_N:()=>p_,dzD:()=>ee,e57:()=>E_,eIr:()=>ye,eW0:()=>pe,ezj:()=>C_,fb$:()=>qt,fcg:()=>oe,gGA:()=>se,gHg:()=>Q_,gMQ:()=>w_,gRe:()=>K_,gjJ:()=>be,gvw:()=>fe,hI8:()=>Me,heb:()=>Ce,iAh:()=>bt,ii7:()=>Dt,ilI:()=>M_,jeC:()=>O_,jwJ:()=>Ut,k2R:()=>Ze,kF0:()=>ut,kK3:()=>It,kPb:()=>H_,kTu:()=>V_,l0x:()=>vt,lIU:()=>r,lkn:()=>nt,m_N:()=>tt,nA9:()=>Qe,o0R:()=>P_,oGe:()=>ve,oaw:()=>A_,ooJ:()=>Lt,p8e:()=>gt,pR9:()=>me,pWA:()=>Y_,qNE:()=>un,qe7:()=>Ge,qmw:()=>Qt,qre:()=>Ot,qvD:()=>rn,rk2:()=>pt,rl:()=>Zt,sQY:()=>D_,sWe:()=>bn,tER:()=>Le,tZf:()=>Ke,ugc:()=>mt,uod:()=>de,uw1:()=>lt,v1k:()=>ot,vUM:()=>sn,vVD:()=>qe,va5:()=>je,w6e:()=>St,w9h:()=>j_,wHY:()=>k_,wJz:()=>it,wd3:()=>Ee,x$X:()=>At,x0C:()=>Et,x6W:()=>z_,xB8:()=>I_,xV_:()=>Gt,ycJ:()=>dn,ycy:()=>X_,yqB:()=>Ne,z09:()=>Se,zEy:()=>_n}),_=t.hmd(_);let i=0,a=null;function s(){return null!==a&&0!==a.byteLength||(a=new Uint8Array(n.memory.buffer)),a}let o=new("undefined"==typeof TextEncoder?(0,_.require)("util").TextEncoder:TextEncoder)("utf-8");const g="function"==typeof o.encodeInto?function(_,e){return o.encodeInto(_,e)}:function(_,e){const t=o.encode(_);return e.set(t),{read:_.length,written:t.length}};function c(_,e,t){if(void 0===t){const t=o.encode(_),n=e(t.length,1)>>>0;return s().subarray(n,n+t.length).set(t),i=t.length,n}let n=_.length,r=e(n,1)>>>0;const a=s();let c=0;for(;c<n;c++){const e=_.charCodeAt(c);if(e>127)break;a[r+c]=e}if(c!==n){0!==c&&(_=_.slice(c)),r=t(r,n,n=c+3*_.length,1)>>>0;const e=s().subarray(r+c,r+n);c+=g(_,e).written,r=t(r,n,c,1)>>>0}return i=c,r}let b=null;function w(){return(null===b||!0===b.buffer.detached||void 0===b.buffer.detached&&b.buffer!==n.memory.buffer)&&(b=new DataView(n.memory.buffer)),b}let u=new("undefined"==typeof TextDecoder?(0,_.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function d(_,e){return _>>>=0,u.decode(s().subarray(_,_+e))}function l(_){const e=n.__externref_table_alloc();return n.__wbindgen_export_4.set(e,_),e}function p(_,e){try{return _.apply(this,e)}catch(_){const e=l(_);n.__wbindgen_exn_store(e)}}function f(_){return null==_}u.decode();const y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>{n.__wbindgen_export_6.get(_.dtor)(_.a,_.b)}));function h(_){const e=typeof _;if("number"==e||"boolean"==e||null==_)return`${_}`;if("string"==e)return`"${_}"`;if("symbol"==e){const e=_.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=_.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(_)){const e=_.length;let t="[";e>0&&(t+=h(_[0]));for(let n=1;n<e;n++)t+=", "+h(_[n]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(_));let n;if(!(t&&t.length>1))return toString.call(_);if(n=t[1],"Object"==n)try{return"Object("+JSON.stringify(_)+")"}catch(_){return"Object"}return _ instanceof Error?`${_.name}: ${_.message}\n${_.stack}`:n}function m(_,e){if(!(_ instanceof e))throw new Error(`expected instance of ${e.name}`)}function v(_,e){_>>>=0;const t=w(),r=[];for(let i=_;i<_+4*e;i+=4)r.push(n.__wbindgen_export_4.get(t.getUint32(i,!0)));return n.__externref_drop_slice(_,e),r}function R(_,e){const t=e(4*_.length,4)>>>0;for(let e=0;e<_.length;e++){const n=l(_[e]);w().setUint32(t+4*e,n,!0)}return i=_.length,t}function F(_){const e=n.__wbindgen_export_4.get(_);return n.__externref_table_dealloc(_),e}function z(_,e){let t,r;try{const o=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_spec_url_from_diagram_url(o,g,b,w);var a=u[0],s=u[1];if(u[3])throw a=0,s=0,F(u[2]);return t=a,r=s,d(a,s)}finally{n.__wbindgen_free(t,r,1)}}function x(_,e){let t,r;try{const o=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=n.diagram_plantuml_url_from_diagram_url(o,g,b,w);var a=u[0],s=u[1];if(u[3])throw a=0,s=0,F(u[2]);return t=a,r=s,d(a,s)}finally{n.__wbindgen_free(t,r,1)}}function k(_){let e,t;try{const r=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),a=i,s=n.project_settings_url(r,a);return e=s[0],t=s[1],d(s[0],s[1])}finally{n.__wbindgen_free(e,t,1)}}function j(_,e,t,r){const a=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),s=i,o=c(e,n.__wbindgen_malloc,n.__wbindgen_realloc),g=i,b=c(t,n.__wbindgen_malloc,n.__wbindgen_realloc),w=i,u=c(r,n.__wbindgen_malloc,n.__wbindgen_realloc),d=i;return n.open_remote_diagram(a,s,o,g,b,w,u,d)}function O(_,e,t){n.closure411_externref_shim(_,e,t)}const A=["omit","same-origin","include"],D=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_aisettings_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_addelementtag_free(_>>>0,1)));const S="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_baseelement_free(_>>>0,1)));class q{static __wrap(_){_>>>=0;const e=Object.create(q.prototype);return e.__wbg_ptr=_,S.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,S.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_baseelement_free(_,0)}get alias(){const _=n.__wbg_get_baseelement_alias(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set alias(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_alias(this.__wbg_ptr,e,t)}get label(){const _=n.__wbg_get_baseelement_label(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set label(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_label(this.__wbg_ptr,e,t)}get description(){const _=n.__wbg_get_baseelement_description(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set description(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_description(this.__wbg_ptr,e,t)}get sprite(){const _=n.__wbg_get_baseelement_sprite(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set sprite(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_sprite(this.__wbg_ptr,e,t)}get tags(){const _=n.__wbg_get_baseelement_tags(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set tags(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_tags(this.__wbg_ptr,e,t)}get link(){const _=n.__wbg_get_baseelement_link(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set link(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_link(this.__wbg_ptr,e,t)}get uuid(){const _=n.__wbg_get_baseelement_uuid(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set uuid(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_uuid(this.__wbg_ptr,e,t)}get notes(){const _=n.__wbg_get_baseelement_notes(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set notes(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_baseelement_notes(this.__wbg_ptr,e,t)}}const E="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_boundary_free(_>>>0,1)));class I{static __wrap(_){_>>>=0;const e=Object.create(I.prototype);return e.__wbg_ptr=_,E.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof I?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,E.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_boundary_free(_,0)}get base_data(){const _=n.__wbg_get_boundary_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_boundary_base_data(this.__wbg_ptr,e)}get boundary_type(){return n.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(_){n.__wbg_set_boundary_boundary_type(this.__wbg_ptr,f(_)?0:l(_))}get boundary_custom_type(){const _=n.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set boundary_custom_type(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_boundary_boundary_custom_type(this.__wbg_ptr,e,t)}get sub_elements(){const _=n.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set sub_elements(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_boundary_sub_elements(this.__wbg_ptr,e,t)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_c4elements_free(_>>>0,1)));const H="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_component_free(_>>>0,1)));class M{static __wrap(_){_>>>=0;const e=Object.create(M.prototype);return e.__wbg_ptr=_,H.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof M?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_component_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get technology(){const _=n.__wbg_get_component_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_component_technology(this.__wbg_ptr,e,t)}get component_type(){return n.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(_){n.__wbg_set_component_component_type(this.__wbg_ptr,f(_)?0:l(_))}}const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_container_free(_>>>0,1)));class C{static __wrap(_){_>>>=0;const e=Object.create(C.prototype);return e.__wbg_ptr=_,J.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof C?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_container_free(_,0)}get base_data(){const _=n.__wbg_get_container_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_container_base_data(this.__wbg_ptr,e)}get technology(){const _=n.__wbg_get_container_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_container_technology(this.__wbg_ptr,e,t)}get container_type(){return n.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(_){n.__wbg_set_container_container_type(this.__wbg_ptr,f(_)?0:l(_))}}const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_deploymentnode_free(_>>>0,1)));class N{static __wrap(_){_>>>=0;const e=Object.create(N.prototype);return e.__wbg_ptr=_,G.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof N?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_deploymentnode_free(_,0)}get base_data(){const _=n.__wbg_get_deploymentnode_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_deploymentnode_base_data(this.__wbg_ptr,e)}get deploymeny_node_custom_type(){const _=n.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set deploymeny_node_custom_type(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,e,t)}get deployment_node_type(){return n.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(_){n.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,f(_)?0:l(_))}get sub_elements(){const _=n.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set sub_elements(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_deploymentnode_sub_elements(this.__wbg_ptr,e,t)}}const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagram_free(_>>>0,1)));class L{static __wrap(_){_>>>=0;const e=Object.create(L.prototype);return e.__wbg_ptr=_,W.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagram_free(_,0)}get diagram_name(){const _=n.__wbg_get_diagram_diagram_name(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set diagram_name(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_diagram_name(this.__wbg_ptr,e,t)}get diagram_type(){return n.__wbg_get_diagram_diagram_type(this.__wbg_ptr)}set diagram_type(_){n.__wbg_set_diagram_diagram_type(this.__wbg_ptr,f(_)?0:l(_))}get diagram_spec(){const _=n.__wbg_get_diagram_diagram_spec(this.__wbg_ptr);return 0===_?void 0:T.__wrap(_)}set diagram_spec(_){let e=0;f(_)||(m(_,T),e=_.__destroy_into_raw()),n.__wbg_set_diagram_diagram_spec(this.__wbg_ptr,e)}get diagram_plantuml(){const _=n.__wbg_get_diagram_diagram_plantuml(this.__wbg_ptr);return 0===_?void 0:Q.__wrap(_)}set diagram_plantuml(_){let e=0;f(_)||(m(_,Q),e=_.__destroy_into_raw()),n.__wbg_set_diagram_diagram_plantuml(this.__wbg_ptr,e)}get raw_plantuml(){const _=n.__wbg_get_diagram_raw_plantuml(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set raw_plantuml(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_raw_plantuml(this.__wbg_ptr,e,t)}get last_modified(){const _=n.__wbg_get_diagram_last_modified(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set last_modified(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagram_last_modified(this.__wbg_ptr,e,t)}get auto_layout_errors(){const _=n.__wbg_get_diagram_auto_layout_errors(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set auto_layout_errors(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagram_auto_layout_errors(this.__wbg_ptr,e,t)}get auto_layout(){return n.diagram_auto_layout(this.__wbg_ptr)}set auto_layout(_){n.diagram_set_auto_layout(this.__wbg_ptr,_)}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramelementspec_free(_>>>0,1)));class U{static __wrap(_){_>>>=0;const e=Object.create(U.prototype);return e.__wbg_ptr=_,B.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof U?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramelementspec_free(_,0)}get alias(){const _=n.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set alias(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,e,t)}get from(){const _=n.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set from(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_from(this.__wbg_ptr,e,t)}get to(){const _=n.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set to(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramelementspec_to(this.__wbg_ptr,e,t)}get shapes(){const _=n.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set shapes(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,e,t)}get element_type(){return n.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(_){n.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,f(_)?0:l(_))}get position(){const _=n.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===_?void 0:t_.__wrap(_)}set position(_){let e=0;f(_)||(m(_,t_),e=_.__destroy_into_raw()),n.__wbg_set_diagramelementspec_position(this.__wbg_ptr,e)}get size(){const _=n.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===_?void 0:o_.__wrap(_)}set size(_){let e=0;f(_)||(m(_,o_),e=_.__destroy_into_raw()),n.__wbg_set_diagramelementspec_size(this.__wbg_ptr,e)}get inner_specs(){const _=n.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set inner_specs(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,e,t)}}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramplantuml_free(_>>>0,1)));class Q{static __wrap(_){_>>>=0;const e=Object.create(Q.prototype);return e.__wbg_ptr=_,$.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramplantuml_free(_,0)}get tags(){return n.diagramplantuml_tags(this.__wbg_ptr)}set tags(_){n.diagramplantuml_set_tags(this.__wbg_ptr,_)}get diagram_id(){const _=n.__wbg_get_diagramplantuml_diagram_id(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set diagram_id(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramplantuml_diagram_id(this.__wbg_ptr,e,t)}get elements(){const _=n.__wbg_get_diagramplantuml_elements(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set elements(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramplantuml_elements(this.__wbg_ptr,e,t)}get aliases(){const _=n.__wbg_get_diagramplantuml_aliases(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set aliases(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramplantuml_aliases(this.__wbg_ptr,e,t)}}const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_diagramspec_free(_>>>0,1)));class T{static __wrap(_){_>>>=0;const e=Object.create(T.prototype);return e.__wbg_ptr=_,Y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_diagramspec_free(_,0)}get uuid(){let _,e;try{const t=n.__wbg_get_diagramspec_uuid(this.__wbg_ptr);return _=t[0],e=t[1],d(t[0],t[1])}finally{n.__wbindgen_free(_,e,1)}}set uuid(_){const e=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramspec_uuid(this.__wbg_ptr,e,t)}get description(){const _=n.__wbg_get_diagramspec_description(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set description(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_diagramspec_description(this.__wbg_ptr,e,t)}get tags(){const _=n.__wbg_get_diagramspec_tags(this.__wbg_ptr);let e;return 0!==_[0]&&(e=v(_[0],_[1]).slice(),n.__wbindgen_free(_[0],4*_[1],4)),e}set tags(_){var e=f(_)?0:R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_tags(this.__wbg_ptr,e,t)}get elements_specs(){const _=n.__wbg_get_diagramspec_elements_specs(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set elements_specs(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_elements_specs(this.__wbg_ptr,e,t)}get shapes(){const _=n.__wbg_get_diagramspec_shapes(this.__wbg_ptr);var e=v(_[0],_[1]).slice();return n.__wbindgen_free(_[0],4*_[1],4),e}set shapes(_){const e=R(_,n.__wbindgen_malloc),t=i;n.__wbg_set_diagramspec_shapes(this.__wbg_ptr,e,t)}get auto_layout_enabled(){return 0!==n.__wbg_get_diagramspec_auto_layout_enabled(this.__wbg_ptr)}set auto_layout_enabled(_){n.__wbg_set_diagramspec_auto_layout_enabled(this.__wbg_ptr,_)}get auto_layout_orientation(){return n.__wbg_get_diagramspec_auto_layout_orientation(this.__wbg_ptr)}set auto_layout_orientation(_){n.__wbg_set_diagramspec_auto_layout_orientation(this.__wbg_ptr,_)}get auto_layout_only_straight_arrows(){return 0!==n.__wbg_get_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr)}set auto_layout_only_straight_arrows(_){n.__wbg_set_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr,_)}get auto_layout_ranksep(){return n.__wbg_get_diagramspec_auto_layout_ranksep(this.__wbg_ptr)}set auto_layout_ranksep(_){n.__wbg_set_diagramspec_auto_layout_ranksep(this.__wbg_ptr,_)}get auto_layout_subgraph_inner_margin(){return n.__wbg_get_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr)}set auto_layout_subgraph_inner_margin(_){n.__wbg_set_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr,_)}get auto_layout_subgraph_outer_margin(){return n.__wbg_get_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr)}set auto_layout_subgraph_outer_margin(_){n.__wbg_set_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr,_)}get grid_enabled(){return 0!==n.__wbg_get_diagramspec_grid_enabled(this.__wbg_ptr)}set grid_enabled(_){n.__wbg_set_diagramspec_grid_enabled(this.__wbg_ptr,_)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_diagramsthemesettings_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_elementdata_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_hookpayload_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingbytesource_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingsink_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_intounderlyingsource_free(_>>>0,1)));const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_minaerror_free(_>>>0,1)));class K{static __wrap(_){_>>>=0;const e=Object.create(K.prototype);return e.__wbg_ptr=_,P.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_minaerror_free(_,0)}get code(){return n.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(_){n.__wbg_set_minaerror_code(this.__wbg_ptr,_)}get msg(){let _,e;try{const t=n.__wbg_get_minaerror_msg(this.__wbg_ptr);return _=t[0],e=t[1],d(t[0],t[1])}finally{n.__wbindgen_free(_,e,1)}}set msg(_){const e=c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_minaerror_msg(this.__wbg_ptr,e,t)}}const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_person_free(_>>>0,1)));class Z{static __wrap(_){_>>>=0;const e=Object.create(Z.prototype);return e.__wbg_ptr=_,V.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof Z?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_person_free(_,0)}get base_data(){const _=n.__wbg_get_component_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_component_base_data(this.__wbg_ptr,e)}get person_type(){return n.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(_){n.__wbg_set_person_person_type(this.__wbg_ptr,f(_)?0:l(_))}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_point_free(_>>>0,1)));class __{static __wrap(_){_>>>=0;const e=Object.create(__.prototype);return e.__wbg_ptr=_,X.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof __?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_point_free(_,0)}get x(){return n.__wbg_get_point_x(this.__wbg_ptr)}set x(_){n.__wbg_set_point_x(this.__wbg_ptr,_)}get y(){return n.__wbg_get_point_y(this.__wbg_ptr)}set y(_){n.__wbg_set_point_y(this.__wbg_ptr,_)}}const e_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_position_free(_>>>0,1)));class t_{static __wrap(_){_>>>=0;const e=Object.create(t_.prototype);return e.__wbg_ptr=_,e_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,e_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_position_free(_,0)}get left(){const _=n.__wbg_get_position_left(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set left(_){n.__wbg_set_position_left(this.__wbg_ptr,!f(_),f(_)?0:_)}get top(){const _=n.__wbg_get_position_top(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set top(_){n.__wbg_set_position_top(this.__wbg_ptr,!f(_),f(_)?0:_)}get z_index(){const _=n.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===_?void 0:_}set z_index(_){n.__wbg_set_position_z_index(this.__wbg_ptr,f(_)?4294967297:0|_)}get angle(){const _=n.__wbg_get_position_angle(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set angle(_){n.__wbg_set_position_angle(this.__wbg_ptr,!f(_),f(_)?0:_)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_project_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_projectlibrary_free(_>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_projectsettings_free(_>>>0,1)));const n_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_relationship_free(_>>>0,1)));class r_{static __wrap(_){_>>>=0;const e=Object.create(r_.prototype);return e.__wbg_ptr=_,n_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof r_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,n_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_relationship_free(_,0)}get base_data(){const _=n.__wbg_get_container_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_container_base_data(this.__wbg_ptr,e)}get from(){const _=n.__wbg_get_relationship_from(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set from(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_container_technology(this.__wbg_ptr,e,t)}get to(){const _=n.__wbg_get_relationship_to(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set to(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_boundary_boundary_custom_type(this.__wbg_ptr,e,t)}get technology(){const _=n.__wbg_get_relationship_technology(this.__wbg_ptr);let e;return 0!==_[0]&&(e=d(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),e}set technology(_){var e=f(_)?0:c(_,n.__wbindgen_malloc,n.__wbindgen_realloc),t=i;n.__wbg_set_relationship_technology(this.__wbg_ptr,e,t)}get relationship_type(){return n.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(_){n.__wbg_set_relationship_relationship_type(this.__wbg_ptr,f(_)?0:l(_))}}const i_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_shape_free(_>>>0,1)));class a_{static __wrap(_){_>>>=0;const e=Object.create(a_.prototype);return e.__wbg_ptr=_,i_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof a_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,i_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_shape_free(_,0)}get shape_type(){return n.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(_){n.__wbg_set_shape_shape_type(this.__wbg_ptr,f(_)?0:l(_))}get position(){const _=n.__wbg_get_shape_position(this.__wbg_ptr);return 0===_?void 0:t_.__wrap(_)}set position(_){let e=0;f(_)||(m(_,t_),e=_.__destroy_into_raw()),n.__wbg_set_shape_position(this.__wbg_ptr,e)}get size(){const _=n.__wbg_get_shape_size(this.__wbg_ptr);return 0===_?void 0:o_.__wrap(_)}set size(_){let e=0;f(_)||(m(_,o_),e=_.__destroy_into_raw()),n.__wbg_set_shape_size(this.__wbg_ptr,e)}}const s_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_size_free(_>>>0,1)));class o_{static __wrap(_){_>>>=0;const e=Object.create(o_.prototype);return e.__wbg_ptr=_,s_.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,s_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_size_free(_,0)}get width(){const _=n.__wbg_get_size_width(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set width(_){n.__wbg_set_size_width(this.__wbg_ptr,!f(_),f(_)?0:_)}get height(){const _=n.__wbg_get_size_height(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set height(_){n.__wbg_set_size_height(this.__wbg_ptr,!f(_),f(_)?0:_)}get scale_x(){const _=n.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set scale_x(_){n.__wbg_set_size_scale_x(this.__wbg_ptr,!f(_),f(_)?0:_)}get scale_y(){const _=n.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===_[0]?void 0:_[1]}set scale_y(_){n.__wbg_set_size_scale_y(this.__wbg_ptr,!f(_),f(_)?0:_)}}const g_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((_=>n.__wbg_softwaresystem_free(_>>>0,1)));class c_{static __wrap(_){_>>>=0;const e=Object.create(c_.prototype);return e.__wbg_ptr=_,g_.register(e,e.__wbg_ptr,e),e}static __unwrap(_){return _ instanceof c_?_.__destroy_into_raw():0}__destroy_into_raw(){const _=this.__wbg_ptr;return this.__wbg_ptr=0,g_.unregister(this),_}free(){const _=this.__destroy_into_raw();n.__wbg_softwaresystem_free(_,0)}get base_data(){const _=n.__wbg_get_softwaresystem_base_data(this.__wbg_ptr);return q.__wrap(_)}set base_data(_){m(_,q);var e=_.__destroy_into_raw();n.__wbg_set_softwaresystem_base_data(this.__wbg_ptr,e)}get system_type(){return n.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(_){n.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,f(_)?0:l(_))}}function b_(_,e){const t=c(String(e),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function w_(_){_.abort()}function u_(){return p((function(_,e,t,n,r){_.append(d(e,t),d(n,r))}),arguments)}function d_(){return p((function(_,e,t,n,r){_.append(d(e,t),d(n,r))}),arguments)}function l_(){return p((function(_,e,t,n,r,i){_.append(d(e,t),n,d(r,i))}),arguments)}function p_(){return p((function(_,e,t,n){_.append(d(e,t),n)}),arguments)}function f_(){return p((function(_){return _.arrayBuffer()}),arguments)}function y_(_){return _.arrayBuffer()}function h_(_){return I.__wrap(_)}function m_(_){return I.__unwrap(_)}function v_(_){return _.buffer}function R_(_){return _.buffer}function F_(_){const e=_.byobRequest;return f(e)?0:l(e)}function z_(_){return _.byteLength}function x_(_){return _.byteOffset}function k_(){return p((function(_,e){return _.call(e)}),arguments)}function j_(){return p((function(_,e,t){return _.call(e,t)}),arguments)}function O_(_){return _.close()}function A_(){return p((function(_){_.close()}),arguments)}function D_(){return p((function(_){_.close()}),arguments)}function S_(_){return M.__wrap(_)}function q_(_){return M.__unwrap(_)}function E_(_){return C.__wrap(_)}function I_(_){return C.__unwrap(_)}function H_(_,e){return _.createWritable(e)}function M_(_){return _.crypto}function J_(_){console.debug(_)}function C_(_){return N.__wrap(_)}function G_(_){return N.__unwrap(_)}function N_(_){return L.__wrap(_)}function W_(_){return U.__wrap(_)}function L_(_){return U.__unwrap(_)}function B_(_){return _.done}function U_(){return p((function(_,e){_.enqueue(e)}),arguments)}function $_(_){return _.entries()}function Q_(_){return Object.entries(_)}function Y_(_){console.error(_)}function T_(_,e){let t,r;try{t=_,r=e,console.error(d(_,e))}finally{n.__wbindgen_free(t,r,1)}}function P_(_){return fetch(_)}function K_(_,e){return _.fetch(e)}function V_(_,e,t,n){return _.getDirectoryHandle(d(e,t),n)}function Z_(_,e,t,n){return _.getFileHandle(d(e,t),n)}function X_(_){return _.getFile()}function _e(){return p((function(_,e){_.getRandomValues(e)}),arguments)}function ee(){return p((function(_,e){return Reflect.get(_,e)}),arguments)}function te(_,e){return _[e>>>0]}function ne(_,e){return _[e]}function re(){return p((function(_,e){return Reflect.has(_,e)}),arguments)}function ie(_){return _.headers}function ae(_){console.info(_)}function se(_){let e;try{e=_ instanceof ArrayBuffer}catch(_){e=!1}return e}function oe(_){let e;try{e=_ instanceof Error}catch(_){e=!1}return e}function ge(_){let e;try{e=_ instanceof FileSystemDirectoryHandle}catch(_){e=!1}return e}function ce(_){let e;try{e=_ instanceof FileSystemFileHandle}catch(_){e=!1}return e}function be(_){let e;try{e=_ instanceof File}catch(_){e=!1}return e}function we(_){let e;try{e=_ instanceof Response}catch(_){e=!1}return e}function ue(_){let e;try{e=_ instanceof Uint8Array}catch(_){e=!1}return e}function de(_){return Array.isArray(_)}function le(_){return Number.isSafeInteger(_)}function pe(){return Symbol.iterator}function fe(_){return _.lastModified}function ye(_){return _.length}function he(_){return _.length}function me(_){console.log(_)}function ve(_){return _.message}function Re(_){return K.__wrap(_)}function Fe(_){return _.msCrypto}function ze(_,e){const t=c(e.name,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function xe(){return p((function(){return new Headers}),arguments)}function ke(_,e){try{var t={a:_,b:e};const r=new Promise(((_,e)=>{const r=t.a;t.a=0;try{return function(_,e,t,r){n.closure73_externref_shim(_,e,t,r)}(r,t.b,_,e)}finally{t.a=r}}));return r}finally{t.a=t.b=0}}function je(){return new Object}function Oe(){return new Map}function Ae(){return new Array}function De(){return new Error}function Se(){return p((function(){return new FormData}),arguments)}function qe(_){return new Uint8Array(_)}function Ee(_,e){return new Error(d(_,e))}function Ie(){return p((function(){return new AbortController}),arguments)}function He(_,e){return new Function(d(_,e))}function Me(_,e,t){return new Uint8Array(_,e>>>0,t>>>0)}function Je(_){return new Uint8Array(_>>>0)}function Ce(){return p((function(_,e,t){return new Request(d(_,e),t)}),arguments)}function Ge(){return p((function(_,e){return new Blob(_,e)}),arguments)}function Ne(_){return _.next}function We(){return p((function(_){return _.next()}),arguments)}function Le(){return p((function(_){return _.next()}),arguments)}function Be(_){return _.node}function Ue(_){return Z.__wrap(_)}function $e(_){return Z.__unwrap(_)}function Qe(_){return __.__wrap(_)}function Ye(_){return __.__unwrap(_)}function Te(){return p((function(_,e){_.postMessage(e)}),arguments)}function Pe(_){return _.process}function Ke(_,e){return _.push(e)}function Ve(_){queueMicrotask(_)}function Ze(_){return _.queueMicrotask}function Xe(){return p((function(_,e){_.randomFillSync(e)}),arguments)}function _t(_){return r_.__wrap(_)}function et(_){return r_.__unwrap(_)}function tt(_,e,t){return _.removeEntry(d(e,t))}function nt(_,e,t,n){return _.removeEntry(d(e,t),n)}function rt(){return p((function(){return _.require}),arguments)}function it(_){return Promise.resolve(_)}function at(){return p((function(_,e){_.respond(e>>>0)}),arguments)}function st(){return p((function(_,e){return _.seek(e)}),arguments)}function ot(_,e,t){_[e]=t}function gt(_,e,t){_[e>>>0]=t}function ct(_,e,t){_.set(e,t>>>0)}function bt(_,e,t){return _.set(e,t)}function wt(_,e){_.body=e}function ut(_,e){_.create=0!==e}function dt(_,e){_.create=0!==e}function lt(_,e){_.credentials=A[e]}function pt(_,e){_.headers=e}function ft(_,e){_.keepExistingData=0!==e}function yt(_,e,t){_.method=d(e,t)}function ht(_,e){_.mode=D[e]}function mt(_,e){_.recursive=0!==e}function vt(_,e){_.signal=e}function Rt(_,e,t){_.type=d(e,t)}function Ft(_){return a_.__wrap(_)}function zt(_){return a_.__unwrap(_)}function xt(_){return _.signal}function kt(_){return _.size}function jt(_){return c_.__wrap(_)}function Ot(_){return c_.__unwrap(_)}function At(_,e){const t=c(e.stack,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Dt(){const _="undefined"==typeof global?null:global;return f(_)?0:l(_)}function St(){const _="undefined"==typeof globalThis?null:globalThis;return f(_)?0:l(_)}function qt(){const _="undefined"==typeof self?null:self;return f(_)?0:l(_)}function Et(){const _="undefined"==typeof window?null:window;return f(_)?0:l(_)}function It(_){return _.status}function Ht(){return p((function(_){return JSON.stringify(_)}),arguments)}function Mt(_,e,t){return _.subarray(e>>>0,t>>>0)}function Jt(_){return _.text()}function Ct(_,e){return _.then(e)}function Gt(_,e,t){return _.then(e,t)}function Nt(_,e){const t=c(e.url,n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Wt(_){return _.value}function Lt(_){return _.versions}function Bt(_){const e=_.view;return f(e)?0:l(e)}function Ut(_){console.warn(_)}function $t(){return p((function(_,e){return _.write(e)}),arguments)}function Qt(_){return+_}function Yt(_){return BigInt.asUintN(64,_)}function Tt(_,e){const t="bigint"==typeof e?e:void 0;w().setBigInt64(_+8,f(t)?BigInt(0):t,!0),w().setInt32(_+0,!f(t),!0)}function Pt(_){return"boolean"==typeof _?_?1:0:2}function Kt(_){const e=_.original;return 1==e.cnt--&&(e.a=0,!0)}function Vt(_,e,t){const r=function(_,e,t,r){const i={a:_,b:e,cnt:1,dtor:412},a=(..._)=>{i.cnt++;const e=i.a;i.a=0;try{return r(e,i.b,..._)}finally{0==--i.cnt?(n.__wbindgen_export_6.get(i.dtor)(e,i.b),y.unregister(i)):i.a=e}};return a.original=i,y.register(a,i,i),a}(_,e,0,O);return r}function Zt(_,e){const t=c(h(e),n.__wbindgen_malloc,n.__wbindgen_realloc),r=i;w().setInt32(_+4,r,!0),w().setInt32(_+0,t,!0)}function Xt(_,e){return new Error(d(_,e))}function _n(_,e){return _ in e}function en(){const _=n.__wbindgen_export_4,e=_.grow(4);_.set(0,void 0),_.set(e+0,void 0),_.set(e+1,null),_.set(e+2,!0),_.set(e+3,!1)}function tn(_){return"bigint"==typeof _}function nn(_){return"function"==typeof _}function rn(_){return"object"==typeof _&&null!==_}function an(_){return"string"==typeof _}function sn(_){return void 0===_}function on(_,e){return _===e}function gn(_,e){return _==e}function cn(){return n.memory}function bn(_,e){const t="number"==typeof e?e:void 0;w().setFloat64(_+8,f(t)?0:t,!0),w().setInt32(_+0,!f(t),!0)}function wn(_){return _}function un(_,e){const t="string"==typeof e?e:void 0;var r=f(t)?0:c(t,n.__wbindgen_malloc,n.__wbindgen_realloc),a=i;w().setInt32(_+4,a,!0),w().setInt32(_+0,r,!0)}function dn(_,e){return d(_,e)}function ln(_,e){throw new Error(d(_,e))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((_=>n.__wbg_themessettings_free(_>>>0,1)))},507:(_,e,t)=>{t.a(_,(async(_,n)=>{try{t.d(e,{Ay:()=>g,Oc:()=>o,Y$:()=>a,wS:()=>s});var r=t(519),i=_([r]);async function a(_,e){if(e){const t="https://keadex.dev/api/download-gh-raw-file",n={headers:{"Keadex-Gh-Url":_}};return e&&(n.headers["Keadex-Gh-Authorization"]=e),await fetch(t,n)}return await fetch(_)}async function s(_,e,t){let n,i,s;try{n=(0,r._Cc)(_),i=(0,r.Llp)(_,e),s=(0,r.JD7)(_,e)}catch(_){throw console.error(_),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(n&&i&&s){let _,e,r;try{const o=await a(n,t),g=await a(i,t),c=await a(s,t);if(o.ok&&g.ok&&c.ok)return _=await o.text(),e=await g.text(),r=await c.text(),{projectSettingsJson:_,plantuml:e,spec:r};throw new Error}catch(_){throw console.error(_),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}async function o(_,e,t){try{const n=await s(_,e,t);if(n)return await(0,r.Oxg)(_,e,n.plantuml,n.spec)}catch(_){console.error(_)}}r=(i.then?(await i)():i)[0];const g={fetchGhRawFile:a,downloadDiagramData:s,openRemoteDiagram:o};n()}catch(c){n(c)}}))},519:(_,e,t)=>{t.a(_,(async(_,n)=>{try{t.d(e,{JD7:()=>i.JD7,Llp:()=>i.Llp,Oxg:()=>i.Oxg,_Cc:()=>i._Cc});var r=t(196),i=t(457),a=_([r]);r=(a.then?(await a)():a)[0],(0,i.lIU)(r),r.__wbindgen_start(),n()}catch(_){n(_)}}))}},i={};function a(_){var e=i[_];if(void 0!==e)return e.exports;var t=i[_]={id:_,loaded:!1,exports:{}};return r[_](t,t.exports,a),t.loaded=!0,t.exports}_="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",e="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",t="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=_=>{_&&_.d<1&&(_.d=1,_.forEach((_=>_.r--)),_.forEach((_=>_.r--?_.r++:_())))},a.a=(r,i,a)=>{var s;a&&((s=[]).d=-1);var o,g,c,b=new Set,w=r.exports,u=new Promise(((_,e)=>{c=e,g=_}));u[e]=w,u[_]=_=>(s&&_(s),b.forEach(_),u.catch((_=>{}))),r.exports=u,i((r=>{var i;o=(r=>r.map((r=>{if(null!==r&&"object"==typeof r){if(r[_])return r;if(r.then){var i=[];i.d=0,r.then((_=>{a[e]=_,n(i)}),(_=>{a[t]=_,n(i)}));var a={};return a[_]=_=>_(i),a}}var s={};return s[_]=_=>{},s[e]=r,s})))(r);var a=()=>o.map((_=>{if(_[t])throw _[t];return _[e]})),g=new Promise((e=>{(i=()=>e(a)).r=0;var t=_=>_!==s&&!b.has(_)&&(b.add(_),_&&!_.d&&(i.r++,_.push(i)));o.map((e=>e[_](t)))}));return i.r?g:a()}),(_=>(_?c(u[t]=_):g(w),n(s)))),s&&s.d<0&&(s.d=0)},a.d=(_,e)=>{for(var t in e)a.o(e,t)&&!a.o(_,t)&&Object.defineProperty(_,t,{enumerable:!0,get:e[t]})},a.hmd=_=>((_=Object.create(_)).children||(_.children=[]),Object.defineProperty(_,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+_.id)}}),_),a.o=(_,e)=>Object.prototype.hasOwnProperty.call(_,e),a.v=(_,e,t,n)=>Promise.all([import("fs"),import("url")]).then((([{readFile:_},{URL:e}])=>new Promise(((n,r)=>{_(new e(t+".module.wasm",import.meta.url),((_,e)=>{if(_)return r(_);n({arrayBuffer:()=>e})}))})))).then((_=>_.arrayBuffer())).then((_=>WebAssembly.instantiate(_,n))).then((e=>Object.assign(_,e.instance.exports)));var s=a(507),o=(s=await s).Ay,g=s.wS,c=s.Y$,b=s.Oc;export{o as default,g as downloadDiagramData,c as fetchGhRawFile,b as openRemoteDiagram};
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,t,n,r,a,o,i={15:e=>{e.exports=require("react")},53:e=>{e.exports=require("@fortawesome/react-fontawesome")},61:e=>{e.exports=require("react-i18next")},177:e=>{e.exports=require("@fortawesome/free-solid-svg-icons")},196:(e,t,n)=>{var r=n(457);e.exports=n.v(t,e.id,"51e7b953d4f2ab75ffbe",{"./mina_react_bg.js":{__wbg_debug_3cb59063b29f58c1:r.F$t,__wbg_error_524f506f44df1645:r.pWA,__wbg_info_3daf2e093e091b66:r.ZrD,__wbg_log_c222819a41e063d3:r.pR9,__wbg_warn_4ca3906c248c47c4:r.jwJ,__wbindgen_string_new:r.ycJ,__wbindgen_string_get:r.qNE,__wbindgen_bigint_get_as_i64:r.DMD,__wbindgen_debug_string:r.rl,__wbindgen_throw:r.Qnr,__wbindgen_memory:r.Py0,__wbg_get_b9b93047fe3cf45b:r.RKz,__wbg_length_e2d2a49132c1b256:r.Ry,__wbg_new_78feb108b6472713:r.M2,__wbindgen_number_new:r.QRK,__wbindgen_is_function:r.PRY,__wbg_newnoargs_105ed471475aaf50:r.VrZ,__wbg_new_5e0be73521bc8c17:r.aIY,__wbindgen_is_object:r.qvD,__wbg_next_25feadfc0913fea9:r.yqB,__wbg_next_6574e1a8a62d1055:r.Dn4,__wbg_done_769e5ede4b31c67b:r.Xb8,__wbg_value_cd1ffa7b1ab794f1:r.LMq,__wbg_iterator_9a24c88df860dc65:r.eW0,__wbg_get_67b2ba62fc30de12:r.dzD,__wbg_call_672a4d21634d4a24:r.wHY,__wbg_new_405e22f390576ce2:r.va5,__wbindgen_is_string:r.GuA,__wbindgen_number_get:r.sWe,__wbg_stringify_f7ed6987935b4a24:r.Y6F,__wbindgen_is_undefined:r.vUM,__wbg_set_37837023f3d740e8:r.p8e,__wbg_isArray_a1eab7e0d067391b:r.uod,__wbg_push_737cfc8c1432c2c6:r.tZf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:r.gGA,__wbg_instanceof_Error_4d54113b22d20306:r.fcg,__wbg_new_c68d7209be747379:r.wd3,__wbg_message_97a2af9b89d693a3:r.oGe,__wbg_call_7cccdd69e0791ae2:r.w9h,__wbg_set_8fc6bf8a5b1071d1:r.iAh,__wbg_next_c3ab0d59847b3b5c:r.tER,__wbg_isSafeInteger_343e2beeeece1bb0:r.Yb6,__wbg_entries_3265d4158b33e5dc:r.gHg,__wbg_new_23a2665fac83c611:r.c6u,__wbg_resolve_4851785c9c5f573d:r.wJz,__wbg_then_44b73946d2fb3e7d:r.GQG,__wbg_then_48b406749878a531:r.xV_,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:r.w6e,__wbg_static_accessor_SELF_37c5d418e4bf5819:r.fb$,__wbg_static_accessor_WINDOW_5de37043a91a9c40:r.x0C,__wbg_static_accessor_GLOBAL_88a902d13a557d07:r.ii7,__wbg_buffer_609cc3eee51ed158:r.FHK,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:r.hI8,__wbg_new_a12002a7f91c75be:r.vVD,__wbg_set_65595bdd868b3009:r.HBq,__wbg_length_a446193dc22c12f8:r.eIr,__wbg_instanceof_Uint8Array_17156bcf118086a9:r.SJf,__wbg_newwithlength_a381634e90c276d4:r.HtP,__wbg_buffer_09165b52af8c5237:r._Ue,__wbg_subarray_aa9065fa9dc5df96:r.TOc,__wbg_byteLength_e674b853d9c77e1d:r.x6W,__wbg_byteOffset_fd862df290ef848d:r.cyg,__wbg_setkeepexistingdata_ee7c8cb466e9477f:r.aKt,__wbg_signal_aaf9ad74119f20a4:r.CF8,__wbg_new_e25e5aab09ff45db:r.RG9,__wbg_abort_775ef1d17fc65868:r.gMQ,__wbg_setcreate_4ca762e23d9f78da:r.N9Q,__wbg_setbody_5923b78a95eedf29:r.Nhd,__wbg_setcredentials_c3a22f1cd105a2c6:r.uw1,__wbg_setheaders_834c0bdb6a8949ad:r.rk2,__wbg_setmethod_3c5280fe5d890842:r._hX,__wbg_setmode_5dc300b865044b65:r.BFX,__wbg_setsignal_75b21ef3a81de905:r.l0x,__wbg_settype_39ed370d3edd403c:r.a4S,__wbg_setrecursive_536113a081d6177a:r.ugc,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:r.KA3,__wbg_createWritable_b4ed240dc879905e:r.kPb,__wbg_getFile_2607bc0123c724e0:r.ycy,__wbg_byobRequest_77d9adf63337edfb:r.JpR,__wbg_close_5ce03e29be453811:r.sQY,__wbg_view_fd8a56e8983f448d:r.NgT,__wbg_respond_1f279fa9f8edcb1c:r.dSQ,__wbg_close_24caca68e93b9c03:r.jeC,__wbg_setcreate_139bad94b2874fb5:r.kF0,__wbg_close_304cc1fef3466669:r.oaw,__wbg_enqueue_bb16ba72f537dc9e:r.QHd,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:r.Cjr,__wbg_entries_19efe296f7d36df9:r.RCF,__wbg_getDirectoryHandle_c48a138373d79b3d:r.kTu,__wbg_getFileHandle_5fb877d1ecc74d52:r.Wkh,__wbg_removeEntry_9f6bc325e3383e59:r.m_N,__wbg_removeEntry_a424e90dff229b19:r.lkn,__wbg_name_e4a115def9e2bbaa:r.Yeo,__wbg_new_018dcc2d6c8c2f6a:r.RR8,__wbg_append_8c7dd8d641a5f01b:r.Tbm,__wbg_newwithstrandinit_06c535e0a867c635:r.heb,__wbg_seek_3f0f8d7591f648d7:r.Zk3,__wbg_write_3e4e8c264c8bf357:r.aR4,__wbg_new_9fd39a253424609a:r.z09,__wbg_append_b44785ebeb668479:r.d_N,__wbg_append_b2d1fc16de2a0e81:r.WqA,__wbg_append_299d5d48292c0495:r.cVx,__wbg_has_a5ea9117f258a0ec:r.HSm,__wbg_fetch_509096533071c657:r.gRe,__wbg_fetch_4465c2b10f21a927:r.o0R,__wbg_size_3808d41635a9c259:r.$CF,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:r.qe7,__wbg_arrayBuffer_f18c144cd0125f07:r.RGi,__wbg_text_1f39a8afe3c70a99:r.CFe,__wbindgen_cb_drop:r.LCp,__wbg_queueMicrotask_97d92b4fcc8a61c5:r._mt,__wbg_queueMicrotask_d3219def82552485:r.k2R,__wbindgen_jsval_loose_eq:r.U8c,__wbindgen_boolean_get:r.NhE,__wbindgen_as_number:r.qmw,__wbg_String_1b2069caba3b9783:r.JF5,__wbindgen_error_new:r.RjG,__wbindgen_bigint_from_u64:r.Qg3,__wbg_getwithrefkey_2d7fdfea9645a25b:r.A2U,__wbg_set_2873a5cee2324875:r.v1k,__wbg_new_8a6f238a6ece86ea:r.$Pc,__wbg_stack_0ed75d68575b0f3c:r.x$X,__wbg_error_7534b8e9a36f1ab4:r.WYM,__wbg_crypto_ed58b8e10a292839:r.ilI,__wbg_process_5c1d670bc53614b8:r.Evb,__wbg_versions_c71aa1626a93e0a1:r.ooJ,__wbg_node_02999533c4ea02e3:r.OtZ,__wbg_require_79b1e9274cde3c87:r.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:r.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:r.NNx,__wbg_getRandomValues_bcb4912f16000dc4:r.FGp,__wbg_softwaresystem_unwrap:r.qre,__wbg_point_new:r.nA9,__wbg_boundary_new:r.HCo,__wbg_person_new:r.c1W,__wbg_diagram_new:r.YLb,__wbg_component_new:r.WJm,__wbg_minaerror_new:r.EkI,__wbg_relationship_new:r.NpJ,__wbg_deploymentnode_new:r.ezj,__wbg_shape_new:r._cl,__wbg_container_new:r.e57,__wbg_diagramelementspec_new:r.Dr_,__wbg_softwaresystem_new:r.dM0,__wbg_diagramelementspec_unwrap:r.W3f,__wbg_point_unwrap:r._QJ,__wbg_container_unwrap:r.xB8,__wbg_relationship_unwrap:r.KM7,__wbg_component_unwrap:r.dT0,__wbg_deploymentnode_unwrap:r._Zx,__wbg_person_unwrap:r.Xv$,__wbg_shape_unwrap:r.D7n,__wbg_boundary_unwrap:r.Wq,__wbg_instanceof_File_a4e2256bf71955a9:r.gjJ,__wbg_lastModified_7a9e61b3961224b8:r.gvw,__wbg_instanceof_Response_f2cc20d9f7dfd644:r.Hzn,__wbg_url_ae10c34ca209681d:r.Tp3,__wbg_status_f6360336ca686bf0:r.kK3,__wbg_headers_9cb51cfd2ac780a4:r.Moj,__wbg_arrayBuffer_d1b44c4390db422f:r._iy,__wbindgen_is_bigint:r.YkQ,__wbindgen_jsval_eq:r.BGI,__wbindgen_in:r.zEy,__wbindgen_closure_wrapper1864:r.kIB,__wbindgen_init_externref_table:r.bLn}})},221:e=>{e.exports=require("tw-elements")},334:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.r(t),n.d(t,{MinaReact:()=>d,default:()=>g});var a=n(571),o=n(636),i=n(385),_=n(15),l=n(507),s=n(519),c=n(732),u=e([l,s]);[l,s]=u.then?(await u)():u,(0,i.aC)();const d=e=>{var t;const{projectRootUrl:r,diagramUrl:i,ghToken:u}=e;(0,o.T_)({initTE:async function(){const{initTE:e,Dropdown:t}=await Promise.resolve().then(n.t.bind(n,221,23));await e({Dropdown:t})}});const d=(0,_.useRef)(null),[g,p]=(0,_.useState)(),[b,f]=(0,_.useState)(),[m,w]=(0,_.useState)(),h={onOpenDiagramClick:e=>{let t;try{t=(0,s.qjW)(r,e)}catch(e){console.error(e),y("Invalid URL: the provided URL is an invalid Mina project or diagram.")}t&&v(t)},onOpenExternalLinkClick:e=>{window.open(e,"_blank")}};function y(e){p(null),w(e)}async function v(e){var t,n,a,o;let i;null==(t=d.current)||t.resetCanvas();try{i=await(0,l.wS)(r,e,u)}catch(e){const t=e;if(!(t.message&&t.message.replace(/ /g,"").length>0))throw new Error;y(t.message)}if(null!=(n=i)&&n.projectSettingsJson&&null!=(a=i)&&a.plantuml&&null!=(o=i)&&o.spec)try{f(JSON.parse(i.projectSettingsJson));const t=await(0,s.Oxg)(r,e,i.plantuml,i.spec);p(t)}catch(e){y("Invalid diagram or project settings.")}}(0,_.useEffect)((()=>{y(null),v(i)}),[i,r,u]);return(0,c.jsxs)("div",{className:"h-full w-full border-t flex items-center",children:[(0,c.jsx)(o.rI,{menuItemsProps:[{id:"dropdown-init",label:"",isHeaderMenuItem:!0,subMenuItems:[{id:"dropdown-init-1",label:""}]}],className:"hidden"}),(0,c.jsx)(o.tz,{}),null===m&&g&&(0,c.jsx)(a.D,{diagramListener:h,diagram:g,ref:d,diagramsThemeSettings:null==b||null==(t=b.themes_settings)?void 0:t.diagrams_theme_settings,target:"web",readOnly:!0}),m&&(0,c.jsx)("div",{className:"w-full text-center text-black",children:m})]})},g=d;r()}catch(e){r(e)}}))},385:(e,t,n)=>{n.d(t,{mg:()=>s,Cp:()=>r,qI:()=>g,aC:()=>b,l:()=>u,$r:()=>l,cr:()=>p,wF:()=>d,x4:()=>c});const r=(e={})=>Object.keys(e).reduce(((t,n)=>(n.startsWith("data-")&&(t[n]=e[n]),t)),{}),a=require("fast-deep-equal/es6/react");var o=n.n(a);const i=require("lodash.clonedeep");var _=n.n(i);const l=(e,t)=>o()(e,t),s=e=>_()(e);function c(e){return e?e.replace(/\\n/g,"\n").replace(/\\t/g," ").replace(/\\r/g,"\n"):void 0}function u(e){return e.sort(((e,t)=>t.length-e.length))[0]}function d(e,t=96){return Number.parseFloat((e/t).toFixed(2))}function g(e,t=96){return Number.parseFloat((e*t).toFixed(2))}function p(e,t=96){return Number.parseFloat((e*(t/72)).toFixed(2))}function b(){console.log=()=>{},console.debug=()=>{}}},416:(e,t,n)=>{function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{A:()=>r})},452:e=>{e.exports=require("pluralize")},457:(e,t,n)=>{let r;function a(e){r=e}n.d(t,{$CF:()=>Rn,$Pc:()=>kt,A2U:()=>at,BFX:()=>yn,BGI:()=>lr,CF8:()=>Tn,CFe:()=>Pn,Cjr:()=>ct,D7n:()=>xn,DMD:()=>qn,Dn4:()=>Wt,Dr_:()=>We,EkI:()=>St,Evb:()=>qt,F$t:()=>Pe,FGp:()=>tt,FHK:()=>Se,GQG:()=>zn,GuA:()=>ir,HBq:()=>un,HCo:()=>ye,HOd:()=>Et,HSm:()=>ot,HtP:()=>Pt,Hzn:()=>gt,JD7:()=>C,JF5:()=>de,JpR:()=>Ee,KA3:()=>ut,KM7:()=>tn,LCp:()=>Jn,LMq:()=>Wn,Llp:()=>R,Ltb:()=>an,M2:()=>Dt,Moj:()=>it,N9Q:()=>bn,NNx:()=>Kt,NgT:()=>Xn,NhE:()=>Qn,Nhd:()=>gn,NpJ:()=>en,OtZ:()=>Xt,Oxg:()=>E,PRY:()=>ar,Py0:()=>cr,QHd:()=>Ze,QRK:()=>dr,Qg3:()=>Un,Qnr:()=>br,RCF:()=>Ge,RG9:()=>jt,RGi:()=>he,RKz:()=>rt,RR8:()=>Tt,RjG:()=>er,Ry:()=>yt,SJf:()=>pt,TOc:()=>Mn,Tbm:()=>be,Tp3:()=>Hn,U8c:()=>sr,VrZ:()=>Ft,W3f:()=>Ye,WJm:()=>Le,WYM:()=>qe,Wkh:()=>Ke,Wq:()=>ve,WqA:()=>fe,Xb8:()=>Xe,Xv$:()=>Gt,Y6F:()=>Fn,YLb:()=>He,Yb6:()=>ft,Yeo:()=>xt,YkQ:()=>rr,Zk3:()=>ln,ZrD:()=>_t,_Cc:()=>S,_QJ:()=>Ut,_Ue:()=>Oe,_Zx:()=>Be,_cl:()=>En,_hX:()=>hn,_iy:()=>we,_mt:()=>Jt,a4S:()=>Sn,aIY:()=>It,aKt:()=>wn,aR4:()=>Gn,bLn:()=>nr,c1W:()=>Zt,c6u:()=>Rt,cVx:()=>pe,cyg:()=>Te,dM0:()=>Cn,dSQ:()=>_n,dT0:()=>Ae,d_N:()=>me,dzD:()=>nt,e57:()=>Ne,eIr:()=>ht,eW0:()=>mt,ezj:()=>ze,fb$:()=>An,fcg:()=>st,gGA:()=>lt,gHg:()=>$e,gMQ:()=>ge,gRe:()=>Je,gjJ:()=>dt,gvw:()=>wt,hI8:()=>Mt,heb:()=>zt,iAh:()=>dn,ii7:()=>kn,ilI:()=>Me,jeC:()=>Ie,jwJ:()=>Zn,k2R:()=>Vt,kF0:()=>pn,kIB:()=>Vn,kK3:()=>jn,kPb:()=>Fe,kTu:()=>Ve,l0x:()=>On,lIU:()=>a,lkn:()=>rn,m_N:()=>nn,nA9:()=>$t,o0R:()=>Qe,oGe:()=>Ot,oaw:()=>De,ooJ:()=>Yn,p8e:()=>cn,pR9:()=>vt,pWA:()=>Ue,qNE:()=>gr,qe7:()=>Bt,qjW:()=>T,qmw:()=>$n,qre:()=>In,qvD:()=>or,rk2:()=>mn,rl:()=>Kn,sQY:()=>ke,sWe:()=>ur,tER:()=>Yt,tZf:()=>Qt,ugc:()=>vn,uod:()=>bt,uw1:()=>fn,v1k:()=>sn,vUM:()=>_r,vVD:()=>At,va5:()=>Ct,w6e:()=>Ln,w9h:()=>Ce,wHY:()=>Re,wJz:()=>on,wd3:()=>Nt,x$X:()=>Dn,x0C:()=>Nn,x6W:()=>xe,xB8:()=>je,xV_:()=>Bn,ycJ:()=>pr,ycy:()=>et,yqB:()=>Ht,z09:()=>Lt,zEy:()=>tr}),e=n.hmd(e);let o=0,i=null;function _(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(r.memory.buffer)),i}let l=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const s="function"==typeof l.encodeInto?function(e,t){return l.encodeInto(e,t)}:function(e,t){const n=l.encode(e);return t.set(n),{read:e.length,written:n.length}};function c(e,t,n){if(void 0===n){const n=l.encode(e),r=t(n.length,1)>>>0;return _().subarray(r,r+n.length).set(n),o=n.length,r}let r=e.length,a=t(r,1)>>>0;const i=_();let c=0;for(;c<r;c++){const t=e.charCodeAt(c);if(t>127)break;i[a+c]=t}if(c!==r){0!==c&&(e=e.slice(c)),a=n(a,r,r=c+3*e.length,1)>>>0;const t=_().subarray(a+c,a+r);c+=s(e,t).written,a=n(a,r,c,1)>>>0}return o=c,a}let u=null;function d(){return(null===u||!0===u.buffer.detached||void 0===u.buffer.detached&&u.buffer!==r.memory.buffer)&&(u=new DataView(r.memory.buffer)),u}let g=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function p(e,t){return e>>>=0,g.decode(_().subarray(e,e+t))}function b(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_4.set(t,e),t}function f(e,t){try{return e.apply(this,t)}catch(e){const t=b(e);r.__wbindgen_exn_store(t)}}function m(e){return null==e}g.decode();const w="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{r.__wbindgen_export_6.get(e.dtor)(e.a,e.b)}));function h(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let n="[";t>0&&(n+=h(e[0]));for(let r=1;r<t;r++)n+=", "+h(e[r]);return n+="]",n}const n=/\[object ([^\]]+)\]/.exec(toString.call(e));let r;if(!(n&&n.length>1))return toString.call(e);if(r=n[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function y(e,t){e>>>=0;const n=d(),a=[];for(let o=e;o<e+4*t;o+=4)a.push(r.__wbindgen_export_4.get(n.getUint32(o,!0)));return r.__externref_drop_slice(e,t),a}function v(e,t){const n=t(4*e.length,4)>>>0;for(let t=0;t<e.length;t++){const r=b(e[t]);d().setUint32(n+4*t,r,!0)}return o=e.length,n}function O(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function S(e){let t,n;try{const a=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o,_=r.project_settings_url(a,i);return t=_[0],n=_[1],p(_[0],_[1])}finally{r.__wbindgen_free(t,n,1)}}function E(e,t,n,a){const i=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,l=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=c(a,r.__wbindgen_malloc,r.__wbindgen_realloc),p=o;return r.open_remote_diagram(i,_,l,s,u,d,g,p)}function x(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function T(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_url_from_link_string(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,x(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function R(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_plantuml_url_from_diagram_url(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,x(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function C(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_spec_url_from_diagram_url(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,x(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function I(e,t,n){r.closure263_externref_shim(e,t,n)}const D=["omit","same-origin","include"],k=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_aisettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_addelementtag_free(e>>>0,1)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_baseelement_free(e>>>0,1)));class A{static __wrap(e){e>>>=0;const t=Object.create(A.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_baseelement_free(e,0)}get alias(){const e=r.__wbg_get_baseelement_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_alias(this.__wbg_ptr,t,n)}get label(){const e=r.__wbg_get_baseelement_label(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set label(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_label(this.__wbg_ptr,t,n)}get description(){const e=r.__wbg_get_baseelement_description(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set description(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_description(this.__wbg_ptr,t,n)}get sprite(){const e=r.__wbg_get_baseelement_sprite(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set sprite(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_sprite(this.__wbg_ptr,t,n)}get tags(){const e=r.__wbg_get_baseelement_tags(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set tags(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_tags(this.__wbg_ptr,t,n)}get link(){const e=r.__wbg_get_baseelement_link(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set link(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_link(this.__wbg_ptr,t,n)}get uuid(){const e=r.__wbg_get_baseelement_uuid(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set uuid(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_uuid(this.__wbg_ptr,t,n)}get notes(){const e=r.__wbg_get_baseelement_notes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set notes(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_notes(this.__wbg_ptr,t,n)}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_boundary_free(e>>>0,1)));class j{static __wrap(e){e>>>=0;const t=Object.create(j.prototype);return t.__wbg_ptr=e,N.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof j?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_boundary_free(e,0)}get base_data(){const e=r.__wbg_get_boundary_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){O(e,A);var t=e.__destroy_into_raw();r.__wbg_set_boundary_base_data(this.__wbg_ptr,t)}get boundary_type(){return r.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(e){r.__wbg_set_boundary_boundary_type(this.__wbg_ptr,m(e)?0:b(e))}get boundary_custom_type(){const e=r.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set boundary_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_boundary_boundary_custom_type(this.__wbg_ptr,t,n)}get sub_elements(){const e=r.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var t=y(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_boundary_sub_elements(this.__wbg_ptr,t,n)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_c4elements_free(e>>>0,1)));const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_component_free(e>>>0,1)));class M{static __wrap(e){e>>>=0;const t=Object.create(M.prototype);return t.__wbg_ptr=e,F.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof M?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_component_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){O(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_component_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_component_technology(this.__wbg_ptr,t,n)}get component_type(){return r.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(e){r.__wbg_set_component_component_type(this.__wbg_ptr,m(e)?0:b(e))}}const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_container_free(e>>>0,1)));class z{static __wrap(e){e>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=e,P.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_container_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){O(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_container_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_component_technology(this.__wbg_ptr,t,n)}get container_type(){return r.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(e){r.__wbg_set_container_container_type(this.__wbg_ptr,m(e)?0:b(e))}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_deploymentnode_free(e>>>0,1)));class H{static __wrap(e){e>>>=0;const t=Object.create(H.prototype);return t.__wbg_ptr=e,B.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof H?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_deploymentnode_free(e,0)}get base_data(){const e=r.__wbg_get_deploymentnode_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){O(e,A);var t=e.__destroy_into_raw();r.__wbg_set_deploymentnode_base_data(this.__wbg_ptr,t)}get deploymeny_node_custom_type(){const e=r.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set deploymeny_node_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,t,n)}get deployment_node_type(){return r.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(e){r.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,m(e)?0:b(e))}get sub_elements(){const e=r.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var t=y(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_deploymentnode_sub_elements(this.__wbg_ptr,t,n)}}const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagram_free(e>>>0,1)));class Y{static __wrap(e){e>>>=0;const t=Object.create(Y.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagram_free(e,0)}get diagram_name(){const e=r.__wbg_get_diagram_diagram_name(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set diagram_name(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_diagram_name(this.__wbg_ptr,t,n)}get diagram_type(){return r.__wbg_get_diagram_diagram_type(this.__wbg_ptr)}set diagram_type(e){r.__wbg_set_diagram_diagram_type(this.__wbg_ptr,m(e)?0:b(e))}get diagram_spec(){const e=r.__wbg_get_diagram_diagram_spec(this.__wbg_ptr);return 0===e?void 0:q.__wrap(e)}set diagram_spec(e){let t=0;m(e)||(O(e,q),t=e.__destroy_into_raw()),r.__wbg_set_diagram_diagram_spec(this.__wbg_ptr,t)}get diagram_plantuml(){const e=r.__wbg_get_diagram_diagram_plantuml(this.__wbg_ptr);return 0===e?void 0:$.__wrap(e)}set diagram_plantuml(e){let t=0;m(e)||(O(e,$),t=e.__destroy_into_raw()),r.__wbg_set_diagram_diagram_plantuml(this.__wbg_ptr,t)}get raw_plantuml(){const e=r.__wbg_get_diagram_raw_plantuml(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set raw_plantuml(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_raw_plantuml(this.__wbg_ptr,t,n)}get last_modified(){const e=r.__wbg_get_diagram_last_modified(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set last_modified(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_last_modified(this.__wbg_ptr,t,n)}get auto_layout_errors(){const e=r.__wbg_get_diagram_auto_layout_errors(this.__wbg_ptr);let t;return 0!==e[0]&&(t=y(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set auto_layout_errors(e){var t=m(e)?0:v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagram_auto_layout_errors(this.__wbg_ptr,t,n)}get auto_layout(){return r.diagram_auto_layout(this.__wbg_ptr)}set auto_layout(e){r.diagram_set_auto_layout(this.__wbg_ptr,e)}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramelementspec_free(e>>>0,1)));class Z{static __wrap(e){e>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=e,X.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof Z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramelementspec_free(e,0)}get alias(){const e=r.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,t,n)}get from(){const e=r.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_from(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_to(this.__wbg_ptr,t,n)}get shapes(){const e=r.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=y(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set shapes(e){var t=m(e)?0:v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,t,n)}get element_type(){return r.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(e){r.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set position(e){let t=0;m(e)||(O(e,re),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===e?void 0:se.__wrap(e)}set size(e){let t=0;m(e)||(O(e,se),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_size(this.__wbg_ptr,t)}get inner_specs(){const e=r.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let t;return 0!==e[0]&&(t=y(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set inner_specs(e){var t=m(e)?0:v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,t,n)}}const G="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramplantuml_free(e>>>0,1)));class ${static __wrap(e){e>>>=0;const t=Object.create($.prototype);return t.__wbg_ptr=e,G.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramplantuml_free(e,0)}get diagram_id(){const e=r.__wbg_get_diagramplantuml_diagram_id(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set diagram_id(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramplantuml_diagram_id(this.__wbg_ptr,t,n)}get elements(){const e=r.__wbg_get_diagramplantuml_elements(this.__wbg_ptr);var t=y(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set elements(e){const t=v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramplantuml_elements(this.__wbg_ptr,t,n)}get aliases(){const e=r.__wbg_get_diagramplantuml_aliases(this.__wbg_ptr);var t=y(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set aliases(e){const t=v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramplantuml_aliases(this.__wbg_ptr,t,n)}get tags(){return r.diagramplantuml_tags(this.__wbg_ptr)}set tags(e){r.diagramplantuml_set_tags(this.__wbg_ptr,e)}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramspec_free(e>>>0,1)));class q{static __wrap(e){e>>>=0;const t=Object.create(q.prototype);return t.__wbg_ptr=e,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramspec_free(e,0)}get uuid(){let e,t;try{const n=r.__wbg_get_diagramspec_uuid(this.__wbg_ptr);return e=n[0],t=n[1],p(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set uuid(e){const t=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramspec_uuid(this.__wbg_ptr,t,n)}get description(){const e=r.__wbg_get_diagramspec_description(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set description(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramspec_description(this.__wbg_ptr,t,n)}get tags(){const e=r.__wbg_get_diagramspec_tags(this.__wbg_ptr);let t;return 0!==e[0]&&(t=y(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set tags(e){var t=m(e)?0:v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_tags(this.__wbg_ptr,t,n)}get elements_specs(){const e=r.__wbg_get_diagramspec_elements_specs(this.__wbg_ptr);var t=y(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set elements_specs(e){const t=v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_elements_specs(this.__wbg_ptr,t,n)}get shapes(){const e=r.__wbg_get_diagramspec_shapes(this.__wbg_ptr);var t=y(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set shapes(e){const t=v(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_shapes(this.__wbg_ptr,t,n)}get auto_layout_enabled(){return 0!==r.__wbg_get_diagramspec_auto_layout_enabled(this.__wbg_ptr)}set auto_layout_enabled(e){r.__wbg_set_diagramspec_auto_layout_enabled(this.__wbg_ptr,e)}get auto_layout_orientation(){return r.__wbg_get_diagramspec_auto_layout_orientation(this.__wbg_ptr)}set auto_layout_orientation(e){r.__wbg_set_diagramspec_auto_layout_orientation(this.__wbg_ptr,e)}get auto_layout_only_straight_arrows(){return 0!==r.__wbg_get_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr)}set auto_layout_only_straight_arrows(e){r.__wbg_set_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr,e)}get auto_layout_ranksep(){return r.__wbg_get_diagramspec_auto_layout_ranksep(this.__wbg_ptr)}set auto_layout_ranksep(e){r.__wbg_set_diagramspec_auto_layout_ranksep(this.__wbg_ptr,e)}get auto_layout_subgraph_inner_margin(){return r.__wbg_get_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr)}set auto_layout_subgraph_inner_margin(e){r.__wbg_set_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr,e)}get auto_layout_subgraph_outer_margin(){return r.__wbg_get_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr)}set auto_layout_subgraph_outer_margin(e){r.__wbg_set_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr,e)}get grid_enabled(){return 0!==r.__wbg_get_diagramspec_grid_enabled(this.__wbg_ptr)}set grid_enabled(e){r.__wbg_set_diagramspec_grid_enabled(this.__wbg_ptr,e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramsthemesettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_elementdata_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_hookpayload_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingbytesource_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsink_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsource_free(e>>>0,1)));const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_minaerror_free(e>>>0,1)));class J{static __wrap(e){e>>>=0;const t=Object.create(J.prototype);return t.__wbg_ptr=e,Q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_minaerror_free(e,0)}get code(){return r.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(e){r.__wbg_set_minaerror_code(this.__wbg_ptr,e)}get msg(){let e,t;try{const n=r.__wbg_get_minaerror_msg(this.__wbg_ptr);return e=n[0],t=n[1],p(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set msg(e){const t=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_minaerror_msg(this.__wbg_ptr,t,n)}}const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_person_free(e>>>0,1)));class K{static __wrap(e){e>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof K?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_person_free(e,0)}get base_data(){const e=r.__wbg_get_person_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){O(e,A);var t=e.__destroy_into_raw();r.__wbg_set_person_base_data(this.__wbg_ptr,t)}get person_type(){return r.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(e){r.__wbg_set_person_person_type(this.__wbg_ptr,m(e)?0:b(e))}}const ee="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_point_free(e>>>0,1)));class te{static __wrap(e){e>>>=0;const t=Object.create(te.prototype);return t.__wbg_ptr=e,ee.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof te?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_point_free(e,0)}get x(){return r.__wbg_get_point_x(this.__wbg_ptr)}set x(e){r.__wbg_set_point_x(this.__wbg_ptr,e)}get y(){return r.__wbg_get_point_y(this.__wbg_ptr)}set y(e){r.__wbg_set_point_y(this.__wbg_ptr,e)}}const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_position_free(e>>>0,1)));class re{static __wrap(e){e>>>=0;const t=Object.create(re.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_position_free(e,0)}get left(){const e=r.__wbg_get_position_left(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set left(e){r.__wbg_set_position_left(this.__wbg_ptr,!m(e),m(e)?0:e)}get top(){const e=r.__wbg_get_position_top(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set top(e){r.__wbg_set_position_top(this.__wbg_ptr,!m(e),m(e)?0:e)}get z_index(){const e=r.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===e?void 0:e}set z_index(e){r.__wbg_set_position_z_index(this.__wbg_ptr,m(e)?4294967297:0|e)}get angle(){const e=r.__wbg_get_position_angle(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set angle(e){r.__wbg_set_position_angle(this.__wbg_ptr,!m(e),m(e)?0:e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_project_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectlibrary_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectsettings_free(e>>>0,1)));const ae="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_relationship_free(e>>>0,1)));class oe{static __wrap(e){e>>>=0;const t=Object.create(oe.prototype);return t.__wbg_ptr=e,ae.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof oe?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ae.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_relationship_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){O(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get from(){const e=r.__wbg_get_relationship_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_component_technology(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_relationship_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_relationship_to(this.__wbg_ptr,t,n)}get technology(){const e=r.__wbg_get_relationship_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_relationship_technology(this.__wbg_ptr,t,n)}get relationship_type(){return r.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(e){r.__wbg_set_relationship_relationship_type(this.__wbg_ptr,m(e)?0:b(e))}}const ie="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_shape_free(e>>>0,1)));class _e{static __wrap(e){e>>>=0;const t=Object.create(_e.prototype);return t.__wbg_ptr=e,ie.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof _e?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ie.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_shape_free(e,0)}get shape_type(){return r.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(e){r.__wbg_set_shape_shape_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_shape_position(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set position(e){let t=0;m(e)||(O(e,re),t=e.__destroy_into_raw()),r.__wbg_set_shape_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_shape_size(this.__wbg_ptr);return 0===e?void 0:se.__wrap(e)}set size(e){let t=0;m(e)||(O(e,se),t=e.__destroy_into_raw()),r.__wbg_set_shape_size(this.__wbg_ptr,t)}}const le="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_size_free(e>>>0,1)));class se{static __wrap(e){e>>>=0;const t=Object.create(se.prototype);return t.__wbg_ptr=e,le.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,le.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_size_free(e,0)}get width(){const e=r.__wbg_get_size_width(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set width(e){r.__wbg_set_size_width(this.__wbg_ptr,!m(e),m(e)?0:e)}get height(){const e=r.__wbg_get_size_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set height(e){r.__wbg_set_size_height(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_x(){const e=r.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_x(e){r.__wbg_set_size_scale_x(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_y(){const e=r.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_y(e){r.__wbg_set_size_scale_y(this.__wbg_ptr,!m(e),m(e)?0:e)}}const ce="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_softwaresystem_free(e>>>0,1)));class ue{static __wrap(e){e>>>=0;const t=Object.create(ue.prototype);return t.__wbg_ptr=e,ce.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof ue?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ce.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_softwaresystem_free(e,0)}get base_data(){const e=r.__wbg_get_softwaresystem_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){O(e,A);var t=e.__destroy_into_raw();r.__wbg_set_softwaresystem_base_data(this.__wbg_ptr,t)}get system_type(){return r.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(e){r.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,m(e)?0:b(e))}}function de(e,t){const n=c(String(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function ge(e){e.abort()}function pe(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function be(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function fe(){return f((function(e,t,n,r,a,o){e.append(p(t,n),r,p(a,o))}),arguments)}function me(){return f((function(e,t,n,r){e.append(p(t,n),r)}),arguments)}function we(){return f((function(e){return e.arrayBuffer()}),arguments)}function he(e){return e.arrayBuffer()}function ye(e){return j.__wrap(e)}function ve(e){return j.__unwrap(e)}function Oe(e){return e.buffer}function Se(e){return e.buffer}function Ee(e){const t=e.byobRequest;return m(t)?0:b(t)}function xe(e){return e.byteLength}function Te(e){return e.byteOffset}function Re(){return f((function(e,t){return e.call(t)}),arguments)}function Ce(){return f((function(e,t,n){return e.call(t,n)}),arguments)}function Ie(e){return e.close()}function De(){return f((function(e){e.close()}),arguments)}function ke(){return f((function(e){e.close()}),arguments)}function Le(e){return M.__wrap(e)}function Ae(e){return M.__unwrap(e)}function Ne(e){return z.__wrap(e)}function je(e){return z.__unwrap(e)}function Fe(e,t){return e.createWritable(t)}function Me(e){return e.crypto}function Pe(e){console.debug(e)}function ze(e){return H.__wrap(e)}function Be(e){return H.__unwrap(e)}function He(e){return Y.__wrap(e)}function We(e){return Z.__wrap(e)}function Ye(e){return Z.__unwrap(e)}function Xe(e){return e.done}function Ze(){return f((function(e,t){e.enqueue(t)}),arguments)}function Ge(e){return e.entries()}function $e(e){return Object.entries(e)}function Ue(e){console.error(e)}function qe(e,t){let n,a;try{n=e,a=t,console.error(p(e,t))}finally{r.__wbindgen_free(n,a,1)}}function Qe(e){return fetch(e)}function Je(e,t){return e.fetch(t)}function Ve(e,t,n,r){return e.getDirectoryHandle(p(t,n),r)}function Ke(e,t,n,r){return e.getFileHandle(p(t,n),r)}function et(e){return e.getFile()}function tt(){return f((function(e,t){e.getRandomValues(t)}),arguments)}function nt(){return f((function(e,t){return Reflect.get(e,t)}),arguments)}function rt(e,t){return e[t>>>0]}function at(e,t){return e[t]}function ot(){return f((function(e,t){return Reflect.has(e,t)}),arguments)}function it(e){return e.headers}function _t(e){console.info(e)}function lt(e){let t;try{t=e instanceof ArrayBuffer}catch(e){t=!1}return t}function st(e){let t;try{t=e instanceof Error}catch(e){t=!1}return t}function ct(e){let t;try{t=e instanceof FileSystemDirectoryHandle}catch(e){t=!1}return t}function ut(e){let t;try{t=e instanceof FileSystemFileHandle}catch(e){t=!1}return t}function dt(e){let t;try{t=e instanceof File}catch(e){t=!1}return t}function gt(e){let t;try{t=e instanceof Response}catch(e){t=!1}return t}function pt(e){let t;try{t=e instanceof Uint8Array}catch(e){t=!1}return t}function bt(e){return Array.isArray(e)}function ft(e){return Number.isSafeInteger(e)}function mt(){return Symbol.iterator}function wt(e){return e.lastModified}function ht(e){return e.length}function yt(e){return e.length}function vt(e){console.log(e)}function Ot(e){return e.message}function St(e){return J.__wrap(e)}function Et(e){return e.msCrypto}function xt(e,t){const n=c(t.name,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Tt(){return f((function(){return new Headers}),arguments)}function Rt(e,t){try{var n={a:e,b:t};const a=new Promise(((e,t)=>{const a=n.a;n.a=0;try{return function(e,t,n,a){r.closure73_externref_shim(e,t,n,a)}(a,n.b,e,t)}finally{n.a=a}}));return a}finally{n.a=n.b=0}}function Ct(){return new Object}function It(){return new Map}function Dt(){return new Array}function kt(){return new Error}function Lt(){return f((function(){return new FormData}),arguments)}function At(e){return new Uint8Array(e)}function Nt(e,t){return new Error(p(e,t))}function jt(){return f((function(){return new AbortController}),arguments)}function Ft(e,t){return new Function(p(e,t))}function Mt(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function Pt(e){return new Uint8Array(e>>>0)}function zt(){return f((function(e,t,n){return new Request(p(e,t),n)}),arguments)}function Bt(){return f((function(e,t){return new Blob(e,t)}),arguments)}function Ht(e){return e.next}function Wt(){return f((function(e){return e.next()}),arguments)}function Yt(){return f((function(e){return e.next()}),arguments)}function Xt(e){return e.node}function Zt(e){return K.__wrap(e)}function Gt(e){return K.__unwrap(e)}function $t(e){return te.__wrap(e)}function Ut(e){return te.__unwrap(e)}function qt(e){return e.process}function Qt(e,t){return e.push(t)}function Jt(e){queueMicrotask(e)}function Vt(e){return e.queueMicrotask}function Kt(){return f((function(e,t){e.randomFillSync(t)}),arguments)}function en(e){return oe.__wrap(e)}function tn(e){return oe.__unwrap(e)}function nn(e,t,n){return e.removeEntry(p(t,n))}function rn(e,t,n,r){return e.removeEntry(p(t,n),r)}function an(){return f((function(){return e.require}),arguments)}function on(e){return Promise.resolve(e)}function _n(){return f((function(e,t){e.respond(t>>>0)}),arguments)}function ln(){return f((function(e,t){return e.seek(t)}),arguments)}function sn(e,t,n){e[t]=n}function cn(e,t,n){e[t>>>0]=n}function un(e,t,n){e.set(t,n>>>0)}function dn(e,t,n){return e.set(t,n)}function gn(e,t){e.body=t}function pn(e,t){e.create=0!==t}function bn(e,t){e.create=0!==t}function fn(e,t){e.credentials=D[t]}function mn(e,t){e.headers=t}function wn(e,t){e.keepExistingData=0!==t}function hn(e,t,n){e.method=p(t,n)}function yn(e,t){e.mode=k[t]}function vn(e,t){e.recursive=0!==t}function On(e,t){e.signal=t}function Sn(e,t,n){e.type=p(t,n)}function En(e){return _e.__wrap(e)}function xn(e){return _e.__unwrap(e)}function Tn(e){return e.signal}function Rn(e){return e.size}function Cn(e){return ue.__wrap(e)}function In(e){return ue.__unwrap(e)}function Dn(e,t){const n=c(t.stack,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function kn(){const e=void 0===n.g?null:n.g;return m(e)?0:b(e)}function Ln(){const e="undefined"==typeof globalThis?null:globalThis;return m(e)?0:b(e)}function An(){const e="undefined"==typeof self?null:self;return m(e)?0:b(e)}function Nn(){const e="undefined"==typeof window?null:window;return m(e)?0:b(e)}function jn(e){return e.status}function Fn(){return f((function(e){return JSON.stringify(e)}),arguments)}function Mn(e,t,n){return e.subarray(t>>>0,n>>>0)}function Pn(e){return e.text()}function zn(e,t){return e.then(t)}function Bn(e,t,n){return e.then(t,n)}function Hn(e,t){const n=c(t.url,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Wn(e){return e.value}function Yn(e){return e.versions}function Xn(e){const t=e.view;return m(t)?0:b(t)}function Zn(e){console.warn(e)}function Gn(){return f((function(e,t,n){var r,a;return e.write((r=t,a=n,r>>>=0,_().subarray(r/1,r/1+a)))}),arguments)}function $n(e){return+e}function Un(e){return BigInt.asUintN(64,e)}function qn(e,t){const n="bigint"==typeof t?t:void 0;d().setBigInt64(e+8,m(n)?BigInt(0):n,!0),d().setInt32(e+0,!m(n),!0)}function Qn(e){return"boolean"==typeof e?e?1:0:2}function Jn(e){const t=e.original;return 1==t.cnt--&&(t.a=0,!0)}function Vn(e,t,n){const a=function(e,t,n,a){const o={a:e,b:t,cnt:1,dtor:264},i=(...e)=>{o.cnt++;const t=o.a;o.a=0;try{return a(t,o.b,...e)}finally{0==--o.cnt?(r.__wbindgen_export_6.get(o.dtor)(t,o.b),w.unregister(o)):o.a=t}};return i.original=o,w.register(i,o,o),i}(e,t,0,I);return a}function Kn(e,t){const n=c(h(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function er(e,t){return new Error(p(e,t))}function tr(e,t){return e in t}function nr(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function rr(e){return"bigint"==typeof e}function ar(e){return"function"==typeof e}function or(e){return"object"==typeof e&&null!==e}function ir(e){return"string"==typeof e}function _r(e){return void 0===e}function lr(e,t){return e===t}function sr(e,t){return e==t}function cr(){return r.memory}function ur(e,t){const n="number"==typeof t?t:void 0;d().setFloat64(e+8,m(n)?0:n,!0),d().setInt32(e+0,!m(n),!0)}function dr(e){return e}function gr(e,t){const n="string"==typeof t?t:void 0;var a=m(n)?0:c(n,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o;d().setInt32(e+4,i,!0),d().setInt32(e+0,a,!0)}function pr(e,t){return p(e,t)}function br(e,t){throw new Error(p(e,t))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_themessettings_free(e>>>0,1)))},489:e=>{e.exports=require("fabric")},507:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{wS:()=>_});var a=n(519),o=e([a]);async function i(e,t){if(t){const n="https://keadex.dev/api/download-gh-raw-file",r={headers:{"Keadex-Gh-Url":e}};return t&&(r.headers["Keadex-Gh-Authorization"]=t),await fetch(n,r)}return await fetch(e)}async function _(e,t,n){let r,o,_;try{r=(0,a._Cc)(e),o=(0,a.Llp)(e,t),_=(0,a.JD7)(e,t)}catch(e){throw console.error(e),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(r&&o&&_){let e,t,a;try{const l=await i(r,n),s=await i(o,n),c=await i(_,n);if(l.ok&&s.ok&&c.ok)return e=await l.text(),t=await s.text(),a=await c.text(),{projectSettingsJson:e,plantuml:t,spec:a};throw new Error}catch(e){throw console.error(e),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}a=(o.then?(await o)():o)[0],r()}catch(l){r(l)}}))},519:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{JD7:()=>o.JD7,Llp:()=>o.Llp,Oxg:()=>o.Oxg,_Cc:()=>o._Cc,qjW:()=>o.qjW});var a=n(196),o=n(457),i=e([a]);a=(i.then?(await i)():i)[0],(0,o.lIU)(a),a.__wbindgen_start(),r()}catch(e){r(e)}}))},571:(e,t,n)=>{n.d(t,{D:()=>tn});var r=n(416);const a=["TopToBottom","LeftToRight"],o=["https://","http://"];let i=function(e){return e.Alias="Alias",e}({});const _="object:modified",l="mouseup",s="modified",c="selected",u="deselected",d="#FFFFFF",g="#000000",p=12,b=10,f=20,m=20,w=120,h=20,y=10,v={SIZES:{DEFAULT_TOP:f+h,DEFAULT_LEFT:m+w+50,BORDER_WIDTH:1},FONT:{FAMILY:"Roboto"}},O={COLORS:{BG_COLOR_SOFTWARE_SYSTEM_PERSON:"#1168BD",BG_COLOR_CONTAINER:"#438DD5",BG_COLOR_COMPONENT:"#85BBF0",BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#686868",BG_COLOR_CONTAINER_EXT:"#999999",BG_COLOR_COMPONENT_EXT:"#CCCCCC",BG_COLOR_BOUNDARY:d,BG_COLOR_DEPLOYMENT_NODE:d,BORDER_COLOR_SOFTWARE_SYSTEM_PERSON:"#0F5BA6",BORDER_COLOR_CONTAINER:"#3E84C7",BORDER_COLOR_COMPONENT:"#7BADDE",BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#525252",BORDER_COLOR_CONTAINER_EXT:"#8A8A8A",BORDER_COLOR_COMPONENT_EXT:"#BDBDBD",BORDER_COLOR_BOUNDARY:"#666666",BORDER_COLOR_DEPLOYMENT_NODE:"#666666",TEXT_COLOR_SOFTWARE_SYSTEM_PERSON:"#FFFFFF",TEXT_COLOR_CONTAINER:"#FFFFFF",TEXT_COLOR_COMPONENT:"#000000",TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#FFFFFF",TEXT_COLOR_CONTAINER_EXT:"#FFFFFF",TEXT_COLOR_COMPONENT_EXT:"#000000",TEXT_COLOR_BOUNDARY:"#333333",TEXT_COLOR_DEPLOYMENT_NODE:"#333333"},SIZES:{WIDTH:220,MIN_HEIGHT:100,PADDING_BOTTOM:15,BORDER_RADIUS:10,TOP_LABEL:20,TOP_TAGS:5,TOP_TYPE_TECHNOLOGY:2,TOP_DESCRIPTION:25,PADDING_Y_DESCRIPTION:10},FONT:{SIZE:14,SIZE_TAG:12,SIZE_TYPE_TECHNOLOGY:12,SIZE_DESCRIPTION:10}},S={SIZES:{SCALE_Y_TAIL_HEAD:.3,HEAD_BOX_WIDTH:20,RADIUS_TAIL_HEAD:O.SIZES.MIN_HEIGHT/2-v.SIZES.BORDER_WIDTH/2,SCALED_RADIUS_TAIL_HEAD:1/0,WIDTH_TAIL:1/0,WIDTH_HEAD:1/0}};S.SIZES.SCALED_RADIUS_TAIL_HEAD=S.SIZES.RADIUS_TAIL_HEAD*S.SIZES.SCALE_Y_TAIL_HEAD,S.SIZES.WIDTH_TAIL=S.SIZES.SCALED_RADIUS_TAIL_HEAD,S.SIZES.WIDTH_HEAD=S.SIZES.HEAD_BOX_WIDTH+S.SIZES.SCALED_RADIUS_TAIL_HEAD;const E={SIZES:{SCALE_X_TOP_BOTTOM:.15,TOP_BOX_HEIGHT:14,RADIUS_TOP_BOTTOM:O.SIZES.WIDTH/2-v.SIZES.BORDER_WIDTH/2,SCALED_RADIUS_TOP_BOTTOM:1/0,WIDTH_TOP:1/0,WIDTH_BOTTOM:1/0}};E.SIZES.SCALED_RADIUS_TOP_BOTTOM=E.SIZES.RADIUS_TOP_BOTTOM*E.SIZES.SCALE_X_TOP_BOTTOM,E.SIZES.WIDTH_TOP=E.SIZES.TOP_BOX_HEIGHT+E.SIZES.SCALED_RADIUS_TOP_BOTTOM,E.SIZES.WIDTH_BOTTOM=E.SIZES.SCALED_RADIUS_TOP_BOTTOM;const x="rgba(0,0,0,0)",T="#828282",R="#404040",C="#ff8f26",I=10,D=10,k=3,L=3,A=9,N=1,j=2,F=90,M=40,P=45,z=10,B=10,H=150,W=80,Y=10,X={SIZES:{STROKE_DASH_ARRAY:[5,5]}},Z={'"dashed"':{name:'"dashed"',value:[8,5]}};var G=n(385);const $=require("change-case");n(452);var U=n(636),q=n(489);function Q(e){try{return`Open Link ${new URL(e).host.replace("www.","")}`}catch(e){return"Open Link"}}function J(e){return`<${e.toString().toUpperCase()}>`}function V(e,t=!0,n){var r,a,o,i;let _,l,s,c;return e.forEach((e=>{if(e.visible){const r=e.getBoundingRect(!1,!0),a=t?e.getBoundingRect(!0,!1):r;let o=a.left,i=a.top;if(n&&o&&i){const e=fabric.util.transformPoint(new fabric.Point(o,i),n);o=e.x,i=e.y}(void 0===_||o<_)&&(_=o),void 0!==o&&void 0!==r.width&&(void 0===l||o+r.width>l)&&(l=o+r.width),(void 0===c||void 0!==i&&i<c)&&(c=i),void 0!==i&&void 0!==r.height&&(void 0===s||r.height+i>s)&&(s=i+r.height)}})),{left:_,right:l,top:c,bottom:s,width:(null!=(r=l)?r:0)-(null!=(a=_)?a:0),height:(null!=(o=s)?o:0)-(null!=(i=c)?i:0)}}function K(e,t){let n=-1;return e&&(n=e.getObjects().indexOf(t)),-1!==n?n:void 0}function ee(e,t,n=Number.MAX_SAFE_INTEGER){let r=n;return t.forEach((t=>{const n=K(e,t);void 0!==n&&n<r&&(r=n)})),r!==Number.MAX_SAFE_INTEGER?r:void 0}function te(e,t=!0){let n=[];return e&&e.forEach((e=>{(e.visible||!e.visible&&t)&&n.push(e),e.children&&(n=n.concat(te(e.children,t)))})),n}function ne(e){let t=0,n=0;if(e){const r=e.viewportTransform;t=r?r[4]:0,n=r?r[5]:0}return{panX:t,panY:n}}function re(e){var t;const n=e.parent,r=function(e){let t=[];const n=new Set;if(e){let r=[];e.forEach((e=>{const t=e.getVirtualGroupRoot();t&&n.add(t)})),n.forEach((e=>{var t;r=r.concat(te(null!=(t=e.children)?t:[],!0))})),t=e.filter((e=>!r.includes(e)))}return{filteredObjects:t,virtualGroupsRoots:n}}(null==(t=e.canvas)?void 0:t.getActiveObjects());let a,o;if(r.filteredObjects.length>0||r.virtualGroupsRoots.size>1){let e=r.filteredObjects;r.virtualGroupsRoots.forEach((t=>{var n;return e=e.concat(te(null!=(n=t.children)?n:[],!1))})),a=e,o="multiple"}else{var i;a=te(null!=(i=null==n?void 0:n.children)?i:[],!1),o="single"}return{objects:a,type:o}}function ae(e,t){var n,r;return(null==e?void 0:e.length)===(null==t?void 0:t.length)&&(null!=(n=null==e?void 0:e.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?n:[]).sort().join(",")===(null!=(r=null==t?void 0:t.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?r:[]).sort().join(",")}q.fabric.ActiveSelection.prototype._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!1,mt:!1,mr:!1,mb:!1,mtr:!1},q.fabric.Object.prototype.isVirtualGroupParent=function(){return void 0!==this.children&&this.children.length>0},q.fabric.Object.prototype.isVirtualGroupChild=function(){return void 0!==this.parent},q.fabric.Object.prototype.isVirtualGroupRoot=function(){return this.isVirtualGroupParent()&&void 0===this.parent},q.fabric.Object.prototype.isVirtualGroupLeaf=function(){return this.isVirtualGroupChild()&&!this.isVirtualGroupParent()},q.fabric.Object.prototype.isVirtualGroupBaseShape=function(){return this.isVirtualGroupChild()&&this.parent.children[0]===this},q.fabric.Object.prototype.getVirtualGroupRoot=function(){let e=this.parent;for(;e&&e.parent;)e=e.parent;return e};class oe extends q.fabric.Point{constructor(e,t,n){super(e,t),this.customType=void 0,this.data=void 0,this.customType=n}}class ie extends q.fabric.ActiveSelection{}const _e=e=>"getUpdatedSpecs"in e;class le extends q.fabric.Group{constructor(e,t,n,r,a,o,i,_,s=!1){var c,u,d,g,p,b,f,m,w,h,y;super(a,Object.assign({data:{rawDiagramElementSpec:t,rawData:e,rawAutoLayout:r},name:null!=(c=n.alias)?c:"undefined",left:void 0!==(null==t||null==(u=t.position)?void 0:u.left)?null==t||null==(d=t.position)?void 0:d.left:null==(g=n.position)?void 0:g.left,top:void 0!==(null==t||null==(p=t.position)?void 0:p.top)?null==t||null==(b=t.position)?void 0:b.top:null==(f=n.position)?void 0:f.top,scaleX:void 0!==(null==t||null==(m=t.size)?void 0:m.scale_x)?null==t||null==(w=t.size)?void 0:w.scale_x:1,scaleY:void 0!==(null==t||null==(h=t.size)?void 0:h.scale_y)?null==t||null==(y=t.size)?void 0:y.scale_y:1},o)),this.parent=i,this.children=null!=_?_:[],this.setControlsVisibility({mb:!1,ml:!1,mr:!1,mt:!1,mtr:!1}),s||this.on(l,(e=>{var t;this.onComponentMouseUp(null==(t=e.target)?void 0:t.canvas,e,this)}))}getUpdatedSpecs(){var e,t;null==(e=this.canvas)||e.discardActiveObject();const n=null==(t=this.data)?void 0:t.rawDiagramElementSpec;if(n){var r,a,o,i,_,l,s,c,u,d,g,p,b,f,m,w;const e=(0,G.mg)(n);return e.position={left:null!=(r=this.left)?r:null==(a=n.position)?void 0:a.left,top:null!=(o=this.top)?o:null==(i=n.position)?void 0:i.top,z_index:null!=(_=K(this.canvas,this))?_:null==(l=n.position)?void 0:l.z_index,angle:null!=(s=this.angle)?s:null==(c=n.position)?void 0:c.angle},e.size={width:null!=(u=this.width)?u:null==(d=n.size)?void 0:d.width,height:null!=(g=this.height)?g:null==(p=n.size)?void 0:p.height,scale_x:null!=(b=this.scaleX)?b:null==(f=n.size)?void 0:f.scale_x,scale_y:null!=(m=this.scaleY)?m:null==(w=n.size)?void 0:w.scale_y},e}}onComponentMouseUp(e,t,n,r){if(e)switch(t.e.preventDefault(),t.button){case 3:{e.setActiveObject(n),e.renderAll();const a=e.contextTop,o=q.fabric.util.getPointer(t.e,a.canvas),i=new CustomEvent(U.UW.CONTEXT_MENU,{detail:{sourceEvent:t,pageX:o.x,pageY:o.y,menuItems:null!=r?r:se(e,t,n)}});document.dispatchEvent(i);break}}}}const se=(e,t,n,r=!0)=>{var a,l,s,c;const u=[],d=n instanceof ie?n.parent:n,g=null==d?void 0:d.data,p=null==g||null==(a=g.rawDiagramElementSpec)?void 0:a.element_type,b=null==g||null==(l=g.rawData)||null==(l=l.base_data)||null==(l=l.link)?void 0:l.split(";"),f=e.isReadOnly(),m=e.codingFeaturesEnabled,w=void 0!==p&&b&&b.length>0&&void 0!==(ve(h=p)||me(h)||fe(h)||be(h));var h;let y=0,v=null==d?void 0:d.parent;for(;v;){var O;y++,v=null==(O=v)?void 0:O.parent}return w&&b.forEach(((t,n)=>{const r=t.replace(/ /gi,"");r.length>0&&(function(e){return o.some((t=>e.startsWith(t)))}(r)?u.push({isHeaderMenuItem:!1,id:`openLink${n}`,label:Q(r),onClick:()=>{e.diagramListener&&e.diagramListener.onOpenExternalLinkClick(function(e,t){let n=`${e}`;for(const e in i){var r;e===i.Alias.toString()&&n.includes(J(i.Alias))&&null!=t&&null!=(r=t.base_data)&&r.alias&&(n=n.replace(new RegExp(J(i.Alias),"gi"),t.base_data.alias))}return n}(r,null==g?void 0:g.rawData))}}):u.push({isHeaderMenuItem:!1,id:"openDiagram",label:"Open Diagram",onClick:()=>{e.diagramListener&&e.diagramListener.onOpenDiagramClick(r)}}))})),m&&null!=g&&g.rawData&&null!=(s=g.rawDiagramElementSpec)&&s.element_type&&u.push({isHeaderMenuItem:!1,id:"selectDiagramElementCode",label:"Select code",onClick:()=>{var t;null!=(t=e.diagramListener)&&t.onSelectElementCode&&e.diagramListener.onSelectElementCode(g.rawData,g.rawDiagramElementSpec.element_type,y)}}),!f&&(w||m&&null!=g&&g.rawData&&null!=(c=g.rawDiagramElementSpec)&&c.element_type)&&u.push({id:"separatorCommon",isSepator:!0}),f||u.push({isHeaderMenuItem:!1,id:"bringToFront",label:"Bring to Front",onClick:()=>{var e;n.bringToFront(),null==(e=n.canvas)||e.fire(_)}},{isHeaderMenuItem:!1,id:"bringForward",label:"Bring Forward",onClick:()=>{var e;n.bringForward(),null==(e=n.canvas)||e.fire(_)}},{isHeaderMenuItem:!1,id:"sentToBack",label:"Send to Back",onClick:()=>ce(n)},{isHeaderMenuItem:!1,id:"sendBackwards",label:"Send Backwards",onClick:()=>ue(n)}),r?[{isHeaderMenuItem:!0,id:"baseComponentContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:u}]:u},ce=e=>{var t;e.parent||(e.sendToBack(),null==(t=e.canvas)||t.fire(_))},ue=e=>{if(e instanceof ie){var t,n,r;const o=e.parent,i=ee(e.canvas,null!=(t=null==o?void 0:o.children)?t:[]),l=ee(e.canvas,null!=(n=null==o||null==(r=o.parent)?void 0:r.children)?n:[]);var a;void 0===l||void 0===i||i-1>l?(e.sendBackwards(),null==(a=e.canvas)||a.fire(_)):console.debug(`cannot send backwards ${i} ${l}`)}else{var o,i;const t=K(e.canvas,e),n=ee(e.canvas,null!=(o=null==(i=e.parent)?void 0:i.children)?o:[]);var l;void 0===n||void 0===t||t-1>n?(e.sendBackwards(),null==(l=e.canvas)||l.fire(_)):console.debug(`cannot send backwards ${t} ${n}`)}},de=(e,t,n,r,a)=>ge(e,t,n,r,a.elements_specs)||pe(e,t,n,r),ge=(e,t,n,r,a)=>{for(let o=0;o<a.length;o++){const i=a[o],_=i.alias===e,l=(0,G.$r)(i.element_type,r);if(_&&l)return i;if(i.inner_specs){const a=i.inner_specs,o=ge(e,t,n,r,a);if(o)return o}}},pe=(e,t,n,r)=>({alias:e,from:t,to:n,element_type:r}),be=e=>{if("Boundary"in e)return e.Boundary},fe=e=>{if("Component"in e)return e.Component},me=e=>{if("Container"in e)return e.Container},we=e=>{if("DeploymentNode"in e)return e.DeploymentNode},he=e=>{if("Person"in e)return e.Person},ye=e=>{if("Relationship"in e)return e.Relationship},ve=e=>{if("SoftwareSystem"in e)return e.SoftwareSystem},Oe=(e,t)=>{var n,r,a;return e&&null!=(n=t[e])&&n.position?{left:null==(r=t[e].position)?void 0:r.x,top:null==(a=t[e].position)?void 0:a.y}:{left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP}};function Se(e){return btoa(e)}const Ee="_margin_hack";function xe(e,t,n){return 2===n.length?n.map(((n,r)=>{const a=0===r?(0,G.qI)(e.x):(0,G.qI)(e.y),o=0===r?n:t-n;return(0,G.cr)(o,Te)+a})):n}const Te=96,Re=(0,G.wF)(v.SIZES.DEFAULT_LEFT),Ce=(0,G.wF)(v.SIZES.DEFAULT_TOP),Ie=4.5;function De(e){const t={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+2*P},n={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT},r={x:O.SIZES.WIDTH+S.SIZES.WIDTH_TAIL+S.SIZES.WIDTH_HEAD,y:O.SIZES.MIN_HEIGHT},a={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+E.SIZES.WIDTH_TOP+E.SIZES.WIDTH_BOTTOM};if(he(e))return t;if(ve(e)){const t=ve(e);return"SystemDb"===t.system_type||"SystemDb_Ext"===t.system_type?a:"SystemQueue"===t.system_type||"SystemQueue_Ext"===t.system_type?r:n}if(me(e)){const t=me(e);return"ContainerDb"===t.container_type||"ContainerDb_Ext"===t.container_type?a:"ContainerQueue"===t.container_type||"ContainerQueue_Ext"===t.container_type?r:n}if(fe(e)){const t=fe(e);return"ComponentDb"===t.component_type||"ComponentDb_Ext"===t.component_type?a:"ComponentQueue"===t.component_type||"ComponentQueue_Ext"===t.component_type?r:n}return{x:100,y:100}}function ke(e,t,n,r,a){return`\n subgraph "${o=e,`${o}${Ee}`}" {\n cluster=true\n margin="${a}"\n fontsize="0pt"\n label=""\n subgraph "${e}" {\n cluster=true\n margin="${r}"\n label=" "\n labelloc="b"\n fontsize="17pt"\n "${e}" [peripheries=0, height=0, width=0, label=""] // invisible node that is used as a workaround to let the connection between nodes and subgraphs\n ${Le(t,n,r,a)}\n }\n }\n `;var o}function Le(e,t,n,r){let a="";for(const _ of e){const e=De(_);let l;if(he(_))l=he(_).base_data.alias;else if(ve(_))l=ve(_).base_data.alias;else if(me(_))l=me(_).base_data.alias;else if(fe(_))l=fe(_).base_data.alias;else if(be(_)){const e=be(_);l=e.base_data.alias,l&&(t.add(l),a=a.concat(ke(l,e.sub_elements,t,n,r))),l=void 0}else if(we(_)){const e=we(_);l=e.base_data.alias,l&&(t.add(l),a=a.concat(ke(l,e.sub_elements,t,n,r))),l=void 0}else if(ye(_)){const e=ye(_);var o,i;e.from&&e.to&&(a=a.concat(`\n"${e.from}" -> "${e.to}" [name="${e.base_data.alias}", label="${(0,G.l)([null!=(o=e.base_data.label)?o:"",null!=(i=e.technology)?i:""])}", ltail="${e.from}", lhead="${e.to}", fontsize="${I}", keadex_fromissubgraph=${t.has(e.from)}, keadex_toissubgraph=${t.has(e.to)}]`)),l=void 0}l&&(a=a.concat(`\n"${l}" [width=${(0,G.wF)(e.x,Te)}, height=${(0,G.wF)(e.y,Te)}, peripheries=2]`))}return a}const Ae=require("@hpcc-js/wasm-graphviz"),Ne=require("react-toastify");function je(e){if(e)return Z[e]}const Fe="legend",Me=(e,t,n,r,a,o)=>{var i,_,l;const s=[],c=n?1:0,u=new q.fabric.Rect({fill:t,stroke:n,strokeWidth:c,strokeDashArray:r,left:m,top:f+h*o,width:w-c,height:h-c});s.push(u);const d=new q.fabric.Text(e,{fill:a,fontFamily:v.FONT.FAMILY,fontSize:b,fontWeight:"normal",textAlign:"left",originX:"left",originY:"top",left:m+y});return d.top=(null!=(i=u.top)?i:0)+(null!=(_=u.height)?_:0)/2-(null!=(l=d.height)?l:0)/2,s.push(d),s},Pe=(e,t)=>{var n,r,a,o,i,_,l,s,c,u,d,b,w,h,y,S,E,x,T,R,C,I,D,k,L,A,N,j,F,M,P,z,B,H;let W=[];const Y=new q.fabric.Text("LEGEND",{fill:g,fontFamily:v.FONT.FAMILY,fontSize:p,fontWeight:"bold",textAlign:"left",originX:"left",originY:"top",left:m,top:f});W.push(Y),W=W.concat(Me("Person",null!=(n=null==t||null==(r=t.diagramsThemeSettings)?void 0:r.bg_color_person)?n:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(a=null==t||null==(o=t.diagramsThemeSettings)?void 0:o.text_color_person)?a:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,1)),W=W.concat(Me("Person External",null!=(i=null==t||null==(_=t.diagramsThemeSettings)?void 0:_.bg_color_person_ext)?i:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(l=null==t||null==(s=t.diagramsThemeSettings)?void 0:s.text_color_person_ext)?l:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,2)),W=W.concat(Me("System",null!=(c=null==t||null==(u=t.diagramsThemeSettings)?void 0:u.bg_color_software_system)?c:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(d=null==t||null==(b=t.diagramsThemeSettings)?void 0:b.text_color_software_system)?d:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,3)),W=W.concat(Me("System External",null!=(w=null==t||null==(h=t.diagramsThemeSettings)?void 0:h.bg_color_software_system_ext)?w:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(y=null==t||null==(S=t.diagramsThemeSettings)?void 0:S.text_color_software_system_ext)?y:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,4)),W=W.concat(Me("Container",null!=(E=null==t||null==(x=t.diagramsThemeSettings)?void 0:x.bg_color_container)?E:O.COLORS.BG_COLOR_CONTAINER,void 0,void 0,null!=(T=null==t||null==(R=t.diagramsThemeSettings)?void 0:R.text_color_container)?T:O.COLORS.TEXT_COLOR_CONTAINER,5)),W=W.concat(Me("Container External",null!=(C=null==t||null==(I=t.diagramsThemeSettings)?void 0:I.bg_color_container_ext)?C:O.COLORS.BG_COLOR_CONTAINER_EXT,void 0,void 0,null!=(D=null==t||null==(k=t.diagramsThemeSettings)?void 0:k.text_color_container_ext)?D:O.COLORS.TEXT_COLOR_CONTAINER_EXT,6)),W=W.concat(Me("Component",null!=(L=null==t||null==(A=t.diagramsThemeSettings)?void 0:A.bg_color_component)?L:O.COLORS.BG_COLOR_COMPONENT,void 0,void 0,null!=(N=null==t||null==(j=t.diagramsThemeSettings)?void 0:j.text_color_component)?N:O.COLORS.TEXT_COLOR_COMPONENT,7)),W=W.concat(Me("Component External",null!=(F=null==t||null==(M=t.diagramsThemeSettings)?void 0:M.bg_color_component_ext)?F:O.COLORS.BG_COLOR_COMPONENT_EXT,void 0,void 0,null!=(P=null==t||null==(z=t.diagramsThemeSettings)?void 0:z.text_color_component_ext)?P:O.COLORS.TEXT_COLOR_COMPONENT_EXT,8));let X=8;var Z,G,$,U;null!=t&&null!=(B=t.diagramsThemeSettings)&&B.bg_color_boundary&&(X++,W=W.concat(Me("Boundary",t.diagramsThemeSettings.bg_color_boundary,void 0,void 0,null!=(Z=null==t||null==(G=t.diagramsThemeSettings)?void 0:G.text_color_boundary)?Z:O.COLORS.TEXT_COLOR_BOUNDARY,X))),null!=t&&null!=(H=t.diagramsThemeSettings)&&H.bg_color_deployment_node&&(X++,W=W.concat(Me("Deployment Node",t.diagramsThemeSettings.bg_color_deployment_node,void 0,void 0,null!=($=null==t||null==(U=t.diagramsThemeSettings)?void 0:U.text_color_deployment_node)?$:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE,X))),null!=t&&t.tags&&Object.entries(t.tags).forEach((([e,t],n)=>{var r,a,o,i,_;X++,W=W.concat(Me(null!=(r=null!=(a=t.legend_text)?a:t.tag)?r:"<no tag>",t.bg_color,null!=(o=t.border_color)?o:t.bg_color?void 0:"black",null==(i=je(t.border_style))?void 0:i.value,null!=(_=t.font_color)?_:"black",X))}));return new le(void 0,e,{alias:Fe,position:{left:m,top:f}},{},W)},ze="The diagram contains too many elements and relationships, which may cause the auto layout to break. Try adjusting auto layout settings like ranksep or subgraph margins.",Be="Graphviz not initialized. Cannot generate auto layout.",He="triangulation failed";var We=n(177);function Ye(e){return null==e?void 0:e.split("+")}function Xe(e,t){if(e&&t){const n=[];for(const r of e){const e=t[Se(r)];e&&n.push(e)}if(n.length>0)return Object.assign({},...n)}}let Ze=function(e){return e.Rectangle="RECTANGLE",e.Footer="FOOTER",e}({});class Ge extends le{getUpdatedSpecs(){const e=super.getUpdatedSpecs();var t;if(e&&(null==(t=this.canvas)||t.discardActiveObject(),delete e.position,delete e.size,e.inner_specs=[],e.shapes=[],this.children))for(const t of this.children)if(_e(t)){const n=t.getUpdatedSpecs();n&&e.inner_specs.push(n)}else if(t.name!==Ze.Footer){var n,r;e.shapes.push({position:{left:t.left,top:t.top,z_index:K(t.canvas,t)},size:{scale_x:null!=(n=t.scaleX)?n:1,scale_y:null!=(r=t.scaleY)?r:1},shape_type:t.name})}else e.shapes.push({position:{z_index:K(t.canvas,t)},shape_type:t.name});return e}}const $e=e=>{var t,n,r,a,o,i,_,l,s,c,u;let d,g;const p=(null==(t=e.data)||null==(t=t.rawData)||null==(t=t.base_data)?void 0:t.alias)&&e.data.rawAutoLayout&&void 0!==e.data.rawAutoLayout[e.data.rawData.base_data.alias],b=[];null==(n=e.children)||n.forEach((e=>{e.name===Ze.Footer?g=e:e.name===Ze.Rectangle?d=e:b.push(e)}));const f=V(te(b),!1),m=null!=(r=null==(a=d)?void 0:a.scaleX)?r:1,w=null!=(o=null==(i=d)?void 0:i.scaleY)?o:1,h=null!=(_=null==(l=d)||null==(l=l.canvas)?void 0:l.getZoom())?_:1,y=ne(e.canvas),v=Y*m,O=Y*w,S=Y*m,E=Y*w;var x;d&&void 0!==f.left&&void 0!==f.right&&void 0!==f.top&&void 0!==f.bottom&&void 0!==f.width&&void 0!==f.height&&void 0!==g?(f.left=(f.left-y.panX)/h,f.top=(f.top-y.panY)/h,f.right=(f.right-y.panX)/h,f.bottom=(f.bottom-y.panY)/h,f.width=f.right-f.left,f.height=f.bottom-f.top,p||(d.width=f.width/m+v/m*2,d.height=f.height/w+O/w*3+(null!=(x=g.height)?x:0),d.left=f.left-v,d.top=f.top-O)):d&&void 0!==g&&(d.width=H,d.height=W+g.getScaledHeight()),null==(s=e.canvas)||s.renderAll(),d&&g&&void 0!==d.left&&void 0!==d.top&&void 0!==d.height&&void 0!==g.height&&(g.top=d.top+d.getScaledHeight()-g.getScaledHeight()-E,g.left=d.left+S),null==(c=d)||c.setCoords(),null==(u=g)||u.setCoords()},Ue=e=>{e.on(c,(t=>{Qe(t,e)}))},qe=e=>{e.on(c,(t=>{Qe(t,e)}))},Qe=(e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=n,r.on(l,(e=>{Ve(r.canvas,e,r,n)})),r.on(s,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(s)}))),null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}},Je=(e,t)=>{e&&t&&$e(e)},Ve=(e,t,n,r)=>{n instanceof q.fabric.ActiveSelection&&e&&r.onComponentMouseUp(e,t,n,((e,t,n)=>n instanceof q.fabric.ActiveSelection?[{isHeaderMenuItem:!0,id:"baseElasticContainerContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[...se(e,t,n,!1)]}]:[])(e,t,n))},Ke=(e,t,n,r,a,o)=>{var i,_;const l=Xe(Ye(null==(i=e.base_data)?void 0:i.tags),null==o?void 0:o.tags),c={alias:null==(_=e.base_data)?void 0:_.alias},u=new Ge(e,t,c,r,[],void 0,void 0,void 0,!0);u.visible=!1;const d=((e,t,n,r,a)=>{var o,i,_,l,s,c,u,d,g,p,b,f;const m=null==e||null==(o=e.shapes)?void 0:o.filter((e=>e.shape_type===Ze.Rectangle))[0],w=new q.fabric.Rect({fill:null!=(i=null==a?void 0:a.bg_color)?i:n.bgColor,stroke:null!=(_=null==a?void 0:a.border_color)?_:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,strokeDashArray:n.strokeDashArray,left:null!=(l=null==m||null==(s=m.position)?void 0:s.left)?l:Oe(e.alias,t).left,top:null!=(c=null==m||null==(u=m.position)?void 0:u.top)?c:Oe(e.alias,t).top,name:Ze.Rectangle,rx:O.SIZES.BORDER_RADIUS,ry:O.SIZES.BORDER_RADIUS,scaleX:null!=(d=null==m||null==(g=m.size)?void 0:g.scale_x)?d:1,scaleY:null!=(p=null==m||null==(b=m.size)?void 0:b.scale_y)?p:1}),h=((e,t)=>{var n,r,a;if(e&&null!=(n=t[e])&&n.size)return{width:null==(r=t[e].size)?void 0:r.x,height:null==(a=t[e].size)?void 0:a.y}})(e.alias,t);return h&&(w.width=h.width,w.height=h.height),w.data={rawDiagramElementSpec:m},w.parent=r,Ue(w),null==(f=r.children)||f.push(w),w})(t,r,a,u,l);((e,t,n,r,a,o,i)=>{var _,l,s,c,u,d,g,p,b,f,m;const w=null==e||null==(_=e.shapes)?void 0:_.filter((e=>e.shape_type===Ze.Footer))[0],h=[],y={fontFamily:v.FONT.FAMILY,fill:null!=(l=null==i?void 0:i.font_color)?l:n.textColor};let O;var S;let E;var x,T;null!=(s=r.base_data)&&s.link&&(O=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(S=null==i?void 0:i.font_color)?S:n.textColor,opacity:1,originX:"left",originY:"top",top:1,left:0}),O.scaleToWidth(10),h.push(O)),null!=(c=r.base_data)&&c.label&&(E=new q.fabric.Text(r.base_data.label,Object.assign({},y,{fontSize:z,fontWeight:"bold"})),E.top=0,E.left=null!=(x=O)&&x.getScaledWidth()?(null==(T=O)?void 0:T.getScaledWidth())+3:0,h.push(E));let R=null!=(u=null!=(d=r.boundary_type)?d:r.deployment_node_type)?u:"";R=null!=(g=null!=(p=r.boundary_custom_type)?p:r.deploymeny_node_custom_type)?g:R,R+=r.technology?`: ${r.technology}`:"",R=`[${R}]`;const C=new q.fabric.Text(R,Object.assign({},y,{fontSize:B,left:0,top:null!=(b=null==(f=E)?void 0:f.height)?b:0}));h.push(C);const I=new q.fabric.Group(h,{name:Ze.Footer,selectable:!1,evented:!1,left:a.left,top:a.top,scaleX:a.scaleX,scaleY:a.scaleY});I.data={rawDiagramElementSpec:w},I.parent=o,qe(I),null==(m=o.children)||m.push(I)})(t,0,a,e,d,u,l);let g=[];return e.sub_elements&&(g=At(void 0,e.sub_elements,n,r,Object.assign({},o,{skipAddToCanvas:!0,skipLegendRendering:!0})),g.forEach((e=>{var t;e.parent=u,null==(t=u.children)||t.push(e)}))),$e(u),(e=>{var t;null==(t=e.children)||t.forEach((t=>{t.on(s,(t=>{Je(e,t)})),t.children&&t.children.forEach((t=>{t.on(s,(t=>{Je(e,t)}))}))}))})(u),u},et=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.boundary_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,_,l,s,c,u;const d={bgColor:null!=(i=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.bg_color_boundary)?i:O.COLORS.BG_COLOR_BOUNDARY,borderColor:null!=(l=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_boundary)?l:O.COLORS.BORDER_COLOR_BOUNDARY,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_boundary)?c:O.COLORS.TEXT_COLOR_BOUNDARY,strokeDashArray:X.SIZES.STROKE_DASH_ARRAY},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{Boundary:t.boundary_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},tt=(e,t,n,r,a)=>{var o,i,_,l,s,c;const u=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),d=[],g=((e,t,n)=>{var r,a,o,i,_,l,s;const c=new q.fabric.Rect({fill:null!=(r=null==n?void 0:n.bg_color)?r:t.bgColor,stroke:null!=(a=null==n?void 0:n.border_color)?a:t.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP,width:null!=(o=t.widthBox)?o:O.SIZES.WIDTH,height:O.SIZES.MIN_HEIGHT,name:null!=(i=null==(_=e.base_data)?void 0:_.alias)?i:"undefined",rx:null!=(l=t.borderRadius)?l:O.SIZES.BORDER_RADIUS,ry:null!=(s=t.borderRadius)?s:O.SIZES.BORDER_RADIUS});return c.on("scaling",(e=>{var t;null!=(t=e.target)&&t.width&&e.target.height&&e.target.scaleX&&e.target.scaleY&&e.target.set({width:e.target.width*e.target.scaleX,height:e.target.height*e.target.scaleY,scaleX:1,scaleY:1})})),c})(e,r,u);let p;d.push(g),null!=(i=e.base_data)&&i.tags&&(p=((e,t,n,r)=>{var a,o,i,_,l;return new q.fabric.Text(`«${null==(a=t.base_data)?void 0:a.tags}»`,{fill:null!=(o=null==r?void 0:r.font_color)?o:n.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TAG,fontStyle:"italic",fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(i=e.left)?i:v.SIZES.DEFAULT_LEFT)+(null!=(_=e.width)?_:0)/2,top:(null!=(l=e.top)?l:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TAGS})})(g,e,r,u),d.push(p));const b=((e,t,n,r,a)=>{var o,i,_,l,s,c;return new q.fabric.Text(null!=(o=(0,G.x4)(null==(i=n.base_data)?void 0:i.label))?o:"undefined",{fill:null!=(_=null==a?void 0:a.font_color)?_:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE,fontWeight:"bold",textAlign:"center",originX:"center",originY:"top",left:(null!=(l=e.left)?l:v.SIZES.DEFAULT_LEFT)+(null!=(s=e.width)?s:0)/2,top:(null!=(c=null==t?void 0:t.top)?c:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_LABEL})})(g,p,e,r,u);d.push(b);const f=((e,t,n,r,a)=>{var o,i,_,l,s,c,u,d,g,p,b,f;const m=`[${null!=(o=null!=(i=null!=(_=null!=(l=null!=(s=null!=(c=null!=(u=n.boundary_custom_type)?u:n.boundary_type)?c:n.component_type)?s:n.container_type)?l:n.deployment_node_type)?_:n.deploymeny_node_custom_type)?i:n.person_type)?o:n.system_type}${n.technology?`: ${n.technology}`:""}]`;return new q.fabric.Text(m,{fill:null!=(d=null==a?void 0:a.font_color)?d:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TYPE_TECHNOLOGY,fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(g=e.left)?g:v.SIZES.DEFAULT_LEFT)+(null!=(p=e.width)?p:0)/2,top:(null!=(b=null==t?void 0:t.top)?b:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TYPE_TECHNOLOGY+(null!=(f=null==t?void 0:t.height)?f:0)})})(g,b,e,r,u);let m;d.push(f),null!=(_=e.base_data)&&_.description&&(m=((e,t,n,r,a)=>{var o,i,_,l,s,c,u;const d=null!=(o=r.widthDescription)?o:e.width;return new q.fabric.Textbox(null!=(i=(0,G.x4)(null==(_=n.base_data)?void 0:_.description))?i:"",{fill:null!=(l=null==a?void 0:a.font_color)?l:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_DESCRIPTION,fontWeight:400,opacity:.7,splitByGrapheme:!0,width:d?d-O.SIZES.PADDING_Y_DESCRIPTION:0,textAlign:"center",originX:"center",originY:"top",left:(null!=(s=e.left)?s:v.SIZES.DEFAULT_LEFT)+(null!=(c=e.width)?c:0)/2,top:(null!=(u=null==t?void 0:t.top)?u:0)+O.SIZES.TOP_DESCRIPTION})})(g,f,e,r,u),d.push(m)),null!=(l=e.base_data)&&l.link&&d.push(((e,t,n)=>{var r,a,o;const i=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(r=null==n?void 0:n.font_color)?r:t.textColor,opacity:1,originX:"left",originY:"top",left:(null!=(a=e.left)?a:0)+5,top:(null!=(o=e.top)?o:0)+5});return i.scaleToWidth(10),i})(g,r,u)),((e,t)=>{var n,r,a;let o=(null!=(n=null==t?void 0:t.height)?n:0)+((null!=(r=null==t?void 0:t.top)?r:0)-(null!=(a=null==e?void 0:e.top)?a:0))+O.SIZES.PADDING_BOTTOM;o<O.SIZES.MIN_HEIGHT&&(o=O.SIZES.MIN_HEIGHT),e.height=o})(g,m);const w={alias:null==(s=e.base_data)?void 0:s.alias,position:Oe(null==(c=e.base_data)?void 0:c.alias,n)};return new le(e,t,w,n,d)},nt=(e,t,n,r,a)=>{var o,i,_,l;const s=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)})(e,r,a);c.push(u);const d=(null!=(i=u.width)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(((e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b,f,m,w,h,y,O,S,x,T,R;const C=[],I=v.SIZES.BORDER_WIDTH,D=E.SIZES.TOP_BOX_HEIGHT,k=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+v.SIZES.BORDER_WIDTH,top:(null!=(i=e.top)?i:0)-D+I,width:(null!=(_=e.width)?_:0)-2*v.SIZES.BORDER_WIDTH,height:D});return C.push(k),C.push(new q.fabric.Line([null!=(l=e.left)?l:0,null!=(s=e.top)?s:0,null!=(c=e.left)?c:0,null!=(u=k.top)?u:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(d=null==r?void 0:r.border_color)?d:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Line([(null!=(g=e.left)?g:0)+(null!=(p=e.width)?p:0)-v.SIZES.BORDER_WIDTH,null!=(b=e.top)?b:0,(null!=(f=e.left)?f:0)+(null!=(m=e.width)?m:0)-v.SIZES.BORDER_WIDTH,null!=(w=k.top)?w:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(h=null==r?void 0:r.border_color)?h:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Circle({fill:null!=(y=null==r?void 0:r.bg_color)?y:n.bgColor,stroke:null!=(O=null==r?void 0:r.border_color)?O:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(S=k.top)?S:0)-(null!=(x=e.width)?x:0)*E.SIZES.SCALE_X_TOP_BOTTOM/2,left:(null!=(T=k.left)?T:0)+ +(null!=(R=e.width)?R:0)-I,angle:90,startAngle:0,endAngle:360,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})),new q.fabric.Group(C)})(u,d,r,s)),c.push(((e,t,n,r)=>{var a,o,i,_,l,s;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(i=e.top)?i:0)+(null!=(_=e.height)?_:0)-2*t*E.SIZES.SCALE_X_TOP_BOTTOM/2-v.SIZES.BORDER_WIDTH,left:(null!=(l=e.left)?l:0)+(null!=(s=e.width)?s:0),angle:90,startAngle:270,endAngle:90,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})})(u,d,r,s));const g={alias:null==(_=e.base_data)?void 0:_.alias,position:Oe(null==(l=e.base_data)?void 0:l.alias,n)};return new le(e,t,g,n,c)},rt=(e,t,n,r,a)=>{var o,i,_,l;const s=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=at(e,r,a);c.push(u);const d=(null!=(i=u.height)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(ot(u,d,r,s)),c.push(it(u,d,r,s));const g={alias:null==(_=e.base_data)?void 0:_.alias,position:Oe(null==(l=e.base_data)?void 0:l.alias,n)};return new le(e,t,g,n,c)},at=(e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)},ot=(e,t,n,r)=>{var a,o,i;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(i=e.left)?i:0)+2*t*S.SIZES.SCALE_Y_TAIL_HEAD/2+2*v.SIZES.BORDER_WIDTH,angle:90,startAngle:0,endAngle:180,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})},it=(e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b,f,m,w,h,y,O,E,x,T,R,C,I;const D=[],k=v.SIZES.BORDER_WIDTH,L=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+(null!=(i=e.width)?i:0)-k,top:(null!=(_=e.top)?_:0)+v.SIZES.BORDER_WIDTH,width:S.SIZES.HEAD_BOX_WIDTH,height:(null!=(l=e.height)?l:0)-2*v.SIZES.BORDER_WIDTH});return D.push(L),D.push(new q.fabric.Line([null!=(s=L.left)?s:0,null!=(c=e.top)?c:0,(null!=(u=L.left)?u:0)+(null!=(d=L.width)?d:0),null!=(g=e.top)?g:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(p=null==r?void 0:r.border_color)?p:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Line([null!=(b=L.left)?b:0,(null!=(f=L.top)?f:0)+(null!=(m=L.height)?m:0),(null!=(w=L.left)?w:0)+(null!=(h=L.width)?h:0),(null!=(y=L.top)?y:0)+(null!=(O=L.height)?O:0)],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(E=null==r?void 0:r.border_color)?E:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Circle({fill:null!=(x=null==r?void 0:r.bg_color)?x:n.bgColor,stroke:null!=(T=null==r?void 0:r.border_color)?T:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(R=L.left)?R:0)+(null!=(C=L.width)?C:0)+(null!=(I=e.height)?I:0)*S.SIZES.SCALE_Y_TAIL_HEAD/2-k,angle:90,startAngle:0,endAngle:360,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})),new q.fabric.Group(D)},_t=rt,lt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.component_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.component_type){case"Component":case"ComponentDb":case"ComponentQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component)?o:O.COLORS.BG_COLOR_COMPONENT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_component)?_:O.COLORS.BORDER_COLOR_COMPONENT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component)?s:O.COLORS.TEXT_COLOR_COMPONENT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component":return tt(e,t,n,d,a);case"ComponentDb":return nt(e,t,n,d,a);case"ComponentQueue":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a);break;case"Component_Ext":case"ComponentDb_Ext":case"ComponentQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component_ext)?o:O.COLORS.BG_COLOR_COMPONENT_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_component_ext)?_:O.COLORS.BORDER_COLOR_COMPONENT_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component_ext)?s:O.COLORS.TEXT_COLOR_COMPONENT_EXT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component_Ext":return tt(e,t,n,d,a);case"ComponentDb_Ext":return nt(e,t,n,d,a);case"ComponentQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},st=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.container_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.container_type){case"Container":case"ContainerDb":case"ContainerQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container)?o:O.COLORS.BG_COLOR_CONTAINER,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_container)?_:O.COLORS.BORDER_COLOR_CONTAINER,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container)?s:O.COLORS.TEXT_COLOR_CONTAINER},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container":return tt(e,t,n,d,a);case"ContainerDb":return nt(e,t,n,d,a);case"ContainerQueue":return rt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a);break;case"Container_Ext":case"ContainerDb_Ext":case"ContainerQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container_ext)?o:O.COLORS.BG_COLOR_CONTAINER_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_container_ext)?_:O.COLORS.BORDER_COLOR_CONTAINER_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container_ext)?s:O.COLORS.TEXT_COLOR_CONTAINER_EXT},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container_Ext":return tt(e,t,n,d,a);case"ContainerDb_Ext":return nt(e,t,n,d,a);case"ContainerQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},ct=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.deployment_node_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,_,l,s,c,u;const d={bgColor:null!=(i=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.bg_color_deployment_node)?i:O.COLORS.BG_COLOR_DEPLOYMENT_NODE,borderColor:null!=(l=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_deployment_node)?l:O.COLORS.BORDER_COLOR_DEPLOYMENT_NODE,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_deployment_node)?c:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{DeploymentNode:t.deployment_node_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},ut=(e,t,n,r,a)=>{var o,i;const _=[],l=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:M});return tt(e,{},{},r,n)})(e,r,a);_.push(l);const s=((e,t)=>{var n,r,a,o,i;const _=new q.fabric.Circle({radius:P,top:t.top,left:t.left,fill:e.bgColor,stroke:e.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH});return _.left=(null!=(n=_.left)?n:0)+(null!=(r=t.getScaledWidth())?r:0)/2-(null!=(a=_.getScaledWidth())?a:0)/2,_.top=(null!=(o=_.top)?o:0)-(null!=(i=_.getScaledWidth())?i:0)+5,_})(r,l);_.push(s);const c={alias:null==(o=e.base_data)?void 0:o.alias,position:Oe(null==(i=e.base_data)?void 0:i.alias,n)};return new le(e,t,c,n,_)},dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.person_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.person_type){case"Person":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_person)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a);break;case"Person_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_person_ext)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person_ext)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};let gt=function(e){return e.Dot="DOT",e.Line="LINE",e.Text="TEXT",e.Triangle="TRIANGLE",e.Rectangle="RECTANGLE",e}({});class pt extends le{getUpdatedSpecs(){const e=super.getUpdatedSpecs();var t,n;return e&&(null==(t=this.canvas)||t.discardActiveObject(),delete e.position,delete e.size,e.shapes=[],null==(n=this.children)||n.forEach((t=>{const n=q.fabric.util.object.clone(t);if(n.name===gt.Line||n.name===gt.Rectangle)e.shapes.push({position:{z_index:K(n.canvas,n)},shape_type:n.name});else{var r,a;let t=0,o=0;const i=n.angle;if(n.name===gt.Text)t=n.getCenterPoint().x,o=n.getCenterPoint().y;else if(n.name===gt.Dot||n.name===gt.Triangle){n.name===gt.Triangle&&n.rotate(F);const e=ht(this.canvas,n.left,n.top,n.name===gt.Triangle,i,n.scaleX,n.scaleY,!0);t=e.left,o=e.top}const _={position:{left:t,top:o,z_index:K(n.canvas,n)},size:{scale_x:null!=(r=n.scaleX)?r:1,scale_y:null!=(a=n.scaleY)?a:1},shape_type:n.name};n.name===gt.Triangle&&(_.position.angle=i),e.shapes.push(_)}}))),e}}const bt=e=>{var t;e.children=null==(t=e.children)?void 0:t.sort(((e,t)=>e.name===gt.Rectangle||e.name===gt.Line&&t.name!==gt.Rectangle?-1:t.name===gt.Rectangle||e.name!==gt.Rectangle&&t.name===gt.Line?1:e.name===t.name?0:1))},ft=e=>{const t=e.parent;let n,r=1;const a=e.canvas;if(t&&a){const _=[],l=[];if(t.children){var o,i;t.children.forEach((e=>{if(e.name===gt.Triangle&&(n=e),e.name===gt.Dot||e.name===gt.Triangle){var t;l.push(e),r=null!=(t=e.scaleX)?t:1;const n=e.getPointByOrigin("center","center"),a=new oe(n.x,n.y,e.name);_.push(a)}}));const s=t.children.findIndex((e=>e.name===gt.Line));void 0!==s&&s>-1&&t.children.splice(s,1);const c=K(a,e),u=null==(o=e.data)?void 0:o.rawDiagramElementSpec,d=e.stroke,g=e.strokeDashArray,p=null==(i=e.data)?void 0:i.otherData.selectedRelColor;a.remove(e);const b=St(u,_,t,r,d,p,void 0,g);a.add(b),c&&b.moveTo(c),n&&wt(_,n)}}},mt=e=>{const t=e.findIndex((e=>e.customType===gt.Triangle)),n=e[t],r=e[t>0?t-1:t+1];return 180*Math.atan2(n.y-r.y,n.x-r.x)/Math.PI+90},wt=(e,t)=>{let n;e&&(n=mt(e),t.rotate(n))},ht=(e,t,n,r,a=F,o=1,i=1,_)=>{var l;const s=null!=(l=null==e?void 0:e.getZoom())?l:1,c=ne(e);let u=t,d=n;if(r){const e=A*o/2+N*o/2,t=A*i/2+N*i/2;_?(u-=e,d+=t):(u+=e,d-=t)}else{const e=L*o*2+N*o/2,t=L*i+N*i/2;_?(u+=e,d+=t):(u-=e,d-=t)}return _||(u=(u-c.panX)/s,d=(d-c.panY)/s),{left:u,top:d,angle:a}},yt=(e,t)=>{let n=[];if(null!=e&&e.shapes)null==e||e.shapes.forEach((e=>{var t,r;if((e.shape_type===gt.Dot||e.shape_type===gt.Triangle)&&void 0!==(null==(t=e.position)?void 0:t.left)&&void 0!==(null==(r=e.position)?void 0:r.top)){const t=new oe(e.position.left,e.position.top,e.shape_type);t.data={rawDiagramElementSpec:e},n.push(t)}}));else{var r,a;let o;null!=e&&e.alias&&null!=(r=t[e.alias])&&r.start&&null!=(a=t[e.alias])&&a.end?(o=[],o.push(new oe(t[e.alias].start.x,t[e.alias].start.y,gt.Dot)),t[e.alias].path&&t[e.alias].path.forEach((e=>{o.push(new oe(e.x,e.y,gt.Dot))})),o.push(new oe(t[e.alias].end.x,t[e.alias].end.y,gt.Triangle))):o=[new oe(v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Dot),new oe(100+v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Triangle)],n=n.concat(o)}return n},vt=(e,t,n,r,a,o)=>{const i=[],_=void 0!==(null==e?void 0:e.alias)&&void 0!==t[e.alias];for(let e=0;e<n.length;e++){var l,s,c,u;i.push(Ot(void 0,n[e],n[e].customType===gt.Triangle?null!=(l=null==(s=n[e].data)||null==(s=s.rawDiagramElementSpec)||null==(s=s.position)?void 0:s.angle)?l:mt(n):void 0,n[e].customType===gt.Triangle,r,!0,null==(c=n[e].data)||null==(c=c.rawDiagramElementSpec)||null==(c=c.size)?void 0:c.scale_x,null==(u=n[e].data)||null==(u=u.rawDiagramElementSpec)||null==(u=u.size)?void 0:u.scale_y,a,o,_))}return i},Ot=(e,t,n,r,a,o=!0,i=1,_=1,l,s,c)=>{var u;l=null!=(u=l)?u:T;const{left:d,top:g,angle:p}=ht(e,t.x,t.y,r,n,i,_,!1);if(r){var b,f;const e=new q.fabric.Triangle({left:d,top:g,width:A,height:A,fill:l,scaleX:i,scaleY:_,hasControls:!1,name:gt.Triangle,angle:F});return e.rotate(p),e.data={rawDiagramElementSpec:null==(b=t.data)?void 0:b.rawDiagramElementSpec,otherData:{selectedRelColor:null!=s?s:C}},e.parent=a,o&&(null==(f=a.children)||f.push(e)),Tt(e,l),e}{var m,w;const e=new q.fabric.Circle({left:d,top:g,radius:L,fill:l,opacity:.2,scaleX:i,scaleY:_,hasControls:!1,name:gt.Dot,visible:!c,selectable:!c,hasBorders:!c});return e.data={rawDiagramElementSpec:null==(m=t.data)?void 0:m.rawDiagramElementSpec,otherData:{selectedRelColor:null!=s?s:C}},e.parent=a,o&&(null==(w=a.children)||w.push(e)),Tt(e,l),e}},St=(e,t,n,r=1,a,o,i,_)=>{var l,s,c;const u=null==e||null==(l=e.shapes)?void 0:l.filter((e=>e.shape_type===gt.Line))[0];let d;return d=i&&null!=e&&e.alias&&null!=(s=i[e.alias])&&s.svg_path?new q.fabric.Path(i[e.alias].svg_path,{stroke:null!=a?a:T,strokeDashArray:_,fill:"",strokeWidth:N*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}):new q.fabric.Polyline(t,{stroke:null!=a?a:T,strokeDashArray:_,fill:"",strokeWidth:N*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}),d.data={rawDiagramElementSpec:u,otherData:{selectedRelColor:null!=o?o:C}},d.parent=n,xt(d,d.stroke,d.strokeWidth),null==(c=n.children)||c.push(d),d},Et=(e,t,n,r,a,o,i,_)=>{var l,s,c,u,d,g,p;let b,f=1,m=1;var w,h,y,O;null!=t&&t.shapes&&(b=t.shapes.filter((e=>e.shape_type===gt.Text))[0],b&&(f=null!=(w=null==(h=b.size)?void 0:h.scale_x)?w:1,m=null!=(y=null==(O=b.size)?void 0:O.scale_y)?y:1));const S=[],E={fontFamily:v.FONT.FAMILY,fill:null!=(l=null!=(s=null==_?void 0:_.font_color)?s:null==i||null==(c=i.diagramsThemeSettings)?void 0:c.text_color_relationship)?l:R};if(null!=(u=e.base_data)&&u.label){var T,C,L,A,N;const t=new q.fabric.Text((0,G.x4)(e.base_data.label),Object.assign({},E,{fontSize:I,fontWeight:"bold",textAlign:"center"}));t.top=e.technology?-(null!=(T=t.height)?T:0):-(null!=(C=t.height)?C:0)/2,t.left=(null!=(L=r.width)?L:0)/2-(null!=(A=t.width)?A:0)/2-(null!=(N=a[0].width)?N:0)/2,S.push(t)}if(e.technology){var j,F,M;const t=new q.fabric.Text(`[${e.technology}]`,Object.assign({},E,{fontSize:D,textAlign:"center"}));t.left=(null!=(j=r.width)?j:0)/2-(null!=(F=t.width)?F:0)/2-(null!=(M=a[0].width)?M:0)/2,S.push(t)}const P=new q.fabric.Group(S),z=P.getBoundingRect(),B=new q.fabric.Rect({top:z.top-k,left:z.left-k,width:z.width+2*k,height:z.height+2*k,fill:null!=(d=null==i||null==(g=i.diagramsThemeSettings)?void 0:g.bg_color_relationship)?d:x});let H,W;var Y,X,Z,$,U,Q,J,V;null!=t&&t.alias&&n[t.alias]&&n[t.alias].label_position?(H=n[t.alias].label_position.x-(null!=(Y=B.width)?Y:0)/2,W=n[t.alias].label_position.y-(null!=(X=B.height)?X:0)/2):(H=(null!=(Z=r.left)?Z:0)+(null!=($=r.width)?$:0)/2-(null!=(U=B.width)?U:0)/2,W=(null!=(Q=r.top)?Q:0)+(null!=(J=r.height)?J:0)/2-(null!=(V=B.height)?V:0)/2);const K=new q.fabric.Group([B,P],{name:gt.Text,hasControls:!1,left:H,top:W,scaleX:f,scaleY:m});var ee,te;return K.data={rawDiagramElementSpec:b},K.parent=o,null==(p=o.children)||p.push(K),b&&void 0!==(null==(ee=b.position)?void 0:ee.left)&&void 0!==(null==(te=b.position)?void 0:te.top)&&K.setPositionByOrigin(new q.fabric.Point(b.position.left,b.position.top),"center","center"),K},xt=(e,t,n)=>{const r=e.parent;e.on(c,(t=>{var n,r,a;e.stroke=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.strokeWidth=(null!=(r=e.strokeWidth)?r:0)+j,e.dirty=!0,null==(a=e.canvas)||a.renderAll(),((e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=t.parent,r.on(l,(e=>{It(r.canvas,e,r,n)})),r.on(s,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(s)}))),r.hasBorders=!1,null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}})(t,e)})),e.on(u,(r=>{var a;e.stroke=t,e.strokeWidth=n,e.dirty=!0,null==(a=e.canvas)||a.renderAll()})),e.on(l,(t=>{It(e.canvas,t,e,r)}))},Tt=(e,t)=>{const n=e.parent;e.on("moving",(e=>{Rt(e)})),e.on(l,(t=>{It(e.canvas,t,e,n)})),e.on(c,(t=>{var n,r;e.fill=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.dirty=!0,null==(r=e.canvas)||r.renderAll()})),e.on(u,(n=>{var r;e.fill=t,e.dirty=!0,null==(r=e.canvas)||r.renderAll()}))},Rt=e=>{var t;if(null!=(t=e.transform)&&t.target){const t=e.transform.target.parent;if(t){var n;const e=null==(n=t.children)?void 0:n.filter((e=>e.name===gt.Line))[0];e&&ft(e)}}},Ct=(e,t,n)=>{if(n instanceof q.fabric.ActiveSelection){const r=[];return e.isReadOnly()?e.codingFeaturesEnabled&&r.push(...se(e,t,n,!1)):r.push({isHeaderMenuItem:!1,id:"addPoint",label:"Add point",onClick:()=>{((e,t)=>{const n=e.canvas;if(t.pointer&&n){const a=e.getObjects().filter((e=>e.name===gt.Line))[0],o=e.getObjects().filter((e=>e.name===gt.Dot))[0];n.discardActiveObject();const i=a.parent;if(i){var r;const e=new oe(t.pointer.x,t.pointer.y,gt.Dot),_=Ot(n,e,void 0,!1,i,!1,o.scaleX,o.scaleY,a.stroke,null==(r=o.data)?void 0:r.otherData.selectedRelColor,!1);((e,t)=>{const n=e.parent;if(n){var r;let a,o;const i=[];null==(r=n.children)||r.forEach((e=>{e.name===gt.Text?a=e:e.name===gt.Rectangle?o=e:e.name!==gt.Dot&&e.name!==gt.Triangle||i.push(e)})),i.push(t),i.sort(((e,t)=>e.getCenterPoint().x-t.getCenterPoint().x)),n.children=i,n.children.push(e),a&&n.children.push(a),o&&n.children.push(o)}})(a,_),n.add(_),ft(a)}}})(n,t)}},{id:"separatorRel",isSepator:!0},...se(e,t,n,!1)),[{isHeaderMenuItem:!0,id:"relationshipContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:r}]}return n.name!==gt.Dot||e.isReadOnly()?[]:[{isHeaderMenuItem:!0,id:"dotContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[{isHeaderMenuItem:!1,id:"removePoint",label:"Remove point",onClick:()=>{(e=>{const t=e.parent;if(t&&e.canvas){var n;const i=null==(n=t.children)?void 0:n.filter((e=>e.name===gt.Dot||e.name===gt.Triangle));if(void 0!==i&&i.length>2){var r,a;const n=null==(r=t.children)?void 0:r.filter((e=>e.name===gt.Line))[0],i=null==(a=t.children)?void 0:a.findIndex((t=>t.getCenterPoint().eq(e.getCenterPoint())));var o;void 0!==i&&i>-1&&(null==(o=t.children)||o.splice(i,1)),e.canvas.remove(e),ft(n)}}})(n)}}]}]},It=(e,t,n,r)=>{n.name!==gt.Line&&n.name!==gt.Rectangle&&e&&r.onComponentMouseUp(e,t,n,Ct(e,t,n))},Dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.relationship_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b;const f=Xe(Ye(null==(a=e.base_data)?void 0:a.tags),null==r?void 0:r.tags),m={alias:null==(o=e.base_data)?void 0:o.alias};let w=1;const h=null==(i=t.shapes)?void 0:i.filter((e=>e.shape_type===gt.Dot));h&&h.length>0&&(w=null!=(_=null==(l=h[0].size)?void 0:l.scale_x)?_:1);const y=new pt(e,t,m,n,[],{visible:!1,selectable:!1},void 0,void 0,!0),v=yt(t,n),O=vt(t,n,v,y,null!=(s=null==f?void 0:f.border_color)?s:null==r||null==(c=r.diagramsThemeSettings)?void 0:c.line_color_relationship,null==r||null==(u=r.diagramsThemeSettings)?void 0:u.selected_color_relationship),S=O.map((e=>new oe(e.getCenterPoint().x,e.getCenterPoint().y,e.name))),E=St(t,S,y,w,null!=(d=null==f?void 0:f.border_color)?d:null==r||null==(g=r.diagramsThemeSettings)?void 0:g.line_color_relationship,null==r||null==(p=r.diagramsThemeSettings)?void 0:p.selected_color_relationship,n,null==(b=je(null==f?void 0:f.border_style))?void 0:b.value);return Et(e,t,n,E,O,y,r,f),bt(y),y})(t,de(t.base_data.alias,t.from,t.to,{Relationship:t.relationship_type},n),r,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...null!=(o=i.children)?o:[]),i}},kt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.system_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.system_type){case"System":case"SystemDb":case"SystemQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_software_system)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System":return tt(e,t,n,d,a);case"SystemDb":return nt(e,t,n,d,a);case"SystemQueue":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a);break;case"System_Ext":case"SystemDb_Ext":case"SystemQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_software_system_ext)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system_ext)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System_Ext":return tt(e,t,n,d,a);case"SystemDb_Ext":return nt(e,t,n,d,a);case"SystemQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};class Lt{constructor(){this.graphviz=void 0}async initialize(){return this.graphviz=await Ae.Graphviz.load(),this}renderDiagram(e,t,n,r){if(e&&n){var a,o,i,_,l,s,c,u;if(e.diagramListener=t,e.autoLayoutEnabled=null==(a=n.diagram_spec)?void 0:a.auto_layout_enabled,e.autoLayoutOrientation=null==(o=n.diagram_spec)?void 0:o.auto_layout_orientation,e.backgroundColor=null!=(i=null==r?void 0:r.bg_color_diagram)?i:d,null!=(_=n.diagram_spec)&&_.auto_layout_enabled)if(this.graphviz){const e=function(e,t){var n,r;const a={},o=[];if(null!=(n=t.diagram_spec)&&n.auto_layout_enabled&&t.diagram_spec.auto_layout_orientation&&null!=(r=t.diagram_plantuml)&&r.elements){var i,_;console.time("autoLayoutGeneration");const n=t.diagram_plantuml.elements,r=t.diagram_spec.auto_layout_orientation,l=t.diagram_spec.auto_layout_ranksep,s=t.diagram_spec.auto_layout_subgraph_inner_margin,c=t.diagram_spec.auto_layout_subgraph_outer_margin,u=t.diagram_spec.auto_layout_only_straight_arrows,d=(e=>{for(const t of e)if(be(t)||we(t))return!0;return!1})(n),g=function(e){let t=Re,n=Ce;return e&&(t-=.1,n-=.1),{x:Number.parseFloat(t.toFixed(2)),y:Number.parseFloat(n.toFixed(2))}}(d),p=function(e,t,n,r,a,o,i){const _=new Set;return`\n digraph G {\n pad = "${i.x},${i.y}"\n dpi = ${Te.toFixed(1)}\n penwidth="1"\n rankdir = ${"LeftToRight"===t?"LR":"TB"}\n nodesep=0\n ranksep=${n}\n compound=true\n bgcolor="red"\n ${o?"splines=ortho":""}\n node [shape="rect", fixedsize=true, penwidth="1"]\n ${Le(e,_,r,a)}\n }\n `}(n,r,l,s,c,u,g),b=e.dot(p,"json"),f=JSON.parse(b),m=function(e){const t=e.split(",");return Number.parseFloat(t[3])}(f.bb);null==(i=f.objects)||i.forEach((e=>{if(!function(e){return e.width&&0===Number.parseInt(e.width)&&e.height&&0===Number.parseInt(e.height)&&e.peripheries&&0===Number.parseInt(e.peripheries)&&""===e.label}(e)&&!function(e){return e.name.endsWith(Ee)}(e)&&e._draw_){const t=e._draw_.filter((e=>"p"===e.op||"P"===e.op))[0],n=xe(g,m,t.points[0]),r=xe(g,m,t.points[1]),o=xe(g,m,t.points[2]),i=r[0],_=r[1];let l;4===t.points.length&&(l={x:o[0]-r[0],y:n[1]-r[1]}),a[e.name]={position:{x:i,y:_},size:l}}})),null==(_=f.edges)||_.forEach((e=>{const t={path:[]};if(e._draw_?e._draw_.filter((e=>"b"===e.op))[0].points.forEach(((e,n)=>{var r;const a=xe(g,m,e),o=a[0],i=a[1];0===n?t.start={x:o,y:i}:null==(r=t.path)||r.push({x:o,y:i})})):o.push(He),e._hdraw_){const n=e._hdraw_.filter((e=>"P"===e.op))[0].points,r=xe(g,m,n[1]);t.end={x:r[0],y:r[1]}}if(e._ldraw_){var n;const r=null==(n=e._ldraw_)?void 0:n.filter((e=>"T"===e.op))[0].pt;if(r){const e=xe(g,m,r);t.label_position={x:e[0],y:e[1]}}}if(t.start&&t.end){const n=t.path&&t.path.length>2?t.path[1]:t.end,r=t.path&&t.path.length>2?t.path[t.path.length-2]:t.start;"false"===e.keadex_fromissubgraph&&n.x&&n.y&&(t.start.x<n.x?t.start.x-=Ie:t.start.x>n.x&&(t.start.x+=Ie),t.start.y<n.y?t.start.y-=Ie:t.start.y>n.y&&(t.start.y+=Ie)),"false"===e.keadex_toissubgraph&&r.x&&r.y&&(t.end.x<r.x?t.end.x-=Ie:t.end.x>r.x&&(t.end.x+=Ie),t.end.y<r.y?t.end.y-=Ie:t.end.y>r.y&&(t.end.y+=Ie)),t.svg_path=function(e,t,n,r,a){const o=e.split(" ").slice(1).map((e=>e.split(",").map(Number)));let i=`M ${n.x} ${n.y}`;for(let e=o.length-3;e>=0;e-=3){const[n,_]=xe(r,a,o[e+1]),[l,s]=xe(r,a,o[e]),[c,u]=xe(r,a,o[e-1]);let d=c,g=u;1===e&&(d=t.x,g=t.y),i+=` C ${n} ${_}, ${l} ${s}, ${d} ${g}`}return i}(e.pos,t.start,t.end,g,m)}a[e.name]=t}))}return console.timeEnd("autoLayoutGeneration"),{positions:a,errors:o}}(this.graphviz,n);n.auto_layout=e.positions,n.auto_layout_errors=e.errors,e.errors.length>0&&e.errors.indexOf(He)>=0&&(console.warn(ze),Ne.toast.warn(ze))}else console.error(Be),Ne.toast.error(Be);null!=(l=n.diagram_spec)&&l.grid_enabled?e.enableGrid():e.disableGrid();const g=At(e,null==(s=n.diagram_plantuml)?void 0:s.elements,n.diagram_spec,null!=(c=n.auto_layout)?c:{},{diagramsThemeSettings:r,tags:null==(u=n.diagram_plantuml)?void 0:u.tags});return Nt(g),g}}}const At=(e,t,n,r,a)=>{const o=[];if(n){if(!a||!a.skipLegendRendering){const t=Pe(de(Fe,void 0,void 0,void 0,n),a);t&&(o.push(t),null==e||e.add(t))}if(t)for(const i of t)if(be(i)){const t=et(e,be(i),n,r,a);t&&o.push(t)}else if(fe(i)){const t=lt(e,fe(i),n,r,a);t&&o.push(t)}else if(me(i)){const t=st(e,me(i),n,r,a);t&&o.push(t)}else if(we(i)){const t=ct(e,we(i),n,r,a);t&&o.push(t)}else if(he(i)){const t=dt(e,he(i),n,r,a);t&&o.push(t)}else if(ye(i)){const t=Dt(e,ye(i),n,r,a);t&&o.push(t)}else if(ve(i)){const t=kt(e,ve(i),n,r,a);t&&o.push(t)}}return o},Nt=(e,t)=>{e.forEach((e=>{let n=function(e){let t;var n,r;return t=e.isVirtualGroupParent()?null==(n=e.data)||null==(n=n.rawDiagramElementSpec)||null==(n=n.shapes)||null==(n=n.reduce(((e,t)=>{var n,r;return void 0===(null==(n=e.position)?void 0:n.z_index)?t:(void 0===(null==(r=t.position)?void 0:r.z_index)||(t.position.z_index,e.position.z_index),e)})).position)?void 0:n.z_index:null==(r=e.data)||null==(r=r.rawDiagramElementSpec)||null==(r=r.position)?void 0:r.z_index,t}(e);var r;n&&(t&&n<=t&&(n=t+1,t++),e.moveTo(n)),e.isVirtualGroupParent()&&Nt(e.children,null!=(r=n)?r:K(e.canvas,e.children[0]))}))};var jt=n(15),Ft=n.n(jt),Mt=n(61);const Pt=require("react-resize-detector");var zt=n(732);const Bt="text-5xl text-dark-primary hover:text-third",Ht="text-2xl text-dark-primary hover:text-third",Wt=Ft().memo((e=>{const{canvas:t,readOnly:n,diagramInfoPanelVisible:r,setDiagramInfoPanelVisible:a}=e;function o(){return n}return(0,zt.jsxs)("div",{className:"absolute bottom-0 left-0 z-[1] scale-[85%] opacity-20 transition hover:scale-[100%] hover:opacity-100 flex flex-row mx-2",children:[(0,zt.jsx)(U.K0,{className:`${Ht} ${o()?"absolute":"hidden"}`,icon:We.faCircleInfo,onClick:function(){o()&&a(!r)}}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretLeft,onClick:()=>null==t?void 0:t.panLeft()})}),(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretUp,onClick:()=>null==t?void 0:t.panDown()}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(U.K0,{className:`${Ht} ml-1`,icon:We.faMagnifyingGlassPlus,onClick:()=>null==t?void 0:t.zoomIn()}),(0,zt.jsx)(U.K0,{className:`${Ht} mx-2 !text-xl`,icon:We.faRotateLeft,onClick:()=>{null==t||t.resetZoom(),null==t||t.resetPan()}}),(0,zt.jsx)(U.K0,{className:`${Ht} mr-1`,icon:We.faMagnifyingGlassMinus,onClick:()=>null==t?void 0:t.zoomOut()})]}),(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretDown,onClick:()=>null==t?void 0:t.panUp()})]}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretRight,onClick:()=>null==t?void 0:t.panRight()})})]})})),Yt=require("@tauri-apps/api/core");JSON.parse(!0),JSON.parse(!0);const Xt=require("fontfaceobserver");var Zt=n.n(Xt),Gt=n(53);const $t=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.enabled),[o,i]=(0,jt.useState)(e.orientation),[_,l]=(0,jt.useState)(e.generateOnlyStraightArrows),[s,c]=(0,jt.useState)(e.ranksep),[u,d]=(0,jt.useState)(e.subgraphInnerMargin),[g,p]=(0,jt.useState)(e.subgraphOuterMargin);return(0,zt.jsxs)("div",{children:[(0,zt.jsxs)("div",{className:"modal__body",children:[(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("common.status"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(e)}})]}),(0,zt.jsxs)("span",{className:"text-sm text-orange-500 mt-2 "+(!e.enabled&&n?"block":"hidden"),children:[(0,zt.jsx)(Gt.FontAwesomeIcon,{icon:We.faWarning,className:"mr-1 text-yellow-500"}),t("diagram_editor.warning_enable_autolayout")]})]}),(0,zt.jsxs)("div",{className:"flex flex-row mt-5",children:[(0,zt.jsxs)("span",{children:[`${t("diagrams_settings.gen_only_straight_arrows")}*`,":"]}),(0,zt.jsx)(U.sx,{id:"autolayout-straight-arrows-status",className:"ml-5",value:_,options:[{label:t("common.yes"),value:!0},{label:t("common.no"),value:!1}],onChange:e=>{l(e)}})]}),(0,zt.jsx)(U.l6,{id:"autolayout-orientation-selector",label:`${t("common.orientation")}*`,className:"mt-8",value:o,options:a.map((e=>({label:e,value:e}))),onChange:e=>i(e.target.value)}),(0,zt.jsx)(U.pd,{id:"autolayout-ranksep",type:"number",label:"ranksep*",min:0,classNameRoot:"mt-6",info:`${t("diagrams_settings.ranksep_description")}`,value:s,onChange:e=>c(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-inner-margin",type:"number",label:`${t("diagrams_settings.subgraph_inner_margin")}`,min:0,classNameRoot:"mt-6",value:u,onChange:e=>d(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-outer-margin",type:"number",label:`${t("diagrams_settings.subgraph_outer_margin")}`,min:0,classNameRoot:"mt-6",value:g,onChange:e=>p(Number.parseFloat(e.target.value))})]}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onAutoLayoutConfigured(n,o,_,s,u,g),e.hideModal()}}])})]})},Ut=Ft().memo((e=>{var t,n,r;const{tagsDirection:a,scrollable:o,diagram:i,handleDiagramHeaderClick:_}=e;return(null==i?void 0:i.diagram_type)&&(0,zt.jsxs)("div",{className:"w-full flex flex-col items-center py-1 pr-3 "+(_?"cursor-pointer":""),onClick:function(){_&&_()},children:[(0,zt.jsxs)("div",{className:"flex w-full my-auto "+("bottom"===a?"flex-col":""),children:[(0,zt.jsxs)("div",{className:"text-lg text-accent-primary grow truncate",children:[(l=i.diagram_type,(0,$.capitalCase)((0,$.noCase)(l)))," Diagram -"," ",i.diagram_name]}),(null==(t=i.diagram_spec)?void 0:t.tags)&&(0,zt.jsx)("div",{className:"bottom"===a?"mt-2 mb-5":"",children:(0,zt.jsx)(U.YD,{tags:i.diagram_spec.tags,className:"right"===a?"float-right top-1/2 -translate-y-1/2":""})})]}),(null==(n=i.diagram_spec)?void 0:n.description)&&(0,zt.jsx)("div",{className:"w-full text-sm whitespace-break-spaces "+(o?"":"line-clamp-3"),children:null==(r=i.diagram_spec)?void 0:r.description})]});var l})),qt=Ft().memo((e=>{const{setDiagramInfoPanelVisible:t,diagram:n,hidden:r}=e;return(0,zt.jsxs)("div",{className:r?"hidden":"absolute z-[1] bg-dark-primary bg-opacity-90 w-full p-2 max-h-96 overflow-auto",children:[(0,zt.jsx)(U.K0,{icon:We.faXmark,className:"absolute right-5 top-3",onClick:()=>t(!1)}),n&&(0,zt.jsx)(Ut,{diagram:n,tagsDirection:"bottom",scrollable:!0})]})})),Qt=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.settings);return(0,zt.jsxs)("div",{children:[(0,zt.jsx)("div",{className:"modal__body",children:(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("diagrams_settings.grid_enabled"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n.gridEnabled,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(Object.assign({},n,{gridEnabled:e}))}})]})})}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onSettingsChanged(n),e.hideModal()}}])})]})};var Jt=n(735),Vt=n(691);const Kt=["auto_layout"],en=["auto_layout"],tn=(0,jt.forwardRef)(((e,t)=>{const{readOnly:n,diagram:a,diagramListener:o,diagramDesignViewToolbarCommands:i,saveDiagram:l,diagramsThemeSettings:s}=e,{t:c}=(0,Mt.useTranslation)(),u=(0,jt.useRef)(),d=(0,jt.useRef)(null),g=(0,jt.useRef)(null),{ref:p}=(0,Pt.useResizeDetector)(),b=(0,jt.useRef)(),f=(0,jt.useRef)(!1),m=(0,jt.useRef)(!1),w=(0,jt.useRef)(!1),[h,y]=(0,jt.useState)([]),[O,S]=(0,jt.useState)([]),[E,x]=(0,jt.useState)(!1),[T,R]=(0,jt.useState)(),{modal:C,showModal:I,hideModal:D}=(0,U.hS)();let k=b.current,L=a;function A(){f.current=!0,n||function(){if(!w.current){const e=z();e&&y((t=>[...t,e]))}}()}function N(t){const n={fireRightClick:!0,fireMiddleClick:!0,stopContextMenu:!0,backgroundColor:"white",readOnly:e.readOnly,enableSnapToGrid:!0},r=new U.vL(d.current,n);r.on("object:added",A),r.on("object:removed",A),r.on(_,A),r.on("mouse:down",(()=>m.current=!0)),r.on("mouse:out",(()=>m.current=!1)),r.codingFeaturesEnabled="desktop"===e.target,f.current=!1,t&&(r.setZoom(t.zoom),r.relativePan(new q.fabric.Point(t.pan.panX,t.pan.panY))),u.current=r}function j(){u.current&&(u.current.dispose(),u.current=void 0)}function F(e){j(),N(e)}function M(){var e,t;return{zoom:null!=(e=null==(t=u.current)?void 0:t.getZoom())?e:1,pan:ne(u.current)}}async function P(){var e;if(null!=(e=b.current)&&e.diagram_name&&b.current.diagram_type&&u.current){const e="png";console.debug(`Exporting to ${e}`);const t=u.current.viewportTransform;u.current.viewportTransform=q.fabric.iMatrix.slice(0);let{width:n,height:r,left:a,top:o}=V(u.current.getObjects());n&&r&&a&&o&&(n+=50,r+=50,a-=25,o-=25),await async function(e,t,n,r){return(0,Yt.invoke)("export_diagram_to_file",{diagramDataUrl:n,format:r,diagramName:e,diagramType:t})}(b.current.diagram_name,b.current.diagram_type,u.current.toDataURL({format:e,enableRetinaScaling:!0,width:n,height:r,left:a,top:o}),e).then((e=>Ne.toast.success(c("common.info.diagram_exported",{pathExportedDiagram:e})))).catch((e=>Ne.toast.success(e.msg))),u.current.viewportTransform=t}}function z(){if(b.current&&b.current.diagram_plantuml&&b.current.diagram_spec&&b.current.diagram_name&&b.current.diagram_type){var e,t;const n=void 0!==(null==(e=u.current)?void 0:e.autoLayoutEnabled)?u.current.autoLayoutEnabled:b.current.diagram_spec.auto_layout_enabled;let r=[];return n||(r=(e=>{const t=Array();return e&&e.getObjects().forEach((e=>{if(e instanceof le){const n=e.getUpdatedSpecs();n&&t.push(n)}})),t})(u.current)),Object.assign({},b.current.diagram_spec,{auto_layout_enabled:n,auto_layout_orientation:void 0!==(null==(t=u.current)?void 0:t.autoLayoutOrientation)?u.current.autoLayoutOrientation:b.current.diagram_spec.auto_layout_orientation,elements_specs:r})}}function B(){return f.current}function H(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_enabled}function W(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_orientation:"TopToBottom"}function Y(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_only_straight_arrows}function X(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_ranksep:0}function Z(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_inner_margin:0}function $(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_outer_margin:6.5}function Q(e,t,r,a,o,i){u.current&&b.current&&!n&&I({id:"showAutoLayoutConfigurationModal",title:`${c("diagram_editor.configure_auto_layout")}`,body:(0,zt.jsx)($t,{enabled:e,orientation:t,generateOnlyStraightArrows:r,ranksep:a,subgraphInnerMargin:o,subgraphOuterMargin:i,hideModal:D,onAutoLayoutConfigured:(e,t,r,a,o,i)=>{u.current&&b.current&&!n&&(u.current.autoLayoutEnabled=e,u.current.autoLayoutOrientation=t,b.current.diagram_spec&&(b.current.diagram_spec.auto_layout_only_straight_arrows=r,b.current.diagram_spec.auto_layout_ranksep=a,b.current.diagram_spec.auto_layout_subgraph_inner_margin=o,b.current.diagram_spec.auto_layout_subgraph_outer_margin=i),f.current=!0,l&&l())}}),buttons:!1})}function J(){var e;if(null!=(e=b.current)&&e.diagram_spec)return{gridEnabled:b.current.diagram_spec.grid_enabled}}function K(e){e&&u.current&&b.current&&!n&&I({id:"showDiagramDesignViewSettingsModal",title:`${c("common.settings")}`,body:(0,zt.jsx)(Qt,{settings:e,hideModal:D,onSettingsChanged:e=>{var t;u.current&&b.current&&!n&&(e.gridEnabled?u.current.enableGrid():u.current.disableGrid(),b.current.diagram_spec&&(b.current.diagram_spec.grid_enabled=null!=(t=e.gridEnabled)&&t),f.current=!0,l&&l())}}),buttons:!1})}function ee(){var t,n;null!=(t=b.current)&&t.diagram_spec&&u.current&&!e.readOnly&&(null!=(n=b.current)&&n.diagram_spec.auto_layout_enabled?u.current.setReadOnly():u.current.setReadAndWrite())}function te(e){var t;u.current&&(F(M()),ee(),T?T.renderDiagram(u.current,o,Object.assign({},b.current,{diagram_spec:e}),s):console.error("DiagramRenderer not initialized"),null==(t=u.current)||t.renderAll(),f.current=!0,console.debug("Load history completed"))}function re(){if(w.current=!0,oe()){const e=h[h.length-1],t=h[h.length-2];b.current&&e&&t&&(console.debug("Undo design view"),y((e=>e.filter(((t,n)=>n!==e.length-1)))),S((t=>[...t,e])),te(t))}w.current=!1}function ae(){if(console.debug("Redo design view"),w.current=!0,ie()){const e=O[O.length-1];e&&(S((e=>e.filter(((t,n)=>n!==e.length-1)))),y((t=>[...t,e])),te(e))}w.current=!1}function oe(){return!n&&h.length>1}function ie(){return!n&&O.length>0}return k&&(k=(0,r.A)(k,Kt)),L&&(L=(0,r.A)(L,en)),(0,G.$r)(k,L)||(b.current=a),(0,jt.useImperativeHandle)(t,(()=>({resetCanvas:F,getCanvasState:M,exportDiagram:P,getUpdatedDiagramSpec:z,isDiagramChanged:B,undo:re,redo:ae,canUndo:oe,canRedo:ie,isAutoLayoutEnabled:H,autoLayoutOrientation:W,updateAutoLayoutOptions:Q,isGenerateOnlyStraightArrowsEnabled:Y,ranksep:X,updateDiagramDesignViewSettings:K,diagramDesignViewSettings:J,subgraphInnerMargin:Z,subgraphOuterMargin:$}))),(0,jt.useLayoutEffect)((()=>{var e,t,n,r,a,o,i;console.debug("Diagram Design View changed layout"),d.current&&null!=(e=g.current)&&e.clientWidth&&null!=(t=g.current)&&t.clientHeight&&(console.debug("Canvas resize"),d.current.parentElement&&(d.current.parentElement.style.display="none"),null==(n=u.current)||n.setWidth(null==(r=g.current)?void 0:r.getBoundingClientRect().width),null==(a=u.current)||a.setHeight(null==(o=g.current)?void 0:o.getBoundingClientRect().height),d.current.parentElement&&(d.current.parentElement.style.display="flex"),null==(i=u.current)||i.renderAll())})),(0,jt.useEffect)((()=>(new(Zt())(v.FONT.FAMILY).load(null,36e4).then((function(){u.current&&(function(e){e.getObjects().forEach((e=>e.set("dirty",!0)))}(u.current),u.current.renderAll())})),d.current&&!u.current&&N(),()=>{j()})),[]),(0,jt.useEffect)((()=>{function e(e){n||"Z"!==e.key.toUpperCase()&&"Y"!==e.key.toUpperCase()||!e.ctrlKey&&!e.metaKey||!m.current||(e.preventDefault(),"Z"===e.key.toUpperCase()?re():"Y"===e.key.toUpperCase()&&ae())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n,h,O]),(0,jt.useEffect)((()=>{var e,t;u.current&&b.current&&T&&(w.current=!0,console.debug("Rendering the diagram"),ee(),T.renderDiagram(u.current,o,b.current,s),null==(e=u.current)||e.renderAll(),f.current=!1,w.current=!1,n||(w.current=!1,null!=(t=b.current)&&t.diagram_spec&&y([b.current.diagram_spec]),S([])))}),[b.current,T]),(0,jt.useEffect)((()=>{var e;!n&&i&&(console.debug("Update design toolbar"),null==(e=i.current)||e.forceUpdate())}),[n,h,O,i]),(0,jt.useEffect)((()=>{!async function(){const e=await(new Lt).initialize();R(e)}()}),[]),(0,Jt.useHotkeys)([Vt.Key.Escape],(e=>{var t;u.current&&(e.preventDefault(),null==(t=u.current)||t.discardActiveObject())})),(0,zt.jsxs)("div",{className:"relative h-full w-full",ref:p,children:[C,(0,zt.jsx)(Wt,{canvas:u.current,readOnly:n,diagramInfoPanelVisible:E,setDiagramInfoPanelVisible:x}),(0,zt.jsx)(qt,{diagram:a,hidden:!E,setDiagramInfoPanelVisible:x}),(0,zt.jsx)("div",{className:"h-full w-full flex-row flex-wrap",ref:g,children:(0,zt.jsx)("canvas",{ref:d})})]})}))},636:(e,t,n)=>{n.d(t,{tz:()=>b,rI:()=>g,UW:()=>v,K0:()=>L,pd:()=>Z,vL:()=>x,sx:()=>q,l6:()=>$,YD:()=>U,CL:()=>B,T_:()=>y,hS:()=>Y});var r=n(452),a=n.n(r);require("react-router-dom");var o=n(15),i=n.n(o);n(61);var _=n(732);a().addPluralRule(/Person/,"Persons");var l=n(177),s=n(53);const c="hide.te.dropdown",u="show.te.dropdown",d=i().memo((e=>{var t;const n=(0,o.useRef)(null),[r,a]=(0,o.useState)(!1);function i(e){let t;return t=e.isSepator?(0,_.jsx)("li",{className:"relative",children:(0,_.jsx)("span",{className:"bg-third my-1 block h-px w-full"})},e.id):(0,_.jsxs)("li",{className:"relative",children:[(0,_.jsxs)("button",{disabled:void 0!==e.disabled&&e.disabled,id:e.id,className:"\n hover:bg-link\n flex\n w-full\n items-center\n whitespace-nowrap\n px-4\n py-1\n text-left\n text-sm\n hover:text-white\n ","data-te-dropdown-item-ref":!0,onClick:t=>{e.onClick&&e.onClick(t)},children:[e.subMenuItems&&e.subMenuItems.length>0&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("span",{className:"mr-16 basis-11/12 pr-1",children:e.label}),(0,_.jsx)("span",{className:"basis-1/12 text-right",children:(0,_.jsx)(s.FontAwesomeIcon,{icon:l.faAngleRight})})]}),(!e.subMenuItems||0===e.subMenuItems.length)&&e.label]}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id),t}function d(e,t,n){const r=[];if(n&&n.length>0){for(const e of n)r.push(i(e));return(0,_.jsx)("ul",{className:`\n bg-secondary\n text-accent-primary\n absolute\n z-50\n m-0\n w-auto\n min-w-max\n list-none\n rounded-md\n border-none\n bg-clip-padding\n py-2\n shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n [&[data-te-dropdown-show]]:block\n ${e?" dropdown-menu float-left hidden origin-top-left":" right-px top-0"}\n `,id:`menu-${t}`,"aria-labelledby":t,"data-te-dropdown-menu-ref":!0,children:r})}return(0,_.jsx)("div",{"data-te-dropdown-menu-ref":!0})}const g=t=>{e.increaseOpenedMenu&&e.setLastOpenedMenu&&e.decreaseOpenedMenu&&(t.type===u?(a(!0),e.increaseOpenedMenu(),e.setLastOpenedMenu(e.id)):(a(!1),e.decreaseOpenedMenu()))};return(0,o.useEffect)((()=>{const t=n.current;return null==t||t.addEventListener(c,g),null==t||t.addEventListener(u,g),(e.alwaysOpen&&!r||e.lastOpenedMenu!==e.id&&r)&&(null==t||t.dispatchEvent(new MouseEvent("click"))),()=>{null==t||t.removeEventListener(c,g),null==t||t.removeEventListener(u,g)}})),(0,_.jsxs)("div",{className:`relative ${null!=(t=e.className)?t:""}`,"data-te-dropdown-ref":!0,children:[(0,_.jsx)("button",{className:`\n ${r?"":" bg-dark-primary text-accent-primary"} \n hover:bg-primary\n flex\n items-center\n whitespace-nowrap\n rounded-md\n px-2\n py-0.5\n text-sm hover:text-white\n hover:shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n focus:outline-none\n focus:ring-0\n ${r?" bg-primary show text-white":""}\n ${e.hidden?" h-0 opacity-0":""}\n ${e.buttonClassName?` ${e.buttonClassName}`:""}\n `,type:"button",id:e.id,"aria-expanded":"false",ref:n,"data-te-dropdown-toggle-ref":!0,"data-te-dropdown-animation":"off",onMouseEnter:t=>{e.atLeastOneOpenedMenu&&e.atLeastOneOpenedMenu()&&!r&&t.target.dispatchEvent(new MouseEvent("click"))},children:e.label}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id)})),g=i().memo((e=>{var t;const[n,r]=(0,o.useState)(0),[a,i]=(0,o.useState)("");function l(){r((e=>e+1))}function s(){r((e=>e-1))}function c(){return n>0}return(0,_.jsx)("div",{className:`dropdown-menu group flex ${c()?"open":""} ${null!=(t=e.className)?t:""}`,children:function(){const t=[];if(e.menuItemsProps&&e.menuItemsProps.length>0)for(const n of e.menuItemsProps)t.push((0,o.createElement)(d,Object.assign({},n,{key:n.id,increaseOpenedMenu:l,decreaseOpenedMenu:s,atLeastOneOpenedMenu:c,lastOpenedMenu:a,setLastOpenedMenu:i})));return t}()})})),p=g,b=()=>{const{anchorPoint:e,show:t,contextMenuItems:n}=(()=>{const[e,t]=(0,o.useState)({x:0,y:0}),[n,r]=(0,o.useState)(!1),[a,i]=(0,o.useState)([]),_=(0,o.useCallback)((e=>{if(e.preventDefault(),(n=e)instanceof CustomEvent&&n instanceof CustomEvent&&Object.keys(n.detail).includes("menuItems")){const n=e.detail.pageX,a=e.detail.pageY;i(e.detail.menuItems),t({x:n,y:a}),r(!0)}var n}),[r,t]),l=(0,o.useCallback)((()=>n?r(!1):null),[n]);return(0,o.useEffect)((()=>(document.addEventListener("click",l),document.addEventListener("contextmenu",_),()=>{document.removeEventListener("click",l),document.removeEventListener("contextmenu",_)}))),{anchorPoint:e,show:n,contextMenuItems:a}})(),r=(0,o.useRef)(),[a,i]=(0,o.useState)((0,_.jsx)(_.Fragment,{}));return r.current!==t&&(r.current=t),(0,o.useEffect)((()=>{void 0!==r.current&&(r.current?i((0,_.jsx)("div",{hidden:!t,className:"context-menu absolute",style:{top:e.y,left:e.x},children:(0,_.jsx)(p,{menuItemsProps:n})})):i((0,_.jsx)(_.Fragment,{})))}),[r.current]),a},f=require("js-cookie");var m=n.n(f);const w=require("react-ga4");var h=n.n(w);function y(e){const{initTE:t,initGA:n}=e,[r,a]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{(async()=>{t&&await t(),n&&function(e,t){var n;let r=m().get("CookieConsent");r=null==(n=r)?void 0:n.replace(/{/gi,'{"').replace(/:/gi,'":').replace(/,/gi,',"').replace(/'/gi,'"'),!e&&r&&JSON.parse(r).statistics&&({NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID&&h().initialize([{trackingId:{NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID,gtagOptions:{anonymize_ip:!0,send_page_view:!1}}]),t(!0)),e&&(console.debug(`Logging pageview for ${window.location.pathname}`),h().send({hitType:"pageview",page:window.location.pathname}))}(r,a)})()}),[r,n,t]),{isGAInitialized:r}}const v={CONTEXT_MENU:"contextmenu"};var O=n(489);const S="idle",E="panning";class x extends O.fabric.Canvas{constructor(e,t){super(e,t),this.gridEnabled=void 0,this.gridBgColor=void 0,R(this),C(this)}initialize(e,t){return this.gridEnabled=null==t?void 0:t.gridEnabled,R(this),C(this),!0===(null==t?void 0:t.readOnly)&&this.setReadOnly(),!0===(null==t?void 0:t.gridEnabled)&&this.enableGrid(),!0===(null==t?void 0:t.enableSnapToGrid)&&function(e,t){const n=null!=t?t:5;e.on("object:moving",(e=>{var t,r,a;null==(t=e.target)||t.set({left:Math.round((null!=(r=e.target.left)?r:0)/n)*n,top:Math.round((null!=(a=e.target.top)?a:0)/n)*n})}))}(this,t.gridSize),super.initialize(e,t)}isReadOnly(){return O.fabric.Object.prototype.lockMovementX&&O.fabric.Object.prototype.lockMovementY&&O.fabric.Object.prototype.lockRotation&&O.fabric.Object.prototype.lockScalingFlip&&O.fabric.Object.prototype.lockScalingX&&O.fabric.Object.prototype.lockScalingY&&O.fabric.Object.prototype.lockSkewingX&&O.fabric.Object.prototype.lockSkewingY}setReadOnly(){O.fabric.Object.prototype.lockMovementX=!0,O.fabric.Object.prototype.lockMovementY=!0,O.fabric.Object.prototype.lockRotation=!0,O.fabric.Object.prototype.lockScalingFlip=!0,O.fabric.Object.prototype.lockScalingX=!0,O.fabric.Object.prototype.lockScalingY=!0,O.fabric.Object.prototype.lockSkewingX=!0,O.fabric.Object.prototype.lockSkewingY=!0}setReadAndWrite(){O.fabric.Object.prototype.lockMovementX=!1,O.fabric.Object.prototype.lockMovementY=!1,O.fabric.Object.prototype.lockRotation=!1,O.fabric.Object.prototype.lockScalingFlip=!1,O.fabric.Object.prototype.lockScalingX=!1,O.fabric.Object.prototype.lockScalingY=!1,O.fabric.Object.prototype.lockSkewingX=!1,O.fabric.Object.prototype.lockSkewingY=!1}zoomIn(){this.setZoom(1.1*this.getZoom())}zoomOut(){this.setZoom(this.getZoom()/1.1)}resetZoom(){this.setZoom(1)}panLeft(){this.relativePan(new O.fabric.Point(5,0))}panRight(){this.relativePan(new O.fabric.Point(-5,0))}panUp(){this.relativePan(new O.fabric.Point(0,5))}panDown(){this.relativePan(new O.fabric.Point(0,-5))}resetPan(){this.absolutePan(new O.fabric.Point(0,0))}isGridEnabled(){var e;return null!=(e=this.gridEnabled)&&e}enableGrid(){if(!this.gridEnabled){this.gridEnabled=!0,this.gridBgColor=this.backgroundColor;const e=`\n<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><rect width="160" height="160" fill="${this.gridBgColor}" /><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect x="0.38" y="0.38" width="160" height="160" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.75px"/><line x1="0.38" y1="140.38" x2="160.38" y2="140.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="120.38" x2="160.38" y2="120.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="100.38" x2="160.38" y2="100.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="80.38" x2="160.38" y2="80.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.5px"/><line x1="0.38" y1="60.38" x2="160.38" y2="60.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="40.38" x2="160.38" y2="40.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="20.38" x2="160.38" y2="20.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="140.38" y1="0.38" x2="140.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="120.38" y1="0.38" x2="120.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="100.38" y1="0.38" x2="100.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="80.38" y1="0.38" x2="80.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.5px"/><line x1="60.38" y1="0.38" x2="60.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="40.38" y1="0.38" x2="40.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="20.38" y1="0.38" x2="20.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/></g></g></svg>\n`,t=new Blob([e],{type:"image/svg+xml"}),n=URL.createObjectURL(t);O.fabric.Image.fromURL(n,(e=>{var t,n;e.scaleToWidth(null!=(t=this.width)?t:0),e.scaleToHeight(null!=(n=this.height)?n:0);const r=new O.fabric.Pattern({source:e.getElement(),repeat:"repeat"});this.setBackgroundColor(r,this.renderAll.bind(this))}))}}disableGrid(){this.gridEnabled&&(this.gridEnabled=!1,this.gridBgColor&&(this.setBackgroundColor(this.gridBgColor,this.renderAll.bind(this)),this.gridBgColor=void 0))}}function T(e){return 3===e.button}function R(e){e.on("mouse:wheel",(function(t){const n=t.e.deltaY;let r=e.getZoom();r*=.999**n,r>20&&(r=20),r<.01&&(r=.01),e.zoomToPoint({x:t.e.offsetX,y:t.e.offsetY},r),t.e.preventDefault(),t.e.stopPropagation()}))}function C(e){let t,n,r=S;e.discardActiveObject(),e.on("mouse:up",(function(t){T(t)&&(r=S,e.defaultCursor="default")})),e.on("mouse:down",(a=>{T(a)&&(e.defaultCursor="move",r=E,t=a.e.clientX,n=a.e.clientY)})),e.on("mouse:move",(a=>{if(r===E&&a&&a.e){let r=0,o=0;t&&(r=a.e.clientX-t),n&&(o=a.e.clientY-n),t=a.e.clientX,n=a.e.clientY;const i=new O.fabric.Point(r,o);e.relativePan(i),e.fire("moved")}}))}var I=n(416),D=n(385);const k=["icon","classNameIcon","classNameContent"],L=i().memo((e=>{const{icon:t,classNameIcon:n,classNameContent:r}=e,a=(0,I.A)(e,k),o=(0,D.Cp)(e);return(0,_.jsxs)("button",Object.assign({},a,o,{className:`${e.className} text-accent-secondary hover:text-accent-primary [&.active]:text-accent-primary disabled:hover:text-accent-secondary disabled:opacity-50`,children:[(0,_.jsx)(s.FontAwesomeIcon,{icon:null!=t?t:l.faXmark,className:null!=n?n:""}),(0,_.jsx)("div",{className:r,children:e.children})]}))})),A=(require("@tanstack/react-table"),i().memo((e=>{const{className:t}=e;return(0,_.jsx)("div",{className:`inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${t}`,role:"status",children:(0,_.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}))),N=["children","isLoading","disabled"],j=i().memo((e=>{const t=(0,D.Cp)(e),{children:n,isLoading:r,disabled:a}=e,o=(0,I.A)(e,N);return(0,_.jsxs)("button",Object.assign({},o,t,{disabled:a||r,type:"button","data-te-toggle":"button",className:`button--primary inline-block min-w-[75px] rounded px-5 py-2 text-xs font-medium uppercase leading-tight shadow-md transition duration-75 ease-in-out hover:shadow-lg focus:shadow-lg focus:outline-none focus:ring-0 active:shadow-lg ${e.className}`,children:[r&&(0,_.jsx)(A,{className:"icon !h-4 !w-4"}),!r&&n]}))})),F="modalRoot";var M=n(221);const P=["key"],z="hidden.te.modal";function B(e){const t=[];return"boolean"!=typeof e&&e&&e.forEach(((e,n,r)=>{const a=(0,D.Cp)(e),{key:o}=e,i=(0,I.A)(e,P);t.push((0,_.jsx)(j,Object.assign({},i,a,{className:`${0!==n&&r.length>1?"ml-3":""} ${e.className}`}),o))})),t}const H=(0,o.forwardRef)(((e,t)=>{var n;const{id:r,onHiddenModal:a}=e,i=null!=(n=e.size)?n:"md",c=(0,o.useRef)();return(0,o.useEffect)((()=>{function e(){a&&a()}const t=document.getElementById(r);return!c.current&&t&&(c.current=new M.Modal(t)),t&&t.addEventListener(z,e),()=>{t&&t.removeEventListener(z,e)}}),[r,a]),(0,o.useImperativeHandle)(t,(()=>({showModal:()=>{c.current.show()},hideModal:()=>{c.current.hide(),c.current=void 0}}))),(0,_.jsx)("div",{"data-te-modal-init":!0,className:"fixed left-0 top-8 bottom-0 z-[1055] hidden h-auto w-full overflow-y-auto overflow-x-hidden outline-none",id:r,tabIndex:-1,"aria-labelledby":`${r}Label`,children:(0,_.jsx)("div",{"data-te-modal-dialog-ref":!0,className:"pointer-events-none relative flex min-h-[calc(100%-1rem)] w-auto translate-y-[-50px] items-center justify-center opacity-0 transition-all duration-300 ease-in-out min-[576px]:mx-5 min-[576px]:my-7 min-[576px]:min-h-[calc(100%-3.5rem)]",children:(0,_.jsxs)("div",{className:`pointer-events-auto relative flex ${(()=>{switch(i){case"sm":return"w-[25rem]";case"md":return"w-[40rem]";case"lg":return"w-[70rem]";case"full":return"w-full"}})()} ${"full"===e.size?"mx-5":""} bg-primary flex-col rounded-md border-none bg-clip-padding text-current shadow-lg outline-none`,children:[(0,_.jsxs)("div",{className:"border-secondary flex flex-shrink-0 items-center justify-between rounded-t-md border-b-2 border-opacity-50 p-4",children:[(0,_.jsx)("h5",{className:"text-accent-primary text-xl font-medium leading-normal pointer-events-none",id:`${r}Label`,children:e.title}),(0,_.jsx)("button",{type:"button",className:"box-content rounded-none border-none hover:no-underline hover:opacity-75 focus:opacity-100 focus:shadow-none focus:outline-none","data-te-modal-dismiss":!0,"aria-label":"Close",children:(0,_.jsx)(s.FontAwesomeIcon,{icon:l.faXmark})})]}),"boolean"!=typeof e.buttons&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"modal__body",children:e.body}),(0,_.jsx)("div",{className:"modal__footer",children:B(e.buttons)})]}),"boolean"==typeof e.buttons&&e.body]})})})})),W=require("react-dom");function Y(){const[e,t]=(0,o.useState)(),[n,r]=(0,o.useState)(!0),a=(0,o.useRef)(null);return(0,o.useEffect)((()=>{a.current&&(n?a.current.showModal():a.current.hideModal())}),[e,n]),{modal:e,showModal:function(e){const n=document.getElementById(F);n&&(t((0,W.createPortal)((0,_.jsx)(H,Object.assign({},e,{ref:a,onHiddenModal:()=>{t(void 0)}})),n)),r(!0))},hideModal:function(){r(!1)}}}const X=["label","info","allowedChars","classNameRoot","key"],Z=i().memo((e=>{const[t,n]=(0,o.useState)(e.value),{info:r,classNameRoot:a,key:i}=e,l=(0,I.A)(e,X),s=(0,D.Cp)(e);return(0,o.useEffect)((()=>{n(e.value)}),[e.value]),(0,_.jsxs)("div",{className:`relative mb-3 ${null!=a?a:""}`,children:[(0,_.jsx)("input",Object.assign({maxLength:200},l,s,{onChange:function(r){!e.allowedChars||""===r.currentTarget.value||e.allowedChars.test(r.currentTarget.value)?(n(r.currentTarget.value),e.onChange&&e.onChange(r)):t&&(r.currentTarget.value=t.toString())},"data-te-input-state-active":!0,className:`peer transition-all duration-200 ease-linear placeholder:opacity-0 motion-reduce:transition-none ${e.className}`,placeholder:e.label}),i),(0,_.jsx)("label",{htmlFor:e.id,className:(null!=t&&""!==t?"input__label -translate-y-[1.1rem] scale-[0.9]":"")+" peer-focus:text-link peer-focus:input__label pointer-events-none absolute left-3 top-0 mb-0 max-w-[90%] origin-[0_0] truncate pt-[0.37rem] leading-[1.6] drop-shadow-[0_35px_35px_rgba(0,0,0,0.25)] transition-all duration-200 ease-out peer-focus:-translate-y-[1.1rem] peer-focus:scale-[0.9] motion-reduce:transition-none",children:e.label}),r&&(0,_.jsx)("div",{className:"text-sm px-3",children:r})]})})),G=["label","className","key"],$=i().memo((e=>{const{label:t,className:n,key:r}=e,a=(0,I.A)(e,G),i=(0,D.Cp)(e);return(0,o.useEffect)((()=>{const t=document.querySelector(`#${e.id}`);M.Select.getInstance(t)||new M.Select(document.querySelector(`#${e.id}`),{},{dropdown:"select__dropdown",formCheckInput:"bg-red-400 checked:after:border-red-500",selectInput:"peer select__input",selectOption:"select__option data-[te-select-option-selected]:data-[te-input-state-active]:link",selectLabelSizeDefault:"select__label-size-default",selectLabel:"select__label",selectArrow:"select__arrow top-[0.65rem]"})})),(0,_.jsxs)("div",{className:`relative mb-3 ${n}`,children:[(0,_.jsx)("select",Object.assign({"data-te-select-init":!0},a,i,{children:function(){const t=[];return e.options.forEach((e=>{var n;t.push((0,_.jsx)("option",{value:e.value,children:e.label},null==(n=e.value)?void 0:n.toString()))})),t}()}),r),(0,_.jsx)("label",{"data-te-select-label-ref":!0,children:t})]})})),U=(require("react-html-parser"),i().memo((({tags:e,className:t})=>(0,_.jsx)("ul",{className:`tags ${null!=t?t:""}`,children:e.map(((e,t)=>(0,_.jsx)("li",{children:e},t)))})))),q=(require("@yaireo/tagify"),e=>{var t;const{className:n,options:r}=e;return(0,_.jsx)("div",{className:`flex justify-center ${null!=n?n:""}`,id:null!=(t=e.id)?t:"",children:r.map(((t,n)=>(0,_.jsxs)("div",{className:"mb-[0.125rem] me-4 inline-block min-h-[1.5rem] ps-[1.5rem]",children:[(0,_.jsx)("input",{className:"relative float-left -ms-[1.5rem] me-1 mt-0.5 h-5 w-5 appearance-none rounded-full border-2 border-solid border-secondary-500 before:pointer-events-none before:absolute before:h-4 before:w-4 before:scale-0 before:rounded-full before:bg-transparent before:opacity-0 before:shadow-checkbox before:shadow-transparent before:content-[''] after:absolute after:z-[1] after:block after:h-4 after:w-4 after:rounded-full after:content-[''] checked:border-accent-secondary checked:before:opacity-[0.16] checked:after:absolute checked:after:left-1/2 checked:after:top-1/2 checked:after:h-[0.625rem] checked:after:w-[0.625rem] checked:after:rounded-full checked:after:border-accent-secondary checked:after:bg-accent-primary checked:after:content-[''] checked:after:[transform:translate(-50%,-50%)] hover:before:opacity-[0.04] hover:before:shadow-black/60 focus:shadow-none focus:outline-none focus:ring-0 focus:before:scale-100 focus:before:opacity-[0.12] focus:before:shadow-black/60 focus:before:transition-[box-shadow_0.2s,transform_0.2s] checked:focus:border-accent-secondary checked:focus:before:scale-100 checked:focus:before:shadow-checkbox checked:focus:before:transition-[box-shadow_0.2s,transform_0.2s] rtl:float-right "+(e.disabled?"":"hover:cursor-pointer"),type:"radio",name:`inlineRadioOptions-${e.id}`,id:`option-${e.id}-${n}`,value:JSON.stringify(t.value),onChange:()=>{e.onChange(t.value)},checked:JSON.stringify(t.value)===JSON.stringify(e.value),disabled:e.disabled}),(0,_.jsx)("label",{className:"mt-px inline-block ps-[0.15rem] "+(e.disabled?"":"hover:cursor-pointer"),htmlFor:e.disabled?void 0:`option-${e.id}-${n}`,children:t.label})]},`radioOption${n}`)))})});require("react-color"),n(735),n(691)},691:e=>{e.exports=require("ts-key-enum")},732:e=>{e.exports=require("react/jsx-runtime")},735:e=>{e.exports=require("react-hotkeys-hook")}},_={};function l(e){var t=_[e];if(void 0!==t)return t.exports;var n=_[e]={id:e,loaded:!1,exports:{}};return i[e](n,n.exports,l),n.loaded=!0,n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},l.a=(a,o,i)=>{var _;i&&((_=[]).d=-1);var l,s,c,u=new Set,d=a.exports,g=new Promise(((e,t)=>{c=t,s=e}));g[t]=d,g[e]=e=>(_&&e(_),u.forEach(e),g.catch((e=>{}))),a.exports=g,o((a=>{var o;l=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var o=[];o.d=0,a.then((e=>{i[t]=e,r(o)}),(e=>{i[n]=e,r(o)}));var i={};return i[e]=e=>e(o),i}}var _={};return _[e]=e=>{},_[t]=a,_})))(a);var i=()=>l.map((e=>{if(e[n])throw e[n];return e[t]})),s=new Promise((t=>{(o=()=>t(i)).r=0;var n=e=>e!==_&&!u.has(e)&&(u.add(e),e&&!e.d&&(o.r++,e.push(o)));l.map((t=>t[e](n)))}));return o.r?s:i()}),(e=>(e?c(g[n]=e):s(d),r(_)))),_&&_.d<0&&(_.d=0)},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);l.r(n);var r={};a=a||[null,o({}),o([]),o(o)];for(var i=2&t&&e;"object"==typeof i&&!~a.indexOf(i);i=o(i))Object.getOwnPropertyNames(i).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,l.d(n,r),n},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.v=(e,t,n,r)=>{var a=fetch(l.p+""+n+".module.wasm"),o=()=>a.then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,r))).then((t=>Object.assign(e,t.instance.exports)));return a.then((t=>"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(t,r).then((t=>Object.assign(e,t.instance.exports)),(e=>{if("application/wasm"!==t.headers.get("Content-Type"))return console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e),o();throw e})):o()))},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e})();var s={};l.r(s),l.d(s,{default:()=>g});var c=l(15),u=l(732);const d=()=>null,g=e=>{const[t,n]=(0,c.useState)((()=>d));return(0,c.useEffect)((()=>{Promise.resolve().then(l.bind(l,334)).then((e=>n((()=>e.default))))}),[]),(0,u.jsx)(t,Object.assign({},e))};module.exports=s})();
|
|
1
|
+
(()=>{"use strict";var e,t,n,r,a,o,i={15:e=>{e.exports=require("react")},53:e=>{e.exports=require("@fortawesome/react-fontawesome")},61:e=>{e.exports=require("react-i18next")},177:e=>{e.exports=require("@fortawesome/free-solid-svg-icons")},196:(e,t,n)=>{var r=n(457);e.exports=n.v(t,e.id,"6ea342b0fa33fdaddd4f",{"./mina_react_bg.js":{__wbg_log_c222819a41e063d3:r.pR9,__wbg_info_3daf2e093e091b66:r.ZrD,__wbg_warn_4ca3906c248c47c4:r.jwJ,__wbg_debug_3cb59063b29f58c1:r.F$t,__wbg_error_524f506f44df1645:r.pWA,__wbindgen_string_new:r.ycJ,__wbindgen_string_get:r.qNE,__wbindgen_bigint_get_as_i64:r.DMD,__wbindgen_memory:r.Py0,__wbindgen_throw:r.Qnr,__wbindgen_debug_string:r.rl,__wbg_new_5e0be73521bc8c17:r.aIY,__wbg_new_78feb108b6472713:r.M2,__wbindgen_number_new:r.QRK,__wbg_new_405e22f390576ce2:r.va5,__wbg_newnoargs_105ed471475aaf50:r.VrZ,__wbg_new_a12002a7f91c75be:r.vVD,__wbg_stringify_f7ed6987935b4a24:r.Y6F,__wbindgen_is_string:r.GuA,__wbindgen_is_function:r.PRY,__wbindgen_is_object:r.qvD,__wbg_next_25feadfc0913fea9:r.yqB,__wbg_buffer_609cc3eee51ed158:r.FHK,__wbg_byteLength_e674b853d9c77e1d:r.x6W,__wbg_byteOffset_fd862df290ef848d:r.cyg,__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a:r.hI8,__wbg_length_a446193dc22c12f8:r.eIr,__wbg_set_65595bdd868b3009:r.HBq,__wbg_newwithlength_a381634e90c276d4:r.HtP,__wbg_buffer_09165b52af8c5237:r._Ue,__wbg_subarray_aa9065fa9dc5df96:r.TOc,__wbg_done_769e5ede4b31c67b:r.Xb8,__wbg_value_cd1ffa7b1ab794f1:r.LMq,__wbg_next_c3ab0d59847b3b5c:r.tER,__wbg_instanceof_Error_4d54113b22d20306:r.fcg,__wbg_instanceof_Uint8Array_17156bcf118086a9:r.SJf,__wbg_instanceof_ArrayBuffer_e14585432e3737fc:r.gGA,__wbg_set_8fc6bf8a5b1071d1:r.iAh,__wbg_get_b9b93047fe3cf45b:r.RKz,__wbg_set_37837023f3d740e8:r.p8e,__wbg_length_e2d2a49132c1b256:r.Ry,__wbg_push_737cfc8c1432c2c6:r.tZf,__wbg_isArray_a1eab7e0d067391b:r.uod,__wbg_new_c68d7209be747379:r.wd3,__wbg_message_97a2af9b89d693a3:r.oGe,__wbg_isSafeInteger_343e2beeeece1bb0:r.Yb6,__wbg_entries_3265d4158b33e5dc:r.gHg,__wbg_iterator_9a24c88df860dc65:r.eW0,__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:r.w6e,__wbindgen_is_undefined:r.vUM,__wbg_call_672a4d21634d4a24:r.wHY,__wbg_static_accessor_SELF_37c5d418e4bf5819:r.fb$,__wbg_static_accessor_GLOBAL_88a902d13a557d07:r.ii7,__wbg_static_accessor_WINDOW_5de37043a91a9c40:r.x0C,__wbg_new_23a2665fac83c611:r.c6u,__wbg_then_44b73946d2fb3e7d:r.GQG,__wbg_then_48b406749878a531:r.xV_,__wbg_resolve_4851785c9c5f573d:r.wJz,__wbg_call_7cccdd69e0791ae2:r.w9h,__wbg_next_6574e1a8a62d1055:r.Dn4,__wbindgen_number_get:r.sWe,__wbg_get_67b2ba62fc30de12:r.dzD,__wbg_postMessage_83a8d58d3fcb6c13:r.A2$,__wbg_setkeepexistingdata_ee7c8cb466e9477f:r.aKt,__wbg_enqueue_bb16ba72f537dc9e:r.QHd,__wbg_close_304cc1fef3466669:r.oaw,__wbg_seek_3f0f8d7591f648d7:r.Zk3,__wbg_write_397d977609afc729:r.Vob,__wbg_close_24caca68e93b9c03:r.jeC,__wbg_name_e4a115def9e2bbaa:r.Yeo,__wbg_setcreate_4ca762e23d9f78da:r.N9Q,__wbg_setrecursive_536113a081d6177a:r.ugc,__wbg_instanceof_File_a4e2256bf71955a9:r.gjJ,__wbg_lastModified_7a9e61b3961224b8:r.gvw,__wbg_point_new:r.nA9,__wbg_diagram_new:r.YLb,__wbg_diagramelementspec_new:r.Dr_,__wbg_shape_new:r._cl,__wbg_container_new:r.e57,__wbg_component_new:r.WJm,__wbg_minaerror_new:r.EkI,__wbg_relationship_new:r.NpJ,__wbg_softwaresystem_new:r.dM0,__wbg_person_new:r.c1W,__wbg_deploymentnode_new:r.ezj,__wbg_boundary_new:r.HCo,__wbg_boundary_unwrap:r.Wq,__wbg_container_unwrap:r.xB8,__wbindgen_jsval_loose_eq:r.U8c,__wbindgen_boolean_get:r.NhE,__wbindgen_as_number:r.qmw,__wbindgen_error_new:r.RjG,__wbg_getwithrefkey_2d7fdfea9645a25b:r.A2U,__wbg_set_2873a5cee2324875:r.v1k,__wbg_String_1b2069caba3b9783:r.JF5,__wbindgen_bigint_from_u64:r.Qg3,__wbg_crypto_ed58b8e10a292839:r.ilI,__wbg_process_5c1d670bc53614b8:r.Evb,__wbg_versions_c71aa1626a93e0a1:r.ooJ,__wbg_node_02999533c4ea02e3:r.OtZ,__wbg_require_79b1e9274cde3c87:r.Ltb,__wbg_msCrypto_0a36e2ec3a343d26:r.HOd,__wbg_randomFillSync_ab2cfe79ebbf2740:r.NNx,__wbg_getRandomValues_bcb4912f16000dc4:r.FGp,__wbg_deploymentnode_unwrap:r._Zx,__wbg_softwaresystem_unwrap:r.qre,__wbg_new_e25e5aab09ff45db:r.RG9,__wbg_abort_775ef1d17fc65868:r.gMQ,__wbg_signal_aaf9ad74119f20a4:r.CF8,__wbg_newwithstrandinit_06c535e0a867c635:r.heb,__wbg_has_a5ea9117f258a0ec:r.HSm,__wbg_fetch_4465c2b10f21a927:r.o0R,__wbg_fetch_509096533071c657:r.gRe,__wbg_append_299d5d48292c0495:r.cVx,__wbg_append_b44785ebeb668479:r.d_N,__wbg_append_b2d1fc16de2a0e81:r.WqA,__wbg_new_9fd39a253424609a:r.z09,__wbg_respond_1f279fa9f8edcb1c:r.dSQ,__wbg_view_fd8a56e8983f448d:r.NgT,__wbg_setmethod_3c5280fe5d890842:r._hX,__wbg_setsignal_75b21ef3a81de905:r.l0x,__wbg_setcredentials_c3a22f1cd105a2c6:r.uw1,__wbg_setheaders_834c0bdb6a8949ad:r.rk2,__wbg_setbody_5923b78a95eedf29:r.Nhd,__wbg_setmode_5dc300b865044b65:r.BFX,__wbg_settype_39ed370d3edd403c:r.a4S,__wbg_instanceof_FileSystemDirectoryHandle_0906fc139d75557b:r.Cjr,__wbg_removeEntry_9f6bc325e3383e59:r.m_N,__wbg_removeEntry_a424e90dff229b19:r.lkn,__wbg_getFileHandle_5fb877d1ecc74d52:r.Wkh,__wbg_getDirectoryHandle_c48a138373d79b3d:r.kTu,__wbg_entries_19efe296f7d36df9:r.RCF,__wbg_arrayBuffer_f18c144cd0125f07:r.RGi,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:r.qe7,__wbg_size_3808d41635a9c259:r.$CF,__wbg_text_1f39a8afe3c70a99:r.CFe,__wbg_queueMicrotask_97d92b4fcc8a61c5:r._mt,__wbg_queueMicrotask_d3219def82552485:r.k2R,__wbindgen_cb_drop:r.LCp,__wbg_new_018dcc2d6c8c2f6a:r.RR8,__wbg_append_8c7dd8d641a5f01b:r.Tbm,__wbg_instanceof_FileSystemFileHandle_d3d037cf85ee546c:r.KA3,__wbg_createWritable_b4ed240dc879905e:r.kPb,__wbg_getFile_2607bc0123c724e0:r.ycy,__wbg_setcreate_139bad94b2874fb5:r.kF0,__wbg_byobRequest_77d9adf63337edfb:r.JpR,__wbg_close_5ce03e29be453811:r.sQY,__wbg_instanceof_Response_f2cc20d9f7dfd644:r.Hzn,__wbg_arrayBuffer_d1b44c4390db422f:r._iy,__wbg_url_ae10c34ca209681d:r.Tp3,__wbg_status_f6360336ca686bf0:r.kK3,__wbg_headers_9cb51cfd2ac780a4:r.Moj,__wbg_new_8a6f238a6ece86ea:r.$Pc,__wbg_stack_0ed75d68575b0f3c:r.x$X,__wbg_error_7534b8e9a36f1ab4:r.WYM,__wbg_relationship_unwrap:r.KM7,__wbindgen_in:r.zEy,__wbindgen_is_bigint:r.YkQ,__wbindgen_jsval_eq:r.BGI,__wbg_point_unwrap:r._QJ,__wbg_person_unwrap:r.Xv$,__wbg_component_unwrap:r.dT0,__wbg_shape_unwrap:r.D7n,__wbg_diagramelementspec_unwrap:r.W3f,__wbindgen_closure_wrapper2506:r.ONC,__wbindgen_init_externref_table:r.bLn}})},221:e=>{e.exports=require("tw-elements")},334:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.r(t),n.d(t,{MinaReact:()=>d,default:()=>g});var a=n(571),o=n(636),i=n(385),_=n(15),l=n(507),s=n(519),c=n(732),u=e([l,s]);[l,s]=u.then?(await u)():u,(0,i.aC)();const d=e=>{var t;const{projectRootUrl:r,diagramUrl:i,ghToken:u}=e;(0,o.T_)({initTE:async function(){const{initTE:e,Dropdown:t}=await Promise.resolve().then(n.t.bind(n,221,23));await e({Dropdown:t})}});const d=(0,_.useRef)(null),[g,p]=(0,_.useState)(),[b,f]=(0,_.useState)(),[m,w]=(0,_.useState)(),h={onOpenDiagramClick:e=>{let t;try{t=(0,s.qjW)(r,e)}catch(e){console.error(e),y("Invalid URL: the provided URL is an invalid Mina project or diagram.")}t&&v(t)},onOpenExternalLinkClick:e=>{window.open(e,"_blank")}};function y(e){p(null),w(e)}async function v(e){var t,n,a,o;let i;null==(t=d.current)||t.resetCanvas();try{i=await(0,l.wS)(r,e,u)}catch(e){const t=e;if(!(t.message&&t.message.replace(/ /g,"").length>0))throw new Error;y(t.message)}if(null!=(n=i)&&n.projectSettingsJson&&null!=(a=i)&&a.plantuml&&null!=(o=i)&&o.spec)try{f(JSON.parse(i.projectSettingsJson));const t=await(0,s.Oxg)(r,e,i.plantuml,i.spec);p(t)}catch(e){y("Invalid diagram or project settings.")}}(0,_.useEffect)((()=>{y(null),v(i)}),[i,r,u]);return(0,c.jsxs)("div",{className:"h-full w-full border-t flex items-center",children:[(0,c.jsx)(o.rI,{menuItemsProps:[{id:"dropdown-init",label:"",isHeaderMenuItem:!0,subMenuItems:[{id:"dropdown-init-1",label:""}]}],className:"hidden"}),(0,c.jsx)(o.tz,{}),null===m&&g&&(0,c.jsx)(a.D,{diagramListener:h,diagram:g,ref:d,diagramsThemeSettings:null==b||null==(t=b.themes_settings)?void 0:t.diagrams_theme_settings,target:"web",readOnly:!0}),m&&(0,c.jsx)("div",{className:"w-full text-center text-black",children:m})]})},g=d;r()}catch(e){r(e)}}))},385:(e,t,n)=>{n.d(t,{mg:()=>s,Cp:()=>r,qI:()=>g,aC:()=>b,l:()=>u,$r:()=>l,cr:()=>p,wF:()=>d,x4:()=>c});const r=(e={})=>Object.keys(e).reduce(((t,n)=>(n.startsWith("data-")&&(t[n]=e[n]),t)),{}),a=require("fast-deep-equal/es6/react");var o=n.n(a);const i=require("lodash.clonedeep");var _=n.n(i);const l=(e,t)=>o()(e,t),s=e=>_()(e);function c(e){return e?e.replace(/\\n/g,"\n").replace(/\\t/g," ").replace(/\\r/g,"\n"):void 0}function u(e){return e.sort(((e,t)=>t.length-e.length))[0]}function d(e,t=96){return Number.parseFloat((e/t).toFixed(2))}function g(e,t=96){return Number.parseFloat((e*t).toFixed(2))}function p(e,t=96){return Number.parseFloat((e*(t/72)).toFixed(2))}function b(){console.log=()=>{},console.debug=()=>{}}},416:(e,t,n)=>{function r(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}n.d(t,{A:()=>r})},452:e=>{e.exports=require("pluralize")},457:(e,t,n)=>{let r;function a(e){r=e}n.d(t,{$CF:()=>Cn,$Pc:()=>kt,A2$:()=>qt,A2U:()=>at,BFX:()=>vn,BGI:()=>sr,CF8:()=>Rn,CFe:()=>zn,Cjr:()=>ct,D7n:()=>Tn,DMD:()=>Vn,Dn4:()=>Wt,Dr_:()=>We,EkI:()=>St,Evb:()=>Vt,F$t:()=>Pe,FGp:()=>tt,FHK:()=>Se,GQG:()=>Bn,GuA:()=>_r,HBq:()=>dn,HCo:()=>ye,HOd:()=>Et,HSm:()=>ot,HtP:()=>Pt,Hzn:()=>gt,JD7:()=>x,JF5:()=>de,JpR:()=>Ee,KA3:()=>ut,KM7:()=>nn,LCp:()=>Jn,LMq:()=>Yn,Llp:()=>T,Ltb:()=>on,M2:()=>Dt,Moj:()=>it,N9Q:()=>fn,NNx:()=>en,NgT:()=>Zn,NhE:()=>Qn,Nhd:()=>pn,NpJ:()=>tn,ONC:()=>Kn,OtZ:()=>Xt,Oxg:()=>C,PRY:()=>or,Py0:()=>ur,QHd:()=>Ze,QRK:()=>gr,Qg3:()=>qn,Qnr:()=>fr,RCF:()=>$e,RG9:()=>jt,RGi:()=>he,RKz:()=>rt,RR8:()=>Tt,RjG:()=>tr,Ry:()=>yt,SJf:()=>pt,TOc:()=>Pn,Tbm:()=>be,Tp3:()=>Wn,U8c:()=>cr,Vob:()=>Gn,VrZ:()=>Ft,W3f:()=>Ye,WJm:()=>Le,WYM:()=>qe,Wkh:()=>Ke,Wq:()=>ve,WqA:()=>fe,Xb8:()=>Xe,Xv$:()=>$t,Y6F:()=>Mn,YLb:()=>He,Yb6:()=>ft,Yeo:()=>xt,YkQ:()=>ar,Zk3:()=>sn,ZrD:()=>_t,_Cc:()=>R,_QJ:()=>Ut,_Ue:()=>Oe,_Zx:()=>Be,_cl:()=>xn,_hX:()=>yn,_iy:()=>we,_mt:()=>Jt,a4S:()=>En,aIY:()=>It,aKt:()=>hn,bLn:()=>rr,c1W:()=>Zt,c6u:()=>Rt,cVx:()=>pe,cyg:()=>Te,dM0:()=>In,dSQ:()=>ln,dT0:()=>Ae,d_N:()=>me,dzD:()=>nt,e57:()=>Ne,eIr:()=>ht,eW0:()=>mt,ezj:()=>ze,fb$:()=>Nn,fcg:()=>st,gGA:()=>lt,gHg:()=>Ge,gMQ:()=>ge,gRe:()=>Qe,gjJ:()=>dt,gvw:()=>wt,hI8:()=>Mt,heb:()=>zt,iAh:()=>gn,ii7:()=>Ln,ilI:()=>Me,jeC:()=>Ie,jwJ:()=>$n,k2R:()=>Kt,kF0:()=>bn,kK3:()=>Fn,kPb:()=>Fe,kTu:()=>Je,l0x:()=>Sn,lIU:()=>a,lkn:()=>an,m_N:()=>rn,nA9:()=>Gt,o0R:()=>Ve,oGe:()=>Ot,oaw:()=>De,ooJ:()=>Xn,p8e:()=>un,pR9:()=>vt,pWA:()=>Ue,qNE:()=>pr,qe7:()=>Bt,qjW:()=>E,qmw:()=>Un,qre:()=>Dn,qvD:()=>ir,rk2:()=>wn,rl:()=>er,sQY:()=>ke,sWe:()=>dr,tER:()=>Yt,tZf:()=>Qt,ugc:()=>On,uod:()=>bt,uw1:()=>mn,v1k:()=>cn,vUM:()=>lr,vVD:()=>At,va5:()=>Ct,w6e:()=>An,w9h:()=>Ce,wHY:()=>Re,wJz:()=>_n,wd3:()=>Nt,x$X:()=>kn,x0C:()=>jn,x6W:()=>xe,xB8:()=>je,xV_:()=>Hn,ycJ:()=>br,ycy:()=>et,yqB:()=>Ht,z09:()=>Lt,zEy:()=>nr}),e=n.hmd(e);let o=0,i=null;function _(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(r.memory.buffer)),i}let l=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const s="function"==typeof l.encodeInto?function(e,t){return l.encodeInto(e,t)}:function(e,t){const n=l.encode(e);return t.set(n),{read:e.length,written:n.length}};function c(e,t,n){if(void 0===n){const n=l.encode(e),r=t(n.length,1)>>>0;return _().subarray(r,r+n.length).set(n),o=n.length,r}let r=e.length,a=t(r,1)>>>0;const i=_();let c=0;for(;c<r;c++){const t=e.charCodeAt(c);if(t>127)break;i[a+c]=t}if(c!==r){0!==c&&(e=e.slice(c)),a=n(a,r,r=c+3*e.length,1)>>>0;const t=_().subarray(a+c,a+r);c+=s(e,t).written,a=n(a,r,c,1)>>>0}return o=c,a}let u=null;function d(){return(null===u||!0===u.buffer.detached||void 0===u.buffer.detached&&u.buffer!==r.memory.buffer)&&(u=new DataView(r.memory.buffer)),u}let g=new("undefined"==typeof TextDecoder?(0,e.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function p(e,t){return e>>>=0,g.decode(_().subarray(e,e+t))}function b(e){const t=r.__externref_table_alloc();return r.__wbindgen_export_4.set(t,e),t}function f(e,t){try{return e.apply(this,t)}catch(e){const t=b(e);r.__wbindgen_exn_store(t)}}function m(e){return null==e}g.decode();const w="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{r.__wbindgen_export_6.get(e.dtor)(e.a,e.b)}));function h(e){const t=typeof e;if("number"==t||"boolean"==t||null==e)return`${e}`;if("string"==t)return`"${e}"`;if("symbol"==t){const t=e.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=e.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(e)){const t=e.length;let n="[";t>0&&(n+=h(e[0]));for(let r=1;r<t;r++)n+=", "+h(e[r]);return n+="]",n}const n=/\[object ([^\]]+)\]/.exec(toString.call(e));let r;if(!(n&&n.length>1))return toString.call(e);if(r=n[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(e){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function y(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function v(e,t){e>>>=0;const n=d(),a=[];for(let o=e;o<e+4*t;o+=4)a.push(r.__wbindgen_export_4.get(n.getUint32(o,!0)));return r.__externref_drop_slice(e,t),a}function O(e,t){const n=t(4*e.length,4)>>>0;for(let t=0;t<e.length;t++){const r=b(e[t]);d().setUint32(n+4*t,r,!0)}return o=e.length,n}function S(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function E(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_url_from_link_string(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,S(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function x(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_spec_url_from_diagram_url(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,S(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function T(e,t){let n,a;try{const l=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_plantuml_url_from_diagram_url(l,s,u,d);var i=g[0],_=g[1];if(g[3])throw i=0,_=0,S(g[2]);return n=i,a=_,p(i,_)}finally{r.__wbindgen_free(n,a,1)}}function R(e){let t,n;try{const a=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o,_=r.project_settings_url(a,i);return t=_[0],n=_[1],p(_[0],_[1])}finally{r.__wbindgen_free(t,n,1)}}function C(e,t,n,a){const i=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,l=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),s=o,u=c(n,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=c(a,r.__wbindgen_malloc,r.__wbindgen_realloc),p=o;return r.open_remote_diagram(i,_,l,s,u,d,g,p)}function I(e,t,n){r.closure411_externref_shim(e,t,n)}const D=["omit","same-origin","include"],k=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_aisettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_addelementtag_free(e>>>0,1)));const L="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_baseelement_free(e>>>0,1)));class A{static __wrap(e){e>>>=0;const t=Object.create(A.prototype);return t.__wbg_ptr=e,L.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,L.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_baseelement_free(e,0)}get alias(){const e=r.__wbg_get_baseelement_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_alias(this.__wbg_ptr,t,n)}get label(){const e=r.__wbg_get_baseelement_label(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set label(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_label(this.__wbg_ptr,t,n)}get description(){const e=r.__wbg_get_baseelement_description(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set description(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_description(this.__wbg_ptr,t,n)}get sprite(){const e=r.__wbg_get_baseelement_sprite(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set sprite(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_sprite(this.__wbg_ptr,t,n)}get tags(){const e=r.__wbg_get_baseelement_tags(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set tags(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_tags(this.__wbg_ptr,t,n)}get link(){const e=r.__wbg_get_baseelement_link(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set link(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_link(this.__wbg_ptr,t,n)}get uuid(){const e=r.__wbg_get_baseelement_uuid(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set uuid(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_uuid(this.__wbg_ptr,t,n)}get notes(){const e=r.__wbg_get_baseelement_notes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set notes(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_baseelement_notes(this.__wbg_ptr,t,n)}}const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_boundary_free(e>>>0,1)));class j{static __wrap(e){e>>>=0;const t=Object.create(j.prototype);return t.__wbg_ptr=e,N.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof j?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_boundary_free(e,0)}get base_data(){const e=r.__wbg_get_boundary_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_boundary_base_data(this.__wbg_ptr,t)}get boundary_type(){return r.__wbg_get_boundary_boundary_type(this.__wbg_ptr)}set boundary_type(e){r.__wbg_set_boundary_boundary_type(this.__wbg_ptr,m(e)?0:b(e))}get boundary_custom_type(){const e=r.__wbg_get_boundary_boundary_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set boundary_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_boundary_boundary_custom_type(this.__wbg_ptr,t,n)}get sub_elements(){const e=r.__wbg_get_boundary_sub_elements(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_boundary_sub_elements(this.__wbg_ptr,t,n)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_c4elements_free(e>>>0,1)));const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_component_free(e>>>0,1)));class M{static __wrap(e){e>>>=0;const t=Object.create(M.prototype);return t.__wbg_ptr=e,F.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof M?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,F.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_component_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_component_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_component_technology(this.__wbg_ptr,t,n)}get component_type(){return r.__wbg_get_component_component_type(this.__wbg_ptr)}set component_type(e){r.__wbg_set_component_component_type(this.__wbg_ptr,m(e)?0:b(e))}}const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_container_free(e>>>0,1)));class z{static __wrap(e){e>>>=0;const t=Object.create(z.prototype);return t.__wbg_ptr=e,P.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_container_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_container_base_data(this.__wbg_ptr,t)}get technology(){const e=r.__wbg_get_container_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_container_technology(this.__wbg_ptr,t,n)}get container_type(){return r.__wbg_get_container_container_type(this.__wbg_ptr)}set container_type(e){r.__wbg_set_container_container_type(this.__wbg_ptr,m(e)?0:b(e))}}const B="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_deploymentnode_free(e>>>0,1)));class H{static __wrap(e){e>>>=0;const t=Object.create(H.prototype);return t.__wbg_ptr=e,B.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof H?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,B.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_deploymentnode_free(e,0)}get base_data(){const e=r.__wbg_get_deploymentnode_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_deploymentnode_base_data(this.__wbg_ptr,t)}get deploymeny_node_custom_type(){const e=r.__wbg_get_deploymentnode_deploymeny_node_custom_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set deploymeny_node_custom_type(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_addelementtag_legend_sprite(this.__wbg_ptr,t,n)}get deployment_node_type(){return r.__wbg_get_deploymentnode_deployment_node_type(this.__wbg_ptr)}set deployment_node_type(e){r.__wbg_set_deploymentnode_deployment_node_type(this.__wbg_ptr,m(e)?0:b(e))}get sub_elements(){const e=r.__wbg_get_deploymentnode_sub_elements(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set sub_elements(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_deploymentnode_sub_elements(this.__wbg_ptr,t,n)}}const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagram_free(e>>>0,1)));class Y{static __wrap(e){e>>>=0;const t=Object.create(Y.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagram_free(e,0)}get diagram_name(){const e=r.__wbg_get_diagram_diagram_name(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set diagram_name(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_diagram_name(this.__wbg_ptr,t,n)}get diagram_type(){return r.__wbg_get_diagram_diagram_type(this.__wbg_ptr)}set diagram_type(e){r.__wbg_set_diagram_diagram_type(this.__wbg_ptr,m(e)?0:b(e))}get diagram_spec(){const e=r.__wbg_get_diagram_diagram_spec(this.__wbg_ptr);return 0===e?void 0:q.__wrap(e)}set diagram_spec(e){let t=0;m(e)||(y(e,q),t=e.__destroy_into_raw()),r.__wbg_set_diagram_diagram_spec(this.__wbg_ptr,t)}get diagram_plantuml(){const e=r.__wbg_get_diagram_diagram_plantuml(this.__wbg_ptr);return 0===e?void 0:G.__wrap(e)}set diagram_plantuml(e){let t=0;m(e)||(y(e,G),t=e.__destroy_into_raw()),r.__wbg_set_diagram_diagram_plantuml(this.__wbg_ptr,t)}get raw_plantuml(){const e=r.__wbg_get_diagram_raw_plantuml(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set raw_plantuml(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_raw_plantuml(this.__wbg_ptr,t,n)}get last_modified(){const e=r.__wbg_get_diagram_last_modified(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set last_modified(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagram_last_modified(this.__wbg_ptr,t,n)}get auto_layout_errors(){const e=r.__wbg_get_diagram_auto_layout_errors(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set auto_layout_errors(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagram_auto_layout_errors(this.__wbg_ptr,t,n)}get auto_layout(){return r.diagram_auto_layout(this.__wbg_ptr)}set auto_layout(e){r.diagram_set_auto_layout(this.__wbg_ptr,e)}}const X="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramelementspec_free(e>>>0,1)));class Z{static __wrap(e){e>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=e,X.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof Z?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,X.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramelementspec_free(e,0)}get alias(){const e=r.__wbg_get_diagramelementspec_alias(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set alias(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_alias(this.__wbg_ptr,t,n)}get from(){const e=r.__wbg_get_diagramelementspec_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_from(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_diagramelementspec_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramelementspec_to(this.__wbg_ptr,t,n)}get shapes(){const e=r.__wbg_get_diagramelementspec_shapes(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set shapes(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_shapes(this.__wbg_ptr,t,n)}get element_type(){return r.__wbg_get_diagramelementspec_element_type(this.__wbg_ptr)}set element_type(e){r.__wbg_set_diagramelementspec_element_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_diagramelementspec_position(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set position(e){let t=0;m(e)||(y(e,re),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_diagramelementspec_size(this.__wbg_ptr);return 0===e?void 0:se.__wrap(e)}set size(e){let t=0;m(e)||(y(e,se),t=e.__destroy_into_raw()),r.__wbg_set_diagramelementspec_size(this.__wbg_ptr,t)}get inner_specs(){const e=r.__wbg_get_diagramelementspec_inner_specs(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set inner_specs(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramelementspec_inner_specs(this.__wbg_ptr,t,n)}}const $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramplantuml_free(e>>>0,1)));class G{static __wrap(e){e>>>=0;const t=Object.create(G.prototype);return t.__wbg_ptr=e,$.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramplantuml_free(e,0)}get tags(){return r.diagramplantuml_tags(this.__wbg_ptr)}set tags(e){r.diagramplantuml_set_tags(this.__wbg_ptr,e)}get diagram_id(){const e=r.__wbg_get_diagramplantuml_diagram_id(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set diagram_id(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramplantuml_diagram_id(this.__wbg_ptr,t,n)}get elements(){const e=r.__wbg_get_diagramplantuml_elements(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set elements(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramplantuml_elements(this.__wbg_ptr,t,n)}get aliases(){const e=r.__wbg_get_diagramplantuml_aliases(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set aliases(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramplantuml_aliases(this.__wbg_ptr,t,n)}}const U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramspec_free(e>>>0,1)));class q{static __wrap(e){e>>>=0;const t=Object.create(q.prototype);return t.__wbg_ptr=e,U.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,U.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_diagramspec_free(e,0)}get uuid(){let e,t;try{const n=r.__wbg_get_diagramspec_uuid(this.__wbg_ptr);return e=n[0],t=n[1],p(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set uuid(e){const t=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramspec_uuid(this.__wbg_ptr,t,n)}get description(){const e=r.__wbg_get_diagramspec_description(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set description(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_diagramspec_description(this.__wbg_ptr,t,n)}get tags(){const e=r.__wbg_get_diagramspec_tags(this.__wbg_ptr);let t;return 0!==e[0]&&(t=v(e[0],e[1]).slice(),r.__wbindgen_free(e[0],4*e[1],4)),t}set tags(e){var t=m(e)?0:O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_tags(this.__wbg_ptr,t,n)}get elements_specs(){const e=r.__wbg_get_diagramspec_elements_specs(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set elements_specs(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_elements_specs(this.__wbg_ptr,t,n)}get shapes(){const e=r.__wbg_get_diagramspec_shapes(this.__wbg_ptr);var t=v(e[0],e[1]).slice();return r.__wbindgen_free(e[0],4*e[1],4),t}set shapes(e){const t=O(e,r.__wbindgen_malloc),n=o;r.__wbg_set_diagramspec_shapes(this.__wbg_ptr,t,n)}get auto_layout_enabled(){return 0!==r.__wbg_get_diagramspec_auto_layout_enabled(this.__wbg_ptr)}set auto_layout_enabled(e){r.__wbg_set_diagramspec_auto_layout_enabled(this.__wbg_ptr,e)}get auto_layout_orientation(){return r.__wbg_get_diagramspec_auto_layout_orientation(this.__wbg_ptr)}set auto_layout_orientation(e){r.__wbg_set_diagramspec_auto_layout_orientation(this.__wbg_ptr,e)}get auto_layout_only_straight_arrows(){return 0!==r.__wbg_get_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr)}set auto_layout_only_straight_arrows(e){r.__wbg_set_diagramspec_auto_layout_only_straight_arrows(this.__wbg_ptr,e)}get auto_layout_ranksep(){return r.__wbg_get_diagramspec_auto_layout_ranksep(this.__wbg_ptr)}set auto_layout_ranksep(e){r.__wbg_set_diagramspec_auto_layout_ranksep(this.__wbg_ptr,e)}get auto_layout_subgraph_inner_margin(){return r.__wbg_get_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr)}set auto_layout_subgraph_inner_margin(e){r.__wbg_set_diagramspec_auto_layout_subgraph_inner_margin(this.__wbg_ptr,e)}get auto_layout_subgraph_outer_margin(){return r.__wbg_get_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr)}set auto_layout_subgraph_outer_margin(e){r.__wbg_set_diagramspec_auto_layout_subgraph_outer_margin(this.__wbg_ptr,e)}get grid_enabled(){return 0!==r.__wbg_get_diagramspec_grid_enabled(this.__wbg_ptr)}set grid_enabled(e){r.__wbg_set_diagramspec_grid_enabled(this.__wbg_ptr,e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramsthemesettings_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_elementdata_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_hookpayload_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingbytesource_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsink_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_intounderlyingsource_free(e>>>0,1)));const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_minaerror_free(e>>>0,1)));class Q{static __wrap(e){e>>>=0;const t=Object.create(Q.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_minaerror_free(e,0)}get code(){return r.__wbg_get_minaerror_code(this.__wbg_ptr)}set code(e){r.__wbg_set_minaerror_code(this.__wbg_ptr,e)}get msg(){let e,t;try{const n=r.__wbg_get_minaerror_msg(this.__wbg_ptr);return e=n[0],t=n[1],p(n[0],n[1])}finally{r.__wbindgen_free(e,t,1)}}set msg(e){const t=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_minaerror_msg(this.__wbg_ptr,t,n)}}const J="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_person_free(e>>>0,1)));class K{static __wrap(e){e>>>=0;const t=Object.create(K.prototype);return t.__wbg_ptr=e,J.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof K?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_person_free(e,0)}get base_data(){const e=r.__wbg_get_component_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_component_base_data(this.__wbg_ptr,t)}get person_type(){return r.__wbg_get_person_person_type(this.__wbg_ptr)}set person_type(e){r.__wbg_set_person_person_type(this.__wbg_ptr,m(e)?0:b(e))}}const ee="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_point_free(e>>>0,1)));class te{static __wrap(e){e>>>=0;const t=Object.create(te.prototype);return t.__wbg_ptr=e,ee.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof te?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ee.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_point_free(e,0)}get x(){return r.__wbg_get_point_x(this.__wbg_ptr)}set x(e){r.__wbg_set_point_x(this.__wbg_ptr,e)}get y(){return r.__wbg_get_point_y(this.__wbg_ptr)}set y(e){r.__wbg_set_point_y(this.__wbg_ptr,e)}}const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_position_free(e>>>0,1)));class re{static __wrap(e){e>>>=0;const t=Object.create(re.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_position_free(e,0)}get left(){const e=r.__wbg_get_position_left(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set left(e){r.__wbg_set_position_left(this.__wbg_ptr,!m(e),m(e)?0:e)}get top(){const e=r.__wbg_get_position_top(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set top(e){r.__wbg_set_position_top(this.__wbg_ptr,!m(e),m(e)?0:e)}get z_index(){const e=r.__wbg_get_position_z_index(this.__wbg_ptr);return 4294967297===e?void 0:e}set z_index(e){r.__wbg_set_position_z_index(this.__wbg_ptr,m(e)?4294967297:0|e)}get angle(){const e=r.__wbg_get_position_angle(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set angle(e){r.__wbg_set_position_angle(this.__wbg_ptr,!m(e),m(e)?0:e)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_project_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectlibrary_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_projectsettings_free(e>>>0,1)));const ae="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_relationship_free(e>>>0,1)));class oe{static __wrap(e){e>>>=0;const t=Object.create(oe.prototype);return t.__wbg_ptr=e,ae.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof oe?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ae.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_relationship_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_container_base_data(this.__wbg_ptr,t)}get from(){const e=r.__wbg_get_relationship_from(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set from(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_container_technology(this.__wbg_ptr,t,n)}get to(){const e=r.__wbg_get_relationship_to(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set to(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_boundary_boundary_custom_type(this.__wbg_ptr,t,n)}get technology(){const e=r.__wbg_get_relationship_technology(this.__wbg_ptr);let t;return 0!==e[0]&&(t=p(e[0],e[1]).slice(),r.__wbindgen_free(e[0],1*e[1],1)),t}set technology(e){var t=m(e)?0:c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),n=o;r.__wbg_set_relationship_technology(this.__wbg_ptr,t,n)}get relationship_type(){return r.__wbg_get_relationship_relationship_type(this.__wbg_ptr)}set relationship_type(e){r.__wbg_set_relationship_relationship_type(this.__wbg_ptr,m(e)?0:b(e))}}const ie="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_shape_free(e>>>0,1)));class _e{static __wrap(e){e>>>=0;const t=Object.create(_e.prototype);return t.__wbg_ptr=e,ie.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof _e?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ie.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_shape_free(e,0)}get shape_type(){return r.__wbg_get_shape_shape_type(this.__wbg_ptr)}set shape_type(e){r.__wbg_set_shape_shape_type(this.__wbg_ptr,m(e)?0:b(e))}get position(){const e=r.__wbg_get_shape_position(this.__wbg_ptr);return 0===e?void 0:re.__wrap(e)}set position(e){let t=0;m(e)||(y(e,re),t=e.__destroy_into_raw()),r.__wbg_set_shape_position(this.__wbg_ptr,t)}get size(){const e=r.__wbg_get_shape_size(this.__wbg_ptr);return 0===e?void 0:se.__wrap(e)}set size(e){let t=0;m(e)||(y(e,se),t=e.__destroy_into_raw()),r.__wbg_set_shape_size(this.__wbg_ptr,t)}}const le="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_size_free(e>>>0,1)));class se{static __wrap(e){e>>>=0;const t=Object.create(se.prototype);return t.__wbg_ptr=e,le.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,le.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_size_free(e,0)}get width(){const e=r.__wbg_get_size_width(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set width(e){r.__wbg_set_size_width(this.__wbg_ptr,!m(e),m(e)?0:e)}get height(){const e=r.__wbg_get_size_height(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set height(e){r.__wbg_set_size_height(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_x(){const e=r.__wbg_get_size_scale_x(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_x(e){r.__wbg_set_size_scale_x(this.__wbg_ptr,!m(e),m(e)?0:e)}get scale_y(){const e=r.__wbg_get_size_scale_y(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}set scale_y(e){r.__wbg_set_size_scale_y(this.__wbg_ptr,!m(e),m(e)?0:e)}}const ce="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_softwaresystem_free(e>>>0,1)));class ue{static __wrap(e){e>>>=0;const t=Object.create(ue.prototype);return t.__wbg_ptr=e,ce.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof ue?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ce.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_softwaresystem_free(e,0)}get base_data(){const e=r.__wbg_get_softwaresystem_base_data(this.__wbg_ptr);return A.__wrap(e)}set base_data(e){y(e,A);var t=e.__destroy_into_raw();r.__wbg_set_softwaresystem_base_data(this.__wbg_ptr,t)}get system_type(){return r.__wbg_get_softwaresystem_system_type(this.__wbg_ptr)}set system_type(e){r.__wbg_set_softwaresystem_system_type(this.__wbg_ptr,m(e)?0:b(e))}}function de(e,t){const n=c(String(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function ge(e){e.abort()}function pe(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function be(){return f((function(e,t,n,r,a){e.append(p(t,n),p(r,a))}),arguments)}function fe(){return f((function(e,t,n,r,a,o){e.append(p(t,n),r,p(a,o))}),arguments)}function me(){return f((function(e,t,n,r){e.append(p(t,n),r)}),arguments)}function we(){return f((function(e){return e.arrayBuffer()}),arguments)}function he(e){return e.arrayBuffer()}function ye(e){return j.__wrap(e)}function ve(e){return j.__unwrap(e)}function Oe(e){return e.buffer}function Se(e){return e.buffer}function Ee(e){const t=e.byobRequest;return m(t)?0:b(t)}function xe(e){return e.byteLength}function Te(e){return e.byteOffset}function Re(){return f((function(e,t){return e.call(t)}),arguments)}function Ce(){return f((function(e,t,n){return e.call(t,n)}),arguments)}function Ie(e){return e.close()}function De(){return f((function(e){e.close()}),arguments)}function ke(){return f((function(e){e.close()}),arguments)}function Le(e){return M.__wrap(e)}function Ae(e){return M.__unwrap(e)}function Ne(e){return z.__wrap(e)}function je(e){return z.__unwrap(e)}function Fe(e,t){return e.createWritable(t)}function Me(e){return e.crypto}function Pe(e){console.debug(e)}function ze(e){return H.__wrap(e)}function Be(e){return H.__unwrap(e)}function He(e){return Y.__wrap(e)}function We(e){return Z.__wrap(e)}function Ye(e){return Z.__unwrap(e)}function Xe(e){return e.done}function Ze(){return f((function(e,t){e.enqueue(t)}),arguments)}function $e(e){return e.entries()}function Ge(e){return Object.entries(e)}function Ue(e){console.error(e)}function qe(e,t){let n,a;try{n=e,a=t,console.error(p(e,t))}finally{r.__wbindgen_free(n,a,1)}}function Ve(e){return fetch(e)}function Qe(e,t){return e.fetch(t)}function Je(e,t,n,r){return e.getDirectoryHandle(p(t,n),r)}function Ke(e,t,n,r){return e.getFileHandle(p(t,n),r)}function et(e){return e.getFile()}function tt(){return f((function(e,t){e.getRandomValues(t)}),arguments)}function nt(){return f((function(e,t){return Reflect.get(e,t)}),arguments)}function rt(e,t){return e[t>>>0]}function at(e,t){return e[t]}function ot(){return f((function(e,t){return Reflect.has(e,t)}),arguments)}function it(e){return e.headers}function _t(e){console.info(e)}function lt(e){let t;try{t=e instanceof ArrayBuffer}catch(e){t=!1}return t}function st(e){let t;try{t=e instanceof Error}catch(e){t=!1}return t}function ct(e){let t;try{t=e instanceof FileSystemDirectoryHandle}catch(e){t=!1}return t}function ut(e){let t;try{t=e instanceof FileSystemFileHandle}catch(e){t=!1}return t}function dt(e){let t;try{t=e instanceof File}catch(e){t=!1}return t}function gt(e){let t;try{t=e instanceof Response}catch(e){t=!1}return t}function pt(e){let t;try{t=e instanceof Uint8Array}catch(e){t=!1}return t}function bt(e){return Array.isArray(e)}function ft(e){return Number.isSafeInteger(e)}function mt(){return Symbol.iterator}function wt(e){return e.lastModified}function ht(e){return e.length}function yt(e){return e.length}function vt(e){console.log(e)}function Ot(e){return e.message}function St(e){return Q.__wrap(e)}function Et(e){return e.msCrypto}function xt(e,t){const n=c(t.name,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Tt(){return f((function(){return new Headers}),arguments)}function Rt(e,t){try{var n={a:e,b:t};const a=new Promise(((e,t)=>{const a=n.a;n.a=0;try{return function(e,t,n,a){r.closure73_externref_shim(e,t,n,a)}(a,n.b,e,t)}finally{n.a=a}}));return a}finally{n.a=n.b=0}}function Ct(){return new Object}function It(){return new Map}function Dt(){return new Array}function kt(){return new Error}function Lt(){return f((function(){return new FormData}),arguments)}function At(e){return new Uint8Array(e)}function Nt(e,t){return new Error(p(e,t))}function jt(){return f((function(){return new AbortController}),arguments)}function Ft(e,t){return new Function(p(e,t))}function Mt(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)}function Pt(e){return new Uint8Array(e>>>0)}function zt(){return f((function(e,t,n){return new Request(p(e,t),n)}),arguments)}function Bt(){return f((function(e,t){return new Blob(e,t)}),arguments)}function Ht(e){return e.next}function Wt(){return f((function(e){return e.next()}),arguments)}function Yt(){return f((function(e){return e.next()}),arguments)}function Xt(e){return e.node}function Zt(e){return K.__wrap(e)}function $t(e){return K.__unwrap(e)}function Gt(e){return te.__wrap(e)}function Ut(e){return te.__unwrap(e)}function qt(){return f((function(e,t){e.postMessage(t)}),arguments)}function Vt(e){return e.process}function Qt(e,t){return e.push(t)}function Jt(e){queueMicrotask(e)}function Kt(e){return e.queueMicrotask}function en(){return f((function(e,t){e.randomFillSync(t)}),arguments)}function tn(e){return oe.__wrap(e)}function nn(e){return oe.__unwrap(e)}function rn(e,t,n){return e.removeEntry(p(t,n))}function an(e,t,n,r){return e.removeEntry(p(t,n),r)}function on(){return f((function(){return e.require}),arguments)}function _n(e){return Promise.resolve(e)}function ln(){return f((function(e,t){e.respond(t>>>0)}),arguments)}function sn(){return f((function(e,t){return e.seek(t)}),arguments)}function cn(e,t,n){e[t]=n}function un(e,t,n){e[t>>>0]=n}function dn(e,t,n){e.set(t,n>>>0)}function gn(e,t,n){return e.set(t,n)}function pn(e,t){e.body=t}function bn(e,t){e.create=0!==t}function fn(e,t){e.create=0!==t}function mn(e,t){e.credentials=D[t]}function wn(e,t){e.headers=t}function hn(e,t){e.keepExistingData=0!==t}function yn(e,t,n){e.method=p(t,n)}function vn(e,t){e.mode=k[t]}function On(e,t){e.recursive=0!==t}function Sn(e,t){e.signal=t}function En(e,t,n){e.type=p(t,n)}function xn(e){return _e.__wrap(e)}function Tn(e){return _e.__unwrap(e)}function Rn(e){return e.signal}function Cn(e){return e.size}function In(e){return ue.__wrap(e)}function Dn(e){return ue.__unwrap(e)}function kn(e,t){const n=c(t.stack,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Ln(){const e=void 0===n.g?null:n.g;return m(e)?0:b(e)}function An(){const e="undefined"==typeof globalThis?null:globalThis;return m(e)?0:b(e)}function Nn(){const e="undefined"==typeof self?null:self;return m(e)?0:b(e)}function jn(){const e="undefined"==typeof window?null:window;return m(e)?0:b(e)}function Fn(e){return e.status}function Mn(){return f((function(e){return JSON.stringify(e)}),arguments)}function Pn(e,t,n){return e.subarray(t>>>0,n>>>0)}function zn(e){return e.text()}function Bn(e,t){return e.then(t)}function Hn(e,t,n){return e.then(t,n)}function Wn(e,t){const n=c(t.url,r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function Yn(e){return e.value}function Xn(e){return e.versions}function Zn(e){const t=e.view;return m(t)?0:b(t)}function $n(e){console.warn(e)}function Gn(){return f((function(e,t){return e.write(t)}),arguments)}function Un(e){return+e}function qn(e){return BigInt.asUintN(64,e)}function Vn(e,t){const n="bigint"==typeof t?t:void 0;d().setBigInt64(e+8,m(n)?BigInt(0):n,!0),d().setInt32(e+0,!m(n),!0)}function Qn(e){return"boolean"==typeof e?e?1:0:2}function Jn(e){const t=e.original;return 1==t.cnt--&&(t.a=0,!0)}function Kn(e,t,n){const a=function(e,t,n,a){const o={a:e,b:t,cnt:1,dtor:412},i=(...e)=>{o.cnt++;const t=o.a;o.a=0;try{return a(t,o.b,...e)}finally{0==--o.cnt?(r.__wbindgen_export_6.get(o.dtor)(t,o.b),w.unregister(o)):o.a=t}};return i.original=o,w.register(i,o,o),i}(e,t,0,I);return a}function er(e,t){const n=c(h(t),r.__wbindgen_malloc,r.__wbindgen_realloc),a=o;d().setInt32(e+4,a,!0),d().setInt32(e+0,n,!0)}function tr(e,t){return new Error(p(e,t))}function nr(e,t){return e in t}function rr(){const e=r.__wbindgen_export_4,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}function ar(e){return"bigint"==typeof e}function or(e){return"function"==typeof e}function ir(e){return"object"==typeof e&&null!==e}function _r(e){return"string"==typeof e}function lr(e){return void 0===e}function sr(e,t){return e===t}function cr(e,t){return e==t}function ur(){return r.memory}function dr(e,t){const n="number"==typeof t?t:void 0;d().setFloat64(e+8,m(n)?0:n,!0),d().setInt32(e+0,!m(n),!0)}function gr(e){return e}function pr(e,t){const n="string"==typeof t?t:void 0;var a=m(n)?0:c(n,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o;d().setInt32(e+4,i,!0),d().setInt32(e+0,a,!0)}function br(e,t){return p(e,t)}function fr(e,t){throw new Error(p(e,t))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_themessettings_free(e>>>0,1)))},489:e=>{e.exports=require("fabric")},507:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{wS:()=>_});var a=n(519),o=e([a]);async function i(e,t){if(t){const n="https://keadex.dev/api/download-gh-raw-file",r={headers:{"Keadex-Gh-Url":e}};return t&&(r.headers["Keadex-Gh-Authorization"]=t),await fetch(n,r)}return await fetch(e)}async function _(e,t,n){let r,o,_;try{r=(0,a._Cc)(e),o=(0,a.Llp)(e,t),_=(0,a.JD7)(e,t)}catch(e){throw console.error(e),new Error("Invalid URL: the provided URL is an invalid Mina project or diagram.")}if(r&&o&&_){let e,t,a;try{const l=await i(r,n),s=await i(o,n),c=await i(_,n);if(l.ok&&s.ok&&c.ok)return e=await l.text(),t=await s.text(),a=await c.text(),{projectSettingsJson:e,plantuml:t,spec:a};throw new Error}catch(e){throw console.error(e),new Error("Diagram or project settings not found. Please verify the URLs provided, or, if linking to a private repository, ensure the GitHub token is configured.")}}}a=(o.then?(await o)():o)[0],r()}catch(l){r(l)}}))},519:(e,t,n)=>{n.a(e,(async(e,r)=>{try{n.d(t,{JD7:()=>o.JD7,Llp:()=>o.Llp,Oxg:()=>o.Oxg,_Cc:()=>o._Cc,qjW:()=>o.qjW});var a=n(196),o=n(457),i=e([a]);a=(i.then?(await i)():i)[0],(0,o.lIU)(a),a.__wbindgen_start(),r()}catch(e){r(e)}}))},571:(e,t,n)=>{n.d(t,{D:()=>tn});var r=n(416);const a=["TopToBottom","LeftToRight"],o=["https://","http://"];let i=function(e){return e.Alias="Alias",e}({});const _="object:modified",l="mouseup",s="modified",c="selected",u="deselected",d="#FFFFFF",g="#000000",p=12,b=10,f=20,m=20,w=120,h=20,y=10,v={SIZES:{DEFAULT_TOP:f+h,DEFAULT_LEFT:m+w+50,BORDER_WIDTH:1},FONT:{FAMILY:"Roboto"}},O={COLORS:{BG_COLOR_SOFTWARE_SYSTEM_PERSON:"#1168BD",BG_COLOR_CONTAINER:"#438DD5",BG_COLOR_COMPONENT:"#85BBF0",BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#686868",BG_COLOR_CONTAINER_EXT:"#999999",BG_COLOR_COMPONENT_EXT:"#CCCCCC",BG_COLOR_BOUNDARY:d,BG_COLOR_DEPLOYMENT_NODE:d,BORDER_COLOR_SOFTWARE_SYSTEM_PERSON:"#0F5BA6",BORDER_COLOR_CONTAINER:"#3E84C7",BORDER_COLOR_COMPONENT:"#7BADDE",BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#525252",BORDER_COLOR_CONTAINER_EXT:"#8A8A8A",BORDER_COLOR_COMPONENT_EXT:"#BDBDBD",BORDER_COLOR_BOUNDARY:"#666666",BORDER_COLOR_DEPLOYMENT_NODE:"#666666",TEXT_COLOR_SOFTWARE_SYSTEM_PERSON:"#FFFFFF",TEXT_COLOR_CONTAINER:"#FFFFFF",TEXT_COLOR_COMPONENT:"#000000",TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT:"#FFFFFF",TEXT_COLOR_CONTAINER_EXT:"#FFFFFF",TEXT_COLOR_COMPONENT_EXT:"#000000",TEXT_COLOR_BOUNDARY:"#333333",TEXT_COLOR_DEPLOYMENT_NODE:"#333333"},SIZES:{WIDTH:220,MIN_HEIGHT:100,PADDING_BOTTOM:15,BORDER_RADIUS:10,TOP_LABEL:20,TOP_TAGS:5,TOP_TYPE_TECHNOLOGY:2,TOP_DESCRIPTION:25,PADDING_Y_DESCRIPTION:10},FONT:{SIZE:14,SIZE_TAG:12,SIZE_TYPE_TECHNOLOGY:12,SIZE_DESCRIPTION:10}},S={SIZES:{SCALE_Y_TAIL_HEAD:.3,HEAD_BOX_WIDTH:20,RADIUS_TAIL_HEAD:O.SIZES.MIN_HEIGHT/2-v.SIZES.BORDER_WIDTH/2,SCALED_RADIUS_TAIL_HEAD:1/0,WIDTH_TAIL:1/0,WIDTH_HEAD:1/0}};S.SIZES.SCALED_RADIUS_TAIL_HEAD=S.SIZES.RADIUS_TAIL_HEAD*S.SIZES.SCALE_Y_TAIL_HEAD,S.SIZES.WIDTH_TAIL=S.SIZES.SCALED_RADIUS_TAIL_HEAD,S.SIZES.WIDTH_HEAD=S.SIZES.HEAD_BOX_WIDTH+S.SIZES.SCALED_RADIUS_TAIL_HEAD;const E={SIZES:{SCALE_X_TOP_BOTTOM:.15,TOP_BOX_HEIGHT:14,RADIUS_TOP_BOTTOM:O.SIZES.WIDTH/2-v.SIZES.BORDER_WIDTH/2,SCALED_RADIUS_TOP_BOTTOM:1/0,WIDTH_TOP:1/0,WIDTH_BOTTOM:1/0}};E.SIZES.SCALED_RADIUS_TOP_BOTTOM=E.SIZES.RADIUS_TOP_BOTTOM*E.SIZES.SCALE_X_TOP_BOTTOM,E.SIZES.WIDTH_TOP=E.SIZES.TOP_BOX_HEIGHT+E.SIZES.SCALED_RADIUS_TOP_BOTTOM,E.SIZES.WIDTH_BOTTOM=E.SIZES.SCALED_RADIUS_TOP_BOTTOM;const x="rgba(0,0,0,0)",T="#828282",R="#404040",C="#ff8f26",I=10,D=10,k=3,L=3,A=9,N=1,j=2,F=90,M=40,P=45,z=10,B=10,H=150,W=80,Y=10,X={SIZES:{STROKE_DASH_ARRAY:[5,5]}},Z={'"dashed"':{name:'"dashed"',value:[8,5]}};var $=n(385);const G=require("change-case");n(452);var U=n(636),q=n(489);function V(e){try{return`Open Link ${new URL(e).host.replace("www.","")}`}catch(e){return"Open Link"}}function Q(e){return`<${e.toString().toUpperCase()}>`}function J(e,t=!0,n){var r,a,o,i;let _,l,s,c;return e.forEach((e=>{if(e.visible){const r=e.getBoundingRect(!1,!0),a=t?e.getBoundingRect(!0,!1):r;let o=a.left,i=a.top;if(n&&o&&i){const e=fabric.util.transformPoint(new fabric.Point(o,i),n);o=e.x,i=e.y}(void 0===_||o<_)&&(_=o),void 0!==o&&void 0!==r.width&&(void 0===l||o+r.width>l)&&(l=o+r.width),(void 0===c||void 0!==i&&i<c)&&(c=i),void 0!==i&&void 0!==r.height&&(void 0===s||r.height+i>s)&&(s=i+r.height)}})),{left:_,right:l,top:c,bottom:s,width:(null!=(r=l)?r:0)-(null!=(a=_)?a:0),height:(null!=(o=s)?o:0)-(null!=(i=c)?i:0)}}function K(e,t){let n=-1;return e&&(n=e.getObjects().indexOf(t)),-1!==n?n:void 0}function ee(e,t,n=Number.MAX_SAFE_INTEGER){let r=n;return t.forEach((t=>{const n=K(e,t);void 0!==n&&n<r&&(r=n)})),r!==Number.MAX_SAFE_INTEGER?r:void 0}function te(e,t=!0){let n=[];return e&&e.forEach((e=>{(e.visible||!e.visible&&t)&&n.push(e),e.children&&(n=n.concat(te(e.children,t)))})),n}function ne(e){let t=0,n=0;if(e){const r=e.viewportTransform;t=r?r[4]:0,n=r?r[5]:0}return{panX:t,panY:n}}function re(e){var t;const n=e.parent,r=function(e){let t=[];const n=new Set;if(e){let r=[];e.forEach((e=>{const t=e.getVirtualGroupRoot();t&&n.add(t)})),n.forEach((e=>{var t;r=r.concat(te(null!=(t=e.children)?t:[],!0))})),t=e.filter((e=>!r.includes(e)))}return{filteredObjects:t,virtualGroupsRoots:n}}(null==(t=e.canvas)?void 0:t.getActiveObjects());let a,o;if(r.filteredObjects.length>0||r.virtualGroupsRoots.size>1){let e=r.filteredObjects;r.virtualGroupsRoots.forEach((t=>{var n;return e=e.concat(te(null!=(n=t.children)?n:[],!1))})),a=e,o="multiple"}else{var i;a=te(null!=(i=null==n?void 0:n.children)?i:[],!1),o="single"}return{objects:a,type:o}}function ae(e,t){var n,r;return(null==e?void 0:e.length)===(null==t?void 0:t.length)&&(null!=(n=null==e?void 0:e.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?n:[]).sort().join(",")===(null!=(r=null==t?void 0:t.map((e=>{var t;return null!=(t=e.name)?t:"undefined"})))?r:[]).sort().join(",")}q.fabric.ActiveSelection.prototype._controlsVisibility={tl:!0,tr:!0,br:!0,bl:!0,ml:!1,mt:!1,mr:!1,mb:!1,mtr:!1},q.fabric.Object.prototype.isVirtualGroupParent=function(){return void 0!==this.children&&this.children.length>0},q.fabric.Object.prototype.isVirtualGroupChild=function(){return void 0!==this.parent},q.fabric.Object.prototype.isVirtualGroupRoot=function(){return this.isVirtualGroupParent()&&void 0===this.parent},q.fabric.Object.prototype.isVirtualGroupLeaf=function(){return this.isVirtualGroupChild()&&!this.isVirtualGroupParent()},q.fabric.Object.prototype.isVirtualGroupBaseShape=function(){return this.isVirtualGroupChild()&&this.parent.children[0]===this},q.fabric.Object.prototype.getVirtualGroupRoot=function(){let e=this.parent;for(;e&&e.parent;)e=e.parent;return e};class oe extends q.fabric.Point{constructor(e,t,n){super(e,t),this.customType=void 0,this.data=void 0,this.customType=n}}class ie extends q.fabric.ActiveSelection{}const _e=e=>"getUpdatedSpecs"in e;class le extends q.fabric.Group{constructor(e,t,n,r,a,o,i,_,s=!1){var c,u,d,g,p,b,f,m,w,h,y;super(a,Object.assign({data:{rawDiagramElementSpec:t,rawData:e,rawAutoLayout:r},name:null!=(c=n.alias)?c:"undefined",left:void 0!==(null==t||null==(u=t.position)?void 0:u.left)?null==t||null==(d=t.position)?void 0:d.left:null==(g=n.position)?void 0:g.left,top:void 0!==(null==t||null==(p=t.position)?void 0:p.top)?null==t||null==(b=t.position)?void 0:b.top:null==(f=n.position)?void 0:f.top,scaleX:void 0!==(null==t||null==(m=t.size)?void 0:m.scale_x)?null==t||null==(w=t.size)?void 0:w.scale_x:1,scaleY:void 0!==(null==t||null==(h=t.size)?void 0:h.scale_y)?null==t||null==(y=t.size)?void 0:y.scale_y:1},o)),this.parent=i,this.children=null!=_?_:[],this.setControlsVisibility({mb:!1,ml:!1,mr:!1,mt:!1,mtr:!1}),s||this.on(l,(e=>{var t;this.onComponentMouseUp(null==(t=e.target)?void 0:t.canvas,e,this)}))}getUpdatedSpecs(){var e,t;null==(e=this.canvas)||e.discardActiveObject();const n=null==(t=this.data)?void 0:t.rawDiagramElementSpec;if(n){var r,a,o,i,_,l,s,c,u,d,g,p,b,f,m,w;const e=(0,$.mg)(n);return e.position={left:null!=(r=this.left)?r:null==(a=n.position)?void 0:a.left,top:null!=(o=this.top)?o:null==(i=n.position)?void 0:i.top,z_index:null!=(_=K(this.canvas,this))?_:null==(l=n.position)?void 0:l.z_index,angle:null!=(s=this.angle)?s:null==(c=n.position)?void 0:c.angle},e.size={width:null!=(u=this.width)?u:null==(d=n.size)?void 0:d.width,height:null!=(g=this.height)?g:null==(p=n.size)?void 0:p.height,scale_x:null!=(b=this.scaleX)?b:null==(f=n.size)?void 0:f.scale_x,scale_y:null!=(m=this.scaleY)?m:null==(w=n.size)?void 0:w.scale_y},e}}onComponentMouseUp(e,t,n,r){if(e)switch(t.e.preventDefault(),t.button){case 3:{e.setActiveObject(n),e.renderAll();const a=e.contextTop,o=q.fabric.util.getPointer(t.e,a.canvas),i=new CustomEvent(U.UW.CONTEXT_MENU,{detail:{sourceEvent:t,pageX:o.x,pageY:o.y,menuItems:null!=r?r:se(e,t,n)}});document.dispatchEvent(i);break}}}}const se=(e,t,n,r=!0)=>{var a,l,s,c;const u=[],d=n instanceof ie?n.parent:n,g=null==d?void 0:d.data,p=null==g||null==(a=g.rawDiagramElementSpec)?void 0:a.element_type,b=null==g||null==(l=g.rawData)||null==(l=l.base_data)||null==(l=l.link)?void 0:l.split(";"),f=e.isReadOnly(),m=e.codingFeaturesEnabled,w=void 0!==p&&b&&b.length>0&&void 0!==(ve(h=p)||me(h)||fe(h)||be(h));var h;let y=0,v=null==d?void 0:d.parent;for(;v;){var O;y++,v=null==(O=v)?void 0:O.parent}return w&&b.forEach(((t,n)=>{const r=t.replace(/ /gi,"");r.length>0&&(function(e){return o.some((t=>e.startsWith(t)))}(r)?u.push({isHeaderMenuItem:!1,id:`openLink${n}`,label:V(r),onClick:()=>{e.diagramListener&&e.diagramListener.onOpenExternalLinkClick(function(e,t){let n=`${e}`;for(const e in i){var r;e===i.Alias.toString()&&n.includes(Q(i.Alias))&&null!=t&&null!=(r=t.base_data)&&r.alias&&(n=n.replace(new RegExp(Q(i.Alias),"gi"),t.base_data.alias))}return n}(r,null==g?void 0:g.rawData))}}):u.push({isHeaderMenuItem:!1,id:"openDiagram",label:"Open Diagram",onClick:()=>{e.diagramListener&&e.diagramListener.onOpenDiagramClick(r)}}))})),m&&null!=g&&g.rawData&&null!=(s=g.rawDiagramElementSpec)&&s.element_type&&u.push({isHeaderMenuItem:!1,id:"selectDiagramElementCode",label:"Select code",onClick:()=>{var t;null!=(t=e.diagramListener)&&t.onSelectElementCode&&e.diagramListener.onSelectElementCode(g.rawData,g.rawDiagramElementSpec.element_type,y)}}),!f&&(w||m&&null!=g&&g.rawData&&null!=(c=g.rawDiagramElementSpec)&&c.element_type)&&u.push({id:"separatorCommon",isSepator:!0}),f||u.push({isHeaderMenuItem:!1,id:"bringToFront",label:"Bring to Front",onClick:()=>{var e;n.bringToFront(),null==(e=n.canvas)||e.fire(_)}},{isHeaderMenuItem:!1,id:"bringForward",label:"Bring Forward",onClick:()=>{var e;n.bringForward(),null==(e=n.canvas)||e.fire(_)}},{isHeaderMenuItem:!1,id:"sentToBack",label:"Send to Back",onClick:()=>ce(n)},{isHeaderMenuItem:!1,id:"sendBackwards",label:"Send Backwards",onClick:()=>ue(n)}),r?[{isHeaderMenuItem:!0,id:"baseComponentContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:u}]:u},ce=e=>{var t;e.parent||(e.sendToBack(),null==(t=e.canvas)||t.fire(_))},ue=e=>{if(e instanceof ie){var t,n,r;const o=e.parent,i=ee(e.canvas,null!=(t=null==o?void 0:o.children)?t:[]),l=ee(e.canvas,null!=(n=null==o||null==(r=o.parent)?void 0:r.children)?n:[]);var a;void 0===l||void 0===i||i-1>l?(e.sendBackwards(),null==(a=e.canvas)||a.fire(_)):console.debug(`cannot send backwards ${i} ${l}`)}else{var o,i;const t=K(e.canvas,e),n=ee(e.canvas,null!=(o=null==(i=e.parent)?void 0:i.children)?o:[]);var l;void 0===n||void 0===t||t-1>n?(e.sendBackwards(),null==(l=e.canvas)||l.fire(_)):console.debug(`cannot send backwards ${t} ${n}`)}},de=(e,t,n,r,a)=>ge(e,t,n,r,a.elements_specs)||pe(e,t,n,r),ge=(e,t,n,r,a)=>{for(let o=0;o<a.length;o++){const i=a[o],_=i.alias===e,l=(0,$.$r)(i.element_type,r);if(_&&l)return i;if(i.inner_specs){const a=i.inner_specs,o=ge(e,t,n,r,a);if(o)return o}}},pe=(e,t,n,r)=>({alias:e,from:t,to:n,element_type:r}),be=e=>{if("Boundary"in e)return e.Boundary},fe=e=>{if("Component"in e)return e.Component},me=e=>{if("Container"in e)return e.Container},we=e=>{if("DeploymentNode"in e)return e.DeploymentNode},he=e=>{if("Person"in e)return e.Person},ye=e=>{if("Relationship"in e)return e.Relationship},ve=e=>{if("SoftwareSystem"in e)return e.SoftwareSystem},Oe=(e,t)=>{var n,r,a;return e&&null!=(n=t[e])&&n.position?{left:null==(r=t[e].position)?void 0:r.x,top:null==(a=t[e].position)?void 0:a.y}:{left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP}};function Se(e){return btoa(e)}const Ee="_margin_hack";function xe(e,t,n){return 2===n.length?n.map(((n,r)=>{const a=0===r?(0,$.qI)(e.x):(0,$.qI)(e.y),o=0===r?n:t-n;return(0,$.cr)(o,Te)+a})):n}const Te=96,Re=(0,$.wF)(v.SIZES.DEFAULT_LEFT),Ce=(0,$.wF)(v.SIZES.DEFAULT_TOP),Ie=4.5;function De(e){const t={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+2*P},n={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT},r={x:O.SIZES.WIDTH+S.SIZES.WIDTH_TAIL+S.SIZES.WIDTH_HEAD,y:O.SIZES.MIN_HEIGHT},a={x:O.SIZES.WIDTH,y:O.SIZES.MIN_HEIGHT+E.SIZES.WIDTH_TOP+E.SIZES.WIDTH_BOTTOM};if(he(e))return t;if(ve(e)){const t=ve(e);return"SystemDb"===t.system_type||"SystemDb_Ext"===t.system_type?a:"SystemQueue"===t.system_type||"SystemQueue_Ext"===t.system_type?r:n}if(me(e)){const t=me(e);return"ContainerDb"===t.container_type||"ContainerDb_Ext"===t.container_type?a:"ContainerQueue"===t.container_type||"ContainerQueue_Ext"===t.container_type?r:n}if(fe(e)){const t=fe(e);return"ComponentDb"===t.component_type||"ComponentDb_Ext"===t.component_type?a:"ComponentQueue"===t.component_type||"ComponentQueue_Ext"===t.component_type?r:n}return{x:100,y:100}}function ke(e,t,n,r,a){return`\n subgraph "${o=e,`${o}${Ee}`}" {\n cluster=true\n margin="${a}"\n fontsize="0pt"\n label=""\n subgraph "${e}" {\n cluster=true\n margin="${r}"\n label=" "\n labelloc="b"\n fontsize="17pt"\n "${e}" [peripheries=0, height=0, width=0, label=""] // invisible node that is used as a workaround to let the connection between nodes and subgraphs\n ${Le(t,n,r,a)}\n }\n }\n `;var o}function Le(e,t,n,r){let a="";for(const _ of e){const e=De(_);let l;if(he(_))l=he(_).base_data.alias;else if(ve(_))l=ve(_).base_data.alias;else if(me(_))l=me(_).base_data.alias;else if(fe(_))l=fe(_).base_data.alias;else if(be(_)){const e=be(_);l=e.base_data.alias,l&&(t.add(l),a=a.concat(ke(l,e.sub_elements,t,n,r))),l=void 0}else if(we(_)){const e=we(_);l=e.base_data.alias,l&&(t.add(l),a=a.concat(ke(l,e.sub_elements,t,n,r))),l=void 0}else if(ye(_)){const e=ye(_);var o,i;e.from&&e.to&&(a=a.concat(`\n"${e.from}" -> "${e.to}" [name="${e.base_data.alias}", label="${(0,$.l)([null!=(o=e.base_data.label)?o:"",null!=(i=e.technology)?i:""])}", ltail="${e.from}", lhead="${e.to}", fontsize="${I}", keadex_fromissubgraph=${t.has(e.from)}, keadex_toissubgraph=${t.has(e.to)}]`)),l=void 0}l&&(a=a.concat(`\n"${l}" [width=${(0,$.wF)(e.x,Te)}, height=${(0,$.wF)(e.y,Te)}, peripheries=2]`))}return a}const Ae=require("@hpcc-js/wasm-graphviz"),Ne=require("react-toastify");function je(e){if(e)return Z[e]}const Fe="legend",Me=(e,t,n,r,a,o)=>{var i,_,l;const s=[],c=n?1:0,u=new q.fabric.Rect({fill:t,stroke:n,strokeWidth:c,strokeDashArray:r,left:m,top:f+h*o,width:w-c,height:h-c});s.push(u);const d=new q.fabric.Text(e,{fill:a,fontFamily:v.FONT.FAMILY,fontSize:b,fontWeight:"normal",textAlign:"left",originX:"left",originY:"top",left:m+y});return d.top=(null!=(i=u.top)?i:0)+(null!=(_=u.height)?_:0)/2-(null!=(l=d.height)?l:0)/2,s.push(d),s},Pe=(e,t)=>{var n,r,a,o,i,_,l,s,c,u,d,b,w,h,y,S,E,x,T,R,C,I,D,k,L,A,N,j,F,M,P,z,B,H;let W=[];const Y=new q.fabric.Text("LEGEND",{fill:g,fontFamily:v.FONT.FAMILY,fontSize:p,fontWeight:"bold",textAlign:"left",originX:"left",originY:"top",left:m,top:f});W.push(Y),W=W.concat(Me("Person",null!=(n=null==t||null==(r=t.diagramsThemeSettings)?void 0:r.bg_color_person)?n:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(a=null==t||null==(o=t.diagramsThemeSettings)?void 0:o.text_color_person)?a:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,1)),W=W.concat(Me("Person External",null!=(i=null==t||null==(_=t.diagramsThemeSettings)?void 0:_.bg_color_person_ext)?i:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(l=null==t||null==(s=t.diagramsThemeSettings)?void 0:s.text_color_person_ext)?l:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,2)),W=W.concat(Me("System",null!=(c=null==t||null==(u=t.diagramsThemeSettings)?void 0:u.bg_color_software_system)?c:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,void 0,void 0,null!=(d=null==t||null==(b=t.diagramsThemeSettings)?void 0:b.text_color_software_system)?d:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON,3)),W=W.concat(Me("System External",null!=(w=null==t||null==(h=t.diagramsThemeSettings)?void 0:h.bg_color_software_system_ext)?w:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,void 0,void 0,null!=(y=null==t||null==(S=t.diagramsThemeSettings)?void 0:S.text_color_software_system_ext)?y:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,4)),W=W.concat(Me("Container",null!=(E=null==t||null==(x=t.diagramsThemeSettings)?void 0:x.bg_color_container)?E:O.COLORS.BG_COLOR_CONTAINER,void 0,void 0,null!=(T=null==t||null==(R=t.diagramsThemeSettings)?void 0:R.text_color_container)?T:O.COLORS.TEXT_COLOR_CONTAINER,5)),W=W.concat(Me("Container External",null!=(C=null==t||null==(I=t.diagramsThemeSettings)?void 0:I.bg_color_container_ext)?C:O.COLORS.BG_COLOR_CONTAINER_EXT,void 0,void 0,null!=(D=null==t||null==(k=t.diagramsThemeSettings)?void 0:k.text_color_container_ext)?D:O.COLORS.TEXT_COLOR_CONTAINER_EXT,6)),W=W.concat(Me("Component",null!=(L=null==t||null==(A=t.diagramsThemeSettings)?void 0:A.bg_color_component)?L:O.COLORS.BG_COLOR_COMPONENT,void 0,void 0,null!=(N=null==t||null==(j=t.diagramsThemeSettings)?void 0:j.text_color_component)?N:O.COLORS.TEXT_COLOR_COMPONENT,7)),W=W.concat(Me("Component External",null!=(F=null==t||null==(M=t.diagramsThemeSettings)?void 0:M.bg_color_component_ext)?F:O.COLORS.BG_COLOR_COMPONENT_EXT,void 0,void 0,null!=(P=null==t||null==(z=t.diagramsThemeSettings)?void 0:z.text_color_component_ext)?P:O.COLORS.TEXT_COLOR_COMPONENT_EXT,8));let X=8;var Z,$,G,U;null!=t&&null!=(B=t.diagramsThemeSettings)&&B.bg_color_boundary&&(X++,W=W.concat(Me("Boundary",t.diagramsThemeSettings.bg_color_boundary,void 0,void 0,null!=(Z=null==t||null==($=t.diagramsThemeSettings)?void 0:$.text_color_boundary)?Z:O.COLORS.TEXT_COLOR_BOUNDARY,X))),null!=t&&null!=(H=t.diagramsThemeSettings)&&H.bg_color_deployment_node&&(X++,W=W.concat(Me("Deployment Node",t.diagramsThemeSettings.bg_color_deployment_node,void 0,void 0,null!=(G=null==t||null==(U=t.diagramsThemeSettings)?void 0:U.text_color_deployment_node)?G:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE,X))),null!=t&&t.tags&&Object.entries(t.tags).forEach((([e,t],n)=>{var r,a,o,i,_;X++,W=W.concat(Me(null!=(r=null!=(a=t.legend_text)?a:t.tag)?r:"<no tag>",t.bg_color,null!=(o=t.border_color)?o:t.bg_color?void 0:"black",null==(i=je(t.border_style))?void 0:i.value,null!=(_=t.font_color)?_:"black",X))}));return new le(void 0,e,{alias:Fe,position:{left:m,top:f}},{},W)},ze="The diagram contains too many elements and relationships, which may cause the auto layout to break. Try adjusting auto layout settings like orientation, ranksep or subgraph margins.",Be="Graphviz not initialized. Cannot generate auto layout.",He="triangulation failed";var We=n(177);function Ye(e){return null==e?void 0:e.split("+")}function Xe(e,t){if(e&&t){const n=[];for(const r of e){const e=t[Se(r)];e&&n.push(e)}if(n.length>0)return Object.assign({},...n)}}let Ze=function(e){return e.Rectangle="RECTANGLE",e.Footer="FOOTER",e}({});class $e extends le{getUpdatedSpecs(){const e=super.getUpdatedSpecs();var t;if(e&&(null==(t=this.canvas)||t.discardActiveObject(),delete e.position,delete e.size,e.inner_specs=[],e.shapes=[],this.children))for(const t of this.children)if(_e(t)){const n=t.getUpdatedSpecs();n&&e.inner_specs.push(n)}else if(t.name!==Ze.Footer){var n,r;e.shapes.push({position:{left:t.left,top:t.top,z_index:K(t.canvas,t)},size:{scale_x:null!=(n=t.scaleX)?n:1,scale_y:null!=(r=t.scaleY)?r:1},shape_type:t.name})}else e.shapes.push({position:{z_index:K(t.canvas,t)},shape_type:t.name});return e}}const Ge=e=>{var t,n,r,a,o,i,_,l,s,c,u;let d,g;const p=(null==(t=e.data)||null==(t=t.rawData)||null==(t=t.base_data)?void 0:t.alias)&&e.data.rawAutoLayout&&void 0!==e.data.rawAutoLayout[e.data.rawData.base_data.alias],b=[];null==(n=e.children)||n.forEach((e=>{e.name===Ze.Footer?g=e:e.name===Ze.Rectangle?d=e:b.push(e)}));const f=J(te(b),!1),m=null!=(r=null==(a=d)?void 0:a.scaleX)?r:1,w=null!=(o=null==(i=d)?void 0:i.scaleY)?o:1,h=null!=(_=null==(l=d)||null==(l=l.canvas)?void 0:l.getZoom())?_:1,y=ne(e.canvas),v=Y*m,O=Y*w,S=Y*m,E=Y*w;var x;d&&void 0!==f.left&&void 0!==f.right&&void 0!==f.top&&void 0!==f.bottom&&void 0!==f.width&&void 0!==f.height&&void 0!==g?(f.left=(f.left-y.panX)/h,f.top=(f.top-y.panY)/h,f.right=(f.right-y.panX)/h,f.bottom=(f.bottom-y.panY)/h,f.width=f.right-f.left,f.height=f.bottom-f.top,p||(d.width=f.width/m+v/m*2,d.height=f.height/w+O/w*3+(null!=(x=g.height)?x:0),d.left=f.left-v,d.top=f.top-O)):d&&void 0!==g&&(d.width=H,d.height=W+g.getScaledHeight()),null==(s=e.canvas)||s.renderAll(),d&&g&&void 0!==d.left&&void 0!==d.top&&void 0!==d.height&&void 0!==g.height&&(g.top=d.top+d.getScaledHeight()-g.getScaledHeight()-E,g.left=d.left+S),null==(c=d)||c.setCoords(),null==(u=g)||u.setCoords()},Ue=e=>{e.on(c,(t=>{Ve(t,e)}))},qe=e=>{e.on(c,(t=>{Ve(t,e)}))},Ve=(e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=n,r.on(l,(e=>{Je(r.canvas,e,r,n)})),r.on(s,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(s)}))),null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}},Qe=(e,t)=>{e&&t&&Ge(e)},Je=(e,t,n,r)=>{n instanceof q.fabric.ActiveSelection&&e&&r.onComponentMouseUp(e,t,n,((e,t,n)=>n instanceof q.fabric.ActiveSelection?[{isHeaderMenuItem:!0,id:"baseElasticContainerContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[...se(e,t,n,!1)]}]:[])(e,t,n))},Ke=(e,t,n,r,a,o)=>{var i,_;const l=Xe(Ye(null==(i=e.base_data)?void 0:i.tags),null==o?void 0:o.tags),c={alias:null==(_=e.base_data)?void 0:_.alias},u=new $e(e,t,c,r,[],void 0,void 0,void 0,!0);u.visible=!1;const d=((e,t,n,r,a)=>{var o,i,_,l,s,c,u,d,g,p,b,f;const m=null==e||null==(o=e.shapes)?void 0:o.filter((e=>e.shape_type===Ze.Rectangle))[0],w=new q.fabric.Rect({fill:null!=(i=null==a?void 0:a.bg_color)?i:n.bgColor,stroke:null!=(_=null==a?void 0:a.border_color)?_:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,strokeDashArray:n.strokeDashArray,left:null!=(l=null==m||null==(s=m.position)?void 0:s.left)?l:Oe(e.alias,t).left,top:null!=(c=null==m||null==(u=m.position)?void 0:u.top)?c:Oe(e.alias,t).top,name:Ze.Rectangle,rx:O.SIZES.BORDER_RADIUS,ry:O.SIZES.BORDER_RADIUS,scaleX:null!=(d=null==m||null==(g=m.size)?void 0:g.scale_x)?d:1,scaleY:null!=(p=null==m||null==(b=m.size)?void 0:b.scale_y)?p:1}),h=((e,t)=>{var n,r,a;if(e&&null!=(n=t[e])&&n.size)return{width:null==(r=t[e].size)?void 0:r.x,height:null==(a=t[e].size)?void 0:a.y}})(e.alias,t);return h&&(w.width=h.width,w.height=h.height),w.data={rawDiagramElementSpec:m},w.parent=r,Ue(w),null==(f=r.children)||f.push(w),w})(t,r,a,u,l);((e,t,n,r,a,o,i)=>{var _,l,s,c,u,d,g,p,b,f,m;const w=null==e||null==(_=e.shapes)?void 0:_.filter((e=>e.shape_type===Ze.Footer))[0],h=[],y={fontFamily:v.FONT.FAMILY,fill:null!=(l=null==i?void 0:i.font_color)?l:n.textColor};let O;var S;let E;var x,T;null!=(s=r.base_data)&&s.link&&(O=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(S=null==i?void 0:i.font_color)?S:n.textColor,opacity:1,originX:"left",originY:"top",top:1,left:0}),O.scaleToWidth(10),h.push(O)),null!=(c=r.base_data)&&c.label&&(E=new q.fabric.Text(r.base_data.label,Object.assign({},y,{fontSize:z,fontWeight:"bold"})),E.top=0,E.left=null!=(x=O)&&x.getScaledWidth()?(null==(T=O)?void 0:T.getScaledWidth())+3:0,h.push(E));let R=null!=(u=null!=(d=r.boundary_type)?d:r.deployment_node_type)?u:"";R=null!=(g=null!=(p=r.boundary_custom_type)?p:r.deploymeny_node_custom_type)?g:R,R+=r.technology?`: ${r.technology}`:"",R=`[${R}]`;const C=new q.fabric.Text(R,Object.assign({},y,{fontSize:B,left:0,top:null!=(b=null==(f=E)?void 0:f.height)?b:0}));h.push(C);const I=new q.fabric.Group(h,{name:Ze.Footer,selectable:!1,evented:!1,left:a.left,top:a.top,scaleX:a.scaleX,scaleY:a.scaleY});I.data={rawDiagramElementSpec:w},I.parent=o,qe(I),null==(m=o.children)||m.push(I)})(t,0,a,e,d,u,l);let g=[];return e.sub_elements&&(g=At(void 0,e.sub_elements,n,r,Object.assign({},o,{skipAddToCanvas:!0,skipLegendRendering:!0})),g.forEach((e=>{var t;e.parent=u,null==(t=u.children)||t.push(e)}))),Ge(u),(e=>{var t;null==(t=e.children)||t.forEach((t=>{t.on(s,(t=>{Qe(e,t)})),t.children&&t.children.forEach((t=>{t.on(s,(t=>{Qe(e,t)}))}))}))})(u),u},et=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.boundary_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,_,l,s,c,u;const d={bgColor:null!=(i=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.bg_color_boundary)?i:O.COLORS.BG_COLOR_BOUNDARY,borderColor:null!=(l=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_boundary)?l:O.COLORS.BORDER_COLOR_BOUNDARY,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_boundary)?c:O.COLORS.TEXT_COLOR_BOUNDARY,strokeDashArray:X.SIZES.STROKE_DASH_ARRAY},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{Boundary:t.boundary_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},tt=(e,t,n,r,a)=>{var o,i,_,l,s,c;const u=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),d=[],g=((e,t,n)=>{var r,a,o,i,_,l,s;const c=new q.fabric.Rect({fill:null!=(r=null==n?void 0:n.bg_color)?r:t.bgColor,stroke:null!=(a=null==n?void 0:n.border_color)?a:t.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,left:v.SIZES.DEFAULT_LEFT,top:v.SIZES.DEFAULT_TOP,width:null!=(o=t.widthBox)?o:O.SIZES.WIDTH,height:O.SIZES.MIN_HEIGHT,name:null!=(i=null==(_=e.base_data)?void 0:_.alias)?i:"undefined",rx:null!=(l=t.borderRadius)?l:O.SIZES.BORDER_RADIUS,ry:null!=(s=t.borderRadius)?s:O.SIZES.BORDER_RADIUS});return c.on("scaling",(e=>{var t;null!=(t=e.target)&&t.width&&e.target.height&&e.target.scaleX&&e.target.scaleY&&e.target.set({width:e.target.width*e.target.scaleX,height:e.target.height*e.target.scaleY,scaleX:1,scaleY:1})})),c})(e,r,u);let p;d.push(g),null!=(i=e.base_data)&&i.tags&&(p=((e,t,n,r)=>{var a,o,i,_,l;return new q.fabric.Text(`«${null==(a=t.base_data)?void 0:a.tags}»`,{fill:null!=(o=null==r?void 0:r.font_color)?o:n.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TAG,fontStyle:"italic",fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(i=e.left)?i:v.SIZES.DEFAULT_LEFT)+(null!=(_=e.width)?_:0)/2,top:(null!=(l=e.top)?l:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TAGS})})(g,e,r,u),d.push(p));const b=((e,t,n,r,a)=>{var o,i,_,l,s,c;return new q.fabric.Text(null!=(o=(0,$.x4)(null==(i=n.base_data)?void 0:i.label))?o:"undefined",{fill:null!=(_=null==a?void 0:a.font_color)?_:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE,fontWeight:"bold",textAlign:"center",originX:"center",originY:"top",left:(null!=(l=e.left)?l:v.SIZES.DEFAULT_LEFT)+(null!=(s=e.width)?s:0)/2,top:(null!=(c=null==t?void 0:t.top)?c:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_LABEL})})(g,p,e,r,u);d.push(b);const f=((e,t,n,r,a)=>{var o,i,_,l,s,c,u,d,g,p,b,f;const m=`[${null!=(o=null!=(i=null!=(_=null!=(l=null!=(s=null!=(c=null!=(u=n.boundary_custom_type)?u:n.boundary_type)?c:n.component_type)?s:n.container_type)?l:n.deployment_node_type)?_:n.deploymeny_node_custom_type)?i:n.person_type)?o:n.system_type}${n.technology?`: ${n.technology}`:""}]`;return new q.fabric.Text(m,{fill:null!=(d=null==a?void 0:a.font_color)?d:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_TYPE_TECHNOLOGY,fontWeight:"normal",textAlign:"center",originX:"center",originY:"top",left:(null!=(g=e.left)?g:v.SIZES.DEFAULT_LEFT)+(null!=(p=e.width)?p:0)/2,top:(null!=(b=null==t?void 0:t.top)?b:v.SIZES.DEFAULT_TOP)+O.SIZES.TOP_TYPE_TECHNOLOGY+(null!=(f=null==t?void 0:t.height)?f:0)})})(g,b,e,r,u);let m;d.push(f),null!=(_=e.base_data)&&_.description&&(m=((e,t,n,r,a)=>{var o,i,_,l,s,c,u;const d=null!=(o=r.widthDescription)?o:e.width;return new q.fabric.Textbox(null!=(i=(0,$.x4)(null==(_=n.base_data)?void 0:_.description))?i:"",{fill:null!=(l=null==a?void 0:a.font_color)?l:r.textColor,fontFamily:v.FONT.FAMILY,fontSize:O.FONT.SIZE_DESCRIPTION,fontWeight:400,opacity:.7,splitByGrapheme:!0,width:d?d-O.SIZES.PADDING_Y_DESCRIPTION:0,textAlign:"center",originX:"center",originY:"top",left:(null!=(s=e.left)?s:v.SIZES.DEFAULT_LEFT)+(null!=(c=e.width)?c:0)/2,top:(null!=(u=null==t?void 0:t.top)?u:0)+O.SIZES.TOP_DESCRIPTION})})(g,f,e,r,u),d.push(m)),null!=(l=e.base_data)&&l.link&&d.push(((e,t,n)=>{var r,a,o;const i=new q.fabric.Path(We.faLink.icon[4].toString(),{fill:null!=(r=null==n?void 0:n.font_color)?r:t.textColor,opacity:1,originX:"left",originY:"top",left:(null!=(a=e.left)?a:0)+5,top:(null!=(o=e.top)?o:0)+5});return i.scaleToWidth(10),i})(g,r,u)),((e,t)=>{var n,r,a;let o=(null!=(n=null==t?void 0:t.height)?n:0)+((null!=(r=null==t?void 0:t.top)?r:0)-(null!=(a=null==e?void 0:e.top)?a:0))+O.SIZES.PADDING_BOTTOM;o<O.SIZES.MIN_HEIGHT&&(o=O.SIZES.MIN_HEIGHT),e.height=o})(g,m);const w={alias:null==(s=e.base_data)?void 0:s.alias,position:Oe(null==(c=e.base_data)?void 0:c.alias,n)};return new le(e,t,w,n,d)},nt=(e,t,n,r,a)=>{var o,i,_,l;const s=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)})(e,r,a);c.push(u);const d=(null!=(i=u.width)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(((e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b,f,m,w,h,y,O,S,x,T,R;const C=[],I=v.SIZES.BORDER_WIDTH,D=E.SIZES.TOP_BOX_HEIGHT,k=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+v.SIZES.BORDER_WIDTH,top:(null!=(i=e.top)?i:0)-D+I,width:(null!=(_=e.width)?_:0)-2*v.SIZES.BORDER_WIDTH,height:D});return C.push(k),C.push(new q.fabric.Line([null!=(l=e.left)?l:0,null!=(s=e.top)?s:0,null!=(c=e.left)?c:0,null!=(u=k.top)?u:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(d=null==r?void 0:r.border_color)?d:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Line([(null!=(g=e.left)?g:0)+(null!=(p=e.width)?p:0)-v.SIZES.BORDER_WIDTH,null!=(b=e.top)?b:0,(null!=(f=e.left)?f:0)+(null!=(m=e.width)?m:0)-v.SIZES.BORDER_WIDTH,null!=(w=k.top)?w:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(h=null==r?void 0:r.border_color)?h:n.borderColor,originX:"left",originY:"top"})),C.push(new q.fabric.Circle({fill:null!=(y=null==r?void 0:r.bg_color)?y:n.bgColor,stroke:null!=(O=null==r?void 0:r.border_color)?O:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(S=k.top)?S:0)-(null!=(x=e.width)?x:0)*E.SIZES.SCALE_X_TOP_BOTTOM/2,left:(null!=(T=k.left)?T:0)+ +(null!=(R=e.width)?R:0)-I,angle:90,startAngle:0,endAngle:360,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})),new q.fabric.Group(C)})(u,d,r,s)),c.push(((e,t,n,r)=>{var a,o,i,_,l,s;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:(null!=(i=e.top)?i:0)+(null!=(_=e.height)?_:0)-2*t*E.SIZES.SCALE_X_TOP_BOTTOM/2-v.SIZES.BORDER_WIDTH,left:(null!=(l=e.left)?l:0)+(null!=(s=e.width)?s:0),angle:90,startAngle:270,endAngle:90,scaleX:E.SIZES.SCALE_X_TOP_BOTTOM})})(u,d,r,s));const g={alias:null==(_=e.base_data)?void 0:_.alias,position:Oe(null==(l=e.base_data)?void 0:l.alias,n)};return new le(e,t,g,n,c)},rt=(e,t,n,r,a)=>{var o,i,_,l;const s=Xe(Ye(null==(o=e.base_data)?void 0:o.tags),null==a?void 0:a.tags),c=[],u=at(e,r,a);c.push(u);const d=(null!=(i=u.height)?i:0)/2-v.SIZES.BORDER_WIDTH/2;c.push(ot(u,d,r,s)),c.push(it(u,d,r,s));const g={alias:null==(_=e.base_data)?void 0:_.alias,position:Oe(null==(l=e.base_data)?void 0:l.alias,n)};return new le(e,t,g,n,c)},at=(e,t,n)=>{const r=Object.assign({},t,{borderRadius:0});return tt(e,{},{},r,n)},ot=(e,t,n,r)=>{var a,o,i;return new q.fabric.Circle({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,stroke:null!=(o=null==r?void 0:r.border_color)?o:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(i=e.left)?i:0)+2*t*S.SIZES.SCALE_Y_TAIL_HEAD/2+2*v.SIZES.BORDER_WIDTH,angle:90,startAngle:0,endAngle:180,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})},it=(e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b,f,m,w,h,y,O,E,x,T,R,C,I;const D=[],k=v.SIZES.BORDER_WIDTH,L=new q.fabric.Rect({fill:null!=(a=null==r?void 0:r.bg_color)?a:n.bgColor,strokeWidth:0,left:(null!=(o=e.left)?o:0)+(null!=(i=e.width)?i:0)-k,top:(null!=(_=e.top)?_:0)+v.SIZES.BORDER_WIDTH,width:S.SIZES.HEAD_BOX_WIDTH,height:(null!=(l=e.height)?l:0)-2*v.SIZES.BORDER_WIDTH});return D.push(L),D.push(new q.fabric.Line([null!=(s=L.left)?s:0,null!=(c=e.top)?c:0,(null!=(u=L.left)?u:0)+(null!=(d=L.width)?d:0),null!=(g=e.top)?g:0],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(p=null==r?void 0:r.border_color)?p:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Line([null!=(b=L.left)?b:0,(null!=(f=L.top)?f:0)+(null!=(m=L.height)?m:0),(null!=(w=L.left)?w:0)+(null!=(h=L.width)?h:0),(null!=(y=L.top)?y:0)+(null!=(O=L.height)?O:0)],{strokeWidth:v.SIZES.BORDER_WIDTH,stroke:null!=(E=null==r?void 0:r.border_color)?E:n.borderColor,originX:"left",originY:"top"})),D.push(new q.fabric.Circle({fill:null!=(x=null==r?void 0:r.bg_color)?x:n.bgColor,stroke:null!=(T=null==r?void 0:r.border_color)?T:n.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH,radius:t,top:e.top,left:(null!=(R=L.left)?R:0)+(null!=(C=L.width)?C:0)+(null!=(I=e.height)?I:0)*S.SIZES.SCALE_Y_TAIL_HEAD/2-k,angle:90,startAngle:0,endAngle:360,scaleY:S.SIZES.SCALE_Y_TAIL_HEAD})),new q.fabric.Group(D)},_t=rt,lt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.component_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.component_type){case"Component":case"ComponentDb":case"ComponentQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component)?o:O.COLORS.BG_COLOR_COMPONENT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_component)?_:O.COLORS.BORDER_COLOR_COMPONENT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component)?s:O.COLORS.TEXT_COLOR_COMPONENT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component":return tt(e,t,n,d,a);case"ComponentDb":return nt(e,t,n,d,a);case"ComponentQueue":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a);break;case"Component_Ext":case"ComponentDb_Ext":case"ComponentQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_component_ext)?o:O.COLORS.BG_COLOR_COMPONENT_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_component_ext)?_:O.COLORS.BORDER_COLOR_COMPONENT_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_component_ext)?s:O.COLORS.TEXT_COLOR_COMPONENT_EXT},d=Object.assign({},u,r);if(e.component_type)switch(e.component_type){case"Component_Ext":return tt(e,t,n,d,a);case"ComponentDb_Ext":return nt(e,t,n,d,a);case"ComponentQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Component:t.component_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},st=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.container_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.container_type){case"Container":case"ContainerDb":case"ContainerQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container)?o:O.COLORS.BG_COLOR_CONTAINER,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_container)?_:O.COLORS.BORDER_COLOR_CONTAINER,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container)?s:O.COLORS.TEXT_COLOR_CONTAINER},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container":return tt(e,t,n,d,a);case"ContainerDb":return nt(e,t,n,d,a);case"ContainerQueue":return rt(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a);break;case"Container_Ext":case"ContainerDb_Ext":case"ContainerQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_container_ext)?o:O.COLORS.BG_COLOR_CONTAINER_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_container_ext)?_:O.COLORS.BORDER_COLOR_CONTAINER_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_container_ext)?s:O.COLORS.TEXT_COLOR_CONTAINER_EXT},d=Object.assign({},u,r);if(e.container_type)switch(e.container_type){case"Container_Ext":return tt(e,t,n,d,a);case"ContainerDb_Ext":return nt(e,t,n,d,a);case"ContainerQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{Container:t.container_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}},ct=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.base_data.label&&t.deployment_node_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r,a,o)=>{var i,_,l,s,c,u;const d={bgColor:null!=(i=null==o||null==(_=o.diagramsThemeSettings)?void 0:_.bg_color_deployment_node)?i:O.COLORS.BG_COLOR_DEPLOYMENT_NODE,borderColor:null!=(l=null==o||null==(s=o.diagramsThemeSettings)?void 0:s.border_color_deployment_node)?l:O.COLORS.BORDER_COLOR_DEPLOYMENT_NODE,textColor:null!=(c=null==o||null==(u=o.diagramsThemeSettings)?void 0:u.text_color_deployment_node)?c:O.COLORS.TEXT_COLOR_DEPLOYMENT_NODE},g=Object.assign({},d,a);return Ke(e,t,n,r,g,o)})(t,de(t.base_data.alias,void 0,void 0,{DeploymentNode:t.deployment_node_type},n),n,r,void 0,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...te(null!=(o=i.children)?o:[])),i}},ut=(e,t,n,r,a)=>{var o,i;const _=[],l=((e,t,n)=>{const r=Object.assign({},t,{borderRadius:M});return tt(e,{},{},r,n)})(e,r,a);_.push(l);const s=((e,t)=>{var n,r,a,o,i;const _=new q.fabric.Circle({radius:P,top:t.top,left:t.left,fill:e.bgColor,stroke:e.borderColor,strokeWidth:v.SIZES.BORDER_WIDTH});return _.left=(null!=(n=_.left)?n:0)+(null!=(r=t.getScaledWidth())?r:0)/2-(null!=(a=_.getScaledWidth())?a:0)/2,_.top=(null!=(o=_.top)?o:0)-(null!=(i=_.getScaledWidth())?i:0)+5,_})(r,l);_.push(s);const c={alias:null==(o=e.base_data)?void 0:o.alias,position:Oe(null==(i=e.base_data)?void 0:i.alias,n)};return new le(e,t,c,n,_)},dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.person_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.person_type){case"Person":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_person)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a);break;case"Person_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_person_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_person_ext)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_person_ext)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);return ut(e,t,n,d,a)})(t,de(t.base_data.alias,void 0,void 0,{Person:t.person_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};let gt=function(e){return e.Dot="DOT",e.Line="LINE",e.Text="TEXT",e.Triangle="TRIANGLE",e.Rectangle="RECTANGLE",e}({});class pt extends le{getUpdatedSpecs(){const e=super.getUpdatedSpecs();var t,n;return e&&(null==(t=this.canvas)||t.discardActiveObject(),delete e.position,delete e.size,e.shapes=[],null==(n=this.children)||n.forEach((t=>{const n=q.fabric.util.object.clone(t);if(n.name===gt.Line||n.name===gt.Rectangle)e.shapes.push({position:{z_index:K(n.canvas,n)},shape_type:n.name});else{var r,a;let t=0,o=0;const i=n.angle;if(n.name===gt.Text)t=n.getCenterPoint().x,o=n.getCenterPoint().y;else if(n.name===gt.Dot||n.name===gt.Triangle){n.name===gt.Triangle&&n.rotate(F);const e=ht(this.canvas,n.left,n.top,n.name===gt.Triangle,i,n.scaleX,n.scaleY,!0);t=e.left,o=e.top}const _={position:{left:t,top:o,z_index:K(n.canvas,n)},size:{scale_x:null!=(r=n.scaleX)?r:1,scale_y:null!=(a=n.scaleY)?a:1},shape_type:n.name};n.name===gt.Triangle&&(_.position.angle=i),e.shapes.push(_)}}))),e}}const bt=e=>{var t;e.children=null==(t=e.children)?void 0:t.sort(((e,t)=>e.name===gt.Rectangle||e.name===gt.Line&&t.name!==gt.Rectangle?-1:t.name===gt.Rectangle||e.name!==gt.Rectangle&&t.name===gt.Line?1:e.name===t.name?0:1))},ft=e=>{const t=e.parent;let n,r=1;const a=e.canvas;if(t&&a){const _=[],l=[];if(t.children){var o,i;t.children.forEach((e=>{if(e.name===gt.Triangle&&(n=e),e.name===gt.Dot||e.name===gt.Triangle){var t;l.push(e),r=null!=(t=e.scaleX)?t:1;const n=e.getPointByOrigin("center","center"),a=new oe(n.x,n.y,e.name);_.push(a)}}));const s=t.children.findIndex((e=>e.name===gt.Line));void 0!==s&&s>-1&&t.children.splice(s,1);const c=K(a,e),u=null==(o=e.data)?void 0:o.rawDiagramElementSpec,d=e.stroke,g=e.strokeDashArray,p=null==(i=e.data)?void 0:i.otherData.selectedRelColor;a.remove(e);const b=St(u,_,t,r,d,p,void 0,g);a.add(b),c&&b.moveTo(c),n&&wt(_,n)}}},mt=e=>{const t=e.findIndex((e=>e.customType===gt.Triangle)),n=e[t],r=e[t>0?t-1:t+1];return 180*Math.atan2(n.y-r.y,n.x-r.x)/Math.PI+90},wt=(e,t)=>{let n;e&&(n=mt(e),t.rotate(n))},ht=(e,t,n,r,a=F,o=1,i=1,_)=>{var l;const s=null!=(l=null==e?void 0:e.getZoom())?l:1,c=ne(e);let u=t,d=n;if(r){const e=A*o/2+N*o/2,t=A*i/2+N*i/2;_?(u-=e,d+=t):(u+=e,d-=t)}else{const e=L*o*2+N*o/2,t=L*i+N*i/2;_?(u+=e,d+=t):(u-=e,d-=t)}return _||(u=(u-c.panX)/s,d=(d-c.panY)/s),{left:u,top:d,angle:a}},yt=(e,t)=>{let n=[];if(null!=e&&e.shapes)null==e||e.shapes.forEach((e=>{var t,r;if((e.shape_type===gt.Dot||e.shape_type===gt.Triangle)&&void 0!==(null==(t=e.position)?void 0:t.left)&&void 0!==(null==(r=e.position)?void 0:r.top)){const t=new oe(e.position.left,e.position.top,e.shape_type);t.data={rawDiagramElementSpec:e},n.push(t)}}));else{var r,a;let o;null!=e&&e.alias&&null!=(r=t[e.alias])&&r.start&&null!=(a=t[e.alias])&&a.end?(o=[],o.push(new oe(t[e.alias].start.x,t[e.alias].start.y,gt.Dot)),t[e.alias].path&&t[e.alias].path.forEach((e=>{o.push(new oe(e.x,e.y,gt.Dot))})),o.push(new oe(t[e.alias].end.x,t[e.alias].end.y,gt.Triangle))):o=[new oe(v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Dot),new oe(100+v.SIZES.DEFAULT_LEFT,v.SIZES.DEFAULT_TOP,gt.Triangle)],n=n.concat(o)}return n},vt=(e,t,n,r,a,o)=>{const i=[],_=void 0!==(null==e?void 0:e.alias)&&void 0!==t[e.alias];for(let e=0;e<n.length;e++){var l,s,c,u;i.push(Ot(void 0,n[e],n[e].customType===gt.Triangle?null!=(l=null==(s=n[e].data)||null==(s=s.rawDiagramElementSpec)||null==(s=s.position)?void 0:s.angle)?l:mt(n):void 0,n[e].customType===gt.Triangle,r,!0,null==(c=n[e].data)||null==(c=c.rawDiagramElementSpec)||null==(c=c.size)?void 0:c.scale_x,null==(u=n[e].data)||null==(u=u.rawDiagramElementSpec)||null==(u=u.size)?void 0:u.scale_y,a,o,_))}return i},Ot=(e,t,n,r,a,o=!0,i=1,_=1,l,s,c)=>{var u;l=null!=(u=l)?u:T;const{left:d,top:g,angle:p}=ht(e,t.x,t.y,r,n,i,_,!1);if(r){var b,f;const e=new q.fabric.Triangle({left:d,top:g,width:A,height:A,fill:l,scaleX:i,scaleY:_,hasControls:!1,name:gt.Triangle,angle:F});return e.rotate(p),e.data={rawDiagramElementSpec:null==(b=t.data)?void 0:b.rawDiagramElementSpec,otherData:{selectedRelColor:null!=s?s:C}},e.parent=a,o&&(null==(f=a.children)||f.push(e)),Tt(e,l),e}{var m,w;const e=new q.fabric.Circle({left:d,top:g,radius:L,fill:l,opacity:.2,scaleX:i,scaleY:_,hasControls:!1,name:gt.Dot,visible:!c,selectable:!c,hasBorders:!c});return e.data={rawDiagramElementSpec:null==(m=t.data)?void 0:m.rawDiagramElementSpec,otherData:{selectedRelColor:null!=s?s:C}},e.parent=a,o&&(null==(w=a.children)||w.push(e)),Tt(e,l),e}},St=(e,t,n,r=1,a,o,i,_)=>{var l,s,c;const u=null==e||null==(l=e.shapes)?void 0:l.filter((e=>e.shape_type===gt.Line))[0];let d;return d=i&&null!=e&&e.alias&&null!=(s=i[e.alias])&&s.svg_path?new q.fabric.Path(i[e.alias].svg_path,{stroke:null!=a?a:T,strokeDashArray:_,fill:"",strokeWidth:N*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}):new q.fabric.Polyline(t,{stroke:null!=a?a:T,strokeDashArray:_,fill:"",strokeWidth:N*r,scaleX:1,scaleY:1,name:gt.Line,perPixelTargetFind:!0,hasBorders:!1}),d.data={rawDiagramElementSpec:u,otherData:{selectedRelColor:null!=o?o:C}},d.parent=n,xt(d,d.stroke,d.strokeWidth),null==(c=n.children)||c.push(d),d},Et=(e,t,n,r,a,o,i,_)=>{var l,s,c,u,d,g,p;let b,f=1,m=1;var w,h,y,O;null!=t&&t.shapes&&(b=t.shapes.filter((e=>e.shape_type===gt.Text))[0],b&&(f=null!=(w=null==(h=b.size)?void 0:h.scale_x)?w:1,m=null!=(y=null==(O=b.size)?void 0:O.scale_y)?y:1));const S=[],E={fontFamily:v.FONT.FAMILY,fill:null!=(l=null!=(s=null==_?void 0:_.font_color)?s:null==i||null==(c=i.diagramsThemeSettings)?void 0:c.text_color_relationship)?l:R};if(null!=(u=e.base_data)&&u.label){var T,C,L,A,N;const t=new q.fabric.Text((0,$.x4)(e.base_data.label),Object.assign({},E,{fontSize:I,fontWeight:"bold",textAlign:"center"}));t.top=e.technology?-(null!=(T=t.height)?T:0):-(null!=(C=t.height)?C:0)/2,t.left=(null!=(L=r.width)?L:0)/2-(null!=(A=t.width)?A:0)/2-(null!=(N=a[0].width)?N:0)/2,S.push(t)}if(e.technology){var j,F,M;const t=new q.fabric.Text(`[${e.technology}]`,Object.assign({},E,{fontSize:D,textAlign:"center"}));t.left=(null!=(j=r.width)?j:0)/2-(null!=(F=t.width)?F:0)/2-(null!=(M=a[0].width)?M:0)/2,S.push(t)}const P=new q.fabric.Group(S),z=P.getBoundingRect(),B=new q.fabric.Rect({top:z.top-k,left:z.left-k,width:z.width+2*k,height:z.height+2*k,fill:null!=(d=null==i||null==(g=i.diagramsThemeSettings)?void 0:g.bg_color_relationship)?d:x});let H,W;var Y,X,Z,G,U,V,Q,J;null!=t&&t.alias&&n[t.alias]&&n[t.alias].label_position?(H=n[t.alias].label_position.x-(null!=(Y=B.width)?Y:0)/2,W=n[t.alias].label_position.y-(null!=(X=B.height)?X:0)/2):(H=(null!=(Z=r.left)?Z:0)+(null!=(G=r.width)?G:0)/2-(null!=(U=B.width)?U:0)/2,W=(null!=(V=r.top)?V:0)+(null!=(Q=r.height)?Q:0)/2-(null!=(J=B.height)?J:0)/2);const K=new q.fabric.Group([B,P],{name:gt.Text,hasControls:!1,left:H,top:W,scaleX:f,scaleY:m});var ee,te;return K.data={rawDiagramElementSpec:b},K.parent=o,null==(p=o.children)||p.push(K),b&&void 0!==(null==(ee=b.position)?void 0:ee.left)&&void 0!==(null==(te=b.position)?void 0:te.top)&&K.setPositionByOrigin(new q.fabric.Point(b.position.left,b.position.top),"center","center"),K},xt=(e,t,n)=>{const r=e.parent;e.on(c,(t=>{var n,r,a;e.stroke=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.strokeWidth=(null!=(r=e.strokeWidth)?r:0)+j,e.dirty=!0,null==(a=e.canvas)||a.renderAll(),((e,t)=>{var n;if(e.e&&null!=(n=t.parent)&&n.children){var r;const e=re(t);if(!ae(null==(r=t.canvas)?void 0:r.getActiveObjects(),e.objects)){var a,o,i;null==(a=t.canvas)||a.discardActiveObject();const n=t.parent;let r;"multiple"===e.type?r=new q.fabric.ActiveSelection(e.objects,{canvas:t.canvas}):(r=new ie(e.objects,{canvas:t.canvas}),r.parent=t.parent,r.on(l,(e=>{It(r.canvas,e,r,n)})),r.on(s,(e=>{var r;null==(r=t.canvas)||r.discardActiveObject(),n.fire(s)}))),r.hasBorders=!1,null==(o=t.canvas)||o.setActiveObject(r),null==(i=t.canvas)||i.requestRenderAll()}}})(t,e)})),e.on(u,(r=>{var a;e.stroke=t,e.strokeWidth=n,e.dirty=!0,null==(a=e.canvas)||a.renderAll()})),e.on(l,(t=>{It(e.canvas,t,e,r)}))},Tt=(e,t)=>{const n=e.parent;e.on("moving",(e=>{Rt(e)})),e.on(l,(t=>{It(e.canvas,t,e,n)})),e.on(c,(t=>{var n,r;e.fill=null==(n=e.data)||null==(n=n.otherData)?void 0:n.selectedRelColor,e.dirty=!0,null==(r=e.canvas)||r.renderAll()})),e.on(u,(n=>{var r;e.fill=t,e.dirty=!0,null==(r=e.canvas)||r.renderAll()}))},Rt=e=>{var t;if(null!=(t=e.transform)&&t.target){const t=e.transform.target.parent;if(t){var n;const e=null==(n=t.children)?void 0:n.filter((e=>e.name===gt.Line))[0];e&&ft(e)}}},Ct=(e,t,n)=>{if(n instanceof q.fabric.ActiveSelection){const r=[];return e.isReadOnly()?e.codingFeaturesEnabled&&r.push(...se(e,t,n,!1)):r.push({isHeaderMenuItem:!1,id:"addPoint",label:"Add point",onClick:()=>{((e,t)=>{const n=e.canvas;if(t.pointer&&n){const a=e.getObjects().filter((e=>e.name===gt.Line))[0],o=e.getObjects().filter((e=>e.name===gt.Dot))[0];n.discardActiveObject();const i=a.parent;if(i){var r;const e=new oe(t.pointer.x,t.pointer.y,gt.Dot),_=Ot(n,e,void 0,!1,i,!1,o.scaleX,o.scaleY,a.stroke,null==(r=o.data)?void 0:r.otherData.selectedRelColor,!1);((e,t)=>{const n=e.parent;if(n){var r;let a,o;const i=[];null==(r=n.children)||r.forEach((e=>{e.name===gt.Text?a=e:e.name===gt.Rectangle?o=e:e.name!==gt.Dot&&e.name!==gt.Triangle||i.push(e)})),i.push(t),i.sort(((e,t)=>e.getCenterPoint().x-t.getCenterPoint().x)),n.children=i,n.children.push(e),a&&n.children.push(a),o&&n.children.push(o)}})(a,_),n.add(_),ft(a)}}})(n,t)}},{id:"separatorRel",isSepator:!0},...se(e,t,n,!1)),[{isHeaderMenuItem:!0,id:"relationshipContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:r}]}return n.name!==gt.Dot||e.isReadOnly()?[]:[{isHeaderMenuItem:!0,id:"dotContextMenu",label:"",hidden:!0,alwaysOpen:!0,subMenuItems:[{isHeaderMenuItem:!1,id:"removePoint",label:"Remove point",onClick:()=>{(e=>{const t=e.parent;if(t&&e.canvas){var n;const i=null==(n=t.children)?void 0:n.filter((e=>e.name===gt.Dot||e.name===gt.Triangle));if(void 0!==i&&i.length>2){var r,a;const n=null==(r=t.children)?void 0:r.filter((e=>e.name===gt.Line))[0],i=null==(a=t.children)?void 0:a.findIndex((t=>t.getCenterPoint().eq(e.getCenterPoint())));var o;void 0!==i&&i>-1&&(null==(o=t.children)||o.splice(i,1)),e.canvas.remove(e),ft(n)}}})(n)}}]}]},It=(e,t,n,r)=>{n.name!==gt.Line&&n.name!==gt.Rectangle&&e&&r.onComponentMouseUp(e,t,n,Ct(e,t,n))},Dt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.relationship_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){var o;const i=((e,t,n,r)=>{var a,o,i,_,l,s,c,u,d,g,p,b;const f=Xe(Ye(null==(a=e.base_data)?void 0:a.tags),null==r?void 0:r.tags),m={alias:null==(o=e.base_data)?void 0:o.alias};let w=1;const h=null==(i=t.shapes)?void 0:i.filter((e=>e.shape_type===gt.Dot));h&&h.length>0&&(w=null!=(_=null==(l=h[0].size)?void 0:l.scale_x)?_:1);const y=new pt(e,t,m,n,[],{visible:!1,selectable:!1},void 0,void 0,!0),v=yt(t,n),O=vt(t,n,v,y,null!=(s=null==f?void 0:f.border_color)?s:null==r||null==(c=r.diagramsThemeSettings)?void 0:c.line_color_relationship,null==r||null==(u=r.diagramsThemeSettings)?void 0:u.selected_color_relationship),S=O.map((e=>new oe(e.getCenterPoint().x,e.getCenterPoint().y,e.name))),E=St(t,S,y,w,null!=(d=null==f?void 0:f.border_color)?d:null==r||null==(g=r.diagramsThemeSettings)?void 0:g.line_color_relationship,null==r||null==(p=r.diagramsThemeSettings)?void 0:p.selected_color_relationship,n,null==(b=je(null==f?void 0:f.border_style))?void 0:b.value);return Et(e,t,n,E,O,y,r,f),bt(y),y})(t,de(t.base_data.alias,t.from,t.to,{Relationship:t.relationship_type},n),r,a);return a&&a.skipAddToCanvas||!i||null==e||e.add(i,...null!=(o=i.children)?o:[]),i}},kt=(e,t,n,r,a)=>{if(t.base_data&&t.base_data.alias&&t.system_type&&(n.auto_layout_enabled&&r[t.base_data.alias]||!n.auto_layout_enabled)){let o;switch(t.system_type){case"System":case"SystemDb":case"SystemQueue":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_software_system)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System":return tt(e,t,n,d,a);case"SystemDb":return nt(e,t,n,d,a);case"SystemQueue":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a);break;case"System_Ext":case"SystemDb_Ext":case"SystemQueue_Ext":o=((e,t,n,r,a)=>{var o,i,_,l,s,c;const u={bgColor:null!=(o=null==a||null==(i=a.diagramsThemeSettings)?void 0:i.bg_color_software_system_ext)?o:O.COLORS.BG_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,borderColor:null!=(_=null==a||null==(l=a.diagramsThemeSettings)?void 0:l.border_color_software_system_ext)?_:O.COLORS.BORDER_COLOR_SOFTWARE_SYSTEM_PERSON_EXT,textColor:null!=(s=null==a||null==(c=a.diagramsThemeSettings)?void 0:c.text_color_software_system_ext)?s:O.COLORS.TEXT_COLOR_SOFTWARE_SYSTEM_PERSON_EXT},d=Object.assign({},u,r);if(e.system_type)switch(e.system_type){case"System_Ext":return tt(e,t,n,d,a);case"SystemDb_Ext":return nt(e,t,n,d,a);case"SystemQueue_Ext":return _t(e,t,n,d,a)}})(t,de(t.base_data.alias,void 0,void 0,{SoftwareSystem:t.system_type},n),r,void 0,a)}return a&&a.skipAddToCanvas||!o||null==e||e.add(o),o}};class Lt{constructor(){this.graphviz=void 0}async initialize(){return this.graphviz=await Ae.Graphviz.load(),this}renderDiagram(e,t,n,r){if(e&&n){var a,o,i,_,l,s,c,u;if(e.diagramListener=t,e.autoLayoutEnabled=null==(a=n.diagram_spec)?void 0:a.auto_layout_enabled,e.autoLayoutOrientation=null==(o=n.diagram_spec)?void 0:o.auto_layout_orientation,e.backgroundColor=null!=(i=null==r?void 0:r.bg_color_diagram)?i:d,null!=(_=n.diagram_spec)&&_.auto_layout_enabled)if(this.graphviz){const e=function(e,t){var n,r;const a={},o=[];if(null!=(n=t.diagram_spec)&&n.auto_layout_enabled&&t.diagram_spec.auto_layout_orientation&&null!=(r=t.diagram_plantuml)&&r.elements){console.time("autoLayoutGeneration");const n=t.diagram_plantuml.elements,r=t.diagram_spec.auto_layout_orientation,l=t.diagram_spec.auto_layout_ranksep,s=t.diagram_spec.auto_layout_subgraph_inner_margin,c=t.diagram_spec.auto_layout_subgraph_outer_margin,u=t.diagram_spec.auto_layout_only_straight_arrows,d=(e=>{for(const t of e)if(be(t)||we(t))return!0;return!1})(n),g=function(e){let t=Re,n=Ce;return e&&(t-=.1,n-=.1),{x:Number.parseFloat(t.toFixed(2)),y:Number.parseFloat(n.toFixed(2))}}(d),p=function(e,t,n,r,a,o,i){const _=new Set;return`\n digraph G {\n pad = "${i.x},${i.y}"\n dpi = ${Te.toFixed(1)}\n penwidth="1"\n rankdir = ${"LeftToRight"===t?"LR":"TB"}\n nodesep=0\n ranksep=${n}\n compound=true\n bgcolor="red"\n ${o?"splines=ortho":""}\n node [shape="rect", fixedsize=true, penwidth="1"]\n ${Le(e,_,r,a)}\n }\n `}(n,r,l,s,c,u,g);try{var i,_;let t=e.dot(p,"json");const n=JSON.parse(t),r=function(e){const t=e.split(",");return Number.parseFloat(t[3])}(n.bb);null==(i=n.objects)||i.forEach((e=>{if(!function(e){return e.width&&0===Number.parseInt(e.width)&&e.height&&0===Number.parseInt(e.height)&&e.peripheries&&0===Number.parseInt(e.peripheries)&&""===e.label}(e)&&!function(e){return e.name.endsWith(Ee)}(e)&&e._draw_){const t=e._draw_.filter((e=>"p"===e.op||"P"===e.op))[0],n=xe(g,r,t.points[0]),o=xe(g,r,t.points[1]),i=xe(g,r,t.points[2]),_=o[0],l=o[1];let s;4===t.points.length&&(s={x:i[0]-o[0],y:n[1]-o[1]}),a[e.name]={position:{x:_,y:l},size:s}}})),null==(_=n.edges)||_.forEach((e=>{const t={path:[]};if(e._draw_?e._draw_.filter((e=>"b"===e.op))[0].points.forEach(((e,n)=>{var a;const o=xe(g,r,e),i=o[0],_=o[1];0===n?t.start={x:i,y:_}:null==(a=t.path)||a.push({x:i,y:_})})):o.push(He),e._hdraw_){const n=e._hdraw_.filter((e=>"P"===e.op))[0].points,a=xe(g,r,n[1]);t.end={x:a[0],y:a[1]}}if(e._ldraw_){var n;const a=null==(n=e._ldraw_)?void 0:n.filter((e=>"T"===e.op))[0].pt;if(a){const e=xe(g,r,a);t.label_position={x:e[0],y:e[1]}}}if(t.start&&t.end){const n=t.path&&t.path.length>2?t.path[1]:t.end,a=t.path&&t.path.length>2?t.path[t.path.length-2]:t.start;"false"===e.keadex_fromissubgraph&&n.x&&n.y&&(t.start.x<n.x?t.start.x-=Ie:t.start.x>n.x&&(t.start.x+=Ie),t.start.y<n.y?t.start.y-=Ie:t.start.y>n.y&&(t.start.y+=Ie)),"false"===e.keadex_toissubgraph&&a.x&&a.y&&(t.end.x<a.x?t.end.x-=Ie:t.end.x>a.x&&(t.end.x+=Ie),t.end.y<a.y?t.end.y-=Ie:t.end.y>a.y&&(t.end.y+=Ie)),t.svg_path=function(e,t,n,r,a){const o=e.split(" ").slice(1).map((e=>e.split(",").map(Number)));let i=`M ${n.x} ${n.y}`;for(let e=o.length-3;e>=0;e-=3){const[n,_]=xe(r,a,o[e+1]),[l,s]=xe(r,a,o[e]),[c,u]=xe(r,a,o[e-1]);let d=c,g=u;1===e&&(d=t.x,g=t.y),i+=` C ${n} ${_}, ${l} ${s}, ${d} ${g}`}return i}(e.pos,t.start,t.end,g,r)}a[e.name]=t}))}catch(e){console.error(e),o.push(He)}}return console.timeEnd("autoLayoutGeneration"),{positions:a,errors:o}}(this.graphviz,n);n.auto_layout=e.positions,n.auto_layout_errors=e.errors,e.errors.length>0&&(e.errors.indexOf(He)>=0?(console.warn(ze),Ne.toast.warn(ze)):(console.error(e.errors.join(", ")),Ne.toast.error(e.errors.join(", "))))}else console.error(Be),Ne.toast.error(Be);null!=(l=n.diagram_spec)&&l.grid_enabled?e.enableGrid():e.disableGrid();const g=At(e,null==(s=n.diagram_plantuml)?void 0:s.elements,n.diagram_spec,null!=(c=n.auto_layout)?c:{},{diagramsThemeSettings:r,tags:null==(u=n.diagram_plantuml)?void 0:u.tags});return Nt(g),g}}}const At=(e,t,n,r,a)=>{const o=[];if(n){if(!a||!a.skipLegendRendering){const t=Pe(de(Fe,void 0,void 0,void 0,n),a);t&&(o.push(t),null==e||e.add(t))}if(t)for(const i of t)if(be(i)){const t=et(e,be(i),n,r,a);t&&o.push(t)}else if(fe(i)){const t=lt(e,fe(i),n,r,a);t&&o.push(t)}else if(me(i)){const t=st(e,me(i),n,r,a);t&&o.push(t)}else if(we(i)){const t=ct(e,we(i),n,r,a);t&&o.push(t)}else if(he(i)){const t=dt(e,he(i),n,r,a);t&&o.push(t)}else if(ye(i)){const t=Dt(e,ye(i),n,r,a);t&&o.push(t)}else if(ve(i)){const t=kt(e,ve(i),n,r,a);t&&o.push(t)}}return o},Nt=(e,t)=>{e.forEach((e=>{let n=function(e){let t;var n,r;return t=e.isVirtualGroupParent()?null==(n=e.data)||null==(n=n.rawDiagramElementSpec)||null==(n=n.shapes)||null==(n=n.reduce(((e,t)=>{var n,r;return void 0===(null==(n=e.position)?void 0:n.z_index)?t:(void 0===(null==(r=t.position)?void 0:r.z_index)||(t.position.z_index,e.position.z_index),e)})).position)?void 0:n.z_index:null==(r=e.data)||null==(r=r.rawDiagramElementSpec)||null==(r=r.position)?void 0:r.z_index,t}(e);var r;n&&(t&&n<=t&&(n=t+1,t++),e.moveTo(n)),e.isVirtualGroupParent()&&Nt(e.children,null!=(r=n)?r:K(e.canvas,e.children[0]))}))};var jt=n(15),Ft=n.n(jt),Mt=n(61);const Pt=require("react-resize-detector");var zt=n(732);const Bt="text-5xl text-dark-primary hover:text-third",Ht="text-2xl text-dark-primary hover:text-third",Wt=Ft().memo((e=>{const{canvas:t,readOnly:n,diagramInfoPanelVisible:r,setDiagramInfoPanelVisible:a}=e;function o(){return n}return(0,zt.jsxs)("div",{className:"absolute bottom-0 left-0 z-[1] scale-[85%] opacity-20 transition hover:scale-[100%] hover:opacity-100 flex flex-row mx-2",children:[(0,zt.jsx)(U.K0,{className:`${Ht} ${o()?"absolute":"hidden"}`,icon:We.faCircleInfo,onClick:function(){o()&&a(!r)}}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretLeft,onClick:()=>null==t?void 0:t.panLeft()})}),(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretUp,onClick:()=>null==t?void 0:t.panDown()}),(0,zt.jsxs)("div",{children:[(0,zt.jsx)(U.K0,{className:`${Ht} ml-1`,icon:We.faMagnifyingGlassPlus,onClick:()=>null==t?void 0:t.zoomIn()}),(0,zt.jsx)(U.K0,{className:`${Ht} mx-2 !text-xl`,icon:We.faRotateLeft,onClick:()=>{null==t||t.resetZoom(),null==t||t.resetPan()}}),(0,zt.jsx)(U.K0,{className:`${Ht} mr-1`,icon:We.faMagnifyingGlassMinus,onClick:()=>null==t?void 0:t.zoomOut()})]}),(0,zt.jsx)(U.K0,{className:Bt,icon:We.faCaretDown,onClick:()=>null==t?void 0:t.panUp()})]}),(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsx)(U.K0,{className:`${Bt} !my-auto`,icon:We.faCaretRight,onClick:()=>null==t?void 0:t.panRight()})})]})})),Yt=require("@tauri-apps/api/core");JSON.parse(!0),JSON.parse(!0);const Xt=require("fontfaceobserver");var Zt=n.n(Xt),$t=n(53);const Gt=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.enabled),[o,i]=(0,jt.useState)(e.orientation),[_,l]=(0,jt.useState)(e.generateOnlyStraightArrows),[s,c]=(0,jt.useState)(e.ranksep),[u,d]=(0,jt.useState)(e.subgraphInnerMargin),[g,p]=(0,jt.useState)(e.subgraphOuterMargin);return(0,zt.jsxs)("div",{children:[(0,zt.jsxs)("div",{className:"modal__body",children:[(0,zt.jsxs)("div",{className:"flex flex-col",children:[(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("common.status"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(e)}})]}),(0,zt.jsxs)("span",{className:"text-sm text-orange-500 mt-2 "+(!e.enabled&&n?"block":"hidden"),children:[(0,zt.jsx)($t.FontAwesomeIcon,{icon:We.faWarning,className:"mr-1 text-yellow-500"}),t("diagram_editor.warning_enable_autolayout")]})]}),(0,zt.jsxs)("div",{className:"flex flex-row mt-5",children:[(0,zt.jsxs)("span",{children:[`${t("diagrams_settings.gen_only_straight_arrows")}*`,":"]}),(0,zt.jsx)(U.sx,{id:"autolayout-straight-arrows-status",className:"ml-5",value:_,options:[{label:t("common.yes"),value:!0},{label:t("common.no"),value:!1}],onChange:e=>{l(e)}})]}),(0,zt.jsx)(U.l6,{id:"autolayout-orientation-selector",label:`${t("common.orientation")}*`,className:"mt-8",value:o,options:a.map((e=>({label:e,value:e}))),onChange:e=>i(e.target.value)}),(0,zt.jsx)(U.pd,{id:"autolayout-ranksep",type:"number",label:"ranksep*",min:0,classNameRoot:"mt-6",info:`${t("diagrams_settings.ranksep_description")}`,value:s,onChange:e=>c(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-inner-margin",type:"number",label:`${t("diagrams_settings.subgraph_inner_margin")}`,min:0,classNameRoot:"mt-6",value:u,onChange:e=>d(Number.parseFloat(e.target.value))}),(0,zt.jsx)(U.pd,{id:"autolayout-subgraph-outer-margin",type:"number",label:`${t("diagrams_settings.subgraph_outer_margin")}`,min:0,classNameRoot:"mt-6",value:g,onChange:e=>p(Number.parseFloat(e.target.value))})]}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onAutoLayoutConfigured(n,o,_,s,u,g),e.hideModal()}}])})]})},Ut=Ft().memo((e=>{var t,n,r;const{tagsDirection:a,scrollable:o,diagram:i,handleDiagramHeaderClick:_}=e;return(null==i?void 0:i.diagram_type)&&(0,zt.jsxs)("div",{className:"w-full flex flex-col items-center py-1 pr-3 "+(_?"cursor-pointer":""),onClick:function(){_&&_()},children:[(0,zt.jsxs)("div",{className:"flex w-full my-auto "+("bottom"===a?"flex-col":""),children:[(0,zt.jsxs)("div",{className:"text-lg text-accent-primary grow truncate",children:[(l=i.diagram_type,(0,G.capitalCase)((0,G.noCase)(l)))," Diagram -"," ",i.diagram_name]}),(null==(t=i.diagram_spec)?void 0:t.tags)&&(0,zt.jsx)("div",{className:"bottom"===a?"mt-2 mb-5":"",children:(0,zt.jsx)(U.YD,{tags:i.diagram_spec.tags,className:"right"===a?"float-right top-1/2 -translate-y-1/2":""})})]}),(null==(n=i.diagram_spec)?void 0:n.description)&&(0,zt.jsx)("div",{className:"w-full text-sm whitespace-break-spaces "+(o?"":"line-clamp-3"),children:null==(r=i.diagram_spec)?void 0:r.description})]});var l})),qt=Ft().memo((e=>{const{setDiagramInfoPanelVisible:t,diagram:n,hidden:r}=e;return(0,zt.jsxs)("div",{className:r?"hidden":"absolute z-[1] bg-dark-primary bg-opacity-90 w-full p-2 max-h-96 overflow-auto",children:[(0,zt.jsx)(U.K0,{icon:We.faXmark,className:"absolute right-5 top-3",onClick:()=>t(!1)}),n&&(0,zt.jsx)(Ut,{diagram:n,tagsDirection:"bottom",scrollable:!0})]})})),Vt=e=>{const{t}=(0,Mt.useTranslation)(),[n,r]=(0,jt.useState)(e.settings);return(0,zt.jsxs)("div",{children:[(0,zt.jsx)("div",{className:"modal__body",children:(0,zt.jsx)("div",{className:"flex flex-col",children:(0,zt.jsxs)("div",{className:"flex flex-row",children:[(0,zt.jsxs)("span",{children:[t("diagrams_settings.grid_enabled"),"*:"]}),(0,zt.jsx)(U.sx,{id:"autolayout-status",className:"ml-5",value:n.gridEnabled,options:[{label:t("common.enabled"),value:!0},{label:t("common.disabled"),value:!1}],onChange:e=>{r(Object.assign({},n,{gridEnabled:e}))}})]})})}),(0,zt.jsx)("div",{className:"modal__footer",children:(0,U.CL)([{key:"button-cancel",children:(0,zt.jsx)("span",{children:t("common.cancel")}),"data-te-modal-dismiss":!0},{key:"button-save",children:(0,zt.jsx)("span",{children:t("common.save")}),onClick:function(){e.onSettingsChanged(n),e.hideModal()}}])})]})};var Qt=n(735),Jt=n(691);const Kt=["auto_layout"],en=["auto_layout"],tn=(0,jt.forwardRef)(((e,t)=>{const{readOnly:n,diagram:a,diagramListener:o,diagramDesignViewToolbarCommands:i,saveDiagram:l,diagramsThemeSettings:s}=e,{t:c}=(0,Mt.useTranslation)(),u=(0,jt.useRef)(),d=(0,jt.useRef)(null),g=(0,jt.useRef)(null),{ref:p}=(0,Pt.useResizeDetector)(),b=(0,jt.useRef)(),f=(0,jt.useRef)(!1),m=(0,jt.useRef)(!1),w=(0,jt.useRef)(!1),[h,y]=(0,jt.useState)([]),[O,S]=(0,jt.useState)([]),[E,x]=(0,jt.useState)(!1),[T,R]=(0,jt.useState)(),{modal:C,showModal:I,hideModal:D}=(0,U.hS)();let k=b.current,L=a;function A(){f.current=!0,n||function(){if(!w.current){const e=z();e&&y((t=>[...t,e]))}}()}function N(t){const n={fireRightClick:!0,fireMiddleClick:!0,stopContextMenu:!0,backgroundColor:"white",readOnly:e.readOnly,enableSnapToGrid:!0},r=new U.vL(d.current,n);r.on("object:added",A),r.on("object:removed",A),r.on(_,A),r.on("mouse:down",(()=>m.current=!0)),r.on("mouse:out",(()=>m.current=!1)),r.codingFeaturesEnabled="desktop"===e.target,f.current=!1,t&&(r.setZoom(t.zoom),r.relativePan(new q.fabric.Point(t.pan.panX,t.pan.panY))),u.current=r}function j(){u.current&&(u.current.dispose(),u.current=void 0)}function F(e){j(),N(e)}function M(){var e,t;return{zoom:null!=(e=null==(t=u.current)?void 0:t.getZoom())?e:1,pan:ne(u.current)}}async function P(){var e;if(null!=(e=b.current)&&e.diagram_name&&b.current.diagram_type&&u.current){const e="png";console.debug(`Exporting to ${e}`);const t=u.current.viewportTransform;u.current.viewportTransform=q.fabric.iMatrix.slice(0);let{width:n,height:r,left:a,top:o}=J(u.current.getObjects());n&&r&&a&&o&&(n+=50,r+=50,a-=25,o-=25),await async function(e,t,n,r){return(0,Yt.invoke)("export_diagram_to_file",{diagramDataUrl:n,format:r,diagramName:e,diagramType:t})}(b.current.diagram_name,b.current.diagram_type,u.current.toDataURL({format:e,enableRetinaScaling:!0,width:n,height:r,left:a,top:o}),e).then((e=>Ne.toast.success(c("common.info.diagram_exported",{pathExportedDiagram:e})))).catch((e=>Ne.toast.success(e.msg))),u.current.viewportTransform=t}}function z(){if(b.current&&b.current.diagram_plantuml&&b.current.diagram_spec&&b.current.diagram_name&&b.current.diagram_type){var e,t;const n=void 0!==(null==(e=u.current)?void 0:e.autoLayoutEnabled)?u.current.autoLayoutEnabled:b.current.diagram_spec.auto_layout_enabled;let r=[];return n||(r=(e=>{const t=Array();return e&&e.getObjects().forEach((e=>{if(e instanceof le){const n=e.getUpdatedSpecs();n&&t.push(n)}})),t})(u.current)),Object.assign({},b.current.diagram_spec,{auto_layout_enabled:n,auto_layout_orientation:void 0!==(null==(t=u.current)?void 0:t.autoLayoutOrientation)?u.current.autoLayoutOrientation:b.current.diagram_spec.auto_layout_orientation,elements_specs:r})}}function B(){return f.current}function H(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_enabled}function W(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_orientation:"TopToBottom"}function Y(){var e;return!(null==(e=b.current)||!e.diagram_spec)&&b.current.diagram_spec.auto_layout_only_straight_arrows}function X(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_ranksep:0}function Z(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_inner_margin:0}function G(){var e;return null!=(e=b.current)&&e.diagram_spec?b.current.diagram_spec.auto_layout_subgraph_outer_margin:6.5}function V(e,t,r,a,o,i){u.current&&b.current&&!n&&I({id:"showAutoLayoutConfigurationModal",title:`${c("diagram_editor.configure_auto_layout")}`,body:(0,zt.jsx)(Gt,{enabled:e,orientation:t,generateOnlyStraightArrows:r,ranksep:a,subgraphInnerMargin:o,subgraphOuterMargin:i,hideModal:D,onAutoLayoutConfigured:(e,t,r,a,o,i)=>{u.current&&b.current&&!n&&(u.current.autoLayoutEnabled=e,u.current.autoLayoutOrientation=t,b.current.diagram_spec&&(b.current.diagram_spec.auto_layout_only_straight_arrows=r,b.current.diagram_spec.auto_layout_ranksep=a,b.current.diagram_spec.auto_layout_subgraph_inner_margin=o,b.current.diagram_spec.auto_layout_subgraph_outer_margin=i),f.current=!0,l&&l())}}),buttons:!1})}function Q(){var e;if(null!=(e=b.current)&&e.diagram_spec)return{gridEnabled:b.current.diagram_spec.grid_enabled}}function K(e){e&&u.current&&b.current&&!n&&I({id:"showDiagramDesignViewSettingsModal",title:`${c("common.settings")}`,body:(0,zt.jsx)(Vt,{settings:e,hideModal:D,onSettingsChanged:e=>{var t;u.current&&b.current&&!n&&(e.gridEnabled?u.current.enableGrid():u.current.disableGrid(),b.current.diagram_spec&&(b.current.diagram_spec.grid_enabled=null!=(t=e.gridEnabled)&&t),f.current=!0,l&&l())}}),buttons:!1})}function ee(){var t,n;null!=(t=b.current)&&t.diagram_spec&&u.current&&!e.readOnly&&(null!=(n=b.current)&&n.diagram_spec.auto_layout_enabled?u.current.setReadOnly():u.current.setReadAndWrite())}function te(e){var t;u.current&&(F(M()),ee(),T?T.renderDiagram(u.current,o,Object.assign({},b.current,{diagram_spec:e}),s):console.error("DiagramRenderer not initialized"),null==(t=u.current)||t.renderAll(),f.current=!0,console.debug("Load history completed"))}function re(){if(w.current=!0,oe()){const e=h[h.length-1],t=h[h.length-2];b.current&&e&&t&&(console.debug("Undo design view"),y((e=>e.filter(((t,n)=>n!==e.length-1)))),S((t=>[...t,e])),te(t))}w.current=!1}function ae(){if(console.debug("Redo design view"),w.current=!0,ie()){const e=O[O.length-1];e&&(S((e=>e.filter(((t,n)=>n!==e.length-1)))),y((t=>[...t,e])),te(e))}w.current=!1}function oe(){return!n&&h.length>1}function ie(){return!n&&O.length>0}return k&&(k=(0,r.A)(k,Kt)),L&&(L=(0,r.A)(L,en)),(0,$.$r)(k,L)||(b.current=a),(0,jt.useImperativeHandle)(t,(()=>({resetCanvas:F,getCanvasState:M,exportDiagram:P,getUpdatedDiagramSpec:z,isDiagramChanged:B,undo:re,redo:ae,canUndo:oe,canRedo:ie,isAutoLayoutEnabled:H,autoLayoutOrientation:W,updateAutoLayoutOptions:V,isGenerateOnlyStraightArrowsEnabled:Y,ranksep:X,updateDiagramDesignViewSettings:K,diagramDesignViewSettings:Q,subgraphInnerMargin:Z,subgraphOuterMargin:G}))),(0,jt.useLayoutEffect)((()=>{var e,t,n,r,a,o,i;console.debug("Diagram Design View changed layout"),d.current&&null!=(e=g.current)&&e.clientWidth&&null!=(t=g.current)&&t.clientHeight&&(console.debug("Canvas resize"),d.current.parentElement&&(d.current.parentElement.style.display="none"),null==(n=u.current)||n.setWidth(null==(r=g.current)?void 0:r.getBoundingClientRect().width),null==(a=u.current)||a.setHeight(null==(o=g.current)?void 0:o.getBoundingClientRect().height),d.current.parentElement&&(d.current.parentElement.style.display="flex"),null==(i=u.current)||i.renderAll())})),(0,jt.useEffect)((()=>(new(Zt())(v.FONT.FAMILY).load(null,36e4).then((function(){u.current&&(function(e){e.getObjects().forEach((e=>e.set("dirty",!0)))}(u.current),u.current.renderAll())})),d.current&&!u.current&&N(),()=>{j()})),[]),(0,jt.useEffect)((()=>{function e(e){n||"Z"!==e.key.toUpperCase()&&"Y"!==e.key.toUpperCase()||!e.ctrlKey&&!e.metaKey||!m.current||(e.preventDefault(),"Z"===e.key.toUpperCase()?re():"Y"===e.key.toUpperCase()&&ae())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[n,h,O]),(0,jt.useEffect)((()=>{var e,t;u.current&&b.current&&T&&(w.current=!0,console.debug("Rendering the diagram"),ee(),T.renderDiagram(u.current,o,b.current,s),null==(e=u.current)||e.renderAll(),f.current=!1,w.current=!1,n||(w.current=!1,null!=(t=b.current)&&t.diagram_spec&&y([b.current.diagram_spec]),S([])))}),[b.current,T]),(0,jt.useEffect)((()=>{var e;!n&&i&&(console.debug("Update design toolbar"),null==(e=i.current)||e.forceUpdate())}),[n,h,O,i]),(0,jt.useEffect)((()=>{!async function(){const e=await(new Lt).initialize();R(e)}()}),[]),(0,Qt.useHotkeys)([Jt.Key.Escape],(e=>{var t;u.current&&(e.preventDefault(),null==(t=u.current)||t.discardActiveObject())})),(0,zt.jsxs)("div",{className:"relative h-full w-full",ref:p,children:[C,(0,zt.jsx)(Wt,{canvas:u.current,readOnly:n,diagramInfoPanelVisible:E,setDiagramInfoPanelVisible:x}),(0,zt.jsx)(qt,{diagram:a,hidden:!E,setDiagramInfoPanelVisible:x}),(0,zt.jsx)("div",{className:"h-full w-full flex-row flex-wrap",ref:g,children:(0,zt.jsx)("canvas",{ref:d})})]})}))},636:(e,t,n)=>{n.d(t,{tz:()=>b,rI:()=>g,UW:()=>v,K0:()=>L,pd:()=>Z,vL:()=>x,sx:()=>q,l6:()=>G,YD:()=>U,CL:()=>B,T_:()=>y,hS:()=>Y});var r=n(452),a=n.n(r);require("react-router-dom");var o=n(15),i=n.n(o);n(61);var _=n(732);a().addPluralRule(/Person/,"Persons");var l=n(177),s=n(53);const c="hide.te.dropdown",u="show.te.dropdown",d=i().memo((e=>{var t;const n=(0,o.useRef)(null),[r,a]=(0,o.useState)(!1);function i(e){let t;return t=e.isSepator?(0,_.jsx)("li",{className:"relative",children:(0,_.jsx)("span",{className:"bg-third my-1 block h-px w-full"})},e.id):(0,_.jsxs)("li",{className:"relative",children:[(0,_.jsxs)("button",{disabled:void 0!==e.disabled&&e.disabled,id:e.id,className:"\n hover:bg-link\n flex\n w-full\n items-center\n whitespace-nowrap\n px-4\n py-1\n text-left\n text-sm\n hover:text-white\n ","data-te-dropdown-item-ref":!0,onClick:t=>{e.onClick&&e.onClick(t)},children:[e.subMenuItems&&e.subMenuItems.length>0&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("span",{className:"mr-16 basis-11/12 pr-1",children:e.label}),(0,_.jsx)("span",{className:"basis-1/12 text-right",children:(0,_.jsx)(s.FontAwesomeIcon,{icon:l.faAngleRight})})]}),(!e.subMenuItems||0===e.subMenuItems.length)&&e.label]}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id),t}function d(e,t,n){const r=[];if(n&&n.length>0){for(const e of n)r.push(i(e));return(0,_.jsx)("ul",{className:`\n bg-secondary\n text-accent-primary\n absolute\n z-50\n m-0\n w-auto\n min-w-max\n list-none\n rounded-md\n border-none\n bg-clip-padding\n py-2\n shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n [&[data-te-dropdown-show]]:block\n ${e?" dropdown-menu float-left hidden origin-top-left":" right-px top-0"}\n `,id:`menu-${t}`,"aria-labelledby":t,"data-te-dropdown-menu-ref":!0,children:r})}return(0,_.jsx)("div",{"data-te-dropdown-menu-ref":!0})}const g=t=>{e.increaseOpenedMenu&&e.setLastOpenedMenu&&e.decreaseOpenedMenu&&(t.type===u?(a(!0),e.increaseOpenedMenu(),e.setLastOpenedMenu(e.id)):(a(!1),e.decreaseOpenedMenu()))};return(0,o.useEffect)((()=>{const t=n.current;return null==t||t.addEventListener(c,g),null==t||t.addEventListener(u,g),(e.alwaysOpen&&!r||e.lastOpenedMenu!==e.id&&r)&&(null==t||t.dispatchEvent(new MouseEvent("click"))),()=>{null==t||t.removeEventListener(c,g),null==t||t.removeEventListener(u,g)}})),(0,_.jsxs)("div",{className:`relative ${null!=(t=e.className)?t:""}`,"data-te-dropdown-ref":!0,children:[(0,_.jsx)("button",{className:`\n ${r?"":" bg-dark-primary text-accent-primary"} \n hover:bg-primary\n flex\n items-center\n whitespace-nowrap\n rounded-md\n px-2\n py-0.5\n text-sm hover:text-white\n hover:shadow-[0_1px_2px_rgba(0,0,0,0.6)]\n focus:outline-none\n focus:ring-0\n ${r?" bg-primary show text-white":""}\n ${e.hidden?" h-0 opacity-0":""}\n ${e.buttonClassName?` ${e.buttonClassName}`:""}\n `,type:"button",id:e.id,"aria-expanded":"false",ref:n,"data-te-dropdown-toggle-ref":!0,"data-te-dropdown-animation":"off",onMouseEnter:t=>{e.atLeastOneOpenedMenu&&e.atLeastOneOpenedMenu()&&!r&&t.target.dispatchEvent(new MouseEvent("click"))},children:e.label}),d(e.isHeaderMenuItem,e.id,e.subMenuItems)]},e.id)})),g=i().memo((e=>{var t;const[n,r]=(0,o.useState)(0),[a,i]=(0,o.useState)("");function l(){r((e=>e+1))}function s(){r((e=>e-1))}function c(){return n>0}return(0,_.jsx)("div",{className:`dropdown-menu group flex ${c()?"open":""} ${null!=(t=e.className)?t:""}`,children:function(){const t=[];if(e.menuItemsProps&&e.menuItemsProps.length>0)for(const n of e.menuItemsProps)t.push((0,o.createElement)(d,Object.assign({},n,{key:n.id,increaseOpenedMenu:l,decreaseOpenedMenu:s,atLeastOneOpenedMenu:c,lastOpenedMenu:a,setLastOpenedMenu:i})));return t}()})})),p=g,b=()=>{const{anchorPoint:e,show:t,contextMenuItems:n}=(()=>{const[e,t]=(0,o.useState)({x:0,y:0}),[n,r]=(0,o.useState)(!1),[a,i]=(0,o.useState)([]),_=(0,o.useCallback)((e=>{if(e.preventDefault(),(n=e)instanceof CustomEvent&&n instanceof CustomEvent&&Object.keys(n.detail).includes("menuItems")){const n=e.detail.pageX,a=e.detail.pageY;i(e.detail.menuItems),t({x:n,y:a}),r(!0)}var n}),[r,t]),l=(0,o.useCallback)((()=>n?r(!1):null),[n]);return(0,o.useEffect)((()=>(document.addEventListener("click",l),document.addEventListener("contextmenu",_),()=>{document.removeEventListener("click",l),document.removeEventListener("contextmenu",_)}))),{anchorPoint:e,show:n,contextMenuItems:a}})(),r=(0,o.useRef)(),[a,i]=(0,o.useState)((0,_.jsx)(_.Fragment,{}));return r.current!==t&&(r.current=t),(0,o.useEffect)((()=>{void 0!==r.current&&(r.current?i((0,_.jsx)("div",{hidden:!t,className:"context-menu absolute",style:{top:e.y,left:e.x},children:(0,_.jsx)(p,{menuItemsProps:n})})):i((0,_.jsx)(_.Fragment,{})))}),[r.current]),a},f=require("js-cookie");var m=n.n(f);const w=require("react-ga4");var h=n.n(w);function y(e){const{initTE:t,initGA:n}=e,[r,a]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{(async()=>{t&&await t(),n&&function(e,t){var n;let r=m().get("CookieConsent");r=null==(n=r)?void 0:n.replace(/{/gi,'{"').replace(/:/gi,'":').replace(/,/gi,',"').replace(/'/gi,'"'),!e&&r&&JSON.parse(r).statistics&&({NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID&&h().initialize([{trackingId:{NODE_ENV:"production"}.NEXT_PUBLIC_GA_MEASUREMENT_ID,gtagOptions:{anonymize_ip:!0,send_page_view:!1}}]),t(!0)),e&&(console.debug(`Logging pageview for ${window.location.pathname}`),h().send({hitType:"pageview",page:window.location.pathname}))}(r,a)})()}),[r,n,t]),{isGAInitialized:r}}const v={CONTEXT_MENU:"contextmenu"};var O=n(489);const S="idle",E="panning";class x extends O.fabric.Canvas{constructor(e,t){super(e,t),this.gridEnabled=void 0,this.gridBgColor=void 0,R(this),C(this)}initialize(e,t){return this.gridEnabled=null==t?void 0:t.gridEnabled,R(this),C(this),!0===(null==t?void 0:t.readOnly)&&this.setReadOnly(),!0===(null==t?void 0:t.gridEnabled)&&this.enableGrid(),!0===(null==t?void 0:t.enableSnapToGrid)&&function(e,t){const n=null!=t?t:5;e.on("object:moving",(e=>{var t,r,a;null==(t=e.target)||t.set({left:Math.round((null!=(r=e.target.left)?r:0)/n)*n,top:Math.round((null!=(a=e.target.top)?a:0)/n)*n})}))}(this,t.gridSize),super.initialize(e,t)}isReadOnly(){return O.fabric.Object.prototype.lockMovementX&&O.fabric.Object.prototype.lockMovementY&&O.fabric.Object.prototype.lockRotation&&O.fabric.Object.prototype.lockScalingFlip&&O.fabric.Object.prototype.lockScalingX&&O.fabric.Object.prototype.lockScalingY&&O.fabric.Object.prototype.lockSkewingX&&O.fabric.Object.prototype.lockSkewingY}setReadOnly(){O.fabric.Object.prototype.lockMovementX=!0,O.fabric.Object.prototype.lockMovementY=!0,O.fabric.Object.prototype.lockRotation=!0,O.fabric.Object.prototype.lockScalingFlip=!0,O.fabric.Object.prototype.lockScalingX=!0,O.fabric.Object.prototype.lockScalingY=!0,O.fabric.Object.prototype.lockSkewingX=!0,O.fabric.Object.prototype.lockSkewingY=!0}setReadAndWrite(){O.fabric.Object.prototype.lockMovementX=!1,O.fabric.Object.prototype.lockMovementY=!1,O.fabric.Object.prototype.lockRotation=!1,O.fabric.Object.prototype.lockScalingFlip=!1,O.fabric.Object.prototype.lockScalingX=!1,O.fabric.Object.prototype.lockScalingY=!1,O.fabric.Object.prototype.lockSkewingX=!1,O.fabric.Object.prototype.lockSkewingY=!1}zoomIn(){this.setZoom(1.1*this.getZoom())}zoomOut(){this.setZoom(this.getZoom()/1.1)}resetZoom(){this.setZoom(1)}panLeft(){this.relativePan(new O.fabric.Point(5,0))}panRight(){this.relativePan(new O.fabric.Point(-5,0))}panUp(){this.relativePan(new O.fabric.Point(0,5))}panDown(){this.relativePan(new O.fabric.Point(0,-5))}resetPan(){this.absolutePan(new O.fabric.Point(0,0))}isGridEnabled(){var e;return null!=(e=this.gridEnabled)&&e}enableGrid(){if(!this.gridEnabled){this.gridEnabled=!0,this.gridBgColor=this.backgroundColor;const e=`\n<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><rect width="160" height="160" fill="${this.gridBgColor}" /><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><rect x="0.38" y="0.38" width="160" height="160" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.75px"/><line x1="0.38" y1="140.38" x2="160.38" y2="140.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="120.38" x2="160.38" y2="120.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="100.38" x2="160.38" y2="100.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="80.38" x2="160.38" y2="80.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.5px"/><line x1="0.38" y1="60.38" x2="160.38" y2="60.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="40.38" x2="160.38" y2="40.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="0.38" y1="20.38" x2="160.38" y2="20.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="140.38" y1="0.38" x2="140.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="120.38" y1="0.38" x2="120.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="100.38" y1="0.38" x2="100.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="80.38" y1="0.38" x2="80.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.5px"/><line x1="60.38" y1="0.38" x2="60.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="40.38" y1="0.38" x2="40.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/><line x1="20.38" y1="0.38" x2="20.38" y2="160.38" style="fill:none;stroke:#bcbec0;stroke-miterlimit:10;stroke-width:0.25px"/></g></g></svg>\n`,t=new Blob([e],{type:"image/svg+xml"}),n=URL.createObjectURL(t);O.fabric.Image.fromURL(n,(e=>{var t,n;e.scaleToWidth(null!=(t=this.width)?t:0),e.scaleToHeight(null!=(n=this.height)?n:0);const r=new O.fabric.Pattern({source:e.getElement(),repeat:"repeat"});this.setBackgroundColor(r,this.renderAll.bind(this))}))}}disableGrid(){this.gridEnabled&&(this.gridEnabled=!1,this.gridBgColor&&(this.setBackgroundColor(this.gridBgColor,this.renderAll.bind(this)),this.gridBgColor=void 0))}}function T(e){return 3===e.button}function R(e){e.on("mouse:wheel",(function(t){const n=t.e.deltaY;let r=e.getZoom();r*=.999**n,r>20&&(r=20),r<.01&&(r=.01),e.zoomToPoint({x:t.e.offsetX,y:t.e.offsetY},r),t.e.preventDefault(),t.e.stopPropagation()}))}function C(e){let t,n,r=S;e.discardActiveObject(),e.on("mouse:up",(function(t){T(t)&&(r=S,e.defaultCursor="default")})),e.on("mouse:down",(a=>{T(a)&&(e.defaultCursor="move",r=E,t=a.e.clientX,n=a.e.clientY)})),e.on("mouse:move",(a=>{if(r===E&&a&&a.e){let r=0,o=0;t&&(r=a.e.clientX-t),n&&(o=a.e.clientY-n),t=a.e.clientX,n=a.e.clientY;const i=new O.fabric.Point(r,o);e.relativePan(i),e.fire("moved")}}))}var I=n(416),D=n(385);const k=["icon","classNameIcon","classNameContent"],L=i().memo((e=>{const{icon:t,classNameIcon:n,classNameContent:r}=e,a=(0,I.A)(e,k),o=(0,D.Cp)(e);return(0,_.jsxs)("button",Object.assign({},a,o,{className:`${e.className} text-accent-secondary hover:text-accent-primary [&.active]:text-accent-primary disabled:hover:text-accent-secondary disabled:opacity-50`,children:[(0,_.jsx)(s.FontAwesomeIcon,{icon:null!=t?t:l.faXmark,className:null!=n?n:""}),(0,_.jsx)("div",{className:r,children:e.children})]}))})),A=(require("@tanstack/react-table"),i().memo((e=>{const{className:t}=e;return(0,_.jsx)("div",{className:`inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${t}`,role:"status",children:(0,_.jsx)("span",{className:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]",children:"Loading..."})})}))),N=["children","isLoading","disabled"],j=i().memo((e=>{const t=(0,D.Cp)(e),{children:n,isLoading:r,disabled:a}=e,o=(0,I.A)(e,N);return(0,_.jsxs)("button",Object.assign({},o,t,{disabled:a||r,type:"button","data-te-toggle":"button",className:`button--primary inline-block min-w-[75px] rounded px-5 py-2 text-xs font-medium uppercase leading-tight shadow-md transition duration-75 ease-in-out hover:shadow-lg focus:shadow-lg focus:outline-none focus:ring-0 active:shadow-lg ${e.className}`,children:[r&&(0,_.jsx)(A,{className:"icon !h-4 !w-4"}),!r&&n]}))})),F="modalRoot";var M=n(221);const P=["key"],z="hidden.te.modal";function B(e){const t=[];return"boolean"!=typeof e&&e&&e.forEach(((e,n,r)=>{const a=(0,D.Cp)(e),{key:o}=e,i=(0,I.A)(e,P);t.push((0,_.jsx)(j,Object.assign({},i,a,{className:`${0!==n&&r.length>1?"ml-3":""} ${e.className}`}),o))})),t}const H=(0,o.forwardRef)(((e,t)=>{var n;const{id:r,onHiddenModal:a}=e,i=null!=(n=e.size)?n:"md",c=(0,o.useRef)();return(0,o.useEffect)((()=>{function e(){a&&a()}const t=document.getElementById(r);return!c.current&&t&&(c.current=new M.Modal(t)),t&&t.addEventListener(z,e),()=>{t&&t.removeEventListener(z,e)}}),[r,a]),(0,o.useImperativeHandle)(t,(()=>({showModal:()=>{c.current.show()},hideModal:()=>{c.current.hide(),c.current=void 0}}))),(0,_.jsx)("div",{"data-te-modal-init":!0,className:"fixed left-0 top-8 bottom-0 z-[1055] hidden h-auto w-full overflow-y-auto overflow-x-hidden outline-none",id:r,tabIndex:-1,"aria-labelledby":`${r}Label`,children:(0,_.jsx)("div",{"data-te-modal-dialog-ref":!0,className:"pointer-events-none relative flex min-h-[calc(100%-1rem)] w-auto translate-y-[-50px] items-center justify-center opacity-0 transition-all duration-300 ease-in-out min-[576px]:mx-5 min-[576px]:my-7 min-[576px]:min-h-[calc(100%-3.5rem)]",children:(0,_.jsxs)("div",{className:`pointer-events-auto relative flex ${(()=>{switch(i){case"sm":return"w-[25rem]";case"md":return"w-[40rem]";case"lg":return"w-[70rem]";case"full":return"w-full"}})()} ${"full"===e.size?"mx-5":""} bg-primary flex-col rounded-md border-none bg-clip-padding text-current shadow-lg outline-none`,children:[(0,_.jsxs)("div",{className:"border-secondary flex flex-shrink-0 items-center justify-between rounded-t-md border-b-2 border-opacity-50 p-4",children:[(0,_.jsx)("h5",{className:"text-accent-primary text-xl font-medium leading-normal pointer-events-none",id:`${r}Label`,children:e.title}),(0,_.jsx)("button",{type:"button",className:"box-content rounded-none border-none hover:no-underline hover:opacity-75 focus:opacity-100 focus:shadow-none focus:outline-none","data-te-modal-dismiss":!0,"aria-label":"Close",children:(0,_.jsx)(s.FontAwesomeIcon,{icon:l.faXmark})})]}),"boolean"!=typeof e.buttons&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"modal__body",children:e.body}),(0,_.jsx)("div",{className:"modal__footer",children:B(e.buttons)})]}),"boolean"==typeof e.buttons&&e.body]})})})})),W=require("react-dom");function Y(){const[e,t]=(0,o.useState)(),[n,r]=(0,o.useState)(!0),a=(0,o.useRef)(null);return(0,o.useEffect)((()=>{a.current&&(n?a.current.showModal():a.current.hideModal())}),[e,n]),{modal:e,showModal:function(e){const n=document.getElementById(F);n&&(t((0,W.createPortal)((0,_.jsx)(H,Object.assign({},e,{ref:a,onHiddenModal:()=>{t(void 0)}})),n)),r(!0))},hideModal:function(){r(!1)}}}const X=["label","info","allowedChars","classNameRoot","key"],Z=i().memo((e=>{const[t,n]=(0,o.useState)(e.value),{info:r,classNameRoot:a,key:i}=e,l=(0,I.A)(e,X),s=(0,D.Cp)(e);return(0,o.useEffect)((()=>{n(e.value)}),[e.value]),(0,_.jsxs)("div",{className:`relative mb-3 ${null!=a?a:""}`,children:[(0,_.jsx)("input",Object.assign({maxLength:200},l,s,{onChange:function(r){!e.allowedChars||""===r.currentTarget.value||e.allowedChars.test(r.currentTarget.value)?(n(r.currentTarget.value),e.onChange&&e.onChange(r)):t&&(r.currentTarget.value=t.toString())},"data-te-input-state-active":!0,className:`peer transition-all duration-200 ease-linear placeholder:opacity-0 motion-reduce:transition-none ${e.className}`,placeholder:e.label}),i),(0,_.jsx)("label",{htmlFor:e.id,className:(null!=t&&""!==t?"input__label -translate-y-[1.1rem] scale-[0.9]":"")+" peer-focus:text-link peer-focus:input__label pointer-events-none absolute left-3 top-0 mb-0 max-w-[90%] origin-[0_0] truncate pt-[0.37rem] leading-[1.6] drop-shadow-[0_35px_35px_rgba(0,0,0,0.25)] transition-all duration-200 ease-out peer-focus:-translate-y-[1.1rem] peer-focus:scale-[0.9] motion-reduce:transition-none",children:e.label}),r&&(0,_.jsx)("div",{className:"text-sm px-3",children:r})]})})),$=["label","className","key"],G=i().memo((e=>{const{label:t,className:n,key:r}=e,a=(0,I.A)(e,$),i=(0,D.Cp)(e);return(0,o.useEffect)((()=>{const t=document.querySelector(`#${e.id}`);M.Select.getInstance(t)||new M.Select(document.querySelector(`#${e.id}`),{},{dropdown:"select__dropdown",formCheckInput:"bg-red-400 checked:after:border-red-500",selectInput:"peer select__input",selectOption:"select__option data-[te-select-option-selected]:data-[te-input-state-active]:link",selectLabelSizeDefault:"select__label-size-default",selectLabel:"select__label",selectArrow:"select__arrow top-[0.65rem]"})})),(0,_.jsxs)("div",{className:`relative mb-3 ${n}`,children:[(0,_.jsx)("select",Object.assign({"data-te-select-init":!0},a,i,{children:function(){const t=[];return e.options.forEach((e=>{var n;t.push((0,_.jsx)("option",{value:e.value,children:e.label},null==(n=e.value)?void 0:n.toString()))})),t}()}),r),(0,_.jsx)("label",{"data-te-select-label-ref":!0,children:t})]})})),U=(require("react-html-parser"),i().memo((({tags:e,className:t})=>(0,_.jsx)("ul",{className:`tags ${null!=t?t:""}`,children:e.map(((e,t)=>(0,_.jsx)("li",{children:e},t)))})))),q=(require("@yaireo/tagify"),e=>{var t;const{className:n,options:r}=e;return(0,_.jsx)("div",{className:`flex justify-center ${null!=n?n:""}`,id:null!=(t=e.id)?t:"",children:r.map(((t,n)=>(0,_.jsxs)("div",{className:"mb-[0.125rem] me-4 inline-block min-h-[1.5rem] ps-[1.5rem]",children:[(0,_.jsx)("input",{className:"relative float-left -ms-[1.5rem] me-1 mt-0.5 h-5 w-5 appearance-none rounded-full border-2 border-solid border-secondary-500 before:pointer-events-none before:absolute before:h-4 before:w-4 before:scale-0 before:rounded-full before:bg-transparent before:opacity-0 before:shadow-checkbox before:shadow-transparent before:content-[''] after:absolute after:z-[1] after:block after:h-4 after:w-4 after:rounded-full after:content-[''] checked:border-accent-secondary checked:before:opacity-[0.16] checked:after:absolute checked:after:left-1/2 checked:after:top-1/2 checked:after:h-[0.625rem] checked:after:w-[0.625rem] checked:after:rounded-full checked:after:border-accent-secondary checked:after:bg-accent-primary checked:after:content-[''] checked:after:[transform:translate(-50%,-50%)] hover:before:opacity-[0.04] hover:before:shadow-black/60 focus:shadow-none focus:outline-none focus:ring-0 focus:before:scale-100 focus:before:opacity-[0.12] focus:before:shadow-black/60 focus:before:transition-[box-shadow_0.2s,transform_0.2s] checked:focus:border-accent-secondary checked:focus:before:scale-100 checked:focus:before:shadow-checkbox checked:focus:before:transition-[box-shadow_0.2s,transform_0.2s] rtl:float-right "+(e.disabled?"":"hover:cursor-pointer"),type:"radio",name:`inlineRadioOptions-${e.id}`,id:`option-${e.id}-${n}`,value:JSON.stringify(t.value),onChange:()=>{e.onChange(t.value)},checked:JSON.stringify(t.value)===JSON.stringify(e.value),disabled:e.disabled}),(0,_.jsx)("label",{className:"mt-px inline-block ps-[0.15rem] "+(e.disabled?"":"hover:cursor-pointer"),htmlFor:e.disabled?void 0:`option-${e.id}-${n}`,children:t.label})]},`radioOption${n}`)))})});require("react-color"),n(735),n(691)},691:e=>{e.exports=require("ts-key-enum")},732:e=>{e.exports=require("react/jsx-runtime")},735:e=>{e.exports=require("react-hotkeys-hook")}},_={};function l(e){var t=_[e];if(void 0!==t)return t.exports;var n=_[e]={id:e,loaded:!1,exports:{}};return i[e](n,n.exports,l),n.loaded=!0,n.exports}e="function"==typeof Symbol?Symbol("webpack queues"):"__webpack_queues__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",n="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",r=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},l.a=(a,o,i)=>{var _;i&&((_=[]).d=-1);var l,s,c,u=new Set,d=a.exports,g=new Promise(((e,t)=>{c=t,s=e}));g[t]=d,g[e]=e=>(_&&e(_),u.forEach(e),g.catch((e=>{}))),a.exports=g,o((a=>{var o;l=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var o=[];o.d=0,a.then((e=>{i[t]=e,r(o)}),(e=>{i[n]=e,r(o)}));var i={};return i[e]=e=>e(o),i}}var _={};return _[e]=e=>{},_[t]=a,_})))(a);var i=()=>l.map((e=>{if(e[n])throw e[n];return e[t]})),s=new Promise((t=>{(o=()=>t(i)).r=0;var n=e=>e!==_&&!u.has(e)&&(u.add(e),e&&!e.d&&(o.r++,e.push(o)));l.map((t=>t[e](n)))}));return o.r?s:i()}),(e=>(e?c(g[n]=e):s(d),r(_)))),_&&_.d<0&&(_.d=0)},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},o=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var n=Object.create(null);l.r(n);var r={};a=a||[null,o({}),o([]),o(o)];for(var i=2&t&&e;"object"==typeof i&&!~a.indexOf(i);i=o(i))Object.getOwnPropertyNames(i).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,l.d(n,r),n},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.v=(e,t,n,r)=>{var a=fetch(l.p+""+n+".module.wasm"),o=()=>a.then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,r))).then((t=>Object.assign(e,t.instance.exports)));return a.then((t=>"function"==typeof WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(t,r).then((t=>Object.assign(e,t.instance.exports)),(e=>{if("application/wasm"!==t.headers.get("Content-Type"))return console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e),o();throw e})):o()))},(()=>{var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e})();var s={};l.r(s),l.d(s,{default:()=>g});var c=l(15),u=l(732);const d=()=>null,g=e=>{const[t,n]=(0,c.useState)((()=>d));return(0,c.useEffect)((()=>{Promise.resolve().then(l.bind(l,334)).then((e=>n((()=>e.default))))}),[]),(0,u.jsx)(t,Object.assign({},e))};module.exports=s})();
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "React library to render C4 Model diagrams created with Keadex Mina.",
|
|
4
4
|
"author": "Keadex <keadex.it@gmail.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.7.0",
|
|
7
7
|
"private": false,
|
|
8
8
|
"homepage": "https://keadex.dev",
|
|
9
9
|
"repository": {
|
|
Binary file
|
|
Binary file
|