@keadex/mina-react
Version:
React library to render C4 Model diagrams created with Keadex Mina.
1 lines • 144 kB
JavaScript
(()=>{"use strict";var e,t,n,r,a,o,i={15:e=>{e.exports=require("react")},39:(e,t,n)=>{n.d(t,{$n:()=>A,tz:()=>p,rI:()=>d,UW:()=>y,K0:()=>k,pd:()=>Y,vL:()=>E,sx:()=>U,l6:()=>$,YD:()=>G,CL:()=>z,T_:()=>w,hS:()=>W});var r=n(452);n.n(r)().addPluralRule(/Person/,"Persons");var a=n(15),o=n.n(a),i=n(177),l=n(53),s=n(732);const _="hide.te.dropdown",c="show.te.dropdown",u=o().memo((e=>{var t;const n=(0,a.useRef)(null),[r,o]=(0,a.useState)(!1);function u(e){let t;return t=e.isSepator?(0,s.jsx)("li",{className:"relative",children:(0,s.jsx)("span",{className:"bg-third my-1 block h-px w-full"})},e.id):(0,s.jsxs)("li",{className:"relative",children:[(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"mr-16 basis-11/12 pr-1",children:e.label}),(0,s.jsx)("span",{className:"basis-1/12 text-right",children:(0,s.jsx)(l.FontAwesomeIcon,{icon:i.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(u(e));return(0,s.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,s.jsx)("div",{"data-te-dropdown-menu-ref":!0})}const g=t=>{e.increaseOpenedMenu&&e.setLastOpenedMenu&&e.decreaseOpenedMenu&&(t.type===c?(o(!0),e.increaseOpenedMenu(),e.setLastOpenedMenu(e.id)):(o(!1),e.decreaseOpenedMenu()))};return(0,a.useEffect)((()=>{const t=n.current;return null==t||t.addEventListener(_,g),null==t||t.addEventListener(c,g),(e.alwaysOpen&&!r||e.lastOpenedMenu!==e.id&&r)&&(null==t||t.dispatchEvent(new MouseEvent("click"))),()=>{null==t||t.removeEventListener(_,g),null==t||t.removeEventListener(c,g)}})),(0,s.jsxs)("div",{className:`relative ${null!=(t=e.className)?t:""}`,"data-te-dropdown-ref":!0,children:[(0,s.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)})),d=o().memo((e=>{var t;const[n,r]=(0,a.useState)(0),[o,i]=(0,a.useState)("");function l(){r((e=>e+1))}function _(){r((e=>e-1))}function c(){return n>0}return(0,s.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,a.createElement)(u,Object.assign({},n,{key:n.id,increaseOpenedMenu:l,decreaseOpenedMenu:_,atLeastOneOpenedMenu:c,lastOpenedMenu:o,setLastOpenedMenu:i})));return t}()})})),g=d,p=()=>{const{anchorPoint:e,show:t,contextMenuItems:n}=(()=>{const[e,t]=(0,a.useState)({x:0,y:0}),[n,r]=(0,a.useState)(!1),[o,i]=(0,a.useState)([]),l=(0,a.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]),s=(0,a.useCallback)((()=>n?r(!1):null),[n]);return(0,a.useEffect)((()=>(document.addEventListener("click",s),document.addEventListener("contextmenu",l),()=>{document.removeEventListener("click",s),document.removeEventListener("contextmenu",l)}))),{anchorPoint:e,show:n,contextMenuItems:o}})(),r=(0,a.useRef)(),[o,i]=(0,a.useState)((0,s.jsx)(s.Fragment,{}));return r.current!==t&&(r.current=t),(0,a.useEffect)((()=>{void 0!==r.current&&(r.current?i((0,s.jsx)("div",{hidden:!t,className:"context-menu absolute",style:{top:e.y,left:e.x},children:(0,s.jsx)(g,{menuItemsProps:n})})):i((0,s.jsx)(s.Fragment,{})))}),[r.current]),o},b=require("js-cookie");var f=n.n(b);const m=require("react-ga4");var h=n.n(m);function w(e){const{initTE:t,initGA:n}=e,[r,o]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{(async()=>{t&&await t(),n&&function(e,t){var n;let r=f().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,o)})()}),[r,n,t]),{isGAInitialized:r}}const y={CONTEXT_MENU:"contextmenu"};var v=n(489);const O="idle",S="panning";class E extends v.fabric.Canvas{constructor(e,t){super(e,t),this.gridEnabled=void 0,this.gridBgColor=void 0,T(this),R(this)}initialize(e,t){return this.gridEnabled=null==t?void 0:t.gridEnabled,T(this),R(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 v.fabric.Object.prototype.lockMovementX&&v.fabric.Object.prototype.lockMovementY&&v.fabric.Object.prototype.lockRotation&&v.fabric.Object.prototype.lockScalingFlip&&v.fabric.Object.prototype.lockScalingX&&v.fabric.Object.prototype.lockScalingY&&v.fabric.Object.prototype.lockSkewingX&&v.fabric.Object.prototype.lockSkewingY}setReadOnly(){v.fabric.Object.prototype.lockMovementX=!0,v.fabric.Object.prototype.lockMovementY=!0,v.fabric.Object.prototype.lockRotation=!0,v.fabric.Object.prototype.lockScalingFlip=!0,v.fabric.Object.prototype.lockScalingX=!0,v.fabric.Object.prototype.lockScalingY=!0,v.fabric.Object.prototype.lockSkewingX=!0,v.fabric.Object.prototype.lockSkewingY=!0}setReadAndWrite(){v.fabric.Object.prototype.lockMovementX=!1,v.fabric.Object.prototype.lockMovementY=!1,v.fabric.Object.prototype.lockRotation=!1,v.fabric.Object.prototype.lockScalingFlip=!1,v.fabric.Object.prototype.lockScalingX=!1,v.fabric.Object.prototype.lockScalingY=!1,v.fabric.Object.prototype.lockSkewingX=!1,v.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 v.fabric.Point(5,0))}panRight(){this.relativePan(new v.fabric.Point(-5,0))}panUp(){this.relativePan(new v.fabric.Point(0,5))}panDown(){this.relativePan(new v.fabric.Point(0,-5))}resetPan(){this.absolutePan(new v.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);v.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 v.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 x(e){return 3===e.button}function T(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 R(e){let t,n,r=O;e.discardActiveObject(),e.on("mouse:up",(function(t){x(t)&&(r=O,e.defaultCursor="default")})),e.on("mouse:down",(a=>{x(a)&&(e.defaultCursor="move",r=S,t=a.e.clientX,n=a.e.clientY)})),e.on("mouse:move",(a=>{if(r===S&&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 v.fabric.Point(r,o);e.relativePan(i),e.fire("moved")}}))}var C=n(416),I=n(454);const D=["icon","classNameIcon","classNameContent"],k=o().memo((e=>{const{icon:t,classNameIcon:n,classNameContent:r}=e,a=(0,C.A)(e,D),o=(0,I.Cp)(e);return(0,s.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,s.jsx)(l.FontAwesomeIcon,{icon:null!=t?t:i.faXmark,className:null!=n?n:""}),(0,s.jsx)("div",{className:r,children:e.children})]}))}));require("@tanstack/react-table"),n(61);const L=o().memo((e=>{const{className:t}=e;return(0,s.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,s.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"],A=o().memo((e=>{const t=(0,I.Cp)(e),{children:n,isLoading:r,disabled:a}=e,o=(0,C.A)(e,N);return(0,s.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,s.jsx)(L,{className:"icon !h-4 !w-4"}),!r&&n]}))})),j="modalRoot";var F=n(221);const M=["key"],P="hidden.te.modal";function z(e){const t=[];return"boolean"!=typeof e&&e&&e.forEach(((e,n,r)=>{const a=(0,I.Cp)(e),{key:o}=e,i=(0,C.A)(e,M);t.push((0,s.jsx)(A,Object.assign({},i,a,{className:`${0!==n&&r.length>1?"ml-3":""} ${e.className}`}),o))})),t}const B=(0,a.forwardRef)(((e,t)=>{var n;const{id:r,onHiddenModal:o}=e,_=null!=(n=e.size)?n:"md",c=(0,a.useRef)();return(0,a.useEffect)((()=>{function e(){o&&o()}const t=document.getElementById(r);return!c.current&&t&&(c.current=new F.Modal(t)),t&&t.addEventListener(P,e),()=>{t&&t.removeEventListener(P,e)}}),[r,o]),(0,a.useImperativeHandle)(t,(()=>({showModal:()=>{c.current.show()},hideModal:()=>{c.current.hide(),c.current=void 0}}))),(0,s.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,s.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,s.jsxs)("div",{className:`pointer-events-auto relative flex ${(()=>{switch(_){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,s.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,s.jsx)("h5",{className:"text-accent-primary text-xl font-medium leading-normal pointer-events-none",id:`${r}Label`,children:e.title}),(0,s.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,s.jsx)(l.FontAwesomeIcon,{icon:i.faXmark})})]}),"boolean"!=typeof e.buttons&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"modal__body",children:e.body}),(0,s.jsx)("div",{className:"modal__footer",children:z(e.buttons)})]}),"boolean"==typeof e.buttons&&e.body]})})})})),H=require("react-dom");function W(){const[e,t]=(0,a.useState)(),[n,r]=(0,a.useState)(!0),o=(0,a.useRef)(null);return(0,a.useEffect)((()=>{o.current&&(n?o.current.showModal():o.current.hideModal())}),[e,n]),{modal:e,showModal:function(e){const n=document.getElementById(j);n&&(t((0,H.createPortal)((0,s.jsx)(B,Object.assign({},e,{ref:o,onHiddenModal:()=>{t(void 0)}})),n)),r(!0))},hideModal:function(){r(!1)}}}const X=["label","info","allowedChars","classNameRoot","key"],Y=o().memo((e=>{const[t,n]=(0,a.useState)(e.value),{info:r,classNameRoot:o,key:i}=e,l=(0,C.A)(e,X),_=(0,I.Cp)(e);return(0,a.useEffect)((()=>{n(e.value)}),[e.value]),(0,s.jsxs)("div",{className:`relative mb-3 ${null!=o?o:""}`,children:[(0,s.jsx)("input",Object.assign({maxLength:200},l,_,{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,s.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,s.jsx)("div",{className:"text-sm px-3 mt-1",children:r})]})})),Z=["label","className","key"],$=o().memo((e=>{const{label:t,className:n,key:r}=e,o=(0,C.A)(e,Z),i=(0,I.Cp)(e);return(0,a.useEffect)((()=>{const t=document.querySelector(`#${e.id}`);F.Select.getInstance(t)||new F.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,s.jsxs)("div",{className:`relative mb-3 ${n}`,children:[(0,s.jsx)("select",Object.assign({"data-te-select-init":!0},o,i,{children:function(){const t=[];return e.options.forEach((e=>{var n;t.push((0,s.jsx)("option",{value:e.value,children:e.label},null==(n=e.value)?void 0:n.toString()))})),t}()}),r),(0,s.jsx)("label",{"data-te-select-label-ref":!0,children:t})]})})),G=(require("react-html-parser"),o().memo((({tags:e,className:t})=>(0,s.jsx)("ul",{className:`tags ${null!=t?t:""}`,children:e.map(((e,t)=>(0,s.jsx)("li",{children:e},t)))})))),U=(require("@yaireo/tagify"),e=>{var t;const{className:n,options:r}=e;return(0,s.jsx)("div",{className:`flex justify-center ${null!=n?n:""}`,id:null!=(t=e.id)?t:"",children:r.map(((t,n)=>(0,s.jsxs)("div",{className:"mb-[0.125rem] me-4 inline-block min-h-[1.5rem] ps-[1.5rem]",children:[(0,s.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,s.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),n(423),require("react-router-dom")},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,"1b07b76204f7689b9a0c",{"./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_function:r.PRY,__wbindgen_is_string:r.GuA,__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_instanceof_FileSystemFileHandle_d3d037cf85ee546c:r.KA3,__wbg_createWritable_b4ed240dc879905e:r.kPb,__wbg_getFile_2607bc0123c724e0:r.ycy,__wbg_setkeepexistingdata_ee7c8cb466e9477f:r.aKt,__wbg_component_unwrap:r.dT0,__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_point_new:r.nA9,__wbg_diagramelementspec_new:r.Dr_,__wbg_shape_new:r._cl,__wbg_person_new:r.c1W,__wbg_softwaresystem_new:r.dM0,__wbg_boundary_new:r.HCo,__wbg_container_new:r.e57,__wbg_component_new:r.WJm,__wbg_deploymentnode_new:r.ezj,__wbg_relationship_new:r.NpJ,__wbg_minaerror_new:r.EkI,__wbg_new_8a6f238a6ece86ea:r.$Pc,__wbg_stack_0ed75d68575b0f3c:r.x$X,__wbg_error_7534b8e9a36f1ab4:r.WYM,__wbg_queueMicrotask_97d92b4fcc8a61c5:r._mt,__wbg_queueMicrotask_d3219def82552485:r.k2R,__wbindgen_cb_drop:r.LCp,__wbg_person_unwrap:r.Xv$,__wbg_container_unwrap:r.xB8,__wbg_new_e25e5aab09ff45db:r.RG9,__wbg_abort_775ef1d17fc65868:r.gMQ,__wbg_signal_aaf9ad74119f20a4:r.CF8,__wbg_seek_3f0f8d7591f648d7:r.Zk3,__wbg_write_397d977609afc729:r.Vob,__wbg_instanceof_Window_def73ea0955fc569:r.vF0,__wbg_get_79e1d7592116244e:r.X_o,__wbg_set_d9a72c1550e3f2b5:r.pdH,__wbg_enqueue_bb16ba72f537dc9e:r.QHd,__wbg_close_304cc1fef3466669:r.oaw,__wbg_close_24caca68e93b9c03:r.jeC,__wbg_setcreate_139bad94b2874fb5:r.kF0,__wbg_setrecursive_536113a081d6177a:r.ugc,__wbg_postMessage_83a8d58d3fcb6c13:r.A2$,__wbg_instanceof_File_a4e2256bf71955a9:r.gjJ,__wbg_lastModified_7a9e61b3961224b8:r.gvw,__wbg_has_a5ea9117f258a0ec:r.HSm,__wbg_fetch_4465c2b10f21a927:r.o0R,__wbg_fetch_509096533071c657:r.gRe,__wbg_newwithstrandinit_06c535e0a867c635:r.heb,__wbg_byobRequest_77d9adf63337edfb:r.JpR,__wbg_close_5ce03e29be453811:r.sQY,__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_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_setcreate_4ca762e23d9f78da:r.N9Q,__wbg_settype_39ed370d3edd403c:r.a4S,__wbg_name_e4a115def9e2bbaa:r.Yeo,__wbg_arrayBuffer_f18c144cd0125f07:r.RGi,__wbg_newwithu8arraysequenceandoptions_068570c487f69127:r.qe7,__wbg_size_3808d41635a9c259:r.$CF,__wbg_text_1f39a8afe3c70a99:r.CFe,__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_relationship_unwrap:r.KM7,__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_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_new_018dcc2d6c8c2f6a:r.RR8,__wbg_append_8c7dd8d641a5f01b:r.Tbm,__wbg_localStorage_1406c99c39728187:r.x8V,__wbg_softwaresystem_unwrap:r.qre,__wbg_shape_unwrap:r.D7n,__wbg_deploymentnode_unwrap:r._Zx,__wbg_point_unwrap:r._QJ,__wbg_boundary_unwrap:r.Wq,__wbg_diagramelementspec_unwrap:r.W3f,__wbindgen_jsval_eq:r.BGI,__wbindgen_in:r.zEy,__wbindgen_is_bigint:r.YkQ,__wbindgen_closure_wrapper1249:r.nJO,__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(764),o=n(39),i=n(454),l=n(15),s=n(507),_=n(519),c=n(732),u=e([s,_]);[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,l.useRef)(null),[g,p]=(0,l.useState)(),[b,f]=(0,l.useState)(),[m,h]=(0,l.useState)(),w={onOpenDiagramClick:e=>{let t;try{t=(0,_.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),h(e)}async function v(e){var t,n,a,o;let i;null==(t=d.current)||t.resetCanvas();try{i=await(0,s.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,_.Oxg)(r,e,i.plantuml,i.spec);p(t)}catch(e){y("Invalid diagram or project settings.")}}(0,l.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:w,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)}}))},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})},423:e=>{e.exports=require("change-case")},452:e=>{e.exports=require("pluralize")},454:(e,t,n)=>{n.d(t,{mg:()=>_,Cp:()=>r,qI:()=>g,aC:()=>b,l:()=>u,$r:()=>s,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 l=n.n(i);const s=(e,t)=>o()(e,t),_=e=>l()(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=()=>{}}require("jszip")},457:(e,t,n)=>{let r;function a(e){r=e}n.d(t,{$CF:()=>xn,$Pc:()=>Rt,A2$:()=>Zt,A2U:()=>Qe,BFX:()=>hn,BGI:()=>ir,CF8:()=>En,CFe:()=>Fn,Cjr:()=>at,D7n:()=>Sn,DMD:()=>Gn,Dn4:()=>Pt,Dr_:()=>je,EkI:()=>wt,Evb:()=>$t,F$t:()=>Le,FGp:()=>Ue,FHK:()=>me,GQG:()=>Mn,GuA:()=>ar,HBq:()=>sn,HCo:()=>pe,HOd:()=>yt,HSm:()=>Ke,HtP:()=>At,Hzn:()=>lt,JD7:()=>R,JF5:()=>ie,JpR:()=>he,KA3:()=>ot,KM7:()=>Qt,LCp:()=>qn,LMq:()=>Bn,Llp:()=>x,Ltb:()=>tn,M2:()=>Tt,Moj:()=>et,N9Q:()=>gn,NNx:()=>Vt,NgT:()=>Wn,NhE:()=>Un,Nhd:()=>un,NpJ:()=>Jt,OtZ:()=>Bt,Oxg:()=>S,PRY:()=>nr,Py0:()=>sr,QHd:()=>Pe,QRK:()=>cr,Qg3:()=>$n,Qnr:()=>gr,RCF:()=>ze,RG9:()=>kt,RGi:()=>ge,RKz:()=>Je,RR8:()=>Ot,RjG:()=>Qn,Ry:()=>bt,SJf:()=>st,TOc:()=>jn,Tbm:()=>_e,Tp3:()=>zn,U8c:()=>lr,Vob:()=>Yn,VrZ:()=>Lt,W3f:()=>Fe,WJm:()=>Te,WYM:()=>We,Wkh:()=>$e,Wq:()=>be,WqA:()=>ce,X_o:()=>Ve,Xb8:()=>Me,Xv$:()=>Wt,Y6F:()=>An,Yb6:()=>ut,Yeo:()=>vt,YkQ:()=>tr,Zk3:()=>an,ZrD:()=>tt,_Cc:()=>C,_QJ:()=>Yt,_Ue:()=>fe,_Zx:()=>Ae,_cl:()=>On,_hX:()=>mn,_iy:()=>de,_mt:()=>Ut,a4S:()=>vn,aIY:()=>xt,aKt:()=>fn,bLn:()=>er,c1W:()=>Ht,c6u:()=>St,cVx:()=>se,cyg:()=>ye,dM0:()=>Tn,dSQ:()=>rn,dT0:()=>Re,d_N:()=>ue,dzD:()=>qe,e57:()=>Ce,eIr:()=>pt,eW0:()=>dt,ezj:()=>Ne,fb$:()=>kn,fcg:()=>rt,gGA:()=>nt,gHg:()=>Be,gMQ:()=>le,gRe:()=>Ye,gjJ:()=>it,gvw:()=>gt,hI8:()=>Nt,heb:()=>jt,iAh:()=>_n,ii7:()=>In,ilI:()=>ke,jeC:()=>Se,jwJ:()=>Xn,k2R:()=>qt,kF0:()=>dn,kK3:()=>Nn,kPb:()=>De,kTu:()=>Ze,l0x:()=>yn,lIU:()=>a,lkn:()=>en,m_N:()=>Kt,nA9:()=>Xt,nJO:()=>Vn,o0R:()=>Xe,oGe:()=>ht,oaw:()=>Ee,ooJ:()=>Hn,p8e:()=>ln,pR9:()=>mt,pWA:()=>He,pdH:()=>cn,qNE:()=>ur,qe7:()=>Ft,qjW:()=>T,qmw:()=>Zn,qre:()=>Rn,qvD:()=>rr,rk2:()=>bn,rl:()=>Jn,sQY:()=>xe,sWe:()=>_r,tER:()=>zt,tZf:()=>Gt,ugc:()=>wn,uod:()=>ct,uw1:()=>pn,v1k:()=>on,vF0:()=>_t,vUM:()=>or,vVD:()=>It,va5:()=>Et,w6e:()=>Dn,w9h:()=>Oe,wHY:()=>ve,wJz:()=>nn,wd3:()=>Dt,x$X:()=>Cn,x0C:()=>Ln,x6W:()=>we,x8V:()=>ft,xB8:()=>Ie,xV_:()=>Pn,ycJ:()=>dr,ycy:()=>Ge,yqB:()=>Mt,z09:()=>Ct,zEy:()=>Kn}),e=n.hmd(e);let o=0,i=null;function l(){return null!==i&&0!==i.byteLength||(i=new Uint8Array(r.memory.buffer)),i}let s=new("undefined"==typeof TextEncoder?(0,e.require)("util").TextEncoder:TextEncoder)("utf-8");const _="function"==typeof s.encodeInto?function(e,t){return s.encodeInto(e,t)}:function(e,t){const n=s.encode(e);return t.set(n),{read:e.length,written:n.length}};function c(e,t,n){if(void 0===n){const n=s.encode(e),r=t(n.length,1)>>>0;return l().subarray(r,r+n.length).set(n),o=n.length,r}let r=e.length,a=t(r,1)>>>0;const i=l();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=l().subarray(a+c,a+r);c+=_(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(l().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 h="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{r.__wbindgen_export_6.get(e.dtor)(e.a,e.b)}));function w(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+=w(e[0]));for(let r=1;r<t;r++)n+=", "+w(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,t,n,a){return r.open_remote_diagram(e,t,n,a)}function E(e){const t=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),t}function x(e,t){let n,a;try{const s=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_plantuml_url_from_diagram_url(s,_,u,d);var i=g[0],l=g[1];if(g[3])throw i=0,l=0,E(g[2]);return n=i,a=l,p(i,l)}finally{r.__wbindgen_free(n,a,1)}}function T(e,t){let n,a;try{const s=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_url_from_link_string(s,_,u,d);var i=g[0],l=g[1];if(g[3])throw i=0,l=0,E(g[2]);return n=i,a=l,p(i,l)}finally{r.__wbindgen_free(n,a,1)}}function R(e,t){let n,a;try{const s=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),_=o,u=c(t,r.__wbindgen_malloc,r.__wbindgen_realloc),d=o,g=r.diagram_spec_url_from_diagram_url(s,_,u,d);var i=g[0],l=g[1];if(g[3])throw i=0,l=0,E(g[2]);return n=i,a=l,p(i,l)}finally{r.__wbindgen_free(n,a,1)}}function C(e){let t,n;try{const a=c(e,r.__wbindgen_malloc,r.__wbindgen_realloc),i=o,l=r.project_settings_url(a,i);return t=l[0],n=l[1],p(l[0],l[1])}finally{r.__wbindgen_free(t,n,1)}}function I(e,t,n){r.closure138_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 N{static __wrap(e){e>>>=0;const t=Object.create(N.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 A="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,A.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,A.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 N.__wrap(e)}set base_data(e){O(e,N);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_addelementtag_legend_sprite(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 N.__wrap(e)}set base_data(e){O(e,N);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 N.__wrap(e)}set base_data(e){O(e,N);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_boundary_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){O(e,N);var t=e.__destroy_into_raw();r.__wbg_set_boundary_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_boundary_sub_elements(this.__wbg_ptr,t,n)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagram_free(e>>>0,1)));const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_diagramelementspec_free(e>>>0,1)));class X{static __wrap(e){e>>>=0;const t=Object.create(X.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof X?e.__destroy_into_raw():0}__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_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:J.__wrap(e)}set position(e){let t=0;m(e)||(O(e,J),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:re.__wrap(e)}set size(e){let t=0;m(e)||(O(e,re),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)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramplantuml_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_diagramspec_free(e>>>0,1))),"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 Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_minaerror_free(e>>>0,1)));class Z{static __wrap(e){e>>>=0;const t=Object.create(Z.prototype);return t.__wbg_ptr=e,Y.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.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 $="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_person_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}static __unwrap(e){return e instanceof G?e.__destroy_into_raw():0}__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_person_free(e,0)}get base_data(){const e=r.__wbg_get_container_base_data(this.__wbg_ptr);return N.__wrap(e)}set base_data(e){O(e,N);var t=e.__destroy_into_raw();r.__wbg_set_container_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 U="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_point_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}static __unwrap(e){return e instanceof q?e.__destroy_into_raw():0}__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_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 V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_position_free(e>>>0,1)));class J{static __wrap(e){e>>>=0;const t=Object.create(J.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_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_posit