diff --git a/dist/App.css b/dist/App.css index 595b6b4..13ca4c7 100644 --- a/dist/App.css +++ b/dist/App.css @@ -1 +1 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 20 14.3% 4.1%;--card: 0 0% 100%;--card-foreground: 20 14.3% 4.1%;--popover: 0 0% 100%;--popover-foreground: 20 14.3% 4.1%;--primary: 24 9.8% 10%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 20 14.3% 4.1%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem }*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-\[50\%\]{left:50%}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-10{z-index:10}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.ml-2{margin-left:.5rem}.mr-4{margin-right:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-screen{max-height:100vh}.min-h-\[60px\]{min-height:60px}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-9{width:2.25rem}.w-\[180px\]{width:180px}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;user-select:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-b{border-bottom-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-transparent{border-color:transparent}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-2{padding-left:.5rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pl-4{padding-left:1rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mt-0{margin-top:0}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:hidden{display:none}.md\:max-w-\[420px\]{max-width:420px}.md\:flex-row{flex-direction:row}.md\:gap-4{gap:1rem}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.md\:p-4{padding:1rem}.md\:pt-4{padding-top:1rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0} +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 221 100% 95%;--foreground: 221 5% 0%;--card: 221 50% 90%;--card-foreground: 221 5% 10%;--popover: 221 100% 95%;--popover-foreground: 221 100% 0%;--primary: 221 83.2% 53.3%;--primary-foreground: 0 0% 100%;--secondary: 221 30% 70%;--secondary-foreground: 0 0% 0%;--muted: 183 30% 85%;--muted-foreground: 221 5% 35%;--accent: 183 30% 80%;--accent-foreground: 221 5% 10%;--destructive: 0 100% 30%;--destructive-foreground: 221 5% 90%;--border: 221 30% 50%;--input: 221 30% 18%;--ring: 221 83.2% 53.3%;--radius: .5rem}.dark{--background: 221 50% 5%;--foreground: 221 5% 90%;--card: 221 50% 0%;--card-foreground: 221 5% 90%;--popover: 221 50% 5%;--popover-foreground: 221 5% 90%;--primary: 221 83.2% 53.3%;--primary-foreground: 0 0% 100%;--secondary: 221 30% 10%;--secondary-foreground: 0 0% 100%;--muted: 183 30% 15%;--muted-foreground: 221 5% 60%;--accent: 183 30% 15%;--accent-foreground: 221 5% 90%;--destructive: 0 100% 30%;--destructive-foreground: 221 5% 90%;--border: 221 30% 18%;--input: 221 30% 18%;--ring: 221 83.2% 53.3%;--radius: .5rem}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-\[50\%\]{left:50%}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-2\.5{height:.625rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[200px\]{height:200px}.h-\[400px\]{height:400px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-96{max-height:24rem}.max-h-screen{max-height:100vh}.min-h-\[60px\]{min-height:60px}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-9{width:2.25rem}.w-\[180px\]{width:180px}.w-auto{width:auto}.w-full{width:100%}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;user-select:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b-\[1px\]{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-secondary{border-color:hsl(var(--secondary))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-black\/80{background-color:#000c}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-2{padding-left:.5rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mt-0{margin-top:0}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:block{display:block}.md\:hidden{display:none}.md\:max-w-\[420px\]{max-width:420px}.md\:flex-row{flex-direction:row}.md\:p-4{padding:1rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0} diff --git a/dist/c-App.BTybbOiv.js b/dist/c-App.BSmD8r3A.js similarity index 95% rename from dist/c-App.BTybbOiv.js rename to dist/c-App.BSmD8r3A.js index 4d14880..7e0bcbd 100644 --- a/dist/c-App.BTybbOiv.js +++ b/dist/c-App.BSmD8r3A.js @@ -62,7 +62,7 @@ Error generating stack: `+l.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gg=hg("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function kf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=Sg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(nu);return s[0]===""&&s.length!==1&&s.shift(),Nf(s,t)||xg(i)},getConflictingClassGroupIds:(i,s)=>{const u=n[i]||[];return s&&r[i]?[...u,...r[i]]:u}}},Nf=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Nf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const l=e.join(nu);return(i=t.validators.find(({validator:s})=>s(l)))==null?void 0:i.classGroupId},ka=/^\[(.+)\]$/,xg=e=>{if(ka.test(e)){const t=ka.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Sg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Cg(Object.entries(e.classGroups),n).forEach(([l,i])=>{Zi(i,r,l,t)}),r},Zi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const l=o===""?t:Na(t,o);l.classGroupId=n;return}if(typeof o=="function"){if(Eg(o)){Zi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([l,i])=>{Zi(i,Na(t,l),n,r)})})},Na=(e,t)=>{let n=e;return t.split(nu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Eg=e=>e.isThemeGetter,Cg=(e,t)=>t?e.map(([n,r])=>{const o=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([i,s])=>[t+i,s])):l);return[n,o]}):e,kg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(l,i)=>{n.set(l,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let i=n.get(l);if(i!==void 0)return i;if((i=r.get(l))!==void 0)return o(l,i),i},set(l,i){n.has(l)?n.set(l,i):o(l,i)}}},Tf="!",Ng=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],l=t.length,i=s=>{const u=[];let a=0,v=0,h;for(let S=0;Sv?h-v:void 0;return{modifiers:u,hasImportantModifier:x,baseClassName:E,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},Tg=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Pg=e=>({cache:kg(e.cacheSize),parseClassName:Ng(e),...wg(e)}),_g=/\s+/,Rg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,l=[],i=e.trim().split(_g);let s="";for(let u=i.length-1;u>=0;u-=1){const a=i[u],{modifiers:v,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:x}=n(a);let E=!!x,g=r(E?m.substring(0,x):m);if(!g){if(!E){s=a+(s.length>0?" "+s:s);continue}if(g=r(m),!g){s=a+(s.length>0?" "+s:s);continue}E=!1}const S=Tg(v).join(":"),d=h?S+Tf:S,c=d+g;if(l.includes(c))continue;l.push(c);const p=o(g,E);for(let w=0;w0?" "+s:s)}return s};function Dg(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rh(v),e());return n=Pg(a),r=n.cache.get,o=n.cache.set,l=s,s(u)}function s(u){const a=r(u);if(a)return a;const v=Rg(u,n);return o(u,v),v}return function(){return l(Dg.apply(null,arguments))}}const V=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_f=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ag=/^\d+\/\d+$/,Lg=new Set(["px","full","screen"]),Mg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ig=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rt=e=>Nn(e)||Lg.has(e)||Ag.test(e),ht=e=>$n(e,"length",Kg),Nn=e=>!!e&&!Number.isNaN(Number(e)),Bl=e=>$n(e,"number",Nn),Gn=e=>!!e&&Number.isInteger(Number(e)),$g=e=>e.endsWith("%")&&Nn(e.slice(0,-1)),M=e=>_f.test(e),gt=e=>Mg.test(e),bg=new Set(["length","size","percentage"]),Ug=e=>$n(e,bg,Rf),Vg=e=>$n(e,"position",Rf),Wg=new Set(["image","url"]),Bg=e=>$n(e,Wg,Gg),Hg=e=>$n(e,"",Qg),Yn=()=>!0,$n=(e,t,n)=>{const r=_f.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Kg=e=>Ig.test(e)&&!jg.test(e),Rf=()=>!1,Qg=e=>zg.test(e),Gg=e=>Fg.test(e),Yg=()=>{const e=V("colors"),t=V("spacing"),n=V("blur"),r=V("brightness"),o=V("borderColor"),l=V("borderRadius"),i=V("borderSpacing"),s=V("borderWidth"),u=V("contrast"),a=V("grayscale"),v=V("hueRotate"),h=V("invert"),m=V("gap"),x=V("gradientColorStops"),E=V("gradientColorStopPositions"),g=V("inset"),S=V("margin"),d=V("opacity"),c=V("padding"),p=V("saturate"),w=V("scale"),C=V("sepia"),T=V("skew"),k=V("space"),_=V("translate"),I=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",M,t],j=()=>[M,t],Ne=()=>["",rt,ht],A=()=>["auto",Nn,M],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",M],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[Nn,M];return{cacheSize:500,separator:":",theme:{colors:[Yn],spacing:[rt,ht],blur:["none","",gt,M],brightness:F(),borderColor:[e],borderRadius:["none","","full",gt,M],borderSpacing:j(),borderWidth:Ne(),contrast:F(),grayscale:D(),hueRotate:F(),invert:D(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[$g,ht],inset:X(),margin:X(),opacity:F(),padding:j(),saturate:F(),scale:F(),sepia:D(),skew:F(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",M]}],container:["container"],columns:[{columns:[gt]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),M]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gn,M]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",M]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Gn,M]}],"grid-cols":[{"grid-cols":[Yn]}],"col-start-end":[{col:["auto",{span:["full",Gn,M]},M]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Yn]}],"row-start-end":[{row:["auto",{span:[Gn,M]},M]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",M]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",M]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[c]}],px:[{px:[c]}],py:[{py:[c]}],ps:[{ps:[c]}],pe:[{pe:[c]}],pt:[{pt:[c]}],pr:[{pr:[c]}],pb:[{pb:[c]}],pl:[{pl:[c]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",M,t]}],"min-w":[{"min-w":[M,t,"min","max","fit"]}],"max-w":[{"max-w":[M,t,"none","full","min","max","fit","prose",{screen:[gt]},gt]}],h:[{h:[M,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[M,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[M,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[M,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gt,ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bl]}],"font-family":[{font:[Yn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",M]}],"line-clamp":[{"line-clamp":["none",Nn,Bl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rt,M]}],"list-image":[{"list-image":["none",M]}],"list-style-type":[{list:["none","disc","decimal",M]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[d]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[d]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rt,ht]}],"underline-offset":[{"underline-offset":["auto",rt,M]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[d]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),Vg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ug]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[d]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[d]}],"divide-style":[{divide:se()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[rt,M]}],"outline-w":[{outline:[rt,ht]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[d]}],"ring-offset-w":[{"ring-offset":[rt,ht]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gt,Hg]}],"shadow-color":[{shadow:[Yn]}],opacity:[{opacity:[d]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",gt,M]}],grayscale:[{grayscale:[a]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[h]}],saturate:[{saturate:[p]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[a]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[d]}],"backdrop-saturate":[{"backdrop-saturate":[p]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",M]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",M]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",M]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Gn,M]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rt,ht,Bl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Xg=Og(Yg);function K(...e){return Xg(yg(e))}const Zg=dg,Df=f.forwardRef(({className:e,...t},n)=>y.jsx(hf,{ref:n,className:K("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Df.displayName=hf.displayName;const Jg=tu("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Of=f.forwardRef(({className:e,variant:t,...n},r)=>y.jsx(gf,{ref:r,className:K(Jg({variant:t}),e),...n}));Of.displayName=gf.displayName;const qg=f.forwardRef(({className:e,...t},n)=>y.jsx(xf,{ref:n,className:K("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));qg.displayName=xf.displayName;const Af=f.forwardRef(({className:e,...t},n)=>y.jsx(Sf,{ref:n,className:K("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:y.jsx(gg,{className:"h-4 w-4"})}));Af.displayName=Sf.displayName;const Lf=f.forwardRef(({className:e,...t},n)=>y.jsx(yf,{ref:n,className:K("text-sm font-semibold [&+div]:text-xs",e),...t}));Lf.displayName=yf.displayName;const Mf=f.forwardRef(({className:e,...t},n)=>y.jsx(wf,{ref:n,className:K("text-sm opacity-90",e),...t}));Mf.displayName=wf.displayName;function ey(){const{toasts:e}=Eh();return y.jsxs(Zg,{children:[e.map(function({id:t,title:n,description:r,action:o,...l}){return y.jsxs(Of,{...l,children:[y.jsxs("div",{className:"grid gap-1",children:[n&&y.jsx(Lf,{children:n}),r&&y.jsx(Mf,{children:r})]}),o,y.jsx(Af,{})]},t)}),y.jsx(Df,{})]})}const If=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("rounded-xl border bg-card text-card-foreground shadow",e),...t}));If.displayName="Card";const jf=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("flex flex-col space-y-1.5 p-6",e),...t}));jf.displayName="CardHeader";const zf=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("font-semibold leading-none tracking-tight",e),...t}));zf.displayName="CardTitle";const ty=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("text-sm text-muted-foreground",e),...t}));ty.displayName="CardDescription";const Ff=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("p-6 pt-0",e),...t}));Ff.displayName="CardContent";const ny=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("flex items-center p-6 pt-0",e),...t}));ny.displayName="CardFooter";const tr=f.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,className:K("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));tr.displayName="Input";var ry="Label",$f=f.forwardRef((e,t)=>y.jsx(de.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));$f.displayName=ry;var bf=$f;const oy=tu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ln=f.forwardRef(({className:e,...t},n)=>y.jsx(bf,{ref:n,className:K(oy(),e),...t}));ln.displayName=bf.displayName;const Uf=f.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{className:K("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Uf.displayName="Textarea";const ru=tu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ji=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},l)=>{const i=r?In:"button";return y.jsx(i,{className:K(ru({variant:t,size:n,className:e})),ref:l,...o})});Ji.displayName="Button";var ly=im.useId||(()=>{}),iy=0;function Hl(e){const[t,n]=f.useState(ly());return Rr(()=>{e||n(r=>r??String(iy++))},[e]),e||(t?`radix-${t}`:"")}var Kl="focusScope.autoFocusOnMount",Ql="focusScope.autoFocusOnUnmount",Ta={bubbles:!1,cancelable:!0},sy="FocusScope",Vf=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...i}=e,[s,u]=f.useState(null),a=Qe(o),v=Qe(l),h=f.useRef(null),m=De(t,g=>u(g)),x=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(p){if(x.paused||!s)return;const w=p.target;s.contains(w)?h.current=w:wt(h.current,{select:!0})},S=function(p){if(x.paused||!s)return;const w=p.relatedTarget;w!==null&&(s.contains(w)||wt(h.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const C of p)C.removedNodes.length>0&&wt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",S);const c=new MutationObserver(d);return s&&c.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",S),c.disconnect()}}},[r,s,x.paused]),f.useEffect(()=>{if(s){_a.add(x);const g=document.activeElement;if(!s.contains(g)){const d=new CustomEvent(Kl,Ta);s.addEventListener(Kl,a),s.dispatchEvent(d),d.defaultPrevented||(uy(py(Wf(s)),{select:!0}),document.activeElement===g&&wt(s))}return()=>{s.removeEventListener(Kl,a),setTimeout(()=>{const d=new CustomEvent(Ql,Ta);s.addEventListener(Ql,v),s.dispatchEvent(d),d.defaultPrevented||wt(g??document.body,{select:!0}),s.removeEventListener(Ql,v),_a.remove(x)},0)}}},[s,a,v,x]);const E=f.useCallback(g=>{if(!n&&!r||x.paused)return;const S=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,d=document.activeElement;if(S&&d){const c=g.currentTarget,[p,w]=ay(c);p&&w?!g.shiftKey&&d===w?(g.preventDefault(),n&&wt(p,{select:!0})):g.shiftKey&&d===p&&(g.preventDefault(),n&&wt(w,{select:!0})):d===c&&g.preventDefault()}},[n,r,x.paused]);return y.jsx(de.div,{tabIndex:-1,...i,ref:m,onKeyDown:E})});Vf.displayName=sy;function uy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wt(r,{select:t}),document.activeElement!==n)return}function ay(e){const t=Wf(e),n=Pa(t,e),r=Pa(t.reverse(),e);return[n,r]}function Wf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pa(e,t){for(const n of e)if(!cy(n,{upTo:t}))return n}function cy(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function dy(e){return e instanceof HTMLInputElement&&"select"in e}function wt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dy(e)&&t&&e.select()}}var _a=fy();function fy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ra(e,t),e.unshift(t)},remove(t){var n;e=Ra(e,t),(n=e[0])==null||n.resume()}}}function Ra(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function py(e){return e.filter(t=>t.tagName!=="A")}var Gl=0;function my(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Da()),document.body.insertAdjacentElement("beforeend",e[1]??Da()),Gl++,()=>{Gl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gl--}},[])}function Da(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qe=function(){return qe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return Oy;var t=Ay(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},My=Qf(),Tn="data-scroll-locked",Iy=function(e,t,n,r){var o=e.left,l=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),` + */const gg=hg("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function kf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t{const t=Sg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(nu);return s[0]===""&&s.length!==1&&s.shift(),Nf(s,t)||xg(i)},getConflictingClassGroupIds:(i,s)=>{const u=n[i]||[];return s&&r[i]?[...u,...r[i]]:u}}},Nf=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Nf(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const l=e.join(nu);return(i=t.validators.find(({validator:s})=>s(l)))==null?void 0:i.classGroupId},ka=/^\[(.+)\]$/,xg=e=>{if(ka.test(e)){const t=ka.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Sg=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Cg(Object.entries(e.classGroups),n).forEach(([l,i])=>{Zi(i,r,l,t)}),r},Zi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const l=o===""?t:Na(t,o);l.classGroupId=n;return}if(typeof o=="function"){if(Eg(o)){Zi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([l,i])=>{Zi(i,Na(t,l),n,r)})})},Na=(e,t)=>{let n=e;return t.split(nu).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Eg=e=>e.isThemeGetter,Cg=(e,t)=>t?e.map(([n,r])=>{const o=r.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([i,s])=>[t+i,s])):l);return[n,o]}):e,kg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(l,i)=>{n.set(l,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(l){let i=n.get(l);if(i!==void 0)return i;if((i=r.get(l))!==void 0)return o(l,i),i},set(l,i){n.has(l)?n.set(l,i):o(l,i)}}},Tf="!",Ng=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],l=t.length,i=s=>{const u=[];let a=0,v=0,h;for(let S=0;Sv?h-v:void 0;return{modifiers:u,hasImportantModifier:x,baseClassName:E,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},Tg=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Pg=e=>({cache:kg(e.cacheSize),parseClassName:Ng(e),...wg(e)}),_g=/\s+/,Rg=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,l=[],i=e.trim().split(_g);let s="";for(let u=i.length-1;u>=0;u-=1){const a=i[u],{modifiers:v,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:x}=n(a);let E=!!x,g=r(E?m.substring(0,x):m);if(!g){if(!E){s=a+(s.length>0?" "+s:s);continue}if(g=r(m),!g){s=a+(s.length>0?" "+s:s);continue}E=!1}const S=Tg(v).join(":"),d=h?S+Tf:S,c=d+g;if(l.includes(c))continue;l.push(c);const p=o(g,E);for(let w=0;w0?" "+s:s)}return s};function Dg(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rh(v),e());return n=Pg(a),r=n.cache.get,o=n.cache.set,l=s,s(u)}function s(u){const a=r(u);if(a)return a;const v=Rg(u,n);return o(u,v),v}return function(){return l(Dg.apply(null,arguments))}}const V=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_f=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ag=/^\d+\/\d+$/,Lg=new Set(["px","full","screen"]),Mg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ig=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rt=e=>Nn(e)||Lg.has(e)||Ag.test(e),ht=e=>$n(e,"length",Kg),Nn=e=>!!e&&!Number.isNaN(Number(e)),Bl=e=>$n(e,"number",Nn),Gn=e=>!!e&&Number.isInteger(Number(e)),$g=e=>e.endsWith("%")&&Nn(e.slice(0,-1)),M=e=>_f.test(e),gt=e=>Mg.test(e),bg=new Set(["length","size","percentage"]),Ug=e=>$n(e,bg,Rf),Vg=e=>$n(e,"position",Rf),Wg=new Set(["image","url"]),Bg=e=>$n(e,Wg,Gg),Hg=e=>$n(e,"",Qg),Yn=()=>!0,$n=(e,t,n)=>{const r=_f.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Kg=e=>Ig.test(e)&&!jg.test(e),Rf=()=>!1,Qg=e=>zg.test(e),Gg=e=>Fg.test(e),Yg=()=>{const e=V("colors"),t=V("spacing"),n=V("blur"),r=V("brightness"),o=V("borderColor"),l=V("borderRadius"),i=V("borderSpacing"),s=V("borderWidth"),u=V("contrast"),a=V("grayscale"),v=V("hueRotate"),h=V("invert"),m=V("gap"),x=V("gradientColorStops"),E=V("gradientColorStopPositions"),g=V("inset"),S=V("margin"),d=V("opacity"),c=V("padding"),p=V("saturate"),w=V("scale"),C=V("sepia"),T=V("skew"),k=V("space"),_=V("translate"),I=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto",M,t],j=()=>[M,t],Ne=()=>["",rt,ht],A=()=>["auto",Nn,M],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],se=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",M],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[Nn,M];return{cacheSize:500,separator:":",theme:{colors:[Yn],spacing:[rt,ht],blur:["none","",gt,M],brightness:F(),borderColor:[e],borderRadius:["none","","full",gt,M],borderSpacing:j(),borderWidth:Ne(),contrast:F(),grayscale:D(),hueRotate:F(),invert:D(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[$g,ht],inset:X(),margin:X(),opacity:F(),padding:j(),saturate:F(),scale:F(),sepia:D(),skew:F(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",M]}],container:["container"],columns:[{columns:[gt]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),M]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gn,M]}],basis:[{basis:X()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",M]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Gn,M]}],"grid-cols":[{"grid-cols":[Yn]}],"col-start-end":[{col:["auto",{span:["full",Gn,M]},M]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Yn]}],"row-start-end":[{row:["auto",{span:[Gn,M]},M]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",M]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",M]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[c]}],px:[{px:[c]}],py:[{py:[c]}],ps:[{ps:[c]}],pe:[{pe:[c]}],pt:[{pt:[c]}],pr:[{pr:[c]}],pb:[{pb:[c]}],pl:[{pl:[c]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",M,t]}],"min-w":[{"min-w":[M,t,"min","max","fit"]}],"max-w":[{"max-w":[M,t,"none","full","min","max","fit","prose",{screen:[gt]},gt]}],h:[{h:[M,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[M,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[M,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[M,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gt,ht]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Bl]}],"font-family":[{font:[Yn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",M]}],"line-clamp":[{"line-clamp":["none",Nn,Bl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rt,M]}],"list-image":[{"list-image":["none",M]}],"list-style-type":[{list:["none","disc","decimal",M]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[d]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[d]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rt,ht]}],"underline-offset":[{"underline-offset":["auto",rt,M]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[d]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),Vg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ug]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Bg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[d]}],"border-style":[{border:[...se(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[d]}],"divide-style":[{divide:se()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...se()]}],"outline-offset":[{"outline-offset":[rt,M]}],"outline-w":[{outline:[rt,ht]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[d]}],"ring-offset-w":[{"ring-offset":[rt,ht]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gt,Hg]}],"shadow-color":[{shadow:[Yn]}],opacity:[{opacity:[d]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",gt,M]}],grayscale:[{grayscale:[a]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[h]}],saturate:[{saturate:[p]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[a]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[d]}],"backdrop-saturate":[{"backdrop-saturate":[p]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",M]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",M]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",M]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[Gn,M]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rt,ht,Bl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Xg=Og(Yg);function K(...e){return Xg(yg(e))}const Zg=dg,Df=f.forwardRef(({className:e,...t},n)=>y.jsx(hf,{ref:n,className:K("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Df.displayName=hf.displayName;const Jg=tu("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Of=f.forwardRef(({className:e,variant:t,...n},r)=>y.jsx(gf,{ref:r,className:K(Jg({variant:t}),e),...n}));Of.displayName=gf.displayName;const qg=f.forwardRef(({className:e,...t},n)=>y.jsx(xf,{ref:n,className:K("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));qg.displayName=xf.displayName;const Af=f.forwardRef(({className:e,...t},n)=>y.jsx(Sf,{ref:n,className:K("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:y.jsx(gg,{className:"h-4 w-4"})}));Af.displayName=Sf.displayName;const Lf=f.forwardRef(({className:e,...t},n)=>y.jsx(yf,{ref:n,className:K("text-sm font-semibold [&+div]:text-xs",e),...t}));Lf.displayName=yf.displayName;const Mf=f.forwardRef(({className:e,...t},n)=>y.jsx(wf,{ref:n,className:K("text-sm opacity-90",e),...t}));Mf.displayName=wf.displayName;function ey(){const{toasts:e}=Eh();return y.jsxs(Zg,{children:[e.map(function({id:t,title:n,description:r,action:o,...l}){return y.jsxs(Of,{...l,children:[y.jsxs("div",{className:"grid gap-1",children:[n&&y.jsx(Lf,{children:n}),r&&y.jsx(Mf,{children:r})]}),o,y.jsx(Af,{})]},t)}),y.jsx(Df,{})]})}const If=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("rounded-xl border bg-card text-card-foreground shadow",e),...t}));If.displayName="Card";const jf=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("flex flex-col space-y-1.5 p-6",e),...t}));jf.displayName="CardHeader";const zf=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("font-semibold leading-none tracking-tight",e),...t}));zf.displayName="CardTitle";const ty=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("text-sm text-muted-foreground",e),...t}));ty.displayName="CardDescription";const Ff=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("p-6 pt-0",e),...t}));Ff.displayName="CardContent";const ny=f.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,className:K("flex items-center p-6 pt-0",e),...t}));ny.displayName="CardFooter";const tr=f.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,className:K("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));tr.displayName="Input";var ry="Label",$f=f.forwardRef((e,t)=>y.jsx(de.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));$f.displayName=ry;var bf=$f;const oy=tu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ln=f.forwardRef(({className:e,...t},n)=>y.jsx(bf,{ref:n,className:K(oy(),e),...t}));ln.displayName=bf.displayName;const Uf=f.forwardRef(({className:e,...t},n)=>y.jsx("textarea",{className:K("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Uf.displayName="Textarea";const ru=tu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ji=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},l)=>{const i=r?In:"button";return y.jsx(i,{className:K(ru({variant:t,size:n,className:e})),ref:l,...o})});Ji.displayName="Button";var ly=im.useId||(()=>{}),iy=0;function Hl(e){const[t,n]=f.useState(ly());return Rr(()=>{n(r=>r??String(iy++))},[e]),t?`radix-${t}`:""}var Kl="focusScope.autoFocusOnMount",Ql="focusScope.autoFocusOnUnmount",Ta={bubbles:!1,cancelable:!0},sy="FocusScope",Vf=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...i}=e,[s,u]=f.useState(null),a=Qe(o),v=Qe(l),h=f.useRef(null),m=De(t,g=>u(g)),x=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(p){if(x.paused||!s)return;const w=p.target;s.contains(w)?h.current=w:wt(h.current,{select:!0})},S=function(p){if(x.paused||!s)return;const w=p.relatedTarget;w!==null&&(s.contains(w)||wt(h.current,{select:!0}))},d=function(p){if(document.activeElement===document.body)for(const C of p)C.removedNodes.length>0&&wt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",S);const c=new MutationObserver(d);return s&&c.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",S),c.disconnect()}}},[r,s,x.paused]),f.useEffect(()=>{if(s){_a.add(x);const g=document.activeElement;if(!s.contains(g)){const d=new CustomEvent(Kl,Ta);s.addEventListener(Kl,a),s.dispatchEvent(d),d.defaultPrevented||(uy(py(Wf(s)),{select:!0}),document.activeElement===g&&wt(s))}return()=>{s.removeEventListener(Kl,a),setTimeout(()=>{const d=new CustomEvent(Ql,Ta);s.addEventListener(Ql,v),s.dispatchEvent(d),d.defaultPrevented||wt(g??document.body,{select:!0}),s.removeEventListener(Ql,v),_a.remove(x)},0)}}},[s,a,v,x]);const E=f.useCallback(g=>{if(!n&&!r||x.paused)return;const S=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,d=document.activeElement;if(S&&d){const c=g.currentTarget,[p,w]=ay(c);p&&w?!g.shiftKey&&d===w?(g.preventDefault(),n&&wt(p,{select:!0})):g.shiftKey&&d===p&&(g.preventDefault(),n&&wt(w,{select:!0})):d===c&&g.preventDefault()}},[n,r,x.paused]);return y.jsx(de.div,{tabIndex:-1,...i,ref:m,onKeyDown:E})});Vf.displayName=sy;function uy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wt(r,{select:t}),document.activeElement!==n)return}function ay(e){const t=Wf(e),n=Pa(t,e),r=Pa(t.reverse(),e);return[n,r]}function Wf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pa(e,t){for(const n of e)if(!cy(n,{upTo:t}))return n}function cy(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function dy(e){return e instanceof HTMLInputElement&&"select"in e}function wt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&dy(e)&&t&&e.select()}}var _a=fy();function fy(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ra(e,t),e.unshift(t)},remove(t){var n;e=Ra(e,t),(n=e[0])==null||n.resume()}}}function Ra(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function py(e){return e.filter(t=>t.tagName!=="A")}var Gl=0;function my(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Da()),document.body.insertAdjacentElement("beforeend",e[1]??Da()),Gl++,()=>{Gl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gl--}},[])}function Da(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var qe=function(){return qe=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return Oy;var t=Ay(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},My=Qf(),Tn="data-scroll-locked",Iy=function(e,t,n,r){var o=e.left,l=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(hy,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -112,7 +112,7 @@ You can add a description to the \`${Pn}\` by passing a \`${Np}\` component as a Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Pn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},N0=yp,T0=wp,P0=xp,Dp=Sp,Op=Ep,Ap=Pp,Lp=Rp,Mp=kp,Ip=Tp;const _0=N0,R0=T0,D0=P0,jp=f.forwardRef(({className:e,...t},n)=>y.jsx(Dp,{className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));jp.displayName=Dp.displayName;const zp=f.forwardRef(({className:e,...t},n)=>y.jsxs(D0,{children:[y.jsx(jp,{}),y.jsx(Op,{ref:n,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));zp.displayName=Op.displayName;const Fp=({className:e,...t})=>y.jsx("div",{className:K("flex flex-col space-y-2 text-center sm:text-left",e),...t});Fp.displayName="AlertDialogHeader";const $p=({className:e,...t})=>y.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$p.displayName="AlertDialogFooter";const bp=f.forwardRef(({className:e,...t},n)=>y.jsx(Mp,{ref:n,className:K("text-lg font-semibold",e),...t}));bp.displayName=Mp.displayName;const Up=f.forwardRef(({className:e,...t},n)=>y.jsx(Ip,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));Up.displayName=Ip.displayName;const Vp=f.forwardRef(({className:e,...t},n)=>y.jsx(Ap,{ref:n,className:K(ru(),e),...t}));Vp.displayName=Ap.displayName;const Wp=f.forwardRef(({className:e,...t},n)=>y.jsx(Lp,{ref:n,className:K(ru({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Wp.displayName=Lp.displayName;const O0=()=>{const[e,t]=f.useState(ql),[n,r]=f.useState(!0);f.useEffect(()=>{o()},[]);const o=async()=>{try{const s=await chrome.storage.sync.get("docagramOptions");s.docagramOptions&&t(s.docagramOptions)}catch(s){console.error("Failed to load options:",s)}finally{r(!1)}};return{options:e,loading:n,saveOptions:async s=>{try{const u={...e,...s};await chrome.storage.sync.set({docagramOptions:u}),t(u)}catch(u){throw console.error("Failed to save options:",u),u}},resetToDefaults:async()=>{try{await chrome.storage.sync.set({docagramOptions:ql}),t(ql)}catch(s){throw console.error("Failed to reset options:",s),s}}}};function A0(){const e=f.useRef(null),{options:t,saveOptions:n,resetToDefaults:r}=O0();f.useEffect(()=>{if(e.current){const i=e.current;Object.entries(t).forEach(([s,u])=>{const a=i.elements.namedItem(s);a&&(a.value=u.toString())})}},[t]);const o=async i=>{i.preventDefault();const s=new FormData(i.target),u={temperature:parseFloat(s.get("temperature")),topK:parseInt(s.get("topK")),minimumEntityCount:parseInt(s.get("minimumEntityCount")),chunkSize:parseInt(s.get("chunkSize")),systemPrompt:s.get("systemPrompt")};try{await n(u),er({title:"Settings saved",description:"Your preferences have been updated successfully."})}catch{er({title:"Error",description:"Failed to save settings. Please try again.",variant:"destructive"})}},l=async()=>{try{await r(),er({title:"Settings reset",description:"All settings have been restored to their default values."})}catch{er({title:"Error",description:"Failed to reset settings. Please try again.",variant:"destructive"})}};return y.jsxs(If,{children:[y.jsx(jf,{children:y.jsx(zf,{children:"Docagram Settings"})}),y.jsx(Ff,{children:y.jsxs("form",{ref:e,onSubmit:o,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"temperature",children:"Temperature (0.0 - 1.0)"}),y.jsx(tr,{id:"temperature",name:"temperature",type:"number",step:"0.1",min:"0",max:"1",defaultValue:t.temperature})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"topK",children:"Top K"}),y.jsx(tr,{id:"topK",name:"topK",type:"number",min:"1",defaultValue:t.topK})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"minimumEntityCount",children:"Minimum Entity Count"}),y.jsx(tr,{id:"minimumEntityCount",name:"minimumEntityCount",type:"number",min:"1",defaultValue:t.minimumEntityCount})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"chunkSize",children:"Chunk Size"}),y.jsx(tr,{id:"chunkSize",name:"chunkSize",type:"number",min:"100",defaultValue:t.chunkSize})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"systemPrompt",children:"System Prompt"}),y.jsx(Uf,{id:"systemPrompt",name:"systemPrompt",rows:4,defaultValue:t.systemPrompt})]}),y.jsxs("div",{className:"flex space-x-2",children:[y.jsx(Ji,{type:"submit",children:"Save Settings"}),y.jsxs(_0,{children:[y.jsx(R0,{asChild:!0,children:y.jsx(Ji,{variant:"outline",children:"Reset to Defaults"})}),y.jsxs(zp,{children:[y.jsxs(Fp,{children:[y.jsx(bp,{children:"Reset Settings"}),y.jsx(Up,{children:"This will reset all settings to their default values. This action cannot be undone."})]}),y.jsxs($p,{children:[y.jsx(Wp,{children:"Cancel"}),y.jsx(Vp,{onClick:l,children:"Reset Settings"})]})]})]})]})]})})]})}const ql={temperature:.7,topK:40,minimumEntityCount:2,chunkSize:2e3,systemPrompt:`Analyze this and identify key relationships between entities. +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},N0=yp,T0=wp,P0=xp,Dp=Sp,Op=Ep,Ap=Pp,Lp=Rp,Mp=kp,Ip=Tp;const _0=N0,R0=T0,D0=P0,jp=f.forwardRef(({className:e,...t},n)=>y.jsx(Dp,{className:K("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));jp.displayName=Dp.displayName;const zp=f.forwardRef(({className:e,...t},n)=>y.jsxs(D0,{children:[y.jsx(jp,{}),y.jsx(Op,{ref:n,className:K("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));zp.displayName=Op.displayName;const Fp=({className:e,...t})=>y.jsx("div",{className:K("flex flex-col space-y-2 text-center sm:text-left",e),...t});Fp.displayName="AlertDialogHeader";const $p=({className:e,...t})=>y.jsx("div",{className:K("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$p.displayName="AlertDialogFooter";const bp=f.forwardRef(({className:e,...t},n)=>y.jsx(Mp,{ref:n,className:K("text-lg font-semibold",e),...t}));bp.displayName=Mp.displayName;const Up=f.forwardRef(({className:e,...t},n)=>y.jsx(Ip,{ref:n,className:K("text-sm text-muted-foreground",e),...t}));Up.displayName=Ip.displayName;const Vp=f.forwardRef(({className:e,...t},n)=>y.jsx(Ap,{ref:n,className:K(ru(),e),...t}));Vp.displayName=Ap.displayName;const Wp=f.forwardRef(({className:e,...t},n)=>y.jsx(Lp,{ref:n,className:K(ru({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Wp.displayName=Lp.displayName;const O0=()=>{const[e,t]=f.useState(ql),[n,r]=f.useState(!0);f.useEffect(()=>{o()},[]);const o=async()=>{try{const s=await chrome.storage.sync.get("docagramOptions");s.docagramOptions&&t(s.docagramOptions)}catch(s){console.error("Failed to load options:",s)}finally{r(!1)}};return{options:e,loading:n,saveOptions:async s=>{try{const u={...e,...s};await chrome.storage.sync.set({docagramOptions:u}),t(u)}catch(u){throw console.error("Failed to save options:",u),u}},resetToDefaults:async()=>{try{await chrome.storage.sync.set({docagramOptions:ql}),t(ql)}catch(s){throw console.error("Failed to reset options:",s),s}}}};function A0(){const e=f.useRef(null),{options:t,saveOptions:n,resetToDefaults:r}=O0();f.useEffect(()=>{if(e.current){const i=e.current;Object.entries(t).forEach(([s,u])=>{const a=i.elements.namedItem(s);a&&(a.value=u.toString())})}},[t]);const o=async i=>{i.preventDefault();const s=new FormData(i.target),u={temperature:parseFloat(s.get("temperature")),topK:parseInt(s.get("topK")),minimumEntityCount:parseInt(s.get("minimumEntityCount")),chunkSize:parseInt(s.get("chunkSize")),systemPrompt:s.get("systemPrompt")};try{await n(u),er({title:"Settings saved",description:"Your preferences have been updated successfully."})}catch{er({title:"Error",description:"Failed to save settings. Please try again.",variant:"destructive"})}},l=async()=>{try{await r(),er({title:"Settings reset",description:"All settings have been restored to their default values."})}catch{er({title:"Error",description:"Failed to reset settings. Please try again.",variant:"destructive"})}};return y.jsxs(If,{children:[y.jsx(jf,{children:y.jsx(zf,{children:"Docagram Settings"})}),y.jsx(Ff,{children:y.jsxs("form",{ref:e,onSubmit:o,className:"space-y-4",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"temperature",children:"Temperature (0.0 - 1.0)"}),y.jsx(tr,{id:"temperature",name:"temperature",type:"number",step:"0.1",min:"0",max:"1",defaultValue:t.temperature})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"topK",children:"Top K"}),y.jsx(tr,{id:"topK",name:"topK",type:"number",min:"1",defaultValue:t.topK})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"minimumEntityCount",children:"Minimum Entity Count"}),y.jsx(tr,{id:"minimumEntityCount",name:"minimumEntityCount",type:"number",min:"1",defaultValue:t.minimumEntityCount})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"chunkSize",children:"Chunk Size"}),y.jsx(tr,{id:"chunkSize",name:"chunkSize",type:"number",min:"100",defaultValue:t.chunkSize})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx(ln,{htmlFor:"systemPrompt",children:"System Prompt"}),y.jsx(Uf,{id:"systemPrompt",name:"systemPrompt",rows:4,defaultValue:t.systemPrompt})]}),y.jsxs("div",{className:"flex space-x-2",children:[y.jsx(Ji,{type:"submit",children:"Save Settings"}),y.jsxs(_0,{children:[y.jsx(R0,{asChild:!0,children:y.jsx(Ji,{variant:"outline",children:"Reset to Defaults"})}),y.jsxs(zp,{children:[y.jsxs(Fp,{children:[y.jsx(bp,{children:"Reset Settings"}),y.jsx(Up,{children:"This will reset all settings to their default values. This action cannot be undone."})]}),y.jsxs($p,{children:[y.jsx(Wp,{children:"Cancel"}),y.jsx(Vp,{onClick:l,children:"Reset Settings"})]})]})]})]})]})})]})}const ql={temperature:.7,topK:40,minimumEntityCount:2,chunkSize:3e3,systemPrompt:`Analyze this and identify key relationships between entities. Express each relationship using this format: Entity1 to Entity2 (Description of relationship) Format rules: @@ -130,4 +130,4 @@ Microsoft to Windows (develops and distributes operating system) Only output the relationships, no additional text or explanation. Each relationship should be on its own line. -Text chunk to analyze:`};function j0(){return y.jsxs("div",{className:"container mx-auto p-4",children:[y.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Docagram Options"}),y.jsx(A0,{}),y.jsx(ey,{})]})}export{Ji as B,If as C,ql as D,ln as L,j0 as O,de as P,yt as R,L0 as a,K as b,du as c,tu as d,Gs as e,De as f,ja as g,tf as h,ne as i,y as j,Rh as k,Qe as l,Hl as m,Ir as n,Ff as o,f as r,Rr as u}; +Text chunk to analyze:`};function j0(){return y.jsxs("div",{className:"container mx-auto p-4",children:[y.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Docagram Options"}),y.jsx(A0,{}),y.jsx(ey,{})]})}export{Ji as B,If as C,ql as D,Vf as F,ln as L,j0 as O,de as P,yt as R,In as S,Zs as V,L0 as a,hg as b,du as c,K as d,tu as e,cl as f,ja as g,De as h,Qe as i,y as j,Rh as k,Gs as l,ne as m,e0 as n,my as o,Zf as p,Ys as q,f as r,Hl as s,Xs as t,Rr as u,tf as v,Ir as w,Ff as x}; diff --git a/dist/c-architectureDiagram-AYX4OTIS.DGoAurYb.js b/dist/c-architectureDiagram-AYX4OTIS.CNP2CA_M.js similarity index 99% rename from dist/c-architectureDiagram-AYX4OTIS.DGoAurYb.js rename to dist/c-architectureDiagram-AYX4OTIS.CNP2CA_M.js index 9d392ca..7f4802f 100644 --- a/dist/c-architectureDiagram-AYX4OTIS.DGoAurYb.js +++ b/dist/c-architectureDiagram-AYX4OTIS.CNP2CA_M.js @@ -1,4 +1,4 @@ -import{B as ke,_ as nt,aG as qe,aH as Je,p as Qe,q as Ke,s as je,g as _e,c as tr,b as er,d as fe,l as Se,j as rr,v as ir,G as ar,V as nr,aj as Te,aI as Ee}from"./sidepanel.js";import{p as or}from"./c-chunk-BAOP5US2.D69mMcSi.js";import{I as sr}from"./c-chunk-RGXPSUNZ.DGZknDz3.js";import{p as hr}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import{c as Fe}from"./c-cytoscape.esm.YXkLVt_w.js";import{a as Ne,g as lr}from"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";var be={exports:{}},pe={exports:{}},ye={exports:{}},Oe;function fr(){return Oe||(Oe=1,function(C,Y){(function(G,N){C.exports=N()})(Ne,function(){return function(A){var G={};function N(g){if(G[g])return G[g].exports;var s=G[g]={i:g,l:!1,exports:{}};return A[g].call(s.exports,s,s.exports,N),s.l=!0,s.exports}return N.m=A,N.c=G,N.i=function(g){return g},N.d=function(g,s,i){N.o(g,s)||Object.defineProperty(g,s,{configurable:!1,enumerable:!0,get:i})},N.n=function(g){var s=g&&g.__esModule?function(){return g.default}:function(){return g};return N.d(s,"a",s),s},N.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},N.p="",N(N.s=28)}([function(A,G,N){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,A.exports=g},function(A,G,N){var g=N(2),s=N(8),i=N(9);function r(f,a,y){g.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=f,this.target=a}r.prototype=Object.create(g.prototype);for(var e in g)r[e]=g[e];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,a){for(var y=this.getOtherEnd(f),t=a.getGraphManager().getRoot();;){if(y.getOwner()==a)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,G,N){function g(s){this.vGraphObject=s}A.exports=g},function(A,G,N){var g=N(2),s=N(10),i=N(13),r=N(0),e=N(16),f=N(5);function a(t,h,o,c){o==null&&c==null&&(c=h),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&h!=null?this.rect=new i(h.x,h.y,o.width,o.height):this.rect=new i}a.prototype=Object.create(g.prototype);for(var y in g)a[y]=g[y];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(t){this.rect.width=t},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(t){this.rect.height=t},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(t,h){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=h.width,this.rect.height=h.height},a.prototype.setCenter=function(t,h){this.rect.x=t-this.rect.width/2,this.rect.y=h-this.rect.height/2},a.prototype.setLocation=function(t,h){this.rect.x=t,this.rect.y=h},a.prototype.moveBy=function(t,h){this.rect.x+=t,this.rect.y+=h},a.prototype.getEdgeListToNode=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";h.push(c)}}),h},a.prototype.getEdgesBetween=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&h.push(c)}),h},a.prototype.getNeighborsList=function(){var t=new Set,h=this;return h.edges.forEach(function(o){if(o.source==h)t.add(o.target);else{if(o.target!=h)throw"Incorrect incidency!";t.add(o.source)}}),t},a.prototype.withChildren=function(){var t=new Set,h,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;lh?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(t){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(h,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=a},function(A,G,N){var g=N(0);function s(){}for(var i in g)s[i]=g[i];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=s},function(A,G,N){function g(s,i){s==null&&i==null?(this.x=0,this.y=0):(this.x=s,this.y=i)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(s){this.x=s},g.prototype.setY=function(s){this.y=s},g.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},A.exports=g},function(A,G,N){var g=N(2),s=N(10),i=N(0),r=N(7),e=N(3),f=N(1),a=N(13),y=N(12),t=N(11);function h(c,l,T){g.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}h.prototype=Object.create(g.prototype);for(var o in g)h[o]=g[o];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},h.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,d=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(M,1),u.target!=u.source&&u.target.edges.splice(P,1);var F=u.source.owner.getEdges().indexOf(u);if(F==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(F,1)}},h.prototype.updateLeftTop=function(){for(var c=s.MAX_VALUE,l=s.MAX_VALUE,T,u,d,L=this.getNodes(),F=L.length,M=0;MT&&(c=T),l>u&&(l=u)}return c==s.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new y(this.left,this.top))},h.prototype.updateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,u=s.MAX_VALUE,d=-s.MAX_VALUE,L,F,M,P,J,V=this.nodes,Q=V.length,D=0;DL&&(l=L),TM&&(u=M),dL&&(l=L),TM&&(u=M),d=this.nodes.length){var Q=0;T.forEach(function(D){D.owner==c&&Q++}),Q==this.nodes.length&&(this.isConnected=!0)}},A.exports=h},function(A,G,N){var g,s=N(1);function i(r){g=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,e,f,a,y){if(f==null&&a==null&&y==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{y=f,a=e,f=r;var t=a.getOwner(),h=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return f.isInterGraph=!1,t.add(f,a,y);if(f.isInterGraph=!0,f.source=a,f.target=y,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var a,y=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(e[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(e[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var y=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(y=1);var t=y*e[0],h=e[1]/y;e[0]t)return e[0]=f,e[1]=o,e[2]=y,e[3]=V,!1;if(ay)return e[0]=h,e[1]=a,e[2]=P,e[3]=t,!1;if(fy?(e[0]=l,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):v===p&&(f>y?(e[0]=h,e[1]=o,n=!0):(e[0]=u,e[1]=T,n=!0)),-E===p?y>f?(e[2]=J,e[3]=V,m=!0):(e[2]=P,e[3]=M,m=!0):E===p&&(y>f?(e[2]=F,e[3]=M,m=!0):(e[2]=Q,e[3]=V,m=!0)),n&&m)return!1;if(f>y?a>t?(I=this.getCardinalDirection(v,p,4),w=this.getCardinalDirection(E,p,2)):(I=this.getCardinalDirection(-v,p,3),w=this.getCardinalDirection(-E,p,1)):a>t?(I=this.getCardinalDirection(-v,p,1),w=this.getCardinalDirection(-E,p,3)):(I=this.getCardinalDirection(v,p,2),w=this.getCardinalDirection(E,p,4)),!n)switch(I){case 1:H=o,R=f+-L/p,e[0]=R,e[1]=H;break;case 2:R=u,H=a+d*p,e[0]=R,e[1]=H;break;case 3:H=T,R=f+L/p,e[0]=R,e[1]=H;break;case 4:R=l,H=a+-d*p,e[0]=R,e[1]=H;break}if(!m)switch(w){case 1:k=M,x=y+-rt/p,e[2]=x,e[3]=k;break;case 2:x=Q,k=t+D*p,e[2]=x,e[3]=k;break;case 3:k=V,x=y+rt/p,e[2]=x,e[3]=k;break;case 4:x=J,k=t+-D*p,e[2]=x,e[3]=k;break}}return!1},s.getCardinalDirection=function(i,r,e){return i>r?e:1+e%4},s.getIntersection=function(i,r,e,f){if(f==null)return this.getIntersection2(i,r,e);var a=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,u=void 0,d=void 0,L=void 0,F=void 0,M=void 0,P=void 0,J=void 0,V=void 0,Q=void 0;return L=h-y,M=a-t,J=t*y-a*h,F=T-c,P=o-l,V=l*c-o*T,Q=L*P-F*M,Q===0?null:(u=(M*V-P*J)/Q,d=(F*J-L*V)/Q,new g(u,d))},s.angleOfVector=function(i,r,e,f){var a=void 0;return i!==e?(a=Math.atan((f-r)/(e-i)),e=0){var T=(-o+Math.sqrt(o*o-4*h*c))/(2*h),u=(-o-Math.sqrt(o*o-4*h*c))/(2*h),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,A.exports=s},function(A,G,N){function g(){}g.sign=function(s){return s>0?1:s<0?-1:0},g.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},g.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},A.exports=g},function(A,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g},function(A,G,N){var g=function(){function a(y,t){for(var h=0;h"u"?"undefined":g(i);return i==null||r!="object"&&r!="function"},A.exports=s},function(A,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(M[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var J=P.getEdges(),u=0;u-1&&M.splice(rt,1)}d=new Set,F=new Map}}return o},h.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u0){for(var T=this.edgeToDummyNodes.get(l),u=0;u=0&&c.splice(V,1);var Q=F.getNeighborsList();Q.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),v=m-1;v==1&&P.push(n),T.set(n,v)}})}l=l.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},h.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=h},function(A,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g},function(A,G,N){var g=N(5);function s(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(i){this.lworldExtX=i},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(i){this.lworldExtY=i},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},s.prototype.transformX=function(i){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/e),r},s.prototype.transformY=function(i){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/e),r},s.prototype.inverseTransformX=function(i){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/e),r},s.prototype.inverseTransformY=function(i){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/e),r},s.prototype.inverseTransformPoint=function(i){var r=new g(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=s},function(A,G,N){function g(t){if(Array.isArray(t)){for(var h=0,o=Array(t.length);hi.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},a.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=u.length||L>=u[0].length)){for(var F=0;Fa}}]),e}();A.exports=r},function(A,G,N){function g(){}g.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var i=Math.min(this.m,this.n);this.s=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(Math.min(this.m+1,this.n)),this.U=function(Nt){var Mt=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)Mt.push(0);return Mt}(this.n),e=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(this.m),f=!0,a=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var p=E+1;p=0;W--){if(function(Nt,Mt){return Nt&&Mt}(W0;){var q=void 0,Rt=void 0;for(q=n-2;q>=-1&&q!==-1;q--)if(Math.abs(r[q])<=lt+_*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){r[q]=0;break}if(q===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=q&&Lt!==q;Lt--){var vt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==q+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===q?Rt=3:Lt===n-1?Rt=1:(Rt=2,q=Lt)}switch(q++,Rt){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=q;ut--){var Tt=g.hypot(this.s[ut],it),At=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==q&&(it=-Dt*r[ut-1],r[ut-1]=At*r[ut-1]);for(var mt=0;mt=this.s[q+1]);){var Ct=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Ct,qMath.abs(i)?(r=i/s,r=Math.abs(s)*Math.sqrt(1+r*r)):i!=0?(r=s/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=g},function(A,G,N){var g=function(){function r(e,f){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,r),this.sequence1=e,this.sequence2=f,this.match_score=a,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;e--){var f=this.listeners[e];f.event===i&&f.callback===r&&this.listeners.splice(e,1)}},s.emit=function(i,r){for(var e=0;e{var G={45:(i,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),i.exports=f},806:(i,r,e)=>{var f=e(551).FDLayoutConstants;function a(){}for(var y in f)a[y]=f[y];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,i.exports=a},767:(i,r,e)=>{var f=e(551).FDLayoutEdge;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},880:(i,r,e)=>{var f=e(551).LGraph;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},578:(i,r,e)=>{var f=e(551).LGraphManager;function a(t){f.call(this,t)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},765:(i,r,e)=>{var f=e(551).FDLayout,a=e(578),y=e(880),t=e(991),h=e(767),o=e(806),c=e(902),l=e(551).FDLayoutConstants,T=e(551).LayoutConstants,u=e(551).Point,d=e(551).PointD,L=e(551).DimensionD,F=e(551).Layout,M=e(551).Integer,P=e(551).IGeometry,J=e(551).LGraph,V=e(551).Transform,Q=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new a(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new y(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new h(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(v)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(v),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return n.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(v,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},v=0;v0&&this.updateDisplacements();for(var v=0;v0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,v=0;v=2*O.length/3;_--)X=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[X],O[X]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(X)||(n.nodesInRelativeHorizontal.push(X),n.nodeToRelativeConstraintMapHorizontal.set(X,[]),n.dummyToNodeForVerticalAlignment.has(X)?n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(X).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(X).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:X,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var k=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;k.has(X)?k.get(X).push(B):k.set(X,[B]),k.has(B)?k.get(B).push(X):k.set(B,[X])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;W.has(_)?W.get(_).push(lt):W.set(_,[lt]),W.has(lt)?W.get(lt).push(_):W.set(lt,[_])}});var U=function(X,B){var _=[],lt=[],q=new Q,Rt=new Set,Lt=0;return X.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var ut=it;for(q.push(ut),Rt.add(ut),_[Lt].push(ut);q.length!=0;){ut=q.shift(),B.has(ut)&&(lt[Lt]=!0);var Tt=X.get(ut);Tt.forEach(function(At){Rt.has(At)||(q.push(At),Rt.add(At),_[Lt].push(At))})}Lt++}}),{components:_,isFixed:lt}},et=U(k,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(W,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,v=0;v1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,v){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var p=J.calculateBounds(n),I=new V;I.setDeviceOrgX(p.getMinX()),I.setDeviceOrgY(p.getMinY()),I.setWorldOrgX(v.x),I.setWorldOrgY(v.y);for(var w=0;w1;){var B=X[0];X.splice(0,1);var _=W.indexOf(B);_>=0&&W.splice(_,1),z--,U--}m!=null?O=(W.indexOf(X[0])+1)%z:O=0;for(var lt=Math.abs(E-v)/U,q=O;et!=U;q=++q%z){var Rt=W[q].getOtherEnd(n);if(Rt!=m){var Lt=(v+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,n,Lt,vt,p+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=M.MIN_VALUE,v=0;vm&&(m=p)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var v=[],E=this.graphManager.getAllNodes(),p=0;p"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(H){if(m[H].length>1){var x="DummyCompound_"+H;n.memberGroups[x]=m[H];var k=m[H][0].getParent(),W=new t(n.graphManager);W.id=x,W.paddingLeft=k.paddingLeft||0,W.paddingRight=k.paddingRight||0,W.paddingBottom=k.paddingBottom||0,W.paddingTop=k.paddingTop||0,n.idToDummyNode[x]=W;var U=n.getGraphManager().add(n.newGraph(),W),et=k.getChild();et.add(W);for(var z=0;zp?(E.rect.x-=(E.labelWidth-p)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-p)/2):E.labelPosHorizontal=="right"&&E.setWidth(p+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],v=m.id,E=m.paddingLeft,p=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[v],m.rect.x,m.rect.y,E,p,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(v){var E=n.idToDummyNode[v],p=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[v],E.rect.x,E.rect.y,p,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var v=n.getChild();if(v==null)return this.toBeTiled[m]=!1,!1;for(var E=v.getNodes(),p=0;p0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),v=0,E=0;Ek&&(k=U.rect.height)}v+=k+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var v=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var p=m[E];if(v.tiledMemberPack[E]=v.tileNodes(n[E],p.paddingLeft+p.paddingRight),p.rect.width=v.tiledMemberPack[E].width,p.rect.height=v.tiledMemberPack[E].height,p.setCenter(v.tiledMemberPack[E].centerX,v.tiledMemberPack[E].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(I+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>I?(p.rect.x-=(p.labelWidth-I)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-I)/2):p.labelPosHorizontal=="right"&&p.setWidth(I+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.tileNodes=function(n,m){var v=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),p=this.getOrgRatio(v),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var H=I/p,x=w/p,k=Math.pow(v-E,2)+4*(H+E)*(x+v)*p,W=(E-v+Math.sqrt(k))/(2*(H+E)),U;m?(U=Math.ceil(W),U==W&&U++):U=Math.floor(W);var et=U*(H+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,v){var E=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:p,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,v));var R=function(O){return O.rect.width*O.rect.height},H=function(O,X){return R(X)-R(O)};n.sort(function(z,O){var X=H;return w.idealRowWidth?(X=I,X(z.id,O.id)):X(z,O)});for(var x=0,k=0,W=0;W0&&(w+=n.horizontalPadding),n.rowWidth[v]=w,n.width0&&(R+=n.verticalPadding);var H=0;R>n.rowHeight[v]&&(H=n.rowHeight[v],n.rowHeight[v]=R,H=n.rowHeight[v]-H),n.height+=H,n.rows[v].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,v=Number.MAX_VALUE,E=0;Ev&&(m=E,v=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,v){if(n.idealRowWidth){var E=n.rows.length-1,p=n.rowWidth[E];return p+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=v+n.verticalPadding-n.rowHeight[I]);var H;n.width-w>=m+n.horizontalPadding?H=(n.height+R)/(w+m+n.horizontalPadding):H=(n.height+R)/n.width,R=v+n.verticalPadding;var x;return n.widthI&&m!=v){E.splice(-1,1),n.rows[v].push(p),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[v]=n.rowWidth[v]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var H=n.rowHeight[m]+n.rowHeight[v];n.rowHeight[m]=w,n.rowHeight[v]0)for(var et=p;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[p-1][et].length+this.grid[p][et].length-1;for(var z=M.MAX_VALUE,O,X,B=0;B{var f=e(551).FDLayoutNode,a=e(551).IMath;function y(h,o,c,l){f.call(this,h,o,c,l)}y.prototype=Object.create(f.prototype);for(var t in f)y[t]=f[t];y.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(h,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Ct=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,u.has(ht)?d[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht)):(tt.set(ht,u.has(ht)?L[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){K.has(ht)||tt.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:Z.get(ht):ct+=u.has(ht)?L[u.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Ct=b.get(st);Ct.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){Mt=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(Mt)throw Zt}}var ce=(Ct+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ce)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?d[u.get(j.left)]-d[u.get(j.right)]>=0?$++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gtK)for(var ot=0;otat)for(var tt=0;tt1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],p[b]=[d[u.get(S.nodeId)],L[u.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).x,b[tt].forEach(function(yt){E[S]=[wt,L[u.get(yt)]],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},K=0;K0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).y,Z[tt].forEach(function(yt){E[S]=[d[u.get(yt)],wt],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},gt=0;gtW&&(W=k[et].length,U=et);if(W0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var $={x:d[u.get(S.nodeId)],y:L[u.get(S.nodeId)]},K=S.position,Z=V(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(S,b){d[b]+=mt.x}),L.forEach(function(S,b){L[b]+=mt.y}),l.fixedNodeConstraint.forEach(function(S){d[u.get(S.nodeId)]=S.position.x,L[u.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var xt=l.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=d[u.get(K.values().next().value)]:Z=Q($).x,$.forEach(function(at){R.has(at)||(d[u.get(at)]=Z)})},Vt=0;Vt0?Z=L[u.get(K.values().next().value)]:Z=Q($).y,$.forEach(function(at){R.has(at)||(L[u.get(at)]=Z)})},bt=0;bt{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(45);return s})()})}(pe)),pe.exports}(function(C,Y){(function(G,N){C.exports=N(cr())})(Ne,function(A){return(()=>{var G={658:i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),a=1;a{var f=function(){function t(h,o){var c=[],l=!0,T=!1,u=void 0;try{for(var d=h[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(F){T=!0,u=F}finally{try{!l&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(h,o){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=e(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var h={},o=0;o0&&I.merge(x)});for(var w=0;w1){L=u[0],F=L.connectedEdges().length,u.forEach(function(p){p.connectedEdges().length0&&c.set("dummy"+(c.size+1),J),V},y.relocateComponent=function(t,h,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,F=void 0;try{for(var M=h.nodeIndexes[Symbol.iterator](),P;!(d=(P=M.next()).done);d=!0){var J=P.value,V=f(J,2),Q=V[0],D=V[1],rt=o.cy.getElementById(Q);if(rt){var n=rt.boundingBox(),m=h.xCoords[D]-n.w/2,v=h.xCoords[D]+n.w/2,E=h.yCoords[D]-n.h/2,p=h.yCoords[D]+n.h/2;ml&&(l=v),Eu&&(u=p)}}}catch(x){L=!0,F=x}finally{try{!d&&M.return&&M.return()}finally{if(L)throw F}}var I=t.x-(l+c)/2,w=t.y-(u+T)/2;h.xCoords=h.xCoords.map(function(x){return x+I}),h.yCoords=h.yCoords.map(function(x){return x+w})}else{Object.keys(h).forEach(function(x){var k=h[x],W=k.getRect().x,U=k.getRect().x+k.getRect().width,et=k.getRect().y,z=k.getRect().y+k.getRect().height;Wl&&(l=U),etu&&(u=z)});var R=t.x-(l+c)/2,H=t.y-(u+T)/2;Object.keys(h).forEach(function(x){var k=h[x];k.setCenter(k.getCenterX()+R,k.getCenterY()+H)})}}},y.calcBoundingBox=function(t,h,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,M=void 0,P=void 0,J=t.descendants().not(":parent"),V=J.length,Q=0;QL&&(l=L),TM&&(u=M),d{var f=e(548),a=e(140).CoSELayout,y=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,l=e(140).CoSEConstants,T=function(d,L){var F=d.cy,M=d.eles,P=M.nodes(),J=M.edges(),V=void 0,Q=void 0,D=void 0,rt={};d.randomize&&(V=L.nodeIndexes,Q=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,k){return n(x)?x(k):x},v=f.calcParentsWithoutChildren(F,M),E=function H(x,k,W,U){for(var et=k.length,z=0;z0){var q=void 0;q=W.getGraphManager().add(W.newGraph(),B),H(q,X,W,U)}}},p=function(x,k,W){for(var U=0,et=0,z=0;z0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,k){k.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=k.fixedNodeConstraint),k.alignmentConstraint&&(x.constraints.alignmentConstraint=k.alignmentConstraint),k.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=k.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new a,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),p(w,R,J),I(w,d),w.runLayout(),rt};i.exports={coseLayout:T}},212:(i,r,e)=>{var f=function(){function d(L,F){for(var M=0;M0)if(v){var I=t.getTopMostNodes(M.eles.nodes());if(D=t.connectComponents(P,M.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),M.randomize&&D.forEach(function(vt){M.eles=vt,V.push(o(M))}),M.quality=="default"||M.quality=="proof"){var w=P.collection();if(M.tile){var R=new Map,H=[],x=[],k=0,W={nodeIndexes:R,xCoords:H,yCoords:x},U=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Tt){w.merge(vt.nodes()[Tt]),ut.isParent()||(W.nodeIndexes.set(vt.nodes()[Tt].id(),k++),W.xCoords.push(vt.nodes()[0].position().x),W.yCoords.push(vt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),V.push(W);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),V.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(vt,it){M.eles=vt,Q.push(l(M,V[it])),t.relocateComponent(rt[it],Q[it],M)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],V[it],M)});var O=new Set;if(D.length>1){var X=[],B=J.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var ut=void 0;if(M.quality=="draft"&&(ut=V[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Dt){if(M.quality=="draft")if(!Dt.isParent())At=ut.get(Dt.id()),Tt.nodes.push({x:V[it].xCoords[At]-Dt.boundingbox().w/2,y:V[it].yCoords[At]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,V[it].xCoords,V[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Q[it][Dt.id()]&&Tt.nodes.push({x:Q[it][Dt.id()].getLeft(),y:Q[it][Dt.id()].getTop(),width:Q[it][Dt.id()].getWidth(),height:Q[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(M.quality=="draft"){var St=ut.get(mt.id()),Vt=ut.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,V[it].xCoords,V[it].yCoords,ut);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(V[it].xCoords[St]),Xt.push(V[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,V[it].xCoords,V[it].yCoords,ut);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(V[it].xCoords[Vt]),Ut.push(V[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Q[it][mt.id()]&&Q[it][xt.id()]&&Tt.edges.push({startX:Q[it][mt.id()].getCenterX(),startY:Q[it][mt.id()].getCenterY(),endX:Q[it][xt.id()].getCenterX(),endY:Q[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(X.push(Tt),O.add(it))}});var _=m.packComponents(X,M.randomize).shifts;if(M.quality=="draft")V.forEach(function(vt,it){var ut=vt.xCoords.map(function(At){return At+_[it].dx}),Tt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=ut,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(Q[vt]).forEach(function(it){var ut=Q[vt][it];ut.setCenter(ut.getCenterX()+_[lt].dx,ut.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=M.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),M.randomize){var p=o(M);V.push(p)}M.quality=="default"||M.quality=="proof"?(Q.push(l(M,V[0])),t.relocateComponent(rt[0],Q[0],M)):t.relocateComponent(rt[0],V[0],M)}var q=function(it,ut){if(M.quality=="default"||M.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,At=void 0,Dt=it.data("id");return Q.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},At=xt[Dt])}),M.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Tt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Tt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Tt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Tt.y-=At.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return V.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(M.quality=="default"||M.quality=="proof"||M.randomize){var Rt=t.calcParentsWithoutChildren(P,J),Lt=J.filter(function(vt){return vt.css("display")=="none"});M.eles=J.not(Lt),J.nodes().not(":parent").not(Lt).layoutPositions(F,M,q),Rt.length>0&&Rt.forEach(function(vt){vt.position(q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();i.exports=u},657:(i,r,e)=>{var f=e(548),a=e(140).layoutBase.Matrix,y=e(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),d=new Map,L=new Map,F=new Map,M=[],P=[],J=[],V=[],Q=[],D=[],rt=[],n=[],m=void 0,v=1e8,E=1e-9,p=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,H=function(){for(var b=0,$=0,K=!1;$=at;){ot=Z[at++];for(var It=M[ot],ft=0;ftdt&&(dt=Q[Ct],wt=Ct)}return wt},k=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?M[b].push(F.get($.id())):M[b].push($.id()))})});var Lt=function(b){var $=L.get(b),K=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,M[$].push(K),M[L.get(K)].push(b)})},vt=!0,it=!1,ut=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),At;!(vt=(At=Tt.next()).done);vt=!0){var Dt=At.value;Lt(Dt)}}catch(S){it=!0,ut=S}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){R=m{var f=e(212),a=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&a(cytoscape),i.exports=a},140:i=>{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(579);return s})()})})(be);var gr=be.exports;const ur=lr(gr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},he={L:nt((C,Y)=>C-Y+2,"L"),R:nt((C,Y)=>C-2,"R"),T:nt((C,Y)=>C-Y+2,"T"),B:nt((C,Y)=>C-2,"B")},dr=nt(function(C){return zt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=nt(function(C){const Y=C;return Y==="L"||Y==="R"||Y==="T"||Y==="B"},"isArchitectureDirection"),zt=nt(function(C){const Y=C;return Y==="L"||Y==="R"},"isArchitectureDirectionX"),Qt=nt(function(C){const Y=C;return Y==="T"||Y==="B"},"isArchitectureDirectionY"),Pe=nt(function(C,Y){const A=zt(C)&&Qt(Y),G=Qt(C)&&zt(Y);return A||G},"isArchitectureDirectionXY"),vr=nt(function(C){const Y=C[0],A=C[1],G=zt(Y)&&Qt(A),N=Qt(Y)&&zt(A);return G||N},"isArchitecturePairXY"),pr=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),me=nt(function(C,Y){const A=`${C}${Y}`;return pr(A)?A:void 0},"getArchitectureDirectionPair"),yr=nt(function([C,Y],A){const G=A[0],N=A[1];return zt(G)?Qt(N)?[C+(G==="L"?-1:1),Y+(N==="T"?1:-1)]:[C+(G==="L"?-1:1),Y]:zt(N)?[C+(N==="L"?1:-1),Y+(G==="T"?1:-1)]:[C,Y+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Er=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=nt(function(C){return C.type==="service"},"isArchitectureService"),Tr=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),Ge=nt(C=>C.data(),"edgeData"),ne=nt(C=>C.data(),"nodeData"),Ue=ke.architecture,pt=new sr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ue,dataStructures:void 0,elements:{}})),Nr=nt(()=>{pt.reset(),ir()},"clear"),Lr=nt(function({id:C,icon:Y,in:A,title:G,iconText:N}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The service [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[A]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"service",icon:Y,iconText:N,title:G,edges:[],in:A}},"addService"),Cr=nt(()=>Object.values(pt.records.nodes).filter(mr),"getServices"),Mr=nt(function({id:C,in:Y}){pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"junction",edges:[],in:Y}},"addJunction"),Ar=nt(()=>Object.values(pt.records.nodes).filter(Tr),"getJunctions"),wr=nt(()=>Object.values(pt.records.nodes),"getNodes"),Or=nt(C=>pt.records.nodes[C],"getNode"),Dr=nt(function({id:C,icon:Y,in:A,title:G}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The group [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[A]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="group",pt.records.groups[C]={id:C,icon:Y,title:G,in:A}},"addGroup"),xr=nt(()=>Object.values(pt.records.groups),"getGroups"),Ir=nt(function({lhsId:C,rhsId:Y,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:g,lhsGroup:s,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${A}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[C]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[Y]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[C].in,f=pt.records.nodes[Y].in;if(s&&e&&f&&e==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&e&&f&&e==f)throw new Error(`The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:C,lhsDir:A,lhsInto:N,lhsGroup:s,rhsId:Y,rhsDir:G,rhsInto:g,rhsGroup:i,title:r};pt.records.edges.push(a),pt.records.nodes[C]&&pt.records.nodes[Y]&&(pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Rr=nt(()=>pt.records.edges,"getEdges"),Sr=nt(()=>{if(pt.records.dataStructures===void 0){const C=Object.entries(pt.records.nodes).reduce((s,[i,r])=>(s[i]=r.edges.reduce((e,f)=>{if(f.lhsId===i){const a=me(f.lhsDir,f.rhsDir);a&&(e[a]=f.rhsId)}else{const a=me(f.rhsDir,f.lhsDir);a&&(e[a]=f.lhsId)}return e},{}),s),{}),Y=Object.keys(C)[0],A={[Y]:1},G=Object.keys(C).reduce((s,i)=>i===Y?s:{...s,[i]:1},{}),N=nt(s=>{const i={[s]:[0,0]},r=[s];for(;r.length>0;){const e=r.shift();if(e){A[e]=1,delete G[e];const f=C[e],[a,y]=i[e];Object.entries(f).forEach(([t,h])=>{A[h]||(i[h]=yr([a,y],t),r.push(h))})}}return i},"BFS"),g=[N(Y)];for(;Object.keys(G).length>0;)g.push(N(Object.keys(G)[0]));pt.records.dataStructures={adjList:C,spatialMaps:g}}return pt.records.dataStructures},"getDataStructures"),Fr=nt((C,Y)=>{pt.records.elements[C]=Y},"setElementForId"),br=nt(C=>pt.records.elements[C],"getElementById"),le={clear:Nr,setDiagramTitle:Qe,getDiagramTitle:Ke,setAccTitle:je,getAccTitle:_e,setAccDescription:tr,getAccDescription:er,addService:Lr,getServices:Cr,addJunction:Mr,getJunctions:Ar,getNodes:wr,getNode:Or,addGroup:Dr,getGroups:xr,addEdge:Ir,getEdges:Rr,setElementForId:Fr,getElementById:br,getDataStructures:Sr};function Pt(C){const Y=fe().architecture;return Y!=null&&Y[C]?Y[C]:Ue[C]}nt(Pt,"getConfigField");var Pr=nt((C,Y)=>{or(C,Y),C.groups.map(Y.addGroup),C.services.map(A=>Y.addService({...A,type:"service"})),C.junctions.map(A=>Y.addJunction({...A,type:"junction"})),C.edges.map(Y.addEdge)},"populateDb"),Gr={parse:nt(async C=>{const Y=await hr("architecture",C);Se.debug(Y),Pr(Y,le)},"parse")},Ur=nt(C=>` +import{B as ke,_ as nt,aG as qe,aH as Je,p as Qe,q as Ke,s as je,g as _e,c as tr,b as er,d as fe,l as Se,j as rr,v as ir,G as ar,V as nr,aj as Te,aI as Ee}from"./sidepanel.js";import{p as or}from"./c-chunk-BAOP5US2.D69mMcSi.js";import{I as sr}from"./c-chunk-RGXPSUNZ.DGZknDz3.js";import{p as hr}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import{c as Fe}from"./c-cytoscape.esm.YXkLVt_w.js";import{a as Ne,g as lr}from"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";var be={exports:{}},pe={exports:{}},ye={exports:{}},Oe;function fr(){return Oe||(Oe=1,function(C,Y){(function(G,N){C.exports=N()})(Ne,function(){return function(A){var G={};function N(g){if(G[g])return G[g].exports;var s=G[g]={i:g,l:!1,exports:{}};return A[g].call(s.exports,s,s.exports,N),s.l=!0,s.exports}return N.m=A,N.c=G,N.i=function(g){return g},N.d=function(g,s,i){N.o(g,s)||Object.defineProperty(g,s,{configurable:!1,enumerable:!0,get:i})},N.n=function(g){var s=g&&g.__esModule?function(){return g.default}:function(){return g};return N.d(s,"a",s),s},N.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},N.p="",N(N.s=28)}([function(A,G,N){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,A.exports=g},function(A,G,N){var g=N(2),s=N(8),i=N(9);function r(f,a,y){g.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=f,this.target=a}r.prototype=Object.create(g.prototype);for(var e in g)r[e]=g[e];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,a){for(var y=this.getOtherEnd(f),t=a.getGraphManager().getRoot();;){if(y.getOwner()==a)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r},function(A,G,N){function g(s){this.vGraphObject=s}A.exports=g},function(A,G,N){var g=N(2),s=N(10),i=N(13),r=N(0),e=N(16),f=N(5);function a(t,h,o,c){o==null&&c==null&&(c=h),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&h!=null?this.rect=new i(h.x,h.y,o.width,o.height):this.rect=new i}a.prototype=Object.create(g.prototype);for(var y in g)a[y]=g[y];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(t){this.rect.width=t},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(t){this.rect.height=t},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(t,h){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=h.width,this.rect.height=h.height},a.prototype.setCenter=function(t,h){this.rect.x=t-this.rect.width/2,this.rect.y=h-this.rect.height/2},a.prototype.setLocation=function(t,h){this.rect.x=t,this.rect.y=h},a.prototype.moveBy=function(t,h){this.rect.x+=t,this.rect.y+=h},a.prototype.getEdgeListToNode=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";h.push(c)}}),h},a.prototype.getEdgesBetween=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&h.push(c)}),h},a.prototype.getNeighborsList=function(){var t=new Set,h=this;return h.edges.forEach(function(o){if(o.source==h)t.add(o.target);else{if(o.target!=h)throw"Incorrect incidency!";t.add(o.source)}}),t},a.prototype.withChildren=function(){var t=new Set,h,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;lh?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(t){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(h,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=a},function(A,G,N){var g=N(0);function s(){}for(var i in g)s[i]=g[i];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=s},function(A,G,N){function g(s,i){s==null&&i==null?(this.x=0,this.y=0):(this.x=s,this.y=i)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(s){this.x=s},g.prototype.setY=function(s){this.y=s},g.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},A.exports=g},function(A,G,N){var g=N(2),s=N(10),i=N(0),r=N(7),e=N(3),f=N(1),a=N(13),y=N(12),t=N(11);function h(c,l,T){g.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}h.prototype=Object.create(g.prototype);for(var o in g)h[o]=g[o];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},h.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,d=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(M,1),u.target!=u.source&&u.target.edges.splice(P,1);var F=u.source.owner.getEdges().indexOf(u);if(F==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(F,1)}},h.prototype.updateLeftTop=function(){for(var c=s.MAX_VALUE,l=s.MAX_VALUE,T,u,d,L=this.getNodes(),F=L.length,M=0;MT&&(c=T),l>u&&(l=u)}return c==s.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new y(this.left,this.top))},h.prototype.updateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,u=s.MAX_VALUE,d=-s.MAX_VALUE,L,F,M,P,J,V=this.nodes,Q=V.length,D=0;DL&&(l=L),TM&&(u=M),dL&&(l=L),TM&&(u=M),d=this.nodes.length){var Q=0;T.forEach(function(D){D.owner==c&&Q++}),Q==this.nodes.length&&(this.isConnected=!0)}},A.exports=h},function(A,G,N){var g,s=N(1);function i(r){g=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,e,f,a,y){if(f==null&&a==null&&y==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{y=f,a=e,f=r;var t=a.getOwner(),h=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return f.isInterGraph=!1,t.add(f,a,y);if(f.isInterGraph=!0,f.source=a,f.target=y,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var a,y=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(e[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(e[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var y=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(y=1);var t=y*e[0],h=e[1]/y;e[0]t)return e[0]=f,e[1]=o,e[2]=y,e[3]=V,!1;if(ay)return e[0]=h,e[1]=a,e[2]=P,e[3]=t,!1;if(fy?(e[0]=l,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):v===p&&(f>y?(e[0]=h,e[1]=o,n=!0):(e[0]=u,e[1]=T,n=!0)),-E===p?y>f?(e[2]=J,e[3]=V,m=!0):(e[2]=P,e[3]=M,m=!0):E===p&&(y>f?(e[2]=F,e[3]=M,m=!0):(e[2]=Q,e[3]=V,m=!0)),n&&m)return!1;if(f>y?a>t?(I=this.getCardinalDirection(v,p,4),w=this.getCardinalDirection(E,p,2)):(I=this.getCardinalDirection(-v,p,3),w=this.getCardinalDirection(-E,p,1)):a>t?(I=this.getCardinalDirection(-v,p,1),w=this.getCardinalDirection(-E,p,3)):(I=this.getCardinalDirection(v,p,2),w=this.getCardinalDirection(E,p,4)),!n)switch(I){case 1:H=o,R=f+-L/p,e[0]=R,e[1]=H;break;case 2:R=u,H=a+d*p,e[0]=R,e[1]=H;break;case 3:H=T,R=f+L/p,e[0]=R,e[1]=H;break;case 4:R=l,H=a+-d*p,e[0]=R,e[1]=H;break}if(!m)switch(w){case 1:k=M,x=y+-rt/p,e[2]=x,e[3]=k;break;case 2:x=Q,k=t+D*p,e[2]=x,e[3]=k;break;case 3:k=V,x=y+rt/p,e[2]=x,e[3]=k;break;case 4:x=J,k=t+-D*p,e[2]=x,e[3]=k;break}}return!1},s.getCardinalDirection=function(i,r,e){return i>r?e:1+e%4},s.getIntersection=function(i,r,e,f){if(f==null)return this.getIntersection2(i,r,e);var a=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,u=void 0,d=void 0,L=void 0,F=void 0,M=void 0,P=void 0,J=void 0,V=void 0,Q=void 0;return L=h-y,M=a-t,J=t*y-a*h,F=T-c,P=o-l,V=l*c-o*T,Q=L*P-F*M,Q===0?null:(u=(M*V-P*J)/Q,d=(F*J-L*V)/Q,new g(u,d))},s.angleOfVector=function(i,r,e,f){var a=void 0;return i!==e?(a=Math.atan((f-r)/(e-i)),e=0){var T=(-o+Math.sqrt(o*o-4*h*c))/(2*h),u=(-o-Math.sqrt(o*o-4*h*c))/(2*h),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,A.exports=s},function(A,G,N){function g(){}g.sign=function(s){return s>0?1:s<0?-1:0},g.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},g.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},A.exports=g},function(A,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g},function(A,G,N){var g=function(){function a(y,t){for(var h=0;h"u"?"undefined":g(i);return i==null||r!="object"&&r!="function"},A.exports=s},function(A,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(M[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var J=P.getEdges(),u=0;u-1&&M.splice(rt,1)}d=new Set,F=new Map}}return o},h.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u0){for(var T=this.edgeToDummyNodes.get(l),u=0;u=0&&c.splice(V,1);var Q=F.getNeighborsList();Q.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),v=m-1;v==1&&P.push(n),T.set(n,v)}})}l=l.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},h.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=h},function(A,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g},function(A,G,N){var g=N(5);function s(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(i){this.lworldExtX=i},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(i){this.lworldExtY=i},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},s.prototype.transformX=function(i){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/e),r},s.prototype.transformY=function(i){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/e),r},s.prototype.inverseTransformX=function(i){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/e),r},s.prototype.inverseTransformY=function(i){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/e),r},s.prototype.inverseTransformPoint=function(i){var r=new g(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=s},function(A,G,N){function g(t){if(Array.isArray(t)){for(var h=0,o=Array(t.length);hi.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},a.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=u.length||L>=u[0].length)){for(var F=0;Fa}}]),e}();A.exports=r},function(A,G,N){function g(){}g.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var i=Math.min(this.m,this.n);this.s=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(Math.min(this.m+1,this.n)),this.U=function(Nt){var Mt=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)Mt.push(0);return Mt}(this.n),e=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(this.m),f=!0,a=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var p=E+1;p=0;W--){if(function(Nt,Mt){return Nt&&Mt}(W0;){var q=void 0,Rt=void 0;for(q=n-2;q>=-1&&q!==-1;q--)if(Math.abs(r[q])<=lt+_*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){r[q]=0;break}if(q===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=q&&Lt!==q;Lt--){var vt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==q+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===q?Rt=3:Lt===n-1?Rt=1:(Rt=2,q=Lt)}switch(q++,Rt){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=q;ut--){var Tt=g.hypot(this.s[ut],it),At=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==q&&(it=-Dt*r[ut-1],r[ut-1]=At*r[ut-1]);for(var mt=0;mt=this.s[q+1]);){var Ct=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Ct,qMath.abs(i)?(r=i/s,r=Math.abs(s)*Math.sqrt(1+r*r)):i!=0?(r=s/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=g},function(A,G,N){var g=function(){function r(e,f){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,r),this.sequence1=e,this.sequence2=f,this.match_score=a,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;e--){var f=this.listeners[e];f.event===i&&f.callback===r&&this.listeners.splice(e,1)}},s.emit=function(i,r){for(var e=0;e{var G={45:(i,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),i.exports=f},806:(i,r,e)=>{var f=e(551).FDLayoutConstants;function a(){}for(var y in f)a[y]=f[y];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,i.exports=a},767:(i,r,e)=>{var f=e(551).FDLayoutEdge;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},880:(i,r,e)=>{var f=e(551).LGraph;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},578:(i,r,e)=>{var f=e(551).LGraphManager;function a(t){f.call(this,t)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},765:(i,r,e)=>{var f=e(551).FDLayout,a=e(578),y=e(880),t=e(991),h=e(767),o=e(806),c=e(902),l=e(551).FDLayoutConstants,T=e(551).LayoutConstants,u=e(551).Point,d=e(551).PointD,L=e(551).DimensionD,F=e(551).Layout,M=e(551).Integer,P=e(551).IGeometry,J=e(551).LGraph,V=e(551).Transform,Q=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new a(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new y(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new h(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(v)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(v),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return n.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(v,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},v=0;v0&&this.updateDisplacements();for(var v=0;v0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,v=0;v=2*O.length/3;_--)X=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[X],O[X]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(X)||(n.nodesInRelativeHorizontal.push(X),n.nodeToRelativeConstraintMapHorizontal.set(X,[]),n.dummyToNodeForVerticalAlignment.has(X)?n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(X).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(X).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:X,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var k=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;k.has(X)?k.get(X).push(B):k.set(X,[B]),k.has(B)?k.get(B).push(X):k.set(B,[X])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;W.has(_)?W.get(_).push(lt):W.set(_,[lt]),W.has(lt)?W.get(lt).push(_):W.set(lt,[_])}});var U=function(X,B){var _=[],lt=[],q=new Q,Rt=new Set,Lt=0;return X.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var ut=it;for(q.push(ut),Rt.add(ut),_[Lt].push(ut);q.length!=0;){ut=q.shift(),B.has(ut)&&(lt[Lt]=!0);var Tt=X.get(ut);Tt.forEach(function(At){Rt.has(At)||(q.push(At),Rt.add(At),_[Lt].push(At))})}Lt++}}),{components:_,isFixed:lt}},et=U(k,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(W,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,v=0;v1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,v){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var p=J.calculateBounds(n),I=new V;I.setDeviceOrgX(p.getMinX()),I.setDeviceOrgY(p.getMinY()),I.setWorldOrgX(v.x),I.setWorldOrgY(v.y);for(var w=0;w1;){var B=X[0];X.splice(0,1);var _=W.indexOf(B);_>=0&&W.splice(_,1),z--,U--}m!=null?O=(W.indexOf(X[0])+1)%z:O=0;for(var lt=Math.abs(E-v)/U,q=O;et!=U;q=++q%z){var Rt=W[q].getOtherEnd(n);if(Rt!=m){var Lt=(v+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,n,Lt,vt,p+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=M.MIN_VALUE,v=0;vm&&(m=p)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var v=[],E=this.graphManager.getAllNodes(),p=0;p"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(H){if(m[H].length>1){var x="DummyCompound_"+H;n.memberGroups[x]=m[H];var k=m[H][0].getParent(),W=new t(n.graphManager);W.id=x,W.paddingLeft=k.paddingLeft||0,W.paddingRight=k.paddingRight||0,W.paddingBottom=k.paddingBottom||0,W.paddingTop=k.paddingTop||0,n.idToDummyNode[x]=W;var U=n.getGraphManager().add(n.newGraph(),W),et=k.getChild();et.add(W);for(var z=0;zp?(E.rect.x-=(E.labelWidth-p)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-p)/2):E.labelPosHorizontal=="right"&&E.setWidth(p+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],v=m.id,E=m.paddingLeft,p=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[v],m.rect.x,m.rect.y,E,p,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(v){var E=n.idToDummyNode[v],p=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[v],E.rect.x,E.rect.y,p,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var v=n.getChild();if(v==null)return this.toBeTiled[m]=!1,!1;for(var E=v.getNodes(),p=0;p0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),v=0,E=0;Ek&&(k=U.rect.height)}v+=k+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var v=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var p=m[E];if(v.tiledMemberPack[E]=v.tileNodes(n[E],p.paddingLeft+p.paddingRight),p.rect.width=v.tiledMemberPack[E].width,p.rect.height=v.tiledMemberPack[E].height,p.setCenter(v.tiledMemberPack[E].centerX,v.tiledMemberPack[E].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(I+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>I?(p.rect.x-=(p.labelWidth-I)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-I)/2):p.labelPosHorizontal=="right"&&p.setWidth(I+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.tileNodes=function(n,m){var v=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),p=this.getOrgRatio(v),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var H=I/p,x=w/p,k=Math.pow(v-E,2)+4*(H+E)*(x+v)*p,W=(E-v+Math.sqrt(k))/(2*(H+E)),U;m?(U=Math.ceil(W),U==W&&U++):U=Math.floor(W);var et=U*(H+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,v){var E=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:p,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,v));var R=function(O){return O.rect.width*O.rect.height},H=function(O,X){return R(X)-R(O)};n.sort(function(z,O){var X=H;return w.idealRowWidth?(X=I,X(z.id,O.id)):X(z,O)});for(var x=0,k=0,W=0;W0&&(w+=n.horizontalPadding),n.rowWidth[v]=w,n.width0&&(R+=n.verticalPadding);var H=0;R>n.rowHeight[v]&&(H=n.rowHeight[v],n.rowHeight[v]=R,H=n.rowHeight[v]-H),n.height+=H,n.rows[v].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,v=Number.MAX_VALUE,E=0;Ev&&(m=E,v=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,v){if(n.idealRowWidth){var E=n.rows.length-1,p=n.rowWidth[E];return p+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=v+n.verticalPadding-n.rowHeight[I]);var H;n.width-w>=m+n.horizontalPadding?H=(n.height+R)/(w+m+n.horizontalPadding):H=(n.height+R)/n.width,R=v+n.verticalPadding;var x;return n.widthI&&m!=v){E.splice(-1,1),n.rows[v].push(p),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[v]=n.rowWidth[v]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var H=n.rowHeight[m]+n.rowHeight[v];n.rowHeight[m]=w,n.rowHeight[v]0)for(var et=p;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[p-1][et].length+this.grid[p][et].length-1;for(var z=M.MAX_VALUE,O,X,B=0;B{var f=e(551).FDLayoutNode,a=e(551).IMath;function y(h,o,c,l){f.call(this,h,o,c,l)}y.prototype=Object.create(f.prototype);for(var t in f)y[t]=f[t];y.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(h,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Ct=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,u.has(ht)?d[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht)):(tt.set(ht,u.has(ht)?L[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){K.has(ht)||tt.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:Z.get(ht):ct+=u.has(ht)?L[u.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Ct=b.get(st);Ct.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){Mt=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(Mt)throw Zt}}var ce=(Ct+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ce)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?d[u.get(j.left)]-d[u.get(j.right)]>=0?$++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gtK)for(var ot=0;otat)for(var tt=0;tt1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],p[b]=[d[u.get(S.nodeId)],L[u.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).x,b[tt].forEach(function(yt){E[S]=[wt,L[u.get(yt)]],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},K=0;K0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).y,Z[tt].forEach(function(yt){E[S]=[d[u.get(yt)],wt],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},gt=0;gtW&&(W=k[et].length,U=et);if(W0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var $={x:d[u.get(S.nodeId)],y:L[u.get(S.nodeId)]},K=S.position,Z=V(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(S,b){d[b]+=mt.x}),L.forEach(function(S,b){L[b]+=mt.y}),l.fixedNodeConstraint.forEach(function(S){d[u.get(S.nodeId)]=S.position.x,L[u.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var xt=l.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=d[u.get(K.values().next().value)]:Z=Q($).x,$.forEach(function(at){R.has(at)||(d[u.get(at)]=Z)})},Vt=0;Vt0?Z=L[u.get(K.values().next().value)]:Z=Q($).y,$.forEach(function(at){R.has(at)||(L[u.get(at)]=Z)})},bt=0;bt{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(45);return s})()})}(pe)),pe.exports}(function(C,Y){(function(G,N){C.exports=N(cr())})(Ne,function(A){return(()=>{var G={658:i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),a=1;a{var f=function(){function t(h,o){var c=[],l=!0,T=!1,u=void 0;try{for(var d=h[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(F){T=!0,u=F}finally{try{!l&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(h,o){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=e(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var h={},o=0;o0&&I.merge(x)});for(var w=0;w1){L=u[0],F=L.connectedEdges().length,u.forEach(function(p){p.connectedEdges().length0&&c.set("dummy"+(c.size+1),J),V},y.relocateComponent=function(t,h,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,F=void 0;try{for(var M=h.nodeIndexes[Symbol.iterator](),P;!(d=(P=M.next()).done);d=!0){var J=P.value,V=f(J,2),Q=V[0],D=V[1],rt=o.cy.getElementById(Q);if(rt){var n=rt.boundingBox(),m=h.xCoords[D]-n.w/2,v=h.xCoords[D]+n.w/2,E=h.yCoords[D]-n.h/2,p=h.yCoords[D]+n.h/2;ml&&(l=v),Eu&&(u=p)}}}catch(x){L=!0,F=x}finally{try{!d&&M.return&&M.return()}finally{if(L)throw F}}var I=t.x-(l+c)/2,w=t.y-(u+T)/2;h.xCoords=h.xCoords.map(function(x){return x+I}),h.yCoords=h.yCoords.map(function(x){return x+w})}else{Object.keys(h).forEach(function(x){var k=h[x],W=k.getRect().x,U=k.getRect().x+k.getRect().width,et=k.getRect().y,z=k.getRect().y+k.getRect().height;Wl&&(l=U),etu&&(u=z)});var R=t.x-(l+c)/2,H=t.y-(u+T)/2;Object.keys(h).forEach(function(x){var k=h[x];k.setCenter(k.getCenterX()+R,k.getCenterY()+H)})}}},y.calcBoundingBox=function(t,h,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,M=void 0,P=void 0,J=t.descendants().not(":parent"),V=J.length,Q=0;QL&&(l=L),TM&&(u=M),d{var f=e(548),a=e(140).CoSELayout,y=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,l=e(140).CoSEConstants,T=function(d,L){var F=d.cy,M=d.eles,P=M.nodes(),J=M.edges(),V=void 0,Q=void 0,D=void 0,rt={};d.randomize&&(V=L.nodeIndexes,Q=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,k){return n(x)?x(k):x},v=f.calcParentsWithoutChildren(F,M),E=function H(x,k,W,U){for(var et=k.length,z=0;z0){var q=void 0;q=W.getGraphManager().add(W.newGraph(),B),H(q,X,W,U)}}},p=function(x,k,W){for(var U=0,et=0,z=0;z0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,k){k.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=k.fixedNodeConstraint),k.alignmentConstraint&&(x.constraints.alignmentConstraint=k.alignmentConstraint),k.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=k.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new a,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),p(w,R,J),I(w,d),w.runLayout(),rt};i.exports={coseLayout:T}},212:(i,r,e)=>{var f=function(){function d(L,F){for(var M=0;M0)if(v){var I=t.getTopMostNodes(M.eles.nodes());if(D=t.connectComponents(P,M.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),M.randomize&&D.forEach(function(vt){M.eles=vt,V.push(o(M))}),M.quality=="default"||M.quality=="proof"){var w=P.collection();if(M.tile){var R=new Map,H=[],x=[],k=0,W={nodeIndexes:R,xCoords:H,yCoords:x},U=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Tt){w.merge(vt.nodes()[Tt]),ut.isParent()||(W.nodeIndexes.set(vt.nodes()[Tt].id(),k++),W.xCoords.push(vt.nodes()[0].position().x),W.yCoords.push(vt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),V.push(W);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),V.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(vt,it){M.eles=vt,Q.push(l(M,V[it])),t.relocateComponent(rt[it],Q[it],M)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],V[it],M)});var O=new Set;if(D.length>1){var X=[],B=J.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var ut=void 0;if(M.quality=="draft"&&(ut=V[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Dt){if(M.quality=="draft")if(!Dt.isParent())At=ut.get(Dt.id()),Tt.nodes.push({x:V[it].xCoords[At]-Dt.boundingbox().w/2,y:V[it].yCoords[At]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,V[it].xCoords,V[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Q[it][Dt.id()]&&Tt.nodes.push({x:Q[it][Dt.id()].getLeft(),y:Q[it][Dt.id()].getTop(),width:Q[it][Dt.id()].getWidth(),height:Q[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(M.quality=="draft"){var St=ut.get(mt.id()),Vt=ut.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,V[it].xCoords,V[it].yCoords,ut);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(V[it].xCoords[St]),Xt.push(V[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,V[it].xCoords,V[it].yCoords,ut);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(V[it].xCoords[Vt]),Ut.push(V[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Q[it][mt.id()]&&Q[it][xt.id()]&&Tt.edges.push({startX:Q[it][mt.id()].getCenterX(),startY:Q[it][mt.id()].getCenterY(),endX:Q[it][xt.id()].getCenterX(),endY:Q[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(X.push(Tt),O.add(it))}});var _=m.packComponents(X,M.randomize).shifts;if(M.quality=="draft")V.forEach(function(vt,it){var ut=vt.xCoords.map(function(At){return At+_[it].dx}),Tt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=ut,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(Q[vt]).forEach(function(it){var ut=Q[vt][it];ut.setCenter(ut.getCenterX()+_[lt].dx,ut.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=M.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),M.randomize){var p=o(M);V.push(p)}M.quality=="default"||M.quality=="proof"?(Q.push(l(M,V[0])),t.relocateComponent(rt[0],Q[0],M)):t.relocateComponent(rt[0],V[0],M)}var q=function(it,ut){if(M.quality=="default"||M.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,At=void 0,Dt=it.data("id");return Q.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},At=xt[Dt])}),M.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Tt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Tt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Tt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Tt.y-=At.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return V.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(M.quality=="default"||M.quality=="proof"||M.randomize){var Rt=t.calcParentsWithoutChildren(P,J),Lt=J.filter(function(vt){return vt.css("display")=="none"});M.eles=J.not(Lt),J.nodes().not(":parent").not(Lt).layoutPositions(F,M,q),Rt.length>0&&Rt.forEach(function(vt){vt.position(q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();i.exports=u},657:(i,r,e)=>{var f=e(548),a=e(140).layoutBase.Matrix,y=e(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),d=new Map,L=new Map,F=new Map,M=[],P=[],J=[],V=[],Q=[],D=[],rt=[],n=[],m=void 0,v=1e8,E=1e-9,p=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,H=function(){for(var b=0,$=0,K=!1;$=at;){ot=Z[at++];for(var It=M[ot],ft=0;ftdt&&(dt=Q[Ct],wt=Ct)}return wt},k=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?M[b].push(F.get($.id())):M[b].push($.id()))})});var Lt=function(b){var $=L.get(b),K=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,M[$].push(K),M[L.get(K)].push(b)})},vt=!0,it=!1,ut=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),At;!(vt=(At=Tt.next()).done);vt=!0){var Dt=At.value;Lt(Dt)}}catch(S){it=!0,ut=S}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){R=m{var f=e(212),a=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&a(cytoscape),i.exports=a},140:i=>{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(579);return s})()})})(be);var gr=be.exports;const ur=lr(gr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},he={L:nt((C,Y)=>C-Y+2,"L"),R:nt((C,Y)=>C-2,"R"),T:nt((C,Y)=>C-Y+2,"T"),B:nt((C,Y)=>C-2,"B")},dr=nt(function(C){return zt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=nt(function(C){const Y=C;return Y==="L"||Y==="R"||Y==="T"||Y==="B"},"isArchitectureDirection"),zt=nt(function(C){const Y=C;return Y==="L"||Y==="R"},"isArchitectureDirectionX"),Qt=nt(function(C){const Y=C;return Y==="T"||Y==="B"},"isArchitectureDirectionY"),Pe=nt(function(C,Y){const A=zt(C)&&Qt(Y),G=Qt(C)&&zt(Y);return A||G},"isArchitectureDirectionXY"),vr=nt(function(C){const Y=C[0],A=C[1],G=zt(Y)&&Qt(A),N=Qt(Y)&&zt(A);return G||N},"isArchitecturePairXY"),pr=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),me=nt(function(C,Y){const A=`${C}${Y}`;return pr(A)?A:void 0},"getArchitectureDirectionPair"),yr=nt(function([C,Y],A){const G=A[0],N=A[1];return zt(G)?Qt(N)?[C+(G==="L"?-1:1),Y+(N==="T"?1:-1)]:[C+(G==="L"?-1:1),Y]:zt(N)?[C+(N==="L"?1:-1),Y+(G==="T"?1:-1)]:[C,Y+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Er=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=nt(function(C){return C.type==="service"},"isArchitectureService"),Tr=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),Ge=nt(C=>C.data(),"edgeData"),ne=nt(C=>C.data(),"nodeData"),Ue=ke.architecture,pt=new sr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ue,dataStructures:void 0,elements:{}})),Nr=nt(()=>{pt.reset(),ir()},"clear"),Lr=nt(function({id:C,icon:Y,in:A,title:G,iconText:N}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The service [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[A]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"service",icon:Y,iconText:N,title:G,edges:[],in:A}},"addService"),Cr=nt(()=>Object.values(pt.records.nodes).filter(mr),"getServices"),Mr=nt(function({id:C,in:Y}){pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"junction",edges:[],in:Y}},"addJunction"),Ar=nt(()=>Object.values(pt.records.nodes).filter(Tr),"getJunctions"),wr=nt(()=>Object.values(pt.records.nodes),"getNodes"),Or=nt(C=>pt.records.nodes[C],"getNode"),Dr=nt(function({id:C,icon:Y,in:A,title:G}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The group [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[A]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="group",pt.records.groups[C]={id:C,icon:Y,title:G,in:A}},"addGroup"),xr=nt(()=>Object.values(pt.records.groups),"getGroups"),Ir=nt(function({lhsId:C,rhsId:Y,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:g,lhsGroup:s,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${A}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[C]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[Y]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[C].in,f=pt.records.nodes[Y].in;if(s&&e&&f&&e==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&e&&f&&e==f)throw new Error(`The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:C,lhsDir:A,lhsInto:N,lhsGroup:s,rhsId:Y,rhsDir:G,rhsInto:g,rhsGroup:i,title:r};pt.records.edges.push(a),pt.records.nodes[C]&&pt.records.nodes[Y]&&(pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Rr=nt(()=>pt.records.edges,"getEdges"),Sr=nt(()=>{if(pt.records.dataStructures===void 0){const C=Object.entries(pt.records.nodes).reduce((s,[i,r])=>(s[i]=r.edges.reduce((e,f)=>{if(f.lhsId===i){const a=me(f.lhsDir,f.rhsDir);a&&(e[a]=f.rhsId)}else{const a=me(f.rhsDir,f.lhsDir);a&&(e[a]=f.lhsId)}return e},{}),s),{}),Y=Object.keys(C)[0],A={[Y]:1},G=Object.keys(C).reduce((s,i)=>i===Y?s:{...s,[i]:1},{}),N=nt(s=>{const i={[s]:[0,0]},r=[s];for(;r.length>0;){const e=r.shift();if(e){A[e]=1,delete G[e];const f=C[e],[a,y]=i[e];Object.entries(f).forEach(([t,h])=>{A[h]||(i[h]=yr([a,y],t),r.push(h))})}}return i},"BFS"),g=[N(Y)];for(;Object.keys(G).length>0;)g.push(N(Object.keys(G)[0]));pt.records.dataStructures={adjList:C,spatialMaps:g}}return pt.records.dataStructures},"getDataStructures"),Fr=nt((C,Y)=>{pt.records.elements[C]=Y},"setElementForId"),br=nt(C=>pt.records.elements[C],"getElementById"),le={clear:Nr,setDiagramTitle:Qe,getDiagramTitle:Ke,setAccTitle:je,getAccTitle:_e,setAccDescription:tr,getAccDescription:er,addService:Lr,getServices:Cr,addJunction:Mr,getJunctions:Ar,getNodes:wr,getNode:Or,addGroup:Dr,getGroups:xr,addEdge:Ir,getEdges:Rr,setElementForId:Fr,getElementById:br,getDataStructures:Sr};function Pt(C){const Y=fe().architecture;return Y!=null&&Y[C]?Y[C]:Ue[C]}nt(Pt,"getConfigField");var Pr=nt((C,Y)=>{or(C,Y),C.groups.map(Y.addGroup),C.services.map(A=>Y.addService({...A,type:"service"})),C.junctions.map(A=>Y.addJunction({...A,type:"junction"})),C.edges.map(Y.addEdge)},"populateDb"),Gr={parse:nt(async C=>{const Y=await hr("architecture",C);Se.debug(Y),Pr(Y,le)},"parse")},Ur=nt(C=>` .edge { stroke-width: ${C.archEdgeWidth}; stroke: ${C.archEdgeColor}; diff --git a/dist/c-blockDiagram-XN6IQ5JY.Bftekuos.js b/dist/c-blockDiagram-XN6IQ5JY.CXq3yh8r.js similarity index 99% rename from dist/c-blockDiagram-XN6IQ5JY.Bftekuos.js rename to dist/c-blockDiagram-XN6IQ5JY.CXq3yh8r.js index 1771761..9288b87 100644 --- a/dist/c-blockDiagram-XN6IQ5JY.Bftekuos.js +++ b/dist/c-blockDiagram-XN6IQ5JY.CXq3yh8r.js @@ -1,4 +1,4 @@ -import{_ as d,d as z,l as L,j as R,ah as de,D as at,ai as Z,aj as Yt,ak as ge,u as tt,al as ue,K as pe,k as fe,v as xe,A as ye,Q as be,am as we,an as xt,e as me,i as Tt}from"./sidepanel.js";import{c as Le}from"./c-clone.efIVrz4F.js";import{G as Se}from"./c-graph.LrzKEURD.js";import{c as ve}from"./c-channel.DwG3ORrW.js";import"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";var yt=function(){var e=d(function(N,x,g,u){for(g=g||{},u=N.length;u--;g[N[u]]=x);return g},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],o=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],y=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],E=[8,15,16,21,27,28,29,30,31,32,40,44,47],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,u,w,S,c,_){var p=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[p-1]),w.setHierarchy(c[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[p]),typeof c[p].length=="number"?this.$=c[p]:this.$=[c[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[p-1]),this.$=[c[p-1]].concat(c[p]);break;case 14:w.getLogger().debug("Rule: link: ",c[p],x),this.$={edgeTypeStr:c[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[p-3],c[p-1],c[p]),this.$={edgeTypeStr:c[p],label:c[p-1]};break;case 18:const A=parseInt(c[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[p-2],c[p-1],c[p]," typestr: ",c[p-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[p-1].edgeTypeStr);this.$=[{id:c[p-2].id,label:c[p-2].label,type:c[p-2].type,directions:c[p-2].directions},{id:c[p-2].id+"-"+c[p].id,start:c[p-2].id,end:c[p].id,label:c[p-1].label,type:"edge",directions:c[p].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[p-1],c[p]),this.$={id:c[p-1].id,label:c[p-1].label,type:w.typeStr2Type(c[p-1].typeStr),directions:c[p-1].directions,widthInColumns:parseInt(c[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[p]),this.$={id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[p]),this.$={type:"column-setting",columns:c[p]==="auto"?-1:parseInt(c[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[p-2],c[p-1]),w.generateId(),this.$={...c[p-2],type:"composite",children:c[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[p-2],c[p-1],c[p]);const W=w.generateId();this.$={id:W,type:"composite",label:"",children:c[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[p]),this.$={id:c[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[p-1],c[p]),this.$={id:c[p-1],label:c[p].label,typeStr:c[p].typeStr,directions:c[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",c[p]),this.$=[c[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",c[p-1],c[p]),this.$=[c[p-1]].concat(c[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",c[p-2],c[p-1],c[p]),this.$={typeStr:c[p-2]+c[p],label:c[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",c[p-3],c[p-2]," #3:",c[p-1],c[p]),this.$={typeStr:c[p-3]+c[p],label:c[p-2],directions:c[p-1]};break;case 35:case 36:this.$={type:"classDef",id:c[p-1].trim(),css:c[p].trim()};break;case 37:this.$={type:"applyClass",id:c[p-1].trim(),styleClass:c[p].trim()};break;case 38:this.$={type:"applyStyles",id:c[p-1].trim(),stylesStr:c[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:a,40:s,44:l,47:o}),e(h,[2,16],{14:22,15:y,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(E,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:y,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(E,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:D},{15:[1,50]},e(h,[2,27]),e(E,[2,33]),{39:[1,51]},{34:52,35:D,39:[2,31]},{32:[2,15]},e(E,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var u=new Error(x);throw u.hash=g,u}},"parseError"),parse:d(function(x){var g=this,u=[0],w=[],S=[null],c=[],_=this.table,p="",A=0,O=0,X=2,W=1,ce=c.slice.call(arguments,1),M=Object.create(this.lexer),J={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(J.yy[gt]=this.yy[gt]);M.setInput(x,J.yy),J.yy.lexer=M,J.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: +import{_ as d,d as z,l as L,j as R,ah as de,D as at,ai as Z,aj as Yt,ak as ge,u as tt,al as ue,K as pe,k as fe,v as xe,A as ye,Q as be,am as we,an as xt,e as me,i as Tt}from"./sidepanel.js";import{c as Le}from"./c-clone.efIVrz4F.js";import{G as Se}from"./c-graph.LrzKEURD.js";import{c as ve}from"./c-channel.DwG3ORrW.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";var yt=function(){var e=d(function(N,x,g,u){for(g=g||{},u=N.length;u--;g[N[u]]=x);return g},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],o=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],y=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],E=[8,15,16,21,27,28,29,30,31,32,40,44,47],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,u,w,S,c,_){var p=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[p-1]),w.setHierarchy(c[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[p]),typeof c[p].length=="number"?this.$=c[p]:this.$=[c[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[p-1]),this.$=[c[p-1]].concat(c[p]);break;case 14:w.getLogger().debug("Rule: link: ",c[p],x),this.$={edgeTypeStr:c[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[p-3],c[p-1],c[p]),this.$={edgeTypeStr:c[p],label:c[p-1]};break;case 18:const A=parseInt(c[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[p-2],c[p-1],c[p]," typestr: ",c[p-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[p-1].edgeTypeStr);this.$=[{id:c[p-2].id,label:c[p-2].label,type:c[p-2].type,directions:c[p-2].directions},{id:c[p-2].id+"-"+c[p].id,start:c[p-2].id,end:c[p].id,label:c[p-1].label,type:"edge",directions:c[p].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[p-1],c[p]),this.$={id:c[p-1].id,label:c[p-1].label,type:w.typeStr2Type(c[p-1].typeStr),directions:c[p-1].directions,widthInColumns:parseInt(c[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[p]),this.$={id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[p]),this.$={type:"column-setting",columns:c[p]==="auto"?-1:parseInt(c[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[p-2],c[p-1]),w.generateId(),this.$={...c[p-2],type:"composite",children:c[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[p-2],c[p-1],c[p]);const W=w.generateId();this.$={id:W,type:"composite",label:"",children:c[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[p]),this.$={id:c[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[p-1],c[p]),this.$={id:c[p-1],label:c[p].label,typeStr:c[p].typeStr,directions:c[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",c[p]),this.$=[c[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",c[p-1],c[p]),this.$=[c[p-1]].concat(c[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",c[p-2],c[p-1],c[p]),this.$={typeStr:c[p-2]+c[p],label:c[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",c[p-3],c[p-2]," #3:",c[p-1],c[p]),this.$={typeStr:c[p-3]+c[p],label:c[p-2],directions:c[p-1]};break;case 35:case 36:this.$={type:"classDef",id:c[p-1].trim(),css:c[p].trim()};break;case 37:this.$={type:"applyClass",id:c[p-1].trim(),styleClass:c[p].trim()};break;case 38:this.$={type:"applyStyles",id:c[p-1].trim(),stylesStr:c[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:a,40:s,44:l,47:o}),e(h,[2,16],{14:22,15:y,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(E,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:y,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(E,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:D},{15:[1,50]},e(h,[2,27]),e(E,[2,33]),{39:[1,51]},{34:52,35:D,39:[2,31]},{32:[2,15]},e(E,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var u=new Error(x);throw u.hash=g,u}},"parseError"),parse:d(function(x){var g=this,u=[0],w=[],S=[null],c=[],_=this.table,p="",A=0,O=0,X=2,W=1,ce=c.slice.call(arguments,1),M=Object.create(this.lexer),J={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(J.yy[gt]=this.yy[gt]);M.setInput(x,J.yy),J.yy.lexer=M,J.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: `+M.showPosition()+` Expecting `+it.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ft="Parse error on line "+(A+1)+": Unexpected "+(Y==W?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ft,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:ut,expected:it})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(U[0]){case 1:u.push(Y),S.push(M.yytext),c.push(M.yylloc),u.push(U[1]),Y=null,O=M.yyleng,p=M.yytext,A=M.yylineno,ut=M.yylloc;break;case 2:if(q=this.productions_[U[1]][1],$.$=S[S.length-q],$._$={first_line:c[c.length-(q||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(q||1)].first_column,last_column:c[c.length-1].last_column},oe&&($._$.range=[c[c.length-(q||1)].range[0],c[c.length-1].range[1]]),pt=this.performAction.apply($,[p,O,A,J.yy,U[1],S,c].concat(ce)),typeof pt<"u")return pt;q&&(u=u.slice(0,-1*q*2),S=S.slice(0,-1*q),c=c.slice(0,-1*q)),u.push(this.productions_[U[1]][0]),S.push($.$),c.push($._$),Nt=_[u[u.length-2]][u[u.length-1]],u.push(Nt);break;case 3:return!0}}return!0},"parse")},T=function(){var N={EOF:1,parseError:d(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var g=x.length,u=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===w.length?this.yylloc.first_column:0)+w[w.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+` diff --git a/dist/c-c4Diagram-GPMAACGM.C32fG0np.js b/dist/c-c4Diagram-GPMAACGM.BkpUmUjp.js similarity index 99% rename from dist/c-c4Diagram-GPMAACGM.C32fG0np.js rename to dist/c-c4Diagram-GPMAACGM.BkpUmUjp.js index be15b79..3947a41 100644 --- a/dist/c-c4Diagram-GPMAACGM.C32fG0np.js +++ b/dist/c-c4Diagram-GPMAACGM.BkpUmUjp.js @@ -1,4 +1,4 @@ -import{d as Se,g as De}from"./c-chunk-VCFP4HPQ.P-Zh3yiJ.js";import{_ as g,a as Pe,s as Be,g as Ie,b as Me,c as Le,d as Bt,w as Ne,e as $t,f as de,h as Tt,i as ge,j as jt,l as fe,k as Ye,m as je}from"./sidepanel.js";import"./c-App.BTybbOiv.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: +import{d as Se,g as De}from"./c-chunk-VCFP4HPQ.P-Zh3yiJ.js";import{_ as g,a as Pe,s as Be,g as Ie,b as Me,c as Le,d as Bt,w as Ne,e as $t,f as de,h as Tt,i as ge,j as jt,l as fe,k as Ye,m as je}from"./sidepanel.js";import"./c-App.BSmD8r3A.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+` diff --git a/dist/c-classDiagram-FEGYTUDG.T4l6upN8.js b/dist/c-classDiagram-FEGYTUDG.Jtpc2mPV.js similarity index 81% rename from dist/c-classDiagram-FEGYTUDG.T4l6upN8.js rename to dist/c-classDiagram-FEGYTUDG.Jtpc2mPV.js index 250ca1c..a6e0710 100644 --- a/dist/c-classDiagram-FEGYTUDG.T4l6upN8.js +++ b/dist/c-classDiagram-FEGYTUDG.Jtpc2mPV.js @@ -1 +1 @@ -import{c as s,a as r,b as e,s as l}from"./c-chunk-CXDZ2C6O.BlaZOBCJ.js";import{_ as t}from"./sidepanel.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BTybbOiv.js";var _={parser:s,db:r,renderer:e,styles:l,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; +import{c as s,a as r,b as e,s as l}from"./c-chunk-CXDZ2C6O.BlaZOBCJ.js";import{_ as t}from"./sidepanel.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BSmD8r3A.js";var _={parser:s,db:r,renderer:e,styles:l,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; diff --git a/dist/c-classDiagram-v2-R65JCUOM.T4l6upN8.js b/dist/c-classDiagram-v2-R65JCUOM.Jtpc2mPV.js similarity index 81% rename from dist/c-classDiagram-v2-R65JCUOM.T4l6upN8.js rename to dist/c-classDiagram-v2-R65JCUOM.Jtpc2mPV.js index 250ca1c..a6e0710 100644 --- a/dist/c-classDiagram-v2-R65JCUOM.T4l6upN8.js +++ b/dist/c-classDiagram-v2-R65JCUOM.Jtpc2mPV.js @@ -1 +1 @@ -import{c as s,a as r,b as e,s as l}from"./c-chunk-CXDZ2C6O.BlaZOBCJ.js";import{_ as t}from"./sidepanel.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BTybbOiv.js";var _={parser:s,db:r,renderer:e,styles:l,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; +import{c as s,a as r,b as e,s as l}from"./c-chunk-CXDZ2C6O.BlaZOBCJ.js";import{_ as t}from"./sidepanel.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BSmD8r3A.js";var _={parser:s,db:r,renderer:e,styles:l,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; diff --git a/dist/c-dagre-SWNTG5WE.DWXwo0oD.js b/dist/c-dagre-SWNTG5WE.BqCGIveF.js similarity index 99% rename from dist/c-dagre-SWNTG5WE.DWXwo0oD.js rename to dist/c-dagre-SWNTG5WE.BqCGIveF.js index b41e16a..7af7571 100644 --- a/dist/c-dagre-SWNTG5WE.DWXwo0oD.js +++ b/dist/c-dagre-SWNTG5WE.BqCGIveF.js @@ -1,4 +1,4 @@ -import{_ as X,aq as F,ar as Y,as as _,at as H,l as i,d as V,au as q,av as U,af as $,ak as z,ag as P,ae as K,aw as Q,ax as W,ay as Z}from"./sidepanel.js";import{G as B}from"./c-graph.LrzKEURD.js";import{l as I}from"./c-layout.DW-oGeTY.js";import{i as S}from"./c-_baseUniq.B6F21pIQ.js";import{c as L}from"./c-clone.efIVrz4F.js";import{m as A}from"./c-_basePickBy.DHYc2WzR.js";import"./c-App.BTybbOiv.js";function p(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return S(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return S(n)||(c.value=n),S(o)||(c.parent=o),c})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return S(t.name)||(o.name=t.name),S(n)||(o.value=n),o})}var f=new Map,b=new Map,J=new Map,te=X(()=>{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const h=t.edge(l.v,l.w,l.name);i.info("Edge data",h,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,h,l.name),n.setEdge(l.v,l.w,h,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(h=>l.v===h.v&&l.w===h.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",p(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,p(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const h=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",p(e)),G(r,e,h,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:h}),i.warn("New graph after copy node: (",r,")",p(h)),i.debug("Old graph after copy",p(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",p(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),h=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const m=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX +import{_ as X,aq as F,ar as Y,as as _,at as H,l as i,d as V,au as q,av as U,af as $,ak as z,ag as P,ae as K,aw as Q,ax as W,ay as Z}from"./sidepanel.js";import{G as B}from"./c-graph.LrzKEURD.js";import{l as I}from"./c-layout.DW-oGeTY.js";import{i as S}from"./c-_baseUniq.B6F21pIQ.js";import{c as L}from"./c-clone.efIVrz4F.js";import{m as A}from"./c-_basePickBy.DHYc2WzR.js";import"./c-App.BSmD8r3A.js";function p(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return S(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return S(n)||(c.value=n),S(o)||(c.parent=o),c})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return S(t.name)||(o.name=t.name),S(n)||(o.value=n),o})}var f=new Map,b=new Map,J=new Map,te=X(()=>{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const h=t.edge(l.v,l.w,l.name);i.info("Edge data",h,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,h,l.name),n.setEdge(l.v,l.w,h,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(h=>l.v===h.v&&l.w===h.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",p(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,p(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const h=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",p(e)),G(r,e,h,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:h}),i.warn("New graph after copy node: (",r,")",p(h)),i.debug("Old graph after copy",p(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",p(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),h=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const m=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX Node.id = `,d,` data=`,m.height,` Parent cluster`,c.height),t.setNode(c.id,m),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,m))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:m,nodesep:v}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:m+25,nodesep:v});const N=await j(g,s.graph,n,o,t.node(d),a),x=N.elem;q(s,x),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),U(x,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const m=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,m)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(p(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(p(t)));let E=0,{subGraphTitleTotalMargin:y}=z(a);return await Promise.all(oe(t).map(async function(d){var m;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=y,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=y,t.node(s.parentId);const v=(s==null?void 0:s.padding)/2||0,N=((m=s==null?void 0:s.labelBBox)==null?void 0:m.height)||0,x=N-v||0;i.debug("OffsetY",x,"labelHeight",N,"halfPadding",v),await K(l,s),f.get(s.id).node=s}else{const v=t.node(s.parentId);s.y+=y/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",v,v==null?void 0:v.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=y/2);const m=t.node(d.v);var v=t.node(d.w);const N=Q(h,s,f,n,m,v,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(E=s.diff)}),i.warn("Returning from recursive render XAX",u,E),{elem:u,diff:E}},"recursiveRender"),we=X(async(e,t)=>{var a,r,u,l,h,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(h=e.config)==null?void 0:h.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const w=g.start,E=w+"---"+w+"---1",y=w+"---"+w+"---2",d=n.node(w);n.setNode(E,{domId:E,id:E,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(E,d.parentId),n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(y,d.parentId);const s=structuredClone(g),m=structuredClone(g),v=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=w+"-cyclic-special-1",m.arrowTypeEnd="none",m.id=w+"-cyclic-special-mid",v.label="",d.isGroup&&(s.fromCluster=w,v.toCluster=w),v.id=w+"-cyclic-special-2",n.setEdge(w,E,s,w+"-cyclic-special-0"),n.setEdge(E,y,m,w+"-cyclic-special-1"),n.setEdge(y,w,v,w+"-cyc{const t=x({...L,...T().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),G=n(()=>m.packet,"getPacket"),I=n(t=>{t.length>0&&m.packet.push(t)},"pushWord"),M=n(()=>{_(),m=structuredClone(C)},"clear"),h={pushWord:I,getPacket:G,getConfig:Y,clear:M,setAccTitle:S,getAccTitle:F,setDiagramTitle:z,getDiagramTitle:P,getAccDescription:W,setAccDescription:D},O=1e4,q=n(t=>{w(t,h);let e=-1,o=[],s=1;const{bitsPerRow:i}=h.getConfig();for(let{start:a,end:r,label:p}of t.blocks){if(r&&r{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*o?[t,void 0]:[{start:t.start,end:e*o-1,label:t.label},{start:e*o,end:t.end,label:t.label}]},"getNextFittingBlock"),K={parse:n(async t=>{const e=await N("packet",t);v.debug(e),q(e)},"parse")},R=n((t,e,o,s)=>{const i=s.db,a=i.getConfig(),{rowHeight:r,paddingY:p,bitWidth:b,bitsPerRow:c}=a,u=i.getPacket(),l=i.getDiagramTitle(),g=r+p,d=g*(u.length+1)-(l?0:r),k=b*c+2,f=A(e);f.attr("viewbox",`0 0 ${k} ${d}`),E(f,d,k,a.useMaxWidth);for(const[$,y]of u.entries())U(f,y,$,a);f.append("text").text(l).attr("x",k/2).attr("y",d-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=n((t,e,o,{rowHeight:s,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:p,showBits:b})=>{const c=t.append("g"),u=o*(s+a)+a;for(const l of e){const g=l.start%p*r+1,d=(l.end-l.start+1)*r-i;if(c.append("rect").attr("x",g).attr("y",u).attr("width",d).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",g+d/2).attr("y",u+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(l.label),!b)continue;const k=l.end===l.start,f=u-2;c.append("text").attr("x",g+(k?d/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(l.start),k||c.append("text").attr("x",g+d).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(l.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=n(({packet:t}={})=>{const e=x(j,t);return` +import{p as w}from"./c-chunk-BAOP5US2.D69mMcSi.js";import{B,s as S,g as F,p as z,q as P,b as W,c as D,_ as n,l as v,C as x,D as T,v as _,G as A,k as E}from"./sidepanel.js";import{p as N}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";var C={packet:[]},m=structuredClone(C),L=B.packet,Y=n(()=>{const t=x({...L,...T().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),G=n(()=>m.packet,"getPacket"),I=n(t=>{t.length>0&&m.packet.push(t)},"pushWord"),M=n(()=>{_(),m=structuredClone(C)},"clear"),h={pushWord:I,getPacket:G,getConfig:Y,clear:M,setAccTitle:S,getAccTitle:F,setDiagramTitle:z,getDiagramTitle:P,getAccDescription:W,setAccDescription:D},O=1e4,q=n(t=>{w(t,h);let e=-1,o=[],s=1;const{bitsPerRow:i}=h.getConfig();for(let{start:a,end:r,label:p}of t.blocks){if(r&&r{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*o?[t,void 0]:[{start:t.start,end:e*o-1,label:t.label},{start:e*o,end:t.end,label:t.label}]},"getNextFittingBlock"),K={parse:n(async t=>{const e=await N("packet",t);v.debug(e),q(e)},"parse")},R=n((t,e,o,s)=>{const i=s.db,a=i.getConfig(),{rowHeight:r,paddingY:p,bitWidth:b,bitsPerRow:c}=a,u=i.getPacket(),l=i.getDiagramTitle(),g=r+p,d=g*(u.length+1)-(l?0:r),k=b*c+2,f=A(e);f.attr("viewbox",`0 0 ${k} ${d}`),E(f,d,k,a.useMaxWidth);for(const[$,y]of u.entries())U(f,y,$,a);f.append("text").text(l).attr("x",k/2).attr("y",d-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=n((t,e,o,{rowHeight:s,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:p,showBits:b})=>{const c=t.append("g"),u=o*(s+a)+a;for(const l of e){const g=l.start%p*r+1,d=(l.end-l.start+1)*r-i;if(c.append("rect").attr("x",g).attr("y",u).attr("width",d).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",g+d/2).attr("y",u+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(l.label),!b)continue;const k=l.end===l.start,f=u-2;c.append("text").attr("x",g+(k?d/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(l.start),k||c.append("text").attr("x",g+d).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(l.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=n(({packet:t}={})=>{const e=x(j,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/dist/c-erDiagram-WO52GFNT.LFoF0V0f.js b/dist/c-erDiagram-WO52GFNT.CIP9No93.js similarity index 99% rename from dist/c-erDiagram-WO52GFNT.LFoF0V0f.js rename to dist/c-erDiagram-WO52GFNT.CIP9No93.js index fc9a2b2..f5f5e46 100644 --- a/dist/c-erDiagram-WO52GFNT.LFoF0V0f.js +++ b/dist/c-erDiagram-WO52GFNT.CIP9No93.js @@ -1,4 +1,4 @@ -import{_ as u,d as U,s as kt,g as xt,c as Rt,b as Ot,p as bt,q as Nt,l as X,v as Tt,j as at,u as At,k as Mt,K as vt,Q as St,P as wt}from"./sidepanel.js";import{G as It}from"./c-graph.LrzKEURD.js";import{l as Dt}from"./c-layout.DW-oGeTY.js";import"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";const Lt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Bt(t){return typeof t=="string"&&Lt.test(t)}const v=[];for(let t=0;t<256;++t)v.push((t+256).toString(16).slice(1));function Ct(t,e=0){return v[t[e+0]]+v[t[e+1]]+v[t[e+2]]+v[t[e+3]]+"-"+v[t[e+4]]+v[t[e+5]]+"-"+v[t[e+6]]+v[t[e+7]]+"-"+v[t[e+8]]+v[t[e+9]]+"-"+v[t[e+10]]+v[t[e+11]]+v[t[e+12]]+v[t[e+13]]+v[t[e+14]]+v[t[e+15]]}function Pt(t){if(!Bt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Yt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ht(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const y=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=k,k=m,m=it(g,30)>>>0,g=h,h=b}r[0]=r[0]+h>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+k>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const zt=Wt("v5",80,Ht);var nt=function(){var t=u(function(w,i,n,l){for(n=n||{},l=w.length;l--;n[w[l]]=i);return n},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],f=[1,11],c=[1,12],_=[1,13],y=[1,14],o=[1,15],h=[1,21],g=[1,22],m=[1,23],k=[1,24],x=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],O=[1,34],b=[27,28,46,47],Y=[41,42,43,44,45],Z=[17,34],F=[1,54],M=[1,53],S=[17,34,36,38],N={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:u(function(i,n,l,d,E,a,V){var s=a.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(a[s-4]),d.addEntity(a[s-2]),d.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:d.addEntity(a[s-3]),d.addAttributes(a[s-3],a[s-1]);break;case 10:d.addEntity(a[s-2]);break;case 11:d.addEntity(a[s]);break;case 12:d.addEntity(a[s-6],a[s-4]),d.addAttributes(a[s-6],a[s-1]);break;case 13:d.addEntity(a[s-5],a[s-3]);break;case 14:d.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:g,43:m,44:k,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:y,28:o},{16:30,17:[1,31],29:32,30:33,34:O},{11:35,27:y,28:o},{40:36,46:[1,37],47:[1,38]},t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(b,[2,37]),t(b,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:O},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:g,43:m,44:k,45:x},t(Y,[2,39]),t(Y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(Z,[2,23],{32:50,33:51,35:52,37:F,38:M}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(Z,[2,24],{33:56,36:[1,57],38:M}),t(Z,[2,25]),t(S,[2,29]),t(Z,[2,32]),t(S,[2,31]),{16:58,17:[1,59],29:32,30:33,34:O},t(Z,[2,26]),{35:60,37:F},{17:[1,61]},t(e,[2,13]),t(S,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:u(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:u(function(i){var n=this,l=[0],d=[],E=[null],a=[],V=this.table,s="",j=0,lt=0,_t=2,ct=1,Et=a.slice.call(arguments,1),A=Object.create(this.lexer),H={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(H.yy[$]=this.yy[$]);A.setInput(i,H.yy),H.yy.lexer=A,H.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var tt=A.yylloc;a.push(tt);var gt=A.options&&A.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mt(D){l.length=l.length-2*D,E.length=E.length-D,a.length=a.length-D}u(mt,"popStack");function ht(){var D;return D=d.pop()||A.lex()||ct,typeof D!="number"&&(D instanceof Array&&(d=D,D=d.pop()),D=n.symbols_[D]||D),D}u(ht,"lex");for(var I,z,B,et,G={},q,W,dt,J;;){if(z=l[l.length-1],this.defaultActions[z]?B=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=ht()),B=V[z]&&V[z][I]),typeof B>"u"||!B.length||!B[0]){var rt="";J=[];for(q in V[z])this.terminals_[q]&&q>_t&&J.push("'"+this.terminals_[q]+"'");A.showPosition?rt="Parse error on line "+(j+1)+`: +import{_ as u,d as U,s as kt,g as xt,c as Rt,b as Ot,p as bt,q as Nt,l as X,v as Tt,j as at,u as At,k as Mt,K as vt,Q as St,P as wt}from"./sidepanel.js";import{G as It}from"./c-graph.LrzKEURD.js";import{l as Dt}from"./c-layout.DW-oGeTY.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";const Lt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Bt(t){return typeof t=="string"&&Lt.test(t)}const v=[];for(let t=0;t<256;++t)v.push((t+256).toString(16).slice(1));function Ct(t,e=0){return v[t[e+0]]+v[t[e+1]]+v[t[e+2]]+v[t[e+3]]+"-"+v[t[e+4]]+v[t[e+5]]+"-"+v[t[e+6]]+v[t[e+7]]+"-"+v[t[e+8]]+v[t[e+9]]+"-"+v[t[e+10]]+v[t[e+11]]+v[t[e+12]]+v[t[e+13]]+v[t[e+14]]+v[t[e+15]]}function Pt(t){if(!Bt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Yt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ht(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const y=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=k,k=m,m=it(g,30)>>>0,g=h,h=b}r[0]=r[0]+h>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+k>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const zt=Wt("v5",80,Ht);var nt=function(){var t=u(function(w,i,n,l){for(n=n||{},l=w.length;l--;n[w[l]]=i);return n},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],f=[1,11],c=[1,12],_=[1,13],y=[1,14],o=[1,15],h=[1,21],g=[1,22],m=[1,23],k=[1,24],x=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],O=[1,34],b=[27,28,46,47],Y=[41,42,43,44,45],Z=[17,34],F=[1,54],M=[1,53],S=[17,34,36,38],N={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:u(function(i,n,l,d,E,a,V){var s=a.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(a[s-4]),d.addEntity(a[s-2]),d.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:d.addEntity(a[s-3]),d.addAttributes(a[s-3],a[s-1]);break;case 10:d.addEntity(a[s-2]);break;case 11:d.addEntity(a[s]);break;case 12:d.addEntity(a[s-6],a[s-4]),d.addAttributes(a[s-6],a[s-1]);break;case 13:d.addEntity(a[s-5],a[s-3]);break;case 14:d.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:g,43:m,44:k,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:y,28:o},{16:30,17:[1,31],29:32,30:33,34:O},{11:35,27:y,28:o},{40:36,46:[1,37],47:[1,38]},t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(b,[2,37]),t(b,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:O},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:g,43:m,44:k,45:x},t(Y,[2,39]),t(Y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(Z,[2,23],{32:50,33:51,35:52,37:F,38:M}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(Z,[2,24],{33:56,36:[1,57],38:M}),t(Z,[2,25]),t(S,[2,29]),t(Z,[2,32]),t(S,[2,31]),{16:58,17:[1,59],29:32,30:33,34:O},t(Z,[2,26]),{35:60,37:F},{17:[1,61]},t(e,[2,13]),t(S,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:u(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:u(function(i){var n=this,l=[0],d=[],E=[null],a=[],V=this.table,s="",j=0,lt=0,_t=2,ct=1,Et=a.slice.call(arguments,1),A=Object.create(this.lexer),H={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(H.yy[$]=this.yy[$]);A.setInput(i,H.yy),H.yy.lexer=A,H.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var tt=A.yylloc;a.push(tt);var gt=A.options&&A.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mt(D){l.length=l.length-2*D,E.length=E.length-D,a.length=a.length-D}u(mt,"popStack");function ht(){var D;return D=d.pop()||A.lex()||ct,typeof D!="number"&&(D instanceof Array&&(d=D,D=d.pop()),D=n.symbols_[D]||D),D}u(ht,"lex");for(var I,z,B,et,G={},q,W,dt,J;;){if(z=l[l.length-1],this.defaultActions[z]?B=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=ht()),B=V[z]&&V[z][I]),typeof B>"u"||!B.length||!B[0]){var rt="";J=[];for(q in V[z])this.terminals_[q]&&q>_t&&J.push("'"+this.terminals_[q]+"'");A.showPosition?rt="Parse error on line "+(j+1)+`: `+A.showPosition()+` Expecting `+J.join(", ")+", got '"+(this.terminals_[I]||I)+"'":rt="Parse error on line "+(j+1)+": Unexpected "+(I==ct?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(rt,{text:A.match,token:this.terminals_[I]||I,line:A.yylineno,loc:tt,expected:J})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(B[0]){case 1:l.push(I),E.push(A.yytext),a.push(A.yylloc),l.push(B[1]),I=null,lt=A.yyleng,s=A.yytext,j=A.yylineno,tt=A.yylloc;break;case 2:if(W=this.productions_[B[1]][1],G.$=E[E.length-W],G._$={first_line:a[a.length-(W||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(W||1)].first_column,last_column:a[a.length-1].last_column},gt&&(G._$.range=[a[a.length-(W||1)].range[0],a[a.length-1].range[1]]),et=this.performAction.apply(G,[s,lt,j,H.yy,B[1],E,a].concat(Et)),typeof et<"u")return et;W&&(l=l.slice(0,-1*W*2),E=E.slice(0,-1*W),a=a.slice(0,-1*W)),l.push(this.productions_[B[1]][0]),E.push(G.$),a.push(G._$),dt=V[l[l.length-2]][l[l.length-1]],l.push(dt);break;case 3:return!0}}return!0},"parse")},T=function(){var w={EOF:1,parseError:u(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:u(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:u(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/dist/c-flowDiagram-TSWR6T2D.Ck6ffKlE.js b/dist/c-flowDiagram-TSWR6T2D.BDyRIeD9.js similarity index 99% rename from dist/c-flowDiagram-TSWR6T2D.Ck6ffKlE.js rename to dist/c-flowDiagram-TSWR6T2D.BDyRIeD9.js index 95e429a..9f41d53 100644 --- a/dist/c-flowDiagram-TSWR6T2D.Ck6ffKlE.js +++ b/dist/c-flowDiagram-TSWR6T2D.BDyRIeD9.js @@ -1,4 +1,4 @@ -import{g as gt,s as At}from"./c-chunk-EICJXIV7.DfejhB_s.js";import{d as U1,_ as l,n as Ze,o as bt,s as kt,g as mt,b as Et,c as St,p as Dt,q as xt,r as Ct,J as Tt,t as yt,l as e1,u as ge,v as Ft,x as vt,j as C1,y as _t,z as Bt,e as Vt,A as Lt}from"./sidepanel.js";import{c as wt}from"./c-channel.DwG3ORrW.js";import"./c-App.BTybbOiv.js";var It="flowchart-",$e=0,M1=U1(),b1=new Map,K=[],K1=new Map,p1=[],Ae=new Map,be=new Map,ee=0,pe=!0,J,se,re=[],ie=l(e=>Vt.sanitizeText(e,M1),"sanitizeText"),ae=l(function(e){for(const r of b1.values())if(r.id===e)return r.domId;return e},"lookUpDomId"),Rt=l(function(e,r,i,a,u,d,g={},D){var v,z;if(!e||e.trim().length===0)return;let c,o=b1.get(e);if(o===void 0&&(o={id:e,labelType:"text",domId:It+e+"-"+$e,styles:[],classes:[]},b1.set(e,o)),$e++,r!==void 0?(M1=U1(),c=ie(r.text.trim()),o.labelType=r.type,c.startsWith('"')&&c.endsWith('"')&&(c=c.substring(1,c.length-1)),o.text=c):o.text===void 0&&(o.text=e),i!==void 0&&(o.type=i),a!=null&&a.forEach(function(_){o.styles.push(_)}),u!=null&&u.forEach(function(_){o.classes.push(_)}),d!==void 0&&(o.dir=d),o.props===void 0?o.props=g:g!==void 0&&Object.assign(o.props,g),D!==void 0){let _;D.includes(` +import{g as gt,s as At}from"./c-chunk-EICJXIV7.DfejhB_s.js";import{d as U1,_ as l,n as Ze,o as bt,s as kt,g as mt,b as Et,c as St,p as Dt,q as xt,r as Ct,J as Tt,t as yt,l as e1,u as ge,v as Ft,x as vt,j as C1,y as _t,z as Bt,e as Vt,A as Lt}from"./sidepanel.js";import{c as wt}from"./c-channel.DwG3ORrW.js";import"./c-App.BSmD8r3A.js";var It="flowchart-",$e=0,M1=U1(),b1=new Map,K=[],K1=new Map,p1=[],Ae=new Map,be=new Map,ee=0,pe=!0,J,se,re=[],ie=l(e=>Vt.sanitizeText(e,M1),"sanitizeText"),ae=l(function(e){for(const r of b1.values())if(r.id===e)return r.domId;return e},"lookUpDomId"),Rt=l(function(e,r,i,a,u,d,g={},D){var v,z;if(!e||e.trim().length===0)return;let c,o=b1.get(e);if(o===void 0&&(o={id:e,labelType:"text",domId:It+e+"-"+$e,styles:[],classes:[]},b1.set(e,o)),$e++,r!==void 0?(M1=U1(),c=ie(r.text.trim()),o.labelType=r.type,c.startsWith('"')&&c.endsWith('"')&&(c=c.substring(1,c.length-1)),o.text=c):o.text===void 0&&(o.text=e),i!==void 0&&(o.type=i),a!=null&&a.forEach(function(_){o.styles.push(_)}),u!=null&&u.forEach(function(_){o.classes.push(_)}),d!==void 0&&(o.dir=d),o.props===void 0?o.props=g:g!==void 0&&Object.assign(o.props,g),D!==void 0){let _;D.includes(` `)?_=D+` `:_=`{ `+D+` diff --git a/dist/c-ganttDiagram-FAOCOTIY.R6hBUM4X.js b/dist/c-ganttDiagram-FAOCOTIY.B9tslBWb.js similarity index 99% rename from dist/c-ganttDiagram-FAOCOTIY.R6hBUM4X.js rename to dist/c-ganttDiagram-FAOCOTIY.B9tslBWb.js index aa63003..2cf008e 100644 --- a/dist/c-ganttDiagram-FAOCOTIY.R6hBUM4X.js +++ b/dist/c-ganttDiagram-FAOCOTIY.B9tslBWb.js @@ -1,4 +1,4 @@ -import{aS as Je,aT as Ke,aU as $e,aV as tn,aW as Fn,aX as re,aY as En,_ as h,aZ as at,d as _t,s as Ln,g as An,p as In,q as Wn,c as On,b as Hn,v as Nn,m as Vn,l as Qt,j as Zt,k as zn,e as Pn,u as Rn}from"./sidepanel.js";import{a as Te,g as be}from"./c-App.BTybbOiv.js";import{b as Bn,t as Ie,c as Zn,a as qn,l as Xn}from"./c-linear.CFszUfD_.js";import{i as Gn}from"./c-init.Gi6I4Gst.js";function jn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n=a)&&(n=a)}return n}function Qn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}function Jn(t){return t}var Xt=1,ae=2,me=3,qt=4,We=1e-6;function Kn(t){return"translate("+t+",0)"}function $n(t){return"translate(0,"+t+")"}function tr(t){return e=>+t(e)}function er(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nr(){return!this.__axis}function en(t,e){var n=[],r=null,a=null,i=6,s=6,k=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=t===Xt||t===qt?-1:1,g=t===qt||t===ae?"x":"y",F=t===Xt||t===me?Kn:$n;function D(b){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),O=a??(e.tickFormat?e.tickFormat.apply(e,n):Jn),C=Math.max(i,0)+k,I=e.range(),V=+I[0]+M,W=+I[I.length-1]+M,Z=(e.bandwidth?er:tr)(e.copy(),M),Q=b.selection?b.selection():b,w=Q.selectAll(".domain").data([null]),H=Q.selectAll(".tick").data(X,e).order(),x=H.exit(),Y=H.enter().append("g").attr("class","tick"),_=H.select("line"),S=H.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(Y),_=_.merge(Y.append("line").attr("stroke","currentColor").attr(g+"2",T*i)),S=S.merge(Y.append("text").attr("fill","currentColor").attr(g,T*C).attr("dy",t===Xt?"0em":t===me?"0.71em":"0.32em")),b!==Q&&(w=w.transition(b),H=H.transition(b),_=_.transition(b),S=S.transition(b),x=x.transition(b).attr("opacity",We).attr("transform",function(p){return isFinite(p=Z(p))?F(p+M):this.getAttribute("transform")}),Y.attr("opacity",We).attr("transform",function(p){var U=this.parentNode.__axis;return F((U&&isFinite(U=U(p))?U:Z(p))+M)})),x.remove(),w.attr("d",t===qt||t===ae?s?"M"+T*s+","+V+"H"+M+"V"+W+"H"+T*s:"M"+M+","+V+"V"+W:s?"M"+V+","+T*s+"V"+M+"H"+W+"V"+T*s:"M"+V+","+M+"H"+W),H.attr("opacity",1).attr("transform",function(p){return F(Z(p)+M)}),_.attr(g+"2",T*i),S.attr(g,T*C).text(O),Q.filter(nr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ae?"start":t===qt?"end":"middle"),Q.each(function(){this.__axis=Z})}return D.scale=function(b){return arguments.length?(e=b,D):e},D.ticks=function(){return n=Array.from(arguments),D},D.tickArguments=function(b){return arguments.length?(n=b==null?[]:Array.from(b),D):n.slice()},D.tickValues=function(b){return arguments.length?(r=b==null?null:Array.from(b),D):r&&r.slice()},D.tickFormat=function(b){return arguments.length?(a=b,D):a},D.tickSize=function(b){return arguments.length?(i=s=+b,D):i},D.tickSizeInner=function(b){return arguments.length?(i=+b,D):i},D.tickSizeOuter=function(b){return arguments.length?(s=+b,D):s},D.tickPadding=function(b){return arguments.length?(k=+b,D):k},D.offset=function(b){return arguments.length?(M=+b,D):M},D}function rr(t){return en(Xt,t)}function ar(t){return en(me,t)}const ir=Math.PI/180,sr=180/Math.PI,Jt=18,nn=.96422,rn=1,an=.82521,sn=4/29,St=6/29,on=3*St*St,or=St*St*St;function cn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof dt)return ln(t);t instanceof $e||(t=Fn(t));var e=ce(t.r),n=ce(t.g),r=ce(t.b),a=ie((.2225045*e+.7168786*n+.0606169*r)/rn),i,s;return e===n&&n===r?i=s=a:(i=ie((.4360747*e+.3850649*n+.1430804*r)/nn),s=ie((.0139322*e+.0971045*n+.7141733*r)/an)),new ft(116*a-16,500*(i-a),200*(a-s),t.opacity)}function cr(t,e,n,r){return arguments.length===1?cn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Je(ft,cr,Ke(tn,{brighter(t){return new ft(this.l+Jt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-Jt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=nn*se(e),t=rn*se(t),n=an*se(n),new $e(oe(3.1338561*e-1.6168667*t-.4906146*n),oe(-.9787684*e+1.9161415*t+.033454*n),oe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ie(t){return t>or?Math.pow(t,1/3):t/on+sn}function se(t){return t>St?t*t*t:on*(t-sn)}function oe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ce(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function lr(t){if(t instanceof dt)return new dt(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=cn(t)),t.a===0&&t.b===0)return new dt(NaN,0(t(i=new Date(+i)),i),a.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),a.round=i=>{const s=a(i),k=a.ceil(i);return i-s(e(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,k)=>{const M=[];if(i=a.ceil(i),k=k==null?1:Math.floor(k),!(i0))return M;let T;do M.push(T=new Date(+i)),e(i,k),t(i);while(Tet(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,k)=>{if(s>=s)if(k<0)for(;++k<=0;)for(;e(s,-1),!i(s););else for(;--k>=0;)for(;e(s,1),!i(s););}),n&&(a.count=(i,s)=>(le.setTime(+i),ue.setTime(+s),t(le),t(ue),Math.floor(n(le,ue))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ut=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ut.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ut);Ut.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,xe=yt*7,Oe=yt*30,fe=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Wt=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Wt.range;const dr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());dr.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ot.range;const mr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());mr.range;const Tt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);Tt.range;const we=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);we.range;const gr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));gr.range;function wt(t){return et(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/xe)}const Vt=wt(0),Ht=wt(1),un=wt(2),fn=wt(3),bt=wt(4),hn=wt(5),dn=wt(6);Vt.range;Ht.range;un.range;fn.range;bt.range;hn.range;dn.range;function Dt(t){return et(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/xe)}const mn=Dt(0),Kt=Dt(1),yr=Dt(2),kr=Dt(3),Ft=Dt(4),pr=Dt(5),vr=Dt(6);mn.range;Kt.range;yr.range;kr.range;Ft.range;pr.range;vr.range;const Nt=et(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Nt.range;const Tr=et(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Tr.range;const kt=et(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const xt=et(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());xt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});xt.range;function br(t,e,n,r,a,i){const s=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[i,1,ct],[i,5,5*ct],[i,15,15*ct],[i,30,30*ct],[a,1,gt],[a,3,3*gt],[a,6,6*gt],[a,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,xe],[e,1,Oe],[e,3,3*Oe],[t,1,fe]];function k(T,g,F){const D=gC).right(s,D);if(b===s.length)return t.every(Ie(T/fe,g/fe,F));if(b===0)return Ut.every(Math.max(Ie(T,g,F),1));const[X,O]=s[D/s[b-1][2]53)return null;"w"in u||(u.w=1),"Z"in u?(L=de(Lt(u.y,0,1)),j=L.getUTCDay(),L=j>4||j===0?Kt.ceil(L):Kt(L),L=we.offset(L,(u.V-1)*7),u.y=L.getUTCFullYear(),u.m=L.getUTCMonth(),u.d=L.getUTCDate()+(u.w+6)%7):(L=he(Lt(u.y,0,1)),j=L.getDay(),L=j>4||j===0?Ht.ceil(L):Ht(L),L=Tt.offset(L,(u.V-1)*7),u.y=L.getFullYear(),u.m=L.getMonth(),u.d=L.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),j="Z"in u?de(Lt(u.y,0,1)).getUTCDay():he(Lt(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(j+5)%7:u.w+u.U*7-(j+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,de(u)):he(u)}}function x(v,A,N,u){for(var K=0,L=A.length,j=N.length,q,rt;K=j)return-1;if(q=A.charCodeAt(K++),q===37){if(q=A.charAt(K++),rt=Q[q in He?A.charAt(K++):q],!rt||(u=rt(v,N,u))<0)return-1}else if(q!=N.charCodeAt(u++))return-1}return u}function Y(v,A,N){var u=T.exec(A.slice(N));return u?(v.p=g.get(u[0].toLowerCase()),N+u[0].length):-1}function _(v,A,N){var u=b.exec(A.slice(N));return u?(v.w=X.get(u[0].toLowerCase()),N+u[0].length):-1}function S(v,A,N){var u=F.exec(A.slice(N));return u?(v.w=D.get(u[0].toLowerCase()),N+u[0].length):-1}function p(v,A,N){var u=I.exec(A.slice(N));return u?(v.m=V.get(u[0].toLowerCase()),N+u[0].length):-1}function U(v,A,N){var u=O.exec(A.slice(N));return u?(v.m=C.get(u[0].toLowerCase()),N+u[0].length):-1}function l(v,A,N){return x(v,e,A,N)}function f(v,A,N){return x(v,n,A,N)}function y(v,A,N){return x(v,r,A,N)}function m(v){return s[v.getDay()]}function E(v){return i[v.getDay()]}function c(v){return M[v.getMonth()]}function d(v){return k[v.getMonth()]}function o(v){return a[+(v.getHours()>=12)]}function P(v){return 1+~~(v.getMonth()/3)}function z(v){return s[v.getUTCDay()]}function R(v){return i[v.getUTCDay()]}function $(v){return M[v.getUTCMonth()]}function G(v){return k[v.getUTCMonth()]}function J(v){return a[+(v.getUTCHours()>=12)]}function it(v){return 1+~~(v.getUTCMonth()/3)}return{format:function(v){var A=w(v+="",W);return A.toString=function(){return v},A},parse:function(v){var A=H(v+="",!1);return A.toString=function(){return v},A},utcFormat:function(v){var A=w(v+="",Z);return A.toString=function(){return v},A},utcParse:function(v){var A=H(v+="",!0);return A.toString=function(){return v},A}}}var He={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Cr=/^%/,Mr=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",a=(r?-t:t)+"",i=a.length;return r+(i[e.toLowerCase(),n]))}function Sr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ne(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ve(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ir(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zr(t,e,n){var r=Cr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Pr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Re(t,e){return B(t.getDate(),e,2)}function Br(t,e){return B(t.getHours(),e,2)}function Zr(t,e){return B(t.getHours()%12||12,e,2)}function qr(t,e){return B(1+Tt.count(kt(t),t),e,3)}function gn(t,e){return B(t.getMilliseconds(),e,3)}function Xr(t,e){return gn(t,e)+"000"}function Gr(t,e){return B(t.getMonth()+1,e,2)}function jr(t,e){return B(t.getMinutes(),e,2)}function Qr(t,e){return B(t.getSeconds(),e,2)}function Jr(t){var e=t.getDay();return e===0?7:e}function Kr(t,e){return B(Vt.count(kt(t)-1,t),e,2)}function yn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function $r(t,e){return t=yn(t),B(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ta(t){return t.getDay()}function ea(t,e){return B(Ht.count(kt(t)-1,t),e,2)}function na(t,e){return B(t.getFullYear()%100,e,2)}function ra(t,e){return t=yn(t),B(t.getFullYear()%100,e,2)}function aa(t,e){return B(t.getFullYear()%1e4,e,4)}function ia(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),B(t.getFullYear()%1e4,e,4)}function sa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Be(t,e){return B(t.getUTCDate(),e,2)}function oa(t,e){return B(t.getUTCHours(),e,2)}function ca(t,e){return B(t.getUTCHours()%12||12,e,2)}function la(t,e){return B(1+we.count(xt(t),t),e,3)}function kn(t,e){return B(t.getUTCMilliseconds(),e,3)}function ua(t,e){return kn(t,e)+"000"}function fa(t,e){return B(t.getUTCMonth()+1,e,2)}function ha(t,e){return B(t.getUTCMinutes(),e,2)}function da(t,e){return B(t.getUTCSeconds(),e,2)}function ma(t){var e=t.getUTCDay();return e===0?7:e}function ga(t,e){return B(mn.count(xt(t)-1,t),e,2)}function pn(t){var e=t.getUTCDay();return e>=4||e===0?Ft(t):Ft.ceil(t)}function ya(t,e){return t=pn(t),B(Ft.count(xt(t),t)+(xt(t).getUTCDay()===4),e,2)}function ka(t){return t.getUTCDay()}function pa(t,e){return B(Kt.count(xt(t)-1,t),e,2)}function va(t,e){return B(t.getUTCFullYear()%100,e,2)}function Ta(t,e){return t=pn(t),B(t.getUTCFullYear()%100,e,2)}function ba(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function xa(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ft(t):Ft.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function wa(){return"+0000"}function Ze(){return"%"}function qe(t){return+t}function Xe(t){return Math.floor(+t/1e3)}var Mt,$t;Da({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Da(t){return Mt=Dr(t),$t=Mt.format,Mt.parse,Mt.utcFormat,Mt.utcParse,Mt}function Ca(t){return new Date(t)}function Ma(t){return t instanceof Date?+t:+new Date(+t)}function vn(t,e,n,r,a,i,s,k,M,T){var g=Zn(),F=g.invert,D=g.domain,b=T(".%L"),X=T(":%S"),O=T("%I:%M"),C=T("%I %p"),I=T("%a %d"),V=T("%b %d"),W=T("%B"),Z=T("%Y");function Q(w){return(M(w)4&&(b+=7),D.add(b,n));return X.diff(O,"week")+1},k.isoWeekday=function(T){return this.$utils().u(T)?this.day()||7:this.day(this.day()%7?T:T-7)};var M=k.startOf;k.startOf=function(T,g){var F=this.$utils(),D=!!F.u(g)||g;return F.p(T)==="isoweek"?D?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):M.bind(this)(T,g)}}})})(Tn);var Sa=Tn.exports;const Ya=be(Sa);var bn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,i=/\d\d/,s=/\d\d?/,k=/\d*[^-_:/,()\s\d]+/,M={},T=function(C){return(C=+C)+(C>68?1900:2e3)},g=function(C){return function(I){this[C]=+I}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(C){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var V=I.match(/([+-]|\d\d)/g),W=60*V[1]+(+V[2]||0);return W===0?0:V[0]==="+"?-W:W}(C)}],D=function(C){var I=M[C];return I&&(I.indexOf?I:I.s.concat(I.f))},b=function(C,I){var V,W=M.meridiem;if(W){for(var Z=1;Z<=24;Z+=1)if(C.indexOf(W(Z,0,I))>-1){V=Z>12;break}}else V=C===(I?"pm":"PM");return V},X={A:[k,function(C){this.afternoon=b(C,!1)}],a:[k,function(C){this.afternoon=b(C,!0)}],Q:[a,function(C){this.month=3*(C-1)+1}],S:[a,function(C){this.milliseconds=100*+C}],SS:[i,function(C){this.milliseconds=10*+C}],SSS:[/\d{3}/,function(C){this.milliseconds=+C}],s:[s,g("seconds")],ss:[s,g("seconds")],m:[s,g("minutes")],mm:[s,g("minutes")],H:[s,g("hours")],h:[s,g("hours")],HH:[s,g("hours")],hh:[s,g("hours")],D:[s,g("day")],DD:[i,g("day")],Do:[k,function(C){var I=M.ordinal,V=C.match(/\d+/);if(this.day=V[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===C&&(this.day=W)}],w:[s,g("week")],ww:[i,g("week")],M:[s,g("month")],MM:[i,g("month")],MMM:[k,function(C){var I=D("months"),V=(D("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(C)+1;if(V<1)throw new Error;this.month=V%12||V}],MMMM:[k,function(C){var I=D("months").indexOf(C)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[i,function(C){this.year=T(C)}],YYYY:[/\d{4}/,g("year")],Z:F,ZZ:F};function O(C){var I,V;I=C,V=M&&M.formats;for(var W=(C=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,S,p){var U=p&&p.toUpperCase();return S||V[p]||n[p]||V[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(l,f,y){return f||y.slice(1)})})).match(r),Z=W.length,Q=0;Q-1)return new Date((E==="X"?1e3:1)*m);var o=O(E)(m),P=o.year,z=o.month,R=o.day,$=o.hours,G=o.minutes,J=o.seconds,it=o.milliseconds,v=o.zone,A=o.week,N=new Date,u=R||(P||z?1:N.getDate()),K=P||N.getFullYear(),L=0;P&&!z||(L=z>0?z-1:N.getMonth());var j,q=$||0,rt=G||0,st=J||0,pt=it||0;return v?new Date(Date.UTC(K,L,u,q,rt,st,pt+60*v.offset*1e3)):c?new Date(Date.UTC(K,L,u,q,rt,st,pt)):(j=new Date(K,L,u,q,rt,st,pt),A&&(j=d(j).week(A).toDate()),j)}catch{return new Date("")}}(w,Y,H,V),this.init(),U&&U!==!0&&(this.$L=this.locale(U).$L),p&&w!=this.format(Y)&&(this.$d=new Date("")),M={}}else if(Y instanceof Array)for(var l=Y.length,f=1;f<=l;f+=1){x[1]=Y[f-1];var y=V.apply(this,x);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}f===l&&(this.$d=new Date(""))}else Z.call(this,Q)}}})})(bn);var Ua=bn.exports;const Fa=be(Ua);var xn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){return function(n,r){var a=r.prototype,i=a.format;a.format=function(s){var k=this,M=this.$locale();if(!this.isValid())return i.bind(this)(s);var T=this.$utils(),g=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((k.$M+1)/3);case"Do":return M.ordinal(k.$D);case"gggg":return k.weekYear();case"GGGG":return k.isoWeekYear();case"wo":return M.ordinal(k.week(),"W");case"w":case"ww":return T.s(k.week(),F==="w"?1:2,"0");case"W":case"WW":return T.s(k.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return T.s(String(k.$H===0?24:k.$H),F==="k"?1:2,"0");case"X":return Math.floor(k.$d.getTime()/1e3);case"x":return k.$d.getTime();case"z":return"["+k.offsetName()+"]";case"zzz":return"["+k.offsetName("long")+"]";default:return F}});return i.bind(this)(g)}}})})(xn);var Ea=xn.exports;const La=be(Ea);var ye=function(){var t=h(function(U,l,f,y){for(f=f||{},y=U.length;y--;f[U[y]]=l);return f},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],a=[1,28],i=[1,29],s=[1,30],k=[1,31],M=[1,32],T=[1,33],g=[1,34],F=[1,9],D=[1,10],b=[1,11],X=[1,12],O=[1,13],C=[1,14],I=[1,15],V=[1,16],W=[1,19],Z=[1,20],Q=[1,21],w=[1,22],H=[1,23],x=[1,25],Y=[1,35],_={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:h(function(l,f,y,m,E,c,d){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:T,21:g,22:F,23:D,24:b,25:X,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:T,21:g,22:F,23:D,24:b,25:X,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:h(function(l,f){if(f.recoverable)this.trace(l);else{var y=new Error(l);throw y.hash=f,y}},"parseError"),parse:h(function(l){var f=this,y=[0],m=[],E=[null],c=[],d=this.table,o="",P=0,z=0,R=2,$=1,G=c.slice.call(arguments,1),J=Object.create(this.lexer),it={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(it.yy[v]=this.yy[v]);J.setInput(l,it.yy),it.yy.lexer=J,it.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var A=J.yylloc;c.push(A);var N=J.options&&J.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function u(ot){y.length=y.length-2*ot,E.length=E.length-ot,c.length=c.length-ot}h(u,"popStack");function K(){var ot;return ot=m.pop()||J.lex()||$,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=f.symbols_[ot]||ot),ot}h(K,"lex");for(var L,j,q,rt,st={},pt,lt,Ae,Bt;;){if(j=y[y.length-1],this.defaultActions[j]?q=this.defaultActions[j]:((L===null||typeof L>"u")&&(L=K()),q=d[j]&&d[j][L]),typeof q>"u"||!q.length||!q[0]){var ne="";Bt=[];for(pt in d[j])this.terminals_[pt]&&pt>R&&Bt.push("'"+this.terminals_[pt]+"'");J.showPosition?ne="Parse error on line "+(P+1)+`: +import{aS as Je,aT as Ke,aU as $e,aV as tn,aW as Fn,aX as re,aY as En,_ as h,aZ as at,d as _t,s as Ln,g as An,p as In,q as Wn,c as On,b as Hn,v as Nn,m as Vn,l as Qt,j as Zt,k as zn,e as Pn,u as Rn}from"./sidepanel.js";import{a as Te,g as be}from"./c-App.BSmD8r3A.js";import{b as Bn,t as Ie,c as Zn,a as qn,l as Xn}from"./c-linear.CFszUfD_.js";import{i as Gn}from"./c-init.Gi6I4Gst.js";function jn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n=a)&&(n=a)}return n}function Qn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}function Jn(t){return t}var Xt=1,ae=2,me=3,qt=4,We=1e-6;function Kn(t){return"translate("+t+",0)"}function $n(t){return"translate(0,"+t+")"}function tr(t){return e=>+t(e)}function er(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nr(){return!this.__axis}function en(t,e){var n=[],r=null,a=null,i=6,s=6,k=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=t===Xt||t===qt?-1:1,g=t===qt||t===ae?"x":"y",F=t===Xt||t===me?Kn:$n;function D(b){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),O=a??(e.tickFormat?e.tickFormat.apply(e,n):Jn),C=Math.max(i,0)+k,I=e.range(),V=+I[0]+M,W=+I[I.length-1]+M,Z=(e.bandwidth?er:tr)(e.copy(),M),Q=b.selection?b.selection():b,w=Q.selectAll(".domain").data([null]),H=Q.selectAll(".tick").data(X,e).order(),x=H.exit(),Y=H.enter().append("g").attr("class","tick"),_=H.select("line"),S=H.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(Y),_=_.merge(Y.append("line").attr("stroke","currentColor").attr(g+"2",T*i)),S=S.merge(Y.append("text").attr("fill","currentColor").attr(g,T*C).attr("dy",t===Xt?"0em":t===me?"0.71em":"0.32em")),b!==Q&&(w=w.transition(b),H=H.transition(b),_=_.transition(b),S=S.transition(b),x=x.transition(b).attr("opacity",We).attr("transform",function(p){return isFinite(p=Z(p))?F(p+M):this.getAttribute("transform")}),Y.attr("opacity",We).attr("transform",function(p){var U=this.parentNode.__axis;return F((U&&isFinite(U=U(p))?U:Z(p))+M)})),x.remove(),w.attr("d",t===qt||t===ae?s?"M"+T*s+","+V+"H"+M+"V"+W+"H"+T*s:"M"+M+","+V+"V"+W:s?"M"+V+","+T*s+"V"+M+"H"+W+"V"+T*s:"M"+V+","+M+"H"+W),H.attr("opacity",1).attr("transform",function(p){return F(Z(p)+M)}),_.attr(g+"2",T*i),S.attr(g,T*C).text(O),Q.filter(nr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ae?"start":t===qt?"end":"middle"),Q.each(function(){this.__axis=Z})}return D.scale=function(b){return arguments.length?(e=b,D):e},D.ticks=function(){return n=Array.from(arguments),D},D.tickArguments=function(b){return arguments.length?(n=b==null?[]:Array.from(b),D):n.slice()},D.tickValues=function(b){return arguments.length?(r=b==null?null:Array.from(b),D):r&&r.slice()},D.tickFormat=function(b){return arguments.length?(a=b,D):a},D.tickSize=function(b){return arguments.length?(i=s=+b,D):i},D.tickSizeInner=function(b){return arguments.length?(i=+b,D):i},D.tickSizeOuter=function(b){return arguments.length?(s=+b,D):s},D.tickPadding=function(b){return arguments.length?(k=+b,D):k},D.offset=function(b){return arguments.length?(M=+b,D):M},D}function rr(t){return en(Xt,t)}function ar(t){return en(me,t)}const ir=Math.PI/180,sr=180/Math.PI,Jt=18,nn=.96422,rn=1,an=.82521,sn=4/29,St=6/29,on=3*St*St,or=St*St*St;function cn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof dt)return ln(t);t instanceof $e||(t=Fn(t));var e=ce(t.r),n=ce(t.g),r=ce(t.b),a=ie((.2225045*e+.7168786*n+.0606169*r)/rn),i,s;return e===n&&n===r?i=s=a:(i=ie((.4360747*e+.3850649*n+.1430804*r)/nn),s=ie((.0139322*e+.0971045*n+.7141733*r)/an)),new ft(116*a-16,500*(i-a),200*(a-s),t.opacity)}function cr(t,e,n,r){return arguments.length===1?cn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Je(ft,cr,Ke(tn,{brighter(t){return new ft(this.l+Jt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-Jt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=nn*se(e),t=rn*se(t),n=an*se(n),new $e(oe(3.1338561*e-1.6168667*t-.4906146*n),oe(-.9787684*e+1.9161415*t+.033454*n),oe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ie(t){return t>or?Math.pow(t,1/3):t/on+sn}function se(t){return t>St?t*t*t:on*(t-sn)}function oe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ce(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function lr(t){if(t instanceof dt)return new dt(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=cn(t)),t.a===0&&t.b===0)return new dt(NaN,0(t(i=new Date(+i)),i),a.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),a.round=i=>{const s=a(i),k=a.ceil(i);return i-s(e(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,k)=>{const M=[];if(i=a.ceil(i),k=k==null?1:Math.floor(k),!(i0))return M;let T;do M.push(T=new Date(+i)),e(i,k),t(i);while(Tet(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,k)=>{if(s>=s)if(k<0)for(;++k<=0;)for(;e(s,-1),!i(s););else for(;--k>=0;)for(;e(s,1),!i(s););}),n&&(a.count=(i,s)=>(le.setTime(+i),ue.setTime(+s),t(le),t(ue),Math.floor(n(le,ue))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ut=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ut.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ut);Ut.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,xe=yt*7,Oe=yt*30,fe=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Wt=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Wt.range;const dr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());dr.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ot.range;const mr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());mr.range;const Tt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);Tt.range;const we=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);we.range;const gr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));gr.range;function wt(t){return et(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/xe)}const Vt=wt(0),Ht=wt(1),un=wt(2),fn=wt(3),bt=wt(4),hn=wt(5),dn=wt(6);Vt.range;Ht.range;un.range;fn.range;bt.range;hn.range;dn.range;function Dt(t){return et(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/xe)}const mn=Dt(0),Kt=Dt(1),yr=Dt(2),kr=Dt(3),Ft=Dt(4),pr=Dt(5),vr=Dt(6);mn.range;Kt.range;yr.range;kr.range;Ft.range;pr.range;vr.range;const Nt=et(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Nt.range;const Tr=et(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Tr.range;const kt=et(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const xt=et(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());xt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});xt.range;function br(t,e,n,r,a,i){const s=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[i,1,ct],[i,5,5*ct],[i,15,15*ct],[i,30,30*ct],[a,1,gt],[a,3,3*gt],[a,6,6*gt],[a,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,xe],[e,1,Oe],[e,3,3*Oe],[t,1,fe]];function k(T,g,F){const D=gC).right(s,D);if(b===s.length)return t.every(Ie(T/fe,g/fe,F));if(b===0)return Ut.every(Math.max(Ie(T,g,F),1));const[X,O]=s[D/s[b-1][2]53)return null;"w"in u||(u.w=1),"Z"in u?(L=de(Lt(u.y,0,1)),j=L.getUTCDay(),L=j>4||j===0?Kt.ceil(L):Kt(L),L=we.offset(L,(u.V-1)*7),u.y=L.getUTCFullYear(),u.m=L.getUTCMonth(),u.d=L.getUTCDate()+(u.w+6)%7):(L=he(Lt(u.y,0,1)),j=L.getDay(),L=j>4||j===0?Ht.ceil(L):Ht(L),L=Tt.offset(L,(u.V-1)*7),u.y=L.getFullYear(),u.m=L.getMonth(),u.d=L.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),j="Z"in u?de(Lt(u.y,0,1)).getUTCDay():he(Lt(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(j+5)%7:u.w+u.U*7-(j+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,de(u)):he(u)}}function x(v,A,N,u){for(var K=0,L=A.length,j=N.length,q,rt;K=j)return-1;if(q=A.charCodeAt(K++),q===37){if(q=A.charAt(K++),rt=Q[q in He?A.charAt(K++):q],!rt||(u=rt(v,N,u))<0)return-1}else if(q!=N.charCodeAt(u++))return-1}return u}function Y(v,A,N){var u=T.exec(A.slice(N));return u?(v.p=g.get(u[0].toLowerCase()),N+u[0].length):-1}function _(v,A,N){var u=b.exec(A.slice(N));return u?(v.w=X.get(u[0].toLowerCase()),N+u[0].length):-1}function S(v,A,N){var u=F.exec(A.slice(N));return u?(v.w=D.get(u[0].toLowerCase()),N+u[0].length):-1}function p(v,A,N){var u=I.exec(A.slice(N));return u?(v.m=V.get(u[0].toLowerCase()),N+u[0].length):-1}function U(v,A,N){var u=O.exec(A.slice(N));return u?(v.m=C.get(u[0].toLowerCase()),N+u[0].length):-1}function l(v,A,N){return x(v,e,A,N)}function f(v,A,N){return x(v,n,A,N)}function y(v,A,N){return x(v,r,A,N)}function m(v){return s[v.getDay()]}function E(v){return i[v.getDay()]}function c(v){return M[v.getMonth()]}function d(v){return k[v.getMonth()]}function o(v){return a[+(v.getHours()>=12)]}function P(v){return 1+~~(v.getMonth()/3)}function z(v){return s[v.getUTCDay()]}function R(v){return i[v.getUTCDay()]}function $(v){return M[v.getUTCMonth()]}function G(v){return k[v.getUTCMonth()]}function J(v){return a[+(v.getUTCHours()>=12)]}function it(v){return 1+~~(v.getUTCMonth()/3)}return{format:function(v){var A=w(v+="",W);return A.toString=function(){return v},A},parse:function(v){var A=H(v+="",!1);return A.toString=function(){return v},A},utcFormat:function(v){var A=w(v+="",Z);return A.toString=function(){return v},A},utcParse:function(v){var A=H(v+="",!0);return A.toString=function(){return v},A}}}var He={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Cr=/^%/,Mr=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",a=(r?-t:t)+"",i=a.length;return r+(i[e.toLowerCase(),n]))}function Sr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ne(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ve(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ir(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zr(t,e,n){var r=Cr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Pr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Re(t,e){return B(t.getDate(),e,2)}function Br(t,e){return B(t.getHours(),e,2)}function Zr(t,e){return B(t.getHours()%12||12,e,2)}function qr(t,e){return B(1+Tt.count(kt(t),t),e,3)}function gn(t,e){return B(t.getMilliseconds(),e,3)}function Xr(t,e){return gn(t,e)+"000"}function Gr(t,e){return B(t.getMonth()+1,e,2)}function jr(t,e){return B(t.getMinutes(),e,2)}function Qr(t,e){return B(t.getSeconds(),e,2)}function Jr(t){var e=t.getDay();return e===0?7:e}function Kr(t,e){return B(Vt.count(kt(t)-1,t),e,2)}function yn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function $r(t,e){return t=yn(t),B(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ta(t){return t.getDay()}function ea(t,e){return B(Ht.count(kt(t)-1,t),e,2)}function na(t,e){return B(t.getFullYear()%100,e,2)}function ra(t,e){return t=yn(t),B(t.getFullYear()%100,e,2)}function aa(t,e){return B(t.getFullYear()%1e4,e,4)}function ia(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),B(t.getFullYear()%1e4,e,4)}function sa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Be(t,e){return B(t.getUTCDate(),e,2)}function oa(t,e){return B(t.getUTCHours(),e,2)}function ca(t,e){return B(t.getUTCHours()%12||12,e,2)}function la(t,e){return B(1+we.count(xt(t),t),e,3)}function kn(t,e){return B(t.getUTCMilliseconds(),e,3)}function ua(t,e){return kn(t,e)+"000"}function fa(t,e){return B(t.getUTCMonth()+1,e,2)}function ha(t,e){return B(t.getUTCMinutes(),e,2)}function da(t,e){return B(t.getUTCSeconds(),e,2)}function ma(t){var e=t.getUTCDay();return e===0?7:e}function ga(t,e){return B(mn.count(xt(t)-1,t),e,2)}function pn(t){var e=t.getUTCDay();return e>=4||e===0?Ft(t):Ft.ceil(t)}function ya(t,e){return t=pn(t),B(Ft.count(xt(t),t)+(xt(t).getUTCDay()===4),e,2)}function ka(t){return t.getUTCDay()}function pa(t,e){return B(Kt.count(xt(t)-1,t),e,2)}function va(t,e){return B(t.getUTCFullYear()%100,e,2)}function Ta(t,e){return t=pn(t),B(t.getUTCFullYear()%100,e,2)}function ba(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function xa(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ft(t):Ft.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function wa(){return"+0000"}function Ze(){return"%"}function qe(t){return+t}function Xe(t){return Math.floor(+t/1e3)}var Mt,$t;Da({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Da(t){return Mt=Dr(t),$t=Mt.format,Mt.parse,Mt.utcFormat,Mt.utcParse,Mt}function Ca(t){return new Date(t)}function Ma(t){return t instanceof Date?+t:+new Date(+t)}function vn(t,e,n,r,a,i,s,k,M,T){var g=Zn(),F=g.invert,D=g.domain,b=T(".%L"),X=T(":%S"),O=T("%I:%M"),C=T("%I %p"),I=T("%a %d"),V=T("%b %d"),W=T("%B"),Z=T("%Y");function Q(w){return(M(w)4&&(b+=7),D.add(b,n));return X.diff(O,"week")+1},k.isoWeekday=function(T){return this.$utils().u(T)?this.day()||7:this.day(this.day()%7?T:T-7)};var M=k.startOf;k.startOf=function(T,g){var F=this.$utils(),D=!!F.u(g)||g;return F.p(T)==="isoweek"?D?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):M.bind(this)(T,g)}}})})(Tn);var Sa=Tn.exports;const Ya=be(Sa);var bn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,i=/\d\d/,s=/\d\d?/,k=/\d*[^-_:/,()\s\d]+/,M={},T=function(C){return(C=+C)+(C>68?1900:2e3)},g=function(C){return function(I){this[C]=+I}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(C){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var V=I.match(/([+-]|\d\d)/g),W=60*V[1]+(+V[2]||0);return W===0?0:V[0]==="+"?-W:W}(C)}],D=function(C){var I=M[C];return I&&(I.indexOf?I:I.s.concat(I.f))},b=function(C,I){var V,W=M.meridiem;if(W){for(var Z=1;Z<=24;Z+=1)if(C.indexOf(W(Z,0,I))>-1){V=Z>12;break}}else V=C===(I?"pm":"PM");return V},X={A:[k,function(C){this.afternoon=b(C,!1)}],a:[k,function(C){this.afternoon=b(C,!0)}],Q:[a,function(C){this.month=3*(C-1)+1}],S:[a,function(C){this.milliseconds=100*+C}],SS:[i,function(C){this.milliseconds=10*+C}],SSS:[/\d{3}/,function(C){this.milliseconds=+C}],s:[s,g("seconds")],ss:[s,g("seconds")],m:[s,g("minutes")],mm:[s,g("minutes")],H:[s,g("hours")],h:[s,g("hours")],HH:[s,g("hours")],hh:[s,g("hours")],D:[s,g("day")],DD:[i,g("day")],Do:[k,function(C){var I=M.ordinal,V=C.match(/\d+/);if(this.day=V[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===C&&(this.day=W)}],w:[s,g("week")],ww:[i,g("week")],M:[s,g("month")],MM:[i,g("month")],MMM:[k,function(C){var I=D("months"),V=(D("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(C)+1;if(V<1)throw new Error;this.month=V%12||V}],MMMM:[k,function(C){var I=D("months").indexOf(C)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[i,function(C){this.year=T(C)}],YYYY:[/\d{4}/,g("year")],Z:F,ZZ:F};function O(C){var I,V;I=C,V=M&&M.formats;for(var W=(C=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,S,p){var U=p&&p.toUpperCase();return S||V[p]||n[p]||V[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(l,f,y){return f||y.slice(1)})})).match(r),Z=W.length,Q=0;Q-1)return new Date((E==="X"?1e3:1)*m);var o=O(E)(m),P=o.year,z=o.month,R=o.day,$=o.hours,G=o.minutes,J=o.seconds,it=o.milliseconds,v=o.zone,A=o.week,N=new Date,u=R||(P||z?1:N.getDate()),K=P||N.getFullYear(),L=0;P&&!z||(L=z>0?z-1:N.getMonth());var j,q=$||0,rt=G||0,st=J||0,pt=it||0;return v?new Date(Date.UTC(K,L,u,q,rt,st,pt+60*v.offset*1e3)):c?new Date(Date.UTC(K,L,u,q,rt,st,pt)):(j=new Date(K,L,u,q,rt,st,pt),A&&(j=d(j).week(A).toDate()),j)}catch{return new Date("")}}(w,Y,H,V),this.init(),U&&U!==!0&&(this.$L=this.locale(U).$L),p&&w!=this.format(Y)&&(this.$d=new Date("")),M={}}else if(Y instanceof Array)for(var l=Y.length,f=1;f<=l;f+=1){x[1]=Y[f-1];var y=V.apply(this,x);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}f===l&&(this.$d=new Date(""))}else Z.call(this,Q)}}})})(bn);var Ua=bn.exports;const Fa=be(Ua);var xn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){return function(n,r){var a=r.prototype,i=a.format;a.format=function(s){var k=this,M=this.$locale();if(!this.isValid())return i.bind(this)(s);var T=this.$utils(),g=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((k.$M+1)/3);case"Do":return M.ordinal(k.$D);case"gggg":return k.weekYear();case"GGGG":return k.isoWeekYear();case"wo":return M.ordinal(k.week(),"W");case"w":case"ww":return T.s(k.week(),F==="w"?1:2,"0");case"W":case"WW":return T.s(k.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return T.s(String(k.$H===0?24:k.$H),F==="k"?1:2,"0");case"X":return Math.floor(k.$d.getTime()/1e3);case"x":return k.$d.getTime();case"z":return"["+k.offsetName()+"]";case"zzz":return"["+k.offsetName("long")+"]";default:return F}});return i.bind(this)(g)}}})})(xn);var Ea=xn.exports;const La=be(Ea);var ye=function(){var t=h(function(U,l,f,y){for(f=f||{},y=U.length;y--;f[U[y]]=l);return f},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],a=[1,28],i=[1,29],s=[1,30],k=[1,31],M=[1,32],T=[1,33],g=[1,34],F=[1,9],D=[1,10],b=[1,11],X=[1,12],O=[1,13],C=[1,14],I=[1,15],V=[1,16],W=[1,19],Z=[1,20],Q=[1,21],w=[1,22],H=[1,23],x=[1,25],Y=[1,35],_={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:h(function(l,f,y,m,E,c,d){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:T,21:g,22:F,23:D,24:b,25:X,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:T,21:g,22:F,23:D,24:b,25:X,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:h(function(l,f){if(f.recoverable)this.trace(l);else{var y=new Error(l);throw y.hash=f,y}},"parseError"),parse:h(function(l){var f=this,y=[0],m=[],E=[null],c=[],d=this.table,o="",P=0,z=0,R=2,$=1,G=c.slice.call(arguments,1),J=Object.create(this.lexer),it={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(it.yy[v]=this.yy[v]);J.setInput(l,it.yy),it.yy.lexer=J,it.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var A=J.yylloc;c.push(A);var N=J.options&&J.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function u(ot){y.length=y.length-2*ot,E.length=E.length-ot,c.length=c.length-ot}h(u,"popStack");function K(){var ot;return ot=m.pop()||J.lex()||$,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=f.symbols_[ot]||ot),ot}h(K,"lex");for(var L,j,q,rt,st={},pt,lt,Ae,Bt;;){if(j=y[y.length-1],this.defaultActions[j]?q=this.defaultActions[j]:((L===null||typeof L>"u")&&(L=K()),q=d[j]&&d[j][L]),typeof q>"u"||!q.length||!q[0]){var ne="";Bt=[];for(pt in d[j])this.terminals_[pt]&&pt>R&&Bt.push("'"+this.terminals_[pt]+"'");J.showPosition?ne="Parse error on line "+(P+1)+`: `+J.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":ne="Parse error on line "+(P+1)+": Unexpected "+(L==$?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(ne,{text:J.match,token:this.terminals_[L]||L,line:J.yylineno,loc:A,expected:Bt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+L);switch(q[0]){case 1:y.push(L),E.push(J.yytext),c.push(J.yylloc),y.push(q[1]),L=null,z=J.yyleng,o=J.yytext,P=J.yylineno,A=J.yylloc;break;case 2:if(lt=this.productions_[q[1]][1],st.$=E[E.length-lt],st._$={first_line:c[c.length-(lt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(lt||1)].first_column,last_column:c[c.length-1].last_column},N&&(st._$.range=[c[c.length-(lt||1)].range[0],c[c.length-1].range[1]]),rt=this.performAction.apply(st,[o,z,P,it.yy,q[1],E,c].concat(G)),typeof rt<"u")return rt;lt&&(y=y.slice(0,-1*lt*2),E=E.slice(0,-1*lt),c=c.slice(0,-1*lt)),y.push(this.productions_[q[1]][0]),E.push(st.$),c.push(st._$),Ae=d[y[y.length-2]][y[y.length-1]],y.push(Ae);break;case 3:return!0}}return!0},"parse")},S=function(){var U={EOF:1,parseError:h(function(f,y){if(this.yy.parser)this.yy.parser.parseError(f,y);else throw new Error(f)},"parseError"),setInput:h(function(l,f){return this.yy=f||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var f=l.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:h(function(l){var f=l.length,y=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(l){this.unput(this.match.slice(l))},"less"),pastInput:h(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var l=this.pastInput(),f=new Array(l.length+1).join("-");return l+this.upcomingInput()+` diff --git a/dist/c-gitGraphDiagram-5C7YHVU6.DJo58C4j.js b/dist/c-gitGraphDiagram-5C7YHVU6.Dl5tBrYZ.js similarity index 99% rename from dist/c-gitGraphDiagram-5C7YHVU6.DJo58C4j.js rename to dist/c-gitGraphDiagram-5C7YHVU6.Dl5tBrYZ.js index fb3d3f0..0266ae2 100644 --- a/dist/c-gitGraphDiagram-5C7YHVU6.DJo58C4j.js +++ b/dist/c-gitGraphDiagram-5C7YHVU6.Dl5tBrYZ.js @@ -1,4 +1,4 @@ -import{p as Z}from"./c-chunk-BAOP5US2.D69mMcSi.js";import{I as F}from"./c-chunk-RGXPSUNZ.DGZknDz3.js";import{B as U,_ as h,d as rr,C as er,D as tr,E as ar,l as w,s as nr,g as sr,b as or,c as cr,p as ir,q as dr,e as B,v as hr,j as lr,u as $r,F as fr}from"./sidepanel.js";import{p as gr}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";var u={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=U.gitGraph,z=h(()=>er({...yr,...tr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function j(){return ar({length:7})}h(j,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var pr=h(function(t){i.records.direction=t},"setDirection"),ur=h(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),xr=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;w.info("commit",r,a,s,e),w.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+j(),message:r,seq:i.records.seq++,type:s??u.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,w.info("main branch",n.mainBranchName),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),w.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),w.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${j()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:u.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;w.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===u.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+j(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:u.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===u.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function A(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function D(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);A(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);A(t,r,e)}}t=N(t,e=>e.id),D(t)}h(D,"prettyPrintCommitHistory");var Cr=h(function(){w.debug(i.records.commits);const t=V()[0];D([t])},"prettyPrint"),Er=h(function(){i.reset(),hr()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){w.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:u,getConfig:z,setDirection:pr,setOptions:ur,getOptions:xr,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:sr,getAccDescription:or,setAccDescription:cr,setDiagramTitle:ir,getDiagramTitle:dr},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?u[t.type]:u.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?u[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);w.debug(r),Ir(r,X)},"parse")},S=rr(),b=S==null?void 0:S.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,p="LR",jr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],p="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return p==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=p==="TB"||p=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),Sr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Ar=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=Sr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Dr=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Dr(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===u.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===u.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===u.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===u.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===u.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==u.CHERRY_PICK&&(r.customId&&r.type===u.MERGE||r.type!==u.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),p==="TB"||p==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(p==="TB"||p==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,x=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` +import{p as Z}from"./c-chunk-BAOP5US2.D69mMcSi.js";import{I as F}from"./c-chunk-RGXPSUNZ.DGZknDz3.js";import{B as U,_ as h,d as rr,C as er,D as tr,E as ar,l as w,s as nr,g as sr,b as or,c as cr,p as ir,q as dr,e as B,v as hr,j as lr,u as $r,F as fr}from"./sidepanel.js";import{p as gr}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";var u={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=U.gitGraph,z=h(()=>er({...yr,...tr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function j(){return ar({length:7})}h(j,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var pr=h(function(t){i.records.direction=t},"setDirection"),ur=h(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),xr=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;w.info("commit",r,a,s,e),w.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+j(),message:r,seq:i.records.seq++,type:s??u.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,w.info("main branch",n.mainBranchName),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),w.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),w.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${j()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:u.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;w.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===u.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+j(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:u.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===u.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function A(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function D(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);A(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);A(t,r,e)}}t=N(t,e=>e.id),D(t)}h(D,"prettyPrintCommitHistory");var Cr=h(function(){w.debug(i.records.commits);const t=V()[0];D([t])},"prettyPrint"),Er=h(function(){i.reset(),hr()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){w.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:u,getConfig:z,setDirection:pr,setOptions:ur,getOptions:xr,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:sr,getAccDescription:or,setAccDescription:cr,setDiagramTitle:ir,getDiagramTitle:dr},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?u[t.type]:u.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?u[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);w.debug(r),Ir(r,X)},"parse")},S=rr(),b=S==null?void 0:S.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,p="LR",jr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],p="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return p==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=p==="TB"||p=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),Sr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Ar=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=Sr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Dr=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Dr(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===u.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===u.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===u.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===u.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===u.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==u.CHERRY_PICK&&(r.customId&&r.type===u.MERGE||r.type!==u.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),p==="TB"||p==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(p==="TB"||p==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,x=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` ${s-c/2-k/2},${x+L} ${s-c/2-k/2},${x-L} ${a.posWithOffset-c/2-k},${x-y-L} diff --git a/dist/c-infoDiagram-P5D6MX3V.DdIyuX89.js b/dist/c-infoDiagram-P5D6MX3V.9u1PTiRl.js similarity index 90% rename from dist/c-infoDiagram-P5D6MX3V.DdIyuX89.js rename to dist/c-infoDiagram-P5D6MX3V.9u1PTiRl.js index 4099bfa..f1e9e12 100644 --- a/dist/c-infoDiagram-P5D6MX3V.DdIyuX89.js +++ b/dist/c-infoDiagram-P5D6MX3V.9u1PTiRl.js @@ -1,2 +1,2 @@ -import{_ as e,l as s,G as n,k as i,H as p}from"./sidepanel.js";import{p as g}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";var v={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:p},m=e(()=>d.version,"getVersion"),c={getVersion:m},l=e((r,a,o)=>{s.debug(`rendering info diagram +import{_ as e,l as s,G as n,k as i,H as p}from"./sidepanel.js";import{p as g}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";var v={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:p},m=e(()=>d.version,"getVersion"),c={getVersion:m},l=e((r,a,o)=>{s.debug(`rendering info diagram `+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),f={draw:l},z={parser:v,db:c,renderer:f};export{z as diagram}; diff --git a/dist/c-journeyDiagram-UIGPPNLY.B4jif9w_.js b/dist/c-journeyDiagram-UIGPPNLY.COfGQ7Mw.js similarity index 99% rename from dist/c-journeyDiagram-UIGPPNLY.B4jif9w_.js rename to dist/c-journeyDiagram-UIGPPNLY.COfGQ7Mw.js index f7f6710..56a0baf 100644 --- a/dist/c-journeyDiagram-UIGPPNLY.B4jif9w_.js +++ b/dist/c-journeyDiagram-UIGPPNLY.COfGQ7Mw.js @@ -1,4 +1,4 @@ -import{d as ft,f as gt,g as at,b as mt}from"./c-chunk-VCFP4HPQ.P-Zh3yiJ.js";import{_ as i,d as A,p as xt,q as kt,s as _t,g as vt,c as bt,b as wt,v as Tt,j as W,k as St}from"./sidepanel.js";import{d as tt}from"./c-arc.D8ah_K6m.js";import"./c-App.BTybbOiv.js";var H=function(){var t=i(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],s=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:i(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:i(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:i(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}i(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}i(Q,"lex");for(var v,P,w,q,C={},j,M,D,N;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";N=[];for(j in S[P])this.terminals_[j]&&j>ut&&N.push("'"+this.terminals_[j]+"'");k.showPosition?G="Parse error on line "+(B+1)+`: +import{d as ft,f as gt,g as at,b as mt}from"./c-chunk-VCFP4HPQ.P-Zh3yiJ.js";import{_ as i,d as A,p as xt,q as kt,s as _t,g as vt,c as bt,b as wt,v as Tt,j as W,k as St}from"./sidepanel.js";import{d as tt}from"./c-arc.D8ah_K6m.js";import"./c-App.BSmD8r3A.js";var H=function(){var t=i(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],s=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:i(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:i(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:i(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}i(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}i(Q,"lex");for(var v,P,w,q,C={},j,M,D,N;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";N=[];for(j in S[P])this.terminals_[j]&&j>ut&&N.push("'"+this.terminals_[j]+"'");k.showPosition?G="Parse error on line "+(B+1)+`: `+k.showPosition()+` Expecting `+N.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on line "+(B+1)+": Unexpected "+(v==K?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[v]||v,line:k.yylineno,loc:Y,expected:N})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+v);switch(w[0]){case 1:l.push(v),f.push(k.yytext),o.push(k.yylloc),l.push(w[1]),v=null,J=k.yyleng,_=k.yytext,B=k.yylineno,Y=k.yylloc;break;case 2:if(M=this.productions_[w[1]][1],C.$=f[f.length-M],C._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},dt&&(C._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(C,[_,J,B,E.yy,w[1],f,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),f=f.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[w[1]][0]),f.push(C.$),o.push(C._$),D=S[l[l.length-2]][l[l.length-1]],l.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var g={EOF:1,parseError:i(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:i(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:i(function(r){var a=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i(function(r){this.unput(this.match.slice(r))},"less"),pastInput:i(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/dist/c-kanban-definition-KMT3NSR2.uT1oEA61.js b/dist/c-kanban-definition-KMT3NSR2.UKecc5Qe.js similarity index 99% rename from dist/c-kanban-definition-KMT3NSR2.uT1oEA61.js rename to dist/c-kanban-definition-KMT3NSR2.UKecc5Qe.js index a6aa1fa..5cdce3f 100644 --- a/dist/c-kanban-definition-KMT3NSR2.uT1oEA61.js +++ b/dist/c-kanban-definition-KMT3NSR2.UKecc5Qe.js @@ -1,4 +1,4 @@ -import{_ as c,l as te,d as W,G as fe,ae as ye,af as be,ag as me,V as _e,B as K,i as F,r as Ee,J as ke,W as Se,X as le,Y as ce}from"./sidepanel.js";import"./c-App.BTybbOiv.js";var $=function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,G={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`: +import{_ as c,l as te,d as W,G as fe,ae as ye,af as be,ag as me,V as _e,B as K,i as F,r as Ee,J as ke,W as Se,X as le,Y as ce}from"./sidepanel.js";import"./c-App.BSmD8r3A.js";var $=function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,G={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`: `+b.showPosition()+` Expecting `+Y.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:q,expected:Y})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+k);switch(v[0]){case 1:a.push(k),u.push(b.yytext),e.push(b.yylloc),a.push(v[1]),k=null,ie=b.yyleng,l=b.yytext,z=b.yylineno,q=b.yylloc;break;case 2:if(I=this.productions_[v[1]][1],G.$=u[u.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(G,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(G.$),e.push(G._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},m=function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/dist/c-mindmap-definition-R7LC4OIY.CBpJ3Pex.js b/dist/c-mindmap-definition-R7LC4OIY.HtmJtmIk.js similarity index 99% rename from dist/c-mindmap-definition-R7LC4OIY.CBpJ3Pex.js rename to dist/c-mindmap-definition-R7LC4OIY.HtmJtmIk.js index a8cf885..4d2ca1a 100644 --- a/dist/c-mindmap-definition-R7LC4OIY.CBpJ3Pex.js +++ b/dist/c-mindmap-definition-R7LC4OIY.HtmJtmIk.js @@ -1,4 +1,4 @@ -import{_ as S,l as z,j as Nt,aj as Dt,O as mt,d as at,G as Ot,V as At,B as tt,i as et,W as It,X as Ct,Y as Rt}from"./sidepanel.js";import{c as pt}from"./c-cytoscape.esm.YXkLVt_w.js";import{a as ot,g as xt}from"./c-App.BTybbOiv.js";var dt={exports:{}},it={exports:{}},nt={exports:{}},ut;function Mt(){return ut||(ut=1,function(I,w){(function(m,y){I.exports=y()})(ot,function(){return function(f){var m={};function y(r){if(m[r])return m[r].exports;var t=m[r]={i:r,l:!1,exports:{}};return f[r].call(t.exports,t,t.exports,y),t.l=!0,t.exports}return y.m=f,y.c=m,y.i=function(r){return r},y.d=function(r,t,e){y.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},y.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return y.d(t,"a",t),t},y.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},y.p="",y(y.s=26)}([function(f,m,y){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,f.exports=r},function(f,m,y){var r=y(2),t=y(8),e=y(9);function i(g,a,v){r.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=a}i.prototype=Object.create(r.prototype);for(var o in r)i[o]=r[o];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,a){for(var v=this.getOtherEnd(g),n=a.getGraphManager().getRoot();;){if(v.getOwner()==a)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},f.exports=i},function(f,m,y){function r(t){this.vGraphObject=t}f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(13),i=y(0),o=y(16),g=y(4);function a(n,c,l,E){l==null&&E==null&&(E=c),r.call(this,E),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=E,this.edges=[],this.graphManager=n,l!=null&&c!=null?this.rect=new e(c.x,c.y,l.width,l.height):this.rect=new e}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(n){this.rect.width=n},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(n){this.rect.height=n},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(n,c){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=c.width,this.rect.height=c.height},a.prototype.setCenter=function(n,c){this.rect.x=n-this.rect.width/2,this.rect.y=c-this.rect.height/2},a.prototype.setLocation=function(n,c){this.rect.x=n,this.rect.y=c},a.prototype.moveBy=function(n,c){this.rect.x+=n,this.rect.y+=c},a.prototype.getEdgeListToNode=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(E.target==n){if(E.source!=l)throw"Incorrect edge source!";c.push(E)}}),c},a.prototype.getEdgesBetween=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(!(E.source==l||E.target==l))throw"Incorrect edge source and/or target";(E.target==n||E.source==n)&&c.push(E)}),c},a.prototype.getNeighborsList=function(){var n=new Set,c=this;return c.edges.forEach(function(l){if(l.source==c)n.add(l.target);else{if(l.target!=c)throw"Incorrect incidency!";n.add(l.source)}}),n},a.prototype.withChildren=function(){var n=new Set,c,l;if(n.add(this),this.child!=null)for(var E=this.child.getNodes(),T=0;Tc&&(this.rect.x-=(this.labelWidth-c)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(n){var c=this.rect.x;c>i.WORLD_BOUNDARY?c=i.WORLD_BOUNDARY:c<-i.WORLD_BOUNDARY&&(c=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var E=new g(c,l),T=n.inverseTransformPoint(E);this.setLocation(T.x,T.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=a},function(f,m,y){function r(t,e){t==null&&e==null?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(0),i=y(6),o=y(3),g=y(1),a=y(13),v=y(12),n=y(11);function c(E,T,D){r.call(this,D),this.estimatedSize=t.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=E,T!=null&&T instanceof i?this.graphManager=T:T!=null&&T instanceof Layout&&(this.graphManager=T.graphManager)}c.prototype=Object.create(r.prototype);for(var l in r)c[l]=r[l];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(E,T,D){if(T==null&&D==null){var L=E;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(L)>-1)throw"Node already in graph!";return L.owner=this,this.getNodes().push(L),L}else{var O=E;if(!(this.getNodes().indexOf(T)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(T.owner==D.owner&&T.owner==this))throw"Both owners must be this graph!";return T.owner!=D.owner?null:(O.source=T,O.target=D,O.isInterGraph=!1,this.getEdges().push(O),T.edges.push(O),D!=T&&D.edges.push(O),O)}},c.prototype.remove=function(E){var T=E;if(E instanceof o){if(T==null)throw"Node is null!";if(!(T.owner!=null&&T.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=T.edges.slice(),L,O=D.length,d=0;d-1&&h>-1))throw"Source and/or target doesn't know this edge!";L.source.edges.splice(s,1),L.target!=L.source&&L.target.edges.splice(h,1);var N=L.source.owner.getEdges().indexOf(L);if(N==-1)throw"Not in owner's edge list!";L.source.owner.getEdges().splice(N,1)}},c.prototype.updateLeftTop=function(){for(var E=t.MAX_VALUE,T=t.MAX_VALUE,D,L,O,d=this.getNodes(),N=d.length,s=0;sD&&(E=D),T>L&&(T=L)}return E==t.MAX_VALUE?null:(d[0].getParent().paddingLeft!=null?O=d[0].getParent().paddingLeft:O=this.margin,this.left=T-O,this.top=E-O,new v(this.left,this.top))},c.prototype.updateBounds=function(E){for(var T=t.MAX_VALUE,D=-t.MAX_VALUE,L=t.MAX_VALUE,O=-t.MAX_VALUE,d,N,s,h,u,p=this.nodes,A=p.length,C=0;Cd&&(T=d),Ds&&(L=s),Od&&(T=d),Ds&&(L=s),O=this.nodes.length){var A=0;D.forEach(function(C){C.owner==E&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},f.exports=c},function(f,m,y){var r,t=y(1);function e(i){r=y(5),this.layout=i,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var i=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(i,o);return this.setRootGraph(g),this.rootGraph},e.prototype.add=function(i,o,g,a,v){if(g==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return i.parent=o,o.child=i,i}else{v=g,a=o,g=i;var n=a.getOwner(),c=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(c!=null&&c.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==c)return g.isInterGraph=!1,n.add(g,a,v);if(g.isInterGraph=!0,g.source=a,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},e.prototype.remove=function(i){if(i instanceof r){var o=i;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());for(var a,v=g.length,n=0;n=i.getRight()?o[0]+=Math.min(i.getX()-e.getX(),e.getRight()-i.getRight()):i.getX()<=e.getX()&&i.getRight()>=e.getRight()&&(o[0]+=Math.min(e.getX()-i.getX(),i.getRight()-e.getRight())),e.getY()<=i.getY()&&e.getBottom()>=i.getBottom()?o[1]+=Math.min(i.getY()-e.getY(),e.getBottom()-i.getBottom()):i.getY()<=e.getY()&&i.getBottom()>=e.getBottom()&&(o[1]+=Math.min(e.getY()-i.getY(),i.getBottom()-e.getBottom()));var v=Math.abs((i.getCenterY()-e.getCenterY())/(i.getCenterX()-e.getCenterX()));i.getCenterY()===e.getCenterY()&&i.getCenterX()===e.getCenterX()&&(v=1);var n=v*o[0],c=o[1]/v;o[0]n)return o[0]=g,o[1]=l,o[2]=v,o[3]=p,!1;if(av)return o[0]=c,o[1]=a,o[2]=h,o[3]=n,!1;if(gv?(o[0]=T,o[1]=D,x=!0):(o[0]=E,o[1]=l,x=!0):U===M&&(g>v?(o[0]=c,o[1]=l,x=!0):(o[0]=L,o[1]=D,x=!0)),-X===M?v>g?(o[2]=u,o[3]=p,_=!0):(o[2]=h,o[3]=s,_=!0):X===M&&(v>g?(o[2]=N,o[3]=s,_=!0):(o[2]=A,o[3]=p,_=!0)),x&&_)return!1;if(g>v?a>n?(G=this.getCardinalDirection(U,M,4),F=this.getCardinalDirection(X,M,2)):(G=this.getCardinalDirection(-U,M,3),F=this.getCardinalDirection(-X,M,1)):a>n?(G=this.getCardinalDirection(-U,M,1),F=this.getCardinalDirection(-X,M,3)):(G=this.getCardinalDirection(U,M,2),F=this.getCardinalDirection(X,M,4)),!x)switch(G){case 1:Y=l,b=g+-d/M,o[0]=b,o[1]=Y;break;case 2:b=L,Y=a+O*M,o[0]=b,o[1]=Y;break;case 3:Y=D,b=g+d/M,o[0]=b,o[1]=Y;break;case 4:b=T,Y=a+-O*M,o[0]=b,o[1]=Y;break}if(!_)switch(F){case 1:H=s,k=v+-R/M,o[2]=k,o[3]=H;break;case 2:k=A,H=n+C*M,o[2]=k,o[3]=H;break;case 3:H=p,k=v+R/M,o[2]=k,o[3]=H;break;case 4:k=u,H=n+-C*M,o[2]=k,o[3]=H;break}}return!1},t.getCardinalDirection=function(e,i,o){return e>i?o:1+o%4},t.getIntersection=function(e,i,o,g){if(g==null)return this.getIntersection2(e,i,o);var a=e.x,v=e.y,n=i.x,c=i.y,l=o.x,E=o.y,T=g.x,D=g.y,L=void 0,O=void 0,d=void 0,N=void 0,s=void 0,h=void 0,u=void 0,p=void 0,A=void 0;return d=c-v,s=a-n,u=n*v-a*c,N=D-E,h=l-T,p=T*E-l*D,A=d*h-N*s,A===0?null:(L=(s*p-h*u)/A,O=(N*u-d*p)/A,new r(L,O))},t.angleOfVector=function(e,i,o,g){var a=void 0;return e!==o?(a=Math.atan((g-i)/(o-e)),o0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},f.exports=r},function(f,m,y){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,f.exports=r},function(f,m,y){var r=function(){function a(v,n){for(var c=0;c"u"?"undefined":r(e);return e==null||i!="object"&&i!="function"},f.exports=t},function(f,m,y){function r(l){if(Array.isArray(l)){for(var E=0,T=Array(l.length);E0&&E;){for(d.push(s[0]);d.length>0&&E;){var h=d[0];d.splice(0,1),O.add(h);for(var u=h.getEdges(),L=0;L-1&&s.splice(R,1)}O=new Set,N=new Map}}return l},c.prototype.createDummyNodesForBendpoints=function(l){for(var E=[],T=l.source,D=this.graphManager.calcLowestCommonAncestor(l.source,l.target),L=0;L0){for(var D=this.edgeToDummyNodes.get(T),L=0;L=0&&E.splice(p,1);var A=N.getNeighborsList();A.forEach(function(x){if(T.indexOf(x)<0){var _=D.get(x),U=_-1;U==1&&h.push(x),D.set(x,U)}})}T=T.concat(h),(E.length==1||E.length==2)&&(L=!0,O=E[0])}return O},c.prototype.setGraphManager=function(l){this.graphManager=l},f.exports=c},function(f,m,y){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},f.exports=r},function(f,m,y){var r=y(4);function t(e,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(e){this.lworldExtX=e},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(e){this.lworldExtY=e},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},t.prototype.transformX=function(e){var i=0,o=this.lworldExtX;return o!=0&&(i=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/o),i},t.prototype.transformY=function(e){var i=0,o=this.lworldExtY;return o!=0&&(i=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/o),i},t.prototype.inverseTransformX=function(e){var i=0,o=this.ldeviceExtX;return o!=0&&(i=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/o),i},t.prototype.inverseTransformY=function(e){var i=0,o=this.ldeviceExtY;return o!=0&&(i=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/o),i},t.prototype.inverseTransformPoint=function(e){var i=new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y));return i},f.exports=t},function(f,m,y){function r(n){if(Array.isArray(n)){for(var c=0,l=Array(n.length);ce.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),c,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,E,T,D,L=this.getAllNodes(),O;if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),O=new Set,l=0;ld||O>d)&&(n.gravitationForceX=-this.gravityConstant*T,n.gravitationForceY=-this.gravityConstant*D)):(d=c.getEstimatedSize()*this.compoundGravityRangeFactor,(L>d||O>d)&&(n.gravitationForceX=-this.gravityConstant*T*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},a.prototype.isConverged=function(){var n,c=!1;return this.totalIterations>this.maxIterations/3&&(c=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement=L.length||d>=L[0].length)){for(var N=0;Na}}]),o}();f.exports=i},function(f,m,y){var r=function(){function i(o,g){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;t(this,i),this.sequence1=o,this.sequence2=g,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=n,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var c=0;c=0;o--){var g=this.listeners[o];g.event===e&&g.callback===i&&this.listeners.splice(o,1)}},t.emit=function(e,i){for(var o=0;og.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,a){for(var v=this.getChild().getNodes(),n,c=0;c0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},d.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),h=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(h),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},d.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),h={},u=0;u1){var x;for(x=0;xp&&(p=Math.floor(R.y)),C=Math.floor(R.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(n.WORLD_CENTER_X-R.x/2,n.WORLD_CENTER_Y-R.y/2))},d.radialLayout=function(s,h,u){var p=Math.max(this.maxDiagonalInTree(s),a.DEFAULT_RADIAL_SEPARATION);d.branchRadialLayout(h,null,0,359,0,p);var A=L.calculateBounds(s),C=new O;C.setDeviceOrgX(A.getMinX()),C.setDeviceOrgY(A.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var R=0;R1;){var H=k[0];k.splice(0,1);var P=M.indexOf(H);P>=0&&M.splice(P,1),b--,G--}h!=null?Y=(M.indexOf(k[0])+1)%b:Y=0;for(var B=Math.abs(p-u)/G,$=Y;F!=G;$=++$%b){var K=M[$].getOtherEnd(s);if(K!=h){var Q=(u+F*B)%360,J=(Q+B)%360;d.branchRadialLayout(K,s,Q,J,A+C,C),F++}}},d.maxDiagonalInTree=function(s){for(var h=T.MIN_VALUE,u=0;uh&&(h=A)}return h},d.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},d.prototype.groupZeroDegreeMembers=function(){var s=this,h={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),A=0;A"u"&&(h[x]=[]),h[x]=h[x].concat(C)}Object.keys(h).forEach(function(_){if(h[_].length>1){var U="DummyCompound_"+_;s.memberGroups[U]=h[_];var X=h[_][0].getParent(),M=new o(s.graphManager);M.id=U,M.paddingLeft=X.paddingLeft||0,M.paddingRight=X.paddingRight||0,M.paddingBottom=X.paddingBottom||0,M.paddingTop=X.paddingTop||0,s.idToDummyNode[U]=M;var G=s.getGraphManager().add(s.newGraph(),M),F=X.getChild();F.add(M);for(var b=0;b=0;s--){var h=this.compoundOrder[s],u=h.id,p=h.paddingLeft,A=h.paddingTop;this.adjustLocations(this.tiledMemberPack[u],h.rect.x,h.rect.y,p,A)}},d.prototype.repopulateZeroDegreeMembers=function(){var s=this,h=this.tiledZeroDegreePack;Object.keys(h).forEach(function(u){var p=s.idToDummyNode[u],A=p.paddingLeft,C=p.paddingTop;s.adjustLocations(h[u],p.rect.x,p.rect.y,A,C)})},d.prototype.getToBeTiled=function(s){var h=s.id;if(this.toBeTiled[h]!=null)return this.toBeTiled[h];var u=s.getChild();if(u==null)return this.toBeTiled[h]=!1,!1;for(var p=u.getNodes(),A=0;A0)return this.toBeTiled[h]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[h]=!1,!1}return this.toBeTiled[h]=!0,!0},d.prototype.getNodeDegree=function(s){s.id;for(var h=s.getEdges(),u=0,p=0;p_&&(_=X.rect.height)}u+=_+s.verticalPadding}},d.prototype.tileCompoundMembers=function(s,h){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var A=h[p];u.tiledMemberPack[p]=u.tileNodes(s[p],A.paddingLeft+A.paddingRight),A.rect.width=u.tiledMemberPack[p].width,A.rect.height=u.tiledMemberPack[p].height})},d.prototype.tileNodes=function(s,h){var u=a.TILING_PADDING_VERTICAL,p=a.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:h,verticalPadding:u,horizontalPadding:p};s.sort(function(x,_){return x.rect.width*x.rect.height>_.rect.width*_.rect.height?-1:x.rect.width*x.rect.height<_.rect.width*_.rect.height?1:0});for(var C=0;C0&&(R+=s.horizontalPadding),s.rowWidth[u]=R,s.width0&&(x+=s.verticalPadding);var _=0;x>s.rowHeight[u]&&(_=s.rowHeight[u],s.rowHeight[u]=x,_=s.rowHeight[u]-_),s.height+=_,s.rows[u].push(h)},d.prototype.getShortestRowIndex=function(s){for(var h=-1,u=Number.MAX_VALUE,p=0;pu&&(h=p,u=s.rowWidth[p]);return h},d.prototype.canAddHorizontal=function(s,h,u){var p=this.getShortestRowIndex(s);if(p<0)return!0;var A=s.rowWidth[p];if(A+s.horizontalPadding+h<=s.width)return!0;var C=0;s.rowHeight[p]0&&(C=u+s.verticalPadding-s.rowHeight[p]);var R;s.width-A>=h+s.horizontalPadding?R=(s.height+C)/(A+h+s.horizontalPadding):R=(s.height+C)/s.width,C=u+s.verticalPadding;var x;return s.widthC&&h!=u){p.splice(-1,1),s.rows[u].push(A),s.rowWidth[h]=s.rowWidth[h]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,x=0;xR&&(R=p[x].height);h>0&&(R+=s.verticalPadding);var _=s.rowHeight[h]+s.rowHeight[u];s.rowHeight[h]=R,s.rowHeight[u]0)for(var F=A;F<=C;F++)G[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(C0)for(var F=R;F<=x;F++)G[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var b=T.MAX_VALUE,Y,k,H=0;H0){var x;x=O.getGraphManager().add(O.newGraph(),u),this.processChildrenList(x,h,O)}}},l.prototype.stop=function(){return this.stopped=!0,this};var T=function(L){L("layout","cose-bilkent",l)};typeof cytoscape<"u"&&T(cytoscape),m.exports=T}])})})(dt);var St=dt.exports;const Gt=xt(St);var st=function(){var I=S(function(O,d,N,s){for(N=N||{},s=O.length;s--;N[O[s]]=d);return N},"o"),w=[1,4],f=[1,13],m=[1,12],y=[1,15],r=[1,16],t=[1,20],e=[1,19],i=[6,7,8],o=[1,26],g=[1,24],a=[1,25],v=[6,7,11],n=[1,6,13,15,16,19,22],c=[1,33],l=[1,34],E=[1,6,7,11,13,15,16,19,22],T={trace:S(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:S(function(d,N,s,h,u,p,A){var C=p.length-1;switch(u){case 6:case 7:return h;case 8:h.getLogger().trace("Stop NL ");break;case 9:h.getLogger().trace("Stop EOF ");break;case 11:h.getLogger().trace("Stop NL2 ");break;case 12:h.getLogger().trace("Stop EOF2 ");break;case 15:h.getLogger().info("Node: ",p[C].id),h.addNode(p[C-1].length,p[C].id,p[C].descr,p[C].type);break;case 16:h.getLogger().trace("Icon: ",p[C]),h.decorateNode({icon:p[C]});break;case 17:case 21:h.decorateNode({class:p[C]});break;case 18:h.getLogger().trace("SPACELIST");break;case 19:h.getLogger().trace("Node: ",p[C].id),h.addNode(0,p[C].id,p[C].descr,p[C].type);break;case 20:h.decorateNode({icon:p[C]});break;case 25:h.getLogger().trace("node found ..",p[C-2]),this.$={id:p[C-1],descr:p[C-1],type:h.getType(p[C-2],p[C])};break;case 26:this.$={id:p[C],descr:p[C],type:h.nodeType.DEFAULT};break;case 27:h.getLogger().trace("node found ..",p[C-3]),this.$={id:p[C-3],descr:p[C-1],type:h.getType(p[C-2],p[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:w},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:w},{6:f,7:[1,10],9:9,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(i,[2,3]),{1:[2,2]},I(i,[2,4]),I(i,[2,5]),{1:[2,6],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:f,9:22,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:o,7:g,10:23,11:a},I(v,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:t,22:e}),I(v,[2,18]),I(v,[2,19]),I(v,[2,20]),I(v,[2,21]),I(v,[2,23]),I(v,[2,24]),I(v,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:g,10:32,11:a},{1:[2,7],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(n,[2,14],{7:c,11:l}),I(E,[2,8]),I(E,[2,9]),I(E,[2,10]),I(v,[2,15]),I(v,[2,16]),I(v,[2,17]),{20:[1,35]},{21:[1,36]},I(n,[2,13],{7:c,11:l}),I(E,[2,11]),I(E,[2,12]),{21:[1,37]},I(v,[2,25]),I(v,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:S(function(d,N){if(N.recoverable)this.trace(d);else{var s=new Error(d);throw s.hash=N,s}},"parseError"),parse:S(function(d){var N=this,s=[0],h=[],u=[null],p=[],A=this.table,C="",R=0,x=0,_=2,U=1,X=p.slice.call(arguments,1),M=Object.create(this.lexer),G={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(G.yy[F]=this.yy[F]);M.setInput(d,G.yy),G.yy.lexer=M,G.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var b=M.yylloc;p.push(b);var Y=M.options&&M.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function k(V){s.length=s.length-2*V,u.length=u.length-V,p.length=p.length-V}S(k,"popStack");function H(){var V;return V=h.pop()||M.lex()||U,typeof V!="number"&&(V instanceof Array&&(h=V,V=h.pop()),V=N.symbols_[V]||V),V}S(H,"lex");for(var P,B,$,K,Q={},J,j,gt,q;;){if(B=s[s.length-1],this.defaultActions[B]?$=this.defaultActions[B]:((P===null||typeof P>"u")&&(P=H()),$=A[B]&&A[B][P]),typeof $>"u"||!$.length||!$[0]){var rt="";q=[];for(J in A[B])this.terminals_[J]&&J>_&&q.push("'"+this.terminals_[J]+"'");M.showPosition?rt="Parse error on line "+(R+1)+`: +import{_ as S,l as z,j as Nt,aj as Dt,O as mt,d as at,G as Ot,V as At,B as tt,i as et,W as It,X as Ct,Y as Rt}from"./sidepanel.js";import{c as pt}from"./c-cytoscape.esm.YXkLVt_w.js";import{a as ot,g as xt}from"./c-App.BSmD8r3A.js";var dt={exports:{}},it={exports:{}},nt={exports:{}},ut;function Mt(){return ut||(ut=1,function(I,w){(function(m,y){I.exports=y()})(ot,function(){return function(f){var m={};function y(r){if(m[r])return m[r].exports;var t=m[r]={i:r,l:!1,exports:{}};return f[r].call(t.exports,t,t.exports,y),t.l=!0,t.exports}return y.m=f,y.c=m,y.i=function(r){return r},y.d=function(r,t,e){y.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},y.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return y.d(t,"a",t),t},y.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},y.p="",y(y.s=26)}([function(f,m,y){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,f.exports=r},function(f,m,y){var r=y(2),t=y(8),e=y(9);function i(g,a,v){r.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=a}i.prototype=Object.create(r.prototype);for(var o in r)i[o]=r[o];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,a){for(var v=this.getOtherEnd(g),n=a.getGraphManager().getRoot();;){if(v.getOwner()==a)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},f.exports=i},function(f,m,y){function r(t){this.vGraphObject=t}f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(13),i=y(0),o=y(16),g=y(4);function a(n,c,l,E){l==null&&E==null&&(E=c),r.call(this,E),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=E,this.edges=[],this.graphManager=n,l!=null&&c!=null?this.rect=new e(c.x,c.y,l.width,l.height):this.rect=new e}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(n){this.rect.width=n},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(n){this.rect.height=n},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(n,c){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=c.width,this.rect.height=c.height},a.prototype.setCenter=function(n,c){this.rect.x=n-this.rect.width/2,this.rect.y=c-this.rect.height/2},a.prototype.setLocation=function(n,c){this.rect.x=n,this.rect.y=c},a.prototype.moveBy=function(n,c){this.rect.x+=n,this.rect.y+=c},a.prototype.getEdgeListToNode=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(E.target==n){if(E.source!=l)throw"Incorrect edge source!";c.push(E)}}),c},a.prototype.getEdgesBetween=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(!(E.source==l||E.target==l))throw"Incorrect edge source and/or target";(E.target==n||E.source==n)&&c.push(E)}),c},a.prototype.getNeighborsList=function(){var n=new Set,c=this;return c.edges.forEach(function(l){if(l.source==c)n.add(l.target);else{if(l.target!=c)throw"Incorrect incidency!";n.add(l.source)}}),n},a.prototype.withChildren=function(){var n=new Set,c,l;if(n.add(this),this.child!=null)for(var E=this.child.getNodes(),T=0;Tc&&(this.rect.x-=(this.labelWidth-c)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(n){var c=this.rect.x;c>i.WORLD_BOUNDARY?c=i.WORLD_BOUNDARY:c<-i.WORLD_BOUNDARY&&(c=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var E=new g(c,l),T=n.inverseTransformPoint(E);this.setLocation(T.x,T.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=a},function(f,m,y){function r(t,e){t==null&&e==null?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(0),i=y(6),o=y(3),g=y(1),a=y(13),v=y(12),n=y(11);function c(E,T,D){r.call(this,D),this.estimatedSize=t.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=E,T!=null&&T instanceof i?this.graphManager=T:T!=null&&T instanceof Layout&&(this.graphManager=T.graphManager)}c.prototype=Object.create(r.prototype);for(var l in r)c[l]=r[l];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(E,T,D){if(T==null&&D==null){var L=E;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(L)>-1)throw"Node already in graph!";return L.owner=this,this.getNodes().push(L),L}else{var O=E;if(!(this.getNodes().indexOf(T)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(T.owner==D.owner&&T.owner==this))throw"Both owners must be this graph!";return T.owner!=D.owner?null:(O.source=T,O.target=D,O.isInterGraph=!1,this.getEdges().push(O),T.edges.push(O),D!=T&&D.edges.push(O),O)}},c.prototype.remove=function(E){var T=E;if(E instanceof o){if(T==null)throw"Node is null!";if(!(T.owner!=null&&T.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=T.edges.slice(),L,O=D.length,d=0;d-1&&h>-1))throw"Source and/or target doesn't know this edge!";L.source.edges.splice(s,1),L.target!=L.source&&L.target.edges.splice(h,1);var N=L.source.owner.getEdges().indexOf(L);if(N==-1)throw"Not in owner's edge list!";L.source.owner.getEdges().splice(N,1)}},c.prototype.updateLeftTop=function(){for(var E=t.MAX_VALUE,T=t.MAX_VALUE,D,L,O,d=this.getNodes(),N=d.length,s=0;sD&&(E=D),T>L&&(T=L)}return E==t.MAX_VALUE?null:(d[0].getParent().paddingLeft!=null?O=d[0].getParent().paddingLeft:O=this.margin,this.left=T-O,this.top=E-O,new v(this.left,this.top))},c.prototype.updateBounds=function(E){for(var T=t.MAX_VALUE,D=-t.MAX_VALUE,L=t.MAX_VALUE,O=-t.MAX_VALUE,d,N,s,h,u,p=this.nodes,A=p.length,C=0;Cd&&(T=d),Ds&&(L=s),Od&&(T=d),Ds&&(L=s),O=this.nodes.length){var A=0;D.forEach(function(C){C.owner==E&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},f.exports=c},function(f,m,y){var r,t=y(1);function e(i){r=y(5),this.layout=i,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var i=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(i,o);return this.setRootGraph(g),this.rootGraph},e.prototype.add=function(i,o,g,a,v){if(g==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return i.parent=o,o.child=i,i}else{v=g,a=o,g=i;var n=a.getOwner(),c=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(c!=null&&c.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==c)return g.isInterGraph=!1,n.add(g,a,v);if(g.isInterGraph=!0,g.source=a,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},e.prototype.remove=function(i){if(i instanceof r){var o=i;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());for(var a,v=g.length,n=0;n=i.getRight()?o[0]+=Math.min(i.getX()-e.getX(),e.getRight()-i.getRight()):i.getX()<=e.getX()&&i.getRight()>=e.getRight()&&(o[0]+=Math.min(e.getX()-i.getX(),i.getRight()-e.getRight())),e.getY()<=i.getY()&&e.getBottom()>=i.getBottom()?o[1]+=Math.min(i.getY()-e.getY(),e.getBottom()-i.getBottom()):i.getY()<=e.getY()&&i.getBottom()>=e.getBottom()&&(o[1]+=Math.min(e.getY()-i.getY(),i.getBottom()-e.getBottom()));var v=Math.abs((i.getCenterY()-e.getCenterY())/(i.getCenterX()-e.getCenterX()));i.getCenterY()===e.getCenterY()&&i.getCenterX()===e.getCenterX()&&(v=1);var n=v*o[0],c=o[1]/v;o[0]n)return o[0]=g,o[1]=l,o[2]=v,o[3]=p,!1;if(av)return o[0]=c,o[1]=a,o[2]=h,o[3]=n,!1;if(gv?(o[0]=T,o[1]=D,x=!0):(o[0]=E,o[1]=l,x=!0):U===M&&(g>v?(o[0]=c,o[1]=l,x=!0):(o[0]=L,o[1]=D,x=!0)),-X===M?v>g?(o[2]=u,o[3]=p,_=!0):(o[2]=h,o[3]=s,_=!0):X===M&&(v>g?(o[2]=N,o[3]=s,_=!0):(o[2]=A,o[3]=p,_=!0)),x&&_)return!1;if(g>v?a>n?(G=this.getCardinalDirection(U,M,4),F=this.getCardinalDirection(X,M,2)):(G=this.getCardinalDirection(-U,M,3),F=this.getCardinalDirection(-X,M,1)):a>n?(G=this.getCardinalDirection(-U,M,1),F=this.getCardinalDirection(-X,M,3)):(G=this.getCardinalDirection(U,M,2),F=this.getCardinalDirection(X,M,4)),!x)switch(G){case 1:Y=l,b=g+-d/M,o[0]=b,o[1]=Y;break;case 2:b=L,Y=a+O*M,o[0]=b,o[1]=Y;break;case 3:Y=D,b=g+d/M,o[0]=b,o[1]=Y;break;case 4:b=T,Y=a+-O*M,o[0]=b,o[1]=Y;break}if(!_)switch(F){case 1:H=s,k=v+-R/M,o[2]=k,o[3]=H;break;case 2:k=A,H=n+C*M,o[2]=k,o[3]=H;break;case 3:H=p,k=v+R/M,o[2]=k,o[3]=H;break;case 4:k=u,H=n+-C*M,o[2]=k,o[3]=H;break}}return!1},t.getCardinalDirection=function(e,i,o){return e>i?o:1+o%4},t.getIntersection=function(e,i,o,g){if(g==null)return this.getIntersection2(e,i,o);var a=e.x,v=e.y,n=i.x,c=i.y,l=o.x,E=o.y,T=g.x,D=g.y,L=void 0,O=void 0,d=void 0,N=void 0,s=void 0,h=void 0,u=void 0,p=void 0,A=void 0;return d=c-v,s=a-n,u=n*v-a*c,N=D-E,h=l-T,p=T*E-l*D,A=d*h-N*s,A===0?null:(L=(s*p-h*u)/A,O=(N*u-d*p)/A,new r(L,O))},t.angleOfVector=function(e,i,o,g){var a=void 0;return e!==o?(a=Math.atan((g-i)/(o-e)),o0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},f.exports=r},function(f,m,y){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,f.exports=r},function(f,m,y){var r=function(){function a(v,n){for(var c=0;c"u"?"undefined":r(e);return e==null||i!="object"&&i!="function"},f.exports=t},function(f,m,y){function r(l){if(Array.isArray(l)){for(var E=0,T=Array(l.length);E0&&E;){for(d.push(s[0]);d.length>0&&E;){var h=d[0];d.splice(0,1),O.add(h);for(var u=h.getEdges(),L=0;L-1&&s.splice(R,1)}O=new Set,N=new Map}}return l},c.prototype.createDummyNodesForBendpoints=function(l){for(var E=[],T=l.source,D=this.graphManager.calcLowestCommonAncestor(l.source,l.target),L=0;L0){for(var D=this.edgeToDummyNodes.get(T),L=0;L=0&&E.splice(p,1);var A=N.getNeighborsList();A.forEach(function(x){if(T.indexOf(x)<0){var _=D.get(x),U=_-1;U==1&&h.push(x),D.set(x,U)}})}T=T.concat(h),(E.length==1||E.length==2)&&(L=!0,O=E[0])}return O},c.prototype.setGraphManager=function(l){this.graphManager=l},f.exports=c},function(f,m,y){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},f.exports=r},function(f,m,y){var r=y(4);function t(e,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(e){this.lworldExtX=e},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(e){this.lworldExtY=e},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},t.prototype.transformX=function(e){var i=0,o=this.lworldExtX;return o!=0&&(i=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/o),i},t.prototype.transformY=function(e){var i=0,o=this.lworldExtY;return o!=0&&(i=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/o),i},t.prototype.inverseTransformX=function(e){var i=0,o=this.ldeviceExtX;return o!=0&&(i=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/o),i},t.prototype.inverseTransformY=function(e){var i=0,o=this.ldeviceExtY;return o!=0&&(i=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/o),i},t.prototype.inverseTransformPoint=function(e){var i=new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y));return i},f.exports=t},function(f,m,y){function r(n){if(Array.isArray(n)){for(var c=0,l=Array(n.length);ce.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),c,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,E,T,D,L=this.getAllNodes(),O;if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),O=new Set,l=0;ld||O>d)&&(n.gravitationForceX=-this.gravityConstant*T,n.gravitationForceY=-this.gravityConstant*D)):(d=c.getEstimatedSize()*this.compoundGravityRangeFactor,(L>d||O>d)&&(n.gravitationForceX=-this.gravityConstant*T*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},a.prototype.isConverged=function(){var n,c=!1;return this.totalIterations>this.maxIterations/3&&(c=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement=L.length||d>=L[0].length)){for(var N=0;Na}}]),o}();f.exports=i},function(f,m,y){var r=function(){function i(o,g){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;t(this,i),this.sequence1=o,this.sequence2=g,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=n,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var c=0;c=0;o--){var g=this.listeners[o];g.event===e&&g.callback===i&&this.listeners.splice(o,1)}},t.emit=function(e,i){for(var o=0;og.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,a){for(var v=this.getChild().getNodes(),n,c=0;c0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},d.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),h=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(h),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},d.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),h={},u=0;u1){var x;for(x=0;xp&&(p=Math.floor(R.y)),C=Math.floor(R.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(n.WORLD_CENTER_X-R.x/2,n.WORLD_CENTER_Y-R.y/2))},d.radialLayout=function(s,h,u){var p=Math.max(this.maxDiagonalInTree(s),a.DEFAULT_RADIAL_SEPARATION);d.branchRadialLayout(h,null,0,359,0,p);var A=L.calculateBounds(s),C=new O;C.setDeviceOrgX(A.getMinX()),C.setDeviceOrgY(A.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var R=0;R1;){var H=k[0];k.splice(0,1);var P=M.indexOf(H);P>=0&&M.splice(P,1),b--,G--}h!=null?Y=(M.indexOf(k[0])+1)%b:Y=0;for(var B=Math.abs(p-u)/G,$=Y;F!=G;$=++$%b){var K=M[$].getOtherEnd(s);if(K!=h){var Q=(u+F*B)%360,J=(Q+B)%360;d.branchRadialLayout(K,s,Q,J,A+C,C),F++}}},d.maxDiagonalInTree=function(s){for(var h=T.MIN_VALUE,u=0;uh&&(h=A)}return h},d.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},d.prototype.groupZeroDegreeMembers=function(){var s=this,h={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),A=0;A"u"&&(h[x]=[]),h[x]=h[x].concat(C)}Object.keys(h).forEach(function(_){if(h[_].length>1){var U="DummyCompound_"+_;s.memberGroups[U]=h[_];var X=h[_][0].getParent(),M=new o(s.graphManager);M.id=U,M.paddingLeft=X.paddingLeft||0,M.paddingRight=X.paddingRight||0,M.paddingBottom=X.paddingBottom||0,M.paddingTop=X.paddingTop||0,s.idToDummyNode[U]=M;var G=s.getGraphManager().add(s.newGraph(),M),F=X.getChild();F.add(M);for(var b=0;b=0;s--){var h=this.compoundOrder[s],u=h.id,p=h.paddingLeft,A=h.paddingTop;this.adjustLocations(this.tiledMemberPack[u],h.rect.x,h.rect.y,p,A)}},d.prototype.repopulateZeroDegreeMembers=function(){var s=this,h=this.tiledZeroDegreePack;Object.keys(h).forEach(function(u){var p=s.idToDummyNode[u],A=p.paddingLeft,C=p.paddingTop;s.adjustLocations(h[u],p.rect.x,p.rect.y,A,C)})},d.prototype.getToBeTiled=function(s){var h=s.id;if(this.toBeTiled[h]!=null)return this.toBeTiled[h];var u=s.getChild();if(u==null)return this.toBeTiled[h]=!1,!1;for(var p=u.getNodes(),A=0;A0)return this.toBeTiled[h]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[h]=!1,!1}return this.toBeTiled[h]=!0,!0},d.prototype.getNodeDegree=function(s){s.id;for(var h=s.getEdges(),u=0,p=0;p_&&(_=X.rect.height)}u+=_+s.verticalPadding}},d.prototype.tileCompoundMembers=function(s,h){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var A=h[p];u.tiledMemberPack[p]=u.tileNodes(s[p],A.paddingLeft+A.paddingRight),A.rect.width=u.tiledMemberPack[p].width,A.rect.height=u.tiledMemberPack[p].height})},d.prototype.tileNodes=function(s,h){var u=a.TILING_PADDING_VERTICAL,p=a.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:h,verticalPadding:u,horizontalPadding:p};s.sort(function(x,_){return x.rect.width*x.rect.height>_.rect.width*_.rect.height?-1:x.rect.width*x.rect.height<_.rect.width*_.rect.height?1:0});for(var C=0;C0&&(R+=s.horizontalPadding),s.rowWidth[u]=R,s.width0&&(x+=s.verticalPadding);var _=0;x>s.rowHeight[u]&&(_=s.rowHeight[u],s.rowHeight[u]=x,_=s.rowHeight[u]-_),s.height+=_,s.rows[u].push(h)},d.prototype.getShortestRowIndex=function(s){for(var h=-1,u=Number.MAX_VALUE,p=0;pu&&(h=p,u=s.rowWidth[p]);return h},d.prototype.canAddHorizontal=function(s,h,u){var p=this.getShortestRowIndex(s);if(p<0)return!0;var A=s.rowWidth[p];if(A+s.horizontalPadding+h<=s.width)return!0;var C=0;s.rowHeight[p]0&&(C=u+s.verticalPadding-s.rowHeight[p]);var R;s.width-A>=h+s.horizontalPadding?R=(s.height+C)/(A+h+s.horizontalPadding):R=(s.height+C)/s.width,C=u+s.verticalPadding;var x;return s.widthC&&h!=u){p.splice(-1,1),s.rows[u].push(A),s.rowWidth[h]=s.rowWidth[h]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,x=0;xR&&(R=p[x].height);h>0&&(R+=s.verticalPadding);var _=s.rowHeight[h]+s.rowHeight[u];s.rowHeight[h]=R,s.rowHeight[u]0)for(var F=A;F<=C;F++)G[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(C0)for(var F=R;F<=x;F++)G[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var b=T.MAX_VALUE,Y,k,H=0;H0){var x;x=O.getGraphManager().add(O.newGraph(),u),this.processChildrenList(x,h,O)}}},l.prototype.stop=function(){return this.stopped=!0,this};var T=function(L){L("layout","cose-bilkent",l)};typeof cytoscape<"u"&&T(cytoscape),m.exports=T}])})})(dt);var St=dt.exports;const Gt=xt(St);var st=function(){var I=S(function(O,d,N,s){for(N=N||{},s=O.length;s--;N[O[s]]=d);return N},"o"),w=[1,4],f=[1,13],m=[1,12],y=[1,15],r=[1,16],t=[1,20],e=[1,19],i=[6,7,8],o=[1,26],g=[1,24],a=[1,25],v=[6,7,11],n=[1,6,13,15,16,19,22],c=[1,33],l=[1,34],E=[1,6,7,11,13,15,16,19,22],T={trace:S(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:S(function(d,N,s,h,u,p,A){var C=p.length-1;switch(u){case 6:case 7:return h;case 8:h.getLogger().trace("Stop NL ");break;case 9:h.getLogger().trace("Stop EOF ");break;case 11:h.getLogger().trace("Stop NL2 ");break;case 12:h.getLogger().trace("Stop EOF2 ");break;case 15:h.getLogger().info("Node: ",p[C].id),h.addNode(p[C-1].length,p[C].id,p[C].descr,p[C].type);break;case 16:h.getLogger().trace("Icon: ",p[C]),h.decorateNode({icon:p[C]});break;case 17:case 21:h.decorateNode({class:p[C]});break;case 18:h.getLogger().trace("SPACELIST");break;case 19:h.getLogger().trace("Node: ",p[C].id),h.addNode(0,p[C].id,p[C].descr,p[C].type);break;case 20:h.decorateNode({icon:p[C]});break;case 25:h.getLogger().trace("node found ..",p[C-2]),this.$={id:p[C-1],descr:p[C-1],type:h.getType(p[C-2],p[C])};break;case 26:this.$={id:p[C],descr:p[C],type:h.nodeType.DEFAULT};break;case 27:h.getLogger().trace("node found ..",p[C-3]),this.$={id:p[C-3],descr:p[C-1],type:h.getType(p[C-2],p[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:w},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:w},{6:f,7:[1,10],9:9,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(i,[2,3]),{1:[2,2]},I(i,[2,4]),I(i,[2,5]),{1:[2,6],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:f,9:22,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:o,7:g,10:23,11:a},I(v,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:t,22:e}),I(v,[2,18]),I(v,[2,19]),I(v,[2,20]),I(v,[2,21]),I(v,[2,23]),I(v,[2,24]),I(v,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:g,10:32,11:a},{1:[2,7],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(n,[2,14],{7:c,11:l}),I(E,[2,8]),I(E,[2,9]),I(E,[2,10]),I(v,[2,15]),I(v,[2,16]),I(v,[2,17]),{20:[1,35]},{21:[1,36]},I(n,[2,13],{7:c,11:l}),I(E,[2,11]),I(E,[2,12]),{21:[1,37]},I(v,[2,25]),I(v,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:S(function(d,N){if(N.recoverable)this.trace(d);else{var s=new Error(d);throw s.hash=N,s}},"parseError"),parse:S(function(d){var N=this,s=[0],h=[],u=[null],p=[],A=this.table,C="",R=0,x=0,_=2,U=1,X=p.slice.call(arguments,1),M=Object.create(this.lexer),G={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(G.yy[F]=this.yy[F]);M.setInput(d,G.yy),G.yy.lexer=M,G.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var b=M.yylloc;p.push(b);var Y=M.options&&M.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function k(V){s.length=s.length-2*V,u.length=u.length-V,p.length=p.length-V}S(k,"popStack");function H(){var V;return V=h.pop()||M.lex()||U,typeof V!="number"&&(V instanceof Array&&(h=V,V=h.pop()),V=N.symbols_[V]||V),V}S(H,"lex");for(var P,B,$,K,Q={},J,j,gt,q;;){if(B=s[s.length-1],this.defaultActions[B]?$=this.defaultActions[B]:((P===null||typeof P>"u")&&(P=H()),$=A[B]&&A[B][P]),typeof $>"u"||!$.length||!$[0]){var rt="";q=[];for(J in A[B])this.terminals_[J]&&J>_&&q.push("'"+this.terminals_[J]+"'");M.showPosition?rt="Parse error on line "+(R+1)+`: `+M.showPosition()+` Expecting `+q.join(", ")+", got '"+(this.terminals_[P]||P)+"'":rt="Parse error on line "+(R+1)+": Unexpected "+(P==U?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(rt,{text:M.match,token:this.terminals_[P]||P,line:M.yylineno,loc:b,expected:q})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+P);switch($[0]){case 1:s.push(P),u.push(M.yytext),p.push(M.yylloc),s.push($[1]),P=null,x=M.yyleng,C=M.yytext,R=M.yylineno,b=M.yylloc;break;case 2:if(j=this.productions_[$[1]][1],Q.$=u[u.length-j],Q._$={first_line:p[p.length-(j||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(j||1)].first_column,last_column:p[p.length-1].last_column},Y&&(Q._$.range=[p[p.length-(j||1)].range[0],p[p.length-1].range[1]]),K=this.performAction.apply(Q,[C,x,R,G.yy,$[1],u,p].concat(X)),typeof K<"u")return K;j&&(s=s.slice(0,-1*j*2),u=u.slice(0,-1*j),p=p.slice(0,-1*j)),s.push(this.productions_[$[1]][0]),u.push(Q.$),p.push(Q._$),gt=A[s[s.length-2]][s[s.length-1]],s.push(gt);break;case 3:return!0}}return!0},"parse")},D=function(){var O={EOF:1,parseError:S(function(N,s){if(this.yy.parser)this.yy.parser.parseError(N,s);else throw new Error(N)},"parseError"),setInput:S(function(d,N){return this.yy=N||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:S(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var N=d.match(/(?:\r\n?|\n).*/g);return N?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:S(function(d){var N=d.length,s=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===h.length?this.yylloc.first_column:0)+h[h.length-s.length].length-s[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:S(function(){return this._more=!0,this},"more"),reject:S(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:S(function(d){this.unput(this.match.slice(d))},"less"),pastInput:S(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:S(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:S(function(){var d=this.pastInput(),N=new Array(d.length+1).join("-");return d+this.upcomingInput()+` diff --git a/dist/c-pieDiagram-BLWKPB35.lIooBhwN.js b/dist/c-pieDiagram-BLWKPB35.CxVsEpHY.js similarity index 98% rename from dist/c-pieDiagram-BLWKPB35.lIooBhwN.js rename to dist/c-pieDiagram-BLWKPB35.CxVsEpHY.js index db12a55..e92884b 100644 --- a/dist/c-pieDiagram-BLWKPB35.lIooBhwN.js +++ b/dist/c-pieDiagram-BLWKPB35.CxVsEpHY.js @@ -1,4 +1,4 @@ -import{p as U}from"./c-chunk-BAOP5US2.D69mMcSi.js";import{aa as y,a2 as z,aF as j,B as q,p as Z,q as H,s as J,g as K,c as Q,b as X,_ as p,l as F,v as Y,d as tt,C as et,G as at,O as rt,k as nt}from"./sidepanel.js";import{p as it}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import{d as P}from"./c-arc.D8ah_K6m.js";import{o as st}from"./c-ordinal.jT623uI2.js";import"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";import"./c-init.Gi6I4Gst.js";function ot(t,a){return at?1:a>=t?0:NaN}function lt(t){return t}function ct(){var t=lt,a=ot,m=null,o=y(0),g=y(z),x=y(0);function i(e){var r,l=(e=j(e)).length,c,A,h=0,u=new Array(l),n=new Array(l),v=+o.apply(this,arguments),w=Math.min(z,Math.max(-z,g.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,x.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r0&&(h+=d);for(a!=null?u.sort(function(S,C){return a(n[S],n[C])}):m!=null&&u.sort(function(S,C){return m(e[S],e[C])}),r=0,A=h?(w-l*$)/h:0;r0?d*A:0)+$,n[c]={data:e[c],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};return n}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:y(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,m=null,i):a},i.sort=function(e){return arguments.length?(m=e,a=null,i):m},i.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:y(+e),i):o},i.endAngle=function(e){return arguments.length?(g=typeof e=="function"?e:y(+e),i):g},i.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:y(+e),i):x},i}var R=q.pie,G={sections:new Map,showData:!1,config:R},b=G.sections,O=G.showData,ut=structuredClone(R),pt=p(()=>structuredClone(ut),"getConfig"),gt=p(()=>{b=new Map,O=G.showData,Y()},"clear"),dt=p(({label:t,value:a})=>{b.has(t)||(b.set(t,a),F.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=p(()=>b,"getSections"),mt=p(t=>{O=t},"setShowData"),ht=p(()=>O,"getShowData"),I={getConfig:pt,clear:gt,setDiagramTitle:Z,getDiagramTitle:H,setAccTitle:J,getAccTitle:K,setAccDescription:Q,getAccDescription:X,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=p((t,a)=>{U(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:p(async t=>{const a=await it("pie",t);F.debug(a),vt(a,I)},"parse")},yt=p(t=>` +import{p as U}from"./c-chunk-BAOP5US2.D69mMcSi.js";import{aa as y,a2 as z,aF as j,B as q,p as Z,q as H,s as J,g as K,c as Q,b as X,_ as p,l as F,v as Y,d as tt,C as et,G as at,O as rt,k as nt}from"./sidepanel.js";import{p as it}from"./c-gitGraph-YCYPL57B.Dz7kBqcO.js";import{d as P}from"./c-arc.D8ah_K6m.js";import{o as st}from"./c-ordinal.jT623uI2.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";import"./c-clone.efIVrz4F.js";import"./c-init.Gi6I4Gst.js";function ot(t,a){return at?1:a>=t?0:NaN}function lt(t){return t}function ct(){var t=lt,a=ot,m=null,o=y(0),g=y(z),x=y(0);function i(e){var r,l=(e=j(e)).length,c,A,h=0,u=new Array(l),n=new Array(l),v=+o.apply(this,arguments),w=Math.min(z,Math.max(-z,g.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,x.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r0&&(h+=d);for(a!=null?u.sort(function(S,C){return a(n[S],n[C])}):m!=null&&u.sort(function(S,C){return m(e[S],e[C])}),r=0,A=h?(w-l*$)/h:0;r0?d*A:0)+$,n[c]={data:e[c],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};return n}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:y(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,m=null,i):a},i.sort=function(e){return arguments.length?(m=e,a=null,i):m},i.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:y(+e),i):o},i.endAngle=function(e){return arguments.length?(g=typeof e=="function"?e:y(+e),i):g},i.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:y(+e),i):x},i}var R=q.pie,G={sections:new Map,showData:!1,config:R},b=G.sections,O=G.showData,ut=structuredClone(R),pt=p(()=>structuredClone(ut),"getConfig"),gt=p(()=>{b=new Map,O=G.showData,Y()},"clear"),dt=p(({label:t,value:a})=>{b.has(t)||(b.set(t,a),F.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=p(()=>b,"getSections"),mt=p(t=>{O=t},"setShowData"),ht=p(()=>O,"getShowData"),I={getConfig:pt,clear:gt,setDiagramTitle:Z,getDiagramTitle:H,setAccTitle:J,getAccTitle:K,setAccDescription:Q,getAccDescription:X,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=p((t,a)=>{U(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:p(async t=>{const a=await it("pie",t);F.debug(a),vt(a,I)},"parse")},yt=p(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; diff --git a/dist/c-quadrantDiagram-QXWEEFXS.DgfFRL-6.js b/dist/c-quadrantDiagram-QXWEEFXS.CSlBfacx.js similarity index 99% rename from dist/c-quadrantDiagram-QXWEEFXS.DgfFRL-6.js rename to dist/c-quadrantDiagram-QXWEEFXS.CSlBfacx.js index c748bae..6508014 100644 --- a/dist/c-quadrantDiagram-QXWEEFXS.DgfFRL-6.js +++ b/dist/c-quadrantDiagram-QXWEEFXS.CSlBfacx.js @@ -1,4 +1,4 @@ -import{_ as o,I as _e,B as D,l as At,d as wt,i as Ae,q as ie,s as ke,g as Fe,p as Pe,b as ve,c as Ce,v as Le,j as zt,k as Ee}from"./sidepanel.js";import{l as ee}from"./c-linear.CFszUfD_.js";import"./c-App.BTybbOiv.js";import"./c-init.Gi6I4Gst.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],A=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],O=[1,14],Y=[1,23],G=[1,18],yt=[1,19],Tt=[1,20],dt=[1,21],Ft=[1,22],ut=[1,24],xt=[1,25],ft=[1,26],gt=[1,27],i=[1,28],Bt=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],H=[1,62],X=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Rt=[1,65],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],$=[1,91],tt=[1,92],et=[1,99],it=[1,93],at=[1,96],nt=[1,94],st=[1,95],rt=[1,97],ot=[1,98],Pt=[1,102],Kt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,_,e,pt){var s=e.length-1;switch(_){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,A,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(y,[2,34]),{27:45,55:c,56:h,57:p},t(a,[2,37]),t(a,A,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:d,5:T,10:q,12:m,13:b,14:x,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,21:63},t(a,[2,53],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(a,[2,56],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(a,[2,57],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,58],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,59],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,60],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(a,[2,52],{58:31,43:83,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,55],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:88,23:87},t(I,[2,24]),t(a,[2,51],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,54],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,47],{22:88,16:89,23:100,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,101]},t(a,[2,29],{10:Pt}),t(Kt,[2,27],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:88,16:89,23:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:105},t(R,[2,26]),t(a,[2,50],{10:Pt}),t(Kt,[2,28],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],_=[null],e=[],pt=this.table,s="",mt=0,Zt=0,qe=2,Jt=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);E.setInput(r,K.yy),K.yy.lexer=E,K.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Lt=E.yylloc;e.push(Lt);var be=E.options&&E.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(B){g.length=g.length-2*B,_.length=_.length-B,e.length=e.length-B}o(Se,"popStack");function $t(){var B;return B=f.pop()||E.lex()||Jt,typeof B!="number"&&(B instanceof Array&&(f=B,B=f.pop()),B=l.symbols_[B]||B),B}o($t,"lex");for(var w,Z,N,Et,lt={},bt,M,te,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?N=this.defaultActions[Z]:((w===null||typeof w>"u")&&(w=$t()),N=pt[Z]&&pt[Z][w]),typeof N>"u"||!N.length||!N[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");E.showPosition?Dt="Parse error on line "+(mt+1)+`: +import{_ as o,I as _e,B as D,l as At,d as wt,i as Ae,q as ie,s as ke,g as Fe,p as Pe,b as ve,c as Ce,v as Le,j as zt,k as Ee}from"./sidepanel.js";import{l as ee}from"./c-linear.CFszUfD_.js";import"./c-App.BSmD8r3A.js";import"./c-init.Gi6I4Gst.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],A=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],O=[1,14],Y=[1,23],G=[1,18],yt=[1,19],Tt=[1,20],dt=[1,21],Ft=[1,22],ut=[1,24],xt=[1,25],ft=[1,26],gt=[1,27],i=[1,28],Bt=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],H=[1,62],X=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Rt=[1,65],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],$=[1,91],tt=[1,92],et=[1,99],it=[1,93],at=[1,96],nt=[1,94],st=[1,95],rt=[1,97],ot=[1,98],Pt=[1,102],Kt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,_,e,pt){var s=e.length-1;switch(_){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,A,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(y,[2,34]),{27:45,55:c,56:h,57:p},t(a,[2,37]),t(a,A,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:d,5:T,10:q,12:m,13:b,14:x,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,21:63},t(a,[2,53],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(a,[2,56],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(a,[2,57],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,58],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,59],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,60],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(a,[2,52],{58:31,43:83,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,55],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:88,23:87},t(I,[2,24]),t(a,[2,51],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,54],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,47],{22:88,16:89,23:100,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,101]},t(a,[2,29],{10:Pt}),t(Kt,[2,27],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:88,16:89,23:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:105},t(R,[2,26]),t(a,[2,50],{10:Pt}),t(Kt,[2,28],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],_=[null],e=[],pt=this.table,s="",mt=0,Zt=0,qe=2,Jt=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);E.setInput(r,K.yy),K.yy.lexer=E,K.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Lt=E.yylloc;e.push(Lt);var be=E.options&&E.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(B){g.length=g.length-2*B,_.length=_.length-B,e.length=e.length-B}o(Se,"popStack");function $t(){var B;return B=f.pop()||E.lex()||Jt,typeof B!="number"&&(B instanceof Array&&(f=B,B=f.pop()),B=l.symbols_[B]||B),B}o($t,"lex");for(var w,Z,N,Et,lt={},bt,M,te,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?N=this.defaultActions[Z]:((w===null||typeof w>"u")&&(w=$t()),N=pt[Z]&&pt[Z][w]),typeof N>"u"||!N.length||!N[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");E.showPosition?Dt="Parse error on line "+(mt+1)+`: `+E.showPosition()+` Expecting `+St.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(w==Jt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Dt,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:Lt,expected:St})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+w);switch(N[0]){case 1:g.push(w),_.push(E.yytext),e.push(E.yylloc),g.push(N[1]),w=null,Zt=E.yyleng,s=E.yytext,mt=E.yylineno,Lt=E.yylloc;break;case 2:if(M=this.productions_[N[1]][1],lt.$=_[_.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},be&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Zt,mt,K.yy,N[1],_,e].concat(me)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),_=_.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[N[1]][0]),_.push(lt.$),e.push(lt._$),te=pt[g[g.length-2]][g[g.length-1]],g.push(te);break;case 3:return!0}}return!0},"parse")},Te=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/dist/c-requirementDiagram-XAUNFCZY.CocmbrW5.js b/dist/c-requirementDiagram-XAUNFCZY.Dmavh9i-.js similarity index 99% rename from dist/c-requirementDiagram-XAUNFCZY.CocmbrW5.js rename to dist/c-requirementDiagram-XAUNFCZY.Dmavh9i-.js index e017653..835f914 100644 --- a/dist/c-requirementDiagram-XAUNFCZY.CocmbrW5.js +++ b/dist/c-requirementDiagram-XAUNFCZY.Dmavh9i-.js @@ -1,4 +1,4 @@ -import{_ as r,d as ve,s as Fe,g as De,c as Pe,b as Ye,l as xe,v as Ue,j as ce,k as Be,K as Qe,e as Te}from"./sidepanel.js";import{G as He}from"./c-graph.LrzKEURD.js";import{l as We}from"./c-layout.DW-oGeTY.js";import"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";var he=function(){var e=r(function($,i,a,l){for(a=a||{},l=$.length;l--;a[$[l]]=i);return a},"o"),t=[1,3],c=[1,4],d=[1,5],u=[1,6],p=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],y=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],I=[1,25],b=[1,26],w=[1,27],q=[1,20],v=[1,28],A=[1,29],F=[62,63],pe=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],fe=[1,47],ye=[1,48],_e=[1,49],ge=[1,50],Ee=[1,51],Re=[1,52],me=[1,53],O=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],j=[1,69],X=[1,70],J=[1,67],Z=[1,68],S=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:r(function(i,a,l,n,f,s,K){var E=s.length-1;switch(f){case 4:this.$=s[E].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[E].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[E-3],s[E-4]);break;case 14:n.setNewReqId(s[E-2]);break;case 15:n.setNewReqText(s[E-2]);break;case 16:n.setNewReqRisk(s[E-2]);break;case 17:n.setNewReqVerifyMethod(s[E-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[E-3]);break;case 34:n.setNewElementType(s[E-2]);break;case 35:n.setNewElementDocRef(s[E-2]);break;case 38:n.addRelationship(s[E-2],s[E],s[E-4]);break;case 39:n.addRelationship(s[E-2],s[E-4],s[E]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:t,9:c,11:d,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:c,11:d,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(p,[2,6]),{3:12,4:2,6:t,9:c,11:d,13:u},{1:[2,2]},{4:17,5:y,7:13,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},e(p,[2,4]),e(p,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:y,7:31,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:32,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:33,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:34,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:35,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(pe,[2,49]),e(pe,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{52:54,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:66,47:J,49:Z},{23:71,62:v,63:A},{23:72,62:v,63:A},e(S,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(S,[2,19]),e(S,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:X,46:80,47:J,49:Z},e(S,[2,37]),e(S,[2,38]),e(S,[2,39]),{23:81,62:v,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(S,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(S,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:110,47:J,49:Z},{5:j,30:X,46:111,47:J,49:Z},e(S,[2,14]),e(S,[2,15]),e(S,[2,16]),e(S,[2,17]),e(S,[2,34]),e(S,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:r(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:r(function(i){var a=this,l=[0],n=[],f=[null],s=[],K=this.table,E="",te=0,Ie=0,Le=2,be=1,Oe=s.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);m.setInput(i,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var ae=m.yylloc;s.push(ae);var Ce=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(N){l.length=l.length-2*N,f.length=f.length-N,s.length=s.length-N}r(Me,"popStack");function Se(){var N;return N=n.pop()||m.lex()||be,typeof N!="number"&&(N instanceof Array&&(n=N,N=n.pop()),N=a.symbols_[N]||N),N}r(Se,"lex");for(var k,M,x,le,H={},ie,V,ke,re;;){if(M=l[l.length-1],this.defaultActions[M]?x=this.defaultActions[M]:((k===null||typeof k>"u")&&(k=Se()),x=K[M]&&K[M][k]),typeof x>"u"||!x.length||!x[0]){var oe="";re=[];for(ie in K[M])this.terminals_[ie]&&ie>Le&&re.push("'"+this.terminals_[ie]+"'");m.showPosition?oe="Parse error on line "+(te+1)+`: +import{_ as r,d as ve,s as Fe,g as De,c as Pe,b as Ye,l as xe,v as Ue,j as ce,k as Be,K as Qe,e as Te}from"./sidepanel.js";import{G as He}from"./c-graph.LrzKEURD.js";import{l as We}from"./c-layout.DW-oGeTY.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";var he=function(){var e=r(function($,i,a,l){for(a=a||{},l=$.length;l--;a[$[l]]=i);return a},"o"),t=[1,3],c=[1,4],d=[1,5],u=[1,6],p=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],y=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],I=[1,25],b=[1,26],w=[1,27],q=[1,20],v=[1,28],A=[1,29],F=[62,63],pe=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],fe=[1,47],ye=[1,48],_e=[1,49],ge=[1,50],Ee=[1,51],Re=[1,52],me=[1,53],O=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],j=[1,69],X=[1,70],J=[1,67],Z=[1,68],S=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:r(function(i,a,l,n,f,s,K){var E=s.length-1;switch(f){case 4:this.$=s[E].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[E].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[E-3],s[E-4]);break;case 14:n.setNewReqId(s[E-2]);break;case 15:n.setNewReqText(s[E-2]);break;case 16:n.setNewReqRisk(s[E-2]);break;case 17:n.setNewReqVerifyMethod(s[E-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[E-3]);break;case 34:n.setNewElementType(s[E-2]);break;case 35:n.setNewElementDocRef(s[E-2]);break;case 38:n.addRelationship(s[E-2],s[E],s[E-4]);break;case 39:n.addRelationship(s[E-2],s[E-4],s[E]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:t,9:c,11:d,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:c,11:d,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(p,[2,6]),{3:12,4:2,6:t,9:c,11:d,13:u},{1:[2,2]},{4:17,5:y,7:13,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},e(p,[2,4]),e(p,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:y,7:31,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:32,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:33,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:34,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:35,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(pe,[2,49]),e(pe,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{52:54,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:66,47:J,49:Z},{23:71,62:v,63:A},{23:72,62:v,63:A},e(S,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(S,[2,19]),e(S,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:X,46:80,47:J,49:Z},e(S,[2,37]),e(S,[2,38]),e(S,[2,39]),{23:81,62:v,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(S,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(S,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:110,47:J,49:Z},{5:j,30:X,46:111,47:J,49:Z},e(S,[2,14]),e(S,[2,15]),e(S,[2,16]),e(S,[2,17]),e(S,[2,34]),e(S,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:r(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:r(function(i){var a=this,l=[0],n=[],f=[null],s=[],K=this.table,E="",te=0,Ie=0,Le=2,be=1,Oe=s.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);m.setInput(i,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var ae=m.yylloc;s.push(ae);var Ce=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(N){l.length=l.length-2*N,f.length=f.length-N,s.length=s.length-N}r(Me,"popStack");function Se(){var N;return N=n.pop()||m.lex()||be,typeof N!="number"&&(N instanceof Array&&(n=N,N=n.pop()),N=a.symbols_[N]||N),N}r(Se,"lex");for(var k,M,x,le,H={},ie,V,ke,re;;){if(M=l[l.length-1],this.defaultActions[M]?x=this.defaultActions[M]:((k===null||typeof k>"u")&&(k=Se()),x=K[M]&&K[M][k]),typeof x>"u"||!x.length||!x[0]){var oe="";re=[];for(ie in K[M])this.terminals_[ie]&&ie>Le&&re.push("'"+this.terminals_[ie]+"'");m.showPosition?oe="Parse error on line "+(te+1)+`: `+m.showPosition()+` Expecting `+re.join(", ")+", got '"+(this.terminals_[k]||k)+"'":oe="Parse error on line "+(te+1)+": Unexpected "+(k==be?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(oe,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:ae,expected:re})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+k);switch(x[0]){case 1:l.push(k),f.push(m.yytext),s.push(m.yylloc),l.push(x[1]),k=null,Ie=m.yyleng,E=m.yytext,te=m.yylineno,ae=m.yylloc;break;case 2:if(V=this.productions_[x[1]][1],H.$=f[f.length-V],H._$={first_line:s[s.length-(V||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(V||1)].first_column,last_column:s[s.length-1].last_column},Ce&&(H._$.range=[s[s.length-(V||1)].range[0],s[s.length-1].range[1]]),le=this.performAction.apply(H,[E,Ie,te,C.yy,x[1],f,s].concat(Oe)),typeof le<"u")return le;V&&(l=l.slice(0,-1*V*2),f=f.slice(0,-1*V),s=s.slice(0,-1*V)),l.push(this.productions_[x[1]][0]),f.push(H.$),s.push(H._$),ke=K[l[l.length-2]][l[l.length-1]],l.push(ke);break;case 3:return!0}}return!0},"parse")},$e=function(){var $={EOF:1,parseError:r(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:r(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:r(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===n.length?this.yylloc.first_column:0)+n[n.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(i){this.unput(this.match.slice(i))},"less"),pastInput:r(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/dist/c-sankeyDiagram-LVV36NHA.BhdocKg_.js b/dist/c-sankeyDiagram-LVV36NHA.qNSVVhZy.js similarity index 99% rename from dist/c-sankeyDiagram-LVV36NHA.BhdocKg_.js rename to dist/c-sankeyDiagram-LVV36NHA.qNSVVhZy.js index ddab1f3..cc203ff 100644 --- a/dist/c-sankeyDiagram-LVV36NHA.BhdocKg_.js +++ b/dist/c-sankeyDiagram-LVV36NHA.qNSVVhZy.js @@ -1,4 +1,4 @@ -import{_ as m,d as lt,g as _t,s as xt,b as vt,c as bt,q as wt,p as St,v as Lt,e as Et,o as At,j as H,V as Tt}from"./sidepanel.js";import{o as Mt}from"./c-ordinal.jT623uI2.js";import"./c-App.BTybbOiv.js";import"./c-init.Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function jt(t){return t.index}function zt(t){return t.nodes}function $t(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,p,_=jt,s=mt,o,l,x=zt,v=$t,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=p=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:X(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function j({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+p)/(u.length+1);for(let r=0;ru.length)-1)),R(f);for(let u=0;u0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,V=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,V+=q}if(!(V>0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,F=1e-6,Rt=rt-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,p=this._y1,_=i-t,s=a-e,o=d-t,l=p-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>F)if(!(Math.abs(l*_-s*o)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-p,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),j=C/N,R=C/T;Math.abs(j-1)>F&&(this._+="L"+(t+j*o)+","+(e+j*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var p=i*Math.cos(a),_=i*Math.sin(a),s=t+p,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>F||Math.abs(this._y1-o)>F)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>F&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Ft(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Vt,h=Ft,d=null;function p(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return p.source=function(_){return arguments.length?(e=_,p):e},p.target=function(_){return arguments.length?(i=_,p):i},p.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),p):a},p.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),p):h},p.context=function(_){return arguments.length?(d=_??null,p):d},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=m(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:m(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:m(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:m(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,j=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}m(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||j,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}m(E,"lex");for(var A,z,I,n,f={},u,c,r,k;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=b[z]&&b[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[z])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`: +import{_ as m,d as lt,g as _t,s as xt,b as vt,c as bt,q as wt,p as St,v as Lt,e as Et,o as At,j as H,V as Tt}from"./sidepanel.js";import{o as Mt}from"./c-ordinal.jT623uI2.js";import"./c-App.BSmD8r3A.js";import"./c-init.Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function jt(t){return t.index}function zt(t){return t.nodes}function $t(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,p,_=jt,s=mt,o,l,x=zt,v=$t,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=p=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:X(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function j({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+p)/(u.length+1);for(let r=0;ru.length)-1)),R(f);for(let u=0;u0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,V=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,V+=q}if(!(V>0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,F=1e-6,Rt=rt-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,p=this._y1,_=i-t,s=a-e,o=d-t,l=p-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>F)if(!(Math.abs(l*_-s*o)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-p,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),j=C/N,R=C/T;Math.abs(j-1)>F&&(this._+="L"+(t+j*o)+","+(e+j*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var p=i*Math.cos(a),_=i*Math.sin(a),s=t+p,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>F||Math.abs(this._y1-o)>F)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>F&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Ft(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Vt,h=Ft,d=null;function p(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return p.source=function(_){return arguments.length?(e=_,p):e},p.target=function(_){return arguments.length?(i=_,p):i},p.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),p):a},p.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),p):h},p.context=function(_){return arguments.length?(d=_??null,p):d},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=m(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:m(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:m(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:m(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,j=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}m(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||j,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}m(E,"lex");for(var A,z,I,n,f={},u,c,r,k;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=b[z]&&b[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[z])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`: `+S.showPosition()+` Expecting `+k.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==j?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:k})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(I[0]){case 1:l.push(A),v.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=v[v.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],v,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),v=v.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),v.push(f.$),y.push(f._$),r=b[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},d=function(){var _={EOF:1,parseError:m(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:m(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:m(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(s){this.unput(this.match.slice(s))},"less"),pastInput:m(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/dist/c-sequenceDiagram-D25TJ2OB.BXnlbrZo.js b/dist/c-sequenceDiagram-D25TJ2OB.BxqiZ84W.js similarity index 99% rename from dist/c-sequenceDiagram-D25TJ2OB.BXnlbrZo.js rename to dist/c-sequenceDiagram-D25TJ2OB.BxqiZ84W.js index 50c8d99..911d303 100644 --- a/dist/c-sequenceDiagram-D25TJ2OB.BXnlbrZo.js +++ b/dist/c-sequenceDiagram-D25TJ2OB.BxqiZ84W.js @@ -1,4 +1,4 @@ -import{g as St,a as Kt,d as Se,b as Me,c as Re,e as De}from"./c-chunk-VCFP4HPQ.P-Zh3yiJ.js";import{I as Ce}from"./c-chunk-RGXPSUNZ.DGZknDz3.js";import{_ as d,g as Oe,q as Be,p as Ve,d as at,s as se,c as Ye,b as Fe,e as _,L as lt,M as wt,u as F,l as J,v as We,i as Mt,a as qe,j as kt,k as ze,m as ae,N as ie,D as Ft,O as ne,Z as He}from"./sidepanel.js";import"./c-App.BTybbOiv.js";var Wt=function(){var t=d(function(pt,I,L,A){for(L=L||{},A=pt.length;A--;L[pt[A]]=I);return L},"o"),e=[1,2],o=[1,3],r=[1,4],a=[2,4],i=[1,9],c=[1,11],h=[1,13],p=[1,14],s=[1,16],f=[1,17],E=[1,18],g=[1,24],T=[1,25],m=[1,26],w=[1,27],k=[1,28],V=[1,29],M=[1,30],Y=[1,31],C=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],q=[1,39],R=[1,41],Q=[1,42],G=[1,43],j=[1,44],rt=[1,45],S=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],it=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],N=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Jt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],dt=[1,122],Ct={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:d(function(I,L,A,b,D,l,mt){var u=l.length-1;switch(D){case 3:return b.apply(l[u]),l[u];case 4:case 9:this.$=[];break;case 5:case 10:l[u-1].push(l[u]),this.$=l[u-1];break;case 6:case 7:case 11:case 12:this.$=l[u];break;case 8:case 13:this.$=[];break;case 15:l[u].type="createParticipant",this.$=l[u];break;case 16:l[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[u-2])}),l[u-1].push({type:"boxEnd",boxText:l[u-2]}),this.$=l[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-2]),sequenceIndexStep:Number(l[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-1].actor};break;case 29:b.setDiagramTitle(l[u].substring(6)),this.$=l[u].substring(6);break;case 30:b.setDiagramTitle(l[u].substring(7)),this.$=l[u].substring(7);break;case 31:this.$=l[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[u].trim(),b.setAccDescription(this.$);break;case 34:l[u-1].unshift({type:"loopStart",loopText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.LOOP_START}),l[u-1].push({type:"loopEnd",loopText:l[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[u-1];break;case 35:l[u-1].unshift({type:"rectStart",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_START}),l[u-1].push({type:"rectEnd",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[u-1];break;case 36:l[u-1].unshift({type:"optStart",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_START}),l[u-1].push({type:"optEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[u-1];break;case 37:l[u-1].unshift({type:"altStart",altText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.ALT_START}),l[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[u-1];break;case 38:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 39:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 40:l[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.CRITICAL_START}),l[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[u-1];break;case 41:l[u-1].unshift({type:"breakStart",breakText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_START}),l[u-1].push({type:"breakEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[u-1];break;case 43:this.$=l[u-3].concat([{type:"option",optionText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[u]]);break;case 45:this.$=l[u-3].concat([{type:"and",parText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.PAR_AND},l[u]]);break;case 47:this.$=l[u-3].concat([{type:"else",altText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.ALT_ELSE},l[u]]);break;case 48:l[u-3].draw="participant",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 49:l[u-1].draw="participant",l[u-1].type="addParticipant",this.$=l[u-1];break;case 50:l[u-3].draw="actor",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 51:l[u-1].draw="actor",l[u-1].type="addParticipant",this.$=l[u-1];break;case 52:l[u-1].type="destroyParticipant",this.$=l[u-1];break;case 53:this.$=[l[u-1],{type:"addNote",placement:l[u-2],actor:l[u-1].actor,text:l[u]}];break;case 54:l[u-2]=[].concat(l[u-1],l[u-1]).slice(0,2),l[u-2][0]=l[u-2][0].actor,l[u-2][1]=l[u-2][1].actor,this.$=[l[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[u-2].slice(0,2),text:l[u]}];break;case 55:this.$=[l[u-1],{type:"addLinks",actor:l[u-1].actor,text:l[u]}];break;case 56:this.$=[l[u-1],{type:"addALink",actor:l[u-1].actor,text:l[u]}];break;case 57:this.$=[l[u-1],{type:"addProperties",actor:l[u-1].actor,text:l[u]}];break;case 58:this.$=[l[u-1],{type:"addDetails",actor:l[u-1].actor,text:l[u]}];break;case 61:this.$=[l[u-2],l[u]];break;case 62:this.$=l[u];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor}];break;case 66:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-4].actor}];break;case 67:this.$=[l[u-3],l[u-1],{type:"addMessage",from:l[u-3].actor,to:l[u-1].actor,signalType:l[u-2],msg:l[u]}];break;case 68:this.$={type:"addParticipant",actor:l[u]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:o,6:r},{1:[3]},{3:5,4:e,5:o,6:r},{3:6,4:e,5:o,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:K,52:U,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(P,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t($,a,{7:99}),t($,a,{7:100}),t($,a,{7:101}),t(it,a,{40:102,7:103}),t(N,a,{42:104,7:105}),t(N,a,{7:105,42:106}),t(Jt,a,{45:107,7:108}),t($,a,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),t(ot,[2,77]),t(ot,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:dt},{56:123,81:dt},{56:124,81:dt},{56:125,81:dt},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:K,52:U,53:q},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,133],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,134],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,135]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,49:[1,136],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,137]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,48:[1,138],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,47:[1,141],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,142],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:dt},{56:148,81:dt},{56:149,81:dt},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(P,[2,10]),{12:151,50:K,52:U,53:q},t(P,[2,12]),t(P,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:dt},{56:158,81:dt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(P,[2,11]),t(it,a,{7:103,40:160}),t(N,a,{7:105,42:161}),t(Jt,a,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:d(function(I,L){if(L.recoverable)this.trace(I);else{var A=new Error(I);throw A.hash=L,A}},"parseError"),parse:d(function(I){var L=this,A=[0],b=[],D=[null],l=[],mt=this.table,u="",Lt=0,Zt=0,Pe=2,Qt=1,Ae=l.slice.call(arguments,1),W=Object.create(this.lexer),ut={yy:{}};for(var Ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ot)&&(ut.yy[Ot]=this.yy[Ot]);W.setInput(I,ut.yy),ut.yy.lexer=W,ut.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Bt=W.yylloc;l.push(Bt);var ke=W.options&&W.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(tt){A.length=A.length-2*tt,D.length=D.length-tt,l.length=l.length-tt}d(Ne,"popStack");function jt(){var tt;return tt=b.pop()||W.lex()||Qt,typeof tt!="number"&&(tt instanceof Array&&(b=tt,tt=b.pop()),tt=L.symbols_[tt]||tt),tt}d(jt,"lex");for(var X,gt,st,Vt,yt={},Pt,ht,$t,At;;){if(gt=A[A.length-1],this.defaultActions[gt]?st=this.defaultActions[gt]:((X===null||typeof X>"u")&&(X=jt()),st=mt[gt]&&mt[gt][X]),typeof st>"u"||!st.length||!st[0]){var Yt="";At=[];for(Pt in mt[gt])this.terminals_[Pt]&&Pt>Pe&&At.push("'"+this.terminals_[Pt]+"'");W.showPosition?Yt="Parse error on line "+(Lt+1)+`: +import{g as St,a as Kt,d as Se,b as Me,c as Re,e as De}from"./c-chunk-VCFP4HPQ.P-Zh3yiJ.js";import{I as Ce}from"./c-chunk-RGXPSUNZ.DGZknDz3.js";import{_ as d,g as Oe,q as Be,p as Ve,d as at,s as se,c as Ye,b as Fe,e as _,L as lt,M as wt,u as F,l as J,v as We,i as Mt,a as qe,j as kt,k as ze,m as ae,N as ie,D as Ft,O as ne,Z as He}from"./sidepanel.js";import"./c-App.BSmD8r3A.js";var Wt=function(){var t=d(function(pt,I,L,A){for(L=L||{},A=pt.length;A--;L[pt[A]]=I);return L},"o"),e=[1,2],o=[1,3],r=[1,4],a=[2,4],i=[1,9],c=[1,11],h=[1,13],p=[1,14],s=[1,16],f=[1,17],E=[1,18],g=[1,24],T=[1,25],m=[1,26],w=[1,27],k=[1,28],V=[1,29],M=[1,30],Y=[1,31],C=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],q=[1,39],R=[1,41],Q=[1,42],G=[1,43],j=[1,44],rt=[1,45],S=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],it=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],N=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Jt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],dt=[1,122],Ct={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:d(function(I,L,A,b,D,l,mt){var u=l.length-1;switch(D){case 3:return b.apply(l[u]),l[u];case 4:case 9:this.$=[];break;case 5:case 10:l[u-1].push(l[u]),this.$=l[u-1];break;case 6:case 7:case 11:case 12:this.$=l[u];break;case 8:case 13:this.$=[];break;case 15:l[u].type="createParticipant",this.$=l[u];break;case 16:l[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[u-2])}),l[u-1].push({type:"boxEnd",boxText:l[u-2]}),this.$=l[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-2]),sequenceIndexStep:Number(l[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-1].actor};break;case 29:b.setDiagramTitle(l[u].substring(6)),this.$=l[u].substring(6);break;case 30:b.setDiagramTitle(l[u].substring(7)),this.$=l[u].substring(7);break;case 31:this.$=l[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[u].trim(),b.setAccDescription(this.$);break;case 34:l[u-1].unshift({type:"loopStart",loopText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.LOOP_START}),l[u-1].push({type:"loopEnd",loopText:l[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[u-1];break;case 35:l[u-1].unshift({type:"rectStart",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_START}),l[u-1].push({type:"rectEnd",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[u-1];break;case 36:l[u-1].unshift({type:"optStart",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_START}),l[u-1].push({type:"optEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[u-1];break;case 37:l[u-1].unshift({type:"altStart",altText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.ALT_START}),l[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[u-1];break;case 38:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 39:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 40:l[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.CRITICAL_START}),l[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[u-1];break;case 41:l[u-1].unshift({type:"breakStart",breakText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_START}),l[u-1].push({type:"breakEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[u-1];break;case 43:this.$=l[u-3].concat([{type:"option",optionText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[u]]);break;case 45:this.$=l[u-3].concat([{type:"and",parText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.PAR_AND},l[u]]);break;case 47:this.$=l[u-3].concat([{type:"else",altText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.ALT_ELSE},l[u]]);break;case 48:l[u-3].draw="participant",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 49:l[u-1].draw="participant",l[u-1].type="addParticipant",this.$=l[u-1];break;case 50:l[u-3].draw="actor",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 51:l[u-1].draw="actor",l[u-1].type="addParticipant",this.$=l[u-1];break;case 52:l[u-1].type="destroyParticipant",this.$=l[u-1];break;case 53:this.$=[l[u-1],{type:"addNote",placement:l[u-2],actor:l[u-1].actor,text:l[u]}];break;case 54:l[u-2]=[].concat(l[u-1],l[u-1]).slice(0,2),l[u-2][0]=l[u-2][0].actor,l[u-2][1]=l[u-2][1].actor,this.$=[l[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[u-2].slice(0,2),text:l[u]}];break;case 55:this.$=[l[u-1],{type:"addLinks",actor:l[u-1].actor,text:l[u]}];break;case 56:this.$=[l[u-1],{type:"addALink",actor:l[u-1].actor,text:l[u]}];break;case 57:this.$=[l[u-1],{type:"addProperties",actor:l[u-1].actor,text:l[u]}];break;case 58:this.$=[l[u-1],{type:"addDetails",actor:l[u-1].actor,text:l[u]}];break;case 61:this.$=[l[u-2],l[u]];break;case 62:this.$=l[u];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor}];break;case 66:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-4].actor}];break;case 67:this.$=[l[u-3],l[u-1],{type:"addMessage",from:l[u-3].actor,to:l[u-1].actor,signalType:l[u-2],msg:l[u]}];break;case 68:this.$={type:"addParticipant",actor:l[u]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:o,6:r},{1:[3]},{3:5,4:e,5:o,6:r},{3:6,4:e,5:o,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:K,52:U,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(P,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t($,a,{7:99}),t($,a,{7:100}),t($,a,{7:101}),t(it,a,{40:102,7:103}),t(N,a,{42:104,7:105}),t(N,a,{7:105,42:106}),t(Jt,a,{45:107,7:108}),t($,a,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),t(ot,[2,77]),t(ot,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:dt},{56:123,81:dt},{56:124,81:dt},{56:125,81:dt},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:K,52:U,53:q},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,133],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,134],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,135]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,49:[1,136],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,137]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,48:[1,138],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,47:[1,141],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,142],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:dt},{56:148,81:dt},{56:149,81:dt},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(P,[2,10]),{12:151,50:K,52:U,53:q},t(P,[2,12]),t(P,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:dt},{56:158,81:dt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(P,[2,11]),t(it,a,{7:103,40:160}),t(N,a,{7:105,42:161}),t(Jt,a,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:d(function(I,L){if(L.recoverable)this.trace(I);else{var A=new Error(I);throw A.hash=L,A}},"parseError"),parse:d(function(I){var L=this,A=[0],b=[],D=[null],l=[],mt=this.table,u="",Lt=0,Zt=0,Pe=2,Qt=1,Ae=l.slice.call(arguments,1),W=Object.create(this.lexer),ut={yy:{}};for(var Ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ot)&&(ut.yy[Ot]=this.yy[Ot]);W.setInput(I,ut.yy),ut.yy.lexer=W,ut.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Bt=W.yylloc;l.push(Bt);var ke=W.options&&W.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(tt){A.length=A.length-2*tt,D.length=D.length-tt,l.length=l.length-tt}d(Ne,"popStack");function jt(){var tt;return tt=b.pop()||W.lex()||Qt,typeof tt!="number"&&(tt instanceof Array&&(b=tt,tt=b.pop()),tt=L.symbols_[tt]||tt),tt}d(jt,"lex");for(var X,gt,st,Vt,yt={},Pt,ht,$t,At;;){if(gt=A[A.length-1],this.defaultActions[gt]?st=this.defaultActions[gt]:((X===null||typeof X>"u")&&(X=jt()),st=mt[gt]&&mt[gt][X]),typeof st>"u"||!st.length||!st[0]){var Yt="";At=[];for(Pt in mt[gt])this.terminals_[Pt]&&Pt>Pe&&At.push("'"+this.terminals_[Pt]+"'");W.showPosition?Yt="Parse error on line "+(Lt+1)+`: `+W.showPosition()+` Expecting `+At.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Yt="Parse error on line "+(Lt+1)+": Unexpected "+(X==Qt?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Yt,{text:W.match,token:this.terminals_[X]||X,line:W.yylineno,loc:Bt,expected:At})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+X);switch(st[0]){case 1:A.push(X),D.push(W.yytext),l.push(W.yylloc),A.push(st[1]),X=null,Zt=W.yyleng,u=W.yytext,Lt=W.yylineno,Bt=W.yylloc;break;case 2:if(ht=this.productions_[st[1]][1],yt.$=D[D.length-ht],yt._$={first_line:l[l.length-(ht||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ht||1)].first_column,last_column:l[l.length-1].last_column},ke&&(yt._$.range=[l[l.length-(ht||1)].range[0],l[l.length-1].range[1]]),Vt=this.performAction.apply(yt,[u,Zt,Lt,ut.yy,st[1],D,l].concat(Ae)),typeof Vt<"u")return Vt;ht&&(A=A.slice(0,-1*ht*2),D=D.slice(0,-1*ht),l=l.slice(0,-1*ht)),A.push(this.productions_[st[1]][0]),D.push(yt.$),l.push(yt._$),$t=mt[A[A.length-2]][A[A.length-1]],A.push($t);break;case 3:return!0}}return!0},"parse")},Le=function(){var pt={EOF:1,parseError:d(function(L,A){if(this.yy.parser)this.yy.parser.parseError(L,A);else throw new Error(L)},"parseError"),setInput:d(function(I,L){return this.yy=L||this.yy||{},this._input=I,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var L=I.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},"input"),unput:d(function(I){var L=I.length,A=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===b.length?this.yylloc.first_column:0)+b[b.length-A.length].length-A[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(I){this.unput(this.match.slice(I))},"less"),pastInput:d(function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var I=this.pastInput(),L=new Array(I.length+1).join("-");return I+this.upcomingInput()+` diff --git a/dist/c-stateDiagram-GNSP7T6Y.PmTUAwa8.js b/dist/c-stateDiagram-GNSP7T6Y.DWapbDeu.js similarity index 99% rename from dist/c-stateDiagram-GNSP7T6Y.PmTUAwa8.js rename to dist/c-stateDiagram-GNSP7T6Y.DWapbDeu.js index c39cd15..80b1cce 100644 --- a/dist/c-stateDiagram-GNSP7T6Y.PmTUAwa8.js +++ b/dist/c-stateDiagram-GNSP7T6Y.DWapbDeu.js @@ -1 +1 @@ -import{s as W,a as N,b as P}from"./c-chunk-JZAHL7AJ.ab2c-n0N.js";import{_ as u,d as t,j as H,l as S,k as C,e as z,K as U,Q as F,u as O}from"./sidepanel.js";import{G as J}from"./c-graph.LrzKEURD.js";import{l as X}from"./c-layout.DW-oGeTY.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BTybbOiv.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),K=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),Q=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(p,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),c=Math.max(x.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Z=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let c=Math.max(x,p);c===p&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,x>p&&(l=(p-c)/2+o),Math.abs(a-B.x)p&&(l=a-(x-p)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),x<=p&&s.attr("x",a+(c-n)/2-x/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const c=g.append("tspan");if(c.text(x),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&K(n,i),i.type==="default"&&i.descriptions.length>0&&Q(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(F),p=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:x}=O.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",x+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,x+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,x)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",x+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",x-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const p=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,p,a,o);const x=b.padding,c=s.node().getBBox(),l=c.width+x*2,B=c.height+x*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,p)=>{const a=new J({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},wt={parser:W,db:N,renderer:ot,styles:P,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()},"init")};export{wt as diagram}; +import{s as W,a as N,b as P}from"./c-chunk-JZAHL7AJ.ab2c-n0N.js";import{_ as u,d as t,j as H,l as S,k as C,e as z,K as U,Q as F,u as O}from"./sidepanel.js";import{G as J}from"./c-graph.LrzKEURD.js";import{l as X}from"./c-layout.DW-oGeTY.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BSmD8r3A.js";import"./c-_baseUniq.B6F21pIQ.js";import"./c-_basePickBy.DHYc2WzR.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),K=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),Q=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(p,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),c=Math.max(x.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Z=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let c=Math.max(x,p);c===p&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,x>p&&(l=(p-c)/2+o),Math.abs(a-B.x)p&&(l=a-(x-p)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),x<=p&&s.attr("x",a+(c-n)/2-x/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const c=g.append("tspan");if(c.text(x),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&K(n,i),i.type==="default"&&i.descriptions.length>0&&Q(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(F),p=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:x}=O.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",x+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,x+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,x)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",x+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",x-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const p=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,p,a,o);const x=b.padding,c=s.node().getBBox(),l=c.width+x*2,B=c.height+x*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,p)=>{const a=new J({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},wt={parser:W,db:N,renderer:ot,styles:P,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()},"init")};export{wt as diagram}; diff --git a/dist/c-stateDiagram-v2-HP6YRVRG.mlRZ3fPK.js b/dist/c-stateDiagram-v2-HP6YRVRG.DQU7qFf8.js similarity index 81% rename from dist/c-stateDiagram-v2-HP6YRVRG.mlRZ3fPK.js rename to dist/c-stateDiagram-v2-HP6YRVRG.DQU7qFf8.js index 84acb0b..5a144c3 100644 --- a/dist/c-stateDiagram-v2-HP6YRVRG.mlRZ3fPK.js +++ b/dist/c-stateDiagram-v2-HP6YRVRG.DQU7qFf8.js @@ -1 +1 @@ -import{s as t,a as e,c as r,b as s}from"./c-chunk-JZAHL7AJ.ab2c-n0N.js";import{_ as i}from"./sidepanel.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BTybbOiv.js";var _={parser:t,db:e,renderer:r,styles:s,init:i(a=>{a.state||(a.state={}),a.state.arrowMarkerAbsolute=a.arrowMarkerAbsolute,e.clear()},"init")};export{_ as diagram}; +import{s as t,a as e,c as r,b as s}from"./c-chunk-JZAHL7AJ.ab2c-n0N.js";import{_ as i}from"./sidepanel.js";import"./c-chunk-EICJXIV7.DfejhB_s.js";import"./c-App.BSmD8r3A.js";var _={parser:t,db:e,renderer:r,styles:s,init:i(a=>{a.state||(a.state={}),a.state.arrowMarkerAbsolute=a.arrowMarkerAbsolute,e.clear()},"init")};export{_ as diagram}; diff --git a/dist/c-timeline-definition-27KQCCZ3.mVhogevl.js b/dist/c-timeline-definition-27KQCCZ3.DCkZpjUg.js similarity index 99% rename from dist/c-timeline-definition-27KQCCZ3.mVhogevl.js rename to dist/c-timeline-definition-27KQCCZ3.DCkZpjUg.js index 8787e45..c41ba84 100644 --- a/dist/c-timeline-definition-27KQCCZ3.mVhogevl.js +++ b/dist/c-timeline-definition-27KQCCZ3.DCkZpjUg.js @@ -1,4 +1,4 @@ -import{_ as s,T as xt,U as kt,v as vt,j as U,d as _t,l as T,V as bt,W as wt,X as St,Y as Et}from"./sidepanel.js";import{d as nt}from"./c-arc.D8ah_K6m.js";import"./c-App.BTybbOiv.js";var X=function(){var n=s(function(f,i,a,d){for(a=a||{},d=f.length;d--;a[f[d]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],h=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,d,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var d=new Error(i);throw d.hash=a,d}},"parseError"),parse:s(function(i){var a=this,d=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,P=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),E={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(E.yy[b]=this.yy[b]);v.setInput(i,E.yy),E.yy.lexer=v,E.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var L=v.yylloc;o.push(L);var A=v.options&&v.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(I){d.length=d.length-2*I,y.length=y.length-I,o.length=o.length-I}s(R,"popStack");function F(){var I;return I=u.pop()||v.lex()||J,typeof I!="number"&&(I instanceof Array&&(u=I,I=u.pop()),I=a.symbols_[I]||I),I}s(F,"lex");for(var w,C,N,K,V={},j,$,et,G;;){if(C=d[d.length-1],this.defaultActions[C]?N=this.defaultActions[C]:((w===null||typeof w>"u")&&(w=F()),N=S[C]&&S[C][w]),typeof N>"u"||!N.length||!N[0]){var Q="";G=[];for(j in S[C])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+(M+1)+`: +import{_ as s,T as xt,U as kt,v as vt,j as U,d as _t,l as T,V as bt,W as wt,X as St,Y as Et}from"./sidepanel.js";import{d as nt}from"./c-arc.D8ah_K6m.js";import"./c-App.BSmD8r3A.js";var X=function(){var n=s(function(f,i,a,d){for(a=a||{},d=f.length;d--;a[f[d]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],h=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,d,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var d=new Error(i);throw d.hash=a,d}},"parseError"),parse:s(function(i){var a=this,d=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,P=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),E={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(E.yy[b]=this.yy[b]);v.setInput(i,E.yy),E.yy.lexer=v,E.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var L=v.yylloc;o.push(L);var A=v.options&&v.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(I){d.length=d.length-2*I,y.length=y.length-I,o.length=o.length-I}s(R,"popStack");function F(){var I;return I=u.pop()||v.lex()||J,typeof I!="number"&&(I instanceof Array&&(u=I,I=u.pop()),I=a.symbols_[I]||I),I}s(F,"lex");for(var w,C,N,K,V={},j,$,et,G;;){if(C=d[d.length-1],this.defaultActions[C]?N=this.defaultActions[C]:((w===null||typeof w>"u")&&(w=F()),N=S[C]&&S[C][w]),typeof N>"u"||!N.length||!N[0]){var Q="";G=[];for(j in S[C])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+(M+1)+`: `+v.showPosition()+` Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+(M+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:L,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+w);switch(N[0]){case 1:d.push(w),y.push(v.yytext),o.push(v.yylloc),d.push(N[1]),w=null,P=v.yyleng,k=v.yytext,M=v.yylineno,L=v.yylloc;break;case 2:if($=this.productions_[N[1]][1],V.$=y[y.length-$],V._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},A&&(V._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(V,[k,P,M,E.yy,N[1],y,o].concat(O)),typeof K<"u")return K;$&&(d=d.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),d.push(this.productions_[N[1]][0]),y.push(V.$),o.push(V._$),et=S[d[d.length-2]][d[d.length-1]],d.push(et);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:s(function(a,d){if(this.yy.parser)this.yy.parser.parseError(a,d);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,d=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===u.length?this.yylloc.first_column:0)+u[u.length-d.length].length-d[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/dist/c-xychartDiagram-MYLB5AYS.Bk6N2-gY.js b/dist/c-xychartDiagram-MYLB5AYS.CrV2JkJ2.js similarity index 99% rename from dist/c-xychartDiagram-MYLB5AYS.Bk6N2-gY.js rename to dist/c-xychartDiagram-MYLB5AYS.CrV2JkJ2.js index 39b81f9..da8d560 100644 --- a/dist/c-xychartDiagram-MYLB5AYS.Bk6N2-gY.js +++ b/dist/c-xychartDiagram-MYLB5AYS.CrV2JkJ2.js @@ -1,4 +1,4 @@ -import{_ as a,aE as ui,l as Ft,K as Bt,I as gi,D as At,C as Xt,B as xi,i as di,q as Nt,s as pi,g as fi,p as mi,b as yi,c as bi,v as Ai,G as wi,k as Ci}from"./sidepanel.js";import{i as Si}from"./c-init.Gi6I4Gst.js";import{o as _i}from"./c-ordinal.jT623uI2.js";import{l as Wt}from"./c-linear.CFszUfD_.js";import"./c-App.BTybbOiv.js";function ki(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(T.yylloc={});var gt=T.yylloc;r.push(gt);var li=T.options&&T.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ci(L){g.length=g.length-2*L,A.length=A.length-L,r.length=r.length-L}a(ci,"popStack");function Mt(){var L;return L=x.pop()||T.lex()||It,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=c.symbols_[L]||L),L}a(Mt,"lex");for(var P,O,M,xt,z={},at,V,Vt,rt;;){if(O=g[g.length-1],this.defaultActions[O]?M=this.defaultActions[O]:((P===null||typeof P>"u")&&(P=Mt()),M=Z[O]&&Z[O][P]),typeof M>"u"||!M.length||!M[0]){var dt="";rt=[];for(at in Z[O])this.terminals_[at]&&at>oi&&rt.push("'"+this.terminals_[at]+"'");T.showPosition?dt="Parse error on line "+(nt+1)+`: +import{_ as a,aE as ui,l as Ft,K as Bt,I as gi,D as At,C as Xt,B as xi,i as di,q as Nt,s as pi,g as fi,p as mi,b as yi,c as bi,v as Ai,G as wi,k as Ci}from"./sidepanel.js";import{i as Si}from"./c-init.Gi6I4Gst.js";import{o as _i}from"./c-ordinal.jT623uI2.js";import{l as Wt}from"./c-linear.CFszUfD_.js";import"./c-App.BSmD8r3A.js";function ki(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(T.yylloc={});var gt=T.yylloc;r.push(gt);var li=T.options&&T.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ci(L){g.length=g.length-2*L,A.length=A.length-L,r.length=r.length-L}a(ci,"popStack");function Mt(){var L;return L=x.pop()||T.lex()||It,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=c.symbols_[L]||L),L}a(Mt,"lex");for(var P,O,M,xt,z={},at,V,Vt,rt;;){if(O=g[g.length-1],this.defaultActions[O]?M=this.defaultActions[O]:((P===null||typeof P>"u")&&(P=Mt()),M=Z[O]&&Z[O][P]),typeof M>"u"||!M.length||!M[0]){var dt="";rt=[];for(at in Z[O])this.terminals_[at]&&at>oi&&rt.push("'"+this.terminals_[at]+"'");T.showPosition?dt="Parse error on line "+(nt+1)+`: `+T.showPosition()+` Expecting `+rt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":dt="Parse error on line "+(nt+1)+": Unexpected "+(P==It?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(dt,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:gt,expected:rt})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+P);switch(M[0]){case 1:g.push(P),A.push(T.yytext),r.push(T.yylloc),g.push(M[1]),P=null,Et=T.yyleng,d=T.yytext,nt=T.yylineno,gt=T.yylloc;break;case 2:if(V=this.productions_[M[1]][1],z.$=A[A.length-V],z._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},li&&(z._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),xt=this.performAction.apply(z,[d,Et,nt,W.yy,M[1],A,r].concat(hi)),typeof xt<"u")return xt;V&&(g=g.slice(0,-1*V*2),A=A.slice(0,-1*V),r=r.slice(0,-1*V)),g.push(this.productions_[M[1]][0]),A.push(z.$),r.push(z._$),Vt=Z[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},ri=function(){var B={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+` diff --git a/dist/docagram.png b/dist/docagram.png new file mode 100644 index 0000000..85d22d6 Binary files /dev/null and b/dist/docagram.png differ diff --git a/dist/icon128.png b/dist/icon128.png new file mode 100644 index 0000000..eaf8dd5 Binary files /dev/null and b/dist/icon128.png differ diff --git a/dist/icon48.png b/dist/icon48.png new file mode 100644 index 0000000..697b9f9 Binary files /dev/null and b/dist/icon48.png differ diff --git a/dist/logo192.png b/dist/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/dist/logo192.png and /dev/null differ diff --git a/dist/logo512.png b/dist/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/dist/logo512.png and /dev/null differ diff --git a/dist/manifest.json b/dist/manifest.json index a904dab..f68bc40 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -22,5 +22,9 @@ "matches": [""], "js": ["content.js"] } - ] + ], + "icons": { + "48": "icon48.png", + "128": "icon128.png" + } } diff --git a/dist/options.html b/dist/options.html index 4f927aa..aad41b0 100644 --- a/dist/options.html +++ b/dist/options.html @@ -4,7 +4,7 @@ Side Panel - + diff --git a/dist/options.js b/dist/options.js index ea0fcea..7b47575 100644 --- a/dist/options.js +++ b/dist/options.js @@ -1 +1 @@ -import{c as o,j as e,R as c,O as n}from"./c-App.BTybbOiv.js";const t=document.createElement("div");t.className="container";document.body.appendChild(t);const s=o.createRoot(t);s.render(e.jsx(c.StrictMode,{children:e.jsx(n,{})})); +import{c as o,j as e,R as c,O as n}from"./c-App.BSmD8r3A.js";const t=document.createElement("div");t.className="container";document.body.appendChild(t);const s=o.createRoot(t);s.render(e.jsx(c.StrictMode,{children:e.jsx(n,{})})); diff --git a/dist/sidepanel.html b/dist/sidepanel.html index 27d7bc0..27f3902 100644 --- a/dist/sidepanel.html +++ b/dist/sidepanel.html @@ -4,7 +4,7 @@ Side Panel - + diff --git a/dist/sidepanel.js b/dist/sidepanel.js index 361587d..72b26ae 100644 --- a/dist/sidepanel.js +++ b/dist/sidepanel.js @@ -1,21 +1,41 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["c-dagre-SWNTG5WE.DWXwo0oD.js","c-graph.LrzKEURD.js","c-_baseUniq.B6F21pIQ.js","c-layout.DW-oGeTY.js","c-_basePickBy.DHYc2WzR.js","c-clone.efIVrz4F.js","c-App.BTybbOiv.js","App.css","c-c4Diagram-GPMAACGM.C32fG0np.js","c-chunk-VCFP4HPQ.P-Zh3yiJ.js","c-flowDiagram-TSWR6T2D.Ck6ffKlE.js","c-chunk-EICJXIV7.DfejhB_s.js","c-channel.DwG3ORrW.js","c-erDiagram-WO52GFNT.LFoF0V0f.js","c-gitGraphDiagram-5C7YHVU6.DJo58C4j.js","c-chunk-BAOP5US2.D69mMcSi.js","c-chunk-RGXPSUNZ.DGZknDz3.js","c-gitGraph-YCYPL57B.Dz7kBqcO.js","c-ganttDiagram-FAOCOTIY.R6hBUM4X.js","c-linear.CFszUfD_.js","c-init.Gi6I4Gst.js","c-infoDiagram-P5D6MX3V.DdIyuX89.js","c-pieDiagram-BLWKPB35.lIooBhwN.js","c-arc.D8ah_K6m.js","c-ordinal.jT623uI2.js","c-quadrantDiagram-QXWEEFXS.DgfFRL-6.js","c-xychartDiagram-MYLB5AYS.Bk6N2-gY.js","c-requirementDiagram-XAUNFCZY.CocmbrW5.js","c-sequenceDiagram-D25TJ2OB.BXnlbrZo.js","c-classDiagram-FEGYTUDG.T4l6upN8.js","c-chunk-CXDZ2C6O.BlaZOBCJ.js","c-classDiagram-v2-R65JCUOM.T4l6upN8.js","c-stateDiagram-GNSP7T6Y.PmTUAwa8.js","c-chunk-JZAHL7AJ.ab2c-n0N.js","c-stateDiagram-v2-HP6YRVRG.mlRZ3fPK.js","c-journeyDiagram-UIGPPNLY.B4jif9w_.js","c-timeline-definition-27KQCCZ3.mVhogevl.js","c-mindmap-definition-R7LC4OIY.CBpJ3Pex.js","c-cytoscape.esm.YXkLVt_w.js","c-kanban-definition-KMT3NSR2.uT1oEA61.js","c-sankeyDiagram-LVV36NHA.BhdocKg_.js","c-diagram-NZMEDLQF.DLTa1rZz.js","c-blockDiagram-XN6IQ5JY.Bftekuos.js","c-architectureDiagram-AYX4OTIS.DGoAurYb.js"])))=>i.map(i=>d[i]); -var Eb=Object.defineProperty;var vh=t=>{throw TypeError(t)};var Ab=(t,e,r)=>e in t?Eb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var At=(t,e,r)=>Ab(t,typeof e!="symbol"?e+"":e,r),Lb=(t,e,r)=>e.has(t)||vh("Cannot "+r);var Sh=(t,e,r)=>e.has(t)?vh("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r);var Jn=(t,e,r)=>(Lb(t,e,"access private method"),r);import{D as Io,r as X,j as W,b as Sr,d as Bb,a as $o,g as Jf,u as Mb,e as tp,f as ep,h as Ul,P as Br,i as Ze,k as Fb,l as Ib,m as rp,n as $b,C as Ks,o as Zs,B as ia,L as Th,c as Rb,R as Db}from"./c-App.BTybbOiv.js";class Pb{constructor(){this.ai=self.ai,this.model=null,this.summarizeSession=null,this.isInitialized=!1}async checkSupport(){var e,r,n,i;try{const a=await((r=(e=self.ai)==null?void 0:e.languageModel)==null?void 0:r.capabilities()),s=await((i=(n=self.ai)==null?void 0:n.summarizer)==null?void 0:i.capabilities());return{hasLanguageModel:(a==null?void 0:a.available)!=="no",hasSummarizer:(s==null?void 0:s.available)!=="no",languageModelStatus:(a==null?void 0:a.available)||"no",summarizerStatus:(s==null?void 0:s.available)||"no"}}catch(a){return console.error("Error checking AI capabilities:",a),{hasLanguageModel:!1,hasSummarizer:!1,languageModelStatus:"no",summarizerStatus:"no"}}}async initialize(){try{const r=(await chrome.storage.sync.get("docagramOptions")).docagramOptions||Io;await this.destroy();const n=await this.checkSupport();if(!n.hasLanguageModel)throw new Error("Language model not available on this device");return this.model=await this.ai.languageModel.create({temperature:r.temperature,topK:r.topK}),n.hasSummarizer?(this.summarizeSession=await this.ai.summarizer.create(),this.isInitialized=!0,this.model):(this.isInitialized=!0,this.model)}catch(e){throw this.isInitialized=!1,e}}async summarizeContent(e,r=1e3){if(console.log("Summarizing content..."+e),console.log("Length of content: "+e.length),!e||e.length<=r)return console.log("Content does not need to be summarized"),"";if(!this.summarizeSession)return console.warn("Summarizer not available"),"Summarizer not available";try{const n=await this.summarizeSession.summarize(e);return console.log("Summarized content: "+n),n}catch(n){if(n instanceof DOMException&&n.name==="InvalidStateError")try{return(await this.checkSupport()).hasSummarizer?(this.summarizeSession=await self.ai.summarizer.create(),await this.summarizeSession.summarize(e)):(console.warn("Summarizer not available, using original content"),"")}catch(i){console.warn("Failed to reinitialize summarizer:",i)}return console.warn("Summarization failed, using original content:",n),"Failed"}}async streamAnalysis(e,r,n){if(!this.model)throw new Error("Language model session not initialized");const s=`${((await chrome.storage.sync.get("docagramOptions")).docagramOptions||Io).systemPrompt}: ${e}`;try{return this.model.promptStreaming(s)}catch(o){if(console.error("Error streaming analysis:",o),o instanceof DOMException&&o.name==="InvalidStateError"&&(await this.getCapabilities()).available!=="no")return await this.initialize(),this.model.promptStreaming(s);throw o}}async getCapabilities(){try{return await self.ai.languageModel.capabilities()}catch(e){return console.error("Error getting language model capabilities:",e),{available:"no",defaultTopK:0,maxTopK:0,defaultTemperature:0,supportsLanguage:()=>"readily"}}}getSessionStats(){if(!this.model)return null;const{maxTokens:e,temperature:r,tokensLeft:n,tokensSoFar:i,topK:a}=this.model;return{maxTokens:e,temperature:r,tokensLeft:n,tokensSoFar:i,topK:a,hasSummarizer:!!this.summarizeSession,isInitialized:this.isInitialized}}async destroy(){if(console.log("Destroying AI service..."),this.model){try{await this.model.destroy()}catch(e){console.warn("Error destroying language model session:",e)}this.model=null}if(this.summarizeSession){try{await this.summarizeSession.destroy()}catch(e){console.warn("Error destroying summarizer session:",e)}this.summarizeSession=null}this.isInitialized=!1}}const Ob=Bb("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ro=X.forwardRef(({className:t,variant:e,...r},n)=>W.jsx("div",{ref:n,role:"alert",className:Sr(Ob({variant:e}),t),...r}));Ro.displayName="Alert";const Nb=X.forwardRef(({className:t,...e},r)=>W.jsx("h5",{ref:r,className:Sr("mb-1 font-medium leading-none tracking-tight",t),...e}));Nb.displayName="AlertTitle";const Do=X.forwardRef(({className:t,...e},r)=>W.jsx("div",{ref:r,className:Sr("text-sm [&_p]:leading-relaxed",t),...e}));Do.displayName="AlertDescription";function zb({error:t,status:e}){return!t&&!e?null:W.jsxs("div",{className:"space-y-2",children:[t&&W.jsx(Ro,{variant:"destructive",children:W.jsx(Do,{children:t})}),e&&W.jsxs(Ro,{variant:"default",className:"flex items-center",children:[W.jsxs("svg",{className:"animate-spin mr-2 h-5 w-5 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[W.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),W.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]}),W.jsx(Do,{className:"mt-2",children:e})]})]})}class np{constructor(){this.relationships=[],this.uniqueEntities=new Map,this.selectedEntity=null,this.uniqueEntityCount=new Map}areRelationshipsEqual(e,r){return e.entity1===r.entity1&&e.entity2===r.entity2&&e.description===r.description||e.entity1===r.entity2&&e.entity2===r.entity1&&e.description===r.description}parseRelationships(e,r){const n=[],i=e.split(` -`);for(const a of i){const s=a.match(/([^()]+?)\s+to\s+([^()]+?)\s*\(([^)]+)\)/i);if(s){const o=s[1].trim(),l=s[2].trim(),c=s[3].trim(),h={entity1:o,entity2:l,description:c,sourceUrl:r};this.relationships.some(f=>this.areRelationshipsEqual(f,h))||(this.uniqueEntityCount.set(o,(this.uniqueEntityCount.get(o)||0)+1),this.uniqueEntityCount.set(l,(this.uniqueEntityCount.get(l)||0)+1),this.uniqueEntities.has(o)||this.uniqueEntities.set(o,r),this.uniqueEntities.has(l)||this.uniqueEntities.set(l,r),n.push(h))}}return this.relationships=[...this.relationships,...n],n}reset(){this.relationships=[],this.uniqueEntities.clear(),this.selectedEntity=null,this.uniqueEntityCount.clear()}getRelationships(){return this.relationships}getEntitiesList(){return Array.from(this.uniqueEntities.keys()).sort()}getEntitySource(e){return this.uniqueEntities.get(e)}selectEntity(e){return this.selectedEntity=e,this.getEntityRelationships(e)}getEntityRelationships(e){return this.relationships.filter(r=>r.entity1===e||r.entity2===e)}exportToJson(){return{relationships:this.relationships,entities:Object.fromEntries(this.uniqueEntities),selectedEntity:this.selectedEntity}}importFromJson(e){this.relationships=e.relationships||[],this.uniqueEntities=new Map(Object.entries(e.entities||{})),this.selectedEntity=e.selectedEntity||null,this.uniqueEntityCount.clear();for(const r of this.relationships)this.uniqueEntityCount.set(r.entity1,(this.uniqueEntityCount.get(r.entity1)||0)+1),this.uniqueEntityCount.set(r.entity2,(this.uniqueEntityCount.get(r.entity2)||0)+1)}getEntityCount(e){return this.uniqueEntityCount.get(e)||0}deleteEntity(e){this.relationships=this.relationships.filter(r=>r.entity1!==e&&r.entity2!==e),this.uniqueEntities.delete(e),this.uniqueEntityCount.delete(e)}}class Eh{static async getPageContent(){const[e]=await chrome.tabs.query({active:!0,currentWindow:!0}),[{result:r}]=await chrome.scripting.executeScript({target:{tabId:e.id},func:()=>{const n=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode:function(s){const o=s.parentElement;if(!o||o.offsetHeight===0)return NodeFilter.FILTER_REJECT;const l=o.tagName.toLowerCase();return l==="script"||l==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});let i="",a;for(;a=n.nextNode();)i+=a.textContent+" ";return i.replace(/\s+/g," ").trim()}});return r}static async splitIntoChunks(e){const i=((await chrome.storage.sync.get("docagramOptions")).docagramOptions||Io).chunkSize,a=[];for(let s=0;s0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(r.map(l=>{if(l=Hb(l),l in Ah)return;Ah[l]=!0;const c=l.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":qb,c||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),c)return new Promise((f,p)=>{u.addEventListener("load",f),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s}return i.then(s=>{for(const o of s||[])o.status==="rejected"&&a(o.reason);return e().catch(a)})};var ip={exports:{}};(function(t,e){(function(r,n){t.exports=n()})($o,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",u="month",f="quarter",p="year",d="date",m="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var T=["th","st","nd","rd"],A=L%100;return"["+L+(T[(A-20)%10]||T[A]||T[0])+"]"}},C=function(L,T,A){var $=String(L);return!$||$.length>=T?L:""+Array(T+1-$.length).join(A)+L},v={s:C,z:function(L){var T=-L.utcOffset(),A=Math.abs(T),$=Math.floor(A/60),I=A%60;return(T<=0?"+":"-")+C($,2,"0")+":"+C(I,2,"0")},m:function L(T,A){if(T.date()1)return L(w[0])}else{var G=T.name;_[G]=T,I=G}return!$&&I&&(S=I),I||!$&&S},O=function(L,T){if(D(L))return L.clone();var A=typeof T=="object"?T:{};return A.date=L,A.args=arguments,new P(A)},B=v;B.l=q,B.i=D,B.w=function(L,T){return O(L,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var P=function(){function L(A){this.$L=q(A.locale,null,!0),this.parse(A),this.$x=this.$x||A.x||{},this[F]=!0}var T=L.prototype;return T.parse=function(A){this.$d=function($){var I=$.date,V=$.utc;if(I===null)return new Date(NaN);if(B.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var w=I.match(x);if(w){var G=w[2]-1||0,dt=(w[7]||"0").substring(0,3);return V?new Date(Date.UTC(w[1],G,w[3]||1,w[4]||0,w[5]||0,w[6]||0,dt)):new Date(w[1],G,w[3]||1,w[4]||0,w[5]||0,w[6]||0,dt)}}return new Date(I)}(A),this.init()},T.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},T.$utils=function(){return B},T.isValid=function(){return this.$d.toString()!==m},T.isSame=function(A,$){var I=O(A);return this.startOf($)<=I&&I<=this.endOf($)},T.isAfter=function(A,$){return O(A)t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return ba.hue2rgb(a,i,t+1/3)*255;case"g":return ba.hue2rgb(a,i,t)*255;case"b":return ba.hue2rgb(a,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;const o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},Yb={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},ot={channel:ba,lang:Ub,unit:Yb},Cr={};for(let t=0;t<=255;t++)Cr[t]=ot.unit.dec2hex(t);const Zt={ALL:0,RGB:1,HSL:2};class Vb{constructor(){this.type=Zt.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Zt.ALL}is(e){return this.type===e}}class Gb{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Vb}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Zt.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=ot.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=ot.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=ot.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=ot.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=ot.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=ot.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ot.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ot.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Zt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Zt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Zt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Zt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Zt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Zt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const ys=new Gb({r:0,g:0,b:0,a:0},"transparent"),gn={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(gn.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return ys.set({r:(n>>l*(c+3)&h)*o,g:(n>>l*(c+2)&h)*o,b:(n>>l*(c+1)&h)*o,a:a?(n&h)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${Cr[Math.round(e)]}${Cr[Math.round(r)]}${Cr[Math.round(n)]}${Cr[Math.round(i*255)]}`:`#${Cr[Math.round(e)]}${Cr[Math.round(r)]}${Cr[Math.round(n)]}`}},qr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(qr.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return ot.channel.clamp.h(parseFloat(r)*.9);case"rad":return ot.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ot.channel.clamp.h(parseFloat(r)*360)}}return ot.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(qr.re);if(!r)return;const[,n,i,a,s,o]=r;return ys.set({h:qr._hue2deg(n),s:ot.channel.clamp.s(parseFloat(i)),l:ot.channel.clamp.l(parseFloat(a)),a:s?ot.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${ot.lang.round(e)}, ${ot.lang.round(r)}%, ${ot.lang.round(n)}%, ${i})`:`hsl(${ot.lang.round(e)}, ${ot.lang.round(r)}%, ${ot.lang.round(n)}%)`}},Ci={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Ci.colors[t];if(e)return gn.parse(e)},stringify:t=>{const e=gn.stringify(t);for(const r in Ci.colors)if(Ci.colors[r]===e)return r}},di={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(di.re);if(!r)return;const[,n,i,a,s,o,l,c,h]=r;return ys.set({r:ot.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:ot.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:ot.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?ot.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${ot.lang.round(e)}, ${ot.lang.round(r)}, ${ot.lang.round(n)}, ${ot.lang.round(i)})`:`rgb(${ot.lang.round(e)}, ${ot.lang.round(r)}, ${ot.lang.round(n)})`}},Je={format:{keyword:Ci,hex:gn,rgb:di,rgba:di,hsl:qr,hsla:qr},parse:t=>{if(typeof t!="string")return t;const e=gn.parse(t)||di.parse(t)||qr.parse(t)||Ci.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Zt.HSL)||t.data.r===void 0?qr.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?di.stringify(t):gn.stringify(t)},ap=(t,e)=>{const r=Je.parse(t);for(const n in e)r[n]=ot.channel.clamp[n](e[n]);return Je.stringify(r)},ki=(t,e,r=0,n=1)=>{if(typeof t!="number")return ap(t,{a:e});const i=ys.set({r:ot.channel.clamp.r(t),g:ot.channel.clamp.g(e),b:ot.channel.clamp.b(r),a:ot.channel.clamp.a(n)});return Je.stringify(i)},Xb=t=>{const{r:e,g:r,b:n}=Je.parse(t),i=.2126*ot.channel.toLinear(e)+.7152*ot.channel.toLinear(r)+.0722*ot.channel.toLinear(n);return ot.lang.round(i)},Kb=t=>Xb(t)>=.5,ji=t=>!Kb(t),sp=(t,e,r)=>{const n=Je.parse(t),i=n[e],a=ot.channel.clamp[e](i+r);return i!==a&&(n[e]=a),Je.stringify(n)},rt=(t,e)=>sp(t,"l",e),at=(t,e)=>sp(t,"l",-e),M=(t,e)=>{const r=Je.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return ap(t,n)},Zb=(t,e,r=50)=>{const{r:n,g:i,b:a,a:s}=Je.parse(t),{r:o,g:l,b:c,a:h}=Je.parse(e),u=r/100,f=u*2-1,p=s-h,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,x=1-m,y=n*m+o*x,b=i*m+l*x,C=a*m+c*x,v=s*u+h*(1-u);return ki(y,b,C,v)},Y=(t,e=100)=>{const r=Je.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Zb(r,t,e)};/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:op,setPrototypeOf:Lh,isFrozen:Qb,getPrototypeOf:Jb,getOwnPropertyDescriptor:t1}=Object;let{freeze:le,seal:Me,create:lp}=Object,{apply:Po,construct:Oo}=typeof Reflect<"u"&&Reflect;le||(le=function(e){return e});Me||(Me=function(e){return e});Po||(Po=function(e,r,n){return e.apply(r,n)});Oo||(Oo=function(e,r){return new e(...r)});const aa=ve(Array.prototype.forEach),Bh=ve(Array.prototype.pop),ti=ve(Array.prototype.push),wa=ve(String.prototype.toLowerCase),Qs=ve(String.prototype.toString),Mh=ve(String.prototype.match),ei=ve(String.prototype.replace),e1=ve(String.prototype.indexOf),r1=ve(String.prototype.trim),Re=ve(Object.prototype.hasOwnProperty),ie=ve(RegExp.prototype.test),ri=n1(TypeError);function ve(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:wa;Lh&&Lh(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const a=r(i);a!==i&&(Qb(e)||(e[n]=a),i=a)}t[i]=!0}return t}function i1(t){for(let e=0;e/gm),c1=Me(/\${[\w\W]*}/gm),h1=Me(/^data-[\-\w.\u00B7-\uFFFF]/),u1=Me(/^aria-[\-\w]+$/),cp=Me(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),f1=Me(/^(?:\w+script|data):/i),p1=Me(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hp=Me(/^html$/i),d1=Me(/^[a-z][.\w]*(-[.\w]+)+$/i);var Dh=Object.freeze({__proto__:null,MUSTACHE_EXPR:o1,ERB_EXPR:l1,TMPLIT_EXPR:c1,DATA_ATTR:h1,ARIA_ATTR:u1,IS_ALLOWED_URI:cp,IS_SCRIPT_OR_DATA:f1,ATTR_WHITESPACE:p1,DOCTYPE_NAME:hp,CUSTOM_ELEMENT:d1});const ii={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},g1=function(){return typeof window>"u"?null:window},m1=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function up(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g1();const e=et=>up(et);if(e.version="3.1.6",e.removed=[],!t||!t.document||t.document.nodeType!==ii.document)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:p}=t,d=l.prototype,m=ni(d,"cloneNode"),x=ni(d,"remove"),y=ni(d,"nextSibling"),b=ni(d,"childNodes"),C=ni(d,"parentNode");if(typeof s=="function"){const et=r.createElement("template");et.content&&et.content.ownerDocument&&(r=et.content.ownerDocument)}let v,S="";const{implementation:_,createNodeIterator:F,createDocumentFragment:D,getElementsByTagName:q}=r,{importNode:O}=n;let B={};e.isSupported=typeof op=="function"&&typeof C=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:N,TMPLIT_EXPR:L,DATA_ATTR:T,ARIA_ATTR:A,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:V}=Dh;let{IS_ALLOWED_URI:w}=Dh,G=null;const dt=mt({},[...Fh,...Js,...to,...eo,...Ih]);let k=null;const xt=mt({},[...$h,...ro,...Rh,...sa]);let ft=Object.seal(lp(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),bt=null,Pt=null,Ot=!0,zt=!0,Ft=!1,Xt=!0,ce=!1,qe=!0,ir=!1,sn=!1,on=!1,ar=!1,ln=!1,Ir=!1,Xn=!0,ra=!1;const Gs="user-content-";let Kn=!0,$r=!1,xr={},R=null;const U=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ut=null;const gt=mt({},["audio","video","img","source","image","track"]);let wt=null;const he=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Te="http://www.w3.org/1998/Math/MathML",ue="http://www.w3.org/2000/svg",re="http://www.w3.org/1999/xhtml";let Ee=re,Wt=!1,He=null;const $e=mt({},[Te,ue,re],Qs);let Zn=null;const Cb=["application/xhtml+xml","text/html"],kb="text/html";let qt=null,cn=null;const _b=r.createElement("form"),ch=function(E){return E instanceof RegExp||E instanceof Function},Xs=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(cn&&cn===E)){if((!E||typeof E!="object")&&(E={}),E=Dr(E),Zn=Cb.indexOf(E.PARSER_MEDIA_TYPE)===-1?kb:E.PARSER_MEDIA_TYPE,qt=Zn==="application/xhtml+xml"?Qs:wa,G=Re(E,"ALLOWED_TAGS")?mt({},E.ALLOWED_TAGS,qt):dt,k=Re(E,"ALLOWED_ATTR")?mt({},E.ALLOWED_ATTR,qt):xt,He=Re(E,"ALLOWED_NAMESPACES")?mt({},E.ALLOWED_NAMESPACES,Qs):$e,wt=Re(E,"ADD_URI_SAFE_ATTR")?mt(Dr(he),E.ADD_URI_SAFE_ATTR,qt):he,ut=Re(E,"ADD_DATA_URI_TAGS")?mt(Dr(gt),E.ADD_DATA_URI_TAGS,qt):gt,R=Re(E,"FORBID_CONTENTS")?mt({},E.FORBID_CONTENTS,qt):U,bt=Re(E,"FORBID_TAGS")?mt({},E.FORBID_TAGS,qt):{},Pt=Re(E,"FORBID_ATTR")?mt({},E.FORBID_ATTR,qt):{},xr=Re(E,"USE_PROFILES")?E.USE_PROFILES:!1,Ot=E.ALLOW_ARIA_ATTR!==!1,zt=E.ALLOW_DATA_ATTR!==!1,Ft=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ce=E.SAFE_FOR_TEMPLATES||!1,qe=E.SAFE_FOR_XML!==!1,ir=E.WHOLE_DOCUMENT||!1,ar=E.RETURN_DOM||!1,ln=E.RETURN_DOM_FRAGMENT||!1,Ir=E.RETURN_TRUSTED_TYPE||!1,on=E.FORCE_BODY||!1,Xn=E.SANITIZE_DOM!==!1,ra=E.SANITIZE_NAMED_PROPS||!1,Kn=E.KEEP_CONTENT!==!1,$r=E.IN_PLACE||!1,w=E.ALLOWED_URI_REGEXP||cp,Ee=E.NAMESPACE||re,ft=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&ch(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ft.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&ch(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ft.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ft.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ce&&(zt=!1),ln&&(ar=!0),xr&&(G=mt({},Ih),k=[],xr.html===!0&&(mt(G,Fh),mt(k,$h)),xr.svg===!0&&(mt(G,Js),mt(k,ro),mt(k,sa)),xr.svgFilters===!0&&(mt(G,to),mt(k,ro),mt(k,sa)),xr.mathMl===!0&&(mt(G,eo),mt(k,Rh),mt(k,sa))),E.ADD_TAGS&&(G===dt&&(G=Dr(G)),mt(G,E.ADD_TAGS,qt)),E.ADD_ATTR&&(k===xt&&(k=Dr(k)),mt(k,E.ADD_ATTR,qt)),E.ADD_URI_SAFE_ATTR&&mt(wt,E.ADD_URI_SAFE_ATTR,qt),E.FORBID_CONTENTS&&(R===U&&(R=Dr(R)),mt(R,E.FORBID_CONTENTS,qt)),Kn&&(G["#text"]=!0),ir&&mt(G,["html","head","body"]),G.table&&(mt(G,["tbody"]),delete bt.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw ri('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ri('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=E.TRUSTED_TYPES_POLICY,S=v.createHTML("")}else v===void 0&&(v=m1(p,i)),v!==null&&typeof S=="string"&&(S=v.createHTML(""));le&&le(E),cn=E}},hh=mt({},["mi","mo","mn","ms","mtext"]),uh=mt({},["foreignobject","annotation-xml"]),vb=mt({},["title","style","font","a","script"]),fh=mt({},[...Js,...to,...a1]),ph=mt({},[...eo,...s1]),Sb=function(E){let j=C(E);(!j||!j.tagName)&&(j={namespaceURI:Ee,tagName:"template"});const Z=wa(E.tagName),Et=wa(j.tagName);return He[E.namespaceURI]?E.namespaceURI===ue?j.namespaceURI===re?Z==="svg":j.namespaceURI===Te?Z==="svg"&&(Et==="annotation-xml"||hh[Et]):!!fh[Z]:E.namespaceURI===Te?j.namespaceURI===re?Z==="math":j.namespaceURI===ue?Z==="math"&&uh[Et]:!!ph[Z]:E.namespaceURI===re?j.namespaceURI===ue&&!uh[Et]||j.namespaceURI===Te&&!hh[Et]?!1:!ph[Z]&&(vb[Z]||!fh[Z]):!!(Zn==="application/xhtml+xml"&&He[E.namespaceURI]):!1},We=function(E){ti(e.removed,{element:E});try{C(E).removeChild(E)}catch{x(E)}},na=function(E,j){try{ti(e.removed,{attribute:j.getAttributeNode(E),from:j})}catch{ti(e.removed,{attribute:null,from:j})}if(j.removeAttribute(E),E==="is"&&!k[E])if(ar||ln)try{We(j)}catch{}else try{j.setAttribute(E,"")}catch{}},dh=function(E){let j=null,Z=null;if(on)E=""+E;else{const jt=Mh(E,/^[\r\n\t ]+/);Z=jt&&jt[0]}Zn==="application/xhtml+xml"&&Ee===re&&(E=''+E+"");const Et=v?v.createHTML(E):E;if(Ee===re)try{j=new f().parseFromString(Et,Zn)}catch{}if(!j||!j.documentElement){j=_.createDocument(Ee,"template",null);try{j.documentElement.innerHTML=Wt?S:Et}catch{}}const Kt=j.body||j.documentElement;return E&&Z&&Kt.insertBefore(r.createTextNode(Z),Kt.childNodes[0]||null),Ee===re?q.call(j,ir?"html":"body")[0]:ir?j.documentElement:Kt},gh=function(E){return F.call(E.ownerDocument||E,E,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},mh=function(E){return E instanceof u&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof h)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},yh=function(E){return typeof o=="function"&&E instanceof o},sr=function(E,j,Z){B[E]&&aa(B[E],Et=>{Et.call(e,j,Z,cn)})},xh=function(E){let j=null;if(sr("beforeSanitizeElements",E,null),mh(E))return We(E),!0;const Z=qt(E.nodeName);if(sr("uponSanitizeElement",E,{tagName:Z,allowedTags:G}),E.hasChildNodes()&&!yh(E.firstElementChild)&&ie(/<[/\w]/g,E.innerHTML)&&ie(/<[/\w]/g,E.textContent)||E.nodeType===ii.progressingInstruction||qe&&E.nodeType===ii.comment&&ie(/<[/\w]/g,E.data))return We(E),!0;if(!G[Z]||bt[Z]){if(!bt[Z]&&wh(Z)&&(ft.tagNameCheck instanceof RegExp&&ie(ft.tagNameCheck,Z)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(Z)))return!1;if(Kn&&!R[Z]){const Et=C(E)||E.parentNode,Kt=b(E)||E.childNodes;if(Kt&&Et){const jt=Kt.length;for(let fe=jt-1;fe>=0;--fe){const je=m(Kt[fe],!0);je.__removalCount=(E.__removalCount||0)+1,Et.insertBefore(je,y(E))}}}return We(E),!0}return E instanceof l&&!Sb(E)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&ie(/<\/no(script|embed|frames)/i,E.innerHTML)?(We(E),!0):(ce&&E.nodeType===ii.text&&(j=E.textContent,aa([P,N,L],Et=>{j=ei(j,Et," ")}),E.textContent!==j&&(ti(e.removed,{element:E.cloneNode()}),E.textContent=j)),sr("afterSanitizeElements",E,null),!1)},bh=function(E,j,Z){if(Xn&&(j==="id"||j==="name")&&(Z in r||Z in _b))return!1;if(!(zt&&!Pt[j]&&ie(T,j))){if(!(Ot&&ie(A,j))){if(!k[j]||Pt[j]){if(!(wh(E)&&(ft.tagNameCheck instanceof RegExp&&ie(ft.tagNameCheck,E)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(E))&&(ft.attributeNameCheck instanceof RegExp&&ie(ft.attributeNameCheck,j)||ft.attributeNameCheck instanceof Function&&ft.attributeNameCheck(j))||j==="is"&&ft.allowCustomizedBuiltInElements&&(ft.tagNameCheck instanceof RegExp&&ie(ft.tagNameCheck,Z)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(Z))))return!1}else if(!wt[j]){if(!ie(w,ei(Z,I,""))){if(!((j==="src"||j==="xlink:href"||j==="href")&&E!=="script"&&e1(Z,"data:")===0&&ut[E])){if(!(Ft&&!ie($,ei(Z,I,"")))){if(Z)return!1}}}}}}return!0},wh=function(E){return E!=="annotation-xml"&&Mh(E,V)},Ch=function(E){sr("beforeSanitizeAttributes",E,null);const{attributes:j}=E;if(!j)return;const Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k};let Et=j.length;for(;Et--;){const Kt=j[Et],{name:jt,namespaceURI:fe,value:je}=Kt,Qn=qt(jt);let ne=jt==="value"?je:r1(je);if(Z.attrName=Qn,Z.attrValue=ne,Z.keepAttr=!0,Z.forceKeepAttr=void 0,sr("uponSanitizeAttribute",E,Z),ne=Z.attrValue,qe&&ie(/((--!?|])>)|<\/(style|title)/i,ne)){na(jt,E);continue}if(Z.forceKeepAttr||(na(jt,E),!Z.keepAttr))continue;if(!Xt&&ie(/\/>/i,ne)){na(jt,E);continue}ce&&aa([P,N,L],_h=>{ne=ei(ne,_h," ")});const kh=qt(E.nodeName);if(bh(kh,Qn,ne)){if(ra&&(Qn==="id"||Qn==="name")&&(na(jt,E),ne=Gs+ne),v&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!fe)switch(p.getAttributeType(kh,Qn)){case"TrustedHTML":{ne=v.createHTML(ne);break}case"TrustedScriptURL":{ne=v.createScriptURL(ne);break}}try{fe?E.setAttributeNS(fe,jt,ne):E.setAttribute(jt,ne),mh(E)?We(E):Bh(e.removed)}catch{}}}sr("afterSanitizeAttributes",E,null)},Tb=function et(E){let j=null;const Z=gh(E);for(sr("beforeSanitizeShadowDOM",E,null);j=Z.nextNode();)sr("uponSanitizeShadowNode",j,null),!xh(j)&&(j.content instanceof a&&et(j.content),Ch(j));sr("afterSanitizeShadowDOM",E,null)};return e.sanitize=function(et){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=null,Z=null,Et=null,Kt=null;if(Wt=!et,Wt&&(et=""),typeof et!="string"&&!yh(et))if(typeof et.toString=="function"){if(et=et.toString(),typeof et!="string")throw ri("dirty is not a string, aborting")}else throw ri("toString is not a function");if(!e.isSupported)return et;if(sn||Xs(E),e.removed=[],typeof et=="string"&&($r=!1),$r){if(et.nodeName){const je=qt(et.nodeName);if(!G[je]||bt[je])throw ri("root node is forbidden and cannot be sanitized in-place")}}else if(et instanceof o)j=dh(""),Z=j.ownerDocument.importNode(et,!0),Z.nodeType===ii.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?j=Z:j.appendChild(Z);else{if(!ar&&!ce&&!ir&&et.indexOf("<")===-1)return v&&Ir?v.createHTML(et):et;if(j=dh(et),!j)return ar?null:Ir?S:""}j&&on&&We(j.firstChild);const jt=gh($r?et:j);for(;Et=jt.nextNode();)xh(Et)||(Et.content instanceof a&&Tb(Et.content),Ch(Et));if($r)return et;if(ar){if(ln)for(Kt=D.call(j.ownerDocument);j.firstChild;)Kt.appendChild(j.firstChild);else Kt=j;return(k.shadowroot||k.shadowrootmode)&&(Kt=O.call(n,Kt,!0)),Kt}let fe=ir?j.outerHTML:j.innerHTML;return ir&&G["!doctype"]&&j.ownerDocument&&j.ownerDocument.doctype&&j.ownerDocument.doctype.name&&ie(hp,j.ownerDocument.doctype.name)&&(fe=" -`+fe),ce&&aa([P,N,L],je=>{fe=ei(fe,je," ")}),v&&Ir?v.createHTML(fe):fe},e.setConfig=function(){let et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xs(et),sn=!0},e.clearConfig=function(){cn=null,sn=!1},e.isValidAttribute=function(et,E,j){cn||Xs({});const Z=qt(et),Et=qt(E);return bh(Z,Et,j)},e.addHook=function(et,E){typeof E=="function"&&(B[et]=B[et]||[],ti(B[et],E))},e.removeHook=function(et){if(B[et])return Bh(B[et])},e.removeHooks=function(et){B[et]&&(B[et]=[])},e.removeAllHooks=function(){B={}},e}var En=up(),fp=Object.defineProperty,g=(t,e)=>fp(t,"name",{value:e,configurable:!0}),y1=(t,e)=>{for(var r in e)fp(t,r,{get:e[r],enumerable:!0})},or={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},z={trace:g((...t)=>{},"trace"),debug:g((...t)=>{},"debug"),info:g((...t)=>{},"info"),warn:g((...t)=>{},"warn"),error:g((...t)=>{},"error"),fatal:g((...t)=>{},"fatal")},Yl=g(function(t="fatal"){let e=or.fatal;typeof t=="string"?t.toLowerCase()in or&&(e=or[t]):typeof t=="number"&&(e=t),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},e<=or.fatal&&(z.fatal=console.error?console.error.bind(console,Ae("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ae("FATAL"))),e<=or.error&&(z.error=console.error?console.error.bind(console,Ae("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ae("ERROR"))),e<=or.warn&&(z.warn=console.warn?console.warn.bind(console,Ae("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ae("WARN"))),e<=or.info&&(z.info=console.info?console.info.bind(console,Ae("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ae("INFO"))),e<=or.debug&&(z.debug=console.debug?console.debug.bind(console,Ae("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ae("DEBUG"))),e<=or.trace&&(z.trace=console.debug?console.debug.bind(console,Ae("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ae("TRACE")))},"setLogLevel"),Ae=g(t=>`%c${jb().format("ss.SSS")} : ${t} : `,"format"),pp=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,_i=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,x1=/\s*%%.*\n/gm,bn,dp=(bn=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},g(bn,"UnknownDiagramError"),bn),An={},Vl=g(function(t,e){t=t.replace(pp,"").replace(_i,"").replace(x1,` -`);for(const[r,{detector:n}]of Object.entries(An))if(n(t,e))return r;throw new dp(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),gp=g((...t)=>{for(const{id:e,detector:r,loader:n}of t)mp(e,r,n)},"registerLazyLoadedDiagrams"),mp=g((t,e,r)=>{An[t]&&z.warn(`Detector with key ${t} already exists. Overwriting.`),An[t]={detector:e,loader:r},z.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),b1=g(t=>An[t].loader,"getDiagramLoader"),No=g((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>No(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=No(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),Vt=No,xs="#ffffff",bs="#f2f2f2",ae=g((t,e)=>e?M(t,{s:-40,l:10}):M(t,{s:-40,l:-10}),"mkBorder"),wn,w1=(wn=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,n,i,a,s,o,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||M(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||M(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Y(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Y(this.tertiaryColor),this.lineColor=this.lineColor||Y(this.background),this.arrowheadColor=this.arrowheadColor||Y(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?at(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||at(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Y(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||rt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},g(wn,"Theme"),wn),C1=g(t=>{const e=new w1;return e.calculate(t),e},"getThemeVariables"),Cn,k1=(Cn=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=rt(this.primaryColor,16),this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=Y(this.background),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=rt(Y("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=ki(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=at("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=at(this.sectionBkgColor,10),this.taskBorderColor=ki(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=ki(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,r,n,i,a,s,o,l,c,h,u;this.secondBkg=rt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=rt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=rt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=M(this.primaryColor,{h:64}),this.fillType3=M(this.secondaryColor,{h:64}),this.fillType4=M(this.primaryColor,{h:-64}),this.fillType5=M(this.secondaryColor,{h:-64}),this.fillType6=M(this.primaryColor,{h:128}),this.fillType7=M(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330});for(let f=0;f{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},g(Cn,"Theme"),Cn),_1=g(t=>{const e=new k1;return e.calculate(t),e},"getThemeVariables"),kn,v1=(kn=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=M(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=ki(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,r,n,i,a,s,o,l,c,h,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let f=0;f{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},g(kn,"Theme"),kn),S1=g(t=>{const e=new v1;return e.calculate(t),e},"getThemeVariables"),_n,T1=(_n=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=rt("#cde498",10),this.primaryBorderColor=ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.primaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,n,i,a,s,o,l,c,h,u;this.actorBorder=at(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||M(this.primaryColor,{h:30}),this.cScale4=this.cScale4||M(this.primaryColor,{h:60}),this.cScale5=this.cScale5||M(this.primaryColor,{h:90}),this.cScale6=this.cScale6||M(this.primaryColor,{h:120}),this.cScale7=this.cScale7||M(this.primaryColor,{h:150}),this.cScale8=this.cScale8||M(this.primaryColor,{h:210}),this.cScale9=this.cScale9||M(this.primaryColor,{h:270}),this.cScale10=this.cScale10||M(this.primaryColor,{h:300}),this.cScale11=this.cScale11||M(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||at(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||at(this.tertiaryColor,40);for(let f=0;f{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},g(_n,"Theme"),_n),E1=g(t=>{const e=new T1;return e.calculate(t),e},"getThemeVariables"),vn,A1=(vn=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=rt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=M(this.primaryColor,{h:-160}),this.primaryBorderColor=ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=Y(this.primaryColor),this.secondaryTextColor=Y(this.secondaryColor),this.tertiaryTextColor=Y(this.tertiaryColor),this.lineColor=Y(this.background),this.textColor=Y(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,n,i,a,s,o,l,c,h,u;this.secondBkg=rt(this.contrast,55),this.border2=this.contrast,this.actorBorder=rt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let f=0;f{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},g(vn,"Theme"),vn),L1=g(t=>{const e=new A1;return e.calculate(t),e},"getThemeVariables"),ur={base:{getThemeVariables:C1},dark:{getThemeVariables:_1},default:{getThemeVariables:S1},forest:{getThemeVariables:E1},neutral:{getThemeVariables:L1}},br={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},yp={...br,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:ur.default.getThemeVariables(),sequence:{...br.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...br.gantt,tickInterval:void 0,useWidth:void 0},c4:{...br.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...br.pie,useWidth:984},xyChart:{...br.xyChart,useWidth:void 0},requirement:{...br.requirement,useWidth:void 0},packet:{...br.packet}},xp=g((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...xp(t[n],"")]:[...r,e+n],[]),"keyify"),B1=new Set(xp(yp,"")),bp=yp,$a=g(t=>{if(z.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>$a(e));return}for(const e of Object.keys(t)){if(z.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!B1.has(e)||t[e]==null){z.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){z.debug("sanitizing object",e),$a(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(z.debug("sanitizing css option",e),t[e]=M1(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}z.debug("After sanitization",t)}},"sanitizeDirective"),M1=g(t=>{let e=0,r=0;for(const n of t){if(e{let r=Vt({},t),n={};for(const i of e)_p(i),n=Vt(n,i);if(r=Vt(r,n),n.theme&&n.theme in ur){const i=Vt({},wp),a=Vt(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in ur&&(r.themeVariables=ur[r.theme].getThemeVariables(a))}return vi=r,vp(vi),vi},"updateCurrentConfig"),F1=g(t=>(ge=Vt({},Ln),ge=Vt(ge,t),t.theme&&ur[t.theme]&&(ge.themeVariables=ur[t.theme].getThemeVariables(t.themeVariables)),ws(ge,Bn),ge),"setSiteConfig"),I1=g(t=>{wp=Vt({},t)},"saveConfigFromInitialize"),$1=g(t=>(ge=Vt(ge,t),ws(ge,Bn),ge),"updateSiteConfig"),Cp=g(()=>Vt({},ge),"getSiteConfig"),kp=g(t=>(vp(t),Vt(vi,t),Ne()),"setConfig"),Ne=g(()=>Vt({},vi),"getConfig"),_p=g(t=>{t&&(["secure",...ge.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(z.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&_p(t[e])}))},"sanitize"),R1=g(t=>{var e;$a(t),t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Bn.push(t),ws(ge,Bn)},"addDirective"),Ra=g((t=ge)=>{Bn=[],ws(t,Bn)},"reset"),D1={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ph={},P1=g(t=>{Ph[t]||(z.warn(D1[t]),Ph[t]=!0)},"issueWarning"),vp=g(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&P1("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ui=//gi,O1=g(t=>t?Ep(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),N1=(()=>{let t=!1;return()=>{t||(Sp(),t=!0)}})();function Sp(){const t="data-temp-href-target";En.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),En.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}g(Sp,"setupDompurifyHooks");var Tp=g(t=>(N1(),En.sanitize(t)),"removeScript"),Oh=g((t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=Tp(t):n!=="loose"&&(t=Ep(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=W1(t))}return t},"sanitizeMore"),Gr=g((t,e)=>t&&(e.dompurifyConfig?t=En.sanitize(Oh(t,e),e.dompurifyConfig).toString():t=En.sanitize(Oh(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),z1=g((t,e)=>typeof t=="string"?Gr(t,e):t.flat().map(r=>Gr(r,e)),"sanitizeTextOrArray"),q1=g(t=>Ui.test(t),"hasBreaks"),H1=g(t=>t.split(Ui),"splitBreaks"),W1=g(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Ep=g(t=>t.replace(Ui,"#br#"),"breakToPlaceholder"),j1=g(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),Gt=g(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),U1=g(function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),Y1=g(function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),F3=g(function(t){const e=t.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,t.split(e).length-1),"countOccurrence"),V1=g((t,e)=>{const r=zo(t,"~"),n=zo(e,"~");return r===1&&n===1},"shouldCombineSets"),G1=g(t=>{const e=zo(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Nh=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),qo=/\$\$(.*)\$\$/g,Mn=g(t=>{var e;return(((e=t.match(qo))==null?void 0:e.length)??0)>0},"hasKatex"),I3=g(async(t,e)=>{t=await Gl(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),Gl=g(async(t,e)=>{if(!Mn(t))return t;if(!(Nh()||e.legacyMathML||e.forceLegacyMathML))return t.replace(qo,"MathML is unsupported in this environment.");const{default:r}=await Tt(async()=>{const{default:i}=await import("./c-katex.CvgdMzdh.js");return{default:i}},[]),n=e.forceLegacyMathML||!Nh()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Ui).map(i=>Mn(i)?`
${i}
`:`
${i}
`).join("").replace(qo,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),Nn={getRows:O1,sanitizeText:Gr,sanitizeTextOrArray:z1,hasBreaks:q1,splitBreaks:H1,lineBreakRegex:Ui,removeScript:Tp,getUrl:j1,evaluate:Gt,getMax:U1,getMin:Y1},X1=g(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),K1=g(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Ap=g(function(t,e,r,n){const i=K1(e,r,n);X1(t,i)},"configureSvgSize"),Z1=g(function(t,e,r,n){const i=e.node().getBBox(),a=i.width,s=i.height;z.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;z.info(`Graph bounds: ${o}x${l}`,t),o=a+r*2,l=s+r*2,z.info(`Calculated bounds: ${o}x${l}`),Ap(e,l,o,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),Ca={},Q1=g((t,e,r)=>{let n="";return t in Ca&&Ca[t]?n=Ca[t](r):z.warn(`No theme found for ${t}`),` & { - font-family: ${r.fontFamily}; - font-size: ${r.fontSize}; - fill: ${r.textColor} +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["c-dagre-SWNTG5WE.BqCGIveF.js","c-graph.LrzKEURD.js","c-_baseUniq.B6F21pIQ.js","c-layout.DW-oGeTY.js","c-_basePickBy.DHYc2WzR.js","c-clone.efIVrz4F.js","c-App.BSmD8r3A.js","App.css","c-c4Diagram-GPMAACGM.BkpUmUjp.js","c-chunk-VCFP4HPQ.P-Zh3yiJ.js","c-flowDiagram-TSWR6T2D.BDyRIeD9.js","c-chunk-EICJXIV7.DfejhB_s.js","c-channel.DwG3ORrW.js","c-erDiagram-WO52GFNT.CIP9No93.js","c-gitGraphDiagram-5C7YHVU6.Dl5tBrYZ.js","c-chunk-BAOP5US2.D69mMcSi.js","c-chunk-RGXPSUNZ.DGZknDz3.js","c-gitGraph-YCYPL57B.Dz7kBqcO.js","c-ganttDiagram-FAOCOTIY.B9tslBWb.js","c-linear.CFszUfD_.js","c-init.Gi6I4Gst.js","c-infoDiagram-P5D6MX3V.9u1PTiRl.js","c-pieDiagram-BLWKPB35.CxVsEpHY.js","c-arc.D8ah_K6m.js","c-ordinal.jT623uI2.js","c-quadrantDiagram-QXWEEFXS.CSlBfacx.js","c-xychartDiagram-MYLB5AYS.CrV2JkJ2.js","c-requirementDiagram-XAUNFCZY.Dmavh9i-.js","c-sequenceDiagram-D25TJ2OB.BxqiZ84W.js","c-classDiagram-FEGYTUDG.Jtpc2mPV.js","c-chunk-CXDZ2C6O.BlaZOBCJ.js","c-classDiagram-v2-R65JCUOM.Jtpc2mPV.js","c-stateDiagram-GNSP7T6Y.DWapbDeu.js","c-chunk-JZAHL7AJ.ab2c-n0N.js","c-stateDiagram-v2-HP6YRVRG.DQU7qFf8.js","c-journeyDiagram-UIGPPNLY.COfGQ7Mw.js","c-timeline-definition-27KQCCZ3.DCkZpjUg.js","c-mindmap-definition-R7LC4OIY.HtmJtmIk.js","c-cytoscape.esm.YXkLVt_w.js","c-kanban-definition-KMT3NSR2.UKecc5Qe.js","c-sankeyDiagram-LVV36NHA.qNSVVhZy.js","c-diagram-NZMEDLQF.B1mQzBcd.js","c-blockDiagram-XN6IQ5JY.CXq3yh8r.js","c-architectureDiagram-AYX4OTIS.CNP2CA_M.js"])))=>i.map(i=>d[i]); +var gC=Object.defineProperty;var Hu=t=>{throw TypeError(t)};var mC=(t,e,n)=>e in t?gC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Pt=(t,e,n)=>mC(t,typeof e!="symbol"?e+"":e,n),yC=(t,e,n)=>e.has(t)||Hu("Cannot "+n);var Wu=(t,e,n)=>e.has(t)?Hu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);var Ti=(t,e,n)=>(yC(t,e,"access private method"),n);import{b as no,D as Ll,r as B,j as L,d as se,e as xC,a as Ml,g as Md,f as Xc,P as $t,u as He,h as me,i as Kc,k as Bd,l as ro,m as Bt,n as bC,o as wC,p as CC,S as vC,F as _C,q as kC,s as li,V as SC,t as TC,v as Gr,w as Id,C as Wo,x as Uo,B as Lr,L as Uu,c as EC,R as AC}from"./c-App.BSmD8r3A.js";/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const LC=no("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fd=no("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const MC=no("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.460.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vu=no("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);class BC{constructor(){this.ai=self.ai,this.model=null,this.summarizeSession=null,this.isInitialized=!1}async checkSupport(){var e,n,r,i;try{const s=await((n=(e=self.ai)==null?void 0:e.languageModel)==null?void 0:n.capabilities()),a=await((i=(r=self.ai)==null?void 0:r.summarizer)==null?void 0:i.capabilities());return{hasLanguageModel:(s==null?void 0:s.available)!=="no",hasSummarizer:(a==null?void 0:a.available)!=="no",languageModelStatus:(s==null?void 0:s.available)||"no",summarizerStatus:(a==null?void 0:a.available)||"no"}}catch(s){return console.error("Error checking AI capabilities:",s),{hasLanguageModel:!1,hasSummarizer:!1,languageModelStatus:"no",summarizerStatus:"no"}}}async initialize(){try{const n=(await chrome.storage.sync.get("docagramOptions")).docagramOptions||Ll;await this.destroy();const r=await this.checkSupport();if(!r.hasLanguageModel)throw new Error("Language model not available on this device");return this.model=await this.ai.languageModel.create({temperature:n.temperature,topK:n.topK}),r.hasSummarizer?(this.summarizeSession=await this.ai.summarizer.create(),this.isInitialized=!0,this.model):(this.isInitialized=!0,this.model)}catch(e){throw this.isInitialized=!1,e}}async summarizeContent(e,n=1e3){if(console.log("Summarizing content..."+e),console.log("Length of content: "+e.length),!e||e.length<=n)return console.log("Content does not need to be summarized"),"";if(!this.summarizeSession)return console.warn("Summarizer not available"),"Summarizer not available";try{return await this.summarizeSession.summarize(e)}catch(r){if(r instanceof DOMException&&r.name==="InvalidStateError")try{return(await this.checkSupport()).hasSummarizer?(this.summarizeSession=await self.ai.summarizer.create(),await this.summarizeSession.summarize(e)):(console.warn("Summarizer not available, using original content"),"")}catch(i){console.warn("Failed to reinitialize summarizer:",i)}return console.warn("Summarization failed, using original content:",r),"Failed"}}async streamAnalysis(e){if(!this.model)throw new Error("Language model session not initialized");const i=`${((await chrome.storage.sync.get("docagramOptions")).docagramOptions||Ll).systemPrompt}: ${e}`;try{return this.model.promptStreaming(i)}catch(s){if(console.error("Error streaming analysis:",s),s instanceof DOMException&&s.name==="InvalidStateError"&&(await this.getCapabilities()).available!=="no")return await this.initialize(),this.model.promptStreaming(i);throw s}}async getCapabilities(){try{return await self.ai.languageModel.capabilities()}catch(e){return console.error("Error getting language model capabilities:",e),{available:"no",defaultTopK:0,maxTopK:0,defaultTemperature:0,supportsLanguage:()=>"readily"}}}getSessionStats(){if(!this.model)return null;const{maxTokens:e,temperature:n,tokensLeft:r,tokensSoFar:i,topK:s}=this.model;return{maxTokens:e,temperature:n,tokensLeft:r,tokensSoFar:i,topK:s,hasSummarizer:!!this.summarizeSession,isInitialized:this.isInitialized}}async destroy(){if(console.log("Destroying AI service..."),this.model){try{await this.model.destroy()}catch(e){console.warn("Error destroying language model session:",e)}this.model=null}if(this.summarizeSession){try{await this.summarizeSession.destroy()}catch(e){console.warn("Error destroying summarizer session:",e)}this.summarizeSession=null}this.isInitialized=!1}}const IC=xC("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Bl=B.forwardRef(({className:t,variant:e,...n},r)=>L.jsx("div",{ref:r,role:"alert",className:se(IC({variant:e}),t),...n}));Bl.displayName="Alert";const FC=B.forwardRef(({className:t,...e},n)=>L.jsx("h5",{ref:n,className:se("mb-1 font-medium leading-none tracking-tight",t),...e}));FC.displayName="AlertTitle";const Il=B.forwardRef(({className:t,...e},n)=>L.jsx("div",{ref:n,className:se("text-sm [&_p]:leading-relaxed",t),...e}));Il.displayName="AlertDescription";function RC({error:t,status:e}){return!t&&!e?null:L.jsxs("div",{className:"space-y-2",children:[t&&L.jsx(Bl,{variant:"destructive",children:L.jsx(Il,{children:t})}),e&&L.jsxs(Bl,{variant:"default",className:"flex items-center",children:[L.jsxs("svg",{className:"animate-spin mr-2 h-5 w-5 text-current",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[L.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),L.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]}),L.jsx(Il,{className:"mt-2",children:e})]})]})}class Rd{constructor(){this.relationships=[],this.uniqueEntities=new Map,this.selectedEntity=null,this.uniqueEntityCount=new Map}areRelationshipsEqual(e,n){return e.entity1===n.entity1&&e.entity2===n.entity2&&e.description===n.description||e.entity1===n.entity2&&e.entity2===n.entity1&&e.description===n.description}parseRelationships(e,n){const r=[],i=e.split(` +`);for(const s of i){const a=s.match(/([^()]+?)\s+to\s+([^()]+?)\s*\(([^)]+)\)/i);if(a){const o=a[1].trim(),l=a[2].trim(),c=a[3].trim(),h={entity1:o,entity2:l,description:c,sourceUrl:n};this.relationships.some(f=>this.areRelationshipsEqual(f,h))||(this.uniqueEntityCount.set(o,(this.uniqueEntityCount.get(o)||0)+1),this.uniqueEntityCount.set(l,(this.uniqueEntityCount.get(l)||0)+1),this.uniqueEntities.has(o)||this.uniqueEntities.set(o,n),this.uniqueEntities.has(l)||this.uniqueEntities.set(l,n),r.push(h))}}return this.relationships=[...this.relationships,...r],r}getUniqueRelationships(e){const n=[];for(const r of e)n.some(s=>this.areRelationshipsEqual(s,r))||n.push(r);return n}reset(){this.relationships=[],this.uniqueEntities.clear(),this.selectedEntity=null,this.uniqueEntityCount.clear()}getRelationships(){return this.relationships}getEntitiesList(){return Array.from(this.uniqueEntities.keys()).sort()}getEntitySource(e){return this.uniqueEntities.get(e)}selectEntity(e){return this.selectedEntity=e,this.getEntityRelationships(e)}getEntityRelationships(e){return this.relationships.filter(n=>n.entity1===e||n.entity2===e)}exportToJson(){return{relationships:this.relationships,entities:Object.fromEntries(this.uniqueEntities),selectedEntity:this.selectedEntity}}importFromJson(e){this.relationships=e.relationships||[],this.uniqueEntities=new Map(Object.entries(e.entities||{})),this.selectedEntity=e.selectedEntity||null,this.uniqueEntityCount.clear();for(const n of this.relationships)this.uniqueEntityCount.set(n.entity1,(this.uniqueEntityCount.get(n.entity1)||0)+1),this.uniqueEntityCount.set(n.entity2,(this.uniqueEntityCount.get(n.entity2)||0)+1)}getEntityCount(e){return this.uniqueEntityCount.get(e)||0}deleteEntity(e){this.relationships=this.relationships.filter(n=>n.entity1!==e&&n.entity2!==e),this.uniqueEntities.delete(e),this.uniqueEntityCount.delete(e)}}class Yu{static async getPageContent(){const[e]=await chrome.tabs.query({active:!0,currentWindow:!0}),[{result:n}]=await chrome.scripting.executeScript({target:{tabId:e.id},func:()=>{const r=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT,{acceptNode:function(a){const o=a.parentElement;if(!o||o.offsetHeight===0)return NodeFilter.FILTER_REJECT;const l=o.tagName.toLowerCase();return l==="script"||l==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});let i="",s;for(;s=r.nextNode();)i+=s.textContent+" ";return i.replace(/\s+/g," ").trim()}});return n}static async splitIntoChunks(e){const i=((await chrome.storage.sync.get("docagramOptions")).docagramOptions||Ll).chunkSize,s=[];for(let a=0;a0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=DC(l),l in Gu)return;Gu[l]=!0;const c=l.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${h}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":PC,c||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),c)return new Promise((f,p)=>{u.addEventListener("load",f),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};var Pd={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Ml,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",l="hour",c="day",h="week",u="month",f="quarter",p="year",d="date",g="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var I=["th","st","nd","rd"],E=R%100;return"["+R+(I[(E-20)%10]||I[E]||I[0])+"]"}},w=function(R,I,E){var D=String(R);return!D||D.length>=I?R:""+Array(I+1-D.length).join(E)+R},v={s:w,z:function(R){var I=-R.utcOffset(),E=Math.abs(I),D=Math.floor(E/60),T=E%60;return(I<=0?"+":"-")+w(D,2,"0")+":"+w(T,2,"0")},m:function R(I,E){if(I.date()1)return R(C[0])}else{var Y=I.name;_[Y]=I,T=Y}return!D&&T&&(k=T),T||!D&&k},N=function(R,I){if(O(R))return R.clone();var E=typeof I=="object"?I:{};return E.date=R,E.args=arguments,new $(E)},M=v;M.l=H,M.i=O,M.w=function(R,I){return N(R,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var $=function(){function R(E){this.$L=H(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[A]=!0}var I=R.prototype;return I.parse=function(E){this.$d=function(D){var T=D.date,j=D.utc;if(T===null)return new Date(NaN);if(M.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var C=T.match(x);if(C){var Y=C[2]-1||0,Q=(C[7]||"0").substring(0,3);return j?new Date(Date.UTC(C[1],Y,C[3]||1,C[4]||0,C[5]||0,C[6]||0,Q)):new Date(C[1],Y,C[3]||1,C[4]||0,C[5]||0,C[6]||0,Q)}}return new Date(T)}(E),this.init()},I.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},I.$utils=function(){return M},I.isValid=function(){return this.$d.toString()!==g},I.isSame=function(E,D){var T=N(E);return this.startOf(D)<=T&&T<=this.endOf(D)},I.isAfter=function(E,D){return N(E)t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return n*2.55;t/=360,e/=100,n/=100;const i=n<.5?n*(1+e):n+e-n*e,s=2*n-i;switch(r){case"r":return Qs.hue2rgb(s,i,t+1/3)*255;case"g":return Qs.hue2rgb(s,i,t)*255;case"b":return Qs.hue2rgb(s,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),s=Math.min(t,e,n),a=(i+s)/2;if(r==="l")return a*100;if(i===s)return 0;const o=i-s,l=a>.5?o/(2-i-s):o/(i+s);if(r==="s")return l*100;switch(i){case t:return((e-n)/o+(ee>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},zC={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},pt={channel:Qs,lang:NC,unit:zC},zn={};for(let t=0;t<=255;t++)zn[t]=pt.unit.dec2hex(t);const ne={ALL:0,RGB:1,HSL:2};class jC{constructor(){this.type=ne.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=ne.ALL}is(e){return this.type===e}}class qC{constructor(e,n){this.color=n,this.changed=!1,this.data=e,this.type=new jC}set(e,n){return this.color=n,this.changed=!1,this.data=e,this.type.type=ne.ALL,this}_ensureHSL(){const e=this.data,{h:n,s:r,l:i}=e;n===void 0&&(e.h=pt.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=pt.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=pt.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:n,g:r,b:i}=e;n===void 0&&(e.r=pt.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=pt.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=pt.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,n=e.r;return!this.type.is(ne.HSL)&&n!==void 0?n:(this._ensureHSL(),pt.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,n=e.g;return!this.type.is(ne.HSL)&&n!==void 0?n:(this._ensureHSL(),pt.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,n=e.b;return!this.type.is(ne.HSL)&&n!==void 0?n:(this._ensureHSL(),pt.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,n=e.h;return!this.type.is(ne.RGB)&&n!==void 0?n:(this._ensureRGB(),pt.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,n=e.s;return!this.type.is(ne.RGB)&&n!==void 0?n:(this._ensureRGB(),pt.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,n=e.l;return!this.type.is(ne.RGB)&&n!==void 0?n:(this._ensureRGB(),pt.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(ne.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(ne.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(ne.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(ne.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(ne.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(ne.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const io=new qC({r:0,g:0,b:0,a:0},"transparent"),Pr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Pr.re);if(!e)return;const n=e[1],r=parseInt(n,16),i=n.length,s=i%4===0,a=i>4,o=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return io.set({r:(r>>l*(c+3)&h)*o,g:(r>>l*(c+2)&h)*o,b:(r>>l*(c+1)&h)*o,a:s?(r&h)*o/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${zn[Math.round(e)]}${zn[Math.round(n)]}${zn[Math.round(r)]}${zn[Math.round(i*255)]}`:`#${zn[Math.round(e)]}${zn[Math.round(n)]}${zn[Math.round(r)]}`}},lr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(lr.hueRe);if(e){const[,n,r]=e;switch(r){case"grad":return pt.channel.clamp.h(parseFloat(n)*.9);case"rad":return pt.channel.clamp.h(parseFloat(n)*180/Math.PI);case"turn":return pt.channel.clamp.h(parseFloat(n)*360)}}return pt.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const n=t.match(lr.re);if(!n)return;const[,r,i,s,a,o]=n;return io.set({h:lr._hue2deg(r),s:pt.channel.clamp.s(parseFloat(i)),l:pt.channel.clamp.l(parseFloat(s)),a:a?pt.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${pt.lang.round(e)}, ${pt.lang.round(n)}%, ${pt.lang.round(r)}%, ${i})`:`hsl(${pt.lang.round(e)}, ${pt.lang.round(n)}%, ${pt.lang.round(r)}%)`}},Ki={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Ki.colors[t];if(e)return Pr.parse(e)},stringify:t=>{const e=Pr.stringify(t);for(const n in Ki.colors)if(Ki.colors[n]===e)return n}},ji={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const n=t.match(ji.re);if(!n)return;const[,r,i,s,a,o,l,c,h]=n;return io.set({r:pt.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:pt.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:pt.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?pt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${pt.lang.round(e)}, ${pt.lang.round(n)}, ${pt.lang.round(r)}, ${pt.lang.round(i)})`:`rgb(${pt.lang.round(e)}, ${pt.lang.round(n)}, ${pt.lang.round(r)})`}},gn={format:{keyword:Ki,hex:Pr,rgb:ji,rgba:ji,hsl:lr,hsla:lr},parse:t=>{if(typeof t!="string")return t;const e=Pr.parse(t)||ji.parse(t)||lr.parse(t)||Ki.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(ne.HSL)||t.data.r===void 0?lr.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?ji.stringify(t):Pr.stringify(t)},Dd=(t,e)=>{const n=gn.parse(t);for(const r in e)n[r]=pt.channel.clamp[r](e[r]);return gn.stringify(n)},Zi=(t,e,n=0,r=1)=>{if(typeof t!="number")return Dd(t,{a:e});const i=io.set({r:pt.channel.clamp.r(t),g:pt.channel.clamp.g(e),b:pt.channel.clamp.b(n),a:pt.channel.clamp.a(r)});return gn.stringify(i)},HC=t=>{const{r:e,g:n,b:r}=gn.parse(t),i=.2126*pt.channel.toLinear(e)+.7152*pt.channel.toLinear(n)+.0722*pt.channel.toLinear(r);return pt.lang.round(i)},WC=t=>HC(t)>=.5,Cs=t=>!WC(t),Od=(t,e,n)=>{const r=gn.parse(t),i=r[e],s=pt.channel.clamp[e](i+n);return i!==s&&(r[e]=s),gn.stringify(r)},it=(t,e)=>Od(t,"l",e),lt=(t,e)=>Od(t,"l",-e),P=(t,e)=>{const n=gn.parse(t),r={};for(const i in e)e[i]&&(r[i]=n[i]+e[i]);return Dd(t,r)},UC=(t,e,n=50)=>{const{r,g:i,b:s,a}=gn.parse(t),{r:o,g:l,b:c,a:h}=gn.parse(e),u=n/100,f=u*2-1,p=a-h,g=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,x=1-g,y=r*g+o*x,b=i*g+l*x,w=s*g+c*x,v=a*u+h*(1-u);return Zi(y,b,w,v)},X=(t,e=100)=>{const n=gn.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,UC(n,t,e)};/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */const{entries:$d,setPrototypeOf:Xu,isFrozen:VC,getPrototypeOf:YC,getOwnPropertyDescriptor:GC}=Object;let{freeze:ge,seal:We,create:Nd}=Object,{apply:Fl,construct:Rl}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e});We||(We=function(e){return e});Fl||(Fl=function(e,n,r){return e.apply(n,r)});Rl||(Rl=function(e,n){return new e(...n)});const Os=Fe(Array.prototype.forEach),Ku=Fe(Array.prototype.pop),Ei=Fe(Array.prototype.push),Js=Fe(String.prototype.toLowerCase),Vo=Fe(String.prototype.toString),Zu=Fe(String.prototype.match),Ai=Fe(String.prototype.replace),XC=Fe(String.prototype.indexOf),KC=Fe(String.prototype.trim),Ge=Fe(Object.prototype.hasOwnProperty),ue=Fe(RegExp.prototype.test),Li=ZC(TypeError);function Fe(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:Js;Xu&&Xu(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const s=n(i);s!==i&&(VC(e)||(e[r]=s),i=s)}t[i]=!0}return t}function QC(t){for(let e=0;e/gm),rv=We(/\${[\w\W]*}/gm),iv=We(/^data-[\-\w.\u00B7-\uFFFF]/),sv=We(/^aria-[\-\w]+$/),zd=We(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),av=We(/^(?:\w+script|data):/i),ov=We(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jd=We(/^html$/i),lv=We(/^[a-z][.\w]*(-[.\w]+)+$/i);var nf=Object.freeze({__proto__:null,MUSTACHE_EXPR:ev,ERB_EXPR:nv,TMPLIT_EXPR:rv,DATA_ATTR:iv,ARIA_ATTR:sv,IS_ALLOWED_URI:zd,IS_SCRIPT_OR_DATA:av,ATTR_WHITESPACE:ov,DOCTYPE_NAME:jd,CUSTOM_ELEMENT:lv});const Bi={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},cv=function(){return typeof window>"u"?null:window},hv=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function qd(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cv();const e=rt=>qd(rt);if(e.version="3.1.6",e.removed=[],!t||!t.document||t.document.nodeType!==Bi.document)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:p}=t,d=l.prototype,g=Mi(d,"cloneNode"),x=Mi(d,"remove"),y=Mi(d,"nextSibling"),b=Mi(d,"childNodes"),w=Mi(d,"parentNode");if(typeof a=="function"){const rt=n.createElement("template");rt.content&&rt.content.ownerDocument&&(n=rt.content.ownerDocument)}let v,k="";const{implementation:_,createNodeIterator:A,createDocumentFragment:O,getElementsByTagName:H}=n,{importNode:N}=r;let M={};e.isSupported=typeof $d=="function"&&typeof w=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:$,ERB_EXPR:z,TMPLIT_EXPR:R,DATA_ATTR:I,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:D,ATTR_WHITESPACE:T,CUSTOM_ELEMENT:j}=nf;let{IS_ALLOWED_URI:C}=nf,Y=null;const Q=kt({},[...Qu,...Yo,...Go,...Xo,...Ju]);let S=null;const ut=kt({},[...tf,...Ko,...ef,...$s]);let ct=Object.seal(Nd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wt=null,K=null,xt=!0,_t=!0,ot=!1,ft=!0,bt=!1,zt=!0,Ht=!1,Pe=!1,De=!1,le=!1,Dn=!1,Oe=!1,vi=!0,Ps=!1;const qo="user-content-";let _i=!0,er=!1,On={},q=null;const G=kt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let yt=null;const vt=kt({},["audio","video","img","source","image","track"]);let Tt=null;const ye=kt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",xe="http://www.w3.org/2000/svg",ce="http://www.w3.org/1999/xhtml";let Ne=ce,Xt=!1,rn=null;const Ye=kt({},[$e,xe,ce],Vo);let ki=null;const cC=["application/xhtml+xml","text/html"],hC="text/html";let Yt=null,Ar=null;const uC=n.createElement("form"),Au=function(F){return F instanceof RegExp||F instanceof Function},Ho=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ar&&Ar===F)){if((!F||typeof F!="object")&&(F={}),F=rr(F),ki=cC.indexOf(F.PARSER_MEDIA_TYPE)===-1?hC:F.PARSER_MEDIA_TYPE,Yt=ki==="application/xhtml+xml"?Vo:Js,Y=Ge(F,"ALLOWED_TAGS")?kt({},F.ALLOWED_TAGS,Yt):Q,S=Ge(F,"ALLOWED_ATTR")?kt({},F.ALLOWED_ATTR,Yt):ut,rn=Ge(F,"ALLOWED_NAMESPACES")?kt({},F.ALLOWED_NAMESPACES,Vo):Ye,Tt=Ge(F,"ADD_URI_SAFE_ATTR")?kt(rr(ye),F.ADD_URI_SAFE_ATTR,Yt):ye,yt=Ge(F,"ADD_DATA_URI_TAGS")?kt(rr(vt),F.ADD_DATA_URI_TAGS,Yt):vt,q=Ge(F,"FORBID_CONTENTS")?kt({},F.FORBID_CONTENTS,Yt):G,wt=Ge(F,"FORBID_TAGS")?kt({},F.FORBID_TAGS,Yt):{},K=Ge(F,"FORBID_ATTR")?kt({},F.FORBID_ATTR,Yt):{},On=Ge(F,"USE_PROFILES")?F.USE_PROFILES:!1,xt=F.ALLOW_ARIA_ATTR!==!1,_t=F.ALLOW_DATA_ATTR!==!1,ot=F.ALLOW_UNKNOWN_PROTOCOLS||!1,ft=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,bt=F.SAFE_FOR_TEMPLATES||!1,zt=F.SAFE_FOR_XML!==!1,Ht=F.WHOLE_DOCUMENT||!1,le=F.RETURN_DOM||!1,Dn=F.RETURN_DOM_FRAGMENT||!1,Oe=F.RETURN_TRUSTED_TYPE||!1,De=F.FORCE_BODY||!1,vi=F.SANITIZE_DOM!==!1,Ps=F.SANITIZE_NAMED_PROPS||!1,_i=F.KEEP_CONTENT!==!1,er=F.IN_PLACE||!1,C=F.ALLOWED_URI_REGEXP||zd,Ne=F.NAMESPACE||ce,ct=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&Au(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ct.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&Au(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ct.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ct.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),bt&&(_t=!1),Dn&&(le=!0),On&&(Y=kt({},Ju),S=[],On.html===!0&&(kt(Y,Qu),kt(S,tf)),On.svg===!0&&(kt(Y,Yo),kt(S,Ko),kt(S,$s)),On.svgFilters===!0&&(kt(Y,Go),kt(S,Ko),kt(S,$s)),On.mathMl===!0&&(kt(Y,Xo),kt(S,ef),kt(S,$s))),F.ADD_TAGS&&(Y===Q&&(Y=rr(Y)),kt(Y,F.ADD_TAGS,Yt)),F.ADD_ATTR&&(S===ut&&(S=rr(S)),kt(S,F.ADD_ATTR,Yt)),F.ADD_URI_SAFE_ATTR&&kt(Tt,F.ADD_URI_SAFE_ATTR,Yt),F.FORBID_CONTENTS&&(q===G&&(q=rr(q)),kt(q,F.FORBID_CONTENTS,Yt)),_i&&(Y["#text"]=!0),Ht&&kt(Y,["html","head","body"]),Y.table&&(kt(Y,["tbody"]),delete wt.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw Li('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Li('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=F.TRUSTED_TYPES_POLICY,k=v.createHTML("")}else v===void 0&&(v=hv(p,i)),v!==null&&typeof k=="string"&&(k=v.createHTML(""));ge&&ge(F),Ar=F}},Lu=kt({},["mi","mo","mn","ms","mtext"]),Mu=kt({},["foreignobject","annotation-xml"]),fC=kt({},["title","style","font","a","script"]),Bu=kt({},[...Yo,...Go,...JC]),Iu=kt({},[...Xo,...tv]),pC=function(F){let V=w(F);(!V||!V.tagName)&&(V={namespaceURI:Ne,tagName:"template"});const J=Js(F.tagName),Rt=Js(V.tagName);return rn[F.namespaceURI]?F.namespaceURI===xe?V.namespaceURI===ce?J==="svg":V.namespaceURI===$e?J==="svg"&&(Rt==="annotation-xml"||Lu[Rt]):!!Bu[J]:F.namespaceURI===$e?V.namespaceURI===ce?J==="math":V.namespaceURI===xe?J==="math"&&Mu[Rt]:!!Iu[J]:F.namespaceURI===ce?V.namespaceURI===xe&&!Mu[Rt]||V.namespaceURI===$e&&!Lu[Rt]?!1:!Iu[J]&&(fC[J]||!Bu[J]):!!(ki==="application/xhtml+xml"&&rn[F.namespaceURI]):!1},sn=function(F){Ei(e.removed,{element:F});try{w(F).removeChild(F)}catch{x(F)}},Ds=function(F,V){try{Ei(e.removed,{attribute:V.getAttributeNode(F),from:V})}catch{Ei(e.removed,{attribute:null,from:V})}if(V.removeAttribute(F),F==="is"&&!S[F])if(le||Dn)try{sn(V)}catch{}else try{V.setAttribute(F,"")}catch{}},Fu=function(F){let V=null,J=null;if(De)F=""+F;else{const Kt=Zu(F,/^[\r\n\t ]+/);J=Kt&&Kt[0]}ki==="application/xhtml+xml"&&Ne===ce&&(F=''+F+"");const Rt=v?v.createHTML(F):F;if(Ne===ce)try{V=new f().parseFromString(Rt,ki)}catch{}if(!V||!V.documentElement){V=_.createDocument(Ne,"template",null);try{V.documentElement.innerHTML=Xt?k:Rt}catch{}}const ee=V.body||V.documentElement;return F&&J&&ee.insertBefore(n.createTextNode(J),ee.childNodes[0]||null),Ne===ce?H.call(V,Ht?"html":"body")[0]:Ht?V.documentElement:ee},Ru=function(F){return A.call(F.ownerDocument||F,F,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Pu=function(F){return F instanceof u&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},Du=function(F){return typeof o=="function"&&F instanceof o},vn=function(F,V,J){M[F]&&Os(M[F],Rt=>{Rt.call(e,V,J,Ar)})},Ou=function(F){let V=null;if(vn("beforeSanitizeElements",F,null),Pu(F))return sn(F),!0;const J=Yt(F.nodeName);if(vn("uponSanitizeElement",F,{tagName:J,allowedTags:Y}),F.hasChildNodes()&&!Du(F.firstElementChild)&&ue(/<[/\w]/g,F.innerHTML)&&ue(/<[/\w]/g,F.textContent)||F.nodeType===Bi.progressingInstruction||zt&&F.nodeType===Bi.comment&&ue(/<[/\w]/g,F.data))return sn(F),!0;if(!Y[J]||wt[J]){if(!wt[J]&&Nu(J)&&(ct.tagNameCheck instanceof RegExp&&ue(ct.tagNameCheck,J)||ct.tagNameCheck instanceof Function&&ct.tagNameCheck(J)))return!1;if(_i&&!q[J]){const Rt=w(F)||F.parentNode,ee=b(F)||F.childNodes;if(ee&&Rt){const Kt=ee.length;for(let be=Kt-1;be>=0;--be){const an=g(ee[be],!0);an.__removalCount=(F.__removalCount||0)+1,Rt.insertBefore(an,y(F))}}}return sn(F),!0}return F instanceof l&&!pC(F)||(J==="noscript"||J==="noembed"||J==="noframes")&&ue(/<\/no(script|embed|frames)/i,F.innerHTML)?(sn(F),!0):(bt&&F.nodeType===Bi.text&&(V=F.textContent,Os([$,z,R],Rt=>{V=Ai(V,Rt," ")}),F.textContent!==V&&(Ei(e.removed,{element:F.cloneNode()}),F.textContent=V)),vn("afterSanitizeElements",F,null),!1)},$u=function(F,V,J){if(vi&&(V==="id"||V==="name")&&(J in n||J in uC))return!1;if(!(_t&&!K[V]&&ue(I,V))){if(!(xt&&ue(E,V))){if(!S[V]||K[V]){if(!(Nu(F)&&(ct.tagNameCheck instanceof RegExp&&ue(ct.tagNameCheck,F)||ct.tagNameCheck instanceof Function&&ct.tagNameCheck(F))&&(ct.attributeNameCheck instanceof RegExp&&ue(ct.attributeNameCheck,V)||ct.attributeNameCheck instanceof Function&&ct.attributeNameCheck(V))||V==="is"&&ct.allowCustomizedBuiltInElements&&(ct.tagNameCheck instanceof RegExp&&ue(ct.tagNameCheck,J)||ct.tagNameCheck instanceof Function&&ct.tagNameCheck(J))))return!1}else if(!Tt[V]){if(!ue(C,Ai(J,T,""))){if(!((V==="src"||V==="xlink:href"||V==="href")&&F!=="script"&&XC(J,"data:")===0&&yt[F])){if(!(ot&&!ue(D,Ai(J,T,"")))){if(J)return!1}}}}}}return!0},Nu=function(F){return F!=="annotation-xml"&&Zu(F,j)},zu=function(F){vn("beforeSanitizeAttributes",F,null);const{attributes:V}=F;if(!V)return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:S};let Rt=V.length;for(;Rt--;){const ee=V[Rt],{name:Kt,namespaceURI:be,value:an}=ee,Si=Yt(Kt);let he=Kt==="value"?an:KC(an);if(J.attrName=Si,J.attrValue=he,J.keepAttr=!0,J.forceKeepAttr=void 0,vn("uponSanitizeAttribute",F,J),he=J.attrValue,zt&&ue(/((--!?|])>)|<\/(style|title)/i,he)){Ds(Kt,F);continue}if(J.forceKeepAttr||(Ds(Kt,F),!J.keepAttr))continue;if(!ft&&ue(/\/>/i,he)){Ds(Kt,F);continue}bt&&Os([$,z,R],qu=>{he=Ai(he,qu," ")});const ju=Yt(F.nodeName);if($u(ju,Si,he)){if(Ps&&(Si==="id"||Si==="name")&&(Ds(Kt,F),he=qo+he),v&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!be)switch(p.getAttributeType(ju,Si)){case"TrustedHTML":{he=v.createHTML(he);break}case"TrustedScriptURL":{he=v.createScriptURL(he);break}}try{be?F.setAttributeNS(be,Kt,he):F.setAttribute(Kt,he),Pu(F)?sn(F):Ku(e.removed)}catch{}}}vn("afterSanitizeAttributes",F,null)},dC=function rt(F){let V=null;const J=Ru(F);for(vn("beforeSanitizeShadowDOM",F,null);V=J.nextNode();)vn("uponSanitizeShadowNode",V,null),!Ou(V)&&(V.content instanceof s&&rt(V.content),zu(V));vn("afterSanitizeShadowDOM",F,null)};return e.sanitize=function(rt){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},V=null,J=null,Rt=null,ee=null;if(Xt=!rt,Xt&&(rt=""),typeof rt!="string"&&!Du(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw Li("dirty is not a string, aborting")}else throw Li("toString is not a function");if(!e.isSupported)return rt;if(Pe||Ho(F),e.removed=[],typeof rt=="string"&&(er=!1),er){if(rt.nodeName){const an=Yt(rt.nodeName);if(!Y[an]||wt[an])throw Li("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof o)V=Fu(""),J=V.ownerDocument.importNode(rt,!0),J.nodeType===Bi.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?V=J:V.appendChild(J);else{if(!le&&!bt&&!Ht&&rt.indexOf("<")===-1)return v&&Oe?v.createHTML(rt):rt;if(V=Fu(rt),!V)return le?null:Oe?k:""}V&&De&&sn(V.firstChild);const Kt=Ru(er?rt:V);for(;Rt=Kt.nextNode();)Ou(Rt)||(Rt.content instanceof s&&dC(Rt.content),zu(Rt));if(er)return rt;if(le){if(Dn)for(ee=O.call(V.ownerDocument);V.firstChild;)ee.appendChild(V.firstChild);else ee=V;return(S.shadowroot||S.shadowrootmode)&&(ee=N.call(r,ee,!0)),ee}let be=Ht?V.outerHTML:V.innerHTML;return Ht&&Y["!doctype"]&&V.ownerDocument&&V.ownerDocument.doctype&&V.ownerDocument.doctype.name&&ue(jd,V.ownerDocument.doctype.name)&&(be=" +`+be),bt&&Os([$,z,R],an=>{be=Ai(be,an," ")}),v&&Oe?v.createHTML(be):be},e.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ho(rt),Pe=!0},e.clearConfig=function(){Ar=null,Pe=!1},e.isValidAttribute=function(rt,F,V){Ar||Ho({});const J=Yt(rt),Rt=Yt(F);return $u(J,Rt,V)},e.addHook=function(rt,F){typeof F=="function"&&(M[rt]=M[rt]||[],Ei(M[rt],F))},e.removeHook=function(rt){if(M[rt])return Ku(M[rt])},e.removeHooks=function(rt){M[rt]&&(M[rt]=[])},e.removeAllHooks=function(){M={}},e}var Xr=qd(),Hd=Object.defineProperty,m=(t,e)=>Hd(t,"name",{value:e,configurable:!0}),uv=(t,e)=>{for(var n in e)Hd(t,n,{get:e[n],enumerable:!0})},_n={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:m((...t)=>{},"trace"),debug:m((...t)=>{},"debug"),info:m((...t)=>{},"info"),warn:m((...t)=>{},"warn"),error:m((...t)=>{},"error"),fatal:m((...t)=>{},"fatal")},Zc=m(function(t="fatal"){let e=_n.fatal;typeof t=="string"?t.toLowerCase()in _n&&(e=_n[t]):typeof t=="number"&&(e=t),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},e<=_n.fatal&&(W.fatal=console.error?console.error.bind(console,ze("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ze("FATAL"))),e<=_n.error&&(W.error=console.error?console.error.bind(console,ze("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ze("ERROR"))),e<=_n.warn&&(W.warn=console.warn?console.warn.bind(console,ze("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ze("WARN"))),e<=_n.info&&(W.info=console.info?console.info.bind(console,ze("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ze("INFO"))),e<=_n.debug&&(W.debug=console.debug?console.debug.bind(console,ze("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ze("DEBUG"))),e<=_n.trace&&(W.trace=console.debug?console.debug.bind(console,ze("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ze("TRACE")))},"setLogLevel"),ze=m(t=>`%c${$C().format("ss.SSS")} : ${t} : `,"format"),Wd=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Qi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,fv=/\s*%%.*\n/gm,zr,Ud=(zr=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},m(zr,"UnknownDiagramError"),zr),Kr={},Qc=m(function(t,e){t=t.replace(Wd,"").replace(Qi,"").replace(fv,` +`);for(const[n,{detector:r}]of Object.entries(Kr))if(r(t,e))return n;throw new Ud(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Vd=m((...t)=>{for(const{id:e,detector:n,loader:r}of t)Yd(e,n,r)},"registerLazyLoadedDiagrams"),Yd=m((t,e,n)=>{Kr[t]&&W.warn(`Detector with key ${t} already exists. Overwriting.`),Kr[t]={detector:e,loader:n},W.debug(`Detector with key ${t} added${n?" with loader":""}`)},"addDetector"),pv=m(t=>Kr[t].loader,"getDiagramLoader"),Pl=m((t,e,{depth:n=2,clobber:r=!1}={})=>{const i={depth:n,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>Pl(t,s,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),t):t===void 0||n<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(s=>{typeof e[s]=="object"&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=Pl(t[s],e[s],{depth:n-1,clobber:r})):(r||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},"assignWithDepth"),Jt=Pl,so="#ffffff",ao="#f2f2f2",fe=m((t,e)=>e?P(t,{s:-40,l:10}):P(t,{s:-40,l:-10}),"mkBorder"),jr,dv=(jr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var n,r,i,s,a,o,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||P(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||P(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||fe(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||fe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||fe(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||fe(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||X(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||X(this.tertiaryColor),this.lineColor=this.lineColor||X(this.background),this.arrowheadColor=this.arrowheadColor||X(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?lt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||lt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||X(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||it(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||P(this.primaryColor,{h:30}),this.cScale4=this.cScale4||P(this.primaryColor,{h:60}),this.cScale5=this.cScale5||P(this.primaryColor,{h:90}),this.cScale6=this.cScale6||P(this.primaryColor,{h:120}),this.cScale7=this.cScale7||P(this.primaryColor,{h:150}),this.cScale8=this.cScale8||P(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||P(this.primaryColor,{h:270}),this.cScale10=this.cScale10||P(this.primaryColor,{h:300}),this.cScale11=this.cScale11||P(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p{this[r]=e[r]}),this.updateColors(),n.forEach(r=>{this[r]=e[r]})}},m(jr,"Theme"),jr),gv=m(t=>{const e=new dv;return e.calculate(t),e},"getThemeVariables"),qr,mv=(qr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=it(this.primaryColor,16),this.tertiaryColor=P(this.primaryColor,{h:-160}),this.primaryBorderColor=X(this.background),this.secondaryBorderColor=fe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fe(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=it(X("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Zi(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=lt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=lt(this.sectionBkgColor,10),this.taskBorderColor=Zi(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Zi(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,n,r,i,s,a,o,l,c,h,u;this.secondBkg=it(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=it(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=it(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=P(this.primaryColor,{h:64}),this.fillType3=P(this.secondaryColor,{h:64}),this.fillType4=P(this.primaryColor,{h:-64}),this.fillType5=P(this.secondaryColor,{h:-64}),this.fillType6=P(this.primaryColor,{h:128}),this.fillType7=P(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||P(this.primaryColor,{h:30}),this.cScale4=this.cScale4||P(this.primaryColor,{h:60}),this.cScale5=this.cScale5||P(this.primaryColor,{h:90}),this.cScale6=this.cScale6||P(this.primaryColor,{h:120}),this.cScale7=this.cScale7||P(this.primaryColor,{h:150}),this.cScale8=this.cScale8||P(this.primaryColor,{h:210}),this.cScale9=this.cScale9||P(this.primaryColor,{h:270}),this.cScale10=this.cScale10||P(this.primaryColor,{h:300}),this.cScale11=this.cScale11||P(this.primaryColor,{h:330});for(let f=0;f{this[r]=e[r]}),this.updateColors(),n.forEach(r=>{this[r]=e[r]})}},m(qr,"Theme"),qr),yv=m(t=>{const e=new mv;return e.calculate(t),e},"getThemeVariables"),Hr,xv=(Hr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=P(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=P(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.primaryColor,this.darkMode),this.secondaryBorderColor=fe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fe(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Zi(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,n,r,i,s,a,o,l,c,h,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||P(this.primaryColor,{h:30}),this.cScale4=this.cScale4||P(this.primaryColor,{h:60}),this.cScale5=this.cScale5||P(this.primaryColor,{h:90}),this.cScale6=this.cScale6||P(this.primaryColor,{h:120}),this.cScale7=this.cScale7||P(this.primaryColor,{h:150}),this.cScale8=this.cScale8||P(this.primaryColor,{h:210}),this.cScale9=this.cScale9||P(this.primaryColor,{h:270}),this.cScale10=this.cScale10||P(this.primaryColor,{h:300}),this.cScale11=this.cScale11||P(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||lt(this.tertiaryColor,40);for(let f=0;f{this[r]=e[r]}),this.updateColors(),n.forEach(r=>{this[r]=e[r]})}},m(Hr,"Theme"),Hr),bv=m(t=>{const e=new xv;return e.calculate(t),e},"getThemeVariables"),Wr,wv=(Wr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=it("#cde498",10),this.primaryBorderColor=fe(this.primaryColor,this.darkMode),this.secondaryBorderColor=fe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fe(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.primaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,n,r,i,s,a,o,l,c,h,u;this.actorBorder=lt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||P(this.primaryColor,{h:30}),this.cScale4=this.cScale4||P(this.primaryColor,{h:60}),this.cScale5=this.cScale5||P(this.primaryColor,{h:90}),this.cScale6=this.cScale6||P(this.primaryColor,{h:120}),this.cScale7=this.cScale7||P(this.primaryColor,{h:150}),this.cScale8=this.cScale8||P(this.primaryColor,{h:210}),this.cScale9=this.cScale9||P(this.primaryColor,{h:270}),this.cScale10=this.cScale10||P(this.primaryColor,{h:300}),this.cScale11=this.cScale11||P(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||lt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||lt(this.tertiaryColor,40);for(let f=0;f{this[r]=e[r]}),this.updateColors(),n.forEach(r=>{this[r]=e[r]})}},m(Wr,"Theme"),Wr),Cv=m(t=>{const e=new wv;return e.calculate(t),e},"getThemeVariables"),Ur,vv=(Ur=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=it(this.contrast,55),this.background="#ffffff",this.tertiaryColor=P(this.primaryColor,{h:-160}),this.primaryBorderColor=fe(this.primaryColor,this.darkMode),this.secondaryBorderColor=fe(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=fe(this.tertiaryColor,this.darkMode),this.primaryTextColor=X(this.primaryColor),this.secondaryTextColor=X(this.secondaryColor),this.tertiaryTextColor=X(this.tertiaryColor),this.lineColor=X(this.background),this.textColor=X(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,n,r,i,s,a,o,l,c,h,u;this.secondBkg=it(this.contrast,55),this.border2=this.contrast,this.actorBorder=it(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let f=0;f{this[r]=e[r]}),this.updateColors(),n.forEach(r=>{this[r]=e[r]})}},m(Ur,"Theme"),Ur),_v=m(t=>{const e=new vv;return e.calculate(t),e},"getThemeVariables"),En={base:{getThemeVariables:gv},dark:{getThemeVariables:yv},default:{getThemeVariables:bv},forest:{getThemeVariables:Cv},neutral:{getThemeVariables:_v}},$n={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Gd={...$n,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:En.default.getThemeVariables(),sequence:{...$n.sequence,messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:m(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:m(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...$n.gantt,tickInterval:void 0,useWidth:void 0},c4:{...$n.c4,useWidth:void 0,personFont:m(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:m(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:m(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:m(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:m(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:m(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:m(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:m(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:m(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:m(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:m(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:m(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:m(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:m(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:m(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:m(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:m(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:m(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:m(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:m(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:m(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:m(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...$n.pie,useWidth:984},xyChart:{...$n.xyChart,useWidth:void 0},requirement:{...$n.requirement,useWidth:void 0},packet:{...$n.packet}},Xd=m((t,e="")=>Object.keys(t).reduce((n,r)=>Array.isArray(t[r])?n:typeof t[r]=="object"&&t[r]!==null?[...n,e+r,...Xd(t[r],"")]:[...n,e+r],[]),"keyify"),kv=new Set(Xd(Gd,"")),Kd=Gd,da=m(t=>{if(W.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>da(e));return}for(const e of Object.keys(t)){if(W.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!kv.has(e)||t[e]==null){W.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){W.debug("sanitizing object",e),da(t[e]);continue}const n=["themeCSS","fontFamily","altFontFamily"];for(const r of n)e.includes(r)&&(W.debug("sanitizing css option",e),t[e]=Sv(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const n=t.themeVariables[e];n!=null&&n.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}W.debug("After sanitization",t)}},"sanitizeDirective"),Sv=m(t=>{let e=0,n=0;for(const r of t){if(e{let n=Jt({},t),r={};for(const i of e)tg(i),r=Jt(r,i);if(n=Jt(n,r),r.theme&&r.theme in En){const i=Jt({},Zd),s=Jt(i.themeVariables||{},r.themeVariables);n.theme&&n.theme in En&&(n.themeVariables=En[n.theme].getThemeVariables(s))}return Ji=n,eg(Ji),Ji},"updateCurrentConfig"),Tv=m(t=>(ve=Jt({},Zr),ve=Jt(ve,t),t.theme&&En[t.theme]&&(ve.themeVariables=En[t.theme].getThemeVariables(t.themeVariables)),oo(ve,Qr),ve),"setSiteConfig"),Ev=m(t=>{Zd=Jt({},t)},"saveConfigFromInitialize"),Av=m(t=>(ve=Jt(ve,t),oo(ve,Qr),ve),"updateSiteConfig"),Qd=m(()=>Jt({},ve),"getSiteConfig"),Jd=m(t=>(eg(t),Jt(Ji,t),en()),"setConfig"),en=m(()=>Jt({},Ji),"getConfig"),tg=m(t=>{t&&(["secure",...ve.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(W.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&tg(t[e])}))},"sanitize"),Lv=m(t=>{var e;da(t),t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Qr.push(t),oo(ve,Qr)},"addDirective"),ga=m((t=ve)=>{Qr=[],oo(t,Qr)},"reset"),Mv={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},rf={},Bv=m(t=>{rf[t]||(W.warn(Mv[t]),rf[t]=!0)},"issueWarning"),eg=m(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Bv("LAZY_LOAD_DEPRECATED")},"checkConfig"),vs=//gi,Iv=m(t=>t?ig(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Fv=(()=>{let t=!1;return()=>{t||(ng(),t=!0)}})();function ng(){const t="data-temp-href-target";Xr.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Xr.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}m(ng,"setupDompurifyHooks");var rg=m(t=>(Fv(),Xr.sanitize(t)),"removeScript"),sf=m((t,e)=>{var n;if(((n=e.flowchart)==null?void 0:n.htmlLabels)!==!1){const r=e.securityLevel;r==="antiscript"||r==="strict"?t=rg(t):r!=="loose"&&(t=ig(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=Ov(t))}return t},"sanitizeMore"),gr=m((t,e)=>t&&(e.dompurifyConfig?t=Xr.sanitize(sf(t,e),e.dompurifyConfig).toString():t=Xr.sanitize(sf(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),Rv=m((t,e)=>typeof t=="string"?gr(t,e):t.flat().map(n=>gr(n,e)),"sanitizeTextOrArray"),Pv=m(t=>vs.test(t),"hasBreaks"),Dv=m(t=>t.split(vs),"splitBreaks"),Ov=m(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),ig=m(t=>t.replace(vs,"#br#"),"breakToPlaceholder"),$v=m(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),te=m(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Nv=m(function(...t){const e=t.filter(n=>!isNaN(n));return Math.max(...e)},"getMax"),zv=m(function(...t){const e=t.filter(n=>!isNaN(n));return Math.min(...e)},"getMin"),m4=m(function(t){const e=t.split(/(,)/),n=[];for(let r=0;r0&&r+1Math.max(0,t.split(e).length-1),"countOccurrence"),jv=m((t,e)=>{const n=Dl(t,"~"),r=Dl(e,"~");return n===1&&r===1},"shouldCombineSets"),qv=m(t=>{const e=Dl(t,"~");let n=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),n=!0);const r=[...t];let i=r.indexOf("~"),s=r.lastIndexOf("~");for(;i!==-1&&s!==-1&&i!==s;)r[i]="<",r[s]=">",i=r.indexOf("~"),s=r.lastIndexOf("~");return n&&r.unshift("~"),r.join("")},"processSet"),af=m(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ol=/\$\$(.*)\$\$/g,Jr=m(t=>{var e;return(((e=t.match(Ol))==null?void 0:e.length)??0)>0},"hasKatex"),y4=m(async(t,e)=>{t=await Jc(t,e);const n=document.createElement("div");n.innerHTML=t,n.id="katex-temp",n.style.visibility="hidden",n.style.position="absolute",n.style.top="0";const r=document.querySelector("body");r==null||r.insertAdjacentElement("beforeend",n);const i={width:n.clientWidth,height:n.clientHeight};return n.remove(),i},"calculateMathMLDimensions"),Jc=m(async(t,e)=>{if(!Jr(t))return t;if(!(af()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ol,"MathML is unsupported in this environment.");const{default:n}=await Ft(async()=>{const{default:i}=await import("./c-katex.CvgdMzdh.js");return{default:i}},[]),r=e.forceLegacyMathML||!af()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(vs).map(i=>Jr(i)?`
${i}
`:`
${i}
`).join("").replace(Ol,(i,s)=>n.renderToString(s,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),ci={getRows:Iv,sanitizeText:gr,sanitizeTextOrArray:Rv,hasBreaks:Pv,splitBreaks:Dv,lineBreakRegex:vs,removeScript:rg,getUrl:$v,evaluate:te,getMax:Nv,getMin:zv},Hv=m(function(t,e){for(let n of e)t.attr(n[0],n[1])},"d3Attrs"),Wv=m(function(t,e,n){let r=new Map;return n?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r},"calculateSvgSizeAttrs"),sg=m(function(t,e,n,r){const i=Wv(e,n,r);Hv(t,i)},"configureSvgSize"),Uv=m(function(t,e,n,r){const i=e.node().getBBox(),s=i.width,a=i.height;W.info(`SVG bounds: ${s}x${a}`,i);let o=0,l=0;W.info(`Graph bounds: ${o}x${l}`,t),o=s+n*2,l=a+n*2,W.info(`Calculated bounds: ${o}x${l}`),sg(e,l,o,r);const c=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;e.attr("viewBox",c)},"setupGraphViewbox"),ta={},Vv=m((t,e,n)=>{let r="";return t in ta&&ta[t]?r=ta[t](n):W.warn(`No theme found for ${t}`),` & { + font-family: ${n.fontFamily}; + font-size: ${n.fontSize}; + fill: ${n.textColor} } /* Classes common for multiple diagrams */ & .error-icon { - fill: ${r.errorBkgColor}; + fill: ${n.errorBkgColor}; } & .error-text { - fill: ${r.errorTextColor}; - stroke: ${r.errorTextColor}; + fill: ${n.errorTextColor}; + stroke: ${n.errorTextColor}; } & .edge-thickness-normal { @@ -39,169 +59,180 @@ var Eb=Object.defineProperty;var vh=t=>{throw TypeError(t)};var Ab=(t,e,r)=>e in } & .marker { - fill: ${r.lineColor}; - stroke: ${r.lineColor}; + fill: ${n.lineColor}; + stroke: ${n.lineColor}; } & .marker.cross { - stroke: ${r.lineColor}; + stroke: ${n.lineColor}; } & svg { - font-family: ${r.fontFamily}; - font-size: ${r.fontSize}; + font-family: ${n.fontFamily}; + font-size: ${n.fontSize}; } & p { margin: 0 } - ${n} + ${r} ${e} -`},"getStyles"),J1=g((t,e)=>{e!==void 0&&(Ca[t]=e)},"addStylesForDiagram"),tw=Q1,Lp={};y1(Lp,{clear:()=>ew,getAccDescription:()=>aw,getAccTitle:()=>nw,getDiagramTitle:()=>ow,setAccDescription:()=>iw,setAccTitle:()=>rw,setDiagramTitle:()=>sw});var Xl="",Kl="",Zl="",Ql=g(t=>Gr(t,Ne()),"sanitizeText"),ew=g(()=>{Xl="",Zl="",Kl=""},"clear"),rw=g(t=>{Xl=Ql(t).replace(/^\s+/g,"")},"setAccTitle"),nw=g(()=>Xl,"getAccTitle"),iw=g(t=>{Zl=Ql(t).replace(/\n\s+/g,` -`)},"setAccDescription"),aw=g(()=>Zl,"getAccDescription"),sw=g(t=>{Kl=Ql(t)},"setDiagramTitle"),ow=g(()=>Kl,"getDiagramTitle"),zh=z,lw=Yl,_t=Ne,$3=kp,R3=Ln,Bp=g(t=>Gr(t,_t()),"sanitizeText"),cw=Z1,hw=g(()=>Lp,"getCommonDb"),Da={},Pa=g((t,e,r)=>{var n;Da[t]&&zh.warn(`Diagram with id ${t} already registered. Overwriting.`),Da[t]=e,r&&mp(t,r),J1(t,e.styles),(n=e.injectUtils)==null||n.call(e,zh,lw,_t,Bp,cw,hw(),()=>{})},"registerDiagram"),Ho=g(t=>{if(t in Da)return Da[t];throw new uw(t)},"getDiagram"),Sn,uw=(Sn=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},g(Sn,"DiagramNotFoundError"),Sn);function Jl(t){return typeof t>"u"||t===null}g(Jl,"isNothing");function Mp(t){return typeof t=="object"&&t!==null}g(Mp,"isObject");function Fp(t){return Array.isArray(t)?t:Jl(t)?[]:[t]}g(Fp,"toArray");function Ip(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;r{e!==void 0&&(ta[t]=e)},"addStylesForDiagram"),Gv=Vv,ag={};uv(ag,{clear:()=>Xv,getAccDescription:()=>Jv,getAccTitle:()=>Zv,getDiagramTitle:()=>e_,setAccDescription:()=>Qv,setAccTitle:()=>Kv,setDiagramTitle:()=>t_});var th="",eh="",nh="",rh=m(t=>gr(t,en()),"sanitizeText"),Xv=m(()=>{th="",nh="",eh=""},"clear"),Kv=m(t=>{th=rh(t).replace(/^\s+/g,"")},"setAccTitle"),Zv=m(()=>th,"getAccTitle"),Qv=m(t=>{nh=rh(t).replace(/\n\s+/g,` +`)},"setAccDescription"),Jv=m(()=>nh,"getAccDescription"),t_=m(t=>{eh=rh(t)},"setDiagramTitle"),e_=m(()=>eh,"getDiagramTitle"),of=W,n_=Zc,Lt=en,x4=Jd,b4=Zr,og=m(t=>gr(t,Lt()),"sanitizeText"),r_=Uv,i_=m(()=>ag,"getCommonDb"),ma={},ya=m((t,e,n)=>{var r;ma[t]&&of.warn(`Diagram with id ${t} already registered. Overwriting.`),ma[t]=e,n&&Yd(t,n),Yv(t,e.styles),(r=e.injectUtils)==null||r.call(e,of,n_,Lt,og,r_,i_(),()=>{})},"registerDiagram"),$l=m(t=>{if(t in ma)return ma[t];throw new s_(t)},"getDiagram"),Vr,s_=(Vr=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},m(Vr,"DiagramNotFoundError"),Vr);function ih(t){return typeof t>"u"||t===null}m(ih,"isNothing");function lg(t){return typeof t=="object"&&t!==null}m(lg,"isObject");function cg(t){return Array.isArray(t)?t:ih(t)?[]:[t]}m(cg,"toArray");function hg(t,e){var n,r,i,s;if(e)for(s=Object.keys(e),n=0,r=s.length;no&&(a=" ... ",e=n-o+a.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:n-e+a.length}}g(ka,"getLine");function _a(t,e){return Nt.repeat(" ",e-t.length)+t}g(_a,"padStart");function Dp(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,c,h=Math.min(t.line+e.linesAfter,i.length).toString().length,u=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)c=ka(t.buffer,n[s-l],i[s-l],t.position-(n[s]-n[s-l]),u),o=Nt.repeat(" ",e.indent)+_a((t.line-l+1).toString(),h)+" | "+c.str+` -`+o;for(c=ka(t.buffer,n[s],i[s],t.position,u),o+=Nt.repeat(" ",e.indent)+_a((t.line+1).toString(),h)+" | "+c.str+` -`,o+=Nt.repeat("-",e.indent+h+3+c.pos)+`^ -`,l=1;l<=e.linesAfter&&!(s+l>=i.length);l++)c=ka(t.buffer,n[s+l],i[s+l],t.position-(n[s]-n[s+l]),u),o+=Nt.repeat(" ",e.indent)+_a((t.line+l+1).toString(),h)+" | "+c.str+` -`;return o.replace(/\n$/,"")}g(Dp,"makeSnippet");var xw=Dp,bw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ww=["scalar","sequence","mapping"];function Pp(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}g(Pp,"compileStyleAliases");function Op(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(bw.indexOf(r)===-1)throw new me('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=Pp(e.styleAliases||null),ww.indexOf(this.kind)===-1)throw new me('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}g(Op,"Type$1");var Jt=Op;function Wo(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}g(Wo,"compileList");function Np(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(g(n,"collectType"),e=0,r=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:g(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:g(function(t){return t.toString(10)},"decimal"),hexadecimal:g(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Lw=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Qp(t){return!(t===null||!Lw.test(t)||t[t.length-1]==="_")}g(Qp,"resolveYamlFloat");function Jp(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}g(Jp,"constructYamlFloat");var Bw=/^[-+]?[0-9]+e/;function td(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Nt.isNegativeZero(t))return"-0.0";return r=t.toString(10),Bw.test(r)?r.replace("e",".e"):r}g(td,"representYamlFloat");function ed(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Nt.isNegativeZero(t))}g(ed,"isFloat");var Mw=new Jt("tag:yaml.org,2002:float",{kind:"scalar",resolve:Qp,construct:Jp,predicate:ed,represent:td,defaultStyle:"lowercase"}),rd=Sw.extend({implicit:[Tw,Ew,Aw,Mw]}),Fw=rd,nd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),id=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ad(t){return t===null?!1:nd.exec(t)!==null||id.exec(t)!==null}g(ad,"resolveYamlTimestamp");function sd(t){var e,r,n,i,a,s,o,l=0,c=null,h,u,f;if(e=nd.exec(t),e===null&&(e=id.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],u=+(e[11]||0),c=(h*60+u)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,n,i,a,s,o,l)),c&&f.setTime(f.getTime()-c),f}g(sd,"constructYamlTimestamp");function od(t){return t.toISOString()}g(od,"representYamlTimestamp");var Iw=new Jt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ad,construct:sd,instanceOf:Date,represent:od});function ld(t){return t==="<<"||t===null}g(ld,"resolveYamlMerge");var $w=new Jt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ld}),ec=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function cd(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=ec;for(r=0;r64)){if(e<0)return!1;n+=6}return n%8===0}g(cd,"resolveYamlBinary");function hd(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=ec,s=0,o=[];for(e=0;e>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}g(hd,"constructYamlBinary");function ud(t){var e="",r=0,n,i,a=t.length,s=ec;for(n=0;n>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}g(ud,"representYamlBinary");function fd(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}g(fd,"isBinary");var Rw=new Jt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cd,construct:hd,predicate:fd,represent:ud}),Dw=Object.prototype.hasOwnProperty,Pw=Object.prototype.toString;function pd(t){if(t===null)return!0;var e=[],r,n,i,a,s,o=t;for(r=0,n=o.length;r>10)+55296,(t-65536&1023)+56320)}g(Ed,"charFromCodepoint");var Ad=new Array(256),Ld=new Array(256);for(Rr=0;Rr<256;Rr++)Ad[Rr]=Uo(Rr)?1:0,Ld[Rr]=Uo(Rr);var Rr;function Bd(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||bd,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(Bd,"State$1");function rc(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=xw(r),new me(e,r)}g(rc,"generateError");function tt(t,e){throw rc(t,e)}g(tt,"throwError");function Bi(t,e){t.onWarning&&t.onWarning.call(null,rc(t,e))}g(Bi,"throwWarning");var Hh={YAML:g(function(e,r,n){var i,a,s;e.version!==null&&tt(e,"duplication of %YAML directive"),n.length!==1&&tt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&tt(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&tt(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&Bi(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(e,r,n){var i,a;n.length!==2&&tt(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],kd.test(i)||tt(e,"ill-formed tag handle (first argument) of the TAG directive"),Tr.call(e.tagMap,i)&&tt(e,'there is a previously declared suffix for "'+i+'" tag handle'),_d.test(a)||tt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{tt(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function fr(t,e,r,n){var i,a,s,o;if(e1&&(t.result+=Nt.repeat(` -`,e-1))}g(ks,"writeFoldedLines");function Md(t,e,r){var n,i,a,s,o,l,c,h,u=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),se(p)||Hr(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),se(i)||r&&Hr(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,o=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),se(i)||r&&Hr(i))break}else if(p===35){if(n=t.input.charCodeAt(t.position-1),se(n))break}else{if(t.position===t.lineStart&&Yi(t)||r&&Hr(p))break;if(Pe(p))if(l=t.line,c=t.lineStart,h=t.lineIndent,$t(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=c,t.lineIndent=h;break}}o&&(fr(t,a,s,!1),ks(t,t.line-l),a=s=t.position,o=!1),vr(p)||(s=t.position+1),p=t.input.charCodeAt(++t.position)}return fr(t,a,s,!1),t.result?!0:(t.kind=u,t.result=f,!1)}g(Md,"readPlainScalar");function Fd(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(fr(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Pe(r)?(fr(t,n,i,!0),ks(t,$t(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Yi(t)?tt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);tt(t,"unexpected end of the stream within a single quoted scalar")}g(Fd,"readSingleQuotedScalar");function Id(t,e){var r,n,i,a,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return fr(t,r,t.position,!0),t.position++,!0;if(o===92){if(fr(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Pe(o))$t(t,!1,e);else if(o<256&&Ad[o])t.result+=Ld[o],t.position++;else if((s=Sd(o))>0){for(i=s,a=0;i>0;i--)o=t.input.charCodeAt(++t.position),(s=vd(o))>=0?a=(a<<4)+s:tt(t,"expected hexadecimal character");t.result+=Ed(a),t.position++}else tt(t,"unknown escape sequence");r=n=t.position}else Pe(o)?(fr(t,r,n,!0),ks(t,$t(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Yi(t)?tt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}tt(t,"unexpected end of the stream within a double quoted scalar")}g(Id,"readDoubleQuotedScalar");function $d(t,e){var r=!0,n,i,a,s=t.tag,o,l=t.anchor,c,h,u,f,p,d=Object.create(null),m,x,y,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,p=!1,o=[];else if(b===123)h=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),b=t.input.charCodeAt(++t.position);b!==0;){if($t(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=s,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;r?b===44&&tt(t,"expected the node content, but found ','"):tt(t,"missed comma between flow collection entries"),x=m=y=null,u=f=!1,b===63&&(c=t.input.charCodeAt(t.position+1),se(c)&&(u=f=!0,t.position++,$t(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,Xr(t,e,Na,!1,!0),x=t.tag,m=t.result,$t(t,!0,e),b=t.input.charCodeAt(t.position),(f||t.line===n)&&b===58&&(u=!0,b=t.input.charCodeAt(++t.position),$t(t,!0,e),Xr(t,e,Na,!1,!0),y=t.result),p?Wr(t,o,d,x,m,y,n,i,a):u?o.push(Wr(t,null,d,x,m,y,n,i,a)):o.push(m),$t(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}tt(t,"unexpected end of the stream within a flow collection")}g($d,"readFlowCollection");function Rd(t,e){var r,n,i=no,a=!1,s=!1,o=e,l=0,c=!1,h,u;if(u=t.input.charCodeAt(t.position),u===124)n=!1;else if(u===62)n=!0;else return!1;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)no===i?i=u===43?qh:Ww:tt(t,"repeat of a chomping mode identifier");else if((h=Td(u))>=0)h===0?tt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?tt(t,"repeat of an indentation width identifier"):(o=e+h-1,s=!0);else break;if(vr(u)){do u=t.input.charCodeAt(++t.position);while(vr(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!Pe(u)&&u!==0)}for(;u!==0;){for(Cs(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!s||t.lineIndento&&(o=t.lineIndent),Pe(u)){l++;continue}if(t.lineIndente)&&l!==0)tt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(x&&(s=t.line,o=t.lineStart,l=t.position),Xr(t,e,za,!0,i)&&(x?d=t.result:m=t.result),x||(Wr(t,u,f,p,d,m,s,o,l),p=d=m=null),$t(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&b!==0)tt(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),u=0,f=t.implicitTypes.length;u"),t.result!==null&&d.kind!==t.kind&&tt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):tt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}g(Xr,"composeNode");function zd(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&($t(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!se(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&tt(t,"directive name must not be less than one character in length");s!==0;){for(;vr(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Pe(s));break}if(Pe(s))break;for(r=t.position;s!==0&&!se(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&Cs(t),Tr.call(Hh,n)?Hh[n](t,n,i):Bi(t,'unknown document directive "'+n+'"')}if($t(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,$t(t,!0,-1)):a&&tt(t,"directives end mark is expected"),Xr(t,t.lineIndent-1,za,!1,!0),$t(t,!0,-1),t.checkLineBreaks&&Uw.test(t.input.slice(e,t.position))&&Bi(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Yi(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,$t(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var n=nc(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i=55296&&r<=56319&&e+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}g(dn,"codePointAt");function ac(t){var e=/^\n* /;return e.test(t)}g(ac,"needIndentIndicator");var rg=1,Qo=2,ng=3,ig=4,pn=5;function ag(t,e,r,n,i,a,s,o){var l,c=0,h=null,u=!1,f=!1,p=n!==-1,d=-1,m=tg(dn(t,0))&&eg(dn(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(c=dn(t,l),!In(c))return pn;m=m&&Zo(c,h,o),h=c}else{for(l=0;l=65536?l+=2:l++){if(c=dn(t,l),c===Mi)u=!0,p&&(f=f||l-d-1>n&&t[d+1]!==" ",d=l);else if(!In(c))return pn;m=m&&Zo(c,h,o),h=c}f=f||p&&l-d-1>n&&t[d+1]!==" "}return!u&&!f?m&&!s&&!i(t)?rg:a===Fi?pn:Qo:r>9&&ac(t)?pn:s?a===Fi?pn:Qo:f?ig:ng}g(ag,"chooseScalarStyle");function sg(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===Fi?'""':"''";if(!t.noCompatMode&&(fC.indexOf(e)!==-1||pC.test(e)))return t.quotingType===Fi?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),o=n||t.flowLevel>-1&&r>=t.flowLevel;function l(c){return Jd(t,c)}switch(g(l,"testAmbiguity"),ag(e,o,t.indent,s,l,t.quotingType,t.forceQuotes&&!n,i)){case rg:return e;case Qo:return"'"+e.replace(/'/g,"''")+"'";case ng:return"|"+Jo(e,t.indent)+tl(Xo(e,a));case ig:return">"+Jo(e,t.indent)+tl(Xo(og(e,s),a));case pn:return'"'+lg(e)+'"';default:throw new me("impossible error: invalid scalar style")}}()}g(sg,"writeScalar");function Jo(t,e){var r=ac(t)?String(e):"",n=t[t.length-1]===` -`,i=n&&(t[t.length-2]===` +`+t.mark.snippet),r+" "+n):r}m(sh,"formatError");function ti(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=sh(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}m(ti,"YAMLException$1");ti.prototype=Object.create(Error.prototype);ti.prototype.constructor=ti;ti.prototype.toString=m(function(e){return this.name+": "+sh(this,e)},"toString");var _e=ti;function ea(t,e,n,r,i){var s="",a="",o=Math.floor(i/2)-1;return r-e>o&&(s=" ... ",e=r-o+s.length),n-r>o&&(a=" ...",n=r+o-a.length),{str:s+t.slice(e,n).replace(/\t/g,"→")+a,pos:r-e+s.length}}m(ea,"getLine");function na(t,e){return Vt.repeat(" ",e-t.length)+t}m(na,"padStart");function pg(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],s,a=-1;s=n.exec(t.buffer);)i.push(s.index),r.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=r.length-2);a<0&&(a=r.length-1);var o="",l,c,h=Math.min(t.line+e.linesAfter,i.length).toString().length,u=e.maxLength-(e.indent+h+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)c=ea(t.buffer,r[a-l],i[a-l],t.position-(r[a]-r[a-l]),u),o=Vt.repeat(" ",e.indent)+na((t.line-l+1).toString(),h)+" | "+c.str+` +`+o;for(c=ea(t.buffer,r[a],i[a],t.position,u),o+=Vt.repeat(" ",e.indent)+na((t.line+1).toString(),h)+" | "+c.str+` +`,o+=Vt.repeat("-",e.indent+h+3+c.pos)+`^ +`,l=1;l<=e.linesAfter&&!(a+l>=i.length);l++)c=ea(t.buffer,r[a+l],i[a+l],t.position-(r[a]-r[a+l]),u),o+=Vt.repeat(" ",e.indent)+na((t.line+l+1).toString(),h)+" | "+c.str+` +`;return o.replace(/\n$/,"")}m(pg,"makeSnippet");var f_=pg,p_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d_=["scalar","sequence","mapping"];function dg(t){var e={};return t!==null&&Object.keys(t).forEach(function(n){t[n].forEach(function(r){e[String(r)]=n})}),e}m(dg,"compileStyleAliases");function gg(t,e){if(e=e||{},Object.keys(e).forEach(function(n){if(p_.indexOf(n)===-1)throw new _e('Unknown option "'+n+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(n){return n},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=dg(e.styleAliases||null),d_.indexOf(this.kind)===-1)throw new _e('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}m(gg,"Type$1");var ie=gg;function Nl(t,e){var n=[];return t[e].forEach(function(r){var i=n.length;n.forEach(function(s,a){s.tag===r.tag&&s.kind===r.kind&&s.multi===r.multi&&(i=a)}),n[i]=r}),n}m(Nl,"compileList");function mg(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,n;function r(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(m(r,"collectType"),e=0,n=arguments.length;e=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:m(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:m(function(t){return t.toString(10)},"decimal"),hexadecimal:m(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),__=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Lg(t){return!(t===null||!__.test(t)||t[t.length-1]==="_")}m(Lg,"resolveYamlFloat");function Mg(t){var e,n;return e=t.replace(/_/g,"").toLowerCase(),n=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:n*parseFloat(e,10)}m(Mg,"constructYamlFloat");var k_=/^[-+]?[0-9]+e/;function Bg(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Vt.isNegativeZero(t))return"-0.0";return n=t.toString(10),k_.test(n)?n.replace("e",".e"):n}m(Bg,"representYamlFloat");function Ig(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Vt.isNegativeZero(t))}m(Ig,"isFloat");var S_=new ie("tag:yaml.org,2002:float",{kind:"scalar",resolve:Lg,construct:Mg,predicate:Ig,represent:Bg,defaultStyle:"lowercase"}),Fg=b_.extend({implicit:[w_,C_,v_,S_]}),T_=Fg,Rg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Pg=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Dg(t){return t===null?!1:Rg.exec(t)!==null||Pg.exec(t)!==null}m(Dg,"resolveYamlTimestamp");function Og(t){var e,n,r,i,s,a,o,l=0,c=null,h,u,f;if(e=Rg.exec(t),e===null&&(e=Pg.exec(t)),e===null)throw new Error("Date resolve error");if(n=+e[1],r=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(n,r,i));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(h=+e[10],u=+(e[11]||0),c=(h*60+u)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(n,r,i,s,a,o,l)),c&&f.setTime(f.getTime()-c),f}m(Og,"constructYamlTimestamp");function $g(t){return t.toISOString()}m($g,"representYamlTimestamp");var E_=new ie("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Dg,construct:Og,instanceOf:Date,represent:$g});function Ng(t){return t==="<<"||t===null}m(Ng,"resolveYamlMerge");var A_=new ie("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ng}),ah=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function zg(t){if(t===null)return!1;var e,n,r=0,i=t.length,s=ah;for(n=0;n64)){if(e<0)return!1;r+=6}return r%8===0}m(zg,"resolveYamlBinary");function jg(t){var e,n,r=t.replace(/[\r\n=]/g,""),i=r.length,s=ah,a=0,o=[];for(e=0;e>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(r.charAt(e));return n=i%4*6,n===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):n===18?(o.push(a>>10&255),o.push(a>>2&255)):n===12&&o.push(a>>4&255),new Uint8Array(o)}m(jg,"constructYamlBinary");function qg(t){var e="",n=0,r,i,s=t.length,a=ah;for(r=0;r>18&63],e+=a[n>>12&63],e+=a[n>>6&63],e+=a[n&63]),n=(n<<8)+t[r];return i=s%3,i===0?(e+=a[n>>18&63],e+=a[n>>12&63],e+=a[n>>6&63],e+=a[n&63]):i===2?(e+=a[n>>10&63],e+=a[n>>4&63],e+=a[n<<2&63],e+=a[64]):i===1&&(e+=a[n>>2&63],e+=a[n<<4&63],e+=a[64],e+=a[64]),e}m(qg,"representYamlBinary");function Hg(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}m(Hg,"isBinary");var L_=new ie("tag:yaml.org,2002:binary",{kind:"scalar",resolve:zg,construct:jg,predicate:Hg,represent:qg}),M_=Object.prototype.hasOwnProperty,B_=Object.prototype.toString;function Wg(t){if(t===null)return!0;var e=[],n,r,i,s,a,o=t;for(n=0,r=o.length;n>10)+55296,(t-65536&1023)+56320)}m(im,"charFromCodepoint");var sm=new Array(256),am=new Array(256);for(nr=0;nr<256;nr++)sm[nr]=jl(nr)?1:0,am[nr]=jl(nr);var nr;function om(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Kg,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}m(om,"State$1");function oh(t,e){var n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=f_(n),new _e(e,n)}m(oh,"generateError");function nt(t,e){throw oh(t,e)}m(nt,"throwError");function ss(t,e){t.onWarning&&t.onWarning.call(null,oh(t,e))}m(ss,"throwWarning");var cf={YAML:m(function(e,n,r){var i,s,a;e.version!==null&&nt(e,"duplication of %YAML directive"),r.length!==1&&nt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&nt(e,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),a=parseInt(i[2],10),s!==1&&nt(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&ss(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:m(function(e,n,r){var i,s;r.length!==2&&nt(e,"TAG directive accepts exactly two arguments"),i=r[0],s=r[1],Jg.test(i)||nt(e,"ill-formed tag handle (first argument) of the TAG directive"),Wn.call(e.tagMap,i)&&nt(e,'there is a previously declared suffix for "'+i+'" tag handle'),tm.test(s)||nt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{nt(e,"tag prefix is malformed: "+s)}e.tagMap[i]=s},"handleTagDirective")};function An(t,e,n,r){var i,s,a,o;if(e1&&(t.result+=Vt.repeat(` +`,e-1))}m(co,"writeFoldedLines");function lm(t,e,n){var r,i,s,a,o,l,c,h,u=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),pe(p)||cr(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),pe(i)||n&&cr(i)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),pe(i)||n&&cr(i))break}else if(p===35){if(r=t.input.charCodeAt(t.position-1),pe(r))break}else{if(t.position===t.lineStart&&_s(t)||n&&cr(p))break;if(Ze(p))if(l=t.line,c=t.lineStart,h=t.lineIndent,qt(t,!1,-1),t.lineIndent>=e){o=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=c,t.lineIndent=h;break}}o&&(An(t,s,a,!1),co(t,t.line-l),s=a=t.position,o=!1),Hn(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return An(t,s,a,!1),t.result?!0:(t.kind=u,t.result=f,!1)}m(lm,"readPlainScalar");function cm(t,e){var n,r,i;if(n=t.input.charCodeAt(t.position),n!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(n=t.input.charCodeAt(t.position))!==0;)if(n===39)if(An(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),n===39)r=t.position,t.position++,i=t.position;else return!0;else Ze(n)?(An(t,r,i,!0),co(t,qt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&_s(t)?nt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);nt(t,"unexpected end of the stream within a single quoted scalar")}m(cm,"readSingleQuotedScalar");function hm(t,e){var n,r,i,s,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return An(t,n,t.position,!0),t.position++,!0;if(o===92){if(An(t,n,t.position,!0),o=t.input.charCodeAt(++t.position),Ze(o))qt(t,!1,e);else if(o<256&&sm[o])t.result+=am[o],t.position++;else if((a=nm(o))>0){for(i=a,s=0;i>0;i--)o=t.input.charCodeAt(++t.position),(a=em(o))>=0?s=(s<<4)+a:nt(t,"expected hexadecimal character");t.result+=im(s),t.position++}else nt(t,"unknown escape sequence");n=r=t.position}else Ze(o)?(An(t,n,r,!0),co(t,qt(t,!1,e)),n=r=t.position):t.position===t.lineStart&&_s(t)?nt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}nt(t,"unexpected end of the stream within a double quoted scalar")}m(hm,"readDoubleQuotedScalar");function um(t,e){var n=!0,r,i,s,a=t.tag,o,l=t.anchor,c,h,u,f,p,d=Object.create(null),g,x,y,b;if(b=t.input.charCodeAt(t.position),b===91)h=93,p=!1,o=[];else if(b===123)h=125,p=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),b=t.input.charCodeAt(++t.position);b!==0;){if(qt(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=o,!0;n?b===44&&nt(t,"expected the node content, but found ','"):nt(t,"missed comma between flow collection entries"),x=g=y=null,u=f=!1,b===63&&(c=t.input.charCodeAt(t.position+1),pe(c)&&(u=f=!0,t.position++,qt(t,!0,e))),r=t.line,i=t.lineStart,s=t.position,mr(t,e,ba,!1,!0),x=t.tag,g=t.result,qt(t,!0,e),b=t.input.charCodeAt(t.position),(f||t.line===r)&&b===58&&(u=!0,b=t.input.charCodeAt(++t.position),qt(t,!0,e),mr(t,e,ba,!1,!0),y=t.result),p?hr(t,o,d,x,g,y,r,i,s):u?o.push(hr(t,null,d,x,g,y,r,i,s)):o.push(g),qt(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(n=!0,b=t.input.charCodeAt(++t.position)):n=!1}nt(t,"unexpected end of the stream within a flow collection")}m(um,"readFlowCollection");function fm(t,e){var n,r,i=Zo,s=!1,a=!1,o=e,l=0,c=!1,h,u;if(u=t.input.charCodeAt(t.position),u===124)r=!1;else if(u===62)r=!0;else return!1;for(t.kind="scalar",t.result="";u!==0;)if(u=t.input.charCodeAt(++t.position),u===43||u===45)Zo===i?i=u===43?lf:O_:nt(t,"repeat of a chomping mode identifier");else if((h=rm(u))>=0)h===0?nt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?nt(t,"repeat of an indentation width identifier"):(o=e+h-1,a=!0);else break;if(Hn(u)){do u=t.input.charCodeAt(++t.position);while(Hn(u));if(u===35)do u=t.input.charCodeAt(++t.position);while(!Ze(u)&&u!==0)}for(;u!==0;){for(lo(t),t.lineIndent=0,u=t.input.charCodeAt(t.position);(!a||t.lineIndento&&(o=t.lineIndent),Ze(u)){l++;continue}if(t.lineIndente)&&l!==0)nt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(x&&(a=t.line,o=t.lineStart,l=t.position),mr(t,e,wa,!0,i)&&(x?d=t.result:g=t.result),x||(hr(t,u,f,p,d,g,a,o,l),p=d=g=null),qt(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&b!==0)nt(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),u=0,f=t.implicitTypes.length;u"),t.result!==null&&d.kind!==t.kind&&nt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):nt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||h}m(mr,"composeNode");function ym(t){var e=t.position,n,r,i,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(qt(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),n=t.position;a!==0&&!pe(a);)a=t.input.charCodeAt(++t.position);for(r=t.input.slice(n,t.position),i=[],r.length<1&&nt(t,"directive name must not be less than one character in length");a!==0;){for(;Hn(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!Ze(a));break}if(Ze(a))break;for(n=t.position;a!==0&&!pe(a);)a=t.input.charCodeAt(++t.position);i.push(t.input.slice(n,t.position))}a!==0&&lo(t),Wn.call(cf,r)?cf[r](t,r,i):ss(t,'unknown document directive "'+r+'"')}if(qt(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,qt(t,!0,-1)):s&&nt(t,"directives end mark is expected"),mr(t,t.lineIndent-1,wa,!1,!0),qt(t,!0,-1),t.checkLineBreaks&&N_.test(t.input.slice(e,t.position))&&ss(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&_s(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,qt(t,!0,-1));return}if(t.position"u"&&(n=e,e=null);var r=lh(t,n);if(typeof e!="function")return r;for(var i=0,s=r.length;i=55296&&n<=56319&&e+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}m(Rr,"codePointAt");function hh(t){var e=/^\n* /;return e.test(t)}m(hh,"needIndentIndicator");var Fm=1,Gl=2,Rm=3,Pm=4,Fr=5;function Dm(t,e,n,r,i,s,a,o){var l,c=0,h=null,u=!1,f=!1,p=r!==-1,d=-1,g=Bm(Rr(t,0))&&Im(Rr(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(c=Rr(t,l),!ei(c))return Fr;g=g&&Yl(c,h,o),h=c}else{for(l=0;l=65536?l+=2:l++){if(c=Rr(t,l),c===as)u=!0,p&&(f=f||l-d-1>r&&t[d+1]!==" ",d=l);else if(!ei(c))return Fr;g=g&&Yl(c,h,o),h=c}f=f||p&&l-d-1>r&&t[d+1]!==" "}return!u&&!f?g&&!a&&!i(t)?Fm:s===os?Fr:Gl:n>9&&hh(t)?Fr:a?s===os?Fr:Gl:f?Pm:Rm}m(Dm,"chooseScalarStyle");function Om(t,e,n,r,i){t.dump=function(){if(e.length===0)return t.quotingType===os?'""':"''";if(!t.noCompatMode&&(ak.indexOf(e)!==-1||ok.test(e)))return t.quotingType===os?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,n),a=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),o=r||t.flowLevel>-1&&n>=t.flowLevel;function l(c){return Mm(t,c)}switch(m(l,"testAmbiguity"),Dm(e,o,t.indent,a,l,t.quotingType,t.forceQuotes&&!r,i)){case Fm:return e;case Gl:return"'"+e.replace(/'/g,"''")+"'";case Rm:return"|"+Xl(e,t.indent)+Kl(Ul(e,s));case Pm:return">"+Xl(e,t.indent)+Kl(Ul($m(e,a),s));case Fr:return'"'+Nm(e)+'"';default:throw new _e("impossible error: invalid scalar style")}}()}m(Om,"writeScalar");function Xl(t,e){var n=hh(t)?String(e):"",r=t[t.length-1]===` +`,i=r&&(t[t.length-2]===` `||t===` -`),a=i?"+":n?"":"-";return r+a+` -`}g(Jo,"blockHeader");function tl(t){return t[t.length-1]===` -`?t.slice(0,-1):t}g(tl,"dropEndingNewline");function og(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var c=t.indexOf(` -`);return c=c!==-1?c:t.length,r.lastIndex=c,el(t.slice(0,c),e)}(),i=t[0]===` -`||t[0]===" ",a,s;s=r.exec(t);){var o=s[1],l=s[2];a=l[0]===" ",n+=o+(!i&&!a&&l!==""?` -`:"")+el(l,e),i=a}return n}g(og,"foldString");function el(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,o=0,l="";n=r.exec(t);)o=n.index,o-i>e&&(a=s>i?s:o,l+=` -`+t.slice(i,a),i=a+1),s=o;return l+=` -`,t.length-i>e&&s>i?l+=t.slice(i,s)+` -`+t.slice(s+1):l+=t.slice(i),l.slice(1)}g(el,"foldLine");function lg(t){for(var e="",r=0,n,i=0;i=65536?i+=2:i++)r=dn(t,i),n=te[r],!n&&In(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||Zd(r);return e}g(lg,"escapeString");function cg(t,e,r){var n="",i=t.tag,a,s,o;for(a=0,s=r.length;a"u"&&tr(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}g(cg,"writeFlowSequence");function rl(t,e,r,n){var i="",a=t.tag,s,o,l;for(s=0,o=r.length;s"u"&&tr(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=Ha(t,e)),t.dump&&Mi===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}g(rl,"writeBlockSequence");function hg(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),tr(t,e,c,!1,!1)&&(h+=t.dump,n+=h));t.tag=i,t.dump="{"+n+"}"}g(hg,"writeFlowMapping");function ug(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),o,l,c,h,u,f;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new me("sortKeys must be a boolean or a function");for(o=0,l=s.length;o1024,u&&(t.dump&&Mi===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,u&&(f+=Ha(t,e)),tr(t,e+1,h,!0,u)&&(t.dump&&Mi===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,i+=f));t.tag=a,t.dump=i||"{}"}g(ug,"writeBlockMapping");function nl(t,e,r){var n,i,a,s,o,l;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}g(nl,"detectType");function tr(t,e,r,n,i,a,s){t.tag=null,t.dump=r,nl(t,r,!1)||nl(t,r,!0);var o=Wd.call(t.dump),l=n,c;n&&(n=t.flowLevel<0||t.flowLevel>e);var h=o==="[object Object]"||o==="[object Array]",u,f;if(h&&(u=t.duplicates.indexOf(r),f=u!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(i=!1),f&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(h&&f&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(ug(t,e,t.dump,i),f&&(t.dump="&ref_"+u+t.dump)):(hg(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?rl(t,e-1,t.dump,i):rl(t,e,t.dump,i),f&&(t.dump="&ref_"+u+t.dump)):(cg(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&sg(t,t.dump,e,a,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new me("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}g(tr,"writeNode");function fg(t,e){var r=[],n=[],i,a;for(Wa(t,r,n),i=0,a=n.length;ie&&(s=a>i?a:o,l+=` +`+t.slice(i,s),i=s+1),a=o;return l+=` +`,t.length-i>e&&a>i?l+=t.slice(i,a)+` +`+t.slice(a+1):l+=t.slice(i),l.slice(1)}m(Zl,"foldLine");function Nm(t){for(var e="",n=0,r,i=0;i=65536?i+=2:i++)n=Rr(t,i),r=ae[n],!r&&ei(n)?(e+=t[i],n>=65536&&(e+=t[i+1])):e+=r||Am(n);return e}m(Nm,"escapeString");function zm(t,e,n){var r="",i=t.tag,s,a,o;for(s=0,a=n.length;s"u"&&mn(t,e,null,!1,!1))&&(r!==""&&(r+=","+(t.condenseFlow?"":" ")),r+=t.dump);t.tag=i,t.dump="["+r+"]"}m(zm,"writeFlowSequence");function Ql(t,e,n,r){var i="",s=t.tag,a,o,l;for(a=0,o=n.length;a"u"&&mn(t,e+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=va(t,e)),t.dump&&as===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=s,t.dump=i||"[]"}m(Ql,"writeBlockSequence");function jm(t,e,n){var r="",i=t.tag,s=Object.keys(n),a,o,l,c,h;for(a=0,o=s.length;a1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),mn(t,e,c,!1,!1)&&(h+=t.dump,r+=h));t.tag=i,t.dump="{"+r+"}"}m(jm,"writeFlowMapping");function qm(t,e,n,r){var i="",s=t.tag,a=Object.keys(n),o,l,c,h,u,f;if(t.sortKeys===!0)a.sort();else if(typeof t.sortKeys=="function")a.sort(t.sortKeys);else if(t.sortKeys)throw new _e("sortKeys must be a boolean or a function");for(o=0,l=a.length;o1024,u&&(t.dump&&as===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,u&&(f+=va(t,e)),mn(t,e+1,h,!0,u)&&(t.dump&&as===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,i+=f));t.tag=s,t.dump=i||"{}"}m(qm,"writeBlockMapping");function Jl(t,e,n){var r,i,s,a,o,l;for(i=n?t.explicitTypes:t.implicitTypes,s=0,a=i.length;s tag resolver accepts not "'+l+'" style');t.dump=r}return!0}return!1}m(Jl,"detectType");function mn(t,e,n,r,i,s,a){t.tag=null,t.dump=n,Jl(t,n,!1)||Jl(t,n,!0);var o=wm.call(t.dump),l=r,c;r&&(r=t.flowLevel<0||t.flowLevel>e);var h=o==="[object Object]"||o==="[object Array]",u,f;if(h&&(u=t.duplicates.indexOf(n),f=u!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(i=!1),f&&t.usedDuplicates[u])t.dump="*ref_"+u;else{if(h&&f&&!t.usedDuplicates[u]&&(t.usedDuplicates[u]=!0),o==="[object Object]")r&&Object.keys(t.dump).length!==0?(qm(t,e,t.dump,i),f&&(t.dump="&ref_"+u+t.dump)):(jm(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(o==="[object Array]")r&&t.dump.length!==0?(t.noArrayIndent&&!a&&e>0?Ql(t,e-1,t.dump,i):Ql(t,e,t.dump,i),f&&(t.dump="&ref_"+u+t.dump)):(zm(t,e,t.dump),f&&(t.dump="&ref_"+u+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&Om(t,t.dump,e,s,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new _e("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}m(mn,"writeNode");function Hm(t,e){var n=[],r=[],i,s;for(_a(t,n,r),i=0,s=r.length;i{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const o=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:n,prefix:l,name:o};return ao(c)?c:null}const a=i[0],s=a.split("-");if(s.length>1){const o={provider:n,prefix:s.shift(),name:s.join("-")};return ao(o)?o:null}if(r&&n===""){const o={provider:n,prefix:"",name:a};return ao(o,r)?o:null}return null},ao=(t,e)=>t?!!((t.provider===""||t.provider.match(io))&&(e&&t.prefix===""||t.prefix.match(io))&&t.name.match(io)):!1;function vC(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function Wh(t,e){const r=vC(t,e);for(const n in wC)n in ja?n in t&&!(n in r)&&(r[n]=ja[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function SC(t,e){const r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;const o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}function jh(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let a={};function s(o){a=Wh(n[o]||i[o],a)}return s(e),r.forEach(s),Wh(t,a)}function TC(t,e){if(t.icons[e])return jh(t,e,[]);const r=SC(t,[e])[e];return r?jh(t,e,r):null}const EC=/(-?[0-9.]*[0-9]+[0-9.]*)/g,AC=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Uh(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const n=t.split(EC);if(n===null||!n.length)return t;const i=[];let a=n.shift(),s=AC.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*e*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}function LC(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const i=t.indexOf(">",n),a=t.indexOf("",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function BC(t,e){return t?""+t+""+e:e}function MC(t,e,r){const n=LC(t);return BC(n.defs,e+n.content+r)}const FC=t=>t==="unset"||t==="undefined"||t==="none";function IC(t,e){const r={...pg,...t},n={...kC,...e},i={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,n].forEach(m=>{const x=[],y=m.hFlip,b=m.vFlip;let C=m.rotate;y?b?C+=2:(x.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),x.push("scale(-1 1)"),i.top=i.left=0):b&&(x.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),x.push("scale(1 -1)"),i.top=i.left=0);let v;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:v=i.height/2+i.top,x.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:x.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:v=i.width/2+i.left,x.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}C%2===1&&(i.left!==i.top&&(v=i.left,i.left=i.top,i.top=v),i.width!==i.height&&(v=i.width,i.width=i.height,i.height=v)),x.length&&(a=MC(a,'',""))});const s=n.width,o=n.height,l=i.width,c=i.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=Uh(u,l/c)):(h=s==="auto"?l:s,u=o===null?Uh(h,c/l):o==="auto"?c:o);const f={},p=(m,x)=>{FC(x)||(f[m]=x.toString())};p("width",h),p("height",u);const d=[i.left,i.top,l,c];return f.viewBox=d.join(" "),{attributes:f,viewBox:d,body:a}}const $C=/\sid="(\S+)"/g,RC="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let DC=0;function PC(t,e=RC){const r=[];let n;for(;n=$C.exec(t);)r.push(n[1]);if(!r.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const s=typeof e=="function"?e(a):e+(DC++).toString(),o=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}function OC(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}var NC={body:'?',height:80,width:80},il=new Map,dg=new Map,zC=g(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(z.debug("Registering icon pack:",e.name),"loader"in e)dg.set(e.name,e.loader);else if("icons"in e)il.set(e.name,e.icons);else throw z.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),qC=g(async(t,e)=>{const r=_C(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=il.get(n);if(!i){const s=dg.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},il.set(n,i)}catch(o){throw z.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=TC(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),_s=g(async(t,e)=>{let r;try{r=await qC(t,e==null?void 0:e.fallbackPrefix)}catch(a){z.error(a),r=NC}const n=IC(r,e);return OC(PC(n.body),n.attributes)},"getIconSVG"),sc=g(({flowchart:t})=>{var i,a;const e=((i=t==null?void 0:t.subGraphTitleMargin)==null?void 0:i.top)??0,r=((a=t==null?void 0:t.subGraphTitleMargin)==null?void 0:a.bottom)??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins"),oc={},Ht={};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.BLANK_URL=Ht.relativeFirstCharacters=Ht.whitespaceEscapeCharsRegex=Ht.urlSchemeRegex=Ht.ctrlCharactersRegex=Ht.htmlCtrlEntityRegex=Ht.htmlEntitiesRegex=Ht.invalidProtocolRegex=void 0;Ht.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Ht.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Ht.htmlCtrlEntityRegex=/&(newline|tab);/gi;Ht.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Ht.urlSchemeRegex=/^.+(:|:)/gim;Ht.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Ht.relativeFirstCharacters=[".","/"];Ht.BLANK_URL="about:blank";Object.defineProperty(oc,"__esModule",{value:!0});var gg=oc.sanitizeUrl=void 0,Qt=Ht;function HC(t){return Qt.relativeFirstCharacters.indexOf(t[0])>-1}function WC(t){var e=t.replace(Qt.ctrlCharactersRegex,"");return e.replace(Qt.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function jC(t){return URL.canParse(t)}function Yh(t){try{return decodeURIComponent(t)}catch{return t}}function UC(t){if(!t)return Qt.BLANK_URL;var e,r=Yh(t.trim());do r=WC(r).replace(Qt.htmlCtrlEntityRegex,"").replace(Qt.ctrlCharactersRegex,"").replace(Qt.whitespaceEscapeCharsRegex,"").trim(),r=Yh(r),e=r.match(Qt.ctrlCharactersRegex)||r.match(Qt.htmlEntitiesRegex)||r.match(Qt.htmlCtrlEntityRegex)||r.match(Qt.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Qt.BLANK_URL;if(HC(n))return n;var i=n.trimStart(),a=i.match(Qt.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(Qt.invalidProtocolRegex.test(s))return Qt.BLANK_URL;var o=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!jC(o))return Qt.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}gg=oc.sanitizeUrl=UC;var YC={value:()=>{}};function mg(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}va.prototype=mg.prototype={constructor:va,on:function(t,e){var r=this._,n=VC(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Gh.hasOwnProperty(e)?{space:Gh[e],local:t}:t}function XC(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===al&&e.documentElement.namespaceURI===al?e.createElement(t):e.createElementNS(r,t)}}function KC(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function yg(t){var e=vs(t);return(e.local?KC:XC)(e)}function ZC(){}function lc(t){return t==null?ZC:function(){return this.querySelector(t)}}function QC(t){typeof t!="function"&&(t=lc(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=C&&(C=b+1);!(S=x[C])&&++C=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function _k(t){t||(t=vk);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var r=this._groups,n=r.length,i=new Array(n),a=0;ae?1:t>=e?0:NaN}function Sk(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Tk(){return Array.from(this)}function Ek(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?Ok:typeof e=="function"?zk:Nk)(t,e,r??"")):$n(this.node(),t)}function $n(t,e){return t.style.getPropertyValue(e)||kg(t).getComputedStyle(t,null).getPropertyValue(e)}function Hk(t){return function(){delete this[t]}}function Wk(t,e){return function(){this[t]=e}}function jk(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Uk(t,e){return arguments.length>1?this.each((e==null?Hk:typeof e=="function"?jk:Wk)(t,e)):this.node()[t]}function _g(t){return t.trim().split(/^|\s+/)}function cc(t){return t.classList||new vg(t)}function vg(t){this._node=t,this._names=_g(t.getAttribute("class")||"")}vg.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Sg(t,e){for(var r=cc(t),n=-1,i=e.length;++n=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function b_(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?oa(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?oa(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=A_.exec(t))?new ye(e[1],e[2],e[3],1):(e=L_.exec(t))?new ye(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=B_.exec(t))?oa(e[1],e[2],e[3],e[4]):(e=M_.exec(t))?oa(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=F_.exec(t))?eu(e[1],e[2]/100,e[3]/100,1):(e=I_.exec(t))?eu(e[1],e[2]/100,e[3]/100,e[4]):Xh.hasOwnProperty(t)?Qh(Xh[t]):t==="transparent"?new ye(NaN,NaN,NaN,0):null}function Qh(t){return new ye(t>>16&255,t>>8&255,t&255,1)}function oa(t,e,r,n){return n<=0&&(t=e=r=NaN),new ye(t,e,r,n)}function D_(t){return t instanceof Gi||(t=Di(t)),t?(t=t.rgb(),new ye(t.r,t.g,t.b,t.opacity)):new ye}function sl(t,e,r,n){return arguments.length===1?D_(t):new ye(t,e,r,n??1)}function ye(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}hc(ye,sl,Lg(Gi,{brighter(t){return t=t==null?Ya:Math.pow(Ya,t),new ye(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?$i:Math.pow($i,t),new ye(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ye(Yr(this.r),Yr(this.g),Yr(this.b),Va(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Jh,formatHex:Jh,formatHex8:P_,formatRgb:tu,toString:tu}));function Jh(){return`#${jr(this.r)}${jr(this.g)}${jr(this.b)}`}function P_(){return`#${jr(this.r)}${jr(this.g)}${jr(this.b)}${jr((isNaN(this.opacity)?1:this.opacity)*255)}`}function tu(){const t=Va(this.opacity);return`${t===1?"rgb(":"rgba("}${Yr(this.r)}, ${Yr(this.g)}, ${Yr(this.b)}${t===1?")":`, ${t})`}`}function Va(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Yr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function jr(t){return t=Yr(t),(t<16?"0":"")+t.toString(16)}function eu(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new De(t,e,r,n)}function Bg(t){if(t instanceof De)return new De(t.h,t.s,t.l,t.opacity);if(t instanceof Gi||(t=Di(t)),!t)return new De;if(t instanceof De)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(r-n)/o+(r0&&l<1?0:s,new De(s,o,l,t.opacity)}function O_(t,e,r,n){return arguments.length===1?Bg(t):new De(t,e,r,n??1)}function De(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}hc(De,O_,Lg(Gi,{brighter(t){return t=t==null?Ya:Math.pow(Ya,t),new De(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?$i:Math.pow($i,t),new De(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new ye(so(t>=240?t-240:t+120,i,n),so(t,i,n),so(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new De(ru(this.h),la(this.s),la(this.l),Va(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Va(this.opacity);return`${t===1?"hsl(":"hsla("}${ru(this.h)}, ${la(this.s)*100}%, ${la(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ru(t){return t=(t||0)%360,t<0?t+360:t}function la(t){return Math.max(0,Math.min(1,t||0))}function so(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const uc=t=>()=>t;function Mg(t,e){return function(r){return t+r*e}}function N_(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function D3(t,e){var r=e-t;return r?Mg(t,r>180||r<-180?r-360*Math.round(r/360):r):uc(isNaN(t)?e:t)}function z_(t){return(t=+t)==1?Fg:function(e,r){return r-e?N_(e,r,t):uc(isNaN(e)?r:e)}}function Fg(t,e){var r=e-t;return r?Mg(t,r):uc(isNaN(t)?e:t)}const nu=function t(e){var r=z_(e);function n(i,a){var s=r((i=sl(i)).r,(a=sl(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),c=Fg(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=l(h),i.opacity=c(h),i+""}}return n.gamma=t,n}(1);function kr(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ol=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oo=new RegExp(ol.source,"g");function q_(t){return function(){return t}}function H_(t){return function(e){return t(e)+""}}function W_(t,e){var r=ol.lastIndex=oo.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=ol.exec(t))&&(i=oo.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:kr(n,i)})),r=oo.lastIndex;return r180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(i(u)+"rotate(",null,n)-2,x:kr(c,h)})):h&&u.push(i(u)+"rotate("+h+n)}function o(c,h,u,f){c!==h?f.push({i:u.push(i(u)+"skewX(",null,n)-2,x:kr(c,h)}):h&&u.push(i(u)+"skewX("+h+n)}function l(c,h,u,f,p,d){if(c!==u||h!==f){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:kr(c,u)},{i:m-2,x:kr(h,f)})}else(u!==1||f!==1)&&p.push(i(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),o(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var d=-1,m=f.length,x;++d=0&&t._call.call(void 0,e),t=t._next;--Rn}function au(){Kr=(Xa=Pi.now())+Ss,Rn=gi=0;try{X_()}finally{Rn=0,Z_(),Kr=0}}function K_(){var t=Pi.now(),e=t-Xa;e>Rg&&(Ss-=e,Xa=t)}function Z_(){for(var t,e=Ga,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Ga=r);mi=t,cl(n)}function cl(t){if(!Rn){gi&&(gi=clearTimeout(gi));var e=t-Kr;e>24?(t<1/0&&(gi=setTimeout(au,t-Pi.now()-Ss)),ai&&(ai=clearInterval(ai))):(ai||(Xa=Pi.now(),ai=setInterval(K_,Rg)),Rn=1,Dg(au))}}function su(t,e,r){var n=new Ka;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var Q_=mg("start","end","cancel","interrupt"),J_=[],Og=0,ou=1,hl=2,Sa=3,lu=4,ul=5,Ta=6;function Ts(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;t2(t,r,{name:e,index:n,group:i,on:Q_,tween:J_,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Og})}function pc(t,e){var r=ze(t,e);if(r.state>Og)throw new Error("too late; already scheduled");return r}function rr(t,e){var r=ze(t,e);if(r.state>Sa)throw new Error("too late; already running");return r}function ze(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function t2(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=Pg(a,0,r.time);function a(c){r.state=ou,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,f,p;if(r.state!==ou)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===Sa)return su(s);p.state===lu?(p.state=Ta,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[h]):+hhl&&n.state=0&&(e=e.slice(0,r)),!e||e==="start"})}function M2(t,e,r){var n,i,a=B2(e)?pc:rr;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function F2(t,e){var r=this._id;return arguments.length<2?ze(this.node(),r).on.on(t):this.each(M2(r,t,e))}function I2(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function $2(){return this.on("end.remove",I2(this._id))}function R2(t){var e=this._name,r=this._id;typeof t!="function"&&(t=lc(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Hg;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;iPr)if(!(Math.abs(u*l-c*h)>Pr)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let p=n-s,d=i-o,m=l*l+c*c,x=p*p+d*d,y=Math.sqrt(m),b=Math.sqrt(f),C=a*Math.tan((fl-Math.acos((m+f-x)/(2*y*b)))/2),v=C/b,S=C/y;Math.abs(v-1)>Pr&&this._append`L${e+v*h},${r+v*u}`,this._append`A${a},${a},0,0,${+(u*p>h*d)},${this._x1=e+S*l},${this._y1=r+S*c}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),c=e+o,h=r+l,u=1^s,f=s?i-a:a-i;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Pr||Math.abs(this._y1-h)>Pr)&&this._append`L${c},${h}`,n&&(f<0&&(f=f%pl+pl),f>sv?this._append`A${n},${n},0,1,${u},${e-o},${r-l}A${n},${n},0,1,${u},${this._x1=c},${this._y1=h}`:f>Pr&&this._append`A${n},${n},0,${+(f>=fl)},${u},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function hn(t){return function(){return t}}const P3=Math.abs,O3=Math.atan2,N3=Math.cos,z3=Math.max,q3=Math.min,H3=Math.sin,W3=Math.sqrt,cu=1e-12,gc=Math.PI,hu=gc/2,j3=2*gc;function U3(t){return t>1?0:t<-1?gc:Math.acos(t)}function Y3(t){return t>=1?hu:t<=-1?-hu:Math.asin(t)}function cv(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new lv(e)}function hv(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Wg(t){this._context=t}Wg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function jg(t){return new Wg(t)}function uv(t){return t[0]}function fv(t){return t[1]}function pv(t,e){var r=hn(!0),n=null,i=jg,a=null,s=cv(o);t=typeof t=="function"?t:t===void 0?uv:hn(t),e=typeof e=="function"?e:e===void 0?fv:hn(e);function o(l){var c,h=(l=hv(l)).length,u,f=!1,p;for(n==null&&(a=i(p=s())),c=0;c<=h;++c)!(c0)for(var n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*a),this._beta*e[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const xv=function t(e){function r(n){return e===1?new Es(n):new Xg(n,e)}return r.beta=function(n){return t(+n)},r}(.85);function Qa(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mc(t,e){this._context=t,this._k=(1-e)/6}mc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Qa(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Qa(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const bv=function t(e){function r(n){return new mc(n,e)}return r.tension=function(n){return t(+n)},r}(0);function yc(t,e){this._context=t,this._k=(1-e)/6}yc.prototype={areaStart:Er,areaEnd:Er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Qa(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const wv=function t(e){function r(n){return new yc(n,e)}return r.tension=function(n){return t(+n)},r}(0);function xc(t,e){this._context=t,this._k=(1-e)/6}xc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qa(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Cv=function t(e){function r(n){return new xc(n,e)}return r.tension=function(n){return t(+n)},r}(0);function bc(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>cu){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>cu){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function Kg(t,e){this._context=t,this._alpha=e}Kg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:bc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kv=function t(e){function r(n){return e?new Kg(n,e):new mc(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function Zg(t,e){this._context=t,this._alpha=e}Zg.prototype={areaStart:Er,areaEnd:Er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _v=function t(e){function r(n){return e?new Zg(n,e):new yc(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function Qg(t,e){this._context=t,this._alpha=e}Qg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vv=function t(e){function r(n){return e?new Qg(n,e):new xc(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function Jg(t){this._context=t}Jg.prototype={areaStart:Er,areaEnd:Er,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Sv(t){return new Jg(t)}function uu(t){return t<0?-1:1}function fu(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(uu(a)+uu(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function pu(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function lo(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function Ja(t){this._context=t}Ja.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:lo(this,this._t0,pu(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,lo(this,pu(this,r=fu(this,t,e)),r);break;default:lo(this,this._t0,r=fu(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function tm(t){this._context=new em(t)}(tm.prototype=Object.create(Ja.prototype)).point=function(t,e){Ja.prototype.point.call(this,e,t)};function em(t){this._context=t}em.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function Tv(t){return new Ja(t)}function Ev(t){return new tm(t)}function rm(t){this._context=t}rm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=du(t),i=du(e),a=0,s=1;s=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function Lv(t){return new As(t,.5)}function Bv(t){return new As(t,0)}function Mv(t){return new As(t,1)}function yi(t,e,r){this.k=t,this.x=e,this.y=r}yi.prototype={constructor:yi,scale:function(t){return t===1?this:new yi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new yi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};yi.prototype;var nm=typeof global=="object"&&global&&global.Object===Object&&global,Fv=typeof self=="object"&&self&&self.Object===Object&&self,nr=nm||Fv||Function("return this")(),ts=nr.Symbol,im=Object.prototype,Iv=im.hasOwnProperty,$v=im.toString,si=ts?ts.toStringTag:void 0;function Rv(t){var e=Iv.call(t,si),r=t[si];try{t[si]=void 0;var n=!0}catch{}var i=$v.call(t);return n&&(e?t[si]=r:delete t[si]),i}var Dv=Object.prototype,Pv=Dv.toString;function Ov(t){return Pv.call(t)}var Nv="[object Null]",zv="[object Undefined]",gu=ts?ts.toStringTag:void 0;function zn(t){return t==null?t===void 0?zv:Nv:gu&&gu in Object(t)?Rv(t):Ov(t)}function tn(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var qv="[object AsyncFunction]",Hv="[object Function]",Wv="[object GeneratorFunction]",jv="[object Proxy]";function wc(t){if(!tn(t))return!1;var e=zn(t);return e==Hv||e==Wv||e==qv||e==jv}var co=nr["__core-js_shared__"],mu=function(){var t=/[^.]+$/.exec(co&&co.keys&&co.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Uv(t){return!!mu&&mu in t}var Yv=Function.prototype,Vv=Yv.toString;function en(t){if(t!=null){try{return Vv.call(t)}catch{}try{return t+""}catch{}}return""}var Gv=/[\\^$.*+?()[\]{}|]/g,Xv=/^\[object .+?Constructor\]$/,Kv=Function.prototype,Zv=Object.prototype,Qv=Kv.toString,Jv=Zv.hasOwnProperty,tS=RegExp("^"+Qv.call(Jv).replace(Gv,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function eS(t){if(!tn(t)||Uv(t))return!1;var e=wc(t)?tS:Xv;return e.test(en(t))}function rS(t,e){return t==null?void 0:t[e]}function rn(t,e){var r=rS(t,e);return eS(r)?r:void 0}var Oi=rn(Object,"create");function nS(){this.__data__=Oi?Oi(null):{},this.size=0}function iS(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var aS="__lodash_hash_undefined__",sS=Object.prototype,oS=sS.hasOwnProperty;function lS(t){var e=this.__data__;if(Oi){var r=e[t];return r===aS?void 0:r}return oS.call(e,t)?e[t]:void 0}var cS=Object.prototype,hS=cS.hasOwnProperty;function uS(t){var e=this.__data__;return Oi?e[t]!==void 0:hS.call(e,t)}var fS="__lodash_hash_undefined__";function pS(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Oi&&e===void 0?fS:e,this}function Zr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}function wS(t,e){var r=this.__data__,n=Bs(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function gr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=VS}function Is(t){return t!=null&&cm(t.length)&&!wc(t)}function GS(t){return Ki(t)&&Is(t)}function XS(){return!1}var hm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_u=hm&&typeof module=="object"&&module&&!module.nodeType&&module,KS=_u&&_u.exports===hm,vu=KS?nr.Buffer:void 0,ZS=vu?vu.isBuffer:void 0,kc=ZS||XS,QS="[object Object]",JS=Function.prototype,tT=Object.prototype,um=JS.toString,eT=tT.hasOwnProperty,rT=um.call(Object);function nT(t){if(!Ki(t)||zn(t)!=QS)return!1;var e=om(t);if(e===null)return!0;var r=eT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&um.call(r)==rT}var iT="[object Arguments]",aT="[object Array]",sT="[object Boolean]",oT="[object Date]",lT="[object Error]",cT="[object Function]",hT="[object Map]",uT="[object Number]",fT="[object Object]",pT="[object RegExp]",dT="[object Set]",gT="[object String]",mT="[object WeakMap]",yT="[object ArrayBuffer]",xT="[object DataView]",bT="[object Float32Array]",wT="[object Float64Array]",CT="[object Int8Array]",kT="[object Int16Array]",_T="[object Int32Array]",vT="[object Uint8Array]",ST="[object Uint8ClampedArray]",TT="[object Uint16Array]",ET="[object Uint32Array]",Mt={};Mt[bT]=Mt[wT]=Mt[CT]=Mt[kT]=Mt[_T]=Mt[vT]=Mt[ST]=Mt[TT]=Mt[ET]=!0;Mt[iT]=Mt[aT]=Mt[yT]=Mt[sT]=Mt[xT]=Mt[oT]=Mt[lT]=Mt[cT]=Mt[hT]=Mt[uT]=Mt[fT]=Mt[pT]=Mt[dT]=Mt[gT]=Mt[mT]=!1;function AT(t){return Ki(t)&&cm(t.length)&&!!Mt[zn(t)]}function LT(t){return function(e){return t(e)}}var fm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Si=fm&&typeof module=="object"&&module&&!module.nodeType&&module,BT=Si&&Si.exports===fm,ho=BT&&nm.process,Su=function(){try{var t=Si&&Si.require&&Si.require("util").types;return t||ho&&ho.binding&&ho.binding("util")}catch{}}(),Tu=Su&&Su.isTypedArray,_c=Tu?LT(Tu):AT;function gl(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var MT=Object.prototype,FT=MT.hasOwnProperty;function IT(t,e,r){var n=t[e];(!(FT.call(t,e)&&Ls(n,r))||r===void 0&&!(e in t))&&Cc(t,e,r)}function $T(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a-1&&t%1==0&&t0){if(++e>=ZT)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var eE=tE(KT);function rE(t,e){return eE(GT(t,e,mm),t+"")}function nE(t,e,r){if(!tn(r))return!1;var n=typeof e;return(n=="number"?Is(r)&&pm(e,r.length):n=="string"&&e in r)?Ls(r[e],t):!1}function iE(t){return rE(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&nE(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++no.args);$a(s),n=Vt(n,[...s])}else n=r.args;if(!n)return;let i=Vl(t,e);const a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),ym=g(function(t,e=null){var r,n;try{const i=new RegExp(`[%]{2}(?![{]${lE.source})(?=[}][%]{2}).* -`,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),z.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let a;const s=[];for(;(a=_i.exec(t))!==null;)if(a.index===_i.lastIndex&&_i.lastIndex++,a&&!e||e&&((r=a[1])!=null&&r.match(e))||e&&((n=a[2])!=null&&n.match(e))){const o=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;s.push({type:o,args:l})}return s.length===0?{type:t,args:null}:s.length===1?s[0]:s}catch(i){return z.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),hE=g(function(t){return t.replace(_i,"")},"removeDirectives"),uE=g(function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");function vc(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return oE[r]??e}g(vc,"interpolateToCurve");function xm(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?gg(r):r}g(xm,"formatUrl");var fE=g((t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let s=0;s{r+=Sc(i,e),e=i});const n=r/2;return Tc(t,n)}g(bm,"traverseEdge");function wm(t){return t.length===1?t[0]:bm(t)}g(wm,"calcLabelPosition");var Au=g((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),Tc=g((t,e)=>{let r,n=e;for(const i of t){if(r){const a=Sc(i,r);if(a=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:Au((1-s)*r.x+s*i.x,5),y:Au((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),pE=g((t,e,r)=>{z.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=Tc(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+i.x)/2,o.y=-Math.cos(s)*a+(e[0].y+i.y)/2,o},"calcCardinalityPosition");function Cm(t,e,r){const n=structuredClone(r);z.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const i=25+t,a=Tc(n,i),s=10+t*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}g(Cm,"calcTerminalLabelPosition");function km(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}g(km,"getStylesFromArray");var Lu=0,dE=g(()=>(Lu++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Lu),"generateId");function _m(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i_m(t.length),"random"),mE=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),yE=g(function(t,e){const r=e.text.replace(Nn.lineBreakRegex," "),[,n]=$s(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),xE=Xi((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Nn.lineBreakRegex.test(t)))return t;const n=t.split(" ").filter(Boolean),i=[];let a="";return n.forEach((s,o)=>{const l=Dn(`${s} `,r),c=Dn(a,r);if(l>e){const{hyphenatedStrings:f,remainingWord:p}=bE(s,e,"-",r);i.push(a,...f),a=p}else c+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),bE=Xi((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let s="";return i.forEach((o,l)=>{const c=`${s}${o}`;if(Dn(c,n)>=e){const u=l+1,f=i.length===u,p=`${c}${r}`;a.push(f?c:p),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function vm(t,e){return Ec(t,e).height}g(vm,"calculateTextHeight");function Dn(t,e){return Ec(t,e).width}g(Dn,"calculateTextWidth");var Ec=Xi((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};const[,a]=$s(r),s=["sans-serif",n],o=t.split(Nn.lineBreakRegex),l=[],c=kt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of s){let p=0;const d={width:0,height:0,lineHeight:0};for(const m of o){const x=mE();x.text=m||sE;const y=yE(h,x).style("font-size",a).style("font-weight",i).style("font-family",f),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");d.width=Math.round(Math.max(d.width,b.width)),p=Math.round(b.height),d.height+=p,d.lineHeight=Math.round(Math.max(d.lineHeight,p))}l.push(d)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Tn,wE=(Tn=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},g(Tn,"InitIDGenerator"),Tn),ha,CE=g(function(t){return ha=ha||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),ha.innerHTML=t,unescape(ha.textContent)},"entityDecode");function Ac(t){return"str"in t}g(Ac,"isDetailedError");var kE=g((t,e,r,n)=>{var a;if(!n)return;const i=(a=t.node())==null?void 0:a.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),$s=g(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function Lc(t,e){return aE({},t,e)}g(Lc,"cleanAndMerge");var Ve={assignWithDepth:Vt,wrapLabel:xE,calculateTextHeight:vm,calculateTextWidth:Dn,calculateTextDimensions:Ec,cleanAndMerge:Lc,detectInit:cE,detectDirective:ym,isSubstringInArray:uE,interpolateToCurve:vc,calcLabelPosition:wm,calcCardinalityPosition:pE,calcTerminalLabelPosition:Cm,formatUrl:xm,getStylesFromArray:km,generateId:dE,random:gE,runFunc:fE,entityDecode:CE,insertTitle:kE,parseFontSize:$s,InitIDGenerator:wE},_E=g(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),Hn=g(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),V3=g((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");function oe(t){return t??null}g(oe,"handleUndefinedAttr");function Bc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let nn=Bc();function Sm(t){nn=t}const Tm=/[&<>"']/,vE=new RegExp(Tm.source,"g"),Em=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,SE=new RegExp(Em.source,"g"),TE={"&":"&","<":"<",">":">",'"':""","'":"'"},Bu=t=>TE[t];function Ce(t,e){if(e){if(Tm.test(t))return t.replace(vE,Bu)}else if(Em.test(t))return t.replace(SE,Bu);return t}const EE=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function AE(t){return t.replace(EE,(e,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const LE=/(^|[^\[])\^/g;function St(t,e){let r=typeof t=="string"?t:t.source;e=e||"";const n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(LE,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}function Mu(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const Ti={exec:()=>null};function Fu(t,e){const r=t.replace(/\|/g,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{const a=i.match(/^\s+/);if(a===null)return i;const[s]=a;return s.length>=n.length?i.slice(n.length):i}).join(` -`)}class is{constructor(e){At(this,"options");At(this,"rules");At(this,"lexer");this.options=e||nn}space(e){const r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){const r=this.rules.block.code.exec(e);if(r){const n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:oi(n,` -`)}}}fences(e){const r=this.rules.block.fences.exec(e);if(r){const n=r[0],i=ME(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){const r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(/#$/.test(n)){const i=oi(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:oi(r[0],` -`)}}blockquote(e){const r=this.rules.block.blockquote.exec(e);if(r){let n=oi(r[0],` +*/const pk=Object.freeze({left:0,top:0,width:16,height:16}),ka=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Wm=Object.freeze({...pk,...ka}),dk=Object.freeze({...Wm,body:"",hidden:!1}),gk=Object.freeze({width:null,height:null}),mk=Object.freeze({...gk,...ka}),Qo=/^[a-z0-9]+(-[a-z0-9]+)*$/,yk=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const o=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:r,prefix:l,name:o};return Jo(c)?c:null}const s=i[0],a=s.split("-");if(a.length>1){const o={provider:r,prefix:a.shift(),name:a.join("-")};return Jo(o)?o:null}if(n&&r===""){const o={provider:r,prefix:"",name:s};return Jo(o,n)?o:null}return null},Jo=(t,e)=>t?!!((t.provider===""||t.provider.match(Qo))&&(e&&t.prefix===""||t.prefix.match(Qo))&&t.name.match(Qo)):!1;function xk(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function hf(t,e){const n=xk(t,e);for(const r in dk)r in ka?r in t&&!(r in n)&&(n[r]=ka[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function bk(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const o=r[a]&&r[a].parent,l=o&&s(o);l&&(i[a]=[o].concat(l))}return i[a]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),i}function uf(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let s={};function a(o){s=hf(r[o]||i[o],s)}return a(e),n.forEach(a),hf(t,s)}function wk(t,e){if(t.icons[e])return uf(t,e,[]);const n=bk(t,[e])[e];return n?uf(t,e,n):null}const Ck=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ff(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(Ck);if(r===null||!r.length)return t;const i=[];let s=r.shift(),a=vk.test(s);for(;;){if(a){const o=parseFloat(s);isNaN(o)?i.push(s):i.push(Math.ceil(o*e*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function _k(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),s=t.indexOf("",s);if(a===-1)break;n+=t.slice(i+1,s).trim(),t=t.slice(0,r).trim()+t.slice(a+1)}return{defs:n,content:t}}function kk(t,e){return t?""+t+""+e:e}function Sk(t,e,n){const r=_k(t);return kk(r.defs,e+r.content+n)}const Tk=t=>t==="unset"||t==="undefined"||t==="none";function Ek(t,e){const n={...Wm,...t},r={...mk,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const x=[],y=g.hFlip,b=g.vFlip;let w=g.rotate;y?b?w+=2:(x.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),x.push("scale(-1 1)"),i.top=i.left=0):b&&(x.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),x.push("scale(1 -1)"),i.top=i.left=0);let v;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:v=i.height/2+i.top,x.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:x.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:v=i.width/2+i.left,x.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}w%2===1&&(i.left!==i.top&&(v=i.left,i.left=i.top,i.top=v),i.width!==i.height&&(v=i.width,i.width=i.height,i.height=v)),x.length&&(s=Sk(s,'',""))});const a=r.width,o=r.height,l=i.width,c=i.height;let h,u;a===null?(u=o===null?"1em":o==="auto"?c:o,h=ff(u,l/c)):(h=a==="auto"?l:a,u=o===null?ff(h,c/l):o==="auto"?c:o);const f={},p=(g,x)=>{Tk(x)||(f[g]=x.toString())};p("width",h),p("height",u);const d=[i.left,i.top,l,c];return f.viewBox=d.join(" "),{attributes:f,viewBox:d,body:s}}const Ak=/\sid="(\S+)"/g,Lk="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Mk=0;function Bk(t,e=Lk){const n=[];let r;for(;r=Ak.exec(t);)n.push(r[1]);if(!n.length)return t;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof e=="function"?e(s):e+(Mk++).toString(),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),t=t.replace(new RegExp(i,"g"),""),t}function Ik(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'"+t+""}var Fk={body:'?',height:80,width:80},tc=new Map,Um=new Map,Rk=m(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(W.debug("Registering icon pack:",e.name),"loader"in e)Um.set(e.name,e.loader);else if("icons"in e)tc.set(e.name,e.icons);else throw W.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Pk=m(async(t,e)=>{const n=yk(t,!0,e!==void 0);if(!n)throw new Error(`Invalid icon name: ${t}`);const r=n.prefix||e;if(!r)throw new Error(`Icon name must contain a prefix: ${t}`);let i=tc.get(r);if(!i){const a=Um.get(r);if(!a)throw new Error(`Icon set not found: ${n.prefix}`);try{i={...await a(),prefix:r},tc.set(r,i)}catch(o){throw W.error(o),new Error(`Failed to load icon set: ${n.prefix}`)}}const s=wk(i,n.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),ho=m(async(t,e)=>{let n;try{n=await Pk(t,e==null?void 0:e.fallbackPrefix)}catch(s){W.error(s),n=Fk}const r=Ek(n,e);return Ik(Bk(r.body),r.attributes)},"getIconSVG"),uh=m(({flowchart:t})=>{var i,s;const e=((i=t==null?void 0:t.subGraphTitleMargin)==null?void 0:i.top)??0,n=((s=t==null?void 0:t.subGraphTitleMargin)==null?void 0:s.bottom)??0,r=e+n;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins"),fh={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.BLANK_URL=Gt.relativeFirstCharacters=Gt.whitespaceEscapeCharsRegex=Gt.urlSchemeRegex=Gt.ctrlCharactersRegex=Gt.htmlCtrlEntityRegex=Gt.htmlEntitiesRegex=Gt.invalidProtocolRegex=void 0;Gt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Gt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Gt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Gt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Gt.urlSchemeRegex=/^.+(:|:)/gim;Gt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Gt.relativeFirstCharacters=[".","/"];Gt.BLANK_URL="about:blank";Object.defineProperty(fh,"__esModule",{value:!0});var Vm=fh.sanitizeUrl=void 0,re=Gt;function Dk(t){return re.relativeFirstCharacters.indexOf(t[0])>-1}function Ok(t){var e=t.replace(re.ctrlCharactersRegex,"");return e.replace(re.htmlEntitiesRegex,function(n,r){return String.fromCharCode(r)})}function $k(t){return URL.canParse(t)}function pf(t){try{return decodeURIComponent(t)}catch{return t}}function Nk(t){if(!t)return re.BLANK_URL;var e,n=pf(t.trim());do n=Ok(n).replace(re.htmlCtrlEntityRegex,"").replace(re.ctrlCharactersRegex,"").replace(re.whitespaceEscapeCharsRegex,"").trim(),n=pf(n),e=n.match(re.ctrlCharactersRegex)||n.match(re.htmlEntitiesRegex)||n.match(re.htmlCtrlEntityRegex)||n.match(re.whitespaceEscapeCharsRegex);while(e&&e.length>0);var r=n;if(!r)return re.BLANK_URL;if(Dk(r))return r;var i=r.trimStart(),s=i.match(re.urlSchemeRegex);if(!s)return r;var a=s[0].toLowerCase().trim();if(re.invalidProtocolRegex.test(a))return re.BLANK_URL;var o=i.replace(/\\/g,"/");if(a==="mailto:"||a.includes("://"))return o;if(a==="http:"||a==="https:"){if(!$k(o))return re.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}Vm=fh.sanitizeUrl=Nk;var zk={value:()=>{}};function Ym(){for(var t=0,e=arguments.length,n={},r;t=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ra.prototype=Ym.prototype={constructor:ra,on:function(t,e){var n=this._,r=jk(t+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),r=0,i,s;r=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),gf.hasOwnProperty(e)?{space:gf[e],local:t}:t}function Hk(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ec&&e.documentElement.namespaceURI===ec?e.createElement(t):e.createElementNS(n,t)}}function Wk(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Gm(t){var e=uo(t);return(e.local?Wk:Hk)(e)}function Uk(){}function ph(t){return t==null?Uk:function(){return this.querySelector(t)}}function Vk(t){typeof t!="function"&&(t=ph(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=b+1);!(k=x[w])&&++w=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function yS(t){t||(t=xS);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,r=n.length,i=new Array(r),s=0;se?1:t>=e?0:NaN}function bS(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function wS(){return Array.from(this)}function CS(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?IS:typeof e=="function"?RS:FS)(t,e,n??"")):ni(this.node(),t)}function ni(t,e){return t.style.getPropertyValue(e)||Jm(t).getComputedStyle(t,null).getPropertyValue(e)}function DS(t){return function(){delete this[t]}}function OS(t,e){return function(){this[t]=e}}function $S(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function NS(t,e){return arguments.length>1?this.each((e==null?DS:typeof e=="function"?$S:OS)(t,e)):this.node()[t]}function ty(t){return t.trim().split(/^|\s+/)}function dh(t){return t.classList||new ey(t)}function ey(t){this._node=t,this._names=ty(t.getAttribute("class")||"")}ey.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ny(t,e){for(var n=dh(t),r=-1,i=e.length;++r=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function p2(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,s;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ns(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ns(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=v2.exec(t))?new ke(e[1],e[2],e[3],1):(e=_2.exec(t))?new ke(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=k2.exec(t))?Ns(e[1],e[2],e[3],e[4]):(e=S2.exec(t))?Ns(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=T2.exec(t))?vf(e[1],e[2]/100,e[3]/100,1):(e=E2.exec(t))?vf(e[1],e[2]/100,e[3]/100,e[4]):mf.hasOwnProperty(t)?bf(mf[t]):t==="transparent"?new ke(NaN,NaN,NaN,0):null}function bf(t){return new ke(t>>16&255,t>>8&255,t&255,1)}function Ns(t,e,n,r){return r<=0&&(t=e=n=NaN),new ke(t,e,n,r)}function M2(t){return t instanceof Ss||(t=us(t)),t?(t=t.rgb(),new ke(t.r,t.g,t.b,t.opacity)):new ke}function nc(t,e,n,r){return arguments.length===1?M2(t):new ke(t,e,n,r??1)}function ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}gh(ke,nc,ay(Ss,{brighter(t){return t=t==null?Ta:Math.pow(Ta,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?cs:Math.pow(cs,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ke(pr(this.r),pr(this.g),pr(this.b),Ea(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wf,formatHex:wf,formatHex8:B2,formatRgb:Cf,toString:Cf}));function wf(){return`#${ur(this.r)}${ur(this.g)}${ur(this.b)}`}function B2(){return`#${ur(this.r)}${ur(this.g)}${ur(this.b)}${ur((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cf(){const t=Ea(this.opacity);return`${t===1?"rgb(":"rgba("}${pr(this.r)}, ${pr(this.g)}, ${pr(this.b)}${t===1?")":`, ${t})`}`}function Ea(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ur(t){return t=pr(t),(t<16?"0":"")+t.toString(16)}function vf(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ke(t,e,n,r)}function oy(t){if(t instanceof Ke)return new Ke(t.h,t.s,t.l,t.opacity);if(t instanceof Ss||(t=us(t)),!t)return new Ke;if(t instanceof Ke)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(e===s?a=(n-r)/o+(n0&&l<1?0:a,new Ke(a,o,l,t.opacity)}function I2(t,e,n,r){return arguments.length===1?oy(t):new Ke(t,e,n,r??1)}function Ke(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}gh(Ke,I2,ay(Ss,{brighter(t){return t=t==null?Ta:Math.pow(Ta,t),new Ke(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?cs:Math.pow(cs,t),new Ke(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ke(tl(t>=240?t-240:t+120,i,r),tl(t,i,r),tl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ke(_f(this.h),zs(this.s),zs(this.l),Ea(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ea(this.opacity);return`${t===1?"hsl(":"hsla("}${_f(this.h)}, ${zs(this.s)*100}%, ${zs(this.l)*100}%${t===1?")":`, ${t})`}`}}));function _f(t){return t=(t||0)%360,t<0?t+360:t}function zs(t){return Math.max(0,Math.min(1,t||0))}function tl(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const mh=t=>()=>t;function ly(t,e){return function(n){return t+n*e}}function F2(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function w4(t,e){var n=e-t;return n?ly(t,n>180||n<-180?n-360*Math.round(n/360):n):mh(isNaN(t)?e:t)}function R2(t){return(t=+t)==1?cy:function(e,n){return n-e?F2(e,n,t):mh(isNaN(e)?n:e)}}function cy(t,e){var n=e-t;return n?ly(t,n):mh(isNaN(t)?e:t)}const kf=function t(e){var n=R2(e);function r(i,s){var a=n((i=nc(i)).r,(s=nc(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=cy(i.opacity,s.opacity);return function(h){return i.r=a(h),i.g=o(h),i.b=l(h),i.opacity=c(h),i+""}}return r.gamma=t,r}(1);function jn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var rc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,el=new RegExp(rc.source,"g");function P2(t){return function(){return t}}function D2(t){return function(e){return t(e)+""}}function O2(t,e){var n=rc.lastIndex=el.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(r=rc.exec(t))&&(i=el.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:jn(r,i)})),n=el.lastIndex;return n180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(i(u)+"rotate(",null,r)-2,x:jn(c,h)})):h&&u.push(i(u)+"rotate("+h+r)}function o(c,h,u,f){c!==h?f.push({i:u.push(i(u)+"skewX(",null,r)-2,x:jn(c,h)}):h&&u.push(i(u)+"skewX("+h+r)}function l(c,h,u,f,p,d){if(c!==u||h!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:jn(c,u)},{i:g-2,x:jn(h,f)})}else(u!==1||f!==1)&&p.push(i(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),s(c.translateX,c.translateY,h.translateX,h.translateY,u,f),a(c.rotate,h.rotate,u,f),o(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var d=-1,g=f.length,x;++d=0&&t._call.call(void 0,e),t=t._next;--ri}function Tf(){yr=(La=fs.now())+fo,ri=qi=0;try{H2()}finally{ri=0,U2(),yr=0}}function W2(){var t=fs.now(),e=t-La;e>fy&&(fo-=e,La=t)}function U2(){for(var t,e=Aa,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Aa=n);Hi=t,sc(r)}function sc(t){if(!ri){qi&&(qi=clearTimeout(qi));var e=t-yr;e>24?(t<1/0&&(qi=setTimeout(Tf,t-fs.now()-fo)),Ii&&(Ii=clearInterval(Ii))):(Ii||(La=fs.now(),Ii=setInterval(W2,fy)),ri=1,py(Tf))}}function Ef(t,e,n){var r=new Ma;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var V2=Ym("start","end","cancel","interrupt"),Y2=[],gy=0,Af=1,ac=2,ia=3,Lf=4,oc=5,sa=6;function po(t,e,n,r,i,s){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;G2(t,n,{name:e,index:r,group:i,on:V2,tween:Y2,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:gy})}function xh(t,e){var n=nn(t,e);if(n.state>gy)throw new Error("too late; already scheduled");return n}function bn(t,e){var n=nn(t,e);if(n.state>ia)throw new Error("too late; already running");return n}function nn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function G2(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=dy(s,0,n.time);function s(c){n.state=Af,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var h,u,f,p;if(n.state!==Af)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===ia)return Ef(a);p.state===Lf?(p.state=sa,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+hac&&r.state=0&&(e=e.slice(0,n)),!e||e==="start"})}function ST(t,e,n){var r,i,s=kT(e)?xh:bn;return function(){var a=s(this,t),o=a.on;o!==r&&(i=(r=o).copy()).on(e,n),a.on=i}}function TT(t,e){var n=this._id;return arguments.length<2?nn(this.node(),n).on.on(t):this.each(ST(n,t,e))}function ET(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function AT(){return this.on("end.remove",ET(this._id))}function LT(t){var e=this._name,n=this._id;typeof t!="function"&&(t=ph(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a=0))throw new Error(`invalid digits: ${t}`);if(e>15)return by;const n=10**e;return function(r){this._+=r[0];for(let i=1,s=r.length;iir)if(!(Math.abs(u*l-c*h)>ir)||!s)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,d=i-o,g=l*l+c*c,x=p*p+d*d,y=Math.sqrt(g),b=Math.sqrt(f),w=s*Math.tan((lc-Math.acos((g+f-x)/(2*y*b)))/2),v=w/b,k=w/y;Math.abs(v-1)>ir&&this._append`L${e+v*h},${n+v*u}`,this._append`A${s},${s},0,0,${+(u*p>h*d)},${this._x1=e+k*l},${this._y1=n+k*c}`}}arc(e,n,r,i,s,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=e+o,h=n+l,u=1^a,f=a?i-s:s-i;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ir||Math.abs(this._y1-h)>ir)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%cc+cc),f>tE?this._append`A${r},${r},0,1,${u},${e-o},${n-l}A${r},${r},0,1,${u},${this._x1=c},${this._y1=h}`:f>ir&&this._append`A${r},${r},0,${+(f>=lc)},${u},${this._x1=e+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Mr(t){return function(){return t}}const C4=Math.abs,v4=Math.atan2,_4=Math.cos,k4=Math.max,S4=Math.min,T4=Math.sin,E4=Math.sqrt,Mf=1e-12,wh=Math.PI,Bf=wh/2,A4=2*wh;function L4(t){return t>1?0:t<-1?wh:Math.acos(t)}function M4(t){return t>=1?Bf:t<=-1?-Bf:Math.asin(t)}function rE(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new nE(e)}function iE(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function wy(t){this._context=t}wy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Cy(t){return new wy(t)}function sE(t){return t[0]}function aE(t){return t[1]}function oE(t,e){var n=Mr(!0),r=null,i=Cy,s=null,a=rE(o);t=typeof t=="function"?t:t===void 0?sE:Mr(t),e=typeof e=="function"?e:e===void 0?aE:Mr(e);function o(l){var c,h=(l=iE(l)).length,u,f=!1,p;for(r==null&&(s=i(p=a())),c=0;c<=h;++c)!(c0)for(var r=t[0],i=e[0],s=t[n]-r,a=e[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*t[o]+(1-this._beta)*(r+l*s),this._beta*e[o]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const fE=function t(e){function n(r){return e===1?new go(r):new Ty(r,e)}return n.beta=function(r){return t(+r)},n}(.85);function Ia(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Ch(t,e){this._context=t,this._k=(1-e)/6}Ch.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ia(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ia(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const pE=function t(e){function n(r){return new Ch(r,e)}return n.tension=function(r){return t(+r)},n}(0);function vh(t,e){this._context=t,this._k=(1-e)/6}vh.prototype={areaStart:Un,areaEnd:Un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ia(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dE=function t(e){function n(r){return new vh(r,e)}return n.tension=function(r){return t(+r)},n}(0);function _h(t,e){this._context=t,this._k=(1-e)/6}_h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ia(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const gE=function t(e){function n(r){return new _h(r,e)}return n.tension=function(r){return t(+r)},n}(0);function kh(t,e,n){var r=t._x1,i=t._y1,s=t._x2,a=t._y2;if(t._l01_a>Mf){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Mf){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*c+t._x1*t._l23_2a-e*t._l12_2a)/h,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(r,i,s,a,t._x2,t._y2)}function Ey(t,e){this._context=t,this._alpha=e}Ey.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:kh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const mE=function t(e){function n(r){return e?new Ey(r,e):new Ch(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Ay(t,e){this._context=t,this._alpha=e}Ay.prototype={areaStart:Un,areaEnd:Un,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:kh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const yE=function t(e){function n(r){return e?new Ay(r,e):new vh(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function Ly(t,e){this._context=t,this._alpha=e}Ly.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kh(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const xE=function t(e){function n(r){return e?new Ly(r,e):new _h(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function My(t){this._context=t}My.prototype={areaStart:Un,areaEnd:Un,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function bE(t){return new My(t)}function If(t){return t<0?-1:1}function Ff(t,e,n){var r=t._x1-t._x0,i=e-t._x1,s=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(If(s)+If(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function Rf(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function nl(t,e,n){var r=t._x0,i=t._y0,s=t._x1,a=t._y1,o=(s-r)/3;t._context.bezierCurveTo(r+o,i+o*e,s-o,a-o*n,s,a)}function Fa(t){this._context=t}Fa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nl(this,this._t0,Rf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,nl(this,Rf(this,n=Ff(this,t,e)),n);break;default:nl(this,this._t0,n=Ff(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function By(t){this._context=new Iy(t)}(By.prototype=Object.create(Fa.prototype)).point=function(t,e){Fa.prototype.point.call(this,e,t)};function Iy(t){this._context=t}Iy.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,s){this._context.bezierCurveTo(e,t,r,n,s,i)}};function wE(t){return new Fa(t)}function CE(t){return new By(t)}function Fy(t){this._context=t}Fy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Pf(t),i=Pf(e),s=0,a=1;a=0;--e)i[e]=(a[e]-i[e+1])/s[e];for(s[n-1]=(t[n]+i[n-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function _E(t){return new mo(t,.5)}function kE(t){return new mo(t,0)}function SE(t){return new mo(t,1)}function Wi(t,e,n){this.k=t,this.x=e,this.y=n}Wi.prototype={constructor:Wi,scale:function(t){return t===1?this:new Wi(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Wi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Wi.prototype;var Ry=typeof global=="object"&&global&&global.Object===Object&&global,TE=typeof self=="object"&&self&&self.Object===Object&&self,wn=Ry||TE||Function("return this")(),Ra=wn.Symbol,Py=Object.prototype,EE=Py.hasOwnProperty,AE=Py.toString,Fi=Ra?Ra.toStringTag:void 0;function LE(t){var e=EE.call(t,Fi),n=t[Fi];try{t[Fi]=void 0;var r=!0}catch{}var i=AE.call(t);return r&&(e?t[Fi]=n:delete t[Fi]),i}var ME=Object.prototype,BE=ME.toString;function IE(t){return BE.call(t)}var FE="[object Null]",RE="[object Undefined]",Df=Ra?Ra.toStringTag:void 0;function hi(t){return t==null?t===void 0?RE:FE:Df&&Df in Object(t)?LE(t):IE(t)}function _r(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var PE="[object AsyncFunction]",DE="[object Function]",OE="[object GeneratorFunction]",$E="[object Proxy]";function Sh(t){if(!_r(t))return!1;var e=hi(t);return e==DE||e==OE||e==PE||e==$E}var rl=wn["__core-js_shared__"],Of=function(){var t=/[^.]+$/.exec(rl&&rl.keys&&rl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function NE(t){return!!Of&&Of in t}var zE=Function.prototype,jE=zE.toString;function kr(t){if(t!=null){try{return jE.call(t)}catch{}try{return t+""}catch{}}return""}var qE=/[\\^$.*+?()[\]{}|]/g,HE=/^\[object .+?Constructor\]$/,WE=Function.prototype,UE=Object.prototype,VE=WE.toString,YE=UE.hasOwnProperty,GE=RegExp("^"+VE.call(YE).replace(qE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function XE(t){if(!_r(t)||NE(t))return!1;var e=Sh(t)?GE:HE;return e.test(kr(t))}function KE(t,e){return t==null?void 0:t[e]}function Sr(t,e){var n=KE(t,e);return XE(n)?n:void 0}var ps=Sr(Object,"create");function ZE(){this.__data__=ps?ps(null):{},this.size=0}function QE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var JE="__lodash_hash_undefined__",tA=Object.prototype,eA=tA.hasOwnProperty;function nA(t){var e=this.__data__;if(ps){var n=e[t];return n===JE?void 0:n}return eA.call(e,t)?e[t]:void 0}var rA=Object.prototype,iA=rA.hasOwnProperty;function sA(t){var e=this.__data__;return ps?e[t]!==void 0:iA.call(e,t)}var aA="__lodash_hash_undefined__";function oA(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ps&&e===void 0?aA:e,this}function xr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}function dA(t,e){var n=this.__data__,r=xo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Fn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=jA}function Co(t){return t!=null&&zy(t.length)&&!Sh(t)}function qA(t){return Es(t)&&Co(t)}function HA(){return!1}var jy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wf=jy&&typeof module=="object"&&module&&!module.nodeType&&module,WA=Wf&&Wf.exports===jy,Uf=WA?wn.Buffer:void 0,UA=Uf?Uf.isBuffer:void 0,Eh=UA||HA,VA="[object Object]",YA=Function.prototype,GA=Object.prototype,qy=YA.toString,XA=GA.hasOwnProperty,KA=qy.call(Object);function ZA(t){if(!Es(t)||hi(t)!=VA)return!1;var e=$y(t);if(e===null)return!0;var n=XA.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&qy.call(n)==KA}var QA="[object Arguments]",JA="[object Array]",tL="[object Boolean]",eL="[object Date]",nL="[object Error]",rL="[object Function]",iL="[object Map]",sL="[object Number]",aL="[object Object]",oL="[object RegExp]",lL="[object Set]",cL="[object String]",hL="[object WeakMap]",uL="[object ArrayBuffer]",fL="[object DataView]",pL="[object Float32Array]",dL="[object Float64Array]",gL="[object Int8Array]",mL="[object Int16Array]",yL="[object Int32Array]",xL="[object Uint8Array]",bL="[object Uint8ClampedArray]",wL="[object Uint16Array]",CL="[object Uint32Array]",Nt={};Nt[pL]=Nt[dL]=Nt[gL]=Nt[mL]=Nt[yL]=Nt[xL]=Nt[bL]=Nt[wL]=Nt[CL]=!0;Nt[QA]=Nt[JA]=Nt[uL]=Nt[tL]=Nt[fL]=Nt[eL]=Nt[nL]=Nt[rL]=Nt[iL]=Nt[sL]=Nt[aL]=Nt[oL]=Nt[lL]=Nt[cL]=Nt[hL]=!1;function vL(t){return Es(t)&&zy(t.length)&&!!Nt[hi(t)]}function _L(t){return function(e){return t(e)}}var Hy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ts=Hy&&typeof module=="object"&&module&&!module.nodeType&&module,kL=ts&&ts.exports===Hy,il=kL&&Ry.process,Vf=function(){try{var t=ts&&ts.require&&ts.require("util").types;return t||il&&il.binding&&il.binding("util")}catch{}}(),Yf=Vf&&Vf.isTypedArray,Ah=Yf?_L(Yf):vL;function uc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var SL=Object.prototype,TL=SL.hasOwnProperty;function EL(t,e,n){var r=t[e];(!(TL.call(t,e)&&yo(r,n))||n===void 0&&!(e in t))&&Th(t,e,n)}function AL(t,e,n,r){var i=!n;n||(n={});for(var s=-1,a=e.length;++s-1&&t%1==0&&t0){if(++e>=UL)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var XL=GL(WL);function KL(t,e){return XL(qL(t,e,Yy),t+"")}function ZL(t,e,n){if(!_r(n))return!1;var r=typeof e;return(r=="number"?Co(n)&&Wy(e,n.length):r=="string"&&e in n)?yo(n[e],t):!1}function QL(t){return KL(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,a&&ZL(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++ro.args);da(a),r=Jt(r,[...a])}else r=n.args;if(!r)return;let i=Qc(t,e);const s="config";return r[s]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),r[i]=r[s],delete r[s]),r},"detectInit"),Gy=m(function(t,e=null){var n,r;try{const i=new RegExp(`[%]{2}(?![{]${nM.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),W.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let s;const a=[];for(;(s=Qi.exec(t))!==null;)if(s.index===Qi.lastIndex&&Qi.lastIndex++,s&&!e||e&&((n=s[1])!=null&&n.match(e))||e&&((r=s[2])!=null&&r.match(e))){const o=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;a.push({type:o,args:l})}return a.length===0?{type:t,args:null}:a.length===1?a[0]:a}catch(i){return W.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),iM=m(function(t){return t.replace(Qi,"")},"removeDirectives"),sM=m(function(t,e){for(const[n,r]of e.entries())if(r.match(t))return n;return-1},"isSubstringInArray");function Lh(t,e){if(!t)return e;const n=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return eM[n]??e}m(Lh,"interpolateToCurve");function Xy(t,e){const n=t.trim();if(n)return e.securityLevel!=="loose"?Vm(n):n}m(Xy,"formatUrl");var aM=m((t,...e)=>{const n=t.split("."),r=n.length-1,i=n[r];let s=window;for(let a=0;a{n+=Mh(i,e),e=i});const r=n/2;return Bh(t,r)}m(Ky,"traverseEdge");function Zy(t){return t.length===1?t[0]:Ky(t)}m(Zy,"calcLabelPosition");var Xf=m((t,e=2)=>{const n=Math.pow(10,e);return Math.round(t*n)/n},"roundNumber"),Bh=m((t,e)=>{let n,r=e;for(const i of t){if(n){const s=Mh(i,n);if(s=1)return{x:i.x,y:i.y};if(a>0&&a<1)return{x:Xf((1-a)*n.x+a*i.x,5),y:Xf((1-a)*n.y+a*i.y,5)}}}n=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),oM=m((t,e,n)=>{W.info(`our points ${JSON.stringify(e)}`),e[0]!==n&&(e=e.reverse());const i=Bh(e,25),s=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(a)*s+(e[0].x+i.x)/2,o.y=-Math.cos(a)*s+(e[0].y+i.y)/2,o},"calcCardinalityPosition");function Qy(t,e,n){const r=structuredClone(n);W.info("our points",r),e!=="start_left"&&e!=="start_right"&&r.reverse();const i=25+t,s=Bh(r,i),a=10+t*.5,o=Math.atan2(r[0].y-s.y,r[0].x-s.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*a+(r[0].x+s.x)/2,l.y=-Math.cos(o+Math.PI)*a+(r[0].y+s.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*a+(r[0].x+s.x)/2-5,l.y=-Math.cos(o-Math.PI)*a+(r[0].y+s.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*a+(r[0].x+s.x)/2-5,l.y=-Math.cos(o)*a+(r[0].y+s.y)/2-5):(l.x=Math.sin(o)*a+(r[0].x+s.x)/2,l.y=-Math.cos(o)*a+(r[0].y+s.y)/2),l}m(Qy,"calcTerminalLabelPosition");function Jy(t){let e="",n="";for(const r of t)r!==void 0&&(r.startsWith("color:")||r.startsWith("text-align:")?n=n+r+";":e=e+r+";");return{style:e,labelStyle:n}}m(Jy,"getStylesFromArray");var Kf=0,lM=m(()=>(Kf++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Kf),"generateId");function tx(t){let e="";const n="0123456789abcdef",r=n.length;for(let i=0;itx(t.length),"random"),hM=m(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),uM=m(function(t,e){const n=e.text.replace(ci.lineBreakRegex," "),[,r]=vo(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",r),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+e.textMargin*2),s.attr("fill",e.fill),s.text(n),i},"drawSimpleText"),fM=Ts((t,e,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},n),ci.lineBreakRegex.test(t)))return t;const r=t.split(" ").filter(Boolean),i=[];let s="";return r.forEach((a,o)=>{const l=ii(`${a} `,n),c=ii(s,n);if(l>e){const{hyphenatedStrings:f,remainingWord:p}=pM(a,e,"-",n);i.push(s,...f),s=p}else c+l>=e?(i.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===r.length&&i.push(s)}),i.filter(a=>a!=="").join(n.joinWith)},(t,e,n)=>`${t}${e}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),pM=Ts((t,e,n="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const i=[...t],s=[];let a="";return i.forEach((o,l)=>{const c=`${a}${o}`;if(ii(c,r)>=e){const u=l+1,f=i.length===u,p=`${c}${n}`;s.push(f?c:p),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(t,e,n="-",r)=>`${t}${e}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function ex(t,e){return Ih(t,e).height}m(ex,"calculateTextHeight");function ii(t,e){return Ih(t,e).width}m(ii,"calculateTextWidth");var Ih=Ts((t,e)=>{const{fontSize:n=12,fontFamily:r="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};const[,s]=vo(n),a=["sans-serif",r],o=t.split(ci.lineBreakRegex),l=[],c=At("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let p=0;const d={width:0,height:0,lineHeight:0};for(const g of o){const x=hM();x.text=g||tM;const y=uM(h,x).style("font-size",s).style("font-weight",i).style("font-family",f),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");d.width=Math.round(Math.max(d.width,b.width)),p=Math.round(b.height),d.height+=p,d.lineHeight=Math.round(Math.max(d.lineHeight,p))}l.push(d)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Yr,dM=(Yr=class{constructor(e=!1,n){this.count=0,this.count=n?n.length:0,this.next=e?()=>this.count++:()=>Date.now()}},m(Yr,"InitIDGenerator"),Yr),qs,gM=m(function(t){return qs=qs||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qs.innerHTML=t,unescape(qs.textContent)},"entityDecode");function Fh(t){return"str"in t}m(Fh,"isDetailedError");var mM=m((t,e,n,r)=>{var s;if(!r)return;const i=(s=t.node())==null?void 0:s.getBBox();i&&t.append("text").text(r).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-n).attr("class",e)},"insertTitle"),vo=m(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function Rh(t,e){return JL({},t,e)}m(Rh,"cleanAndMerge");var cn={assignWithDepth:Jt,wrapLabel:fM,calculateTextHeight:ex,calculateTextWidth:ii,calculateTextDimensions:Ih,cleanAndMerge:Rh,detectInit:rM,detectDirective:Gy,isSubstringInArray:sM,interpolateToCurve:Lh,calcLabelPosition:Zy,calcCardinalityPosition:oM,calcTerminalLabelPosition:Qy,formatUrl:Xy,getStylesFromArray:Jy,generateId:lM,random:cM,runFunc:aM,entityDecode:gM,insertTitle:mM,parseFontSize:vo,InitIDGenerator:dM},yM=m(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(n){return n.substring(0,n.length-1)}),e=e.replace(/#\w+;/g,function(n){const r=n.substring(1,n.length-1);return/^\+?\d+$/.test(r)?"fl°°"+r+"¶ß":"fl°"+r+"¶ß"}),e},"encodeEntities"),fi=m(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),B4=m((t,e,{counter:n=0,prefix:r,suffix:i})=>`${r?`${r}_`:""}${t}_${e}_${n}${i?`_${i}`:""}`,"getEdgeId");function de(t){return t??null}m(de,"handleUndefinedAttr");function Ph(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Tr=Ph();function nx(t){Tr=t}const rx=/[&<>"']/,xM=new RegExp(rx.source,"g"),ix=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,bM=new RegExp(ix.source,"g"),wM={"&":"&","<":"<",">":">",'"':""","'":"'"},Zf=t=>wM[t];function Ae(t,e){if(e){if(rx.test(t))return t.replace(xM,Zf)}else if(ix.test(t))return t.replace(bM,Zf);return t}const CM=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function vM(t){return t.replace(CM,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const _M=/(^|[^\[])\^/g;function It(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(_M,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,e)};return r}function Qf(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const es={exec:()=>null};function Jf(t,e){const n=t.replace(/\|/g,(s,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length{const s=i.match(/^\s+/);if(s===null)return i;const[a]=s;return a.length>=r.length?i.slice(r.length):i}).join(` +`)}class $a{constructor(e){Pt(this,"options");Pt(this,"rules");Pt(this,"lexer");this.options=e||Tr}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Ri(r,` +`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=SM(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=Ri(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:Ri(n[0],` +`)}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){let r=Ri(n[0],` `).split(` -`),i="",a="";const s=[];for(;n.length>0;){let o=!1;const l=[];let c;for(c=0;c/.test(n[c]))l.push(n[c]),o=!0;else if(!o)l.push(n[c]);else break;n=n.slice(c);const h=l.join(` +`),i="",s="";const a=[];for(;r.length>0;){let o=!1;const l=[];let c;for(c=0;c/.test(r[c]))l.push(r[c]),o=!0;else if(!o)l.push(r[c]);else break;r=r.slice(c);const h=l.join(` `),u=h.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` $1`).replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i} -${h}`:h,a=a?`${a} -${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=f,n.length===0)break;const p=s[s.length-1];if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const d=p,m=d.raw+` -`+n.join(` -`),x=this.blockquote(m);s[s.length-1]=x,i=i.substring(0,i.length-d.raw.length)+x.raw,a=a.substring(0,a.length-d.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){const d=p,m=d.raw+` -`+n.join(` -`),x=this.list(m);s[s.length-1]=x,i=i.substring(0,i.length-p.raw.length)+x.raw,a=a.substring(0,a.length-d.raw.length)+x.raw,n=m.substring(s[s.length-1].raw.length).split(` -`);continue}}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim();const i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let l=!1,c="",h="";if(!(r=s.exec(e))||this.rules.block.hr.test(e))break;c=r[0],e=e.substring(c.length);let u=r[2].split(` +${h}`:h,s=s?`${s} +${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=f,r.length===0)break;const p=a[a.length-1];if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const d=p,g=d.raw+` +`+r.join(` +`),x=this.blockquote(g);a[a.length-1]=x,i=i.substring(0,i.length-d.raw.length)+x.raw,s=s.substring(0,s.length-d.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){const d=p,g=d.raw+` +`+r.join(` +`),x=this.list(g);a[a.length-1]=x,i=i.substring(0,i.length-p.raw.length)+x.raw,s=s.substring(0,s.length-d.raw.length)+x.raw,r=g.substring(a[a.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:i,tokens:a,text:s}}}list(e){let n=this.rules.block.list.exec(e);if(n){let r=n[1].trim();const i=r.length>1,s={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const a=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let l=!1,c="",h="";if(!(n=a.exec(e))||this.rules.block.hr.test(e))break;c=n[0],e=e.substring(c.length);let u=n[2].split(` `,1)[0].replace(/^\t+/,y=>" ".repeat(3*y.length)),f=e.split(` -`,1)[0],p=!u.trim(),d=0;if(this.options.pedantic?(d=2,h=u.trimStart()):p?d=r[1].length+1:(d=r[2].search(/[^ ]/),d=d>4?1:d,h=u.slice(d),d+=r[1].length),p&&/^ *$/.test(f)&&(c+=f+` -`,e=e.substring(f.length+1),l=!0),!l){const y=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),C=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),v=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;e;){const S=e.split(` -`,1)[0];if(f=S,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),C.test(f)||v.test(f)||y.test(f)||b.test(e))break;if(f.search(/[^ ]/)>=d||!f.trim())h+=` -`+f.slice(d);else{if(p||u.search(/[^ ]/)>=4||C.test(u)||v.test(u)||b.test(u))break;h+=` -`+f}!p&&!f.trim()&&(p=!0),c+=S+` -`,e=e.substring(S.length+1),u=f.slice(d)}}a.loose||(o?a.loose=!0:/\n *\n *$/.test(c)&&(o=!0));let m=null,x;this.options.gfm&&(m=/^\[[ xX]\] /.exec(h),m&&(x=m[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:c,task:!!m,checked:x,loose:!1,text:h,tokens:[]}),a.raw+=c}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let l=0;lu.type==="space"),h=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));a.loose=h}if(a.loose)for(let l=0;l$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(e){const r=this.rules.block.table.exec(e);if(!r||!/[:|]/.test(r[2]))return;const n=Fu(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` -`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const o of i)/^ *-+: *$/.test(o)?s.align.push("right"):/^ *:-+: *$/.test(o)?s.align.push("center"):/^ *:-+ *$/.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(e){const r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){const r=this.rules.block.paragraph.exec(e);if(r){const n=r[1].charAt(r[1].length-1)===` -`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){const r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:Ce(r[1])}}tag(e){const r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&/^/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){const r=this.rules.inline.link.exec(e);if(r){const n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const s=oi(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=BE(r[2],"()");if(s>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){const s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),Iu(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Iu(n,a,n[0],this.lexer)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let o,l,c=s,h=0;const u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*e.length+s);(i=u.exec(r))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=[...o].length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&s%3&&!((s+l)%3)){h+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+h);const f=[...i[0]][0].length,p=e.slice(0,s+i.index+f+l);if(Math.min(s,l)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(/\n/g," ");const i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=Ce(n,!0),{type:"codespan",raw:r[0],text:n}}}br(e){const r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){const r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){const r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=Ce(r[1]),i="mailto:"+n):(n=Ce(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let i,a;if(r[2]==="@")i=Ce(r[0]),a="mailto:"+i;else{let s;do s=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(s!==r[0]);i=Ce(r[0]),r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const r=this.rules.inline.text.exec(e);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=Ce(r[0]),{type:"text",raw:r[0],text:n}}}}const FE=/^(?: *(?:\n|$))+/,IE=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,$E=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Zi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,RE=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Am=/(?:[*+-]|\d{1,9}[.)])/,Lm=St(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Am).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Mc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,DE=/^[^\n]+/,Fc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,PE=St(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Fc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),OE=St(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Am).getRegex(),Rs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ic=/|$))/,NE=St("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Ic).replace("tag",Rs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Bm=St(Mc).replace("hr",Zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),zE=St(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Bm).getRegex(),$c={blockquote:zE,code:IE,def:PE,fences:$E,heading:RE,hr:Zi,html:NE,lheading:Lm,list:OE,newline:FE,paragraph:Bm,table:Ti,text:DE},$u=St("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),qE={...$c,table:$u,paragraph:St(Mc).replace("hr",Zi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$u).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex()},HE={...$c,html:St(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ic).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ti,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:St(Mc).replace("hr",Zi).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Lm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Mm=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,WE=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fm=/^( {2,}|\\)\n(?!\s*$)/,jE=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,VE=St(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Qi).getRegex(),GE=St("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Qi).getRegex(),XE=St("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Qi).getRegex(),KE=St(/\\([punct])/,"gu").replace(/punct/g,Qi).getRegex(),ZE=St(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),QE=St(Ic).replace("(?:-->|$)","-->").getRegex(),JE=St("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",QE).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),as=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,tA=St(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",as).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Im=St(/^!?\[(label)\]\[(ref)\]/).replace("label",as).replace("ref",Fc).getRegex(),$m=St(/^!?\[(ref)\](?:\[\])?/).replace("ref",Fc).getRegex(),eA=St("reflink|nolink(?!\\()","g").replace("reflink",Im).replace("nolink",$m).getRegex(),Rc={_backpedal:Ti,anyPunctuation:KE,autolink:ZE,blockSkip:YE,br:Fm,code:WE,del:Ti,emStrongLDelim:VE,emStrongRDelimAst:GE,emStrongRDelimUnd:XE,escape:Mm,link:tA,nolink:$m,punctuation:UE,reflink:Im,reflinkSearch:eA,tag:JE,text:jE,url:Ti},rA={...Rc,link:St(/^!?\[(label)\]\((.*?)\)/).replace("label",as).getRegex(),reflink:St(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",as).getRegex()},ml={...Rc,escape:St(Mm).replace("])","~|])").getRegex(),url:St(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let i,a,s;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(i=o.call({lexer:this},e,r))?(e=e.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&r.length>0?r[r.length-1].raw+=` -`:r.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` -`+i.raw,a.text+=` -`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` -`+i.raw,a.text+=` -`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),r.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const l=e.slice(1);let c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},l),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(s=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){a=r[r.length-1],n&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=` -`+i.raw,a.text+=` -`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i),n=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=` -`+i.raw,a.text+=` -`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(i);continue}if(e){const o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){let n,i,a,s=e,o,l,c;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,o.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(n=h.call({lexer:this},e,r))?(e=e.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(e,s,c)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),r.push(n);continue}if(a=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const u=e.slice(1);let f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(a=e.substring(0,h+1))}if(n=this.tokenizer.inlineText(a)){e=e.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(c=n.raw.slice(-1)),l=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}}class ss{constructor(e){At(this,"options");At(this,"parser");this.options=e||nn}space(e){return""}code({text:e,lang:r,escaped:n}){var s;const i=(s=(r||"").match(/^\S*/))==null?void 0:s[0],a=e.replace(/\n$/,"")+` -`;return i?'
'+(n?a:Ce(a,!0))+`
-`:"
"+(n?a:Ce(a,!0))+`
+`,1)[0],p=!u.trim(),d=0;if(this.options.pedantic?(d=2,h=u.trimStart()):p?d=n[1].length+1:(d=n[2].search(/[^ ]/),d=d>4?1:d,h=u.slice(d),d+=n[1].length),p&&/^ *$/.test(f)&&(c+=f+` +`,e=e.substring(f.length+1),l=!0),!l){const y=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,d-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,d-1)}}(?:\`\`\`|~~~)`),v=new RegExp(`^ {0,${Math.min(3,d-1)}}#`);for(;e;){const k=e.split(` +`,1)[0];if(f=k,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),w.test(f)||v.test(f)||y.test(f)||b.test(e))break;if(f.search(/[^ ]/)>=d||!f.trim())h+=` +`+f.slice(d);else{if(p||u.search(/[^ ]/)>=4||w.test(u)||v.test(u)||b.test(u))break;h+=` +`+f}!p&&!f.trim()&&(p=!0),c+=k+` +`,e=e.substring(k.length+1),u=f.slice(d)}}s.loose||(o?s.loose=!0:/\n *\n *$/.test(c)&&(o=!0));let g=null,x;this.options.gfm&&(g=/^\[[ xX]\] /.exec(h),g&&(x=g[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),s.items.push({type:"list_item",raw:c,task:!!g,checked:x,loose:!1,text:h,tokens:[]}),s.raw+=c}s.items[s.items.length-1].raw=s.items[s.items.length-1].raw.trimEnd(),s.items[s.items.length-1].text=s.items[s.items.length-1].text.trimEnd(),s.raw=s.raw.trimEnd();for(let l=0;lu.type==="space"),h=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));s.loose=h}if(s.loose)for(let l=0;l$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:s}}}table(e){const n=this.rules.block.table.exec(e);if(!n||!/[:|]/.test(n[2]))return;const r=Jf(n[1]),i=n[2].replace(/^\||\| *$/g,"").split("|"),s=n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(` +`):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const o of i)/^ *-+: *$/.test(o)?a.align.push("right"):/^ *:-+: *$/.test(o)?a.align.push("center"):/^ *:-+ *$/.test(o)?a.align.push("left"):a.align.push(null);for(let o=0;o({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const r=n[1].charAt(n[1].length-1)===` +`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"escape",raw:n[0],text:Ae(n[1])}}tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.state.inLink&&/^
/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(e){const n=this.rules.inline.link.exec(e);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;const a=Ri(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=kM(n[2],"()");if(a>-1){const l=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a&&(i=a[1],s=a[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^$/.test(r)?i=i.slice(1):i=i.slice(1,-1)),tp(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer)}}reflink(e,n){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const i=(r[2]||r[1]).replace(/\s+/g," "),s=n[i.toLowerCase()];if(!s){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return tp(r,s,r[0],this.lexer)}}emStrong(e,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!i||i[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const a=[...i[0]].length-1;let o,l,c=a,h=0;const u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,n=n.slice(-1*e.length+a);(i=u.exec(n))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(l=[...o].length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&a%3&&!((a+l)%3)){h+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+h);const f=[...i[0]][0].length,p=e.slice(0,a+i.index+f+l);if(Math.min(a,l)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const n=this.rules.inline.code.exec(e);if(n){let r=n[2].replace(/\n/g," ");const i=/[^ ]/.test(r),s=/^ /.test(r)&&/ $/.test(r);return i&&s&&(r=r.substring(1,r.length-1)),r=Ae(r,!0),{type:"codespan",raw:n[0],text:r}}}br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n[0]}}del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let r,i;return n[2]==="@"?(r=Ae(n[1]),i="mailto:"+r):(r=Ae(n[1]),i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let n;if(n=this.rules.inline.url.exec(e)){let i,s;if(n[2]==="@")i=Ae(n[0]),s="mailto:"+i;else{let a;do a=n[0],n[0]=((r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])??"";while(a!==n[0]);i=Ae(n[0]),n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=Ae(n[0]),{type:"text",raw:n[0],text:r}}}}const TM=/^(?: *(?:\n|$))+/,EM=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,AM=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,As=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,LM=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,sx=/(?:[*+-]|\d{1,9}[.)])/,ax=It(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,sx).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Dh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,MM=/^[^\n]+/,Oh=/(?!\s*\])(?:\\.|[^\[\]\\])+/,BM=It(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Oh).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),IM=It(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,sx).getRegex(),_o="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",$h=/|$))/,FM=It("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",$h).replace("tag",_o).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ox=It(Dh).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_o).getRegex(),RM=It(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ox).getRegex(),Nh={blockquote:RM,code:EM,def:BM,fences:AM,heading:LM,hr:As,html:FM,lheading:ax,list:IM,newline:TM,paragraph:ox,table:es,text:MM},ep=It("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_o).getRegex(),PM={...Nh,table:ep,paragraph:It(Dh).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ep).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_o).getRegex()},DM={...Nh,html:It(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",$h).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:es,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:It(Dh).replace("hr",As).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",ax).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OM=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cx=/^( {2,}|\\)\n(?!\s*$)/,$M=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,jM=It(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ls).getRegex(),qM=It("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ls).getRegex(),HM=It("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ls).getRegex(),WM=It(/\\([punct])/,"gu").replace(/punct/g,Ls).getRegex(),UM=It(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),VM=It($h).replace("(?:-->|$)","-->").getRegex(),YM=It("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",VM).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Na=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,GM=It(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Na).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),hx=It(/^!?\[(label)\]\[(ref)\]/).replace("label",Na).replace("ref",Oh).getRegex(),ux=It(/^!?\[(ref)\](?:\[\])?/).replace("ref",Oh).getRegex(),XM=It("reflink|nolink(?!\\()","g").replace("reflink",hx).replace("nolink",ux).getRegex(),zh={_backpedal:es,anyPunctuation:WM,autolink:UM,blockSkip:zM,br:cx,code:OM,del:es,emStrongLDelim:jM,emStrongRDelimAst:qM,emStrongRDelimUnd:HM,escape:lx,link:GM,nolink:ux,punctuation:NM,reflink:hx,reflinkSearch:XM,tag:YM,text:$M,url:es},KM={...zh,link:It(/^!?\[(label)\]\((.*?)\)/).replace("label",Na).getRegex(),reflink:It(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Na).getRegex()},fc={...zh,escape:It(lx).replace("])","~|])").getRegex(),url:It(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let i,s,a;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(i=o.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&n.length>0?n[n.length-1].raw+=` +`:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),s=n[n.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` +`+i.raw,s.text+=` +`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),s=n[n.length-1],s&&(s.type==="paragraph"||s.type==="text")?(s.raw+=` +`+i.raw,s.text+=` +`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(a=e,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const l=e.slice(1);let c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},l),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){s=n[n.length-1],r&&(s==null?void 0:s.type)==="paragraph"?(s.raw+=` +`+i.raw,s.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(i),r=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),s=n[n.length-1],s&&s.type==="text"?(s.raw+=` +`+i.raw,s.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):n.push(i);continue}if(e){const o="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r,i,s,a=e,o,l,c;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)h.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,o.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(r=h.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length),i=n[n.length-1],i&&r.type==="text"&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(e,a,c)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),n.push(r);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const u=e.slice(1);let f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(s=e.substring(0,h+1))}if(r=this.tokenizer.inlineText(s)){e=e.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(c=r.raw.slice(-1)),l=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=r.raw,i.text+=r.text):n.push(r);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}}class za{constructor(e){Pt(this,"options");Pt(this,"parser");this.options=e||Tr}space(e){return""}code({text:e,lang:n,escaped:r}){var a;const i=(a=(n||"").match(/^\S*/))==null?void 0:a[0],s=e.replace(/\n$/,"")+` +`;return i?'
'+(r?s:Ae(s,!0))+`
+`:"
"+(r?s:Ae(s,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
-`}html({text:e}){return e}heading({tokens:e,depth:r}){return`${this.parser.parseInline(e)} +`}html({text:e}){return e}heading({tokens:e,depth:n}){return`${this.parser.parseInline(e)} `}hr(e){return`
-`}list(e){const r=e.ordered,n=e.start;let i="";for(let o=0;o -`+i+" -`}listitem(e){let r="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" "}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`
  • ${r}
  • +`}list(e){const n=e.ordered,r=e.start;let i="";for(let o=0;o +`+i+" +`}listitem(e){let n="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&e.tokens[0].type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):n+=r+" "}return n+=this.parser.parse(e.tokens,!!e.loose),`
  • ${n}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let r="",n="";for(let a=0;a${i}`),` +`}table(e){let n="",r="";for(let s=0;s${i}`),`
    -`+r+` +`+n+` `+i+`
    `}tablerow({text:e}){return` ${e} -`}tablecell(e){const r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:r,tokens:n}){const i=this.parser.parseInline(n),a=Mu(e);if(a===null)return i;e=a;let s='
    ",s}image({href:e,title:r,text:n}){const i=Mu(e);if(i===null)return n;e=i;let a=`${n}{const c=o[l].flat(1/0);n=n.concat(this.walkTokens(c,r))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,r)))}}return n}use(...e){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){const a=this.defaults.renderer||new ss(this.defaults);for(const s in n.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const o=s;let l=n.renderer[o];n.useNewRenderer||(l=Jn(this,dr,Rm).call(this,l,o,a));const c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}i.renderer=a}if(n.tokenizer){const a=this.defaults.tokenizer||new is(this.defaults);for(const s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const o=s,l=n.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}i.tokenizer=a}if(n.hooks){const a=this.defaults.hooks||new Ei;for(const s in n.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const o=s,l=n.hooks[o],c=a[o];Ei.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async)return Promise.resolve(l.call(a,h)).then(f=>c.call(a,f));const u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}i.hooks=a}if(n.walkTokens){const a=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return Xe.lex(e,r??this.defaults)}parser(e,r){return Ke.parse(e,r??this.defaults)}}dr=new WeakSet,Rm=function(e,r,n){switch(r){case"heading":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,n.parser.parseInline(i.tokens),i.depth,AE(n.parser.parseInline(i.tokens,n.parser.textRenderer)))};case"code":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.lang,!!i.escaped)};case"table":return function(i){if(!i.type||i.type!==r)return e.apply(this,arguments);let a="",s="";for(let l=0;l0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=d+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=d+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:d+" "}):p+=d+" "}p+=this.parser.parse(h.tokens,o),l+=this.listitem({type:"list_item",raw:p,text:p,task:f,checked:!!u,loose:o,tokens:h.tokens})}return e.call(this,l,a,s)};case"html":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text,i.block)};case"paragraph":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"escape":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"link":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,this.parser.parseInline(i.tokens))};case"image":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.href,i.title,i.text)};case"strong":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"em":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"codespan":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)};case"del":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"text":return function(i){return!i.type||i.type!==r?e.apply(this,arguments):e.call(this,i.text)}}return e},yl=function(e,r){return(n,i)=>{const a={...i},s={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);const o=Jn(this,dr,Dm).call(this,!!s.silent,!!s.async);if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(l=>e(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>r(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(o);try{s.hooks&&(n=s.hooks.preprocess(n));let l=e(n,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let c=r(l,s);return s.hooks&&(c=s.hooks.postprocess(c)),c}catch(l){return o(l)}}},Dm=function(e,r){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const i="

    An error occurred:

    "+Ce(n.message+"",!0)+"
    ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}};const Qr=new iA;function vt(t,e){return Qr.parse(t,e)}vt.options=vt.setOptions=function(t){return Qr.setOptions(t),vt.defaults=Qr.defaults,Sm(vt.defaults),vt};vt.getDefaults=Bc;vt.defaults=nn;vt.use=function(...t){return Qr.use(...t),vt.defaults=Qr.defaults,Sm(vt.defaults),vt};vt.walkTokens=function(t,e){return Qr.walkTokens(t,e)};vt.parseInline=Qr.parseInline;vt.Parser=Ke;vt.parser=Ke.parse;vt.Renderer=ss;vt.TextRenderer=Dc;vt.Lexer=Xe;vt.lexer=Xe.lex;vt.Tokenizer=is;vt.Hooks=Ei;vt.parse=vt;vt.options;vt.setOptions;vt.use;vt.walkTokens;vt.parseInline;Ke.parse;Xe.lex;function Pm(t){for(var e=[],r=1;r`:`<${r}>`)+n+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:n,tokens:r}){const i=this.parser.parseInline(r),s=Qf(e);if(s===null)return i;e=s;let a='
    ",a}image({href:e,title:n,text:r}){const i=Qf(e);if(i===null)return r;e=i;let s=`${r}{const c=o[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){const a=n.renderers[s.name];a?n.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=n[s.level];a?a.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){const s=this.defaults.renderer||new za(this.defaults);for(const a in r.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const o=a;let l=r.renderer[o];r.useNewRenderer||(l=Ti(this,In,fx).call(this,l,o,s));const c=s[o];s[o]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u||""}}i.renderer=s}if(r.tokenizer){const s=this.defaults.tokenizer||new $a(this.defaults);for(const a in r.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const o=a,l=r.tokenizer[o],c=s[o];s[o]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}i.tokenizer=s}if(r.hooks){const s=this.defaults.hooks||new ns;for(const a in r.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(a==="options")continue;const o=a,l=r.hooks[o],c=s[o];ns.passThroughHooks.has(a)?s[o]=h=>{if(this.defaults.async)return Promise.resolve(l.call(s,h)).then(f=>c.call(s,f));const u=l.call(s,h);return c.call(s,u)}:s[o]=(...h)=>{let u=l.apply(s,h);return u===!1&&(u=c.apply(s,h)),u}}i.hooks=s}if(r.walkTokens){const s=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,n){return un.lex(e,n??this.defaults)}parser(e,n){return fn.parse(e,n??this.defaults)}}In=new WeakSet,fx=function(e,n,r){switch(n){case"heading":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,r.parser.parseInline(i.tokens),i.depth,vM(r.parser.parseInline(i.tokens,r.parser.textRenderer)))};case"code":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,i.text,i.lang,!!i.escaped)};case"table":return function(i){if(!i.type||i.type!==n)return e.apply(this,arguments);let s="",a="";for(let l=0;l0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=d+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=d+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:d+" "}):p+=d+" "}p+=this.parser.parse(h.tokens,o),l+=this.listitem({type:"list_item",raw:p,text:p,task:f,checked:!!u,loose:o,tokens:h.tokens})}return e.call(this,l,s,a)};case"html":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,i.text,i.block)};case"paragraph":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"escape":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,i.text)};case"link":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,i.href,i.title,this.parser.parseInline(i.tokens))};case"image":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,i.href,i.title,i.text)};case"strong":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"em":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"codespan":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,i.text)};case"del":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,this.parser.parseInline(i.tokens))};case"text":return function(i){return!i.type||i.type!==n?e.apply(this,arguments):e.call(this,i.text)}}return e},pc=function(e,n){return(r,i)=>{const s={...i},a={...this.defaults,...s};this.defaults.async===!0&&s.async===!1&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);const o=Ti(this,In,px).call(this,!!a.silent,!!a.async);if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(r):r).then(l=>e(l,a)).then(l=>a.hooks?a.hooks.processAllTokens(l):l).then(l=>a.walkTokens?Promise.all(this.walkTokens(l,a.walkTokens)).then(()=>l):l).then(l=>n(l,a)).then(l=>a.hooks?a.hooks.postprocess(l):l).catch(o);try{a.hooks&&(r=a.hooks.preprocess(r));let l=e(r,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let c=n(l,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(l){return o(l)}}},px=function(e,n){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){const i="

    An error occurred:

    "+Ae(r.message+"",!0)+"
    ";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}};const br=new QM;function Mt(t,e){return br.parse(t,e)}Mt.options=Mt.setOptions=function(t){return br.setOptions(t),Mt.defaults=br.defaults,nx(Mt.defaults),Mt};Mt.getDefaults=Ph;Mt.defaults=Tr;Mt.use=function(...t){return br.use(...t),Mt.defaults=br.defaults,nx(Mt.defaults),Mt};Mt.walkTokens=function(t,e){return br.walkTokens(t,e)};Mt.parseInline=br.parseInline;Mt.Parser=fn;Mt.parser=fn.parse;Mt.Renderer=za;Mt.TextRenderer=jh;Mt.Lexer=un;Mt.lexer=un.lex;Mt.Tokenizer=$a;Mt.Hooks=ns;Mt.parse=Mt;Mt.options;Mt.setOptions;Mt.use;Mt.walkTokens;Mt.parseInline;fn.parse;un.lex;function dx(t){for(var e=[],n=1;n/g,` +`)),a+=u+r[l+1]}),a}function gx(t,{markdownAutoWrap:e}){const r=t.replace(//g,` `).replace(/\n{2,}/g,` -`),i=Pm(n);return e===!1?i.replace(/ /g," "):i}g(Om,"preprocessMarkdown");function Nm(t,e={}){const r=Om(t,e),n=vt.lexer(r),i=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(` -`).forEach((h,u)=>{u!==0&&(a++,i.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&i[a].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return g(s,"processNode"),n.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(c=>{s(c)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}),i}g(Nm,"markdownToLines");function zm(t,{markdownAutoWrap:e}={}){const r=vt.lexer(t);function n(i){var a,s,o;return i.type==="text"?e===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${(a=i.tokens)==null?void 0:a.map(n).join("")}`:i.type==="em"?`${(s=i.tokens)==null?void 0:s.map(n).join("")}`:i.type==="paragraph"?`

    ${(o=i.tokens)==null?void 0:o.map(n).join("")}

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:`Unsupported markdown: ${i.type}`}return g(n,"output"),r.map(n).join("")}g(zm,"markdownToHTML");function qm(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}g(qm,"splitTextToChars");function Hm(t,e){const r=qm(e.content);return Pc(t,[],r,e.type)}g(Hm,"splitWordToFitWidth");function Pc(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?Pc(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}g(Pc,"splitWordToFitWidthRecursion");function Wm(t,e){if(t.some(({content:r})=>r.includes(` -`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return os(t,e)}g(Wm,"splitLineToFitWidth");function os(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return os(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){const[o,l]=Hm(e,a);r.push([o]),l.content&&t.unshift(l)}return os(t,e,r)}g(os,"splitLineToFitWidthRecursion");function xl(t,e){e&&t.attr("style",e)}g(xl,"applyStyle");async function jm(t,e,r,n,i=!1){const a=t.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const s=a.append("xhtml:div");let o=e.label;e.label&&Mn(e.label)&&(o=await Gl(e.label.replace(Nn.lineBreakRegex,` -`),_t()));const l=e.isNode?"nodeLabel":"edgeLabel",c=s.append("span");c.html(o),xl(c,e.labelStyle),c.attr("class",`${l} ${n}`),xl(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),a.node()}g(jm,"addHtmlSpan");function Ds(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}g(Ds,"createTspan");function Um(t,e,r){const n=t.append("text"),i=Ds(n,1,e);Ps(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}g(Um,"computeWidthOfText");function aA(t,e,r){var s;const n=t.append("text"),i=Ds(n,1,e);Ps(i,[{content:r,type:"normal"}]);const a=(s=i.node())==null?void 0:s.getBoundingClientRect();return a&&n.remove(),a}g(aA,"computeDimensionOfText");function Ym(t,e,r,n=!1){const a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=g(f=>Um(a,1.1,f)<=t,"checkWidth"),u=h(c)?[c]:Wm(c,h);for(const f of u){const p=Ds(o,l,1.1);Ps(p,f),l++}}if(n){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}g(Ym,"createFormattedText");function Ps(t,e){t.text(""),e.forEach((r,n)=>{const i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}g(Ps,"updateTextContentAndStyles");function Vm(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>``)}g(Vm,"replaceIconSubstring");var Wn=g(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(z.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a){const h=zm(e,c),u=Vm(Hn(h)),f=e.replace(/\\\\/g,"\\"),p={isNode:s,label:Mn(e)?f:u,labelStyle:r.replace("fill:","color:")};return await jm(t,p,o,i,l)}else{const h=e.replace(//g,"
    "),u=Nm(h.replace("
    ","
    "),c),f=Ym(o,t,u,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");kt(f).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");kt(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");kt(f).select("text").attr("style",d)}return f}},"createText");function uo(t,e,r){if(t&&t.length){const[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of t){const[c,h]=l;l[0]=(c-n)*s-(h-i)*o+n,l[1]=(c-n)*o+(h-i)*s+i}}}function sA(t,e){return t[0]===e[0]&&t[1]===e[1]}function oA(t,e,r,n=1){const i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(const c of s)uo(c,o,i);const l=function(c,h,u){const f=[];for(const b of c){const C=[...b];sA(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&f.push(C)}const p=[];h=Math.max(h,.1);const d=[];for(const b of f)for(let C=0;Cb.yminC.ymin?1:b.xC.x?1:b.ymax===C.ymax?0:(b.ymax-C.ymax)/Math.abs(b.ymax-C.ymax)),!d.length)return p;let m=[],x=d[0].ymin,y=0;for(;m.length||d.length;){if(d.length){let b=-1;for(let C=0;Cx);C++)b=C;d.splice(0,b+1).forEach(C=>{m.push({s:x,edge:C})})}if(m=m.filter(b=>!(b.edge.ymax<=x)),m.sort((b,C)=>b.edge.x===C.edge.x?0:(b.edge.x-C.edge.x)/Math.abs(b.edge.x-C.edge.x)),(u!==1||y%h==0)&&m.length>1)for(let b=0;b=m.length)break;const v=m[b].edge,S=m[C].edge;p.push([[Math.round(v.x),x],[Math.round(S.x),x]])}x+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),y++}return p}(s,a,n);if(i){for(const c of s)uo(c,o,-i);(function(c,h,u){const f=[];c.forEach(p=>f.push(...p)),uo(f,h,u)})(l,o,-i)}return l}function Ji(t,e){var r;const n=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),oA(t,i,n,a||1)}class Oc{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Ji(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){const n=[];for(const i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}}function Os(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class lA extends Oc{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const i=Ji(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(const[c,h]of i)Os([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class cA extends Oc{fillPolygons(e,r){const n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}}class hA{constructor(e){this.helper=e}fillPolygons(e,r){const n=Ji(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){const n=[];let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=i/4;for(const o of e){const l=Os(o),c=l/i,h=Math.ceil(c)-1,u=l-h*i,f=(o[0][0]+o[1][0])/2-i/4,p=Math.min(o[0][1],o[1][1]);for(let d=0;d{const o=Os(s),l=Math.floor(o/(n+i)),c=(o+i-l*(n+i))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p{const s=Os(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;uh%2?c+r:c+e);a.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{const l=o.map((c,h)=>h%2?c+r:c+e);a.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{const l=o.map((c,h)=>h%2?c+r:c+e);a.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function Xm(t){const e=[];let r="",n=0,i=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[n,i]=h,[a,s]=h;break;case"C":e.push({key:"C",data:[...h]}),n=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[n,i]=h;break;case"H":n=h[0],e.push({key:"L",data:[n,i]});break;case"V":i=h[0],e.push({key:"L",data:[n,i]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=n+(n-o),f=i+(i-l)):(u=n,f=i),e.push({key:"C",data:[u,f,...h]}),o=h[0],l=h[1],n=h[2],i=h[3];break}case"T":{const[u,f]=h;let p=0,d=0;r==="Q"||r==="T"?(p=n+(n-o),d=i+(i-l)):(p=n,d=i);const m=n+2*(p-n)/3,x=i+2*(d-i)/3,y=u+2*(p-u)/3,b=f+2*(d-f)/3;e.push({key:"C",data:[m,x,y,b,u,f]}),o=p,l=d,n=u,i=f;break}case"Q":{const[u,f,p,d]=h,m=n+2*(u-n)/3,x=i+2*(f-i)/3,y=p+2*(u-p)/3,b=d+2*(f-d)/3;e.push({key:"C",data:[m,x,y,b,p,d]}),o=u,l=f,n=p,i=d;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],d=h[3],m=h[4],x=h[5],y=h[6];u===0||f===0?(e.push({key:"C",data:[n,i,x,y,x,y]}),n=x,i=y):(n!==x||i!==y)&&(Km(n,i,x,y,u,f,p,d,m).forEach(function(b){e.push({key:"C",data:b})}),n=x,i=y);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=c}return e}function ci(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function Km(t,e,r,n,i,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],p=0,d=0,m=0,x=0;if(c)[p,d,m,x]=c;else{[t,e]=ci(t,e,-h),[r,n]=ci(r,n,-h);const N=(t-r)/2,L=(e-n)/2;let T=N*N/(i*i)+L*L/(a*a);T>1&&(T=Math.sqrt(T),i*=T,a*=T);const A=i*i,$=a*a,I=A*$-A*L*L-$*N*N,V=A*L*L+$*N*N,w=(o===l?-1:1)*Math.sqrt(Math.abs(I/V));m=w*i*L/a+(t+r)/2,x=w*-a*N/i+(e+n)/2,p=Math.asin(parseFloat(((e-x)/a).toFixed(9))),d=Math.asin(parseFloat(((n-x)/a).toFixed(9))),td&&(p-=2*Math.PI),!l&&d>p&&(d-=2*Math.PI)}let y=d-p;if(Math.abs(y)>120*Math.PI/180){const N=d,L=r,T=n;d=l&&d>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=Km(r=m+i*Math.cos(d),n=x+a*Math.sin(d),L,T,i,a,s,0,l,[d,N,m,x])}y=d-p;const b=Math.cos(p),C=Math.sin(p),v=Math.cos(d),S=Math.sin(d),_=Math.tan(y/4),F=4/3*i*_,D=4/3*a*_,q=[t,e],O=[t+F*C,e-D*b],B=[r+F*S,n-D*v],P=[r,n];if(O[0]=2*q[0]-O[0],O[1]=2*q[1]-O[1],c)return[O,B,P].concat(f);{f=[O,B,P].concat(f);const N=[];for(let L=0;L2){const i=[];for(let a=0;a2*Math.PI&&(p=0,d=2*Math.PI);const m=2*Math.PI/l.curveStepCount,x=Math.min(m/2,(d-p)/2),y=qu(x,c,h,u,f,p,d,1,l);if(!l.disableMultiStroke){const b=qu(x,c,h,u,f,p,d,1.5,l);y.push(...b)}return s&&(o?y.push(...Ar(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...Ar(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:y}}function Ou(t,e){const r=Xm(Gm(Nc(t))),n=[];let i=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...Ar(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,f,p]=o;n.push(...yA(l,c,h,u,f,p,a,e)),a=[f,p];break}case"Z":n.push(...Ar(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function go(t,e){const r=[];for(const n of t)if(n.length){const i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+st(i,e),n[0][1]+st(i,e)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,f=.2+.2*Jm(i);let p=i.bowing*i.maxRandomnessOffset*(n-e)/200,d=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=st(p,i,c),d=st(d,i,c);const m=[],x=()=>st(u,i,c),y=()=>st(h,i,c),b=i.preserveVertices;return s?m.push({op:"move",data:[t+(b?0:x()),e+(b?0:x())]}):m.push({op:"move",data:[t+(b?0:st(h,i,c)),e+(b?0:st(h,i,c))]}),s?m.push({op:"bcurveTo",data:[p+t+(r-t)*f+x(),d+e+(n-e)*f+x(),p+t+2*(r-t)*f+x(),d+e+2*(n-e)*f+x(),r+(b?0:x()),n+(b?0:x())]}):m.push({op:"bcurveTo",data:[p+t+(r-t)*f+y(),d+e+(n-e)*f+y(),p+t+2*(r-t)*f+y(),d+e+2*(n-e)*f+y(),r+(b?0:y()),n+(b?0:y())]}),m}function pa(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+st(e,r),t[0][1]+st(e,r)]),n.push([t[0][0]+st(e,r),t[0][1]+st(e,r)]);for(let i=1;i3){const a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&i.push(o)):i.push(o),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=Or(l,c,.5),p=Or(c,h,.5),d=Or(h,u,.5),m=Or(f,p,.5),x=Or(p,d,.5),y=Or(m,x,.5);Cl([l,f,m,y],0,r,i),Cl([y,x,d,u],0,r,i)}var a,s;return i}function bA(t,e){return hs(t,0,t.length,e)}function hs(t,e,r,n,i){const a=i||[],s=t[e],o=t[r-1];let l=0,c=1;for(let h=e+1;hl&&(l=u,c=h)}return Math.sqrt(l)>n?(hs(t,e,c+1,n,a),hs(t,c,r,n,a)):(a.length||a.push(s),a.push(o)),a}function mo(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let a=0;a0?hs(n,0,n.length,r):n}const be="none";class us{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,i,a){const s=this._o(a);return this._d("line",[Zm(e,r,n,i,s)],s)}rectangle(e,r,n,i,a){const s=this._o(a),o=[],l=mA(e,r,n,i,s);if(s.fill){const c=[[e,r],[e+n,r],[e+n,r+i],[e,r+i]];s.fillStyle==="solid"?o.push(go([c],s)):o.push(un([c],s))}return s.stroke!==be&&o.push(l),this._d("rectangle",o,s)}ellipse(e,r,n,i,a){const s=this._o(a),o=[],l=Qm(n,i,s),c=bl(e,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=bl(e,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(un([c.estimatedPoints],s));return s.stroke!==be&&o.push(c.opset),this._d("ellipse",o,s)}circle(e,r,n,i){const a=this.ellipse(e,r,n,n,i);return a.shape="circle",a}linearPath(e,r){const n=this._o(r);return this._d("linearPath",[Ea(e,!1,n)],n)}arc(e,r,n,i,a,s,o=!1,l){const c=this._o(l),h=[],u=Pu(e,r,n,i,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=Pu(e,r,n,i,a,s,!0,!1,f);p.type="fillPath",h.push(p)}else h.push(function(f,p,d,m,x,y,b){const C=f,v=p;let S=Math.abs(d/2),_=Math.abs(m/2);S+=st(.01*S,b),_+=st(.01*_,b);let F=x,D=y;for(;F<0;)F+=2*Math.PI,D+=2*Math.PI;D-F>2*Math.PI&&(F=0,D=2*Math.PI);const q=(D-F)/b.curveStepCount,O=[];for(let B=F;B<=D;B+=q)O.push([C+S*Math.cos(B),v+_*Math.sin(B)]);return O.push([C+S*Math.cos(D),v+_*Math.sin(D)]),O.push([C,v]),un([O],b)}(e,r,n,i,a,s,c));return c.stroke!==be&&h.push(u),this._d("arc",h,c)}curve(e,r){const n=this._o(r),i=[],a=Du(e,n);if(n.fill&&n.fill!==be)if(n.fillStyle==="solid"){const s=Du(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=e;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...mo(Hu([c[0],c[0],c[1],c[2]]),10,(1+n.roughness)/2)):s.push(...mo(Hu(c),10,(1+n.roughness)/2))}s.length&&i.push(un([s],n))}return n.stroke!==be&&i.push(a),this._d("curve",i,n)}polygon(e,r){const n=this._o(r),i=[],a=Ea(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(go([e],n)):i.push(un([e],n))),n.stroke!==be&&i.push(a),this._d("polygon",i,n)}path(e,r){const n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=n.fill&&n.fill!=="transparent"&&n.fill!==be,s=n.stroke!==be,o=!!(n.simplification&&n.simplification<1),l=function(h,u,f){const p=Xm(Gm(Nc(h))),d=[];let m=[],x=[0,0],y=[];const b=()=>{y.length>=4&&m.push(...mo(y,u)),y=[]},C=()=>{b(),m.length&&(d.push(m),m=[])};for(const{key:S,data:_}of p)switch(S){case"M":C(),x=[_[0],_[1]],m.push(x);break;case"L":b(),m.push([_[0],_[1]]);break;case"C":if(!y.length){const F=m.length?m[m.length-1]:x;y.push([F[0],F[1]])}y.push([_[0],_[1]]),y.push([_[2],_[3]]),y.push([_[4],_[5]]);break;case"Z":b(),m.push([x[0],x[1]])}if(C(),!f)return d;const v=[];for(const S of d){const _=bA(S,f);_.length&&v.push(_)}return v}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=Ou(e,n);if(a)if(n.fillStyle==="solid")if(l.length===1){const h=Ou(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(go(l,n));else i.push(un(l,n));return s&&(o?l.forEach(h=>{i.push(Ea(h,!1,n))}):i.push(c)),this._d("path",i,n)}opsToPath(e,r){let n="";for(const i of e.ops){const a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){const r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:be};break;case"fillPath":s={d:this.opsToPath(a),stroke:be,strokeWidth:0,fill:n.fill||be};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||be,strokeWidth:n,fill:be}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}}class wA{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new us(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";const o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(const a of r.ops){const s=typeof n=="number"&&n>=0?a.data.map(o=>+o.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){const s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){const s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){const s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){const a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,o=!1,l){const c=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(c),c}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){const n=this.gen.path(e,r);return this.draw(n),n}}const da="http://www.w3.org/2000/svg";class CA{constructor(e,r){this.svg=e,this.gen=new us(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(da,"g"),s=e.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(da,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(da,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const a=e.createElementNS(da,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){const s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){const s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){const s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){const a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,o=!1,l){const c=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(c)}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n)}path(e,r){const n=this.gen.path(e,r);return this.draw(n)}}var Q={canvas:(t,e)=>new wA(t,e),svg:(t,e)=>new CA(t,e),generator:t=>new us(t),newSeed:()=>us.newSeed()},ct=g(async(t,e,r)=>{var u,f;let n;const i=e.useHtmlLabels||Gt((u=_t())==null?void 0:u.htmlLabels);r?n=r:n="node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",oe(e.labelStyle));let o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];const l=await Wn(s,Gr(Hn(o),_t()),{useHtmlLabels:i,width:e.width||((f=_t().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let c=l.getBBox();const h=((e==null?void 0:e.padding)??0)/2;if(i){const p=l.children[0],d=kt(l),m=p.getElementsByTagName("img");if(m){const x=o.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(y=>new Promise(b=>{function C(){if(y.style.display="flex",y.style.flexDirection="column",x){const v=_t().fontSize?_t().fontSize:window.getComputedStyle(document.body).fontSize,S=5,[_=bp.fontSize]=$s(v),F=_*S+"px";y.style.minWidth=F,y.style.maxWidth=F}else y.style.width="100%";b(y)}g(C,"setupImage"),setTimeout(()=>{y.complete&&C()}),y.addEventListener("error",C),y.addEventListener("load",C)})))}c=p.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),yo=g(async(t,e,r)=>{var l,c,h,u,f,p;const n=r.useHtmlLabels||Gt((c=(l=_t())==null?void 0:l.flowchart)==null?void 0:c.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Wn(i,Gr(Hn(e),_t()),{useHtmlLabels:n,width:r.width||((u=(h=_t())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(Gt((p=(f=_t())==null?void 0:f.flowchart)==null?void 0:p.htmlLabels)){const d=a.children[0],m=kt(a);s=d.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),nt=g((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),ht=g((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function yt(t){const e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}g(yt,"createPathFromPoints");function Lr(t,e,r,n,i,a){const s=[],l=r-t,c=n-e,h=l/a,u=2*Math.PI/h,f=e+c/2;for(let p=0;p<=50;p++){const d=p/50,m=t+d*l,x=f+i*Math.sin(u*(m-t));s.push({x:m,y:x})}return s}g(Lr,"generateFullSineWavePoints");function zc(t,e,r,n,i,a){const s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let u=0;u{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,c;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,c=o):(i<0&&(s=-s),l=s,c=i===0?0:s*a/i),{x:r+l,y:n+c}},"intersectRect"),jn=kA;function ty(t,e){e&&t.attr("style",e)}g(ty,"applyStyle");async function ey(t){const e=kt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let n=t.label;t.label&&Mn(t.label)&&(n=await Gl(t.label.replace(Nn.lineBreakRegex,` -`),_t()));const i=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),ty(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}g(ey,"addHtmlLabel");var _A=g(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),Gt(_t().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),z.info("vertexText"+i);const a={isNode:n,label:Hn(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e&&e.replace("fill:","color:")};return await ey(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Ur=_A,mr=g((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),vA=g(t=>{const{handDrawnSeed:e}=_t();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Un=g(t=>{const e=SA([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),SA=g(t=>{const e=new Map;return t.forEach(r=>{const[n,i]=r.split(":");e.set(n.trim(),i==null?void 0:i.trim())}),e},"styles2Map"),it=g(t=>{const{stylesArray:e}=Un(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{const o=s[0];o==="color"||o==="font-size"||o==="font-family"||o==="font-weight"||o==="font-style"||o==="text-decoration"||o==="text-align"||o==="text-transform"||o==="line-height"||o==="letter-spacing"||o==="word-spacing"||o==="text-shadow"||o==="text-overflow"||o==="white-space"||o==="word-wrap"||o==="word-break"||o==="overflow-wrap"||o==="hyphens"?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),J=g((t,e)=>{var l;const{themeVariables:r,handDrawnSeed:n}=_t(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=Un(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:((l=s.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),ry=g(async(t,e)=>{z.info("Creating subgraph rect for ",e.id,e);const r=_t(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=it(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=Gt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),d=await Wn(p,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0});let m=d.getBBox();if(Gt(r.flowchart.htmlLabels)){const F=d.children[0],D=kt(d);m=F.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const x=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;const y=e.height,b=e.x-x/2,C=e.y-y/2;z.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const F=Q.svg(u),D=J(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),q=F.path(mr(b,C,x,y,0),D);v=u.insert(()=>(z.debug("Rough node insert CXC",q),q),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",C).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:S}=sc(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+S})`),o){const F=p.select("span");F&&F.attr("style",o)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=m.height-e.padding/2,e.intersect=function(F){return jn(e,F)},{cluster:u,labelBBox:m}},"rect"),TA=g((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return jn(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),EA=g(async(t,e)=>{const r=_t(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,c=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const p=u.node().appendChild(await Ur(e.label,e.labelStyle,void 0,!0));let d=p.getBBox();if(Gt(r.flowchart.htmlLabels)){const q=p.children[0],O=kt(p);d=q.getBoundingClientRect(),O.attr("width",d.width),O.attr("height",d.height)}const m=0*e.padding,x=m/2,y=(e.width<=d.width+e.padding?d.width+e.padding:e.width)+m;e.width<=d.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height+m,C=e.height+m-d.height-6,v=e.x-y/2,S=e.y-b/2;e.width=y;const _=e.y-e.height/2-x+d.height+2;let F;if(e.look==="handDrawn"){const q=e.cssClasses.includes("statediagram-cluster-alt"),O=Q.svg(c),B=e.rx||e.ry?O.path(mr(v,S,y,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):O.rectangle(v,S,y,b,{seed:i});F=c.insert(()=>B,":first-child");const P=O.rectangle(v,_,y,C,{fill:q?a:s,fillStyle:q?"hachure":"solid",stroke:l,seed:i});F=c.insert(()=>B,":first-child"),f=c.insert(()=>P)}else F=h.insert("rect",":first-child"),F.attr("class","outer").attr("x",v).attr("y",S).attr("width",y).attr("height",b).attr("data-look",e.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",y).attr("height",C);u.attr("transform",`translate(${e.x-d.width/2}, ${S+1-(Gt(r.flowchart.htmlLabels)?0:3)})`);const D=F.node().getBBox();return e.height=D.height,e.offsetX=0,e.offsetY=d.height-e.padding/2,e.labelBBox=d,e.intersect=function(q){return jn(e,q)},{cluster:c,labelBBox:d}},"roundedWithTitle"),AA=g(async(t,e)=>{z.info("Creating subgraph rect for ",e.id,e);const r=_t(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=it(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=Gt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),d=await Wn(p,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width});let m=d.getBBox();if(Gt(r.flowchart.htmlLabels)){const F=d.children[0],D=kt(d);m=F.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const x=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;const y=e.height,b=e.x-x/2,C=e.y-y/2;z.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const F=Q.svg(u),D=J(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),q=F.path(mr(b,C,x,y,e.rx),D);v=u.insert(()=>(z.debug("Rough node insert CXC",q),q),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",C).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:S}=sc(r);if(p.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+S})`),o){const F=p.select("span");F&&F.attr("style",o)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=m.height-e.padding/2,e.intersect=function(F){return jn(e,F)},{cluster:u,labelBBox:m}},"kanbanSection"),LA=g((t,e)=>{const r=_t(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,c=e.width+l;e.diff=-e.padding;const h=e.height+l,u=e.x-c/2,f=e.y-h/2;e.width=c;let p;if(e.look==="handDrawn"){const x=Q.svg(s).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});p=s.insert(()=>x,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",e.look);const d=p.node().getBBox();return e.height=d.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return jn(e,m)},{cluster:s,labelBBox:{}}},"divider"),BA=ry,MA={rect:ry,squareRect:BA,roundedWithTitle:EA,noteGroup:TA,divider:LA,kanbanSection:AA},ny=new Map,FA=g(async(t,e)=>{const r=e.shape||"rect",n=await MA[r](t,e);return ny.set(e.id,n),n},"insertCluster"),G3=g(()=>{ny=new Map},"clear");function iy(t,e){return t.intersect(e)}g(iy,"intersectNode");var IA=iy;function ay(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);n.x0}g(kl,"sameSign");var RA=ly;function cy(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,c=i-t.height/2-o;for(let h=0;h1&&a.sort(function(h,u){let f=h.x-r.x,p=h.y-r.y,d=Math.sqrt(f*f+p*p),m=u.x-r.x,x=u.y-r.y,y=Math.sqrt(m*m+x*x);return dh,":first-child");return u.attr("class","anchor").attr("style",oe(o)),nt(e,u),e.intersect=function(f){return z.info("Circle intersect",e,s,f),K.circle(e,s,f)},a}g(hy,"anchor");function _l(t,e,r,n,i,a,s){const l=(t+r)/2,c=(e+n)/2,h=Math.atan2(n-e,r-t),u=(r-t)/2,f=(n-e)/2,p=u/i,d=f/a,m=Math.sqrt(p**2+d**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-m**2),y=l+x*a*Math.sin(h)*(s?-1:1),b=c-x*i*Math.cos(h)*(s?-1:1),C=Math.atan2((e-b)/a,(t-y)/i);let S=Math.atan2((n-b)/a,(r-y)/i)-C;s&&S<0&&(S+=2*Math.PI),!s&&S>0&&(S-=2*Math.PI);const _=[];for(let F=0;F<20;F++){const D=F/19,q=C+D*S,O=y+i*Math.cos(q),B=b+a*Math.sin(q);_.push({x:O,y:B})}return _}g(_l,"generateArcPoints");async function uy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=e,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},..._l(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},..._l(s/2,o/2,s/2,-o/2,c,l,!0)],f=Q.svg(i),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=yt(u),m=f.path(d,p),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c/2}, 0)`),nt(e,x),e.intersect=function(y){return K.polygon(e,u,y)},i}g(uy,"bowTieRect");function yr(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}g(yr,"insertPolygonShape");async function fy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=a.height+e.padding,o=12,l=a.width+e.padding+o,c=0,h=l,u=-s,f=0,p=[{x:c+o,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+o},{x:c+o,y:u}];let d;const{cssStyles:m}=e;if(e.look==="handDrawn"){const x=Q.svg(i),y=J(e,{}),b=yt(p),C=x.path(b,y);d=i.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&d.attr("style",m)}else d=yr(i,l,s,p);return n&&d.attr("style",n),nt(e,d),e.intersect=function(x){return K.polygon(e,p,x)},i}g(fy,"card");function py(t,e){const{nodeStyles:r}=it(e);e.label="";const n=t.insert("g").attr("class",ht(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=Q.svg(n),l=J(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=yt(s),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(f){return K.polygon(e,s,f)},n}g(py,"choice");async function dy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s}=await ct(t,e,ht(e)),o=a.width/2+s;let l;const{cssStyles:c}=e;if(e.look==="handDrawn"){const h=Q.svg(i),u=J(e,{}),f=h.circle(0,0,o*2,u);l=i.insert(()=>f,":first-child"),l.attr("class","basic label-container").attr("style",oe(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",o).attr("cx",0).attr("cy",0);return nt(e,l),e.intersect=function(h){return z.info("Circle intersect",e,o,h),K.circle(e,o,h)},i}g(dy,"circle");function gy(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y} - M ${i.x},${i.y} L ${s.x},${s.y}`}g(gy,"createLine");function my(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r,e.label="";const i=t.insert("g").attr("class",ht(e)).attr("id",e.domId??e.id),a=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:s}=e,o=Q.svg(i),l=J(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=gy(a),u=o.path(h,l),f=i.insert(()=>c,":first-child");return f.insert(()=>u),s&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",n),nt(e,f),e.intersect=function(p){return z.info("crossedCircle intersect",e,{radius:a,point:p}),K.circle(e,a,p)},i}g(my,"crossedCircle");function cr(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let u=0;uC,":first-child").attr("stroke-opacity",0),v.insert(()=>y,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),nt(e,v),e.intersect=function(S){return K.polygon(e,f,S)},i}g(yy,"curlyBraceLeft");function hr(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let u=0;uC,":first-child").attr("stroke-opacity",0),v.insert(()=>y,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),nt(e,v),e.intersect=function(S){return K.polygon(e,f,S)},i}g(xy,"curlyBraceRight");function Ut(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,h=(a*Math.PI/180-o)/(n-1);for(let u=0;uF,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>S,":first-child"),D.attr("class","text"),h&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),nt(e,D),e.intersect=function(q){return K.polygon(e,p,q)},i}g(by,"curlyBraces");async function wy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=80,o=20,l=Math.max(s,(a.width+(e.padding??0)*2)*1.25,(e==null?void 0:e.width)??0),c=Math.max(o,a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=c/2,{cssStyles:u}=e,f=Q.svg(i),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=l,m=c,x=d-h,y=m/4,b=[{x,y:0},{x:y,y:0},{x:0,y:m/2},{x:y,y:m},{x,y:m},...zc(-x,-m/2,h,50,270,90)],C=yt(b),v=f.path(C,p),S=i.insert(()=>v,":first-child");return S.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",n),S.attr("transform",`translate(${-l/2}, ${-c/2})`),nt(e,S),e.intersect=function(_){return K.polygon(e,b,_)},i}g(wy,"curvedTrapezoid");var PA=g((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),OA=g((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),NA=g((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Cy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+e.padding,e.height??0);let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const p=Q.svg(i),d=OA(0,0,o,h,l,c),m=NA(0,c,o,h,l,c),x=p.path(d,J(e,{})),y=p.path(m,J(e,{fill:"none"}));u=i.insert(()=>y,":first-child"),u=i.insert(()=>x,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=PA(0,0,o,h,l,c);u=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",oe(f)).attr("style",n)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),nt(e,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(p){const d=K.rect(e,p),m=d.x-(e.x??0);if(l!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(d.y-(e.y??0))>(e.height??0)/2-c)){let x=c*c*(1-m*m/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,p.y-(e.y??0)>0&&(x=-x),d.y+=x}return d},i}g(Cy,"cylinder");async function ky(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=a.width+e.padding,l=a.height+e.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:f}=e,p=Q.svg(i),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],x=p.polygon(m.map(b=>[b.x,b.y]),d),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${h+(e.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(e.padding??0)/2-(a.y-(a.top??0))})`),nt(e,y),e.intersect=function(b){return K.rect(e,b)},i}g(ky,"dividedRectangle");async function _y(t,e){var f,p;const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s}=await ct(t,e,ht(e)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const d=Q.svg(i),m=J(e,{roughness:.2,strokeWidth:2.5}),x=J(e,{roughness:.2,strokeWidth:1.5}),y=d.circle(0,0,l*2,m),b=d.circle(0,0,c*2,x);h=i.insert("g",":first-child"),h.attr("class",oe(e.cssClasses)).attr("style",oe(u)),(f=h.node())==null||f.appendChild(y),(p=h.node())==null||p.appendChild(b)}else{h=i.insert("g",":first-child");const d=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",n),d.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return nt(e,h),e.intersect=function(d){return z.info("DoubleCircle intersect",e,l,d),K.circle(e,l,d)},i}g(_y,"doublecircle");function vy(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=it(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",ht(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,l=Q.svg(a),{nodeBorder:c}=r,h=J(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),nt(e,f),e.intersect=function(p){return z.info("filledCircle intersect",e,{radius:s,point:p}),K.circle(e,s,p)},a}g(vy,"filledCircle");async function Sy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=a.width+(e.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=e,f=Q.svg(i),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=yt(h),m=f.path(d,p),x=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=o,e.height=l,nt(e,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(y){return z.info("Triangle intersect",e,h,y),K.polygon(e,h,y)},i}g(Sy,"flippedTriangle");function Ty(t,e,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:a}=it(e);e.label="";const s=t.insert("g").attr("class",ht(e)).attr("id",e.domId??e.id),{cssStyles:o}=e;let l=Math.max(70,(e==null?void 0:e.width)??0),c=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(l=Math.max(10,(e==null?void 0:e.width)??0),c=Math.max(70,(e==null?void 0:e.height)??0));const h=-1*l/2,u=-1*c/2,f=Q.svg(s),p=J(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=f.rectangle(h,u,l,c,p),m=s.insert(()=>d,":first-child");o&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),nt(e,m);const x=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(y){return K.rect(e,y)},s}g(Ty,"forkJoin");async function Ey(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const i=80,a=50,{shapeSvg:s,bbox:o}=await ct(t,e,ht(e)),l=Math.max(i,o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a,o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=c/2,{cssStyles:u}=e,f=Q.svg(s),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...zc(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=yt(d),x=f.path(m,p),y=s.insert(()=>x,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),nt(e,y),e.intersect=function(b){return z.info("Pill intersect",e,{radius:h,point:b}),K.polygon(e,d,b)},s}g(Ey,"halfRoundedRectangle");var zA=g((t,e,r,n,i)=>[`M${t+i},${e}`,`L${t+r-i},${e}`,`L${t+r},${e-n/2}`,`L${t+r-i},${e-n}`,`L${t+i},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");async function Ay(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=4,o=a.height+e.padding,l=o/s,c=a.width+2*l+e.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-o/2},{x:c-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}];let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const p=Q.svg(i),d=J(e,{}),m=zA(0,0,c,o,l),x=p.path(m,d);u=i.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),f&&u.attr("style",f)}else u=yr(i,c,o,h);return n&&u.attr("style",n),e.width=c,e.height=o,nt(e,u),e.intersect=function(p){return K.polygon(e,h,p)},i}g(Ay,"hexagon");async function Ly(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.label="",e.labelStyle=r;const{shapeSvg:i}=await ct(t,e,ht(e)),a=Math.max(30,(e==null?void 0:e.width)??0),s=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:o}=e,l=Q.svg(i),c=J(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=yt(h),f=l.path(u,c),p=i.insert(()=>f,":first-child");return p.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",n),p.attr("transform",`translate(${-a/2}, ${-s/2})`),nt(e,p),e.intersect=function(d){return z.info("Pill intersect",e,{points:h}),K.polygon(e,h,d)},i}g(Ly,"hourglass");async function By(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=it(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await ct(t,e,"icon-shape default"),f=e.pos==="t",p=o,d=o,{nodeBorder:m}=r,{stylesMap:x}=Un(e),y=-d/2,b=-p/2,C=e.label?8:0,v=Q.svg(c),S=J(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=v.rectangle(y,b,d,p,S),F=Math.max(d,h.width),D=p+h.height+C,q=v.rectangle(-F/2,-D/2,F,D,{...S,fill:"transparent",stroke:"none"}),O=c.insert(()=>_,":first-child"),B=c.insert(()=>q);if(e.icon){const P=c.append("g");P.html(`${await _s(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const N=P.node().getBBox(),L=N.width,T=N.height,A=N.x,$=N.y;P.attr("transform",`translate(${-L/2-A},${f?h.height/2+C/2-T/2-$:-h.height/2-C/2-T/2-$})`),P.attr("style",`color: ${x.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),O.attr("transform",`translate(0,${f?h.height/2+C/2:-h.height/2-C/2})`),nt(e,B),e.intersect=function(P){if(z.info("iconSquare intersect",e,P),!e.label)return K.rect(e,P);const N=e.x??0,L=e.y??0,T=e.height??0;let A=[];return f?A=[{x:N-h.width/2,y:L-T/2},{x:N+h.width/2,y:L-T/2},{x:N+h.width/2,y:L-T/2+h.height+C},{x:N+d/2,y:L-T/2+h.height+C},{x:N+d/2,y:L+T/2},{x:N-d/2,y:L+T/2},{x:N-d/2,y:L-T/2+h.height+C},{x:N-h.width/2,y:L-T/2+h.height+C}]:A=[{x:N-d/2,y:L-T/2},{x:N+d/2,y:L-T/2},{x:N+d/2,y:L-T/2+p},{x:N+h.width/2,y:L-T/2+p},{x:N+h.width/2/2,y:L+T/2},{x:N-h.width/2,y:L+T/2},{x:N-h.width/2,y:L-T/2+p},{x:N-d/2,y:L-T/2+p}],K.polygon(e,A,P)},c}g(By,"icon");async function My(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=it(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await ct(t,e,"icon-shape default"),f=20,p=e.label?8:0,d=e.pos==="t",{nodeBorder:m,mainBkg:x}=r,{stylesMap:y}=Un(e),b=Q.svg(c),C=J(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=y.get("fill");C.stroke=v??x;const S=c.append("g");e.icon&&S.html(`${await _s(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const _=S.node().getBBox(),F=_.width,D=_.height,q=_.x,O=_.y,B=Math.max(F,D)*Math.SQRT2+f*2,P=b.circle(0,0,B,C),N=Math.max(B,h.width),L=B+h.height+p,T=b.rectangle(-N/2,-L/2,N,L,{...C,fill:"transparent",stroke:"none"}),A=c.insert(()=>P,":first-child"),$=c.insert(()=>T);return S.attr("transform",`translate(${-F/2-q},${d?h.height/2+p/2-D/2-O:-h.height/2-p/2-D/2-O})`),S.attr("style",`color: ${y.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-L/2:L/2-h.height})`),A.attr("transform",`translate(0,${d?h.height/2+p/2:-h.height/2-p/2})`),nt(e,$),e.intersect=function(I){return z.info("iconSquare intersect",e,I),K.rect(e,I)},c}g(My,"iconCircle");async function Fy(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=it(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ct(t,e,"icon-shape default"),p=e.pos==="t",d=o+u*2,m=o+u*2,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Un(e),C=-m/2,v=-d/2,S=e.label?8:0,_=Q.svg(c),F=J(e,{});e.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const D=b.get("fill");F.stroke=D??y;const q=_.path(mr(C,v,m,d,5),F),O=Math.max(m,h.width),B=d+h.height+S,P=_.rectangle(-O/2,-B/2,O,B,{...F,fill:"transparent",stroke:"none"}),N=c.insert(()=>q,":first-child").attr("class","icon-shape2"),L=c.insert(()=>P);if(e.icon){const T=c.append("g");T.html(`${await _s(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const A=T.node().getBBox(),$=A.width,I=A.height,V=A.x,w=A.y;T.attr("transform",`translate(${-$/2-V},${p?h.height/2+S/2-I/2-w:-h.height/2-S/2-I/2-w})`),T.attr("style",`color: ${b.get("stroke")??x};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-B/2:B/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),nt(e,L),e.intersect=function(T){if(z.info("iconSquare intersect",e,T),!e.label)return K.rect(e,T);const A=e.x??0,$=e.y??0,I=e.height??0;let V=[];return p?V=[{x:A-h.width/2,y:$-I/2},{x:A+h.width/2,y:$-I/2},{x:A+h.width/2,y:$-I/2+h.height+S},{x:A+m/2,y:$-I/2+h.height+S},{x:A+m/2,y:$+I/2},{x:A-m/2,y:$+I/2},{x:A-m/2,y:$-I/2+h.height+S},{x:A-h.width/2,y:$-I/2+h.height+S}]:V=[{x:A-m/2,y:$-I/2},{x:A+m/2,y:$-I/2},{x:A+m/2,y:$-I/2+d},{x:A+h.width/2,y:$-I/2+d},{x:A+h.width/2/2,y:$+I/2},{x:A-h.width/2,y:$+I/2},{x:A-h.width/2,y:$-I/2+d},{x:A-m/2,y:$-I/2+d}],K.polygon(e,V,T)},c}g(Fy,"iconRounded");async function Iy(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=it(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await ct(t,e,"icon-shape default"),p=e.pos==="t",d=o+u*2,m=o+u*2,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Un(e),C=-m/2,v=-d/2,S=e.label?8:0,_=Q.svg(c),F=J(e,{});e.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const D=b.get("fill");F.stroke=D??y;const q=_.path(mr(C,v,m,d,.1),F),O=Math.max(m,h.width),B=d+h.height+S,P=_.rectangle(-O/2,-B/2,O,B,{...F,fill:"transparent",stroke:"none"}),N=c.insert(()=>q,":first-child"),L=c.insert(()=>P);if(e.icon){const T=c.append("g");T.html(`${await _s(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const A=T.node().getBBox(),$=A.width,I=A.height,V=A.x,w=A.y;T.attr("transform",`translate(${-$/2-V},${p?h.height/2+S/2-I/2-w:-h.height/2-S/2-I/2-w})`),T.attr("style",`color: ${b.get("stroke")??x};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-B/2:B/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),nt(e,L),e.intersect=function(T){if(z.info("iconSquare intersect",e,T),!e.label)return K.rect(e,T);const A=e.x??0,$=e.y??0,I=e.height??0;let V=[];return p?V=[{x:A-h.width/2,y:$-I/2},{x:A+h.width/2,y:$-I/2},{x:A+h.width/2,y:$-I/2+h.height+S},{x:A+m/2,y:$-I/2+h.height+S},{x:A+m/2,y:$+I/2},{x:A-m/2,y:$+I/2},{x:A-m/2,y:$-I/2+h.height+S},{x:A-h.width/2,y:$-I/2+h.height+S}]:V=[{x:A-m/2,y:$-I/2},{x:A+m/2,y:$-I/2},{x:A+m/2,y:$-I/2+d},{x:A+h.width/2,y:$-I/2+d},{x:A+h.width/2/2,y:$+I/2},{x:A-h.width/2,y:$+I/2},{x:A-h.width/2,y:$-I/2+d},{x:A-m/2,y:$-I/2+d}],K.polygon(e,V,T)},c}g(Iy,"iconSquare");async function $y(t,e,{config:{flowchart:r}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;const{labelStyles:s}=it(e);e.labelStyle=s;const o=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(e.label?o??0:0,(e==null?void 0:e.assetWidth)??i),c=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?c/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??a;e.width=Math.max(c,o??0);const{shapeSvg:u,bbox:f,label:p}=await ct(t,e,"image-shape default"),d=e.pos==="t",m=-c/2,x=-h/2,y=e.label?8:0,b=Q.svg(u),C=J(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=b.rectangle(m,x,c,h,C),S=Math.max(c,f.width),_=h+f.height+y,F=b.rectangle(-S/2,-_/2,S,_,{...C,fill:"none",stroke:"none"}),D=u.insert(()=>v,":first-child"),q=u.insert(()=>F);if(e.img){const O=u.append("image");O.attr("href",e.img),O.attr("width",c),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${d?_/2-h:-_/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${d?-h/2-f.height/2-y/2:h/2-f.height/2+y/2})`),D.attr("transform",`translate(0,${d?f.height/2+y/2:-f.height/2-y/2})`),nt(e,q),e.intersect=function(O){if(z.info("iconSquare intersect",e,O),!e.label)return K.rect(e,O);const B=e.x??0,P=e.y??0,N=e.height??0;let L=[];return d?L=[{x:B-f.width/2,y:P-N/2},{x:B+f.width/2,y:P-N/2},{x:B+f.width/2,y:P-N/2+f.height+y},{x:B+c/2,y:P-N/2+f.height+y},{x:B+c/2,y:P+N/2},{x:B-c/2,y:P+N/2},{x:B-c/2,y:P-N/2+f.height+y},{x:B-f.width/2,y:P-N/2+f.height+y}]:L=[{x:B-c/2,y:P-N/2},{x:B+c/2,y:P-N/2},{x:B+c/2,y:P-N/2+h},{x:B+f.width/2,y:P-N/2+h},{x:B+f.width/2/2,y:P+N/2},{x:B-f.width/2,y:P+N/2},{x:B-f.width/2,y:P-N/2+h},{x:B-c/2,y:P-N/2+h}],K.polygon(e,L,O)},u}g($y,"imageSquare");async function Ry(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=Q.svg(i),f=J(e,{}),p=yt(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,nt(e,c),e.intersect=function(u){return K.polygon(e,l,u)},i}g(Ry,"inv_trapezoid");async function Ns(t,e,r){const{labelStyles:n,nodeStyles:i}=it(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await ct(t,e,ht(e)),o=Math.max(s.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),l=Math.max(s.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),c=-o/2,h=-l/2;let u,{rx:f,ry:p}=e;const{cssStyles:d}=e;if(r!=null&&r.rx&&r.ry&&(f=r.rx,p=r.ry),e.look==="handDrawn"){const m=Q.svg(a),x=J(e,{}),y=f||p?m.path(mr(c,h,o,l,f||0),x):m.rectangle(c,h,o,l,x);u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",oe(d))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",i).attr("rx",oe(f)).attr("ry",oe(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return nt(e,u),e.intersect=function(m){return K.rect(e,m)},a}g(Ns,"drawRect");async function Dy(t,e){const{shapeSvg:r,bbox:n,label:i}=await ct(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),nt(e,a),e.intersect=function(l){return K.rect(e,l)},r}g(Dy,"labelRect");async function Py(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=Q.svg(i),f=J(e,{}),p=yt(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,nt(e,c),e.intersect=function(u){return K.polygon(e,l,u)},i}g(Py,"lean_left");async function Oy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=Q.svg(i),f=J(e,{}),p=yt(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,nt(e,c),e.intersect=function(u){return K.polygon(e,l,u)},i}g(Oy,"lean_right");function Ny(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.label="",e.labelStyle=r;const i=t.insert("g").attr("class",ht(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,(e==null?void 0:e.width)??0),o=Math.max(35,(e==null?void 0:e.height)??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=Q.svg(i),u=J(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=yt(c),p=h.path(f,u),d=i.insert(()=>p,":first-child");return a&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",n),d.attr("transform",`translate(-${s/2},${-o})`),nt(e,d),e.intersect=function(m){return z.info("lightningBolt intersect",e,m),K.polygon(e,c,m)},i}g(Ny,"lightningBolt");var qA=g((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),HA=g((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),WA=g((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function zy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(e.padding??0),e.height??0),u=h*.1;let f;const{cssStyles:p}=e;if(e.look==="handDrawn"){const d=Q.svg(i),m=HA(0,0,o,h,l,c,u),x=WA(0,c,o,h,l,c),y=J(e,{}),b=d.path(m,y),C=d.path(x,y);i.insert(()=>C,":first-child").attr("class","line"),f=i.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const d=qA(0,0,o,h,l,c,u);f=i.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",oe(p)).attr("style",n)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),nt(e,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),e.intersect=function(d){const m=K.rect(e,d),x=m.x-(e.x??0);if(l!=0&&(Math.abs(x)<(e.width??0)/2||Math.abs(x)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-c)){let y=c*c*(1-x*x/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(e.y??0)>0&&(y=-y),m.y+=y}return m},i}g(zy,"linedCylinder");async function qy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,h=l+c,{cssStyles:u}=e,f=Q.svg(i),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Lr(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=f.polygon(d.map(y=>[y.x,y.y]),p),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",u),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),nt(e,x),e.intersect=function(y){return K.polygon(e,d,y)},i}g(qy,"linedWaveEdgedRect");async function Hy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=e,p=Q.svg(i),d=J(e,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],x=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=yt(m),b=p.path(y,d),C=yt(x),v=p.path(C,{...d,fill:"none"}),S=i.insert(()=>v,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),nt(e,S),e.intersect=function(_){return K.polygon(e,m,_)},i}g(Hy,"multiRect");async function Wy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,h=l+c,u=-o/2,f=-h/2,p=5,{cssStyles:d}=e,m=Lr(u-p,f+h+p,u+o-p,f+h+p,c,.8),x=m==null?void 0:m[m.length-1],y=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...m,{x:u+o-p,y:x.y-p},{x:u+o,y:x.y-p},{x:u+o,y:x.y-2*p},{x:u+o+p,y:x.y-2*p},{x:u+o+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+o-p,y:f+p},{x:u+o-p,y:x.y-p},{x:u+o,y:x.y-p},{x:u+o,y:f},{x:u,y:f}],C=Q.svg(i),v=J(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=yt(y),_=C.path(S,v),F=yt(b),D=C.path(F,v),q=i.insert(()=>_,":first-child");return q.insert(()=>D),q.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&q.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&q.selectAll("path").attr("style",n),q.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-c/2-(a.y-(a.top??0))})`),nt(e,q),e.intersect=function(O){return K.polygon(e,y,O)},i}g(Wy,"multiWaveEdgedRectangle");async function jy(t,e,{config:{themeVariables:r}}){var y;const{labelStyles:n,nodeStyles:i}=it(e);e.labelStyle=n,e.useHtmlLabels||((y=Ne().flowchart)==null?void 0:y.htmlLabels)!==!1||(e.centerLabel=!0);const{shapeSvg:s,bbox:o}=await ct(t,e,ht(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-l/2,u=-c/2,{cssStyles:f}=e,p=Q.svg(s),d=J(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(h,u,l,c,d),x=s.insert(()=>m,":first-child");return x.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),nt(e,x),e.intersect=function(b){return K.rect(e,b)},s}g(jy,"note");var jA=g((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Uy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=a.width+e.padding,o=a.height+e.padding,l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const f=Q.svg(i),p=J(e,{}),d=jA(0,0,l),m=f.path(d,p);h=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=yr(i,l,l,c);return n&&h.attr("style",n),nt(e,h),e.intersect=function(f){return z.debug(`APA12 Intersect called SPLIT +`),i=dx(r);return e===!1?i.replace(/ /g," "):i}m(gx,"preprocessMarkdown");function mx(t,e={}){const n=gx(t,e),r=Mt.lexer(n),i=[[]];let s=0;function a(o,l="normal"){o.type==="text"?o.text.split(` +`).forEach((h,u)=>{u!==0&&(s++,i.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&i[s].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{a(c,o.type)}):o.type==="html"&&i[s].push({content:o.text,type:"normal"})}return m(a,"processNode"),r.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(c=>{a(c)}):o.type==="html"&&i[s].push({content:o.text,type:"normal"})}),i}m(mx,"markdownToLines");function yx(t,{markdownAutoWrap:e}={}){const n=Mt.lexer(t);function r(i){var s,a,o;return i.type==="text"?e===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${(s=i.tokens)==null?void 0:s.map(r).join("")}`:i.type==="em"?`${(a=i.tokens)==null?void 0:a.map(r).join("")}`:i.type==="paragraph"?`

    ${(o=i.tokens)==null?void 0:o.map(r).join("")}

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:`Unsupported markdown: ${i.type}`}return m(r,"output"),n.map(r).join("")}m(yx,"markdownToHTML");function xx(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}m(xx,"splitTextToChars");function bx(t,e){const n=xx(e.content);return qh(t,[],n,e.type)}m(bx,"splitWordToFitWidth");function qh(t,e,n,r){if(n.length===0)return[{content:e.join(""),type:r},{content:"",type:r}];const[i,...s]=n,a=[...e,i];return t([{content:a.join(""),type:r}])?qh(t,a,s,r):(e.length===0&&i&&(e.push(i),n.shift()),[{content:e.join(""),type:r},{content:n.join(""),type:r}])}m(qh,"splitWordToFitWidthRecursion");function wx(t,e){if(t.some(({content:n})=>n.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ja(t,e)}m(wx,"splitLineToFitWidth");function ja(t,e,n=[],r=[]){if(t.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i="";t[0].content===" "&&(i=" ",t.shift());const s=t.shift()??{content:" ",type:"normal"},a=[...r];if(i!==""&&a.push({content:i,type:"normal"}),a.push(s),e(a))return ja(t,e,n,a);if(r.length>0)n.push(r),t.unshift(s);else if(s.content){const[o,l]=bx(e,s);n.push([o]),l.content&&t.unshift(l)}return ja(t,e,n)}m(ja,"splitLineToFitWidthRecursion");function dc(t,e){e&&t.attr("style",e)}m(dc,"applyStyle");async function Cx(t,e,n,r,i=!1){const s=t.append("foreignObject");s.attr("width",`${10*n}px`),s.attr("height",`${10*n}px`);const a=s.append("xhtml:div");let o=e.label;e.label&&Jr(e.label)&&(o=await Jc(e.label.replace(ci.lineBreakRegex,` +`),Lt()));const l=e.isNode?"nodeLabel":"edgeLabel",c=a.append("span");c.html(o),dc(c,e.labelStyle),c.attr("class",`${l} ${r}`),dc(a,e.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),a.style("max-width",n+"px"),a.style("text-align","center"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&a.attr("class","labelBkg");let h=a.node().getBoundingClientRect();return h.width===n&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",n+"px"),h=a.node().getBoundingClientRect()),s.node()}m(Cx,"addHtmlSpan");function ko(t,e,n){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*n-.1+"em").attr("dy",n+"em")}m(ko,"createTspan");function vx(t,e,n){const r=t.append("text"),i=ko(r,1,e);So(i,n);const s=i.node().getComputedTextLength();return r.remove(),s}m(vx,"computeWidthOfText");function JM(t,e,n){var a;const r=t.append("text"),i=ko(r,1,e);So(i,[{content:n,type:"normal"}]);const s=(a=i.node())==null?void 0:a.getBoundingClientRect();return s&&r.remove(),s}m(JM,"computeDimensionOfText");function _x(t,e,n,r=!1){const s=e.append("g"),a=s.insert("rect").attr("class","background").attr("style","stroke: none"),o=s.append("text").attr("y","-10.1");let l=0;for(const c of n){const h=m(f=>vx(s,1.1,f)<=t,"checkWidth"),u=h(c)?[c]:wx(c,h);for(const f of u){const p=ko(o,l,1.1);So(p,f),l++}}if(r){const c=o.node().getBBox(),h=2;return a.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),s.node()}else return o.node()}m(_x,"createFormattedText");function So(t,e){t.text(""),e.forEach((n,r)=>{const i=t.append("tspan").attr("font-style",n.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",n.type==="strong"?"bold":"normal");r===0?i.text(n.content):i.text(" "+n.content)})}m(So,"updateTextContentAndStyles");function kx(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,e=>``)}m(kx,"replaceIconSubstring");var pi=m(async(t,e="",{style:n="",isTitle:r=!1,classes:i="",useHtmlLabels:s=!0,isNode:a=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(W.debug("XYZ createText",e,n,r,i,s,a,"addSvgBackground: ",l),s){const h=yx(e,c),u=kx(fi(h)),f=e.replace(/\\\\/g,"\\"),p={isNode:a,label:Jr(e)?f:u,labelStyle:n.replace("fill:","color:")};return await Cx(t,p,o,i,l)}else{const h=e.replace(//g,"
    "),u=mx(h.replace("
    ","
    "),c),f=_x(o,t,u,e?l:!1);if(a){/stroke:/.exec(n)&&(n=n.replace("stroke:","lineColor:"));const p=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");At(f).attr("style",p)}else{const p=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");At(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const d=n.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");At(f).select("text").attr("style",d)}return f}},"createText");function sl(t,e,n){if(t&&t.length){const[r,i]=e,s=Math.PI/180*n,a=Math.cos(s),o=Math.sin(s);for(const l of t){const[c,h]=l;l[0]=(c-r)*a-(h-i)*o+r,l[1]=(c-r)*o+(h-i)*a+i}}}function tB(t,e){return t[0]===e[0]&&t[1]===e[1]}function eB(t,e,n,r=1){const i=n,s=Math.max(e,.1),a=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(const c of a)sl(c,o,i);const l=function(c,h,u){const f=[];for(const b of c){const w=[...b];tB(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&f.push(w)}const p=[];h=Math.max(h,.1);const d=[];for(const b of f)for(let w=0;wb.yminw.ymin?1:b.xw.x?1:b.ymax===w.ymax?0:(b.ymax-w.ymax)/Math.abs(b.ymax-w.ymax)),!d.length)return p;let g=[],x=d[0].ymin,y=0;for(;g.length||d.length;){if(d.length){let b=-1;for(let w=0;wx);w++)b=w;d.splice(0,b+1).forEach(w=>{g.push({s:x,edge:w})})}if(g=g.filter(b=>!(b.edge.ymax<=x)),g.sort((b,w)=>b.edge.x===w.edge.x?0:(b.edge.x-w.edge.x)/Math.abs(b.edge.x-w.edge.x)),(u!==1||y%h==0)&&g.length>1)for(let b=0;b=g.length)break;const v=g[b].edge,k=g[w].edge;p.push([[Math.round(v.x),x],[Math.round(k.x),x]])}x+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),y++}return p}(a,s,r);if(i){for(const c of a)sl(c,o,-i);(function(c,h,u){const f=[];c.forEach(p=>f.push(...p)),sl(f,h,u)})(l,o,-i)}return l}function Ms(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let s=1;return e.roughness>=1&&(((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(s=i),eB(t,i,r,s||1)}class Hh{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=Ms(e,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(e,n){const r=[];for(const i of e)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function To(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}class nB extends Hh{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=Ms(e,Object.assign({},n,{hachureGap:r})),s=Math.PI/180*n.hachureAngle,a=[],o=.5*r*Math.cos(s),l=.5*r*Math.sin(s);for(const[c,h]of i)To([c,h])&&a.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,n)}}}class rB extends Hh{fillPolygons(e,n){const r=this._fillPolygons(e,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),s=this._fillPolygons(e,i);return r.ops=r.ops.concat(s.ops),r}}class iB{constructor(e){this.helper=e}fillPolygons(e,n){const r=Ms(e,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(e,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let s=n.fillWeight;s<0&&(s=n.strokeWidth/2);const a=i/4;for(const o of e){const l=To(o),c=l/i,h=Math.ceil(c)-1,u=l-h*i,f=(o[0][0]+o[1][0])/2-i/4,p=Math.min(o[0][1],o[1][1]);for(let d=0;d{const o=To(a),l=Math.floor(o/(r+i)),c=(o+i-l*(r+i))/2;let h=a[0],u=a[1];h[0]>u[0]&&(h=a[1],u=a[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p{const a=To(s),o=Math.round(a/(2*n));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;uh%2?c+n:c+e);s.push({key:"C",data:l}),e=l[4],n=l[5];break}case"Q":s.push({key:"Q",data:[...o]}),e=o[2],n=o[3];break;case"q":{const l=o.map((c,h)=>h%2?c+n:c+e);s.push({key:"Q",data:l}),e=l[2],n=l[3];break}case"A":s.push({key:"A",data:[...o]}),e=o[5],n=o[6];break;case"a":e+=o[5],n+=o[6],s.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,n]});break;case"H":s.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],s.push({key:"H",data:[e]});break;case"V":s.push({key:"V",data:[...o]}),n=o[0];break;case"v":n+=o[0],s.push({key:"V",data:[n]});break;case"S":s.push({key:"S",data:[...o]}),e=o[2],n=o[3];break;case"s":{const l=o.map((c,h)=>h%2?c+n:c+e);s.push({key:"S",data:l}),e=l[2],n=l[3];break}case"T":s.push({key:"T",data:[...o]}),e=o[0],n=o[1];break;case"t":e+=o[0],n+=o[1],s.push({key:"T",data:[e,n]});break;case"Z":case"z":s.push({key:"Z",data:[]}),e=r,n=i}return s}function Tx(t){const e=[];let n="",r=0,i=0,s=0,a=0,o=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[s,a]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],o=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let u=0,f=0;n==="C"||n==="S"?(u=r+(r-o),f=i+(i-l)):(u=r,f=i),e.push({key:"C",data:[u,f,...h]}),o=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[u,f]=h;let p=0,d=0;n==="Q"||n==="T"?(p=r+(r-o),d=i+(i-l)):(p=r,d=i);const g=r+2*(p-r)/3,x=i+2*(d-i)/3,y=u+2*(p-u)/3,b=f+2*(d-f)/3;e.push({key:"C",data:[g,x,y,b,u,f]}),o=p,l=d,r=u,i=f;break}case"Q":{const[u,f,p,d]=h,g=r+2*(u-r)/3,x=i+2*(f-i)/3,y=p+2*(u-p)/3,b=d+2*(f-d)/3;e.push({key:"C",data:[g,x,y,b,p,d]}),o=u,l=f,r=p,i=d;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],d=h[3],g=h[4],x=h[5],y=h[6];u===0||f===0?(e.push({key:"C",data:[r,i,x,y,x,y]}),r=x,i=y):(r!==x||i!==y)&&(Ex(r,i,x,y,u,f,p,d,g).forEach(function(b){e.push({key:"C",data:b})}),r=x,i=y);break}case"Z":e.push({key:"Z",data:[]}),r=s,i=a}n=c}return e}function Di(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function Ex(t,e,n,r,i,s,a,o,l,c){const h=(u=a,Math.PI*u/180);var u;let f=[],p=0,d=0,g=0,x=0;if(c)[p,d,g,x]=c;else{[t,e]=Di(t,e,-h),[n,r]=Di(n,r,-h);const z=(t-n)/2,R=(e-r)/2;let I=z*z/(i*i)+R*R/(s*s);I>1&&(I=Math.sqrt(I),i*=I,s*=I);const E=i*i,D=s*s,T=E*D-E*R*R-D*z*z,j=E*R*R+D*z*z,C=(o===l?-1:1)*Math.sqrt(Math.abs(T/j));g=C*i*R/s+(t+n)/2,x=C*-s*z/i+(e+r)/2,p=Math.asin(parseFloat(((e-x)/s).toFixed(9))),d=Math.asin(parseFloat(((r-x)/s).toFixed(9))),td&&(p-=2*Math.PI),!l&&d>p&&(d-=2*Math.PI)}let y=d-p;if(Math.abs(y)>120*Math.PI/180){const z=d,R=n,I=r;d=l&&d>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=Ex(n=g+i*Math.cos(d),r=x+s*Math.sin(d),R,I,i,s,a,0,l,[d,z,g,x])}y=d-p;const b=Math.cos(p),w=Math.sin(p),v=Math.cos(d),k=Math.sin(d),_=Math.tan(y/4),A=4/3*i*_,O=4/3*s*_,H=[t,e],N=[t+A*w,e-O*b],M=[n+A*k,r-O*v],$=[n,r];if(N[0]=2*H[0]-N[0],N[1]=2*H[1]-N[1],c)return[N,M,$].concat(f);{f=[N,M,$].concat(f);const z=[];for(let R=0;R2){const i=[];for(let s=0;s2*Math.PI&&(p=0,d=2*Math.PI);const g=2*Math.PI/l.curveStepCount,x=Math.min(g/2,(d-p)/2),y=lp(x,c,h,u,f,p,d,1,l);if(!l.disableMultiStroke){const b=lp(x,c,h,u,f,p,d,1.5,l);y.push(...b)}return a&&(o?y.push(...Vn(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...Vn(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:y}}function sp(t,e){const n=Tx(Sx(Wh(t))),r=[];let i=[0,0],s=[0,0];for(const{key:a,data:o}of n)switch(a){case"M":s=[o[0],o[1]],i=[o[0],o[1]];break;case"L":r.push(...Vn(s[0],s[1],o[0],o[1],e)),s=[o[0],o[1]];break;case"C":{const[l,c,h,u,f,p]=o;r.push(...uB(l,c,h,u,f,p,s,e)),s=[f,p];break}case"Z":r.push(...Vn(s[0],s[1],i[0],i[1],e)),s=[i[0],i[1]]}return{type:"path",ops:r}}function ll(t,e){const n=[];for(const r of t)if(r.length){const i=e.maxRandomnessOffset||0,s=r.length;if(s>2){n.push({op:"move",data:[r[0][0]+ht(i,e),r[0][1]+ht(i,e)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,f=.2+.2*Mx(i);let p=i.bowing*i.maxRandomnessOffset*(r-e)/200,d=i.bowing*i.maxRandomnessOffset*(t-n)/200;p=ht(p,i,c),d=ht(d,i,c);const g=[],x=()=>ht(u,i,c),y=()=>ht(h,i,c),b=i.preserveVertices;return a?g.push({op:"move",data:[t+(b?0:x()),e+(b?0:x())]}):g.push({op:"move",data:[t+(b?0:ht(h,i,c)),e+(b?0:ht(h,i,c))]}),a?g.push({op:"bcurveTo",data:[p+t+(n-t)*f+x(),d+e+(r-e)*f+x(),p+t+2*(n-t)*f+x(),d+e+2*(r-e)*f+x(),n+(b?0:x()),r+(b?0:x())]}):g.push({op:"bcurveTo",data:[p+t+(n-t)*f+y(),d+e+(r-e)*f+y(),p+t+2*(n-t)*f+y(),d+e+2*(r-e)*f+y(),n+(b?0:y()),r+(b?0:y())]}),g}function Us(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+ht(e,n),t[0][1]+ht(e,n)]),r.push([t[0][0]+ht(e,n),t[0][1]+ht(e,n)]);for(let i=1;i3){const s=[],a=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+21&&i.push(o)):i.push(o),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=sr(l,c,.5),p=sr(c,h,.5),d=sr(h,u,.5),g=sr(f,p,.5),x=sr(p,d,.5),y=sr(g,x,.5);yc([l,f,g,y],0,n,i),yc([y,x,d,u],0,n,i)}var s,a;return i}function pB(t,e){return Wa(t,0,t.length,e)}function Wa(t,e,n,r,i){const s=i||[],a=t[e],o=t[n-1];let l=0,c=1;for(let h=e+1;hl&&(l=u,c=h)}return Math.sqrt(l)>r?(Wa(t,e,c+1,r,s),Wa(t,c,n,r,s)):(s.length||s.push(a),s.push(o)),s}function cl(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let s=0;s0?Wa(r,0,r.length,n):r}const Te="none";class Ua{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,r){return{shape:e,sets:n||[],options:r||this.defaultOptions}}line(e,n,r,i,s){const a=this._o(s);return this._d("line",[Ax(e,n,r,i,a)],a)}rectangle(e,n,r,i,s){const a=this._o(s),o=[],l=hB(e,n,r,i,a);if(a.fill){const c=[[e,n],[e+r,n],[e+r,n+i],[e,n+i]];a.fillStyle==="solid"?o.push(ll([c],a)):o.push(Br([c],a))}return a.stroke!==Te&&o.push(l),this._d("rectangle",o,a)}ellipse(e,n,r,i,s){const a=this._o(s),o=[],l=Lx(r,i,a),c=gc(e,n,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=gc(e,n,a,l).opset;h.type="fillPath",o.push(h)}else o.push(Br([c.estimatedPoints],a));return a.stroke!==Te&&o.push(c.opset),this._d("ellipse",o,a)}circle(e,n,r,i){const s=this.ellipse(e,n,r,r,i);return s.shape="circle",s}linearPath(e,n){const r=this._o(n);return this._d("linearPath",[aa(e,!1,r)],r)}arc(e,n,r,i,s,a,o=!1,l){const c=this._o(l),h=[],u=ip(e,n,r,i,s,a,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=ip(e,n,r,i,s,a,!0,!1,f);p.type="fillPath",h.push(p)}else h.push(function(f,p,d,g,x,y,b){const w=f,v=p;let k=Math.abs(d/2),_=Math.abs(g/2);k+=ht(.01*k,b),_+=ht(.01*_,b);let A=x,O=y;for(;A<0;)A+=2*Math.PI,O+=2*Math.PI;O-A>2*Math.PI&&(A=0,O=2*Math.PI);const H=(O-A)/b.curveStepCount,N=[];for(let M=A;M<=O;M+=H)N.push([w+k*Math.cos(M),v+_*Math.sin(M)]);return N.push([w+k*Math.cos(O),v+_*Math.sin(O)]),N.push([w,v]),Br([N],b)}(e,n,r,i,s,a,c));return c.stroke!==Te&&h.push(u),this._d("arc",h,c)}curve(e,n){const r=this._o(n),i=[],s=rp(e,r);if(r.fill&&r.fill!==Te)if(r.fillStyle==="solid"){const a=rp(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],o=e;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...cl(cp([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):a.push(...cl(cp(c),10,(1+r.roughness)/2))}a.length&&i.push(Br([a],r))}return r.stroke!==Te&&i.push(s),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],s=aa(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(ll([e],r)):i.push(Br([e],r))),r.stroke!==Te&&i.push(s),this._d("polygon",i,r)}path(e,n){const r=this._o(n),i=[];if(!e)return this._d("path",i,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=r.fill&&r.fill!=="transparent"&&r.fill!==Te,a=r.stroke!==Te,o=!!(r.simplification&&r.simplification<1),l=function(h,u,f){const p=Tx(Sx(Wh(h))),d=[];let g=[],x=[0,0],y=[];const b=()=>{y.length>=4&&g.push(...cl(y,u)),y=[]},w=()=>{b(),g.length&&(d.push(g),g=[])};for(const{key:k,data:_}of p)switch(k){case"M":w(),x=[_[0],_[1]],g.push(x);break;case"L":b(),g.push([_[0],_[1]]);break;case"C":if(!y.length){const A=g.length?g[g.length-1]:x;y.push([A[0],A[1]])}y.push([_[0],_[1]]),y.push([_[2],_[3]]),y.push([_[4],_[5]]);break;case"Z":b(),g.push([x[0],x[1]])}if(w(),!f)return d;const v=[];for(const k of d){const _=pB(k,f);_.length&&v.push(_)}return v}(e,1,o?4-4*(r.simplification||1):(1+r.roughness)/2),c=sp(e,r);if(s)if(r.fillStyle==="solid")if(l.length===1){const h=sp(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(ll(l,r));else i.push(Br(l,r));return a&&(o?l.forEach(h=>{i.push(aa(h,!1,r))}):i.push(c)),this._d("path",i,r)}opsToPath(e,n){let r="";for(const i of e.ops){const s=typeof n=="number"&&n>=0?i.data.map(a=>+a.toFixed(n)):i.data;switch(i.op){case"move":r+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":r+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":r+=`L${s[0]} ${s[1]} `}}return r.trim()}toPaths(e){const n=e.sets||[],r=e.options||this.defaultOptions,i=[];for(const s of n){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:Te};break;case"fillPath":a={d:this.opsToPath(s),stroke:Te,strokeWidth:0,fill:r.fill||Te};break;case"fillSketch":a=this.fillSketch(s,r)}a&&i.push(a)}return i}fillSketch(e,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(e),stroke:n.fill||Te,strokeWidth:r,fill:Te}}_mergedShape(e){return e.filter((n,r)=>r===0||n.op!=="move")}}class dB{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Ua(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.ctx,s=e.options.fixedDecimalPlaceDigits;for(const a of n)switch(a.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,s),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,a,s,o),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,n,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,n,r,i="nonzero"){e.beginPath();for(const s of n.ops){const a=typeof r=="number"&&r>=0?s.data.map(o=>+o.toFixed(r)):s.data;switch(s.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1])}}n.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,n,r,i,s){const a=this.gen.line(e,n,r,i,s);return this.draw(a),a}rectangle(e,n,r,i,s){const a=this.gen.rectangle(e,n,r,i,s);return this.draw(a),a}ellipse(e,n,r,i,s){const a=this.gen.ellipse(e,n,r,i,s);return this.draw(a),a}circle(e,n,r,i){const s=this.gen.circle(e,n,r,i);return this.draw(s),s}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r),r}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r),r}arc(e,n,r,i,s,a,o=!1,l){const c=this.gen.arc(e,n,r,i,s,a,o,l);return this.draw(c),c}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r),r}path(e,n){const r=this.gen.path(e,n);return this.draw(r),r}}const Vs="http://www.w3.org/2000/svg";class gB{constructor(e,n){this.svg=e,this.gen=new Ua(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,s=i.createElementNS(Vs,"g"),a=e.options.fixedDecimalPlaceDigits;for(const o of n){let l=null;switch(o.type){case"path":l=i.createElementNS(Vs,"path"),l.setAttribute("d",this.opsToPath(o,a)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(Vs,"path"),l.setAttribute("d",this.opsToPath(o,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,r)}l&&s.appendChild(l)}return s}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const s=e.createElementNS(Vs,"path");return s.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),s.setAttribute("stroke",r.fill||""),s.setAttribute("stroke-width",i+""),s.setAttribute("fill","none"),r.fillLineDash&&s.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,n){return this.gen.opsToPath(e,n)}line(e,n,r,i,s){const a=this.gen.line(e,n,r,i,s);return this.draw(a)}rectangle(e,n,r,i,s){const a=this.gen.rectangle(e,n,r,i,s);return this.draw(a)}ellipse(e,n,r,i,s){const a=this.gen.ellipse(e,n,r,i,s);return this.draw(a)}circle(e,n,r,i){const s=this.gen.circle(e,n,r,i);return this.draw(s)}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r)}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r)}arc(e,n,r,i,s,a,o=!1,l){const c=this.gen.arc(e,n,r,i,s,a,o,l);return this.draw(c)}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r)}path(e,n){const r=this.gen.path(e,n);return this.draw(r)}}var tt={canvas:(t,e)=>new dB(t,e),svg:(t,e)=>new gB(t,e),generator:t=>new Ua(t),newSeed:()=>Ua.newSeed()},gt=m(async(t,e,n)=>{var u,f;let r;const i=e.useHtmlLabels||te((u=Lt())==null?void 0:u.htmlLabels);n?r=n:r="node default";const s=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",de(e.labelStyle));let o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];const l=await pi(a,gr(fi(o),Lt()),{useHtmlLabels:i,width:e.width||((f=Lt().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let c=l.getBBox();const h=((e==null?void 0:e.padding)??0)/2;if(i){const p=l.children[0],d=At(l),g=p.getElementsByTagName("img");if(g){const x=o.replace(/]*>/g,"").trim()==="";await Promise.all([...g].map(y=>new Promise(b=>{function w(){if(y.style.display="flex",y.style.flexDirection="column",x){const v=Lt().fontSize?Lt().fontSize:window.getComputedStyle(document.body).fontSize,k=5,[_=Kd.fontSize]=vo(v),A=_*k+"px";y.style.minWidth=A,y.style.maxWidth=A}else y.style.width="100%";b(y)}m(w,"setupImage"),setTimeout(()=>{y.complete&&w()}),y.addEventListener("error",w),y.addEventListener("load",w)})))}c=p.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return i?a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):a.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:c,halfPadding:h,label:a}},"labelHelper"),hl=m(async(t,e,n)=>{var l,c,h,u,f,p;const r=n.useHtmlLabels||te((c=(l=Lt())==null?void 0:l.flowchart)==null?void 0:c.htmlLabels),i=t.insert("g").attr("class","label").attr("style",n.labelStyle||""),s=await pi(i,gr(fi(e),Lt()),{useHtmlLabels:r,width:n.width||((u=(h=Lt())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img});let a=s.getBBox();const o=n.padding/2;if(te((p=(f=Lt())==null?void 0:f.flowchart)==null?void 0:p.htmlLabels)){const d=s.children[0],g=At(s);a=d.getBoundingClientRect(),g.attr("width",a.width),g.attr("height",a.height)}return r?i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):i.attr("transform","translate(0, "+-a.height/2+")"),n.centerLabel&&i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:a,halfPadding:o,label:i}},"insertLabel"),st=m((t,e)=>{const n=e.node().getBBox();t.width=n.width,t.height=n.height},"updateNodeBounds"),mt=m((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function St(t){const e=t.map((n,r)=>`${r===0?"M":"L"}${n.x},${n.y}`);return e.push("Z"),e.join(" ")}m(St,"createPathFromPoints");function Yn(t,e,n,r,i,s){const a=[],l=n-t,c=r-e,h=l/s,u=2*Math.PI/h,f=e+c/2;for(let p=0;p<=50;p++){const d=p/50,g=t+d*l,x=f+i*Math.sin(u*(g-t));a.push({x:g,y:x})}return a}m(Yn,"generateFullSineWavePoints");function Uh(t,e,n,r,i,s){const a=[],o=i*Math.PI/180,h=(s*Math.PI/180-o)/(r-1);for(let u=0;u{var n=t.x,r=t.y,i=e.x-n,s=e.y-r,a=t.width/2,o=t.height/2,l,c;return Math.abs(s)*a>Math.abs(i)*o?(s<0&&(o=-o),l=s===0?0:o*i/s,c=o):(i<0&&(a=-a),l=a,c=i===0?0:a*s/i),{x:n+l,y:r+c}},"intersectRect"),di=mB;function Bx(t,e){e&&t.attr("style",e)}m(Bx,"applyStyle");async function Ix(t){const e=At(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),n=e.append("xhtml:div");let r=t.label;t.label&&Jr(t.label)&&(r=await Jc(t.label.replace(ci.lineBreakRegex,` +`),Lt()));const i=t.isNode?"nodeLabel":"edgeLabel";return n.html('"+r+""),Bx(n,t.labelStyle),n.style("display","inline-block"),n.style("padding-right","1px"),n.style("white-space","nowrap"),n.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}m(Ix,"addHtmlLabel");var yB=m(async(t,e,n,r)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),te(Lt().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),W.info("vertexText"+i);const s={isNode:r,label:fi(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:e&&e.replace("fill:","color:")};return await Ix(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof i=="string"?a=i.split(/\\n|\n|/gi):Array.isArray(i)?a=i:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),n?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),s.appendChild(l)}return s}},"createLabel"),fr=yB,Rn=m((t,e,n,r,i)=>["M",t+i,e,"H",t+n-i,"A",i,i,0,0,1,t+n,e+i,"V",e+r-i,"A",i,i,0,0,1,t+n-i,e+r,"H",t+i,"A",i,i,0,0,1,t,e+r-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),xB=m(t=>{const{handDrawnSeed:e}=Lt();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),gi=m(t=>{const e=bB([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),bB=m(t=>{const e=new Map;return t.forEach(n=>{const[r,i]=n.split(":");e.set(r.trim(),i==null?void 0:i.trim())}),e},"styles2Map"),at=m(t=>{const{stylesArray:e}=gi(t),n=[],r=[],i=[],s=[];return e.forEach(a=>{const o=a[0];o==="color"||o==="font-size"||o==="font-family"||o==="font-weight"||o==="font-style"||o==="text-decoration"||o==="text-align"||o==="text-transform"||o==="line-height"||o==="letter-spacing"||o==="word-spacing"||o==="text-shadow"||o==="text-overflow"||o==="white-space"||o==="word-wrap"||o==="word-break"||o==="overflow-wrap"||o==="hyphens"?n.push(a.join(":")+" !important"):(r.push(a.join(":")+" !important"),o.includes("stroke")&&i.push(a.join(":")+" !important"),o==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:n.join(";"),nodeStyles:r.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:s}},"styles2String"),et=m((t,e)=>{var l;const{themeVariables:n,handDrawnSeed:r}=Lt(),{nodeBorder:i,mainBkg:s}=n,{stylesMap:a}=gi(t);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||i,seed:r,strokeWidth:((l=a.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides"),Fx=m(async(t,e)=>{W.info("Creating subgraph rect for ",e.id,e);const n=Lt(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:s,clusterBorder:a}=r,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=at(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=te(n.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),d=await pi(p,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0});let g=d.getBBox();if(te(n.flowchart.htmlLabels)){const A=d.children[0],O=At(d);g=A.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}const x=e.width<=g.width+e.padding?g.width+e.padding:e.width;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;const y=e.height,b=e.x-x/2,w=e.y-y/2;W.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const A=tt.svg(u),O=et(e,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:i}),H=A.path(Rn(b,w,x,y,0),O);v=u.insert(()=>(W.debug("Rough node insert CXC",H),H),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:k}=uh(n);if(p.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+k})`),o){const A=p.select("span");A&&A.attr("style",o)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=g.height-e.padding/2,e.intersect=function(A){return di(e,A)},{cluster:u,labelBBox:g}},"rect"),wB=m((t,e)=>{const n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,s=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const a=r.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return di(e,o)},{cluster:n,labelBBox:{width:0,height:0}}},"noteGroup"),CB=m(async(t,e)=>{const n=Lt(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:s,compositeBackground:a,compositeTitleBackground:o,nodeBorder:l}=r,c=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const p=u.node().appendChild(await fr(e.label,e.labelStyle,void 0,!0));let d=p.getBBox();if(te(n.flowchart.htmlLabels)){const H=p.children[0],N=At(p);d=H.getBoundingClientRect(),N.attr("width",d.width),N.attr("height",d.height)}const g=0*e.padding,x=g/2,y=(e.width<=d.width+e.padding?d.width+e.padding:e.width)+g;e.width<=d.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height+g,w=e.height+g-d.height-6,v=e.x-y/2,k=e.y-b/2;e.width=y;const _=e.y-e.height/2-x+d.height+2;let A;if(e.look==="handDrawn"){const H=e.cssClasses.includes("statediagram-cluster-alt"),N=tt.svg(c),M=e.rx||e.ry?N.path(Rn(v,k,y,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):N.rectangle(v,k,y,b,{seed:i});A=c.insert(()=>M,":first-child");const $=N.rectangle(v,_,y,w,{fill:H?s:a,fillStyle:H?"hachure":"solid",stroke:l,seed:i});A=c.insert(()=>M,":first-child"),f=c.insert(()=>$)}else A=h.insert("rect",":first-child"),A.attr("class","outer").attr("x",v).attr("y",k).attr("width",y).attr("height",b).attr("data-look",e.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",y).attr("height",w);u.attr("transform",`translate(${e.x-d.width/2}, ${k+1-(te(n.flowchart.htmlLabels)?0:3)})`);const O=A.node().getBBox();return e.height=O.height,e.offsetX=0,e.offsetY=d.height-e.padding/2,e.labelBBox=d,e.intersect=function(H){return di(e,H)},{cluster:c,labelBBox:d}},"roundedWithTitle"),vB=m(async(t,e)=>{W.info("Creating subgraph rect for ",e.id,e);const n=Lt(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:s,clusterBorder:a}=r,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=at(e),u=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),f=te(n.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),d=await pi(p,e.label,{style:e.labelStyle,useHtmlLabels:f,isNode:!0,width:e.width});let g=d.getBBox();if(te(n.flowchart.htmlLabels)){const A=d.children[0],O=At(d);g=A.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}const x=e.width<=g.width+e.padding?g.width+e.padding:e.width;e.width<=g.width+e.padding?e.diff=(x-e.width)/2-e.padding:e.diff=-e.padding;const y=e.height,b=e.x-x/2,w=e.y-y/2;W.trace("Data ",e,JSON.stringify(e));let v;if(e.look==="handDrawn"){const A=tt.svg(u),O=et(e,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:i}),H=A.path(Rn(b,w,x,y,e.rx),O);v=u.insert(()=>(W.debug("Rough node insert CXC",H),H),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",b).attr("y",w).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:k}=uh(n);if(p.attr("transform",`translate(${e.x-g.width/2}, ${e.y-e.height/2+k})`),o){const A=p.select("span");A&&A.attr("style",o)}const _=v.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=g.height-e.padding/2,e.intersect=function(A){return di(e,A)},{cluster:u,labelBBox:g}},"kanbanSection"),_B=m((t,e)=>{const n=Lt(),{themeVariables:r,handDrawnSeed:i}=n,{nodeBorder:s}=r,a=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=a.insert("g",":first-child"),l=0*e.padding,c=e.width+l;e.diff=-e.padding;const h=e.height+l,u=e.x-c/2,f=e.y-h/2;e.width=c;let p;if(e.look==="handDrawn"){const x=tt.svg(a).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:i});p=a.insert(()=>x,":first-child")}else p=o.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",e.look);const d=p.node().getBBox();return e.height=d.height,e.offsetX=0,e.offsetY=0,e.intersect=function(g){return di(e,g)},{cluster:a,labelBBox:{}}},"divider"),kB=Fx,SB={rect:Fx,squareRect:kB,roundedWithTitle:CB,noteGroup:wB,divider:_B,kanbanSection:vB},Rx=new Map,TB=m(async(t,e)=>{const n=e.shape||"rect",r=await SB[n](t,e);return Rx.set(e.id,r),r},"insertCluster"),I4=m(()=>{Rx=new Map},"clear");function Px(t,e){return t.intersect(e)}m(Px,"intersectNode");var EB=Px;function Dx(t,e,n,r){var i=t.x,s=t.y,a=i-r.x,o=s-r.y,l=Math.sqrt(e*e*o*o+n*n*a*a),c=Math.abs(e*n*a/l);r.x0}m(xc,"sameSign");var LB=Nx;function zx(t,e,n){let r=t.x,i=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(h){a=Math.min(a,h.x),o=Math.min(o,h.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));let l=r-t.width/2-a,c=i-t.height/2-o;for(let h=0;h1&&s.sort(function(h,u){let f=h.x-n.x,p=h.y-n.y,d=Math.sqrt(f*f+p*p),g=u.x-n.x,x=u.y-n.y,y=Math.sqrt(g*g+x*x);return dh,":first-child");return u.attr("class","anchor").attr("style",de(o)),st(e,u),e.intersect=function(f){return W.info("Circle intersect",e,a,f),Z.circle(e,a,f)},s}m(jx,"anchor");function bc(t,e,n,r,i,s,a){const l=(t+n)/2,c=(e+r)/2,h=Math.atan2(r-e,n-t),u=(n-t)/2,f=(r-e)/2,p=u/i,d=f/s,g=Math.sqrt(p**2+d**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-g**2),y=l+x*s*Math.sin(h)*(a?-1:1),b=c-x*i*Math.cos(h)*(a?-1:1),w=Math.atan2((e-b)/s,(t-y)/i);let k=Math.atan2((r-b)/s,(n-y)/i)-w;a&&k<0&&(k+=2*Math.PI),!a&&k>0&&(k-=2*Math.PI);const _=[];for(let A=0;A<20;A++){const O=A/19,H=w+O*k,N=y+i*Math.cos(H),M=b+s*Math.sin(H);_.push({x:N,y:M})}return _}m(bc,"generateArcPoints");async function qx(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=s.width+e.padding+20,o=s.height+e.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=e,u=[{x:a/2,y:-o/2},{x:-a/2,y:-o/2},...bc(-a/2,-o/2,-a/2,o/2,c,l,!1),{x:a/2,y:o/2},...bc(a/2,o/2,a/2,-o/2,c,l,!0)],f=tt.svg(i),p=et(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=St(u),g=f.path(d,p),x=i.insert(()=>g,":first-child");return x.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",h),r&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(${c/2}, 0)`),st(e,x),e.intersect=function(y){return Z.polygon(e,u,y)},i}m(qx,"bowTieRect");function Pn(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}m(Pn,"insertPolygonShape");async function Hx(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=s.height+e.padding,o=12,l=s.width+e.padding+o,c=0,h=l,u=-a,f=0,p=[{x:c+o,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+o},{x:c+o,y:u}];let d;const{cssStyles:g}=e;if(e.look==="handDrawn"){const x=tt.svg(i),y=et(e,{}),b=St(p),w=x.path(b,y);d=i.insert(()=>w,":first-child").attr("transform",`translate(${-l/2}, ${a/2})`),g&&d.attr("style",g)}else d=Pn(i,l,a,p);return r&&d.attr("style",r),st(e,d),e.intersect=function(x){return Z.polygon(e,p,x)},i}m(Hx,"card");function Wx(t,e){const{nodeStyles:n}=at(e);e.label="";const r=t.insert("g").attr("class",mt(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,s=Math.max(28,e.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],o=tt.svg(r),l=et(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=St(a),h=o.path(c,l),u=r.insert(()=>h,":first-child");return i&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",i),n&&e.look!=="handDrawn"&&u.selectAll("path").attr("style",n),e.width=28,e.height=28,e.intersect=function(f){return Z.polygon(e,a,f)},r}m(Wx,"choice");async function Ux(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,halfPadding:a}=await gt(t,e,mt(e)),o=s.width/2+a;let l;const{cssStyles:c}=e;if(e.look==="handDrawn"){const h=tt.svg(i),u=et(e,{}),f=h.circle(0,0,o*2,u);l=i.insert(()=>f,":first-child"),l.attr("class","basic label-container").attr("style",de(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return st(e,l),e.intersect=function(h){return W.info("Circle intersect",e,o,h),Z.circle(e,o,h)},i}m(Ux,"circle");function Vx(t){const e=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=t*2,i={x:r/2*e,y:r/2*n},s={x:-(r/2)*e,y:r/2*n},a={x:-(r/2)*e,y:-(r/2)*n},o={x:r/2*e,y:-(r/2)*n};return`M ${s.x},${s.y} L ${o.x},${o.y} + M ${i.x},${i.y} L ${a.x},${a.y}`}m(Vx,"createLine");function Yx(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n,e.label="";const i=t.insert("g").attr("class",mt(e)).attr("id",e.domId??e.id),s=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:a}=e,o=tt.svg(i),l=et(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,s*2,l),h=Vx(s),u=o.path(h,l),f=i.insert(()=>c,":first-child");return f.insert(()=>u),a&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),st(e,f),e.intersect=function(p){return W.info("crossedCircle intersect",e,{radius:s,point:p}),Z.circle(e,s,p)},i}m(Yx,"crossedCircle");function Sn(t,e,n,r=100,i=0,s=180){const a=[],o=i*Math.PI/180,h=(s*Math.PI/180-o)/(r-1);for(let u=0;uw,":first-child").attr("stroke-opacity",0),v.insert(()=>y,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),r&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",r),v.attr("transform",`translate(${c}, 0)`),a.attr("transform",`translate(${-o/2+c-(s.x-(s.left??0))},${-l/2+(e.padding??0)/2-(s.y-(s.top??0))})`),st(e,v),e.intersect=function(k){return Z.polygon(e,f,k)},i}m(Gx,"curlyBraceLeft");function Tn(t,e,n,r=100,i=0,s=180){const a=[],o=i*Math.PI/180,h=(s*Math.PI/180-o)/(r-1);for(let u=0;uw,":first-child").attr("stroke-opacity",0),v.insert(()=>y,":first-child"),v.attr("class","text"),h&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",h),r&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",r),v.attr("transform",`translate(${-c}, 0)`),a.attr("transform",`translate(${-o/2+(e.padding??0)/2-(s.x-(s.left??0))},${-l/2+(e.padding??0)/2-(s.y-(s.top??0))})`),st(e,v),e.intersect=function(k){return Z.polygon(e,f,k)},i}m(Xx,"curlyBraceRight");function Zt(t,e,n,r=100,i=0,s=180){const a=[],o=i*Math.PI/180,h=(s*Math.PI/180-o)/(r-1);for(let u=0;uA,":first-child").attr("stroke-opacity",0),O.insert(()=>b,":first-child"),O.insert(()=>k,":first-child"),O.attr("class","text"),h&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",h),r&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",r),O.attr("transform",`translate(${c-c/4}, 0)`),a.attr("transform",`translate(${-o/2+(e.padding??0)/2-(s.x-(s.left??0))},${-l/2+(e.padding??0)/2-(s.y-(s.top??0))})`),st(e,O),e.intersect=function(H){return Z.polygon(e,p,H)},i}m(Kx,"curlyBraces");async function Zx(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=80,o=20,l=Math.max(a,(s.width+(e.padding??0)*2)*1.25,(e==null?void 0:e.width)??0),c=Math.max(o,s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=c/2,{cssStyles:u}=e,f=tt.svg(i),p=et(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=l,g=c,x=d-h,y=g/4,b=[{x,y:0},{x:y,y:0},{x:0,y:g/2},{x:y,y:g},{x,y:g},...Uh(-x,-g/2,h,50,270,90)],w=St(b),v=f.path(w,p),k=i.insert(()=>v,":first-child");return k.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),r&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",r),k.attr("transform",`translate(${-l/2}, ${-c/2})`),st(e,k),e.intersect=function(_){return Z.polygon(e,b,_)},i}m(Zx,"curvedTrapezoid");var BB=m((t,e,n,r,i,s)=>[`M${t},${e+s}`,`a${i},${s} 0,0,0 ${n},0`,`a${i},${s} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${s} 0,0,0 ${n},0`,`l0,${-r}`].join(" "),"createCylinderPathD"),IB=m((t,e,n,r,i,s)=>[`M${t},${e+s}`,`M${t+n},${e+s}`,`a${i},${s} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${s} 0,0,0 ${n},0`,`l0,${-r}`].join(" "),"createOuterCylinderPathD"),FB=m((t,e,n,r,i,s)=>[`M${t-n/2},${-r/2}`,`a${i},${s} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function Qx(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+e.padding,e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(s.height+c+e.padding,e.height??0);let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const p=tt.svg(i),d=IB(0,0,o,h,l,c),g=FB(0,c,o,h,l,c),x=p.path(d,et(e,{})),y=p.path(g,et(e,{fill:"none"}));u=i.insert(()=>y,":first-child"),u=i.insert(()=>x,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=BB(0,0,o,h,l,c);u=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",de(f)).attr("style",r)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),st(e,u),a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+(e.padding??0)/1.5-(s.y-(s.top??0))})`),e.intersect=function(p){const d=Z.rect(e,p),g=d.x-(e.x??0);if(l!=0&&(Math.abs(g)<(e.width??0)/2||Math.abs(g)==(e.width??0)/2&&Math.abs(d.y-(e.y??0))>(e.height??0)/2-c)){let x=c*c*(1-g*g/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,p.y-(e.y??0)>0&&(x=-x),d.y+=x}return d},i}m(Qx,"cylinder");async function Jx(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=s.width+e.padding,l=s.height+e.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:f}=e,p=tt.svg(i),d=et(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],x=p.polygon(g.map(b=>[b.x,b.y]),d),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",f),r&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",r),a.attr("transform",`translate(${h+(e.padding??0)/2-(s.x-(s.left??0))}, ${u+c+(e.padding??0)/2-(s.y-(s.top??0))})`),st(e,y),e.intersect=function(b){return Z.rect(e,b)},i}m(Jx,"dividedRectangle");async function t0(t,e){var f,p;const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,halfPadding:a}=await gt(t,e,mt(e)),l=s.width/2+a+5,c=s.width/2+a;let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const d=tt.svg(i),g=et(e,{roughness:.2,strokeWidth:2.5}),x=et(e,{roughness:.2,strokeWidth:1.5}),y=d.circle(0,0,l*2,g),b=d.circle(0,0,c*2,x);h=i.insert("g",":first-child"),h.attr("class",de(e.cssClasses)).attr("style",de(u)),(f=h.node())==null||f.appendChild(y),(p=h.node())==null||p.appendChild(b)}else{h=i.insert("g",":first-child");const d=h.insert("circle",":first-child"),g=h.insert("circle");h.attr("class","basic label-container").attr("style",r),d.attr("class","outer-circle").attr("style",r).attr("r",l).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",r).attr("r",c).attr("cx",0).attr("cy",0)}return st(e,h),e.intersect=function(d){return W.info("DoubleCircle intersect",e,l,d),Z.circle(e,l,d)},i}m(t0,"doublecircle");function e0(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:i}=at(e);e.label="",e.labelStyle=r;const s=t.insert("g").attr("class",mt(e)).attr("id",e.domId??e.id),a=7,{cssStyles:o}=e,l=tt.svg(s),{nodeBorder:c}=n,h=et(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,a*2,h),f=s.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",i),st(e,f),e.intersect=function(p){return W.info("filledCircle intersect",e,{radius:a,point:p}),Z.circle(e,a,p)},s}m(e0,"filledCircle");async function n0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=s.width+(e.padding??0),l=o+s.height,c=o+s.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=e,f=tt.svg(i),p=et(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=St(h),g=f.path(d,p),x=i.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),r&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",r),e.width=o,e.height=l,st(e,x),a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-l/2+(e.padding??0)/2+(s.y-(s.top??0))})`),e.intersect=function(y){return W.info("Triangle intersect",e,h,y),Z.polygon(e,h,y)},i}m(n0,"flippedTriangle");function r0(t,e,{dir:n,config:{state:r,themeVariables:i}}){const{nodeStyles:s}=at(e);e.label="";const a=t.insert("g").attr("class",mt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e;let l=Math.max(70,(e==null?void 0:e.width)??0),c=Math.max(10,(e==null?void 0:e.height)??0);n==="LR"&&(l=Math.max(10,(e==null?void 0:e.width)??0),c=Math.max(70,(e==null?void 0:e.height)??0));const h=-1*l/2,u=-1*c/2,f=tt.svg(a),p=et(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=f.rectangle(h,u,l,c,p),g=a.insert(()=>d,":first-child");o&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",o),s&&e.look!=="handDrawn"&&g.selectAll("path").attr("style",s),st(e,g);const x=(r==null?void 0:r.padding)??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(y){return Z.rect(e,y)},a}m(r0,"forkJoin");async function i0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const i=80,s=50,{shapeSvg:a,bbox:o}=await gt(t,e,mt(e)),l=Math.max(i,o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(s,o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=c/2,{cssStyles:u}=e,f=tt.svg(a),p=et(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Uh(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],g=St(d),x=f.path(g,p),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),r&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",r),st(e,y),e.intersect=function(b){return W.info("Pill intersect",e,{radius:h,point:b}),Z.polygon(e,d,b)},a}m(i0,"halfRoundedRectangle");var RB=m((t,e,n,r,i)=>[`M${t+i},${e}`,`L${t+n-i},${e}`,`L${t+n},${e-r/2}`,`L${t+n-i},${e-r}`,`L${t+i},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createHexagonPathD");async function s0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=4,o=s.height+e.padding,l=o/a,c=s.width+2*l+e.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-o/2},{x:c-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}];let u;const{cssStyles:f}=e;if(e.look==="handDrawn"){const p=tt.svg(i),d=et(e,{}),g=RB(0,0,c,o,l),x=p.path(g,d);u=i.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),f&&u.attr("style",f)}else u=Pn(i,c,o,h);return r&&u.attr("style",r),e.width=c,e.height=o,st(e,u),e.intersect=function(p){return Z.polygon(e,h,p)},i}m(s0,"hexagon");async function a0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.label="",e.labelStyle=n;const{shapeSvg:i}=await gt(t,e,mt(e)),s=Math.max(30,(e==null?void 0:e.width)??0),a=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:o}=e,l=tt.svg(i),c=et(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],u=St(h),f=l.path(u,c),p=i.insert(()=>f,":first-child");return p.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",o),r&&e.look!=="handDrawn"&&p.selectChildren("path").attr("style",r),p.attr("transform",`translate(${-s/2}, ${-a/2})`),st(e,p),e.intersect=function(d){return W.info("Pill intersect",e,{points:h}),Z.polygon(e,h,d)},i}m(a0,"hourglass");async function o0(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=at(e);e.labelStyle=i;const s=e.assetHeight??48,a=e.assetWidth??48,o=Math.max(s,a),l=r==null?void 0:r.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await gt(t,e,"icon-shape default"),f=e.pos==="t",p=o,d=o,{nodeBorder:g}=n,{stylesMap:x}=gi(e),y=-d/2,b=-p/2,w=e.label?8:0,v=tt.svg(c),k=et(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=v.rectangle(y,b,d,p,k),A=Math.max(d,h.width),O=p+h.height+w,H=v.rectangle(-A/2,-O/2,A,O,{...k,fill:"transparent",stroke:"none"}),N=c.insert(()=>_,":first-child"),M=c.insert(()=>H);if(e.icon){const $=c.append("g");$.html(`${await ho(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const z=$.node().getBBox(),R=z.width,I=z.height,E=z.x,D=z.y;$.attr("transform",`translate(${-R/2-E},${f?h.height/2+w/2-I/2-D:-h.height/2-w/2-I/2-D})`),$.attr("style",`color: ${x.get("stroke")??g};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),N.attr("transform",`translate(0,${f?h.height/2+w/2:-h.height/2-w/2})`),st(e,M),e.intersect=function($){if(W.info("iconSquare intersect",e,$),!e.label)return Z.rect(e,$);const z=e.x??0,R=e.y??0,I=e.height??0;let E=[];return f?E=[{x:z-h.width/2,y:R-I/2},{x:z+h.width/2,y:R-I/2},{x:z+h.width/2,y:R-I/2+h.height+w},{x:z+d/2,y:R-I/2+h.height+w},{x:z+d/2,y:R+I/2},{x:z-d/2,y:R+I/2},{x:z-d/2,y:R-I/2+h.height+w},{x:z-h.width/2,y:R-I/2+h.height+w}]:E=[{x:z-d/2,y:R-I/2},{x:z+d/2,y:R-I/2},{x:z+d/2,y:R-I/2+p},{x:z+h.width/2,y:R-I/2+p},{x:z+h.width/2/2,y:R+I/2},{x:z-h.width/2,y:R+I/2},{x:z-h.width/2,y:R-I/2+p},{x:z-d/2,y:R-I/2+p}],Z.polygon(e,E,$)},c}m(o0,"icon");async function l0(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=at(e);e.labelStyle=i;const s=e.assetHeight??48,a=e.assetWidth??48,o=Math.max(s,a),l=r==null?void 0:r.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await gt(t,e,"icon-shape default"),f=20,p=e.label?8:0,d=e.pos==="t",{nodeBorder:g,mainBkg:x}=n,{stylesMap:y}=gi(e),b=tt.svg(c),w=et(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=y.get("fill");w.stroke=v??x;const k=c.append("g");e.icon&&k.html(`${await ho(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const _=k.node().getBBox(),A=_.width,O=_.height,H=_.x,N=_.y,M=Math.max(A,O)*Math.SQRT2+f*2,$=b.circle(0,0,M,w),z=Math.max(M,h.width),R=M+h.height+p,I=b.rectangle(-z/2,-R/2,z,R,{...w,fill:"transparent",stroke:"none"}),E=c.insert(()=>$,":first-child"),D=c.insert(()=>I);return k.attr("transform",`translate(${-A/2-H},${d?h.height/2+p/2-O/2-N:-h.height/2-p/2-O/2-N})`),k.attr("style",`color: ${y.get("stroke")??g};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-R/2:R/2-h.height})`),E.attr("transform",`translate(0,${d?h.height/2+p/2:-h.height/2-p/2})`),st(e,D),e.intersect=function(T){return W.info("iconSquare intersect",e,T),Z.rect(e,T)},c}m(l0,"iconCircle");async function c0(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=at(e);e.labelStyle=i;const s=e.assetHeight??48,a=e.assetWidth??48,o=Math.max(s,a),l=r==null?void 0:r.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await gt(t,e,"icon-shape default"),p=e.pos==="t",d=o+u*2,g=o+u*2,{nodeBorder:x,mainBkg:y}=n,{stylesMap:b}=gi(e),w=-g/2,v=-d/2,k=e.label?8:0,_=tt.svg(c),A=et(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const O=b.get("fill");A.stroke=O??y;const H=_.path(Rn(w,v,g,d,5),A),N=Math.max(g,h.width),M=d+h.height+k,$=_.rectangle(-N/2,-M/2,N,M,{...A,fill:"transparent",stroke:"none"}),z=c.insert(()=>H,":first-child").attr("class","icon-shape2"),R=c.insert(()=>$);if(e.icon){const I=c.append("g");I.html(`${await ho(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const E=I.node().getBBox(),D=E.width,T=E.height,j=E.x,C=E.y;I.attr("transform",`translate(${-D/2-j},${p?h.height/2+k/2-T/2-C:-h.height/2-k/2-T/2-C})`),I.attr("style",`color: ${b.get("stroke")??x};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-M/2:M/2-h.height})`),z.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),st(e,R),e.intersect=function(I){if(W.info("iconSquare intersect",e,I),!e.label)return Z.rect(e,I);const E=e.x??0,D=e.y??0,T=e.height??0;let j=[];return p?j=[{x:E-h.width/2,y:D-T/2},{x:E+h.width/2,y:D-T/2},{x:E+h.width/2,y:D-T/2+h.height+k},{x:E+g/2,y:D-T/2+h.height+k},{x:E+g/2,y:D+T/2},{x:E-g/2,y:D+T/2},{x:E-g/2,y:D-T/2+h.height+k},{x:E-h.width/2,y:D-T/2+h.height+k}]:j=[{x:E-g/2,y:D-T/2},{x:E+g/2,y:D-T/2},{x:E+g/2,y:D-T/2+d},{x:E+h.width/2,y:D-T/2+d},{x:E+h.width/2/2,y:D+T/2},{x:E-h.width/2,y:D+T/2},{x:E-h.width/2,y:D-T/2+d},{x:E-g/2,y:D-T/2+d}],Z.polygon(e,j,I)},c}m(c0,"iconRounded");async function h0(t,e,{config:{themeVariables:n,flowchart:r}}){const{labelStyles:i}=at(e);e.labelStyle=i;const s=e.assetHeight??48,a=e.assetWidth??48,o=Math.max(s,a),l=r==null?void 0:r.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await gt(t,e,"icon-shape default"),p=e.pos==="t",d=o+u*2,g=o+u*2,{nodeBorder:x,mainBkg:y}=n,{stylesMap:b}=gi(e),w=-g/2,v=-d/2,k=e.label?8:0,_=tt.svg(c),A=et(e,{});e.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const O=b.get("fill");A.stroke=O??y;const H=_.path(Rn(w,v,g,d,.1),A),N=Math.max(g,h.width),M=d+h.height+k,$=_.rectangle(-N/2,-M/2,N,M,{...A,fill:"transparent",stroke:"none"}),z=c.insert(()=>H,":first-child"),R=c.insert(()=>$);if(e.icon){const I=c.append("g");I.html(`${await ho(e.icon,{height:o,width:o,fallbackPrefix:""})}`);const E=I.node().getBBox(),D=E.width,T=E.height,j=E.x,C=E.y;I.attr("transform",`translate(${-D/2-j},${p?h.height/2+k/2-T/2-C:-h.height/2-k/2-T/2-C})`),I.attr("style",`color: ${b.get("stroke")??x};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-M/2:M/2-h.height})`),z.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),st(e,R),e.intersect=function(I){if(W.info("iconSquare intersect",e,I),!e.label)return Z.rect(e,I);const E=e.x??0,D=e.y??0,T=e.height??0;let j=[];return p?j=[{x:E-h.width/2,y:D-T/2},{x:E+h.width/2,y:D-T/2},{x:E+h.width/2,y:D-T/2+h.height+k},{x:E+g/2,y:D-T/2+h.height+k},{x:E+g/2,y:D+T/2},{x:E-g/2,y:D+T/2},{x:E-g/2,y:D-T/2+h.height+k},{x:E-h.width/2,y:D-T/2+h.height+k}]:j=[{x:E-g/2,y:D-T/2},{x:E+g/2,y:D-T/2},{x:E+g/2,y:D-T/2+d},{x:E+h.width/2,y:D-T/2+d},{x:E+h.width/2/2,y:D+T/2},{x:E-h.width/2,y:D+T/2},{x:E-h.width/2,y:D-T/2+d},{x:E-g/2,y:D-T/2+d}],Z.polygon(e,j,I)},c}m(h0,"iconSquare");async function u0(t,e,{config:{flowchart:n}}){const r=new Image;r.src=(e==null?void 0:e.img)??"",await r.decode();const i=Number(r.naturalWidth.toString().replace("px","")),s=Number(r.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/s;const{labelStyles:a}=at(e);e.labelStyle=a;const o=n==null?void 0:n.wrappingWidth;e.defaultWidth=n==null?void 0:n.wrappingWidth;const l=Math.max(e.label?o??0:0,(e==null?void 0:e.assetWidth)??i),c=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:l,h=e.constraint==="on"?c/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??s;e.width=Math.max(c,o??0);const{shapeSvg:u,bbox:f,label:p}=await gt(t,e,"image-shape default"),d=e.pos==="t",g=-c/2,x=-h/2,y=e.label?8:0,b=tt.svg(u),w=et(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const v=b.rectangle(g,x,c,h,w),k=Math.max(c,f.width),_=h+f.height+y,A=b.rectangle(-k/2,-_/2,k,_,{...w,fill:"none",stroke:"none"}),O=u.insert(()=>v,":first-child"),H=u.insert(()=>A);if(e.img){const N=u.append("image");N.attr("href",e.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${d?_/2-h:-_/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${d?-h/2-f.height/2-y/2:h/2-f.height/2+y/2})`),O.attr("transform",`translate(0,${d?f.height/2+y/2:-f.height/2-y/2})`),st(e,H),e.intersect=function(N){if(W.info("iconSquare intersect",e,N),!e.label)return Z.rect(e,N);const M=e.x??0,$=e.y??0,z=e.height??0;let R=[];return d?R=[{x:M-f.width/2,y:$-z/2},{x:M+f.width/2,y:$-z/2},{x:M+f.width/2,y:$-z/2+f.height+y},{x:M+c/2,y:$-z/2+f.height+y},{x:M+c/2,y:$+z/2},{x:M-c/2,y:$+z/2},{x:M-c/2,y:$-z/2+f.height+y},{x:M-f.width/2,y:$-z/2+f.height+y}]:R=[{x:M-c/2,y:$-z/2},{x:M+c/2,y:$-z/2},{x:M+c/2,y:$-z/2+h},{x:M+f.width/2,y:$-z/2+h},{x:M+f.width/2/2,y:$+z/2},{x:M-f.width/2,y:$+z/2},{x:M-f.width/2,y:$-z/2+h},{x:M-c/2,y:$-z/2+h}],Z.polygon(e,R,N)},u}m(u0,"imageSquare");async function f0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),o=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=[{x:0,y:0},{x:a,y:0},{x:a+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=tt.svg(i),f=et(e,{}),p=St(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${o/2})`),h&&c.attr("style",h)}else c=Pn(i,a,o,l);return r&&c.attr("style",r),e.width=a,e.height=o,st(e,c),e.intersect=function(u){return Z.polygon(e,l,u)},i}m(f0,"inv_trapezoid");async function Eo(t,e,n){const{labelStyles:r,nodeStyles:i}=at(e);e.labelStyle=r;const{shapeSvg:s,bbox:a}=await gt(t,e,mt(e)),o=Math.max(a.width+n.labelPaddingX*2,(e==null?void 0:e.width)||0),l=Math.max(a.height+n.labelPaddingY*2,(e==null?void 0:e.height)||0),c=-o/2,h=-l/2;let u,{rx:f,ry:p}=e;const{cssStyles:d}=e;if(n!=null&&n.rx&&n.ry&&(f=n.rx,p=n.ry),e.look==="handDrawn"){const g=tt.svg(s),x=et(e,{}),y=f||p?g.path(Rn(c,h,o,l,f||0),x):g.rectangle(c,h,o,l,x);u=s.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",de(d))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",i).attr("rx",de(f)).attr("ry",de(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return st(e,u),e.intersect=function(g){return Z.rect(e,g)},s}m(Eo,"drawRect");async function p0(t,e){const{shapeSvg:n,bbox:r,label:i}=await gt(t,e,"label"),s=n.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),n.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),st(e,s),e.intersect=function(l){return Z.rect(e,l)},n}m(p0,"labelRect");async function d0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=Math.max(s.width+(e.padding??0),(e==null?void 0:e.width)??0),o=Math.max(s.height+(e.padding??0),(e==null?void 0:e.height)??0),l=[{x:0,y:0},{x:a+3*o/6,y:0},{x:a,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=tt.svg(i),f=et(e,{}),p=St(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${o/2})`),h&&c.attr("style",h)}else c=Pn(i,a,o,l);return r&&c.attr("style",r),e.width=a,e.height=o,st(e,c),e.intersect=function(u){return Z.polygon(e,l,u)},i}m(d0,"lean_left");async function g0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=Math.max(s.width+(e.padding??0),(e==null?void 0:e.width)??0),o=Math.max(s.height+(e.padding??0),(e==null?void 0:e.height)??0),l=[{x:-3*o/6,y:0},{x:a,y:0},{x:a+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=tt.svg(i),f=et(e,{}),p=St(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${o/2})`),h&&c.attr("style",h)}else c=Pn(i,a,o,l);return r&&c.attr("style",r),e.width=a,e.height=o,st(e,c),e.intersect=function(u){return Z.polygon(e,l,u)},i}m(g0,"lean_right");function m0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.label="",e.labelStyle=n;const i=t.insert("g").attr("class",mt(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,a=Math.max(35,(e==null?void 0:e.width)??0),o=Math.max(35,(e==null?void 0:e.height)??0),l=7,c=[{x:a,y:0},{x:0,y:o+l/2},{x:a-2*l,y:o+l/2},{x:0,y:2*o},{x:a,y:o-l/2},{x:2*l,y:o-l/2}],h=tt.svg(i),u=et(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=St(c),p=h.path(f,u),d=i.insert(()=>p,":first-child");return s&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",r),d.attr("transform",`translate(-${a/2},${-o})`),st(e,d),e.intersect=function(g){return W.info("lightningBolt intersect",e,g),Z.polygon(e,c,g)},i}m(m0,"lightningBolt");var PB=m((t,e,n,r,i,s,a)=>[`M${t},${e+s}`,`a${i},${s} 0,0,0 ${n},0`,`a${i},${s} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${s} 0,0,0 ${n},0`,`l0,${-r}`,`M${t},${e+s+a}`,`a${i},${s} 0,0,0 ${n},0`].join(" "),"createCylinderPathD"),DB=m((t,e,n,r,i,s,a)=>[`M${t},${e+s}`,`M${t+n},${e+s}`,`a${i},${s} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${s} 0,0,0 ${n},0`,`l0,${-r}`,`M${t},${e+s+a}`,`a${i},${s} 0,0,0 ${n},0`].join(" "),"createOuterCylinderPathD"),OB=m((t,e,n,r,i,s)=>[`M${t-n/2},${-r/2}`,`a${i},${s} 0,0,0 ${n},0`].join(" "),"createInnerCylinderPathD");async function y0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0),e.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(s.height+c+(e.padding??0),e.height??0),u=h*.1;let f;const{cssStyles:p}=e;if(e.look==="handDrawn"){const d=tt.svg(i),g=DB(0,0,o,h,l,c,u),x=OB(0,c,o,h,l,c),y=et(e,{}),b=d.path(g,y),w=d.path(x,y);i.insert(()=>w,":first-child").attr("class","line"),f=i.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const d=PB(0,0,o,h,l,c,u);f=i.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",de(p)).attr("style",r)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),st(e,f),a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),e.intersect=function(d){const g=Z.rect(e,d),x=g.x-(e.x??0);if(l!=0&&(Math.abs(x)<(e.width??0)/2||Math.abs(x)==(e.width??0)/2&&Math.abs(g.y-(e.y??0))>(e.height??0)/2-c)){let y=c*c*(1-x*x/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(e.y??0)>0&&(y=-y),g.y+=y}return g},i}m(y0,"linedCylinder");async function x0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,h=l+c,{cssStyles:u}=e,f=tt.svg(i),p=et(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Yn(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],g=f.polygon(d.map(y=>[y.x,y.y]),p),x=i.insert(()=>g,":first-child");return x.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",u),r&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",r),x.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(s.x-(s.left??0))},${-l/2+(e.padding??0)-c/2-(s.y-(s.top??0))})`),st(e,x),e.intersect=function(y){return Z.polygon(e,d,y)},i}m(x0,"linedWaveEdgedRect");async function b0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=e,p=tt.svg(i),d=et(e,{}),g=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],x=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=St(g),b=p.path(y,d),w=St(x),v=p.path(w,{...d,fill:"none"}),k=i.insert(()=>v,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",f),r&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",r),a.attr("transform",`translate(${-(s.width/2)-c-(s.x-(s.left??0))}, ${-(s.height/2)+c-(s.y-(s.top??0))})`),st(e,k),e.intersect=function(_){return Z.polygon(e,g,_)},i}m(b0,"multiRect");async function w0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,h=l+c,u=-o/2,f=-h/2,p=5,{cssStyles:d}=e,g=Yn(u-p,f+h+p,u+o-p,f+h+p,c,.8),x=g==null?void 0:g[g.length-1],y=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...g,{x:u+o-p,y:x.y-p},{x:u+o,y:x.y-p},{x:u+o,y:x.y-2*p},{x:u+o+p,y:x.y-2*p},{x:u+o+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+o-p,y:f+p},{x:u+o-p,y:x.y-p},{x:u+o,y:x.y-p},{x:u+o,y:f},{x:u,y:f}],w=tt.svg(i),v=et(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const k=St(y),_=w.path(k,v),A=St(b),O=w.path(A,v),H=i.insert(()=>_,":first-child");return H.insert(()=>O),H.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&H.selectAll("path").attr("style",d),r&&e.look!=="handDrawn"&&H.selectAll("path").attr("style",r),H.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-(s.width/2)-p-(s.x-(s.left??0))}, ${-(s.height/2)+p-c/2-(s.y-(s.top??0))})`),st(e,H),e.intersect=function(N){return Z.polygon(e,y,N)},i}m(w0,"multiWaveEdgedRectangle");async function C0(t,e,{config:{themeVariables:n}}){var y;const{labelStyles:r,nodeStyles:i}=at(e);e.labelStyle=r,e.useHtmlLabels||((y=en().flowchart)==null?void 0:y.htmlLabels)!==!1||(e.centerLabel=!0);const{shapeSvg:a,bbox:o}=await gt(t,e,mt(e)),l=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-l/2,u=-c/2,{cssStyles:f}=e,p=tt.svg(a),d=et(e,{fill:n.noteBkgColor,stroke:n.noteBorderColor});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=p.rectangle(h,u,l,c,d),x=a.insert(()=>g,":first-child");return x.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",i),st(e,x),e.intersect=function(b){return Z.rect(e,b)},a}m(C0,"note");var $B=m((t,e,n)=>[`M${t+n/2},${e}`,`L${t+n},${e-n/2}`,`L${t+n/2},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function v0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=s.width+e.padding,o=s.height+e.padding,l=a+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:u}=e;if(e.look==="handDrawn"){const f=tt.svg(i),p=et(e,{}),d=$B(0,0,l),g=f.path(d,p);h=i.insert(()=>g,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=Pn(i,l,l,c);return r&&h.attr("style",r),st(e,h),e.intersect=function(f){return W.debug(`APA12 Intersect called SPLIT point:`,f,` node: `,e,` -res:`,K.polygon(e,c,f)),K.polygon(e,c,f)},i}g(Uy,"question");async function Yy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),c=-o/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:p}=e,d=Q.svg(i),m=J(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=yt(f),y=d.path(x,m),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),nt(e,b),e.intersect=function(C){return K.polygon(e,f,C)},i}g(Yy,"rect_left_inv_arrow");async function Vy(t,e){var D,q;const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=e.description,c=e.label,h=o.node().appendChild(await Ur(c,e.labelStyle,!0,!0));let u={width:0,height:0};if(Gt((q=(D=_t())==null?void 0:D.flowchart)==null?void 0:q.htmlLabels)){const O=h.children[0],B=kt(h);u=O.getBoundingClientRect(),B.attr("width",u.width),B.attr("height",u.height)}z.info("Text 2",l);const f=l||[],p=h.getBBox(),d=o.node().appendChild(await Ur(f.join?f.join("
    "):f,e.labelStyle,!0,!0)),m=d.children[0],x=kt(d);u=m.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const y=(e.padding||0)/2;kt(d).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+y+5)+")"),kt(h).attr("transform","translate( "+(u.width(z.debug("Rough node insert CXC",P),N),":first-child"),_=a.insert(()=>(z.debug("Rough node insert CXC",P),P),":first-child")}else _=s.insert("rect",":first-child"),F=s.insert("line"),_.attr("class","outer title-state").attr("style",n).attr("x",-u.width/2-y).attr("y",-u.height/2-y).attr("width",u.width+(e.padding||0)).attr("height",u.height+(e.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-y).attr("x2",u.width/2+y).attr("y1",-u.height/2-y+p.height+y).attr("y2",-u.height/2-y+p.height+y);return nt(e,_),e.intersect=function(O){return K.rect(e,O)},a}g(Vy,"rectWithTitle");async function Gy(t,e){const r={rx:5,ry:5,classes:"",labelPaddingX:((e==null?void 0:e.padding)||0)*1,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return Ns(t,e,r)}g(Gy,"roundedRect");async function Xy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=(e==null?void 0:e.padding)??0,l=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:f}=e,p=Q.svg(i),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],x=p.polygon(m.map(b=>[b.x,b.y]),d),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container").attr("style",oe(f)),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),f&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-c/2+(e.padding??0)-(a.y-(a.top??0))})`),nt(e,y),e.intersect=function(b){return K.rect(e,b)},i}g(Xy,"shadedProcess");async function Ky(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=-o/2,h=-l/2,{cssStyles:u}=e,f=Q.svg(i),p=J(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=yt(d),x=f.path(m,p),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),y.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),nt(e,y),e.intersect=function(b){return K.polygon(e,d,b)},i}g(Ky,"slopedRect");async function Zy(t,e){const r={rx:0,ry:0,classes:"",labelPaddingX:((e==null?void 0:e.padding)||0)*2,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return Ns(t,e,r)}g(Zy,"squareRect");async function Qy(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=a.height+e.padding,o=a.width+s/4+e.padding;let l;const{cssStyles:c}=e;if(e.look==="handDrawn"){const h=Q.svg(i),u=J(e,{}),f=mr(-o/2,-s/2,o,s,s/2),p=h.path(f,u);l=i.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",oe(c))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",n).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return nt(e,l),e.intersect=function(h){return K.rect(e,h)},i}g(Qy,"stadium");async function Jy(t,e){return Ns(t,e,{rx:5,ry:5,classes:"flowchart-node"})}g(Jy,"state");function t0(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=it(e);e.labelStyle=n;const{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=Q.svg(c),u=J(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),p=o??l,d=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>d),a&&m.selectAll("path").attr("style",a),i&&m.selectAll("path").attr("style",i),nt(e,m),e.intersect=function(x){return K.circle(e,7,x)},c}g(t0,"stateEnd");function e0(t,e,{config:{themeVariables:r}}){const{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if(e.look==="handDrawn"){const o=Q.svg(i).circle(0,0,14,vA(n));a=i.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return nt(e,a),e.intersect=function(s){return K.circle(e,7,s)},i}g(e0,"stateStart");async function r0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=((e==null?void 0:e.padding)||0)/2,o=a.width+e.padding,l=a.height+e.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){const f=Q.svg(i),p=J(e,{}),d=f.rectangle(c-8,h,o+16,l,p),m=f.line(c,h,c,h+l,p),x=f.line(c+o,h,c+o,h+l,p);i.insert(()=>m,":first-child"),i.insert(()=>x,":first-child");const y=i.insert(()=>d,":first-child"),{cssStyles:b}=e;y.attr("class","basic label-container").attr("style",oe(b)),nt(e,y)}else{const f=yr(i,o,l,u);n&&f.attr("style",n),nt(e,f)}return e.intersect=function(f){return K.polygon(e,u,f)},i}g(r0,"subroutine");async function n0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:f}=e,p=Q.svg(i),d=J(e,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],x=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=yt(m),b=p.path(y,d),C=yt(x),v=p.path(C,{...d,fillStyle:"solid"}),S=i.insert(()=>v,":first-child");return S.insert(()=>b,":first-child"),S.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),nt(e,S),e.intersect=function(_){return K.polygon(e,m,_)},i}g(n0,"taggedRect");async function i0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,h=.2*o,u=.2*l,f=l+c,{cssStyles:p}=e,d=Q.svg(i),m=J(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=[{x:-o/2-o/2*.1,y:f/2},...Lr(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,c,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],y=-o/2+o/2*.1,b=-f/2-u*.4,C=[{x:y+o-h,y:(b+l)*1.4},{x:y+o,y:b+l-u},{x:y+o,y:(b+l)*.9},...Lr(y+o,(b+l)*1.3,y+o-h,(b+l)*1.5,-l*.03,.5)],v=yt(x),S=d.path(v,m),_=yt(C),F=d.path(_,{...m,fillStyle:"solid"}),D=i.insert(()=>F,":first-child");return D.insert(()=>S,":first-child"),D.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),nt(e,D),e.intersect=function(q){return K.polygon(e,x,q)},i}g(i0,"taggedWaveEdgedRectangle");async function a0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=Math.max(a.width+e.padding,(e==null?void 0:e.width)||0),o=Math.max(a.height+e.padding,(e==null?void 0:e.height)||0),l=-s/2,c=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),nt(e,h),e.intersect=function(u){return K.rect(e,u)},i}g(a0,"text");var UA=g((t,e,r,n,i,a)=>`M${t},${e} - a${i},${a} 0,0,1 0,${-n} - l${r},0 - a${i},${a} 0,0,1 0,${n} - M${r},${-n} - a${i},${a} 0,0,0 0,${n} - l${-r},0`,"createCylinderPathD"),YA=g((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),VA=g((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function s0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await ct(t,e,ht(e)),l=e.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:p}=e;let d;if(e.look==="handDrawn"){const m=Q.svg(i),x=YA(0,0,f,c,u,h),y=VA(0,0,f,c,u,h),b=m.path(x,J(e,{})),C=m.path(y,J(e,{fill:"none"}));d=i.insert(()=>C,":first-child"),d=i.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const m=UA(0,0,f,c,u,h);d=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",oe(p)).attr("style",n),d.attr("class","basic label-container"),p&&d.selectAll("path").attr("style",p),n&&d.selectAll("path").attr("style",n)}return d.attr("label-offset-x",u),d.attr("transform",`translate(${-f/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),nt(e,d),e.intersect=function(m){const x=K.rect(e,m),y=x.y-(e.y??0);if(h!=0&&(Math.abs(y)<(e.height??0)/2||Math.abs(y)==(e.height??0)/2&&Math.abs(x.x-(e.x??0))>(e.width??0)/2-u)){let b=u*u*(1-y*y/(h*h));b!=0&&(b=Math.sqrt(b)),b=u-b,m.x-(e.x??0)>0&&(b=-b),x.x+=b}return x},i}g(s0,"tiltedCylinder");async function o0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=Q.svg(i),f=J(e,{}),p=yt(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=yr(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,nt(e,c),e.intersect=function(u){return K.polygon(e,l,u)},i}g(o0,"trapezoid");async function l0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=60,o=20,l=Math.max(s,a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(o,a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=Q.svg(i),f=J(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],d=yt(p),m=u.path(d,f),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),nt(e,x),e.intersect=function(y){return K.polygon(e,p,y)},i}g(l0,"trapezoidalPentagon");async function c0(t,e){var b;const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Gt((b=_t().flowchart)==null?void 0:b.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=e,p=Q.svg(i),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=yt(u),x=p.path(m,d),y=i.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),e.width=l,e.height=c,nt(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(C){return z.info("Triangle intersect",e,u,C),K.polygon(e,u,C)},i}g(c0,"triangle");async function h0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/8,h=l+c,{cssStyles:u}=e,p=70-o,d=p>0?p/2:0,m=Q.svg(i),x=J(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:-o/2-d,y:h/2},...Lr(-o/2-d,h/2,o/2+d,h/2,c,.8),{x:o/2+d,y:-h/2},{x:-o/2-d,y:-h/2}],b=yt(y),C=m.path(b,x),v=i.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",u),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c-(a.y-(a.top??0))})`),nt(e,v),e.intersect=function(S){return K.polygon(e,y,S)},i}g(h0,"waveEdgedRectangle");async function u0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await ct(t,e,ht(e)),s=100,o=50,l=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,s),f=Math.max(f,o);const p=Math.min(f*.2,f/4),d=f+p*2,{cssStyles:m}=e,x=Q.svg(i),y=J(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=[{x:-u/2,y:d/2},...Lr(-u/2,d/2,u/2,d/2,p,1),{x:u/2,y:-d/2},...Lr(u/2,-d/2,-u/2,-d/2,p,-1)],C=yt(b),v=x.path(C,y),S=i.insert(()=>v,":first-child");return S.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),nt(e,S),e.intersect=function(_){return K.polygon(e,b,_)},i}g(u0,"waveRectangle");async function f0(t,e){const{labelStyles:r,nodeStyles:n}=it(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await ct(t,e,ht(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=e,p=Q.svg(i),d=J(e,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],x=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c} +res:`,Z.polygon(e,c,f)),Z.polygon(e,c,f)},i}m(v0,"question");async function _0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0),(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0),(e==null?void 0:e.height)??0),c=-o/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:p}=e,d=tt.svg(i),g=et(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=St(f),y=d.path(x,g),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",p),r&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",r),b.attr("transform",`translate(${-u/2},0)`),a.attr("transform",`translate(${-u/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),st(e,b),e.intersect=function(w){return Z.polygon(e,f,w)},i}m(_0,"rect_left_inv_arrow");async function k0(t,e){var O,H;const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),a=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",r),l=e.description,c=e.label,h=o.node().appendChild(await fr(c,e.labelStyle,!0,!0));let u={width:0,height:0};if(te((H=(O=Lt())==null?void 0:O.flowchart)==null?void 0:H.htmlLabels)){const N=h.children[0],M=At(h);u=N.getBoundingClientRect(),M.attr("width",u.width),M.attr("height",u.height)}W.info("Text 2",l);const f=l||[],p=h.getBBox(),d=o.node().appendChild(await fr(f.join?f.join("
    "):f,e.labelStyle,!0,!0)),g=d.children[0],x=At(d);u=g.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const y=(e.padding||0)/2;At(d).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+y+5)+")"),At(h).attr("transform","translate( "+(u.width(W.debug("Rough node insert CXC",$),z),":first-child"),_=s.insert(()=>(W.debug("Rough node insert CXC",$),$),":first-child")}else _=a.insert("rect",":first-child"),A=a.insert("line"),_.attr("class","outer title-state").attr("style",r).attr("x",-u.width/2-y).attr("y",-u.height/2-y).attr("width",u.width+(e.padding||0)).attr("height",u.height+(e.padding||0)),A.attr("class","divider").attr("x1",-u.width/2-y).attr("x2",u.width/2+y).attr("y1",-u.height/2-y+p.height+y).attr("y2",-u.height/2-y+p.height+y);return st(e,_),e.intersect=function(N){return Z.rect(e,N)},s}m(k0,"rectWithTitle");async function S0(t,e){const n={rx:5,ry:5,classes:"",labelPaddingX:((e==null?void 0:e.padding)||0)*1,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return Eo(t,e,n)}m(S0,"roundedRect");async function T0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=(e==null?void 0:e.padding)??0,l=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-s.width/2-o,u=-s.height/2-o,{cssStyles:f}=e,p=tt.svg(i),d=et(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],x=p.polygon(g.map(b=>[b.x,b.y]),d),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container").attr("style",de(f)),r&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",r),f&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",r),a.attr("transform",`translate(${-l/2+4+(e.padding??0)-(s.x-(s.left??0))},${-c/2+(e.padding??0)-(s.y-(s.top??0))})`),st(e,y),e.intersect=function(b){return Z.rect(e,b)},i}m(T0,"shadedProcess");async function E0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=-o/2,h=-l/2,{cssStyles:u}=e,f=tt.svg(i),p=et(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],g=St(d),x=f.path(g,p),y=i.insert(()=>x,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),r&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",r),y.attr("transform",`translate(0, ${l/4})`),a.attr("transform",`translate(${-o/2+(e.padding??0)-(s.x-(s.left??0))}, ${-l/4+(e.padding??0)-(s.y-(s.top??0))})`),st(e,y),e.intersect=function(b){return Z.polygon(e,d,b)},i}m(E0,"slopedRect");async function A0(t,e){const n={rx:0,ry:0,classes:"",labelPaddingX:((e==null?void 0:e.padding)||0)*2,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return Eo(t,e,n)}m(A0,"squareRect");async function L0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=s.height+e.padding,o=s.width+a/4+e.padding;let l;const{cssStyles:c}=e;if(e.look==="handDrawn"){const h=tt.svg(i),u=et(e,{}),f=Rn(-o/2,-a/2,o,a,a/2),p=h.path(f,u);l=i.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",de(c))}else l=i.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",r).attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return st(e,l),e.intersect=function(h){return Z.rect(e,h)},i}m(L0,"stadium");async function M0(t,e){return Eo(t,e,{rx:5,ry:5,classes:"flowchart-node"})}m(M0,"state");function B0(t,e,{config:{themeVariables:n}}){const{labelStyles:r,nodeStyles:i}=at(e);e.labelStyle=r;const{cssStyles:s}=e,{lineColor:a,stateBorder:o,nodeBorder:l}=n,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),h=tt.svg(c),u=et(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:a,strokeWidth:2}),p=o??l,d=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),g=c.insert(()=>f,":first-child");return g.insert(()=>d),s&&g.selectAll("path").attr("style",s),i&&g.selectAll("path").attr("style",i),st(e,g),e.intersect=function(x){return Z.circle(e,7,x)},c}m(B0,"stateEnd");function I0(t,e,{config:{themeVariables:n}}){const{lineColor:r}=n,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if(e.look==="handDrawn"){const o=tt.svg(i).circle(0,0,14,xB(r));s=i.insert(()=>o),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else s=i.insert("circle",":first-child"),s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return st(e,s),e.intersect=function(a){return Z.circle(e,7,a)},i}m(I0,"stateStart");async function F0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=((e==null?void 0:e.padding)||0)/2,o=s.width+e.padding,l=s.height+e.padding,c=-s.width/2-a,h=-s.height/2-a,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){const f=tt.svg(i),p=et(e,{}),d=f.rectangle(c-8,h,o+16,l,p),g=f.line(c,h,c,h+l,p),x=f.line(c+o,h,c+o,h+l,p);i.insert(()=>g,":first-child"),i.insert(()=>x,":first-child");const y=i.insert(()=>d,":first-child"),{cssStyles:b}=e;y.attr("class","basic label-container").attr("style",de(b)),st(e,y)}else{const f=Pn(i,o,l,u);r&&f.attr("style",r),st(e,f)}return e.intersect=function(f){return Z.polygon(e,u,f)},i}m(F0,"subroutine");async function R0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),o=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=-a/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:f}=e,p=tt.svg(i),d=et(e,{}),g=[{x:l-h/2,y:c},{x:l+a+h/2,y:c},{x:l+a+h/2,y:c+o},{x:l-h/2,y:c+o}],x=[{x:l+a-h/2,y:c+o},{x:l+a+h/2,y:c+o},{x:l+a+h/2,y:c+o-u}];e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=St(g),b=p.path(y,d),w=St(x),v=p.path(w,{...d,fillStyle:"solid"}),k=i.insert(()=>v,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",f),r&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",r),st(e,k),e.intersect=function(_){return Z.polygon(e,g,_)},i}m(R0,"taggedRect");async function P0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,h=.2*o,u=.2*l,f=l+c,{cssStyles:p}=e,d=tt.svg(i),g=et(e,{});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=[{x:-o/2-o/2*.1,y:f/2},...Yn(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,c,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],y=-o/2+o/2*.1,b=-f/2-u*.4,w=[{x:y+o-h,y:(b+l)*1.4},{x:y+o,y:b+l-u},{x:y+o,y:(b+l)*.9},...Yn(y+o,(b+l)*1.3,y+o-h,(b+l)*1.5,-l*.03,.5)],v=St(x),k=d.path(v,g),_=St(w),A=d.path(_,{...g,fillStyle:"solid"}),O=i.insert(()=>A,":first-child");return O.insert(()=>k,":first-child"),O.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",p),r&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",r),O.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-o/2+(e.padding??0)-(s.x-(s.left??0))},${-l/2+(e.padding??0)-c/2-(s.y-(s.top??0))})`),st(e,O),e.intersect=function(H){return Z.polygon(e,x,H)},i}m(P0,"taggedWaveEdgedRectangle");async function D0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=Math.max(s.width+e.padding,(e==null?void 0:e.width)||0),o=Math.max(s.height+e.padding,(e==null?void 0:e.height)||0),l=-a/2,c=-o/2,h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",r).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",o),st(e,h),e.intersect=function(u){return Z.rect(e,u)},i}m(D0,"text");var NB=m((t,e,n,r,i,s)=>`M${t},${e} + a${i},${s} 0,0,1 0,${-r} + l${n},0 + a${i},${s} 0,0,1 0,${r} + M${n},${-r} + a${i},${s} 0,0,0 0,${r} + l${-n},0`,"createCylinderPathD"),zB=m((t,e,n,r,i,s)=>[`M${t},${e}`,`M${t+n},${e}`,`a${i},${s} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${s} 0,0,0 0,${r}`,`l${n},0`].join(" "),"createOuterCylinderPathD"),jB=m((t,e,n,r,i,s)=>[`M${t+n/2},${-r/2}`,`a${i},${s} 0,0,0 0,${r}`].join(" "),"createInnerCylinderPathD");async function O0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a,halfPadding:o}=await gt(t,e,mt(e)),l=e.look==="neo"?o*2:o,c=s.height+l,h=c/2,u=h/(2.5+c/50),f=s.width+u+l,{cssStyles:p}=e;let d;if(e.look==="handDrawn"){const g=tt.svg(i),x=zB(0,0,f,c,u,h),y=jB(0,0,f,c,u,h),b=g.path(x,et(e,{})),w=g.path(y,et(e,{fill:"none"}));d=i.insert(()=>w,":first-child"),d=i.insert(()=>b,":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const g=NB(0,0,f,c,u,h);d=i.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",de(p)).attr("style",r),d.attr("class","basic label-container"),p&&d.selectAll("path").attr("style",p),r&&d.selectAll("path").attr("style",r)}return d.attr("label-offset-x",u),d.attr("transform",`translate(${-f/2}, ${c/2} )`),a.attr("transform",`translate(${-(s.width/2)-u-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),st(e,d),e.intersect=function(g){const x=Z.rect(e,g),y=x.y-(e.y??0);if(h!=0&&(Math.abs(y)<(e.height??0)/2||Math.abs(y)==(e.height??0)/2&&Math.abs(x.x-(e.x??0))>(e.width??0)/2-u)){let b=u*u*(1-y*y/(h*h));b!=0&&(b=Math.sqrt(b)),b=u-b,g.x-(e.x??0)>0&&(b=-b),x.x+=b}return x},i}m(O0,"tiltedCylinder");async function $0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=s.width+e.padding,o=s.height+e.padding,l=[{x:-3*o/6,y:0},{x:a+3*o/6,y:0},{x:a,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=e;if(e.look==="handDrawn"){const u=tt.svg(i),f=et(e,{}),p=St(l),d=u.path(p,f);c=i.insert(()=>d,":first-child").attr("transform",`translate(${-a/2}, ${o/2})`),h&&c.attr("style",h)}else c=Pn(i,a,o,l);return r&&c.attr("style",r),e.width=a,e.height=o,st(e,c),e.intersect=function(u){return Z.polygon(e,l,u)},i}m($0,"trapezoid");async function N0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=60,o=20,l=Math.max(a,s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(o,s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),{cssStyles:h}=e,u=tt.svg(i),f=et(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],d=St(p),g=u.path(d,f),x=i.insert(()=>g,":first-child");return x.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),r&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",r),st(e,x),e.intersect=function(y){return Z.polygon(e,p,y)},i}m(N0,"trapezoidalPentagon");async function z0(t,e){var b;const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=te((b=Lt().flowchart)==null?void 0:b.htmlLabels),l=s.width+(e.padding??0),c=l+s.height,h=l+s.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=e,p=tt.svg(i),d=et(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=St(u),x=p.path(g,d),y=i.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",f),r&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",r),e.width=l,e.height=c,st(e,y),a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${c/2-(s.height+(e.padding??0)/(o?2:1)-(s.y-(s.top??0)))})`),e.intersect=function(w){return W.info("Triangle intersect",e,u,w),Z.polygon(e,u,w)},i}m(z0,"triangle");async function j0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/8,h=l+c,{cssStyles:u}=e,p=70-o,d=p>0?p/2:0,g=tt.svg(i),x=et(e,{});e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:-o/2-d,y:h/2},...Yn(-o/2-d,h/2,o/2+d,h/2,c,.8),{x:o/2+d,y:-h/2},{x:-o/2-d,y:-h/2}],b=St(y),w=g.path(b,x),v=i.insert(()=>w,":first-child");return v.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",u),r&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",r),v.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-o/2+(e.padding??0)-(s.x-(s.left??0))},${-l/2+(e.padding??0)-c-(s.y-(s.top??0))})`),st(e,v),e.intersect=function(k){return Z.polygon(e,y,k)},i}m(j0,"waveEdgedRectangle");async function q0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=await gt(t,e,mt(e)),a=100,o=50,l=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,a),f=Math.max(f,o);const p=Math.min(f*.2,f/4),d=f+p*2,{cssStyles:g}=e,x=tt.svg(i),y=et(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=[{x:-u/2,y:d/2},...Yn(-u/2,d/2,u/2,d/2,p,1),{x:u/2,y:-d/2},...Yn(u/2,-d/2,-u/2,-d/2,p,-1)],w=St(b),v=x.path(w,y),k=i.insert(()=>v,":first-child");return k.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",g),r&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",r),st(e,k),e.intersect=function(_){return Z.polygon(e,b,_)},i}m(q0,"waveRectangle");async function H0(t,e){const{labelStyles:n,nodeStyles:r}=at(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,label:a}=await gt(t,e,mt(e)),o=Math.max(s.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(s.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=e,p=tt.svg(i),d=et(e,{}),g=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],x=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c} M${h-c},${u} L${h+o},${u} - M${h},${u-c} L${h},${u+l}`;e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=p.path(x,d),b=i.insert(()=>y,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),nt(e,b),e.intersect=function(C){return K.polygon(e,m,C)},i}g(f0,"windowPane");async function p0(t,e,r,n,i=r.class.padding??12){const a=n?0:3,s=t.insert("g").attr("class",ht(e)).attr("id",e.domId||e.id);let o=null,l=null,c=null,h=null,u=0,f=0,p=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const b=e.annotations[0];await xi(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await xi(l,e,0,["font-weight: bolder"]);const d=l.node().getBBox();f=d.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of e.members){const C=await xi(c,b,m,[b.parseClassifier()]);m+=C+a}p=c.node().getBBox().height,p<=0&&(p=i/2),h=s.insert("g").attr("class","methods-group text");let x=0;for(const b of e.methods){const C=await xi(h,b,x,[b.parseClassifier()]);x+=C+a}let y=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-d.width/2}, ${u})`),y=s.node().getBBox(),c.attr("transform",`translate(0, ${u+f+i*2})`),y=s.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(p?p+i*4:i*2)})`),y=s.node().getBBox(),{shapeSvg:s,bbox:y}}g(p0,"textHelper");async function xi(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=Ne();let s="useHtmlLabels"in e?e.useHtmlLabels:Gt(a.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Mn(o)&&(s=!0);const l=await Wn(i,Bp(Hn(o)),{width:Dn(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],f=kt(l);h=u.innerHTML.split("
    ").length,u.innerHTML.includes("")&&(h+=u.innerHTML.split("").length-1);const p=u.getElementsByTagName("img");if(p){const d=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(x=>{function y(){var b;if(m.style.display="flex",m.style.flexDirection="column",d){const C=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,S=parseInt(C,10)*5+"px";m.style.minWidth=S,m.style.maxWidth=S}else m.style.width="100%";x(m)}g(y,"setupImage"),setTimeout(()=>{m.complete&&y()}),m.addEventListener("error",y),m.addEventListener("load",y)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{n.includes("font-weight: bolder")&&kt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return i.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(xi,"addText");async function d0(t,e){var q,O;const r=_t(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??Gt(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await p0(t,e,r,a,i),{labelStyles:c,nodeStyles:h}=it(e);e.labelStyle=c,e.cssStyles=s.styles||"";const u=((q=s.styles)==null?void 0:q.join(";"))||h||"";e.cssStyles||(e.cssStyles=u.replaceAll("!important","").split(";"));const f=s.members.length===0&&s.methods.length===0&&!((O=r.class)!=null&&O.hideEmptyMembersBox),p=Q.svg(o),d=J(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=l.width;let x=l.height;s.members.length===0&&s.methods.length===0?x+=i:s.members.length>0&&s.methods.length===0&&(x+=i*2);const y=-m/2,b=-x/2,C=p.rectangle(y-n,b-n-(f?n:s.members.length===0&&s.methods.length===0?-n/2:0),m+2*n,x+2*n+(f?n*2:s.members.length===0&&s.methods.length===0?-n:0),d),v=o.insert(()=>C,":first-child");v.attr("class","basic label-container");const S=v.node().getBBox();o.selectAll(".text").each((B,P,N)=>{var V;const L=kt(N[P]),T=L.attr("transform");let A=0;if(T){const G=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(T);G&&(A=parseFloat(G[2]))}let $=A+b+n-(f?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||($-=4);let I=y;(L.attr("class").includes("label-group")||L.attr("class").includes("annotation-group"))&&(I=-((V=L.node())==null?void 0:V.getBBox().width)/2||0,o.selectAll("text").each(function(w,G,dt){window.getComputedStyle(dt[G]).textAnchor==="middle"&&(I=0)})),L.attr("transform",`translate(${I}, ${$})`)});const _=o.select(".annotation-group").node().getBBox().height-(f?n/2:0)||0,F=o.select(".label-group").node().getBBox().height-(f?n/2:0)||0,D=o.select(".members-group").node().getBBox().height-(f?n/2:0)||0;if(s.members.length>0||s.methods.length>0||f){const B=p.line(S.x,_+F+b+n,S.x+S.width,_+F+b+n,d);o.insert(()=>B).attr("class","divider").attr("style",u)}if(f||s.members.length>0||s.methods.length>0){const B=p.line(S.x,_+F+D+b+i*2+n,S.x+S.width,_+F+D+b+n+i*2,d);o.insert(()=>B).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",u),!a){const B=RegExp(/color\s*:\s*([^;]*)/),P=B.exec(u);if(P){const N=P[0].replace("color","fill");o.selectAll("tspan").attr("style",N)}else if(c){const N=B.exec(c);if(N){const L=N[0].replace("color","fill");o.selectAll("tspan").attr("style",L)}}}return nt(e,v),e.intersect=function(B){return K.rect(e,B)},o}g(d0,"classBox");var GA=g(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function g0(t,e,{config:r}){var P,N;const{labelStyles:n,nodeStyles:i}=it(e);e.labelStyle=n||"";const a=10,s=e.width;e.width=(e.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await ct(t,e,ht(e)),h=e.padding||10;let u="",f;"ticket"in e&&e.ticket&&((P=r==null?void 0:r.kanban)!=null&&P.ticketBaseUrl)&&(u=(N=r==null?void 0:r.kanban)==null?void 0:N.ticketBaseUrl.replace("#TICKET#",e.ticket),f=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let d,m;f?{label:d,bbox:m}=await yo(f,"ticket"in e&&e.ticket||"",p):{label:d,bbox:m}=await yo(o,"ticket"in e&&e.ticket||"",p);const{label:x,bbox:y}=await yo(o,"assigned"in e&&e.assigned||"",p);e.width=s;const b=10,C=(e==null?void 0:e.width)||0,v=Math.max(m.height,y.height)/2,S=Math.max(l.height+b*2,(e==null?void 0:e.height)||0)+v,_=-C/2,F=-S/2;c.attr("transform","translate("+(h-C/2)+", "+(-v-l.height/2)+")"),d.attr("transform","translate("+(h-C/2)+", "+(-v+l.height/2)+")"),x.attr("transform","translate("+(h+C/2-y.width-2*a)+", "+(-v+l.height/2)+")");let D;const{rx:q,ry:O}=e,{cssStyles:B}=e;if(e.look==="handDrawn"){const L=Q.svg(o),T=J(e,{}),A=q||O?L.path(mr(_,F,C,S,q||0),T):L.rectangle(_,F,C,S,T);D=o.insert(()=>A,":first-child"),D.attr("class","basic label-container").attr("style",B||null)}else{D=o.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",i).attr("rx",q??5).attr("ry",O??5).attr("x",_).attr("y",F).attr("width",C).attr("height",S);const L="priority"in e&&e.priority;if(L){const T=o.append("line"),A=_+2,$=F+Math.floor((q??0)/2),I=F+S-Math.floor((q??0)/2);T.attr("x1",A).attr("y1",$).attr("x2",A).attr("y2",I).attr("stroke-width","4").attr("stroke",GA(L))}}return nt(e,D),e.height=S,e.intersect=function(L){return K.rect(e,L)},o}g(g0,"kanbanItem");var XA=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Zy},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Gy},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Qy},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:r0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Cy},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:dy},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Uy},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Ay},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Oy},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Py},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:o0},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ry},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:_y},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:a0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:fy},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Xy},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:e0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:t0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Ty},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ly},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:yy},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:xy},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:by},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ny},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:h0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Ey},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:s0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:zy},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:wy},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ky},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:c0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:f0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:vy},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:l0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Sy},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ky},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Wy},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Hy},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:uy},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:my},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:i0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:n0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:u0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Yy},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:qy}],KA=g(()=>{const e=[...Object.entries({state:Jy,choice:py,note:jy,rectWithTitle:Vy,labelRect:Dy,iconSquare:Iy,iconCircle:My,icon:By,iconRounded:Fy,imageSquare:$y,anchor:hy,kanbanItem:g0,classBox:d0}),...XA.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),m0=KA();function ZA(t){return t in m0}g(ZA,"isValidShape");var zs=new Map;async function y0(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?m0[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),zs.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}g(y0,"insertNode");var X3=g((t,e)=>{zs.set(e.id,t)},"setNodeElem"),K3=g(()=>{zs.clear()},"clear"),Z3=g(t=>{const e=zs.get(t.id);z.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode"),Le={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function bi(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=It(t),e=It(e);const[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}g(bi,"calculateDeltaAndAngle");var It=g(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),QA=g(t=>({x:g(function(e,r,n){let i=0;const a=It(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Le,t.arrowTypeEnd)){const{angle:p,deltaX:d}=bi(n[n.length-1],n[n.length-2]);i=Le[t.arrowTypeEnd]*Math.cos(p)*(d>=0?1:-1)}const s=Math.abs(It(e).x-It(n[n.length-1]).x),o=Math.abs(It(e).y-It(n[n.length-1]).y),l=Math.abs(It(e).x-It(n[0]).x),c=Math.abs(It(e).y-It(n[0]).y),h=Le[t.arrowTypeStart],u=Le[t.arrowTypeEnd],f=1;if(s0&&o0&&c=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Le,t.arrowTypeEnd)){const{angle:p,deltaY:d}=bi(n[n.length-1],n[n.length-2]);i=Le[t.arrowTypeEnd]*Math.abs(Math.sin(p))*(d>=0?1:-1)}const s=Math.abs(It(e).y-It(n[n.length-1]).y),o=Math.abs(It(e).x-It(n[n.length-1]).x),l=Math.abs(It(e).y-It(n[0]).y),c=Math.abs(It(e).x-It(n[0]).x),h=Le[t.arrowTypeStart],u=Le[t.arrowTypeEnd],f=1;if(s0&&o0&&c{e.arrowTypeStart&&Wu(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&Wu(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),tL={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Wu=g((t,e,r,n,i,a)=>{const s=tL[r];if(!s){z.warn(`Unknown arrow type: ${r}`);return}const o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${i}_${a}-${s}${o})`)},"addEdgeMarker"),fs=new Map,Yt=new Map,Q3=g(()=>{fs.clear(),Yt.clear()},"clear"),ui=g(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),eL=g(async(t,e)=>{let r=Gt(_t().flowchart.htmlLabels);const n=await Wn(t,e.label,{style:ui(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});z.info("abc82",e,e.labelType);const i=t.insert("g").attr("class","edgeLabel"),a=i.insert("g").attr("class","label");a.node().appendChild(n);let s=n.getBBox();if(r){const l=n.children[0],c=kt(n);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),fs.set(e.id,i),e.width=s.width,e.height=s.height;let o;if(e.startLabelLeft){const l=await Ur(e.startLabelLeft,ui(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Yt.get(e.id)||Yt.set(e.id,{}),Yt.get(e.id).startLeft=c,wi(o,e.startLabelLeft)}if(e.startLabelRight){const l=await Ur(e.startLabelRight,ui(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Yt.get(e.id)||Yt.set(e.id,{}),Yt.get(e.id).startRight=c,wi(o,e.startLabelRight)}if(e.endLabelLeft){const l=await Ur(e.endLabelLeft,ui(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Yt.get(e.id)||Yt.set(e.id,{}),Yt.get(e.id).endLeft=c,wi(o,e.endLabelLeft)}if(e.endLabelRight){const l=await Ur(e.endLabelRight,ui(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Yt.get(e.id)||Yt.set(e.id,{}),Yt.get(e.id).endRight=c,wi(o,e.endLabelRight)}return n},"insertEdgeLabel");function wi(t,e){_t().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}g(wi,"setTerminalWidth");var rL=g((t,e)=>{z.debug("Moving label abc88 ",t.id,t.label,fs.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=_t(),{subGraphTitleTotalMargin:i}=sc(n);if(t.label){const a=fs.get(t.id);let s=t.x,o=t.y;if(r){const l=Ve.calcLabelPosition(r);z.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){const a=Yt.get(t.id).startLeft;let s=t.x,o=t.y;if(r){const l=Ve.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){const a=Yt.get(t.id).startRight;let s=t.x,o=t.y;if(r){const l=Ve.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){const a=Yt.get(t.id).endLeft;let s=t.x,o=t.y;if(r){const l=Ve.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){const a=Yt.get(t.id).endRight;let s=t.x,o=t.y;if(r){const l=Ve.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),nL=g((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),iL=g((t,e,r)=>{z.debug(`intersection calc abc89: + M${h},${u-c} L${h},${u+l}`;e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=p.path(x,d),b=i.insert(()=>y,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",f),r&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",r),a.attr("transform",`translate(${-(s.width/2)+c/2-(s.x-(s.left??0))}, ${-(s.height/2)+c/2-(s.y-(s.top??0))})`),st(e,b),e.intersect=function(w){return Z.polygon(e,g,w)},i}m(H0,"windowPane");async function W0(t,e,n,r,i=n.class.padding??12){const s=r?0:3,a=t.insert("g").attr("class",mt(e)).attr("id",e.domId||e.id);let o=null,l=null,c=null,h=null,u=0,f=0,p=0;if(o=a.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const b=e.annotations[0];await Ui(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Ui(l,e,0,["font-weight: bolder"]);const d=l.node().getBBox();f=d.height,c=a.insert("g").attr("class","members-group text");let g=0;for(const b of e.members){const w=await Ui(c,b,g,[b.parseClassifier()]);g+=w+s}p=c.node().getBBox().height,p<=0&&(p=i/2),h=a.insert("g").attr("class","methods-group text");let x=0;for(const b of e.methods){const w=await Ui(h,b,x,[b.parseClassifier()]);x+=w+s}let y=a.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-d.width/2}, ${u})`),y=a.node().getBBox(),c.attr("transform",`translate(0, ${u+f+i*2})`),y=a.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(p?p+i*4:i*2)})`),y=a.node().getBBox(),{shapeSvg:a,bbox:y}}m(W0,"textHelper");async function Ui(t,e,n,r=[]){const i=t.insert("g").attr("class","label").attr("style",r.join("; ")),s=en();let a="useHtmlLabels"in e?e.useHtmlLabels:te(s.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!a&&o.startsWith("\\")&&(o=o.substring(1)),Jr(o)&&(a=!0);const l=await pi(i,og(fi(o)),{width:ii(o,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,h=1;if(a){const u=l.children[0],f=At(l);h=u.innerHTML.split("
    ").length,u.innerHTML.includes("")&&(h+=u.innerHTML.split("").length-1);const p=u.getElementsByTagName("img");if(p){const d=o.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(g=>new Promise(x=>{function y(){var b;if(g.style.display="flex",g.style.flexDirection="column",d){const w=((b=s.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,k=parseInt(w,10)*5+"px";g.style.minWidth=k,g.style.maxWidth=k}else g.style.width="100%";x(g)}m(y,"setupImage"),setTimeout(()=>{g.complete&&y()}),g.addEventListener("error",y),g.addEventListener("load",y)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{r.includes("font-weight: bolder")&&At(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return i.attr("transform","translate(0,"+(-c.height/(2*h)+n)+")"),c.height}m(Ui,"addText");async function U0(t,e){var H,N;const n=Lt(),r=n.class.padding??12,i=r,s=e.useHtmlLabels??te(n.htmlLabels)??!0,a=e;a.annotations=a.annotations??[],a.members=a.members??[],a.methods=a.methods??[];const{shapeSvg:o,bbox:l}=await W0(t,e,n,s,i),{labelStyles:c,nodeStyles:h}=at(e);e.labelStyle=c,e.cssStyles=a.styles||"";const u=((H=a.styles)==null?void 0:H.join(";"))||h||"";e.cssStyles||(e.cssStyles=u.replaceAll("!important","").split(";"));const f=a.members.length===0&&a.methods.length===0&&!((N=n.class)!=null&&N.hideEmptyMembersBox),p=tt.svg(o),d=et(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l.width;let x=l.height;a.members.length===0&&a.methods.length===0?x+=i:a.members.length>0&&a.methods.length===0&&(x+=i*2);const y=-g/2,b=-x/2,w=p.rectangle(y-r,b-r-(f?r:a.members.length===0&&a.methods.length===0?-r/2:0),g+2*r,x+2*r+(f?r*2:a.members.length===0&&a.methods.length===0?-r:0),d),v=o.insert(()=>w,":first-child");v.attr("class","basic label-container");const k=v.node().getBBox();o.selectAll(".text").each((M,$,z)=>{var j;const R=At(z[$]),I=R.attr("transform");let E=0;if(I){const Y=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(I);Y&&(E=parseFloat(Y[2]))}let D=E+b+r-(f?r:a.members.length===0&&a.methods.length===0?-r/2:0);s||(D-=4);let T=y;(R.attr("class").includes("label-group")||R.attr("class").includes("annotation-group"))&&(T=-((j=R.node())==null?void 0:j.getBBox().width)/2||0,o.selectAll("text").each(function(C,Y,Q){window.getComputedStyle(Q[Y]).textAnchor==="middle"&&(T=0)})),R.attr("transform",`translate(${T}, ${D})`)});const _=o.select(".annotation-group").node().getBBox().height-(f?r/2:0)||0,A=o.select(".label-group").node().getBBox().height-(f?r/2:0)||0,O=o.select(".members-group").node().getBBox().height-(f?r/2:0)||0;if(a.members.length>0||a.methods.length>0||f){const M=p.line(k.x,_+A+b+r,k.x+k.width,_+A+b+r,d);o.insert(()=>M).attr("class","divider").attr("style",u)}if(f||a.members.length>0||a.methods.length>0){const M=p.line(k.x,_+A+O+b+i*2+r,k.x+k.width,_+A+O+b+r+i*2,d);o.insert(()=>M).attr("class","divider").attr("style",u)}if(a.look!=="handDrawn"&&o.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",u),!s){const M=RegExp(/color\s*:\s*([^;]*)/),$=M.exec(u);if($){const z=$[0].replace("color","fill");o.selectAll("tspan").attr("style",z)}else if(c){const z=M.exec(c);if(z){const R=z[0].replace("color","fill");o.selectAll("tspan").attr("style",R)}}}return st(e,v),e.intersect=function(M){return Z.rect(e,M)},o}m(U0,"classBox");var qB=m(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function V0(t,e,{config:n}){var $,z;const{labelStyles:r,nodeStyles:i}=at(e);e.labelStyle=r||"";const s=10,a=e.width;e.width=(e.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await gt(t,e,mt(e)),h=e.padding||10;let u="",f;"ticket"in e&&e.ticket&&(($=n==null?void 0:n.kanban)!=null&&$.ticketBaseUrl)&&(u=(z=n==null?void 0:n.kanban)==null?void 0:z.ticketBaseUrl.replace("#TICKET#",e.ticket),f=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let d,g;f?{label:d,bbox:g}=await hl(f,"ticket"in e&&e.ticket||"",p):{label:d,bbox:g}=await hl(o,"ticket"in e&&e.ticket||"",p);const{label:x,bbox:y}=await hl(o,"assigned"in e&&e.assigned||"",p);e.width=a;const b=10,w=(e==null?void 0:e.width)||0,v=Math.max(g.height,y.height)/2,k=Math.max(l.height+b*2,(e==null?void 0:e.height)||0)+v,_=-w/2,A=-k/2;c.attr("transform","translate("+(h-w/2)+", "+(-v-l.height/2)+")"),d.attr("transform","translate("+(h-w/2)+", "+(-v+l.height/2)+")"),x.attr("transform","translate("+(h+w/2-y.width-2*s)+", "+(-v+l.height/2)+")");let O;const{rx:H,ry:N}=e,{cssStyles:M}=e;if(e.look==="handDrawn"){const R=tt.svg(o),I=et(e,{}),E=H||N?R.path(Rn(_,A,w,k,H||0),I):R.rectangle(_,A,w,k,I);O=o.insert(()=>E,":first-child"),O.attr("class","basic label-container").attr("style",M||null)}else{O=o.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",i).attr("rx",H??5).attr("ry",N??5).attr("x",_).attr("y",A).attr("width",w).attr("height",k);const R="priority"in e&&e.priority;if(R){const I=o.append("line"),E=_+2,D=A+Math.floor((H??0)/2),T=A+k-Math.floor((H??0)/2);I.attr("x1",E).attr("y1",D).attr("x2",E).attr("y2",T).attr("stroke-width","4").attr("stroke",qB(R))}}return st(e,O),e.height=k,e.intersect=function(R){return Z.rect(e,R)},o}m(V0,"kanbanItem");var HB=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:A0},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:S0},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:L0},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:F0},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Qx},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Ux},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:v0},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:s0},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:g0},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:d0},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:$0},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:f0},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:t0},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:D0},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Hx},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:T0},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:I0},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:B0},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:r0},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:a0},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Gx},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Xx},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Kx},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:m0},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:j0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:i0},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:O0},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:y0},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Zx},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Jx},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:z0},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:H0},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:e0},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:N0},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:n0},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:E0},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:w0},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:b0},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:qx},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Yx},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:P0},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:R0},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:q0},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:_0},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:x0}],WB=m(()=>{const e=[...Object.entries({state:M0,choice:Wx,note:C0,rectWithTitle:k0,labelRect:p0,iconSquare:h0,iconCircle:l0,icon:o0,iconRounded:c0,imageSquare:u0,anchor:jx,kanbanItem:V0,classBox:U0}),...HB.flatMap(n=>[n.shortName,..."aliases"in n?n.aliases:[],..."internalAliases"in n?n.internalAliases:[]].map(i=>[i,n.handler]))];return Object.fromEntries(e)},"generateShapeMap"),Y0=WB();function UB(t){return t in Y0}m(UB,"isValidShape");var Ao=new Map;async function G0(t,e,n){let r,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const s=e.shape?Y0[e.shape]:void 0;if(!s)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let a;n.config.securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a??null),i=await s(r,e,n)}else i=await s(t,e,n),r=i;return e.tooltip&&i.attr("title",e.tooltip),Ao.set(e.id,r),e.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}m(G0,"insertNode");var F4=m((t,e)=>{Ao.set(e.id,t)},"setNodeElem"),R4=m(()=>{Ao.clear()},"clear"),P4=m(t=>{const e=Ao.get(t.id);W.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const n=8,r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-n)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode"),je={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function Vi(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=jt(t),e=jt(e);const[n,r]=[t.x,t.y],[i,s]=[e.x,e.y],a=i-n,o=s-r;return{angle:Math.atan(o/a),deltaX:a,deltaY:o}}m(Vi,"calculateDeltaAndAngle");var jt=m(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),VB=m(t=>({x:m(function(e,n,r){let i=0;const s=jt(r[0]).x=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(je,t.arrowTypeEnd)){const{angle:p,deltaX:d}=Vi(r[r.length-1],r[r.length-2]);i=je[t.arrowTypeEnd]*Math.cos(p)*(d>=0?1:-1)}const a=Math.abs(jt(e).x-jt(r[r.length-1]).x),o=Math.abs(jt(e).y-jt(r[r.length-1]).y),l=Math.abs(jt(e).x-jt(r[0]).x),c=Math.abs(jt(e).y-jt(r[0]).y),h=je[t.arrowTypeStart],u=je[t.arrowTypeEnd],f=1;if(a0&&o0&&c=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(je,t.arrowTypeEnd)){const{angle:p,deltaY:d}=Vi(r[r.length-1],r[r.length-2]);i=je[t.arrowTypeEnd]*Math.abs(Math.sin(p))*(d>=0?1:-1)}const a=Math.abs(jt(e).y-jt(r[r.length-1]).y),o=Math.abs(jt(e).x-jt(r[r.length-1]).x),l=Math.abs(jt(e).y-jt(r[0]).y),c=Math.abs(jt(e).x-jt(r[0]).x),h=je[t.arrowTypeStart],u=je[t.arrowTypeEnd],f=1;if(a0&&o0&&c{e.arrowTypeStart&&hp(t,"start",e.arrowTypeStart,n,r,i),e.arrowTypeEnd&&hp(t,"end",e.arrowTypeEnd,n,r,i)},"addEdgeMarkers"),GB={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},hp=m((t,e,n,r,i,s)=>{const a=GB[n];if(!a){W.warn(`Unknown arrow type: ${n}`);return}const o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${r}#${i}_${s}-${a}${o})`)},"addEdgeMarker"),Va=new Map,Qt=new Map,D4=m(()=>{Va.clear(),Qt.clear()},"clear"),$i=m(t=>t?t.reduce((n,r)=>n+";"+r,""):"","getLabelStyles"),XB=m(async(t,e)=>{let n=te(Lt().flowchart.htmlLabels);const r=await pi(t,e.label,{style:$i(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1});W.info("abc82",e,e.labelType);const i=t.insert("g").attr("class","edgeLabel"),s=i.insert("g").attr("class","label");s.node().appendChild(r);let a=r.getBBox();if(n){const l=r.children[0],c=At(r);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),Va.set(e.id,i),e.width=a.width,e.height=a.height;let o;if(e.startLabelLeft){const l=await fr(e.startLabelLeft,$i(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Qt.get(e.id)||Qt.set(e.id,{}),Qt.get(e.id).startLeft=c,Yi(o,e.startLabelLeft)}if(e.startLabelRight){const l=await fr(e.startLabelRight,$i(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),Qt.get(e.id)||Qt.set(e.id,{}),Qt.get(e.id).startRight=c,Yi(o,e.startLabelRight)}if(e.endLabelLeft){const l=await fr(e.endLabelLeft,$i(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Qt.get(e.id)||Qt.set(e.id,{}),Qt.get(e.id).endLeft=c,Yi(o,e.endLabelLeft)}if(e.endLabelRight){const l=await fr(e.endLabelRight,$i(e.labelStyle)),c=t.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");o=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),Qt.get(e.id)||Qt.set(e.id,{}),Qt.get(e.id).endRight=c,Yi(o,e.endLabelRight)}return r},"insertEdgeLabel");function Yi(t,e){Lt().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}m(Yi,"setTerminalWidth");var KB=m((t,e)=>{W.debug("Moving label abc88 ",t.id,t.label,Va.get(t.id),e);let n=e.updatedPath?e.updatedPath:e.originalPath;const r=Lt(),{subGraphTitleTotalMargin:i}=uh(r);if(t.label){const s=Va.get(t.id);let a=t.x,o=t.y;if(n){const l=cn.calcLabelPosition(n);W.debug("Moving label "+t.label+" from (",a,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(a=l.x,o=l.y)}s.attr("transform",`translate(${a}, ${o+i/2})`)}if(t.startLabelLeft){const s=Qt.get(t.id).startLeft;let a=t.x,o=t.y;if(n){const l=cn.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(t.startLabelRight){const s=Qt.get(t.id).startRight;let a=t.x,o=t.y;if(n){const l=cn.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(t.endLabelLeft){const s=Qt.get(t.id).endLeft;let a=t.x,o=t.y;if(n){const l=cn.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(t.endLabelRight){const s=Qt.get(t.id).endRight;let a=t.x,o=t.y;if(n){const l=cn.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}},"positionEdgeLabel"),ZB=m((t,e)=>{const n=t.x,r=t.y,i=Math.abs(e.x-n),s=Math.abs(e.y-r),a=t.width/2,o=t.height/2;return i>=a||s>=o},"outsideNode"),QB=m((t,e,n)=>{W.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} - insidePoint : ${JSON.stringify(r)} - node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2;let o=r.xMath.abs(n-e.x)*l){let u=r.y{z.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(z.info("abc88 checking point",a,e),!nL(e,a)&&!i){const s=iL(e,n,a);z.debug("abc88 inside",a,n,s),z.debug("abc88 intersection",s,e);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?z.warn("abc88 no intersect",s,r):r.push(s),i=!0}else z.warn("abc88 outside",a,n),n=a,i||r.push(a)}),z.debug("returning points",r),r},"cutPathAtIntersect");function x0(t){const e=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}g(x0,"extractCornerPoints");var Uu=g(function(t,e,r){const n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),aL=g(function(t){const{cornerPointPositions:e}=x0(t),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){z.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));const p=5;s.x===o.x?f={x:c<0?o.x-p+u:o.x+p-u,y:h<0?o.y-u:o.y+u}:f={x:c<0?o.x-u:o.x+u,y:h<0?o.y-p+u:o.y+p-u}}else z.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(f,l)}else r.push(t[n]);return r},"fixCorners"),sL=g(function(t,e,r,n,i,a,s){const{handDrawnSeed:o}=_t();let l=e.points,c=!1;const h=i;var u=a;u.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),z.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),e.toCluster&&(z.info("to cluster abc88",r.get(e.toCluster)),l=ju(e.points,r.get(e.toCluster).node),c=!0),e.fromCluster&&(z.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=ju(l.reverse(),r.get(e.fromCluster).node).reverse(),c=!0);let f=l.filter(F=>!Number.isNaN(F.y));f=aL(f);let p=Yg;e.curve&&(p=e.curve);const{x:d,y:m}=QA(e),x=pv().x(d).y(m).curve(p);let y;switch(e.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-invisible";break;default:y="edge-thickness-normal"}switch(e.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed";break;default:y+=" edge-pattern-solid"}let b,C=x(f);const v=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){const F=Q.svg(t);Object.assign([],f);const D=F.path(C,{roughness:.3,seed:o});y+=" transition",b=kt(D).select("path").attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce((O,B)=>O+";"+B,""):"");let q=b.attr("d");b.attr("d",q),t.node().appendChild(b.node())}else b=t.append("path").attr("d",C).attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce((F,D)=>F+";"+D,""):"");let S="";(_t().flowchart.arrowMarkerAbsolute||_t().state.arrowMarkerAbsolute)&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),z.info("arrowTypeStart",e.arrowTypeStart),z.info("arrowTypeEnd",e.arrowTypeEnd),JA(b,e,S,s,n);let _={};return c&&(_.updatedPath=l),_.originalPath=e.points,_},"insertEdge"),oL=g((t,e,r,n)=>{e.forEach(i=>{yL[i](t,r,n)})},"insertMarkers"),lL=g((t,e,r)=>{z.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),cL=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),hL=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),uL=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),fL=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),pL=g((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),dL=g((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),gL=g((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),mL=g((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),yL={extension:lL,composition:cL,aggregation:hL,dependency:uL,lollipop:fL,point:pL,circle:dL,cross:gL,barb:mL},xL=oL,bL={common:Nn,getConfig:Ne,insertCluster:FA,insertEdge:sL,insertEdgeLabel:eL,insertMarkers:xL,insertNode:y0,interpolateToCurve:vc,labelHelper:ct,log:z,positionEdgeLabel:rL},zi={},b0=g(t=>{for(const e of t)zi[e.name]=e},"registerLayoutLoaders"),wL=g(()=>{b0([{name:"dagre",loader:g(async()=>await Tt(()=>import("./c-dagre-SWNTG5WE.DWXwo0oD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")}])},"registerDefaultLayoutLoaders");wL();var J3=g(async(t,e)=>{if(!(t.layoutAlgorithm in zi))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=zi[t.layoutAlgorithm];return(await r.loader()).render(t,e,bL,{algorithm:r.algorithm})},"render"),tP=g((t="",{fallback:e="dagre"}={})=>{if(t in zi)return t;if(e in zi)return z.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),Yu="11.4.0",CL=g(t=>{var i;const{securityLevel:e}=_t();let r=kt("body");if(e==="sandbox"){const s=((i=kt(`#i${t}`).node())==null?void 0:i.contentDocument)??document;r=kt(s.body)}return r.select(`#${t}`)},"selectSvgElement"),w0="comm",C0="rule",k0="decl",kL="@import",_L="@keyframes",vL="@layer",_0=Math.abs,qc=String.fromCharCode;function v0(t){return t.trim()}function La(t,e,r){return t.replace(e,r)}function SL(t,e,r){return t.indexOf(e,r)}function qi(t,e){return t.charCodeAt(e)|0}function Pn(t,e,r){return t.slice(e,r)}function Ye(t){return t.length}function TL(t){return t.length}function ga(t,e){return e.push(t),t}var qs=1,On=1,S0=0,Fe=0,Dt=0,Yn="";function Hc(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:qs,column:On,length:s,return:"",siblings:o}}function EL(){return Dt}function AL(){return Dt=Fe>0?qi(Yn,--Fe):0,On--,Dt===10&&(On=1,qs--),Dt}function Oe(){return Dt=Fe2||Hi(Dt)>3?"":" "}function FL(t,e){for(;--e&&Oe()&&!(Dt<48||Dt>102||Dt>57&&Dt<65||Dt>70&&Dt<97););return Hs(t,Ba()+(e<6&&_r()==32&&Oe()==32))}function vl(t){for(;Oe();)switch(Dt){case t:return Fe;case 34:case 39:t!==34&&t!==39&&vl(Dt);break;case 40:t===41&&vl(t);break;case 92:Oe();break}return Fe}function IL(t,e){for(;Oe()&&t+Dt!==57;)if(t+Dt===84&&_r()===47)break;return"/*"+Hs(e,Fe-1)+"*"+qc(t===47?t:Oe())}function $L(t){for(;!Hi(_r());)Oe();return Hs(t,Fe)}function RL(t){return BL(Ma("",null,null,null,[""],t=LL(t),0,[0],t))}function Ma(t,e,r,n,i,a,s,o,l){for(var c=0,h=0,u=s,f=0,p=0,d=0,m=1,x=1,y=1,b=0,C="",v=i,S=a,_=n,F=C;x;)switch(d=b,b=Oe()){case 40:if(d!=108&&qi(F,u-1)==58){SL(F+=La(xo(b),"&","&\f"),"&\f",_0(c?o[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:F+=xo(b);break;case 9:case 10:case 13:case 32:F+=ML(d);break;case 92:F+=FL(Ba()-1,7);continue;case 47:switch(_r()){case 42:case 47:ga(DL(IL(Oe(),Ba()),e,r,l),l),(Hi(d||1)==5||Hi(_r()||1)==5)&&Ye(F)&&Pn(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*m:o[c++]=Ye(F)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+h:y==-1&&(F=La(F,/\f/g,"")),p>0&&(Ye(F)-u||m===0&&d===47)&&ga(p>32?Gu(F+";",n,r,u-1,l):Gu(La(F," ","")+";",n,r,u-2,l),l);break;case 59:F+=";";default:if(ga(_=Vu(F,e,r,c,h,i,o,C,v=[],S=[],u,a),a),b===123)if(h===0)Ma(F,e,_,_,v,a,u,o,S);else switch(f===99&&qi(F,3)===110?100:f){case 100:case 108:case 109:case 115:Ma(t,_,_,n&&ga(Vu(t,_,_,0,0,i,o,C,i,v=[],u,S),S),i,S,u,o,n?v:S);break;default:Ma(F,_,_,_,[""],S,0,o,S)}}c=h=p=0,m=y=1,C=F="",u=s;break;case 58:u=1+Ye(F),p=d;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&AL()==125)continue}switch(F+=qc(b),b*m){case 38:y=h>0?1:(F+="\f",-1);break;case 44:o[c++]=(Ye(F)-1)*y,y=1;break;case 64:_r()===45&&(F+=xo(Oe())),f=_r(),h=u=Ye(C=F+=$L(Ba())),b++;break;case 45:d===45&&Ye(F)==2&&(m=0)}}return a}function Vu(t,e,r,n,i,a,s,o,l,c,h,u){for(var f=i-1,p=i===0?a:[""],d=TL(p),m=0,x=0,y=0;m0?p[b]+" "+C:La(C,/&\f/g,p[b])))&&(l[y++]=v);return Hc(t,e,r,i===0?C0:o,l,c,h,u)}function DL(t,e,r,n){return Hc(t,e,r,w0,qc(EL()),Pn(t,2,-2),0,n)}function Gu(t,e,r,n,i){return Hc(t,e,r,k0,Pn(t,0,n),Pn(t,n+1,-1),n,i)}function Sl(t,e){for(var r="",n=0;n/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),JL=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-c4Diagram-GPMAACGM.C32fG0np.js");return{diagram:e}},__vite__mapDeps([8,9,6,7]));return{id:T0,diagram:t}},"loader"),tB={id:T0,detector:QL,loader:JL},eB=tB,E0="flowchart",rB=g((t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),nB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-flowDiagram-TSWR6T2D.Ck6ffKlE.js");return{diagram:e}},__vite__mapDeps([10,11,12,6,7]));return{id:E0,diagram:t}},"loader"),iB={id:E0,detector:rB,loader:nB},aB=iB,A0="flowchart-v2",sB=g((t,e)=>{var r,n,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),oB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-flowDiagram-TSWR6T2D.Ck6ffKlE.js");return{diagram:e}},__vite__mapDeps([10,11,12,6,7]));return{id:A0,diagram:t}},"loader"),lB={id:A0,detector:sB,loader:oB},cB=lB,L0="er",hB=g(t=>/^\s*erDiagram/.test(t),"detector"),uB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-erDiagram-WO52GFNT.LFoF0V0f.js");return{diagram:e}},__vite__mapDeps([13,1,2,3,4,6,7]));return{id:L0,diagram:t}},"loader"),fB={id:L0,detector:hB,loader:uB},pB=fB,B0="gitGraph",dB=g(t=>/^\s*gitGraph/.test(t),"detector"),gB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-gitGraphDiagram-5C7YHVU6.DJo58C4j.js");return{diagram:e}},__vite__mapDeps([14,15,16,17,2,4,5,6,7]));return{id:B0,diagram:t}},"loader"),mB={id:B0,detector:dB,loader:gB},yB=mB,M0="gantt",xB=g(t=>/^\s*gantt/.test(t),"detector"),bB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-ganttDiagram-FAOCOTIY.R6hBUM4X.js");return{diagram:e}},__vite__mapDeps([18,6,7,19,20]));return{id:M0,diagram:t}},"loader"),wB={id:M0,detector:xB,loader:bB},CB=wB,F0="info",kB=g(t=>/^\s*info/.test(t),"detector"),_B=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-infoDiagram-P5D6MX3V.DdIyuX89.js");return{diagram:e}},__vite__mapDeps([21,17,2,4,5,6,7]));return{id:F0,diagram:t}},"loader"),vB={id:F0,detector:kB,loader:_B},I0="pie",SB=g(t=>/^\s*pie/.test(t),"detector"),TB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-pieDiagram-BLWKPB35.lIooBhwN.js");return{diagram:e}},__vite__mapDeps([22,15,17,2,4,5,23,24,20,6,7]));return{id:I0,diagram:t}},"loader"),EB={id:I0,detector:SB,loader:TB},$0="quadrantChart",AB=g(t=>/^\s*quadrantChart/.test(t),"detector"),LB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-quadrantDiagram-QXWEEFXS.DgfFRL-6.js");return{diagram:e}},__vite__mapDeps([25,19,20,6,7]));return{id:$0,diagram:t}},"loader"),BB={id:$0,detector:AB,loader:LB},MB=BB,R0="xychart",FB=g(t=>/^\s*xychart-beta/.test(t),"detector"),IB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-xychartDiagram-MYLB5AYS.Bk6N2-gY.js");return{diagram:e}},__vite__mapDeps([26,20,24,19,6,7]));return{id:R0,diagram:t}},"loader"),$B={id:R0,detector:FB,loader:IB},RB=$B,D0="requirement",DB=g(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),PB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-requirementDiagram-XAUNFCZY.CocmbrW5.js");return{diagram:e}},__vite__mapDeps([27,1,2,3,4,6,7]));return{id:D0,diagram:t}},"loader"),OB={id:D0,detector:DB,loader:PB},NB=OB,P0="sequence",zB=g(t=>/^\s*sequenceDiagram/.test(t),"detector"),qB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-sequenceDiagram-D25TJ2OB.BXnlbrZo.js");return{diagram:e}},__vite__mapDeps([28,9,16,6,7]));return{id:P0,diagram:t}},"loader"),HB={id:P0,detector:zB,loader:qB},WB=HB,O0="class",jB=g((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),UB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-classDiagram-FEGYTUDG.T4l6upN8.js");return{diagram:e}},__vite__mapDeps([29,30,11,6,7]));return{id:O0,diagram:t}},"loader"),YB={id:O0,detector:jB,loader:UB},VB=YB,N0="classDiagram",GB=g((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),XB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-classDiagram-v2-R65JCUOM.T4l6upN8.js");return{diagram:e}},__vite__mapDeps([31,30,11,6,7]));return{id:N0,diagram:t}},"loader"),KB={id:N0,detector:GB,loader:XB},ZB=KB,z0="state",QB=g((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),JB=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-stateDiagram-GNSP7T6Y.PmTUAwa8.js");return{diagram:e}},__vite__mapDeps([32,33,11,1,2,3,4,6,7]));return{id:z0,diagram:t}},"loader"),tM={id:z0,detector:QB,loader:JB},eM=tM,q0="stateDiagram",rM=g((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),nM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-stateDiagram-v2-HP6YRVRG.mlRZ3fPK.js");return{diagram:e}},__vite__mapDeps([34,33,11,6,7]));return{id:q0,diagram:t}},"loader"),iM={id:q0,detector:rM,loader:nM},aM=iM,H0="journey",sM=g(t=>/^\s*journey/.test(t),"detector"),oM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-journeyDiagram-UIGPPNLY.B4jif9w_.js");return{diagram:e}},__vite__mapDeps([35,9,23,6,7]));return{id:H0,diagram:t}},"loader"),lM={id:H0,detector:sM,loader:oM},cM=lM,hM=g((t,e,r)=>{z.debug(`rendering svg for syntax error -`);const n=CL(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Ap(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),W0={draw:hM},uM=W0,fM={db:{},renderer:W0,parser:{parse:g(()=>{},"parse")}},pM=fM,j0="flowchart-elk",dM=g((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),gM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-flowDiagram-TSWR6T2D.Ck6ffKlE.js");return{diagram:e}},__vite__mapDeps([10,11,12,6,7]));return{id:j0,diagram:t}},"loader"),mM={id:j0,detector:dM,loader:gM},yM=mM,U0="timeline",xM=g(t=>/^\s*timeline/.test(t),"detector"),bM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-timeline-definition-27KQCCZ3.mVhogevl.js");return{diagram:e}},__vite__mapDeps([36,23,6,7]));return{id:U0,diagram:t}},"loader"),wM={id:U0,detector:xM,loader:bM},CM=wM,Y0="mindmap",kM=g(t=>/^\s*mindmap/.test(t),"detector"),_M=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-mindmap-definition-R7LC4OIY.CBpJ3Pex.js");return{diagram:e}},__vite__mapDeps([37,38,6,7]));return{id:Y0,diagram:t}},"loader"),vM={id:Y0,detector:kM,loader:_M},SM=vM,V0="kanban",TM=g(t=>/^\s*kanban/.test(t),"detector"),EM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-kanban-definition-KMT3NSR2.uT1oEA61.js");return{diagram:e}},__vite__mapDeps([39,6,7]));return{id:V0,diagram:t}},"loader"),AM={id:V0,detector:TM,loader:EM},LM=AM,G0="sankey",BM=g(t=>/^\s*sankey-beta/.test(t),"detector"),MM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-sankeyDiagram-LVV36NHA.BhdocKg_.js");return{diagram:e}},__vite__mapDeps([40,24,20,6,7]));return{id:G0,diagram:t}},"loader"),FM={id:G0,detector:BM,loader:MM},IM=FM,X0="packet",$M=g(t=>/^\s*packet-beta/.test(t),"detector"),RM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-diagram-NZMEDLQF.DLTa1rZz.js");return{diagram:e}},__vite__mapDeps([41,15,17,2,4,5,6,7]));return{id:X0,diagram:t}},"loader"),DM={id:X0,detector:$M,loader:RM},K0="block",PM=g(t=>/^\s*block-beta/.test(t),"detector"),OM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-blockDiagram-XN6IQ5JY.Bftekuos.js");return{diagram:e}},__vite__mapDeps([42,5,2,1,12,6,7]));return{id:K0,diagram:t}},"loader"),NM={id:K0,detector:PM,loader:OM},zM=NM,Z0="architecture",qM=g(t=>/^\s*architecture/.test(t),"detector"),HM=g(async()=>{const{diagram:t}=await Tt(async()=>{const{diagram:e}=await import("./c-architectureDiagram-AYX4OTIS.DGoAurYb.js");return{diagram:e}},__vite__mapDeps([43,15,16,17,2,4,5,38,6,7]));return{id:Z0,diagram:t}},"loader"),WM={id:Z0,detector:qM,loader:HM},jM=WM,ef=!1,Ws=g(()=>{ef||(ef=!0,Pa("error",pM,t=>t.toLowerCase().trim()==="error"),Pa("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),gp(eB,LM,ZB,VB,pB,CB,vB,EB,NB,WB,yM,cB,aB,SM,CM,yB,aM,eM,cM,MB,IM,DM,RB,zM,jM))},"addDiagrams"),UM=g(async()=>{z.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(An).map(async([r,{detector:n,loader:i}])=>{if(i)try{Ho(r)}catch{try{const{diagram:a,id:s}=await i();Pa(s,a,n)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete An[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){z.error(`Failed to load ${e.length} external diagrams`);for(const r of e)z.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),YM="graphics-document document";function Q0(t,e){t.attr("role",YM),e!==""&&t.attr("aria-roledescription",e)}g(Q0,"setA11yDiagramInfo");function J0(t,e,r,n){if(t.insert!==void 0){if(r){const i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}g(J0,"addSVGa11yTitleDescription");var Vr,Bl=(Vr=class{constructor(e,r,n,i,a){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(e,r={}){var c,h;const n=Ne(),i=Vl(e,n);e=_E(e)+` -`;try{Ho(i)}catch{const u=b1(i);if(!u)throw new dp(`Diagram ${i} not found.`);const{id:f,diagram:p}=await u();Pa(f,p)}const{db:a,parser:s,renderer:o,init:l}=Ho(i);return s.parser&&(s.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(n),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await s.parse(e),new Vr(i,e,a,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},g(Vr,"Diagram"),Vr),rf=[],VM=g(()=>{rf.forEach(t=>{t()}),rf=[]},"attachFunctions"),GM=g(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function tx(t){const e=t.match(pp);if(!e)return{text:t,metadata:{}};let r=xC(e[1],{schema:yC})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}g(tx,"extractFrontMatter");var XM=g(t=>t.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),KM=g(t=>{const{text:e,metadata:r}=tx(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),ZM=g(t=>{const e=Ve.detectInit(t)??{},r=Ve.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:hE(t),directive:e}},"processDirectives");function Wc(t){const e=XM(t),r=KM(e),n=ZM(r.text),i=Lc(r.config,n.directive);return t=GM(n.text),{code:t,title:r.title,config:i}}g(Wc,"preprocessDiagram");function ex(t){const e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}g(ex,"toBase64");var QM=5e4,JM="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",tF="sandbox",eF="loose",rF="http://www.w3.org/2000/svg",nF="http://www.w3.org/1999/xlink",iF="http://www.w3.org/1999/xhtml",aF="100%",sF="100%",oF="border:0;margin:0;",lF="margin:0",cF="allow-top-navigation-by-user-activation allow-popups",hF='The "iframe" tag is not supported by your browser.',uF=["foreignobject"],fF=["dominant-baseline"];function jc(t){const e=Wc(t);return Ra(),R1(e.config??{}),e}g(jc,"processAndSetConfigs");async function rx(t,e){Ws();try{const{code:r,config:n}=jc(t);return{diagramType:(await ix(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}g(rx,"parse");var nf=g((t,e,r=[])=>` -.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),pF=g((t,e=new Map)=>{var n;let r="";if(t.themeCSS!==void 0&&(r+=` -${t.themeCSS}`),t.fontFamily!==void 0&&(r+=` -:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=` -:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const o=t.htmlLabels??((n=t.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(l=>{tf(l.styles)||o.forEach(c=>{r+=nf(l.id,c,l.styles)}),tf(l.textStyles)||(r+=nf(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),dF=g((t,e,r,n)=>{const i=pF(t,r),a=tw(e,i,t.themeVariables);return Sl(RL(`${n}{${a}}`),PL)},"createUserStyles"),gF=g((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Hn(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),mF=g((t="",e)=>{var i,a;const r=(a=(i=e==null?void 0:e.viewBox)==null?void 0:i.baseVal)!=null&&a.height?e.viewBox.baseVal.height+"px":sF,n=ex(`${t}`);return``},"putIntoIFrame"),af=g((t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",rF);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function Ml(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(Ml,"sandboxedIframe");var yF=g((t,e,r,n)=>{var i,a,s;(i=t.getElementById(e))==null||i.remove(),(a=t.getElementById(r))==null||a.remove(),(s=t.getElementById(n))==null||s.remove()},"removeExistingElements"),xF=g(async function(t,e,r){var P,N,L,T,A,$;Ws();const n=jc(e);e=n.code;const i=Ne();z.debug(i),e.length>((i==null?void 0:i.maxTextSize)??QM)&&(e=JM);const a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=g(()=>{const V=kt(f?o:c).node();V&&"remove"in V&&V.remove()},"removeTempElements");let u=kt("body");const f=i.securityLevel===tF,p=i.securityLevel===eF,d=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const I=Ml(kt(r),s);u=kt(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=kt(r);af(u,t,l,`font-family: ${d}`,nF)}else{if(yF(document,t,l,s),f){const I=Ml(kt("body"),s);u=kt(I.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=kt("body");af(u,t,l)}let m,x;try{m=await Bl.fromText(e,{title:n.title})}catch(I){if(i.suppressErrorRendering)throw h(),I;m=await Bl.fromText("error"),x=I}const y=u.select(c).node(),b=m.type,C=y.firstChild,v=C.firstChild,S=(N=(P=m.renderer).getClasses)==null?void 0:N.call(P,e,m),_=dF(i,b,S,a),F=document.createElement("style");F.innerHTML=_,C.insertBefore(F,v);try{await m.renderer.draw(e,t,Yu,m)}catch(I){throw i.suppressErrorRendering?h():uM.draw(e,t,Yu),I}const D=u.select(`${c} svg`),q=(T=(L=m.db).getAccTitle)==null?void 0:T.call(L),O=($=(A=m.db).getAccDescription)==null?void 0:$.call(A);ax(b,D,q,O),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",iF);let B=u.select(c).node().innerHTML;if(z.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),B=gF(B,f,Gt(i.arrowMarkerAbsolute)),f){const I=u.select(c+" svg").node();B=mF(B,I)}else p||(B=En.sanitize(B,{ADD_TAGS:uF,ADD_ATTR:fF}));if(VM(),x)throw x;return h(),{diagramType:b,svg:B,bindFunctions:m.db.bindFunctions}},"render");function nx(t={}){var n;const e=Vt({},t);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),I1(e),e!=null&&e.theme&&e.theme in ur?e.themeVariables=ur[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=ur.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?F1(e):Cp();Yl(r.logLevel),Ws()}g(nx,"initialize");var ix=g((t,e={})=>{const{code:r}=Wc(t);return Bl.fromText(r,e)},"getDiagramFromText");function ax(t,e,r,n){Q0(e,t),J0(e,r,n,e.attr("id"))}g(ax,"addA11yInfo");var Jr=Object.freeze({render:xF,parse:rx,getDiagramFromText:ix,initialize:nx,getConfig:Ne,setConfig:kp,getSiteConfig:Cp,updateSiteConfig:$1,reset:g(()=>{Ra()},"reset"),globalReset:g(()=>{Ra(Ln)},"globalReset"),defaultConfig:Ln});Yl(Ne().logLevel);Ra(Ne());var bF=g((t,e,r)=>{z.warn(t),Ac(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),sx=g(async function(t={querySelector:".mermaid"}){try{await wF(t)}catch(e){if(Ac(e)&&z.error(e.str),_e.parseError&&_e.parseError(e),!t.suppressErrors)throw z.error("Use the suppressErrors option to suppress these errors"),e}},"run"),wF=g(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Jr.getConfig();z.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");z.debug(`Found ${i.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(z.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),Jr.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const a=new Ve.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const o=[];for(const l of Array.from(i)){if(z.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=Pm(Ve.entityDecode(s)).trim().replace(//gi,"
    ");const h=Ve.detectInit(s);h&&z.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await hx(c,s,l);l.innerHTML=u,t&&await t(c),f&&f(l)}catch(u){bF(u,o,_e.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),ox=g(function(t){Jr.initialize(t)},"initialize"),CF=g(async function(t,e,r){z.warn("mermaid.init is deprecated. Please use run instead."),t&&ox(t);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await sx(n)},"init"),kF=g(async(t,{lazyLoad:e=!0}={})=>{Ws(),gp(...t),e===!1&&await UM()},"registerExternalDiagrams"),lx=g(function(){if(_e.startOnLoad){const{startOnLoad:t}=Jr.getConfig();t&&_e.run().catch(e=>z.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",lx,!1);var _F=g(function(t){_e.parseError=t},"setParseErrorHandler"),ps=[],bo=!1,cx=g(async()=>{if(!bo){for(bo=!0;ps.length>0;){const t=ps.shift();if(t)try{await t()}catch(e){z.error("Error executing queue",e)}}bo=!1}},"executeQueue"),vF=g(async(t,e)=>new Promise((r,n)=>{const i=g(()=>new Promise((a,s)=>{Jr.parse(t,e).then(o=>{a(o),r(o)},o=>{var l;z.error("Error parsing",o),(l=_e.parseError)==null||l.call(_e,o),s(o),n(o)})}),"performCall");ps.push(i),cx().catch(n)}),"parse"),hx=g((t,e,r)=>new Promise((n,i)=>{const a=g(()=>new Promise((s,o)=>{Jr.render(t,e,r).then(l=>{s(l),n(l)},l=>{var c;z.error("Error parsing",l),(c=_e.parseError)==null||c.call(_e,l),o(l),i(l)})}),"performCall");ps.push(a),cx().catch(i)}),"render"),_e={startOnLoad:!0,mermaidAPI:Jr,parse:vF,render:hx,init:CF,run:sx,registerExternalDiagrams:kF,registerLayoutLoaders:b0,initialize:ox,parseError:void 0,contentLoaded:lx,setParseErrorHandler:_F,detectType:Vl,registerIconPacks:zC},sf=_e;/*! Check if previously processed *//*! + insidePoint : ${JSON.stringify(n)} + node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const r=t.x,i=t.y,s=Math.abs(r-n.x),a=t.width/2;let o=n.xMath.abs(r-e.x)*l){let u=n.y{W.warn("abc88 cutPathAtIntersect",t,e);let n=[],r=t[0],i=!1;return t.forEach(s=>{if(W.info("abc88 checking point",s,e),!ZB(e,s)&&!i){const a=QB(e,r,s);W.debug("abc88 inside",s,r,a),W.debug("abc88 intersection",a,e);let o=!1;n.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),n.some(l=>l.x===a.x&&l.y===a.y)?W.warn("abc88 no intersect",a,n):n.push(a),i=!0}else W.warn("abc88 outside",s,r),r=s,i||n.push(s)}),W.debug("returning points",n),n},"cutPathAtIntersect");function X0(t){const e=[],n=[];for(let r=1;r5&&Math.abs(s.y-i.y)>5||i.y===s.y&&s.x===a.x&&Math.abs(s.x-i.x)>5&&Math.abs(s.y-a.y)>5)&&(e.push(s),n.push(r))}return{cornerPoints:e,cornerPointPositions:n}}m(X0,"extractCornerPoints");var fp=m(function(t,e,n){const r=e.x-t.x,i=e.y-t.y,s=Math.sqrt(r*r+i*i),a=n/s;return{x:e.x-a*r,y:e.y-a*i}},"findAdjacentPoint"),JB=m(function(t){const{cornerPointPositions:e}=X0(t),n=[];for(let r=0;r10&&Math.abs(s.y-i.y)>=10){W.debug("Corner point fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));const p=5;a.x===o.x?f={x:c<0?o.x-p+u:o.x+p-u,y:h<0?o.y-u:o.y+u}:f={x:c<0?o.x-u:o.x+u,y:h<0?o.y-p+u:o.y+p-u}}else W.debug("Corner point skipping fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));n.push(f,l)}else n.push(t[r]);return n},"fixCorners"),tI=m(function(t,e,n,r,i,s,a){const{handDrawnSeed:o}=Lt();let l=e.points,c=!1;const h=i;var u=s;u.intersect&&h.intersect&&(l=l.slice(1,e.points.length-1),l.unshift(h.intersect(l[0])),W.debug("Last point APA12",e.start,"-->",e.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),e.toCluster&&(W.info("to cluster abc88",n.get(e.toCluster)),l=up(e.points,n.get(e.toCluster).node),c=!0),e.fromCluster&&(W.debug("from cluster abc88",n.get(e.fromCluster),JSON.stringify(l,null,2)),l=up(l.reverse(),n.get(e.fromCluster).node).reverse(),c=!0);let f=l.filter(A=>!Number.isNaN(A.y));f=JB(f);let p=_y;e.curve&&(p=e.curve);const{x:d,y:g}=VB(e),x=oE().x(d).y(g).curve(p);let y;switch(e.thickness){case"normal":y="edge-thickness-normal";break;case"thick":y="edge-thickness-thick";break;case"invisible":y="edge-thickness-invisible";break;default:y="edge-thickness-normal"}switch(e.pattern){case"solid":y+=" edge-pattern-solid";break;case"dotted":y+=" edge-pattern-dotted";break;case"dashed":y+=" edge-pattern-dashed";break;default:y+=" edge-pattern-solid"}let b,w=x(f);const v=Array.isArray(e.style)?e.style:[e.style];if(e.look==="handDrawn"){const A=tt.svg(t);Object.assign([],f);const O=A.path(w,{roughness:.3,seed:o});y+=" transition",b=At(O).select("path").attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce((N,M)=>N+";"+M,""):"");let H=b.attr("d");b.attr("d",H),t.node().appendChild(b.node())}else b=t.append("path").attr("d",w).attr("id",e.id).attr("class"," "+y+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce((A,O)=>A+";"+O,""):"");let k="";(Lt().flowchart.arrowMarkerAbsolute||Lt().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),W.info("arrowTypeStart",e.arrowTypeStart),W.info("arrowTypeEnd",e.arrowTypeEnd),YB(b,e,k,a,r);let _={};return c&&(_.updatedPath=l),_.originalPath=e.points,_},"insertEdge"),eI=m((t,e,n,r)=>{e.forEach(i=>{uI[i](t,n,r)})},"insertMarkers"),nI=m((t,e,n)=>{W.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),rI=m((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),iI=m((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),sI=m((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",n+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),aI=m((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",n+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),oI=m((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),lI=m((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cI=m((t,e,n)=>{t.append("marker").attr("id",n+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",n+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),hI=m((t,e,n)=>{t.append("defs").append("marker").attr("id",n+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),uI={extension:nI,composition:rI,aggregation:iI,dependency:sI,lollipop:aI,point:oI,circle:lI,cross:cI,barb:hI},fI=eI,pI={common:ci,getConfig:en,insertCluster:TB,insertEdge:tI,insertEdgeLabel:XB,insertMarkers:fI,insertNode:G0,interpolateToCurve:Lh,labelHelper:gt,log:W,positionEdgeLabel:KB},gs={},K0=m(t=>{for(const e of t)gs[e.name]=e},"registerLayoutLoaders"),dI=m(()=>{K0([{name:"dagre",loader:m(async()=>await Ft(()=>import("./c-dagre-SWNTG5WE.BqCGIveF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")}])},"registerDefaultLayoutLoaders");dI();var O4=m(async(t,e)=>{if(!(t.layoutAlgorithm in gs))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const n=gs[t.layoutAlgorithm];return(await n.loader()).render(t,e,pI,{algorithm:n.algorithm})},"render"),$4=m((t="",{fallback:e="dagre"}={})=>{if(t in gs)return t;if(e in gs)return W.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),pp="11.4.0",gI=m(t=>{var i;const{securityLevel:e}=Lt();let n=At("body");if(e==="sandbox"){const a=((i=At(`#i${t}`).node())==null?void 0:i.contentDocument)??document;n=At(a.body)}return n.select(`#${t}`)},"selectSvgElement"),Z0="comm",Q0="rule",J0="decl",mI="@import",yI="@keyframes",xI="@layer",tb=Math.abs,Vh=String.fromCharCode;function eb(t){return t.trim()}function la(t,e,n){return t.replace(e,n)}function bI(t,e,n){return t.indexOf(e,n)}function ms(t,e){return t.charCodeAt(e)|0}function si(t,e,n){return t.slice(e,n)}function ln(t){return t.length}function wI(t){return t.length}function Ys(t,e){return e.push(t),t}var Lo=1,ai=1,nb=0,Ue=0,Ut=0,mi="";function Yh(t,e,n,r,i,s,a,o){return{value:t,root:e,parent:n,type:r,props:i,children:s,line:Lo,column:ai,length:a,return:"",siblings:o}}function CI(){return Ut}function vI(){return Ut=Ue>0?ms(mi,--Ue):0,ai--,Ut===10&&(ai=1,Lo--),Ut}function Qe(){return Ut=Ue2||ys(Ut)>3?"":" "}function TI(t,e){for(;--e&&Qe()&&!(Ut<48||Ut>102||Ut>57&&Ut<65||Ut>70&&Ut<97););return Mo(t,ca()+(e<6&&qn()==32&&Qe()==32))}function wc(t){for(;Qe();)switch(Ut){case t:return Ue;case 34:case 39:t!==34&&t!==39&&wc(Ut);break;case 40:t===41&&wc(t);break;case 92:Qe();break}return Ue}function EI(t,e){for(;Qe()&&t+Ut!==57;)if(t+Ut===84&&qn()===47)break;return"/*"+Mo(e,Ue-1)+"*"+Vh(t===47?t:Qe())}function AI(t){for(;!ys(qn());)Qe();return Mo(t,Ue)}function LI(t){return kI(ha("",null,null,null,[""],t=_I(t),0,[0],t))}function ha(t,e,n,r,i,s,a,o,l){for(var c=0,h=0,u=a,f=0,p=0,d=0,g=1,x=1,y=1,b=0,w="",v=i,k=s,_=r,A=w;x;)switch(d=b,b=Qe()){case 40:if(d!=108&&ms(A,u-1)==58){bI(A+=la(ul(b),"&","&\f"),"&\f",tb(c?o[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:A+=ul(b);break;case 9:case 10:case 13:case 32:A+=SI(d);break;case 92:A+=TI(ca()-1,7);continue;case 47:switch(qn()){case 42:case 47:Ys(MI(EI(Qe(),ca()),e,n,l),l),(ys(d||1)==5||ys(qn()||1)==5)&&ln(A)&&si(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*g:o[c++]=ln(A)*y;case 125*g:case 59:case 0:switch(b){case 0:case 125:x=0;case 59+h:y==-1&&(A=la(A,/\f/g,"")),p>0&&(ln(A)-u||g===0&&d===47)&&Ys(p>32?gp(A+";",r,n,u-1,l):gp(la(A," ","")+";",r,n,u-2,l),l);break;case 59:A+=";";default:if(Ys(_=dp(A,e,n,c,h,i,o,w,v=[],k=[],u,s),s),b===123)if(h===0)ha(A,e,_,_,v,s,u,o,k);else switch(f===99&&ms(A,3)===110?100:f){case 100:case 108:case 109:case 115:ha(t,_,_,r&&Ys(dp(t,_,_,0,0,i,o,w,i,v=[],u,k),k),i,k,u,o,r?v:k);break;default:ha(A,_,_,_,[""],k,0,o,k)}}c=h=p=0,g=y=1,w=A="",u=a;break;case 58:u=1+ln(A),p=d;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&vI()==125)continue}switch(A+=Vh(b),b*g){case 38:y=h>0?1:(A+="\f",-1);break;case 44:o[c++]=(ln(A)-1)*y,y=1;break;case 64:qn()===45&&(A+=ul(Qe())),f=qn(),h=u=ln(w=A+=AI(ca())),b++;break;case 45:d===45&&ln(A)==2&&(g=0)}}return s}function dp(t,e,n,r,i,s,a,o,l,c,h,u){for(var f=i-1,p=i===0?s:[""],d=wI(p),g=0,x=0,y=0;g0?p[b]+" "+w:la(w,/&\f/g,p[b])))&&(l[y++]=v);return Yh(t,e,n,i===0?Q0:o,l,c,h,u)}function MI(t,e,n,r){return Yh(t,e,n,Z0,Vh(CI()),si(t,2,-2),0,r)}function gp(t,e,n,r,i){return Yh(t,e,n,J0,si(t,0,r),si(t,r+1,-1),r,i)}function Cc(t,e){for(var n="",r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),YI=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-c4Diagram-GPMAACGM.BkpUmUjp.js");return{diagram:e}},__vite__mapDeps([8,9,6,7]));return{id:rb,diagram:t}},"loader"),GI={id:rb,detector:VI,loader:YI},XI=GI,ib="flowchart",KI=m((t,e)=>{var n,r;return((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"||((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),ZI=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-flowDiagram-TSWR6T2D.BDyRIeD9.js");return{diagram:e}},__vite__mapDeps([10,11,12,6,7]));return{id:ib,diagram:t}},"loader"),QI={id:ib,detector:KI,loader:ZI},JI=QI,sb="flowchart-v2",tF=m((t,e)=>{var n,r,i;return((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="dagre-d3"?!1:(((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),eF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-flowDiagram-TSWR6T2D.BDyRIeD9.js");return{diagram:e}},__vite__mapDeps([10,11,12,6,7]));return{id:sb,diagram:t}},"loader"),nF={id:sb,detector:tF,loader:eF},rF=nF,ab="er",iF=m(t=>/^\s*erDiagram/.test(t),"detector"),sF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-erDiagram-WO52GFNT.CIP9No93.js");return{diagram:e}},__vite__mapDeps([13,1,2,3,4,6,7]));return{id:ab,diagram:t}},"loader"),aF={id:ab,detector:iF,loader:sF},oF=aF,ob="gitGraph",lF=m(t=>/^\s*gitGraph/.test(t),"detector"),cF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-gitGraphDiagram-5C7YHVU6.Dl5tBrYZ.js");return{diagram:e}},__vite__mapDeps([14,15,16,17,2,4,5,6,7]));return{id:ob,diagram:t}},"loader"),hF={id:ob,detector:lF,loader:cF},uF=hF,lb="gantt",fF=m(t=>/^\s*gantt/.test(t),"detector"),pF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-ganttDiagram-FAOCOTIY.B9tslBWb.js");return{diagram:e}},__vite__mapDeps([18,6,7,19,20]));return{id:lb,diagram:t}},"loader"),dF={id:lb,detector:fF,loader:pF},gF=dF,cb="info",mF=m(t=>/^\s*info/.test(t),"detector"),yF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-infoDiagram-P5D6MX3V.9u1PTiRl.js");return{diagram:e}},__vite__mapDeps([21,17,2,4,5,6,7]));return{id:cb,diagram:t}},"loader"),xF={id:cb,detector:mF,loader:yF},hb="pie",bF=m(t=>/^\s*pie/.test(t),"detector"),wF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-pieDiagram-BLWKPB35.CxVsEpHY.js");return{diagram:e}},__vite__mapDeps([22,15,17,2,4,5,23,24,20,6,7]));return{id:hb,diagram:t}},"loader"),CF={id:hb,detector:bF,loader:wF},ub="quadrantChart",vF=m(t=>/^\s*quadrantChart/.test(t),"detector"),_F=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-quadrantDiagram-QXWEEFXS.CSlBfacx.js");return{diagram:e}},__vite__mapDeps([25,19,20,6,7]));return{id:ub,diagram:t}},"loader"),kF={id:ub,detector:vF,loader:_F},SF=kF,fb="xychart",TF=m(t=>/^\s*xychart-beta/.test(t),"detector"),EF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-xychartDiagram-MYLB5AYS.CrV2JkJ2.js");return{diagram:e}},__vite__mapDeps([26,20,24,19,6,7]));return{id:fb,diagram:t}},"loader"),AF={id:fb,detector:TF,loader:EF},LF=AF,pb="requirement",MF=m(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),BF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-requirementDiagram-XAUNFCZY.Dmavh9i-.js");return{diagram:e}},__vite__mapDeps([27,1,2,3,4,6,7]));return{id:pb,diagram:t}},"loader"),IF={id:pb,detector:MF,loader:BF},FF=IF,db="sequence",RF=m(t=>/^\s*sequenceDiagram/.test(t),"detector"),PF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-sequenceDiagram-D25TJ2OB.BxqiZ84W.js");return{diagram:e}},__vite__mapDeps([28,9,16,6,7]));return{id:db,diagram:t}},"loader"),DF={id:db,detector:RF,loader:PF},OF=DF,gb="class",$F=m((t,e)=>{var n;return((n=e==null?void 0:e.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),NF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-classDiagram-FEGYTUDG.Jtpc2mPV.js");return{diagram:e}},__vite__mapDeps([29,30,11,6,7]));return{id:gb,diagram:t}},"loader"),zF={id:gb,detector:$F,loader:NF},jF=zF,mb="classDiagram",qF=m((t,e)=>{var n;return/^\s*classDiagram/.test(t)&&((n=e==null?void 0:e.class)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),HF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-classDiagram-v2-R65JCUOM.Jtpc2mPV.js");return{diagram:e}},__vite__mapDeps([31,30,11,6,7]));return{id:mb,diagram:t}},"loader"),WF={id:mb,detector:qF,loader:HF},UF=WF,yb="state",VF=m((t,e)=>{var n;return((n=e==null?void 0:e.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),YF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-stateDiagram-GNSP7T6Y.DWapbDeu.js");return{diagram:e}},__vite__mapDeps([32,33,11,1,2,3,4,6,7]));return{id:yb,diagram:t}},"loader"),GF={id:yb,detector:VF,loader:YF},XF=GF,xb="stateDiagram",KF=m((t,e)=>{var n;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((n=e==null?void 0:e.state)==null?void 0:n.defaultRenderer)==="dagre-wrapper")},"detector"),ZF=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-stateDiagram-v2-HP6YRVRG.DQU7qFf8.js");return{diagram:e}},__vite__mapDeps([34,33,11,6,7]));return{id:xb,diagram:t}},"loader"),QF={id:xb,detector:KF,loader:ZF},JF=QF,bb="journey",tR=m(t=>/^\s*journey/.test(t),"detector"),eR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-journeyDiagram-UIGPPNLY.COfGQ7Mw.js");return{diagram:e}},__vite__mapDeps([35,9,23,6,7]));return{id:bb,diagram:t}},"loader"),nR={id:bb,detector:tR,loader:eR},rR=nR,iR=m((t,e,n)=>{W.debug(`rendering svg for syntax error +`);const r=gI(e),i=r.append("g");r.attr("viewBox","0 0 2412 512"),sg(r,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${n}`)},"draw"),wb={draw:iR},sR=wb,aR={db:{},renderer:wb,parser:{parse:m(()=>{},"parse")}},oR=aR,Cb="flowchart-elk",lR=m((t,e={})=>{var n;return/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),cR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-flowDiagram-TSWR6T2D.BDyRIeD9.js");return{diagram:e}},__vite__mapDeps([10,11,12,6,7]));return{id:Cb,diagram:t}},"loader"),hR={id:Cb,detector:lR,loader:cR},uR=hR,vb="timeline",fR=m(t=>/^\s*timeline/.test(t),"detector"),pR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-timeline-definition-27KQCCZ3.DCkZpjUg.js");return{diagram:e}},__vite__mapDeps([36,23,6,7]));return{id:vb,diagram:t}},"loader"),dR={id:vb,detector:fR,loader:pR},gR=dR,_b="mindmap",mR=m(t=>/^\s*mindmap/.test(t),"detector"),yR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-mindmap-definition-R7LC4OIY.HtmJtmIk.js");return{diagram:e}},__vite__mapDeps([37,38,6,7]));return{id:_b,diagram:t}},"loader"),xR={id:_b,detector:mR,loader:yR},bR=xR,kb="kanban",wR=m(t=>/^\s*kanban/.test(t),"detector"),CR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-kanban-definition-KMT3NSR2.UKecc5Qe.js");return{diagram:e}},__vite__mapDeps([39,6,7]));return{id:kb,diagram:t}},"loader"),vR={id:kb,detector:wR,loader:CR},_R=vR,Sb="sankey",kR=m(t=>/^\s*sankey-beta/.test(t),"detector"),SR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-sankeyDiagram-LVV36NHA.qNSVVhZy.js");return{diagram:e}},__vite__mapDeps([40,24,20,6,7]));return{id:Sb,diagram:t}},"loader"),TR={id:Sb,detector:kR,loader:SR},ER=TR,Tb="packet",AR=m(t=>/^\s*packet-beta/.test(t),"detector"),LR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-diagram-NZMEDLQF.B1mQzBcd.js");return{diagram:e}},__vite__mapDeps([41,15,17,2,4,5,6,7]));return{id:Tb,diagram:t}},"loader"),MR={id:Tb,detector:AR,loader:LR},Eb="block",BR=m(t=>/^\s*block-beta/.test(t),"detector"),IR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-blockDiagram-XN6IQ5JY.CXq3yh8r.js");return{diagram:e}},__vite__mapDeps([42,5,2,1,12,6,7]));return{id:Eb,diagram:t}},"loader"),FR={id:Eb,detector:BR,loader:IR},RR=FR,Ab="architecture",PR=m(t=>/^\s*architecture/.test(t),"detector"),DR=m(async()=>{const{diagram:t}=await Ft(async()=>{const{diagram:e}=await import("./c-architectureDiagram-AYX4OTIS.CNP2CA_M.js");return{diagram:e}},__vite__mapDeps([43,15,16,17,2,4,5,38,6,7]));return{id:Ab,diagram:t}},"loader"),OR={id:Ab,detector:PR,loader:DR},$R=OR,vp=!1,Bo=m(()=>{vp||(vp=!0,ya("error",oR,t=>t.toLowerCase().trim()==="error"),ya("---",{db:{clear:m(()=>{},"clear")},styles:{},renderer:{draw:m(()=>{},"draw")},parser:{parse:m(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:m(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Vd(XI,_R,UF,jF,oF,gF,xF,CF,FF,OF,uR,rF,JI,bR,gR,uF,JF,XF,rR,SF,ER,MR,LF,RR,$R))},"addDiagrams"),NR=m(async()=>{W.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Kr).map(async([n,{detector:r,loader:i}])=>{if(i)try{$l(n)}catch{try{const{diagram:s,id:a}=await i();ya(a,s,r)}catch(s){throw W.error(`Failed to load external diagram with key ${n}. Removing from detectors.`),delete Kr[n],s}}}))).filter(n=>n.status==="rejected");if(e.length>0){W.error(`Failed to load ${e.length} external diagrams`);for(const n of e)W.error(n);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),zR="graphics-document document";function Lb(t,e){t.attr("role",zR),e!==""&&t.attr("aria-roledescription",e)}m(Lb,"setA11yDiagramInfo");function Mb(t,e,n,r){if(t.insert!==void 0){if(n){const i=`chart-desc-${r}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(n)}if(e){const i=`chart-title-${r}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}m(Mb,"addSVGa11yTitleDescription");var dr,Tc=(dr=class{constructor(e,n,r,i,s){this.type=e,this.text=n,this.db=r,this.parser=i,this.renderer=s}static async fromText(e,n={}){var c,h;const r=en(),i=Qc(e,r);e=yM(e)+` +`;try{$l(i)}catch{const u=pv(i);if(!u)throw new Ud(`Diagram ${i} not found.`);const{id:f,diagram:p}=await u();ya(f,p)}const{db:s,parser:a,renderer:o,init:l}=$l(i);return a.parser&&(a.parser.yy=s),(c=s.clear)==null||c.call(s),l==null||l(r),n.title&&((h=s.setDiagramTitle)==null||h.call(s,n.title)),await a.parse(e),new dr(i,e,s,a,o)}async render(e,n){await this.renderer.draw(this.text,e,n,this)}getParser(){return this.parser}getType(){return this.type}},m(dr,"Diagram"),dr),_p=[],jR=m(()=>{_p.forEach(t=>{t()}),_p=[]},"attachFunctions"),qR=m(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Bb(t){const e=t.match(Wd);if(!e)return{text:t,metadata:{}};let n=fk(e[1],{schema:uk})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:t.slice(e[0].length),metadata:r}}m(Bb,"extractFrontMatter");var HR=m(t=>t.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(e,n,r)=>"<"+n+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),WR=m(t=>{const{text:e,metadata:n}=Bb(t),{displayMode:r,title:i,config:s={}}=n;return r&&(s.gantt||(s.gantt={}),s.gantt.displayMode=r),{title:i,config:s,text:e}},"processFrontmatter"),UR=m(t=>{const e=cn.detectInit(t)??{},n=cn.detectDirective(t,"wrap");return Array.isArray(n)?e.wrap=n.some(({type:r})=>r==="wrap"):(n==null?void 0:n.type)==="wrap"&&(e.wrap=!0),{text:iM(t),directive:e}},"processDirectives");function Gh(t){const e=HR(t),n=WR(e),r=UR(n.text),i=Rh(n.config,r.directive);return t=qR(r.text),{code:t,title:n.title,config:i}}m(Gh,"preprocessDiagram");function Ib(t){const e=new TextEncoder().encode(t),n=Array.from(e,r=>String.fromCodePoint(r)).join("");return btoa(n)}m(Ib,"toBase64");var VR=5e4,YR="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",GR="sandbox",XR="loose",KR="http://www.w3.org/2000/svg",ZR="http://www.w3.org/1999/xlink",QR="http://www.w3.org/1999/xhtml",JR="100%",tP="100%",eP="border:0;margin:0;",nP="margin:0",rP="allow-top-navigation-by-user-activation allow-popups",iP='The "iframe" tag is not supported by your browser.',sP=["foreignobject"],aP=["dominant-baseline"];function Xh(t){const e=Gh(t);return ga(),Lv(e.config??{}),e}m(Xh,"processAndSetConfigs");async function Fb(t,e){Bo();try{const{code:n,config:r}=Xh(t);return{diagramType:(await Pb(n)).type,config:r}}catch(n){if(e!=null&&e.suppressErrors)return!1;throw n}}m(Fb,"parse");var kp=m((t,e,n=[])=>` +.${t} ${e} { ${n.join(" !important; ")} !important; }`,"cssImportantStyles"),oP=m((t,e=new Map)=>{var r;let n="";if(t.themeCSS!==void 0&&(n+=` +${t.themeCSS}`),t.fontFamily!==void 0&&(n+=` +:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=` +:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const o=t.htmlLabels??((r=t.flowchart)==null?void 0:r.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(l=>{Cp(l.styles)||o.forEach(c=>{n+=kp(l.id,c,l.styles)}),Cp(l.textStyles)||(n+=kp(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return n},"createCssStyles"),lP=m((t,e,n,r)=>{const i=oP(t,n),s=Gv(e,i,t.themeVariables);return Cc(LI(`${r}{${s}}`),BI)},"createUserStyles"),cP=m((t="",e,n)=>{let r=t;return!n&&!e&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=fi(r),r=r.replace(/
    /g,"
    "),r},"cleanUpSvgCode"),hP=m((t="",e)=>{var i,s;const n=(s=(i=e==null?void 0:e.viewBox)==null?void 0:i.baseVal)!=null&&s.height?e.viewBox.baseVal.height+"px":tP,r=Ib(`${t}`);return``},"putIntoIFrame"),Sp=m((t,e,n,r,i)=>{const s=t.append("div");s.attr("id",n),r&&s.attr("style",r);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",KR);return i&&a.attr("xmlns:xlink",i),a.append("g"),t},"appendDivSvgG");function Ec(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}m(Ec,"sandboxedIframe");var uP=m((t,e,n,r)=>{var i,s,a;(i=t.getElementById(e))==null||i.remove(),(s=t.getElementById(n))==null||s.remove(),(a=t.getElementById(r))==null||a.remove()},"removeExistingElements"),fP=m(async function(t,e,n){var $,z,R,I,E,D;Bo();const r=Xh(e);e=r.code;const i=en();W.debug(i),e.length>((i==null?void 0:i.maxTextSize)??VR)&&(e=YR);const s="#"+t,a="i"+t,o="#"+a,l="d"+t,c="#"+l,h=m(()=>{const j=At(f?o:c).node();j&&"remove"in j&&j.remove()},"removeTempElements");let u=At("body");const f=i.securityLevel===GR,p=i.securityLevel===XR,d=i.fontFamily;if(n!==void 0){if(n&&(n.innerHTML=""),f){const T=Ec(At(n),a);u=At(T.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=At(n);Sp(u,t,l,`font-family: ${d}`,ZR)}else{if(uP(document,t,l,a),f){const T=Ec(At("body"),a);u=At(T.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=At("body");Sp(u,t,l)}let g,x;try{g=await Tc.fromText(e,{title:r.title})}catch(T){if(i.suppressErrorRendering)throw h(),T;g=await Tc.fromText("error"),x=T}const y=u.select(c).node(),b=g.type,w=y.firstChild,v=w.firstChild,k=(z=($=g.renderer).getClasses)==null?void 0:z.call($,e,g),_=lP(i,b,k,s),A=document.createElement("style");A.innerHTML=_,w.insertBefore(A,v);try{await g.renderer.draw(e,t,pp,g)}catch(T){throw i.suppressErrorRendering?h():sR.draw(e,t,pp),T}const O=u.select(`${c} svg`),H=(I=(R=g.db).getAccTitle)==null?void 0:I.call(R),N=(D=(E=g.db).getAccDescription)==null?void 0:D.call(E);Db(b,O,H,N),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",QR);let M=u.select(c).node().innerHTML;if(W.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),M=cP(M,f,te(i.arrowMarkerAbsolute)),f){const T=u.select(c+" svg").node();M=hP(M,T)}else p||(M=Xr.sanitize(M,{ADD_TAGS:sP,ADD_ATTR:aP}));if(jR(),x)throw x;return h(),{diagramType:b,svg:M,bindFunctions:g.db.bindFunctions}},"render");function Rb(t={}){var r;const e=Jt({},t);e!=null&&e.fontFamily&&!((r=e.themeVariables)!=null&&r.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),Ev(e),e!=null&&e.theme&&e.theme in En?e.themeVariables=En[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=En.default.getThemeVariables(e.themeVariables));const n=typeof e=="object"?Tv(e):Qd();Zc(n.logLevel),Bo()}m(Rb,"initialize");var Pb=m((t,e={})=>{const{code:n}=Gh(t);return Tc.fromText(n,e)},"getDiagramFromText");function Db(t,e,n,r){Lb(e,t),Mb(e,n,r,e.attr("id"))}m(Db,"addA11yInfo");var wr=Object.freeze({render:fP,parse:Fb,getDiagramFromText:Pb,initialize:Rb,getConfig:en,setConfig:Jd,getSiteConfig:Qd,updateSiteConfig:Av,reset:m(()=>{ga()},"reset"),globalReset:m(()=>{ga(Zr)},"globalReset"),defaultConfig:Zr});Zc(en().logLevel);ga(en());var pP=m((t,e,n)=>{W.warn(t),Fh(t)?(n&&n(t.str,t.hash),e.push({...t,message:t.str,error:t})):(n&&n(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Ob=m(async function(t={querySelector:".mermaid"}){try{await dP(t)}catch(e){if(Fh(e)&&W.error(e.str),Be.parseError&&Be.parseError(e),!t.suppressErrors)throw W.error("Use the suppressErrors option to suppress these errors"),e}},"run"),dP=m(async function({postRenderCallback:t,querySelector:e,nodes:n}={querySelector:".mermaid"}){const r=wr.getConfig();W.debug(`${t?"":"No "}Callback function found`);let i;if(n)i=n;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");W.debug(`Found ${i.length} diagrams`),(r==null?void 0:r.startOnLoad)!==void 0&&(W.debug("Start On Load: "+(r==null?void 0:r.startOnLoad)),wr.updateSiteConfig({startOnLoad:r==null?void 0:r.startOnLoad}));const s=new cn.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed);let a;const o=[];for(const l of Array.from(i)){if(W.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=dx(cn.entityDecode(a)).trim().replace(//gi,"
    ");const h=cn.detectInit(a);h&&W.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await jb(c,a,l);l.innerHTML=u,t&&await t(c),f&&f(l)}catch(u){pP(u,o,Be.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),$b=m(function(t){wr.initialize(t)},"initialize"),gP=m(async function(t,e,n){W.warn("mermaid.init is deprecated. Please use run instead."),t&&$b(t);const r={postRenderCallback:n,querySelector:".mermaid"};typeof e=="string"?r.querySelector=e:e&&(e instanceof HTMLElement?r.nodes=[e]:r.nodes=e),await Ob(r)},"init"),mP=m(async(t,{lazyLoad:e=!0}={})=>{Bo(),Vd(...t),e===!1&&await NR()},"registerExternalDiagrams"),Nb=m(function(){if(Be.startOnLoad){const{startOnLoad:t}=wr.getConfig();t&&Be.run().catch(e=>W.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Nb,!1);var yP=m(function(t){Be.parseError=t},"setParseErrorHandler"),Ya=[],fl=!1,zb=m(async()=>{if(!fl){for(fl=!0;Ya.length>0;){const t=Ya.shift();if(t)try{await t()}catch(e){W.error("Error executing queue",e)}}fl=!1}},"executeQueue"),xP=m(async(t,e)=>new Promise((n,r)=>{const i=m(()=>new Promise((s,a)=>{wr.parse(t,e).then(o=>{s(o),n(o)},o=>{var l;W.error("Error parsing",o),(l=Be.parseError)==null||l.call(Be,o),a(o),r(o)})}),"performCall");Ya.push(i),zb().catch(r)}),"parse"),jb=m((t,e,n)=>new Promise((r,i)=>{const s=m(()=>new Promise((a,o)=>{wr.render(t,e,n).then(l=>{a(l),r(l)},l=>{var c;W.error("Error parsing",l),(c=Be.parseError)==null||c.call(Be,l),o(l),i(l)})}),"performCall");Ya.push(s),zb().catch(i)}),"render"),Be={startOnLoad:!0,mermaidAPI:wr,parse:xP,render:jb,init:gP,run:Ob,registerExternalDiagrams:mP,registerLayoutLoaders:K0,initialize:$b,parseError:void 0,contentLoaded:Nb,setParseErrorHandler:yP,detectType:Qc,registerIconPacks:Rk},Tp=Be;/*! Check if previously processed *//*! * Wait for document loaded before starting the execution - */const of=t=>t.replace(/[-–—]/g,"").replace(/[,.'’"!@#$%^&*()′″°+=\[\]{}|\\/<>:;_\s]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"").trim(),wo=t=>t.trim().replace(/[©®*"’`]/g,""),lf=({relationships:t,onNodeClick:e})=>{const[r,n]=X.useState(""),i=X.useRef(null),a=s=>{let o=`graph LR -`;return s.forEach(l=>{const{entity1:c,entity2:h,description:u}=l,f=of(c),p=of(h),d=wo(u);o+=` ${f}[${wo(c)}] -->|${d}| ${p}[${wo(h)}] -`,o+=` style ${f} fill:#0077be,color:#fff -`,o+=` style ${p} fill:#0077be,color:#fff -`}),o};return X.useEffect(()=>{sf.initialize({startOnLoad:!1}),n(a(t))},[t]),X.useEffect(()=>{(async()=>{if(i.current)try{const o=`mermaid-diagram-${Math.random().toString(36).substr(2,9)}`,{svg:l,bindFunctions:c}=await sf.render(o,r);i.current.innerHTML=l,c&&c(i.current),i.current.querySelectorAll("g.node").forEach(u=>{u.style.cursor="pointer",u.addEventListener("click",()=>{console.log("Node clicked:",u);const f=u.querySelector("foreignObject div span.nodeLabel");let p="";if(f)p=f.textContent||"";else{const d=u.querySelector("title");d&&(p=d.textContent||"")}p&&e&&e(p)})})}catch(o){console.error("Error rendering Mermaid diagram:",o),console.log("Diagram definition:",r)}})()},[r,e]),r?W.jsx("div",{className:"p-2 transition-opacity duration-300",ref:i}):null};function SF(t,e){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const TF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,EF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AF={};function cf(t,e){return(AF.jsx?EF:TF).test(t)}const LF=/[ \t\n\f\r]/g;function BF(t){return typeof t=="object"?t.type==="text"?hf(t.value):!1:hf(t)}function hf(t){return t.replace(LF,"")===""}class ta{constructor(e,r,n){this.property=e,this.normal=r,n&&(this.space=n)}}ta.prototype.property={};ta.prototype.normal={};ta.prototype.space=null;function ux(t,e){const r={},n={};let i=-1;for(;++i4&&r.slice(0,4)==="data"&&RF.test(e)){if(e.charAt(4)==="-"){const a=e.slice(5).replace(ff,NF);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=e.slice(4);if(!ff.test(a)){let s=a.replace(DF,OF);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=Uc}return new i(n,e)}function OF(t){return"-"+t.toLowerCase()}function NF(t){return t.charAt(1).toUpperCase()}const zF={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},qF=ux([dx,px,yx,xx,IF],"html"),Yc=ux([dx,px,yx,xx,$F],"svg");function HF(t){return t.join(" ").trim()}var bx={},pf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,WF=/\n/g,jF=/^\s*/,UF=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,YF=/^:\s*/,VF=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,GF=/^[;\s]*/,XF=/^\s+|\s+$/g,KF=` -`,df="/",gf="*",zr="",ZF="comment",QF="declaration",JF=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(d){var m=d.match(WF);m&&(r+=m.length);var x=d.lastIndexOf(KF);n=~x?d.length-x:n+d.length}function a(){var d={line:r,column:n};return function(m){return m.position=new s(d),c(),m}}function s(d){this.start=d,this.end={line:r,column:n},this.source=e.source}s.prototype.content=t;function o(d){var m=new Error(e.source+":"+r+":"+n+": "+d);if(m.reason=d,m.filename=e.source,m.line=r,m.column=n,m.source=t,!e.silent)throw m}function l(d){var m=d.exec(t);if(m){var x=m[0];return i(x),t=t.slice(x.length),m}}function c(){l(jF)}function h(d){var m;for(d=d||[];m=u();)m!==!1&&d.push(m);return d}function u(){var d=a();if(!(df!=t.charAt(0)||gf!=t.charAt(1))){for(var m=2;zr!=t.charAt(m)&&(gf!=t.charAt(m)||df!=t.charAt(m+1));)++m;if(m+=2,zr===t.charAt(m-1))return o("End of comment missing");var x=t.slice(2,m-2);return n+=2,i(x),t=t.slice(m),n+=2,d({type:ZF,comment:x})}}function f(){var d=a(),m=l(UF);if(m){if(u(),!l(YF))return o("property missing ':'");var x=l(VF),y=d({type:QF,property:mf(m[0].replace(pf,zr)),value:x?mf(x[0].replace(pf,zr)):zr});return l(GF),y}}function p(){var d=[];h(d);for(var m;m=f();)m!==!1&&(d.push(m),h(d));return d}return c(),p()};function mf(t){return t?t.replace(XF,zr):zr}var tI=$o&&$o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bx,"__esModule",{value:!0});var yf=bx.default=rI,eI=tI(JF);function rI(t,e){var r=null;if(!t||typeof t!="string")return r;var n=(0,eI.default)(t),i=typeof e=="function";return n.forEach(function(a){if(a.type==="declaration"){var s=a.property,o=a.value;i?e(s,o,a):o&&(r=r||{},r[s]=o)}}),r}const nI=yf.default||yf,wx=Cx("end"),Vc=Cx("start");function Cx(t){return e;function e(r){const n=r&&r.position&&r.position[t]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function iI(t){const e=Vc(t),r=wx(t);if(e&&r)return{start:e,end:r}}function Ai(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?xf(t.position):"start"in t||"end"in t?xf(t):"line"in t||"column"in t?$l(t):""}function $l(t){return bf(t&&t.line)+":"+bf(t&&t.column)}function xf(t){return $l(t&&t.start)+"-"+$l(t&&t.end)}function bf(t){return t&&typeof t=="number"?t:1}class ee extends Error{constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},s=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof e=="string"?i=e:!a.cause&&e&&(s=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=Ai(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}ee.prototype.file="";ee.prototype.name="";ee.prototype.reason="";ee.prototype.message="";ee.prototype.stack="";ee.prototype.column=void 0;ee.prototype.line=void 0;ee.prototype.ancestors=void 0;ee.prototype.cause=void 0;ee.prototype.fatal=void 0;ee.prototype.place=void 0;ee.prototype.ruleId=void 0;ee.prototype.source=void 0;const Gc={}.hasOwnProperty,aI=new Map,sI=/[A-Z]/g,oI=/-([a-z])/g,lI=new Set(["table","tbody","thead","tfoot","tr"]),cI=new Set(["td","th"]),kx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function hI(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=e.filePath||void 0;let n;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=xI(r,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=yI(r,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:n,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Yc:qF,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},a=_x(i,t,void 0);return a&&typeof a!="string"?a:i.create(t,i.Fragment,{children:a||void 0},void 0)}function _x(t,e,r){if(e.type==="element")return uI(t,e,r);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return fI(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return dI(t,e,r);if(e.type==="mdxjsEsm")return pI(t,e);if(e.type==="root")return gI(t,e,r);if(e.type==="text")return mI(t,e)}function uI(t,e,r){const n=t.schema;let i=n;e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Yc,t.schema=i),t.ancestors.push(e);const a=Sx(t,e.tagName,!1),s=bI(t,e);let o=Kc(t,e);return lI.has(e.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!BF(l):!0})),vx(t,s,a,e),Xc(s,o),t.ancestors.pop(),t.schema=n,t.create(e,a,s,r)}function fI(t,e){if(e.data&&e.data.estree&&t.evaluater){const n=e.data.estree.body[0];return n.type,t.evaluater.evaluateExpression(n.expression)}Wi(t,e.position)}function pI(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Wi(t,e.position)}function dI(t,e,r){const n=t.schema;let i=n;e.name==="svg"&&n.space==="html"&&(i=Yc,t.schema=i),t.ancestors.push(e);const a=e.name===null?t.Fragment:Sx(t,e.name,!0),s=wI(t,e),o=Kc(t,e);return vx(t,s,a,e),Xc(s,o),t.ancestors.pop(),t.schema=n,t.create(e,a,s,r)}function gI(t,e,r){const n={};return Xc(n,Kc(t,e)),t.create(e,t.Fragment,n,r)}function mI(t,e){return e.value}function vx(t,e,r,n){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(e.node=n)}function Xc(t,e){if(e.length>0){const r=e.length>1?e:e[0];r&&(t.children=r)}}function yI(t,e,r){return n;function n(i,a,s,o){const c=Array.isArray(s.children)?r:e;return o?c(a,s,o):c(a,s)}}function xI(t,e){return r;function r(n,i,a,s){const o=Array.isArray(a.children),l=Vc(n);return e(i,a,s,o,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function bI(t,e){const r={};let n,i;for(i in e.properties)if(i!=="children"&&Gc.call(e.properties,i)){const a=CI(t,i,e.properties[i]);if(a){const[s,o]=a;t.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&cI.has(e.tagName)?n=o:r[s]=o}}if(n){const a=r.style||(r.style={});a[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function wI(t,e){const r={};for(const n of e.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&t.evaluater){const a=n.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(r,t.evaluater.evaluateExpression(o.argument))}else Wi(t,e.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&t.evaluater){const o=n.value.data.estree.body[0];o.type,a=t.evaluater.evaluateExpression(o.expression)}else Wi(t,e.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function Kc(t,e){const r=[];let n=-1;const i=t.passKeys?new Map:aI;for(;++ni?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(e,r),t.splice(...s);else for(r&&t.splice(e,r);a0?(er(t,t.length,0,e),t):e}const kf={}.hasOwnProperty;function BI(t){const e={};let r=-1;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function xn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ge=Fr(/[A-Za-z]/),ke=Fr(/[\dA-Za-z]/),II=Fr(/[#-'*+\--9=?A-Z^-~]/);function Rl(t){return t!==null&&(t<32||t===127)}const Dl=Fr(/\d/),$I=Fr(/[\dA-Fa-f]/),RI=Fr(/[!-/:-@[-`{-~]/);function lt(t){return t!==null&&t<-2}function xe(t){return t!==null&&(t<0||t===32)}function Ct(t){return t===-2||t===-1||t===32}const DI=Fr(new RegExp("\\p{P}|\\p{S}","u")),PI=Fr(/\s/);function Fr(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Gn(t){const e=[];let r=-1,n=0,i=0;for(;++r55295&&a<57344){const o=t.charCodeAt(r+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(e.push(t.slice(n,r),encodeURIComponent(s)),n=r+i+1,s=""),i&&(r+=i,i=0)}return e.join("")+t.slice(n)}function Bt(t,e,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return Ct(l)?(t.enter(r),o(l)):e(l)}function o(l){return Ct(l)&&a++s))return;const F=e.events.length;let D=F,q,O;for(;D--;)if(e.events[D][0]==="exit"&&e.events[D][1].type==="chunkFlow"){if(q){O=e.events[D][1].end;break}q=!0}for(y(n),_=F;_C;){const S=r[v];e.containerState=S[1],S[0].exit.call(e,t)}r.length=C}function b(){i.write([null]),a=void 0,i=void 0,e.containerState._closeFlow=void 0}}function HI(t,e,r){return Bt(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vf(t){if(t===null||xe(t)||PI(t))return 1;if(DI(t))return 2}function Qc(t,e,r){const n=[];let i=-1;for(;++i1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const u={...t[n][1].end},f={...t[r][1].start};Sf(u,-l),Sf(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...t[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:f},a={type:l>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},t[n][1].end={...s.start},t[r][1].start={...o.end},c=[],t[n][1].end.offset-t[n][1].start.offset&&(c=Be(c,[["enter",t[n][1],e],["exit",t[n][1],e]])),c=Be(c,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",a,e]]),c=Be(c,Qc(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),c=Be(c,[["exit",a,e],["enter",o,e],["exit",o,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(h=2,c=Be(c,[["enter",t[r][1],e],["exit",t[r][1],e]])):h=0,er(t,n-1,r-n+3,c),r=n+c.length-h-2;break}}for(r=-1;++r0&&Ct(_)?Bt(t,b,"linePrefix",a+1)(_):b(_)}function b(_){return _===null||lt(_)?t.check(Tf,m,v)(_):(t.enter("codeFlowValue"),C(_))}function C(_){return _===null||lt(_)?(t.exit("codeFlowValue"),b(_)):(t.consume(_),C)}function v(_){return t.exit("codeFenced"),e(_)}function S(_,F,D){let q=0;return O;function O(T){return _.enter("lineEnding"),_.consume(T),_.exit("lineEnding"),B}function B(T){return _.enter("codeFencedFence"),Ct(T)?Bt(_,P,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):P(T)}function P(T){return T===o?(_.enter("codeFencedFenceSequence"),N(T)):D(T)}function N(T){return T===o?(q++,_.consume(T),N):q>=s?(_.exit("codeFencedFenceSequence"),Ct(T)?Bt(_,L,"whitespace")(T):L(T)):D(T)}function L(T){return T===null||lt(T)?(_.exit("codeFencedFence"),F(T)):D(T)}}}function t$(t,e,r){const n=this;return i;function i(s){return s===null?r(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}const _o={name:"codeIndented",tokenize:r$},e$={partial:!0,tokenize:n$};function r$(t,e,r){const n=this;return i;function i(c){return t.enter("codeIndented"),Bt(t,a,"linePrefix",5)(c)}function a(c){const h=n.events[n.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):r(c)}function s(c){return c===null?l(c):lt(c)?t.attempt(e$,s,l)(c):(t.enter("codeFlowValue"),o(c))}function o(c){return c===null||lt(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),o)}function l(c){return t.exit("codeIndented"),e(c)}}function n$(t,e,r){const n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):lt(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):Bt(t,a,"linePrefix",5)(s)}function a(s){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(s):lt(s)?i(s):r(s)}}const i$={name:"codeText",previous:s$,resolve:a$,tokenize:o$};function a$(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,r,n){const i=r||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&fi(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),fi(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fi(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(s):t.interrupt(n.parser.constructs.flow,r,e)(s)}}function Fx(t,e,r,n,i,a,s,o,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return u;function u(y){return y===60?(t.enter(n),t.enter(i),t.enter(a),t.consume(y),t.exit(a),f):y===null||y===32||y===41||Rl(y)?r(y):(t.enter(n),t.enter(s),t.enter(o),t.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(t.enter(a),t.consume(y),t.exit(a),t.exit(i),t.exit(n),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(t.exit("chunkString"),t.exit(o),f(y)):y===null||y===60||lt(y)?r(y):(t.consume(y),y===92?d:p)}function d(y){return y===60||y===62||y===92?(t.consume(y),p):p(y)}function m(y){return!h&&(y===null||y===41||xe(y))?(t.exit("chunkString"),t.exit(o),t.exit(s),t.exit(n),e(y)):h999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?r(p):p===93?(t.exit(a),t.enter(i),t.consume(p),t.exit(i),t.exit(n),e):lt(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),h):(t.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===null||p===91||p===93||lt(p)||o++>999?(t.exit("chunkString"),h(p)):(t.consume(p),l||(l=!Ct(p)),p===92?f:u)}function f(p){return p===91||p===92||p===93?(t.consume(p),o++,u):u(p)}}function $x(t,e,r,n,i,a){let s;return o;function o(f){return f===34||f===39||f===40?(t.enter(n),t.enter(i),t.consume(f),t.exit(i),s=f===40?41:f,l):r(f)}function l(f){return f===s?(t.enter(i),t.consume(f),t.exit(i),t.exit(n),e):(t.enter(a),c(f))}function c(f){return f===s?(t.exit(a),l(s)):f===null?r(f):lt(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Bt(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===s||f===null||lt(f)?(t.exit("chunkString"),c(f)):(t.consume(f),f===92?u:h)}function u(f){return f===s||f===92?(t.consume(f),h):h(f)}}function Li(t,e){let r;return n;function n(i){return lt(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):Ct(i)?Bt(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}const g$={name:"definition",tokenize:y$},m$={partial:!0,tokenize:x$};function y$(t,e,r){const n=this;let i;return a;function a(p){return t.enter("definition"),s(p)}function s(p){return Ix.call(n,t,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=xn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):r(p)}function l(p){return xe(p)?Li(t,c)(p):c(p)}function c(p){return Fx(t,h,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return t.attempt(m$,u,u)(p)}function u(p){return Ct(p)?Bt(t,f,"whitespace")(p):f(p)}function f(p){return p===null||lt(p)?(t.exit("definition"),n.parser.defined.push(i),e(p)):r(p)}}function x$(t,e,r){return n;function n(o){return xe(o)?Li(t,i)(o):r(o)}function i(o){return $x(t,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return Ct(o)?Bt(t,s,"whitespace")(o):s(o)}function s(o){return o===null||lt(o)?e(o):r(o)}}const b$={name:"hardBreakEscape",tokenize:w$};function w$(t,e,r){return n;function n(a){return t.enter("hardBreakEscape"),t.consume(a),i}function i(a){return lt(a)?(t.exit("hardBreakEscape"),e(a)):r(a)}}const C$={name:"headingAtx",resolve:k$,tokenize:_$};function k$(t,e){let r=t.length-2,n=3,i,a;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},a={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},er(t,n,r-n+1,[["enter",i,e],["enter",a,e],["exit",a,e],["exit",i,e]])),t}function _$(t,e,r){let n=0;return i;function i(h){return t.enter("atxHeading"),a(h)}function a(h){return t.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&n++<6?(t.consume(h),s):h===null||xe(h)?(t.exit("atxHeadingSequence"),o(h)):r(h)}function o(h){return h===35?(t.enter("atxHeadingSequence"),l(h)):h===null||lt(h)?(t.exit("atxHeading"),e(h)):Ct(h)?Bt(t,o,"whitespace")(h):(t.enter("atxHeadingText"),c(h))}function l(h){return h===35?(t.consume(h),l):(t.exit("atxHeadingSequence"),o(h))}function c(h){return h===null||h===35||xe(h)?(t.exit("atxHeadingText"),o(h)):(t.consume(h),c)}}const v$=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Af=["pre","script","style","textarea"],S$={concrete:!0,name:"htmlFlow",resolveTo:A$,tokenize:L$},T$={partial:!0,tokenize:M$},E$={partial:!0,tokenize:B$};function A$(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function L$(t,e,r){const n=this;let i,a,s,o,l;return c;function c(k){return h(k)}function h(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),u}function u(k){return k===33?(t.consume(k),f):k===47?(t.consume(k),a=!0,m):k===63?(t.consume(k),i=3,n.interrupt?e:w):Ge(k)?(t.consume(k),s=String.fromCharCode(k),x):r(k)}function f(k){return k===45?(t.consume(k),i=2,p):k===91?(t.consume(k),i=5,o=0,d):Ge(k)?(t.consume(k),i=4,n.interrupt?e:w):r(k)}function p(k){return k===45?(t.consume(k),n.interrupt?e:w):r(k)}function d(k){const xt="CDATA[";return k===xt.charCodeAt(o++)?(t.consume(k),o===xt.length?n.interrupt?e:P:d):r(k)}function m(k){return Ge(k)?(t.consume(k),s=String.fromCharCode(k),x):r(k)}function x(k){if(k===null||k===47||k===62||xe(k)){const xt=k===47,ft=s.toLowerCase();return!xt&&!a&&Af.includes(ft)?(i=1,n.interrupt?e(k):P(k)):v$.includes(s.toLowerCase())?(i=6,xt?(t.consume(k),y):n.interrupt?e(k):P(k)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(k):a?b(k):C(k))}return k===45||ke(k)?(t.consume(k),s+=String.fromCharCode(k),x):r(k)}function y(k){return k===62?(t.consume(k),n.interrupt?e:P):r(k)}function b(k){return Ct(k)?(t.consume(k),b):O(k)}function C(k){return k===47?(t.consume(k),O):k===58||k===95||Ge(k)?(t.consume(k),v):Ct(k)?(t.consume(k),C):O(k)}function v(k){return k===45||k===46||k===58||k===95||ke(k)?(t.consume(k),v):S(k)}function S(k){return k===61?(t.consume(k),_):Ct(k)?(t.consume(k),S):C(k)}function _(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(t.consume(k),l=k,F):Ct(k)?(t.consume(k),_):D(k)}function F(k){return k===l?(t.consume(k),l=null,q):k===null||lt(k)?r(k):(t.consume(k),F)}function D(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||xe(k)?S(k):(t.consume(k),D)}function q(k){return k===47||k===62||Ct(k)?C(k):r(k)}function O(k){return k===62?(t.consume(k),B):r(k)}function B(k){return k===null||lt(k)?P(k):Ct(k)?(t.consume(k),B):r(k)}function P(k){return k===45&&i===2?(t.consume(k),A):k===60&&i===1?(t.consume(k),$):k===62&&i===4?(t.consume(k),G):k===63&&i===3?(t.consume(k),w):k===93&&i===5?(t.consume(k),V):lt(k)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(T$,dt,N)(k)):k===null||lt(k)?(t.exit("htmlFlowData"),N(k)):(t.consume(k),P)}function N(k){return t.check(E$,L,dt)(k)}function L(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),T}function T(k){return k===null||lt(k)?N(k):(t.enter("htmlFlowData"),P(k))}function A(k){return k===45?(t.consume(k),w):P(k)}function $(k){return k===47?(t.consume(k),s="",I):P(k)}function I(k){if(k===62){const xt=s.toLowerCase();return Af.includes(xt)?(t.consume(k),G):P(k)}return Ge(k)&&s.length<8?(t.consume(k),s+=String.fromCharCode(k),I):P(k)}function V(k){return k===93?(t.consume(k),w):P(k)}function w(k){return k===62?(t.consume(k),G):k===45&&i===2?(t.consume(k),w):P(k)}function G(k){return k===null||lt(k)?(t.exit("htmlFlowData"),dt(k)):(t.consume(k),G)}function dt(k){return t.exit("htmlFlow"),e(k)}}function B$(t,e,r){const n=this;return i;function i(s){return lt(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a):r(s)}function a(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}function M$(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(js,e,r)}}const F$={name:"htmlText",tokenize:I$};function I$(t,e,r){const n=this;let i,a,s;return o;function o(w){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(w),l}function l(w){return w===33?(t.consume(w),c):w===47?(t.consume(w),S):w===63?(t.consume(w),C):Ge(w)?(t.consume(w),D):r(w)}function c(w){return w===45?(t.consume(w),h):w===91?(t.consume(w),a=0,d):Ge(w)?(t.consume(w),b):r(w)}function h(w){return w===45?(t.consume(w),p):r(w)}function u(w){return w===null?r(w):w===45?(t.consume(w),f):lt(w)?(s=u,$(w)):(t.consume(w),u)}function f(w){return w===45?(t.consume(w),p):u(w)}function p(w){return w===62?A(w):w===45?f(w):u(w)}function d(w){const G="CDATA[";return w===G.charCodeAt(a++)?(t.consume(w),a===G.length?m:d):r(w)}function m(w){return w===null?r(w):w===93?(t.consume(w),x):lt(w)?(s=m,$(w)):(t.consume(w),m)}function x(w){return w===93?(t.consume(w),y):m(w)}function y(w){return w===62?A(w):w===93?(t.consume(w),y):m(w)}function b(w){return w===null||w===62?A(w):lt(w)?(s=b,$(w)):(t.consume(w),b)}function C(w){return w===null?r(w):w===63?(t.consume(w),v):lt(w)?(s=C,$(w)):(t.consume(w),C)}function v(w){return w===62?A(w):C(w)}function S(w){return Ge(w)?(t.consume(w),_):r(w)}function _(w){return w===45||ke(w)?(t.consume(w),_):F(w)}function F(w){return lt(w)?(s=F,$(w)):Ct(w)?(t.consume(w),F):A(w)}function D(w){return w===45||ke(w)?(t.consume(w),D):w===47||w===62||xe(w)?q(w):r(w)}function q(w){return w===47?(t.consume(w),A):w===58||w===95||Ge(w)?(t.consume(w),O):lt(w)?(s=q,$(w)):Ct(w)?(t.consume(w),q):A(w)}function O(w){return w===45||w===46||w===58||w===95||ke(w)?(t.consume(w),O):B(w)}function B(w){return w===61?(t.consume(w),P):lt(w)?(s=B,$(w)):Ct(w)?(t.consume(w),B):q(w)}function P(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(t.consume(w),i=w,N):lt(w)?(s=P,$(w)):Ct(w)?(t.consume(w),P):(t.consume(w),L)}function N(w){return w===i?(t.consume(w),i=void 0,T):w===null?r(w):lt(w)?(s=N,$(w)):(t.consume(w),N)}function L(w){return w===null||w===34||w===39||w===60||w===61||w===96?r(w):w===47||w===62||xe(w)?q(w):(t.consume(w),L)}function T(w){return w===47||w===62||xe(w)?q(w):r(w)}function A(w){return w===62?(t.consume(w),t.exit("htmlTextData"),t.exit("htmlText"),e):r(w)}function $(w){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),I}function I(w){return Ct(w)?Bt(t,V,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):V(w)}function V(w){return t.enter("htmlTextData"),s(w)}}const Jc={name:"labelEnd",resolveAll:P$,resolveTo:O$,tokenize:N$},$$={tokenize:z$},R$={tokenize:q$},D$={tokenize:H$};function P$(t){let e=-1;const r=[];for(;++e=3&&(c===null||lt(c))?(t.exit("thematicBreak"),e(c)):r(c)}function l(c){return c===i?(t.consume(c),n++,l):(t.exit("thematicBreakSequence"),Ct(c)?Bt(t,o,"whitespace")(c):o(c))}}const de={continuation:{tokenize:Q$},exit:tR,name:"list",tokenize:Z$},X$={partial:!0,tokenize:eR},K$={partial:!0,tokenize:J$};function Z$(t,e,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(p){const d=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:Dl(p)){if(n.containerState.type||(n.containerState.type=d,t.enter(d,{_container:!0})),d==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(Fa,r,c)(p):c(p);if(!n.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return r(p)}function l(p){return Dl(p)&&++s<10?(t.consume(p),l):(!n.interrupt||s<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),c(p)):r(p)}function c(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,t.check(js,n.interrupt?r:h,t.attempt(X$,f,u))}function h(p){return n.containerState.initialBlankLine=!0,a++,f(p)}function u(p){return Ct(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),f):r(p)}function f(p){return n.containerState.size=a+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function Q$(t,e,r){const n=this;return n.containerState._closeFlow=void 0,t.check(js,i,a);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Bt(t,e,"listItemIndent",n.containerState.size+1)(o)}function a(o){return n.containerState.furtherBlankLines||!Ct(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(K$,e,s)(o))}function s(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,Bt(t,t.attempt(de,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function J$(t,e,r){const n=this;return Bt(t,i,"listItemIndent",n.containerState.size+1);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(a):r(a)}}function tR(t){t.exit(this.containerState.type)}function eR(t,e,r){const n=this;return Bt(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=n.events[n.events.length-1];return!Ct(a)&&s&&s[1].type==="listItemPrefixWhitespace"?e(a):r(a)}}const Lf={name:"setextUnderline",resolveTo:rR,tokenize:nR};function rR(t,e){let r=t.length,n,i,a;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!a&&t[r][1].type==="definition"&&(a=r);const s={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",a?(t.splice(i,0,["enter",s,e]),t.splice(a+1,0,["exit",t[n][1],e]),t[n][1].end={...t[a][1].end}):t[n][1]=s,t.push(["exit",s,e]),t}function nR(t,e,r){const n=this;let i;return a;function a(c){let h=n.events.length,u;for(;h--;)if(n.events[h][1].type!=="lineEnding"&&n.events[h][1].type!=="linePrefix"&&n.events[h][1].type!=="content"){u=n.events[h][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||u)?(t.enter("setextHeadingLine"),i=c,s(c)):r(c)}function s(c){return t.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(t.consume(c),o):(t.exit("setextHeadingLineSequence"),Ct(c)?Bt(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||lt(c)?(t.exit("setextHeadingLine"),e(c)):r(c)}}const iR={tokenize:aR};function aR(t){const e=this,r=t.attempt(js,n,t.attempt(this.parser.constructs.flowInitial,i,Bt(t,t.attempt(this.parser.constructs.flow,i,t.attempt(h$,i)),"linePrefix")));return r;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEndingBlank"),t.consume(a),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),e.currentConstruct=void 0,r}}const sR={resolveAll:Dx()},oR=Rx("string"),lR=Rx("text");function Rx(t){return{resolveAll:Dx(t==="text"?cR:void 0),tokenize:e};function e(r){const n=this,i=this.parser.constructs[t],a=r.attempt(i,s,o);return s;function s(h){return c(h)?a(h):o(h)}function o(h){if(h===null){r.consume(h);return}return r.enter("data"),r.consume(h),l}function l(h){return c(h)?(r.exit("data"),a(h)):(r.consume(h),l)}function c(h){if(h===null)return!0;const u=i[h];let f=-1;if(u)for(;++f-1){const o=s[0];typeof o=="string"?s[0]=o.slice(n):s.shift()}a>0&&s.push(t[i].slice(0,a))}return s}function kR(t,e){let r=-1;const n=[];let i;for(;++r0){const he=ut.tokenStack[ut.tokenStack.length-1];(he[1]||Mf).call(ut,void 0,he[0])}for(U.position={start:wr(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:wr(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},wt=-1;++wt1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function NR(t,e){const r={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function zR(t,e){if(t.options.allowDangerousHtml){const r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}function Nx(t,e){const r=e.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];const i=t.all(e),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=n:i.push({type:"text",value:n}),i}function qR(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return Nx(t,e);const i={src:Gn(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,a),t.applyData(e,a)}function HR(t,e){const r={src:Gn(e.url)};e.alt!==null&&e.alt!==void 0&&(r.alt=e.alt),e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,n),t.applyData(e,n)}function WR(t,e){const r={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(e,n),t.applyData(e,n)}function jR(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return Nx(t,e);const i={href:Gn(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,a),t.applyData(e,a)}function UR(t,e){const r={href:Gn(e.url)};e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function YR(t,e,r){const n=t.all(e),i=r?VR(r):zx(e),a={},s=[];if(typeof e.checked=="boolean"){const h=n[0];let u;h&&h.type==="element"&&h.tagName==="p"?u=h:(u={type:"element",tagName:"p",properties:{},children:[]},n.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o1}function GR(t,e){const r={},n=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(r.start=e.start);++i0){const s={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},o=Vc(e.children[1]),l=wx(e.children[e.children.length-1]);o&&l&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,a),t.applyData(e,a)}function JR(t,e,r){const n=r?r.children:void 0,a=(n?n.indexOf(e):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,o=s?s.length:e.children.length;let l=-1;const c=[];for(;++l0,!0),n[0]),i=n.index+n[0].length,n=r.exec(e);return a.push($f(e.slice(i),i>0,!1)),a.join("")}function $f(t,e,r){let n=0,i=t.length;if(e){let a=t.codePointAt(n);for(;a===Ff||a===If;)n++,a=t.codePointAt(n)}if(r){let a=t.codePointAt(i-1);for(;a===Ff||a===If;)i--,a=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}function rD(t,e){const r={type:"text",value:eD(String(e.value))};return t.patch(e,r),t.applyData(e,r)}function nD(t,e){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}const iD={blockquote:IR,break:$R,code:RR,delete:DR,emphasis:PR,footnoteReference:OR,heading:NR,html:zR,imageReference:qR,image:HR,inlineCode:WR,linkReference:jR,link:UR,listItem:YR,list:GR,paragraph:XR,root:KR,strong:ZR,table:QR,tableCell:tD,tableRow:JR,text:rD,thematicBreak:nD,toml:ma,yaml:ma,definition:ma,footnoteDefinition:ma};function ma(){}const qx=-1,Us=0,ds=1,gs=2,th=3,eh=4,rh=5,nh=6,Hx=7,Wx=8,Rf=typeof self=="object"?self:globalThis,aD=(t,e)=>{const r=(i,a)=>(t.set(a,i),i),n=i=>{if(t.has(i))return t.get(i);const[a,s]=e[i];switch(a){case Us:case qx:return r(s,i);case ds:{const o=r([],i);for(const l of s)o.push(n(l));return o}case gs:{const o=r({},i);for(const[l,c]of s)o[n(l)]=n(c);return o}case th:return r(new Date(s),i);case eh:{const{source:o,flags:l}=s;return r(new RegExp(o,l),i)}case rh:{const o=r(new Map,i);for(const[l,c]of s)o.set(n(l),n(c));return o}case nh:{const o=r(new Set,i);for(const l of s)o.add(n(l));return o}case Hx:{const{name:o,message:l}=s;return r(new Rf[o](l),i)}case Wx:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i)}return r(new Rf[a](s),i)};return n},Df=t=>aD(new Map,t)(0),fn="",{toString:sD}={},{keys:oD}=Object,pi=t=>{const e=typeof t;if(e!=="object"||!t)return[Us,e];const r=sD.call(t).slice(8,-1);switch(r){case"Array":return[ds,fn];case"Object":return[gs,fn];case"Date":return[th,fn];case"RegExp":return[eh,fn];case"Map":return[rh,fn];case"Set":return[nh,fn]}return r.includes("Array")?[ds,r]:r.includes("Error")?[Hx,r]:[gs,r]},ya=([t,e])=>t===Us&&(e==="function"||e==="symbol"),lD=(t,e,r,n)=>{const i=(s,o)=>{const l=n.push(s)-1;return r.set(o,l),l},a=s=>{if(r.has(s))return r.get(s);let[o,l]=pi(s);switch(o){case Us:{let h=s;switch(l){case"bigint":o=Wx,h=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return i([qx],s)}return i([o,h],s)}case ds:{if(l)return i([l,[...s]],s);const h=[],u=i([o,h],s);for(const f of s)h.push(a(f));return u}case gs:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(e&&"toJSON"in s)return a(s.toJSON());const h=[],u=i([o,h],s);for(const f of oD(s))(t||!ya(pi(s[f])))&&h.push([a(f),a(s[f])]);return u}case th:return i([o,s.toISOString()],s);case eh:{const{source:h,flags:u}=s;return i([o,{source:h,flags:u}],s)}case rh:{const h=[],u=i([o,h],s);for(const[f,p]of s)(t||!(ya(pi(f))||ya(pi(p))))&&h.push([a(f),a(p)]);return u}case nh:{const h=[],u=i([o,h],s);for(const f of s)(t||!ya(pi(f)))&&h.push(a(f));return u}}const{message:c}=s;return i([o,{name:l,message:c}],s)};return a},Pf=(t,{json:e,lossy:r}={})=>{const n=[];return lD(!(e||r),!!e,new Map,n)(t),n},ms=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?Df(Pf(t,e)):structuredClone(t):(t,e)=>Df(Pf(t,e));function cD(t,e){const r=[{type:"text",value:"↩"}];return e>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),r}function hD(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function uD(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||cD,n=t.options.footnoteBackLabel||hD,i=t.options.footnoteLabel||"Footnotes",a=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l0&&d.push({type:"text",value:" "});let b=typeof r=="string"?r:r(l,p);typeof b=="string"&&(b={type:"text",value:b}),d.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,p),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const x=h[h.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const b=x.children[x.children.length-1];b&&b.type==="text"?b.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...d)}else h.push(...d);const y={type:"element",tagName:"li",properties:{id:e+"fn-"+f},children:t.wrap(h,!0)};t.patch(c,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ms(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` + */const pl=t=>t.replace(/[-–—]/g,"").replace(/[,.'’"!@#$%^&*()′″°+=\[\]{}|\\/<>:;_\s]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"").trim(),dl=t=>t.trim().replace(/[©®*"’`]/g,"");function Ep(t,[e,n]){return Math.min(n,Math.max(e,t))}var bP=B.createContext(void 0);function Kh(t){const e=B.useContext(bP);return t||e||"ltr"}const wP=["top","right","bottom","left"],Gn=Math.min,Le=Math.max,Ga=Math.round,Gs=Math.floor,dn=t=>({x:t,y:t}),CP={left:"right",right:"left",bottom:"top",top:"bottom"},vP={start:"end",end:"start"};function Ac(t,e,n){return Le(t,Gn(e,n))}function Mn(t,e){return typeof t=="function"?t(e):t}function Bn(t){return t.split("-")[0]}function yi(t){return t.split("-")[1]}function Zh(t){return t==="x"?"y":"x"}function Qh(t){return t==="y"?"height":"width"}function Xn(t){return["top","bottom"].includes(Bn(t))?"y":"x"}function Jh(t){return Zh(Xn(t))}function _P(t,e,n){n===void 0&&(n=!1);const r=yi(t),i=Jh(t),s=Qh(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Xa(a)),[a,Xa(a)]}function kP(t){const e=Xa(t);return[Lc(t),e,Lc(e)]}function Lc(t){return t.replace(/start|end/g,e=>vP[e])}function SP(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function TP(t,e,n,r){const i=yi(t);let s=SP(Bn(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(Lc)))),s}function Xa(t){return t.replace(/left|right|bottom|top/g,e=>CP[e])}function EP(t){return{top:0,right:0,bottom:0,left:0,...t}}function qb(t){return typeof t!="number"?EP(t):{top:t,right:t,bottom:t,left:t}}function Ka(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Ap(t,e,n){let{reference:r,floating:i}=t;const s=Xn(e),a=Jh(e),o=Qh(a),l=Bn(e),c=s==="y",h=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2;let p;switch(l){case"top":p={x:h,y:r.y-i.height};break;case"bottom":p={x:h,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-i.width,y:u};break;default:p={x:r.x,y:r.y}}switch(yi(e)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const AP=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:h,y:u}=Ap(c,r,l),f=r,p={},d=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=e,{element:c,padding:h=0}=Mn(t,e)||{};if(c==null)return{};const u=qb(h),f={x:n,y:r},p=Jh(i),d=Qh(p),g=await a.getDimensions(c),x=p==="y",y=x?"top":"left",b=x?"bottom":"right",w=x?"clientHeight":"clientWidth",v=s.reference[d]+s.reference[p]-f[p]-s.floating[d],k=f[p]-s.reference[p],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=_?_[w]:0;(!A||!await(a.isElement==null?void 0:a.isElement(_)))&&(A=o.floating[w]||s.floating[d]);const O=v/2-k/2,H=A/2-g[d]/2-1,N=Gn(u[y],H),M=Gn(u[b],H),$=N,z=A-g[d]-M,R=A/2-g[d]/2+O,I=Ac($,R,z),E=!l.arrow&&yi(i)!=null&&R!==I&&s.reference[d]/2-(R<$?N:M)-g[d]/2<0,D=E?R<$?R-$:R-z:0;return{[p]:f[p]+D,data:{[p]:I,centerOffset:R-I-D,...E&&{alignmentOffset:D}},reset:E}}}),MP=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=e,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...x}=Mn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Bn(i),b=Xn(o),w=Bn(o)===o,v=await(l.isRTL==null?void 0:l.isRTL(c.floating)),k=f||(w||!g?[Xa(o)]:kP(o)),_=d!=="none";!f&&_&&k.push(...TP(o,g,d,v));const A=[o,...k],O=await xs(e,x),H=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&H.push(O[y]),u){const R=_P(i,a,v);H.push(O[R[0]],O[R[1]])}if(N=[...N,{placement:i,overflows:H}],!H.every(R=>R<=0)){var M,$;const R=(((M=s.flip)==null?void 0:M.index)||0)+1,I=A[R];if(I)return{data:{index:R,overflows:N},reset:{placement:I}};let E=($=N.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:$.placement;if(!E)switch(p){case"bestFit":{var z;const D=(z=N.filter(T=>{if(_){const j=Xn(T.placement);return j===b||j==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(j=>j>0).reduce((j,C)=>j+C,0)]).sort((T,j)=>T[1]-j[1])[0])==null?void 0:z[0];D&&(E=D);break}case"initialPlacement":E=o;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function Lp(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Mp(t){return wP.some(e=>t[e]>=0)}const BP=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=Mn(t,e);switch(r){case"referenceHidden":{const s=await xs(e,{...i,elementContext:"reference"}),a=Lp(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Mp(a)}}}case"escaped":{const s=await xs(e,{...i,altBoundary:!0}),a=Lp(s,n.floating);return{data:{escapedOffsets:a,escaped:Mp(a)}}}default:return{}}}}};async function IP(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Bn(n),o=yi(n),l=Xn(n)==="y",c=["left","top"].includes(a)?-1:1,h=s&&l?-1:1,u=Mn(e,t);let{mainAxis:f,crossAxis:p,alignmentAxis:d}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof d=="number"&&(p=o==="end"?d*-1:d),l?{x:p*h,y:f*c}:{x:f*c,y:p*h}}const FP=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=e,l=await IP(e,t);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},RP=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=Mn(t,e),c={x:n,y:r},h=await xs(e,l),u=Xn(Bn(i)),f=Zh(u);let p=c[f],d=c[u];if(s){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",b=p+h[x],w=p-h[y];p=Ac(b,p,w)}if(a){const x=u==="y"?"top":"left",y=u==="y"?"bottom":"right",b=d+h[x],w=d-h[y];d=Ac(b,d,w)}const g=o.fn({...e,[f]:p,[u]:d});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:s,[u]:a}}}}}},PP=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Mn(t,e),h={x:n,y:r},u=Xn(i),f=Zh(u);let p=h[f],d=h[u];const g=Mn(o,e),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=f==="y"?"height":"width",v=s.reference[f]-s.floating[w]+x.mainAxis,k=s.reference[f]+s.reference[w]-x.mainAxis;pk&&(p=k)}if(c){var y,b;const w=f==="y"?"width":"height",v=["top","left"].includes(Bn(i)),k=s.reference[u]-s.floating[w]+(v&&((y=a.offset)==null?void 0:y[u])||0)+(v?0:x.crossAxis),_=s.reference[u]+s.reference[w]+(v?0:((b=a.offset)==null?void 0:b[u])||0)-(v?x.crossAxis:0);d_&&(d=_)}return{[f]:p,[u]:d}}}},DP=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:o}=e,{apply:l=()=>{},...c}=Mn(t,e),h=await xs(e,c),u=Bn(i),f=yi(i),p=Xn(i)==="y",{width:d,height:g}=s.floating;let x,y;u==="top"||u==="bottom"?(x=u,y=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,x=f==="end"?"top":"bottom");const b=g-h.top-h.bottom,w=d-h.left-h.right,v=Gn(g-h[x],b),k=Gn(d-h[y],w),_=!e.middlewareData.shift;let A=v,O=k;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=b),_&&!f){const N=Le(h.left,0),M=Le(h.right,0),$=Le(h.top,0),z=Le(h.bottom,0);p?O=d-2*(N!==0||M!==0?N+M:Le(h.left,h.right)):A=g-2*($!==0||z!==0?$+z:Le(h.top,h.bottom))}await l({...e,availableWidth:O,availableHeight:A});const H=await a.getDimensions(o.floating);return d!==H.width||g!==H.height?{reset:{rects:!0}}:{}}}};function Io(){return typeof window<"u"}function xi(t){return Hb(t)?(t.nodeName||"").toLowerCase():"#document"}function Ie(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Cn(t){var e;return(e=(Hb(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Hb(t){return Io()?t instanceof Node||t instanceof Ie(t).Node:!1}function Je(t){return Io()?t instanceof Element||t instanceof Ie(t).Element:!1}function yn(t){return Io()?t instanceof HTMLElement||t instanceof Ie(t).HTMLElement:!1}function Bp(t){return!Io()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ie(t).ShadowRoot}function Bs(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=tn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function OP(t){return["table","td","th"].includes(xi(t))}function Fo(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function tu(t){const e=eu(),n=Je(t)?tn(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function $P(t){let e=Kn(t);for(;yn(e)&&!oi(e);){if(tu(e))return e;if(Fo(e))return null;e=Kn(e)}return null}function eu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function oi(t){return["html","body","#document"].includes(xi(t))}function tn(t){return Ie(t).getComputedStyle(t)}function Ro(t){return Je(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Kn(t){if(xi(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Bp(t)&&t.host||Cn(t);return Bp(e)?e.host:e}function Wb(t){const e=Kn(t);return oi(e)?t.ownerDocument?t.ownerDocument.body:t.body:yn(e)&&Bs(e)?e:Wb(e)}function bs(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Wb(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=Ie(i);if(s){const o=Mc(a);return e.concat(a,a.visualViewport||[],Bs(i)?i:[],o&&n?bs(o):[])}return e.concat(i,bs(i,[],n))}function Mc(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ub(t){const e=tn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=yn(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,o=Ga(n)!==s||Ga(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function nu(t){return Je(t)?t:t.contextElement}function Or(t){const e=nu(t);if(!yn(e))return dn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=Ub(e);let a=(s?Ga(n.width):n.width)/r,o=(s?Ga(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const NP=dn(0);function Vb(t){const e=Ie(t);return!eu()||!e.visualViewport?NP:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zP(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ie(t)?!1:e}function Cr(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=nu(t);let a=dn(1);e&&(r?Je(r)&&(a=Or(r)):a=Or(t));const o=zP(s,n,r)?Vb(s):dn(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,h=i.width/a.x,u=i.height/a.y;if(s){const f=Ie(s),p=r&&Je(r)?Ie(r):r;let d=f,g=Mc(d);for(;g&&r&&p!==d;){const x=Or(g),y=g.getBoundingClientRect(),b=tn(g),w=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*x.x,v=y.top+(g.clientTop+parseFloat(b.paddingTop))*x.y;l*=x.x,c*=x.y,h*=x.x,u*=x.y,l+=w,c+=v,d=Ie(g),g=Mc(d)}}return Ka({width:h,height:u,x:l,y:c})}function ru(t,e){const n=Ro(t).scrollLeft;return e?e.left+n:Cr(Cn(t)).left+n}function Yb(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:ru(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function jP(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=Cn(r),o=e?Fo(e.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=dn(1);const h=dn(0),u=yn(r);if((u||!u&&!s)&&((xi(r)!=="body"||Bs(a))&&(l=Ro(r)),yn(r))){const p=Cr(r);c=Or(r),h.x=p.x+r.clientLeft,h.y=p.y+r.clientTop}const f=a&&!u&&!s?Yb(a,l,!0):dn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+h.x+f.x,y:n.y*c.y-l.scrollTop*c.y+h.y+f.y}}function qP(t){return Array.from(t.getClientRects())}function HP(t){const e=Cn(t),n=Ro(t),r=t.ownerDocument.body,i=Le(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Le(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ru(t);const o=-n.scrollTop;return tn(r).direction==="rtl"&&(a+=Le(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}function WP(t,e){const n=Ie(t),r=Cn(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const c=eu();(!c||c&&e==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:o,y:l}}function UP(t,e){const n=Cr(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=yn(t)?Or(t):dn(1),a=t.clientWidth*s.x,o=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:a,height:o,x:l,y:c}}function Ip(t,e,n){let r;if(e==="viewport")r=WP(t,n);else if(e==="document")r=HP(Cn(t));else if(Je(e))r=UP(e,n);else{const i=Vb(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ka(r)}function Gb(t,e){const n=Kn(t);return n===e||!Je(n)||oi(n)?!1:tn(n).position==="fixed"||Gb(n,e)}function VP(t,e){const n=e.get(t);if(n)return n;let r=bs(t,[],!1).filter(o=>Je(o)&&xi(o)!=="body"),i=null;const s=tn(t).position==="fixed";let a=s?Kn(t):t;for(;Je(a)&&!oi(a);){const o=tn(a),l=tu(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Bs(a)&&!l&&Gb(t,a))?r=r.filter(h=>h!==a):i=o,a=Kn(a)}return e.set(t,r),r}function YP(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?Fo(e)?[]:VP(e,this._c):[].concat(n),r],o=a[0],l=a.reduce((c,h)=>{const u=Ip(e,h,i);return c.top=Le(u.top,c.top),c.right=Gn(u.right,c.right),c.bottom=Gn(u.bottom,c.bottom),c.left=Le(u.left,c.left),c},Ip(e,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function GP(t){const{width:e,height:n}=Ub(t);return{width:e,height:n}}function XP(t,e,n){const r=yn(e),i=Cn(e),s=n==="fixed",a=Cr(t,!0,s,e);let o={scrollLeft:0,scrollTop:0};const l=dn(0);if(r||!r&&!s)if((xi(e)!=="body"||Bs(i))&&(o=Ro(e)),r){const f=Cr(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&(l.x=ru(i));const c=i&&!r&&!s?Yb(i,o):dn(0),h=a.left+o.scrollLeft-l.x-c.x,u=a.top+o.scrollTop-l.y-c.y;return{x:h,y:u,width:a.width,height:a.height}}function gl(t){return tn(t).position==="static"}function Fp(t,e){if(!yn(t)||tn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Cn(t)===n&&(n=n.ownerDocument.body),n}function Xb(t,e){const n=Ie(t);if(Fo(t))return n;if(!yn(t)){let i=Kn(t);for(;i&&!oi(i);){if(Je(i)&&!gl(i))return i;i=Kn(i)}return n}let r=Fp(t,e);for(;r&&OP(r)&&gl(r);)r=Fp(r,e);return r&&oi(r)&&gl(r)&&!tu(r)?n:r||$P(t)||n}const KP=async function(t){const e=this.getOffsetParent||Xb,n=this.getDimensions,r=await n(t.floating);return{reference:XP(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ZP(t){return tn(t).direction==="rtl"}const QP={convertOffsetParentRelativeRectToViewportRelativeRect:jP,getDocumentElement:Cn,getClippingRect:YP,getOffsetParent:Xb,getElementRects:KP,getClientRects:qP,getDimensions:GP,getScale:Or,isElement:Je,isRTL:ZP};function JP(t,e){let n=null,r;const i=Cn(t);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const{left:c,top:h,width:u,height:f}=t.getBoundingClientRect();if(o||e(),!u||!f)return;const p=Gs(h),d=Gs(i.clientWidth-(c+u)),g=Gs(i.clientHeight-(h+f)),x=Gs(c),b={rootMargin:-p+"px "+-d+"px "+-g+"px "+-x+"px",threshold:Le(0,Gn(1,l))||1};let w=!0;function v(k){const _=k[0].intersectionRatio;if(_!==l){if(!w)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(v,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,b)}n.observe(t)}return a(!0),s}function tD(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=nu(t),h=i||s?[...c?bs(c):[],...bs(e)]:[];h.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const u=c&&o?JP(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),n()}),c&&!l&&p.observe(c),p.observe(e));let d,g=l?Cr(t):null;l&&x();function x(){const y=Cr(t);g&&(y.x!==g.x||y.y!==g.y||y.width!==g.width||y.height!==g.height)&&n(),g=y,d=requestAnimationFrame(x)}return n(),()=>{var y;h.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u==null||u(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(d)}}const eD=FP,nD=RP,rD=MP,iD=DP,sD=BP,Rp=LP,aD=PP,oD=(t,e,n)=>{const r=new Map,i={platform:QP,...n},s={...i.platform,_c:r};return AP(t,e,{...i,platform:s})};var ua=typeof document<"u"?B.useLayoutEffect:B.useEffect;function Za(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Za(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!Za(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function Kb(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Pp(t,e){const n=Kb(t);return Math.round(e*n)/n}function ml(t){const e=B.useRef(t);return ua(()=>{e.current=t}),e}function lD(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:c}=t,[h,u]=B.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,p]=B.useState(r);Za(f,r)||p(r);const[d,g]=B.useState(null),[x,y]=B.useState(null),b=B.useCallback(T=>{T!==_.current&&(_.current=T,g(T))},[]),w=B.useCallback(T=>{T!==A.current&&(A.current=T,y(T))},[]),v=s||d,k=a||x,_=B.useRef(null),A=B.useRef(null),O=B.useRef(h),H=l!=null,N=ml(l),M=ml(i),$=ml(c),z=B.useCallback(()=>{if(!_.current||!A.current)return;const T={placement:e,strategy:n,middleware:f};M.current&&(T.platform=M.current),oD(_.current,A.current,T).then(j=>{const C={...j,isPositioned:$.current!==!1};R.current&&!Za(O.current,C)&&(O.current=C,Xc.flushSync(()=>{u(C)}))})},[f,e,n,M,$]);ua(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,u(T=>({...T,isPositioned:!1})))},[c]);const R=B.useRef(!1);ua(()=>(R.current=!0,()=>{R.current=!1}),[]),ua(()=>{if(v&&(_.current=v),k&&(A.current=k),v&&k){if(N.current)return N.current(v,k,z);z()}},[v,k,z,N,H]);const I=B.useMemo(()=>({reference:_,floating:A,setReference:b,setFloating:w}),[b,w]),E=B.useMemo(()=>({reference:v,floating:k}),[v,k]),D=B.useMemo(()=>{const T={position:n,left:0,top:0};if(!E.floating)return T;const j=Pp(E.floating,h.x),C=Pp(E.floating,h.y);return o?{...T,transform:"translate("+j+"px, "+C+"px)",...Kb(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:C}},[n,o,E.floating,h.x,h.y]);return B.useMemo(()=>({...h,update:z,refs:I,elements:E,floatingStyles:D}),[h,z,I,E,D])}const cD=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Rp({element:r.current,padding:i}).fn(n):{}:r?Rp({element:r,padding:i}).fn(n):{}}}},hD=(t,e)=>({...eD(t),options:[t,e]}),uD=(t,e)=>({...nD(t),options:[t,e]}),fD=(t,e)=>({...aD(t),options:[t,e]}),pD=(t,e)=>({...rD(t),options:[t,e]}),dD=(t,e)=>({...iD(t),options:[t,e]}),gD=(t,e)=>({...sD(t),options:[t,e]}),mD=(t,e)=>({...cD(t),options:[t,e]});var yD="Arrow",Zb=B.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return L.jsx($t.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:L.jsx("polygon",{points:"0,0 30,0 15,10"})})});Zb.displayName=yD;var xD=Zb;function bD(t,e=[]){let n=[];function r(s,a){const o=B.createContext(a),l=n.length;n=[...n,a];function c(u){const{scope:f,children:p,...d}=u,g=(f==null?void 0:f[t][l])||o,x=B.useMemo(()=>d,Object.values(d));return L.jsx(g.Provider,{value:x,children:p})}function h(u,f){const p=(f==null?void 0:f[t][l])||o,d=B.useContext(p);if(d)return d;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,h]}const i=()=>{const s=n.map(a=>B.createContext(a));return function(o){const l=(o==null?void 0:o[t])||s;return B.useMemo(()=>({[`__scope${t}`]:{...o,[t]:l}}),[o,l])}};return i.scopeName=t,[r,wD(i,...e)]}function wD(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...o,...u}},{});return B.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function Qb(t){const[e,n]=B.useState(void 0);return He(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,o=c.blockSize}else a=t.offsetWidth,o=t.offsetHeight;n({width:a,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var iu="Popper",[Jb,tw]=bD(iu),[CD,ew]=Jb(iu),nw=t=>{const{__scopePopper:e,children:n}=t,[r,i]=B.useState(null);return L.jsx(CD,{scope:e,anchor:r,onAnchorChange:i,children:n})};nw.displayName=iu;var rw="PopperAnchor",iw=B.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=ew(rw,n),a=B.useRef(null),o=me(e,a);return B.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:L.jsx($t.div,{...i,ref:o})});iw.displayName=rw;var su="PopperContent",[vD,_D]=Jb(su),sw=B.forwardRef((t,e)=>{var K,xt,_t,ot,ft,bt;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:d,...g}=t,x=ew(su,n),[y,b]=B.useState(null),w=me(e,zt=>b(zt)),[v,k]=B.useState(null),_=Qb(v),A=(_==null?void 0:_.width)??0,O=(_==null?void 0:_.height)??0,H=r+(s!=="center"?"-"+s:""),N=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},M=Array.isArray(c)?c:[c],$=M.length>0,z={padding:N,boundary:M.filter(SD),altBoundary:$},{refs:R,floatingStyles:I,placement:E,isPositioned:D,middlewareData:T}=lD({strategy:"fixed",placement:H,whileElementsMounted:(...zt)=>tD(...zt,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[hD({mainAxis:i+O,alignmentAxis:a}),l&&uD({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?fD():void 0,...z}),l&&pD({...z}),dD({...z,apply:({elements:zt,rects:Ht,availableWidth:Pe,availableHeight:De})=>{const{width:le,height:Dn}=Ht.reference,Oe=zt.floating.style;Oe.setProperty("--radix-popper-available-width",`${Pe}px`),Oe.setProperty("--radix-popper-available-height",`${De}px`),Oe.setProperty("--radix-popper-anchor-width",`${le}px`),Oe.setProperty("--radix-popper-anchor-height",`${Dn}px`)}}),v&&mD({element:v,padding:o}),TD({arrowWidth:A,arrowHeight:O}),f&&gD({strategy:"referenceHidden",...z})]}),[j,C]=lw(E),Y=Kc(d);He(()=>{D&&(Y==null||Y())},[D,Y]);const Q=(K=T.arrow)==null?void 0:K.x,S=(xt=T.arrow)==null?void 0:xt.y,ut=((_t=T.arrow)==null?void 0:_t.centerOffset)!==0,[ct,wt]=B.useState();return He(()=>{y&&wt(window.getComputedStyle(y).zIndex)},[y]),L.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:D?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ct,"--radix-popper-transform-origin":[(ot=T.transformOrigin)==null?void 0:ot.x,(ft=T.transformOrigin)==null?void 0:ft.y].join(" "),...((bt=T.hide)==null?void 0:bt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:L.jsx(vD,{scope:n,placedSide:j,onArrowChange:k,arrowX:Q,arrowY:S,shouldHideArrow:ut,children:L.jsx($t.div,{"data-side":j,"data-align":C,...g,ref:w,style:{...g.style,animation:D?void 0:"none"}})})})});sw.displayName=su;var aw="PopperArrow",kD={top:"bottom",right:"left",bottom:"top",left:"right"},ow=B.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,s=_D(aw,r),a=kD[s.placedSide];return L.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:L.jsx(xD,{...i,ref:n,style:{...i.style,display:"block"}})})});ow.displayName=aw;function SD(t){return t!==null}var TD=t=>({name:"transformOrigin",options:t,fn(e){var x,y,b;const{placement:n,rects:r,middlewareData:i}=e,a=((x=i.arrow)==null?void 0:x.centerOffset)!==0,o=a?0:t.arrowWidth,l=a?0:t.arrowHeight,[c,h]=lw(n),u={start:"0%",center:"50%",end:"100%"}[h],f=(((y=i.arrow)==null?void 0:y.x)??0)+o/2,p=(((b=i.arrow)==null?void 0:b.y)??0)+l/2;let d="",g="";return c==="bottom"?(d=a?u:`${f}px`,g=`${-l}px`):c==="top"?(d=a?u:`${f}px`,g=`${r.floating.height+l}px`):c==="right"?(d=`${-l}px`,g=a?u:`${p}px`):c==="left"&&(d=`${r.floating.width+l}px`,g=a?u:`${p}px`),{data:{x:d,y:g}}}});function lw(t){const[e,n="center"]=t.split("-");return[e,n]}var ED=nw,AD=iw,LD=sw,MD=ow;function cw(t){const e=B.useRef({value:t,previous:t});return B.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var BD=[" ","Enter","ArrowUp","ArrowDown"],ID=[" ","Enter"],Is="Select",[Po,Do,FD]=Bd(Is),[bi,N4]=ro(Is,[FD,tw]),Oo=tw(),[RD,Qn]=bi(Is),[PD,DD]=bi(Is),hw=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:l,dir:c,name:h,autoComplete:u,disabled:f,required:p,form:d}=t,g=Oo(e),[x,y]=B.useState(null),[b,w]=B.useState(null),[v,k]=B.useState(!1),_=Kh(c),[A=!1,O]=Gr({prop:r,defaultProp:i,onChange:s}),[H,N]=Gr({prop:a,defaultProp:o,onChange:l}),M=B.useRef(null),$=x?d||!!x.closest("form"):!0,[z,R]=B.useState(new Set),I=Array.from(z).map(E=>E.props.value).join(";");return L.jsx(ED,{...g,children:L.jsxs(RD,{required:p,scope:e,trigger:x,onTriggerChange:y,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:v,onValueNodeHasChildrenChange:k,contentId:li(),value:H,onValueChange:N,open:A,onOpenChange:O,dir:_,triggerPointerDownPosRef:M,disabled:f,children:[L.jsx(Po.Provider,{scope:e,children:L.jsx(PD,{scope:t.__scopeSelect,onNativeOptionAdd:B.useCallback(E=>{R(D=>new Set(D).add(E))},[]),onNativeOptionRemove:B.useCallback(E=>{R(D=>{const T=new Set(D);return T.delete(E),T})},[]),children:n})}),$?L.jsxs(Pw,{"aria-hidden":!0,required:p,tabIndex:-1,name:h,autoComplete:u,value:H,onChange:E=>N(E.target.value),disabled:f,form:d,children:[H===void 0?L.jsx("option",{value:""}):null,Array.from(z)]},I):null]})})};hw.displayName=Is;var uw="SelectTrigger",fw=B.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...i}=t,s=Oo(n),a=Qn(uw,n),o=a.disabled||r,l=me(e,a.onTriggerChange),c=Do(n),h=B.useRef("touch"),[u,f,p]=Dw(g=>{const x=c().filter(w=>!w.disabled),y=x.find(w=>w.value===a.value),b=Ow(x,g,y);b!==void 0&&a.onValueChange(b.value)}),d=g=>{o||(a.onOpenChange(!0),p()),g&&(a.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return L.jsx(AD,{asChild:!0,...s,children:L.jsx($t.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":Rw(a.value)?"":void 0,...i,ref:l,onClick:Bt(i.onClick,g=>{g.currentTarget.focus(),h.current!=="mouse"&&d(g)}),onPointerDown:Bt(i.onPointerDown,g=>{h.current=g.pointerType;const x=g.target;x.hasPointerCapture(g.pointerId)&&x.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(d(g),g.preventDefault())}),onKeyDown:Bt(i.onKeyDown,g=>{const x=u.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(x&&g.key===" ")&&BD.includes(g.key)&&(d(),g.preventDefault())})})})});fw.displayName=uw;var pw="SelectValue",dw=B.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:a="",...o}=t,l=Qn(pw,n),{onValueNodeHasChildrenChange:c}=l,h=s!==void 0,u=me(e,l.onValueNodeChange);return He(()=>{c(h)},[c,h]),L.jsx($t.span,{...o,ref:u,style:{pointerEvents:"none"},children:Rw(l.value)?L.jsx(L.Fragment,{children:a}):s})});dw.displayName=pw;var OD="SelectIcon",gw=B.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...i}=t;return L.jsx($t.span,{"aria-hidden":!0,...i,ref:e,children:r||"▼"})});gw.displayName=OD;var $D="SelectPortal",mw=t=>L.jsx(TC,{asChild:!0,...t});mw.displayName=$D;var vr="SelectContent",yw=B.forwardRef((t,e)=>{const n=Qn(vr,t.__scopeSelect),[r,i]=B.useState();if(He(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Xc.createPortal(L.jsx(xw,{scope:t.__scopeSelect,children:L.jsx(Po.Slot,{scope:t.__scopeSelect,children:L.jsx("div",{children:t.children})})}),s):null}return L.jsx(bw,{...t,ref:e})});yw.displayName=vr;var Xe=10,[xw,Jn]=bi(vr),ND="SelectContentImpl",bw=B.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:o,sideOffset:l,align:c,alignOffset:h,arrowPadding:u,collisionBoundary:f,collisionPadding:p,sticky:d,hideWhenDetached:g,avoidCollisions:x,...y}=t,b=Qn(vr,n),[w,v]=B.useState(null),[k,_]=B.useState(null),A=me(e,K=>v(K)),[O,H]=B.useState(null),[N,M]=B.useState(null),$=Do(n),[z,R]=B.useState(!1),I=B.useRef(!1);B.useEffect(()=>{if(w)return bC(w)},[w]),wC();const E=B.useCallback(K=>{const[xt,..._t]=$().map(bt=>bt.ref.current),[ot]=_t.slice(-1),ft=document.activeElement;for(const bt of K)if(bt===ft||(bt==null||bt.scrollIntoView({block:"nearest"}),bt===xt&&k&&(k.scrollTop=0),bt===ot&&k&&(k.scrollTop=k.scrollHeight),bt==null||bt.focus(),document.activeElement!==ft))return},[$,k]),D=B.useCallback(()=>E([O,w]),[E,O,w]);B.useEffect(()=>{z&&D()},[z,D]);const{onOpenChange:T,triggerPointerDownPosRef:j}=b;B.useEffect(()=>{if(w){let K={x:0,y:0};const xt=ot=>{var ft,bt;K={x:Math.abs(Math.round(ot.pageX)-(((ft=j.current)==null?void 0:ft.x)??0)),y:Math.abs(Math.round(ot.pageY)-(((bt=j.current)==null?void 0:bt.y)??0))}},_t=ot=>{K.x<=10&&K.y<=10?ot.preventDefault():w.contains(ot.target)||T(!1),document.removeEventListener("pointermove",xt),j.current=null};return j.current!==null&&(document.addEventListener("pointermove",xt),document.addEventListener("pointerup",_t,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xt),document.removeEventListener("pointerup",_t,{capture:!0})}}},[w,T,j]),B.useEffect(()=>{const K=()=>T(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[T]);const[C,Y]=Dw(K=>{const xt=$().filter(ft=>!ft.disabled),_t=xt.find(ft=>ft.ref.current===document.activeElement),ot=Ow(xt,K,_t);ot&&setTimeout(()=>ot.ref.current.focus())}),Q=B.useCallback((K,xt,_t)=>{const ot=!I.current&&!_t;(b.value!==void 0&&b.value===xt||ot)&&(H(K),ot&&(I.current=!0))},[b.value]),S=B.useCallback(()=>w==null?void 0:w.focus(),[w]),ut=B.useCallback((K,xt,_t)=>{const ot=!I.current&&!_t;(b.value!==void 0&&b.value===xt||ot)&&M(K)},[b.value]),ct=r==="popper"?Bc:ww,wt=ct===Bc?{side:o,sideOffset:l,align:c,alignOffset:h,arrowPadding:u,collisionBoundary:f,collisionPadding:p,sticky:d,hideWhenDetached:g,avoidCollisions:x}:{};return L.jsx(xw,{scope:n,content:w,viewport:k,onViewportChange:_,itemRefCallback:Q,selectedItem:O,onItemLeave:S,itemTextRefCallback:ut,focusSelectedItem:D,selectedItemText:N,position:r,isPositioned:z,searchRef:C,children:L.jsx(CC,{as:vC,allowPinchZoom:!0,children:L.jsx(_C,{asChild:!0,trapped:b.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Bt(i,K=>{var xt;(xt=b.trigger)==null||xt.focus({preventScroll:!0}),K.preventDefault()}),children:L.jsx(kC,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:L.jsx(ct,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:K=>K.preventDefault(),...y,...wt,onPlaced:()=>R(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Bt(y.onKeyDown,K=>{const xt=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!xt&&K.key.length===1&&Y(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let ot=$().filter(ft=>!ft.disabled).map(ft=>ft.ref.current);if(["ArrowUp","End"].includes(K.key)&&(ot=ot.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const ft=K.target,bt=ot.indexOf(ft);ot=ot.slice(bt+1)}setTimeout(()=>E(ot)),K.preventDefault()}})})})})})})});bw.displayName=ND;var zD="SelectItemAlignedPosition",ww=B.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...i}=t,s=Qn(vr,n),a=Jn(vr,n),[o,l]=B.useState(null),[c,h]=B.useState(null),u=me(e,A=>h(A)),f=Do(n),p=B.useRef(!1),d=B.useRef(!0),{viewport:g,selectedItem:x,selectedItemText:y,focusSelectedItem:b}=a,w=B.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&c&&g&&x&&y){const A=s.trigger.getBoundingClientRect(),O=c.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),N=y.getBoundingClientRect();if(s.dir!=="rtl"){const ft=N.left-O.left,bt=H.left-ft,zt=A.left-bt,Ht=A.width+zt,Pe=Math.max(Ht,O.width),De=window.innerWidth-Xe,le=Ep(bt,[Xe,Math.max(Xe,De-Pe)]);o.style.minWidth=Ht+"px",o.style.left=le+"px"}else{const ft=O.right-N.right,bt=window.innerWidth-H.right-ft,zt=window.innerWidth-A.right-bt,Ht=A.width+zt,Pe=Math.max(Ht,O.width),De=window.innerWidth-Xe,le=Ep(bt,[Xe,Math.max(Xe,De-Pe)]);o.style.minWidth=Ht+"px",o.style.right=le+"px"}const M=f(),$=window.innerHeight-Xe*2,z=g.scrollHeight,R=window.getComputedStyle(c),I=parseInt(R.borderTopWidth,10),E=parseInt(R.paddingTop,10),D=parseInt(R.borderBottomWidth,10),T=parseInt(R.paddingBottom,10),j=I+E+z+T+D,C=Math.min(x.offsetHeight*5,j),Y=window.getComputedStyle(g),Q=parseInt(Y.paddingTop,10),S=parseInt(Y.paddingBottom,10),ut=A.top+A.height/2-Xe,ct=$-ut,wt=x.offsetHeight/2,K=x.offsetTop+wt,xt=I+E+K,_t=j-xt;if(xt<=ut){const ft=M.length>0&&x===M[M.length-1].ref.current;o.style.bottom="0px";const bt=c.clientHeight-g.offsetTop-g.offsetHeight,zt=Math.max(ct,wt+(ft?S:0)+bt+D),Ht=xt+zt;o.style.height=Ht+"px"}else{const ft=M.length>0&&x===M[0].ref.current;o.style.top="0px";const zt=Math.max(ut,I+g.offsetTop+(ft?Q:0)+wt)+_t;o.style.height=zt+"px",g.scrollTop=xt-ut+g.offsetTop}o.style.margin=`${Xe}px 0`,o.style.minHeight=C+"px",o.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,s.trigger,s.valueNode,o,c,g,x,y,s.dir,r]);He(()=>w(),[w]);const[v,k]=B.useState();He(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const _=B.useCallback(A=>{A&&d.current===!0&&(w(),b==null||b(),d.current=!1)},[w,b]);return L.jsx(qD,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:p,onScrollButtonChange:_,children:L.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:v},children:L.jsx($t.div,{...i,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});ww.displayName=zD;var jD="SelectPopperPosition",Bc=B.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Xe,...s}=t,a=Oo(n);return L.jsx(LD,{...a,...s,ref:e,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Bc.displayName=jD;var[qD,au]=bi(vr,{}),Ic="SelectViewport",Cw=B.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...i}=t,s=Jn(Ic,n),a=au(Ic,n),o=me(e,s.onViewportChange),l=B.useRef(0);return L.jsxs(L.Fragment,{children:[L.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),L.jsx(Po.Slot,{scope:n,children:L.jsx($t.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Bt(i.onScroll,c=>{const h=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=a;if(f!=null&&f.current&&u){const p=Math.abs(l.current-h.scrollTop);if(p>0){const d=window.innerHeight-Xe*2,g=parseFloat(u.style.minHeight),x=parseFloat(u.style.height),y=Math.max(g,x);if(y0?v:0,u.style.justifyContent="flex-end")}}}l.current=h.scrollTop})})})]})});Cw.displayName=Ic;var vw="SelectGroup",[HD,WD]=bi(vw),UD=B.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=li();return L.jsx(HD,{scope:n,id:i,children:L.jsx($t.div,{role:"group","aria-labelledby":i,...r,ref:e})})});UD.displayName=vw;var _w="SelectLabel",kw=B.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=WD(_w,n);return L.jsx($t.div,{id:i.id,...r,ref:e})});kw.displayName=_w;var Qa="SelectItem",[VD,Sw]=bi(Qa),Tw=B.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...a}=t,o=Qn(Qa,n),l=Jn(Qa,n),c=o.value===r,[h,u]=B.useState(s??""),[f,p]=B.useState(!1),d=me(e,b=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,b,r,i)}),g=li(),x=B.useRef("touch"),y=()=>{i||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return L.jsx(VD,{scope:n,value:r,disabled:i,textId:g,isSelected:c,onItemTextChange:B.useCallback(b=>{u(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:L.jsx(Po.ItemSlot,{scope:n,value:r,disabled:i,textValue:h,children:L.jsx($t.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:d,onFocus:Bt(a.onFocus,()=>p(!0)),onBlur:Bt(a.onBlur,()=>p(!1)),onClick:Bt(a.onClick,()=>{x.current!=="mouse"&&y()}),onPointerUp:Bt(a.onPointerUp,()=>{x.current==="mouse"&&y()}),onPointerDown:Bt(a.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:Bt(a.onPointerMove,b=>{var w;x.current=b.pointerType,i?(w=l.onItemLeave)==null||w.call(l):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Bt(a.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:Bt(a.onKeyDown,b=>{var v;((v=l.searchRef)==null?void 0:v.current)!==""&&b.key===" "||(ID.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});Tw.displayName=Qa;var Gi="SelectItemText",Ew=B.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:i,...s}=t,a=Qn(Gi,n),o=Jn(Gi,n),l=Sw(Gi,n),c=DD(Gi,n),[h,u]=B.useState(null),f=me(e,y=>u(y),l.onItemTextChange,y=>{var b;return(b=o.itemTextRefCallback)==null?void 0:b.call(o,y,l.value,l.disabled)}),p=h==null?void 0:h.textContent,d=B.useMemo(()=>L.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:x}=c;return He(()=>(g(d),()=>x(d)),[g,x,d]),L.jsxs(L.Fragment,{children:[L.jsx($t.span,{id:l.textId,...s,ref:f}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Xc.createPortal(s.children,a.valueNode):null]})});Ew.displayName=Gi;var Aw="SelectItemIndicator",Lw=B.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return Sw(Aw,n).isSelected?L.jsx($t.span,{"aria-hidden":!0,...r,ref:e}):null});Lw.displayName=Aw;var Fc="SelectScrollUpButton",Mw=B.forwardRef((t,e)=>{const n=Jn(Fc,t.__scopeSelect),r=au(Fc,t.__scopeSelect),[i,s]=B.useState(!1),a=me(e,r.onScrollButtonChange);return He(()=>{if(n.viewport&&n.isPositioned){let o=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?L.jsx(Iw,{...t,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});Mw.displayName=Fc;var Rc="SelectScrollDownButton",Bw=B.forwardRef((t,e)=>{const n=Jn(Rc,t.__scopeSelect),r=au(Rc,t.__scopeSelect),[i,s]=B.useState(!1),a=me(e,r.onScrollButtonChange);return He(()=>{if(n.viewport&&n.isPositioned){let o=function(){const c=l.scrollHeight-l.clientHeight,h=Math.ceil(l.scrollTop)l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?L.jsx(Iw,{...t,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});Bw.displayName=Rc;var Iw=B.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=t,s=Jn("SelectScrollButton",n),a=B.useRef(null),o=Do(n),l=B.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return B.useEffect(()=>()=>l(),[l]),He(()=>{var h;const c=o().find(u=>u.ref.current===document.activeElement);(h=c==null?void 0:c.ref.current)==null||h.scrollIntoView({block:"nearest"})},[o]),L.jsx($t.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:Bt(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Bt(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Bt(i.onPointerLeave,()=>{l()})})}),YD="SelectSeparator",Fw=B.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return L.jsx($t.div,{"aria-hidden":!0,...r,ref:e})});Fw.displayName=YD;var Pc="SelectArrow",GD=B.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,i=Oo(n),s=Qn(Pc,n),a=Jn(Pc,n);return s.open&&a.position==="popper"?L.jsx(MD,{...i,...r,ref:e}):null});GD.displayName=Pc;function Rw(t){return t===""||t===void 0}var Pw=B.forwardRef((t,e)=>{const{value:n,...r}=t,i=B.useRef(null),s=me(e,i),a=cw(n);return B.useEffect(()=>{const o=i.current,l=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==n&&h){const u=new Event("change",{bubbles:!0});h.call(o,n),o.dispatchEvent(u)}},[a,n]),L.jsx(SC,{asChild:!0,children:L.jsx("select",{...r,ref:s,defaultValue:n})})});Pw.displayName="BubbleSelect";function Dw(t){const e=Kc(t),n=B.useRef(""),r=B.useRef(0),i=B.useCallback(a=>{const o=n.current+a;e(o),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(o)},[e]),s=B.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return B.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function Ow(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let a=XD(t,Math.max(s,0));i.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function XD(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var KD=hw,$w=fw,ZD=dw,QD=gw,JD=mw,Nw=yw,tO=Cw,zw=kw,jw=Tw,eO=Ew,nO=Lw,qw=Mw,Hw=Bw,Ww=Fw;const rO=KD,iO=ZD,Uw=B.forwardRef(({className:t,children:e,...n},r)=>L.jsxs($w,{ref:r,className:se("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,L.jsx(QD,{asChild:!0,children:L.jsx(Fd,{className:"h-4 w-4 opacity-50"})})]}));Uw.displayName=$w.displayName;const Vw=B.forwardRef(({className:t,...e},n)=>L.jsx(qw,{ref:n,className:se("flex cursor-default items-center justify-center py-1",t),...e,children:L.jsx(MC,{className:"h-4 w-4"})}));Vw.displayName=qw.displayName;const Yw=B.forwardRef(({className:t,...e},n)=>L.jsx(Hw,{ref:n,className:se("flex cursor-default items-center justify-center py-1",t),...e,children:L.jsx(Fd,{className:"h-4 w-4"})}));Yw.displayName=Hw.displayName;const Gw=B.forwardRef(({className:t,children:e,position:n="popper",...r},i)=>L.jsx(JD,{children:L.jsxs(Nw,{ref:i,className:se("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[L.jsx(Vw,{}),L.jsx(tO,{className:se("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),L.jsx(Yw,{})]})}));Gw.displayName=Nw.displayName;const sO=B.forwardRef(({className:t,...e},n)=>L.jsx(zw,{ref:n,className:se("px-2 py-1.5 text-sm font-semibold",t),...e}));sO.displayName=zw.displayName;const Xi=B.forwardRef(({className:t,children:e,...n},r)=>L.jsxs(jw,{ref:r,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[L.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:L.jsx(nO,{children:L.jsx(LC,{className:"h-4 w-4"})})}),L.jsx(eO,{children:e})]}));Xi.displayName=jw.displayName;const aO=B.forwardRef(({className:t,...e},n)=>L.jsx(Ww,{ref:n,className:se("-mx-1 my-1 h-px bg-muted",t),...e}));aO.displayName=Ww.displayName;function oO({direction:t,onDirectionChange:e}){return L.jsx("div",{className:"flex items-center gap-2",children:L.jsxs(rO,{value:t,onValueChange:e,children:[L.jsx(Uw,{id:"direction-select",className:"w-[180px]",children:L.jsx(iO,{placeholder:"Select direction"})}),L.jsxs(Gw,{children:[L.jsx(Xi,{value:"LR",children:"Left to Right"}),L.jsx(Xi,{value:"RL",children:"Right to Left"}),L.jsx(Xi,{value:"TD",children:"Top Down"}),L.jsx(Xi,{value:"BT",children:"Bottom Up"})]})]})})}const Dp=({relationships:t,onNodeClick:e})=>{const[n,r]=B.useState("LR"),[i,s]=B.useState(""),a=B.useRef(null);B.useEffect(()=>{s(o(t))},[t,n]);const o=l=>{let c=`--- + +config: + + look: handDrawn + + theme: dark + +--- +graph ${n} +`;return l.forEach(h=>{const{entity1:u,entity2:f,description:p}=h,d=pl(u),g=pl(f),x=pl(p);c+=` ${d}[${dl(u)}] -->${x}(${dl(p)}) -->${g}[${dl(f)}] +`,c+=` style ${d} fill:2563eb,stroke:#ffffff, color:#ffffff +`,c+=` style ${g} fill:2563eb,stroke:#ffffff, color:#ffffff +`,c+=` style ${x} fill:#ffffff50,stroke-dasharray: 5 5,fontWeight: 12,stroke:#ffffff,color:#ffffff +`}),c+=` linkStyle default stroke:#ffffff +`,c};return B.useEffect(()=>{Tp.initialize({startOnLoad:!1})},[]),B.useEffect(()=>{(async()=>{if(a.current&&a.current!==null)try{const c=`mermaid-diagram-${Math.random().toString(36).substr(2,9)}`,{svg:h,bindFunctions:u}=await Tp.render(c,i);a.current.innerHTML=h,u&&u(a.current),a.current.querySelectorAll("g.rough-node").forEach(p=>{p.style.cursor="pointer",p.addEventListener("click",()=>{console.log("Node clicked:",p);const d=p.querySelector("foreignObject div span.nodeLabel");let g="";if(d)g=d.textContent||"";else{const x=p.querySelector("title");x&&(g=x.textContent||"")}g&&e&&e(g)})})}catch(c){console.error("Error rendering Mermaid diagram:",c),console.log("Diagram definition:",i)}})()},[i,n,e]),i?L.jsxs("div",{children:[L.jsx(oO,{direction:n,onDirectionChange:r}),L.jsx("div",{className:"mt-4 p-2 rounded-md transition-opacity duration-300 bg-blue-600 text-white",ref:a})]}):null};function lO(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const cO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uO={};function Op(t,e){return(uO.jsx?hO:cO).test(t)}const fO=/[ \t\n\f\r]/g;function pO(t){return typeof t=="object"?t.type==="text"?$p(t.value):!1:$p(t)}function $p(t){return t.replace(fO,"")===""}class Fs{constructor(e,n,r){this.property=e,this.normal=n,r&&(this.space=r)}}Fs.prototype.property={};Fs.prototype.normal={};Fs.prototype.space=null;function Xw(t,e){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&xO.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(zp,vO);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!zp.test(s)){let a=s.replace(bO,CO);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=ou}return new i(r,e)}function CO(t){return"-"+t.toLowerCase()}function vO(t){return t.charAt(1).toUpperCase()}const _O={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},kO=Xw([Qw,Zw,e1,n1,mO],"html"),lu=Xw([Qw,Zw,e1,n1,yO],"svg");function SO(t){return t.join(" ").trim()}var r1={},jp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,TO=/\n/g,EO=/^\s*/,AO=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,LO=/^:\s*/,MO=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,BO=/^[;\s]*/,IO=/^\s+|\s+$/g,FO=` +`,qp="/",Hp="*",or="",RO="comment",PO="declaration",DO=function(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(d){var g=d.match(TO);g&&(n+=g.length);var x=d.lastIndexOf(FO);r=~x?d.length-x:r+d.length}function s(){var d={line:n,column:r};return function(g){return g.position=new a(d),c(),g}}function a(d){this.start=d,this.end={line:n,column:r},this.source=e.source}a.prototype.content=t;function o(d){var g=new Error(e.source+":"+n+":"+r+": "+d);if(g.reason=d,g.filename=e.source,g.line=n,g.column=r,g.source=t,!e.silent)throw g}function l(d){var g=d.exec(t);if(g){var x=g[0];return i(x),t=t.slice(x.length),g}}function c(){l(EO)}function h(d){var g;for(d=d||[];g=u();)g!==!1&&d.push(g);return d}function u(){var d=s();if(!(qp!=t.charAt(0)||Hp!=t.charAt(1))){for(var g=2;or!=t.charAt(g)&&(Hp!=t.charAt(g)||qp!=t.charAt(g+1));)++g;if(g+=2,or===t.charAt(g-1))return o("End of comment missing");var x=t.slice(2,g-2);return r+=2,i(x),t=t.slice(g),r+=2,d({type:RO,comment:x})}}function f(){var d=s(),g=l(AO);if(g){if(u(),!l(LO))return o("property missing ':'");var x=l(MO),y=d({type:PO,property:Wp(g[0].replace(jp,or)),value:x?Wp(x[0].replace(jp,or)):or});return l(BO),y}}function p(){var d=[];h(d);for(var g;g=f();)g!==!1&&(d.push(g),h(d));return d}return c(),p()};function Wp(t){return t?t.replace(IO,or):or}var OO=Ml&&Ml.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r1,"__esModule",{value:!0});var Up=r1.default=NO,$O=OO(DO);function NO(t,e){var n=null;if(!t||typeof t!="string")return n;var r=(0,$O.default)(t),i=typeof e=="function";return r.forEach(function(s){if(s.type==="declaration"){var a=s.property,o=s.value;i?e(a,o,s):o&&(n=n||{},n[a]=o)}}),n}const zO=Up.default||Up,i1=s1("end"),cu=s1("start");function s1(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function jO(t){const e=cu(t),n=i1(t);if(e&&n)return{start:e,end:n}}function rs(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Vp(t.position):"start"in t||"end"in t?Vp(t):"line"in t||"column"in t?$c(t):""}function $c(t){return Yp(t&&t.line)+":"+Yp(t&&t.column)}function Vp(t){return $c(t&&t.start)+"-"+$c(t&&t.end)}function Yp(t){return t&&typeof t=="number"?t:1}class oe extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=o?o.line:void 0,this.name=rs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}oe.prototype.file="";oe.prototype.name="";oe.prototype.reason="";oe.prototype.message="";oe.prototype.stack="";oe.prototype.column=void 0;oe.prototype.line=void 0;oe.prototype.ancestors=void 0;oe.prototype.cause=void 0;oe.prototype.fatal=void 0;oe.prototype.place=void 0;oe.prototype.ruleId=void 0;oe.prototype.source=void 0;const hu={}.hasOwnProperty,qO=new Map,HO=/[A-Z]/g,WO=/-([a-z])/g,UO=new Set(["table","tbody","thead","tfoot","tr"]),VO=new Set(["td","th"]),a1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function YO(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=e$(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=t$(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?lu:kO,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=o1(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function o1(t,e,n){if(e.type==="element")return GO(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return XO(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return ZO(t,e,n);if(e.type==="mdxjsEsm")return KO(t,e);if(e.type==="root")return QO(t,e,n);if(e.type==="text")return JO(t,e)}function GO(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=lu,t.schema=i),t.ancestors.push(e);const s=c1(t,e.tagName,!1),a=n$(t,e);let o=fu(t,e);return UO.has(e.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!pO(l):!0})),l1(t,a,s,e),uu(a,o),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function XO(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}ws(t,e.position)}function KO(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);ws(t,e.position)}function ZO(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=lu,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:c1(t,e.name,!0),a=r$(t,e),o=fu(t,e);return l1(t,a,s,e),uu(a,o),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function QO(t,e,n){const r={};return uu(r,fu(t,e)),t.create(e,t.Fragment,r,n)}function JO(t,e){return e.value}function l1(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function uu(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function t$(t,e,n){return r;function r(i,s,a,o){const c=Array.isArray(a.children)?n:e;return o?c(s,a,o):c(s,a)}}function e$(t,e){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=cu(r);return e(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function n$(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&hu.call(e.properties,i)){const s=i$(t,i,e.properties[i]);if(s){const[a,o]=s;t.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&VO.has(e.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function r$(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,t.evaluater.evaluateExpression(o.argument))}else ws(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const o=r.value.data.estree.body[0];o.type,s=t.evaluater.evaluateExpression(o.expression)}else ws(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function fu(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:qO;for(;++ri?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);s0?(xn(t,t.length,0,e),t):e}const Kp={}.hasOwnProperty;function p$(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Nr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const hn=tr(/[A-Za-z]/),Me=tr(/[\dA-Za-z]/),m$=tr(/[#-'*+\--9=?A-Z^-~]/);function Nc(t){return t!==null&&(t<32||t===127)}const zc=tr(/\d/),y$=tr(/[\dA-Fa-f]/),x$=tr(/[!-/:-@[-`{-~]/);function dt(t){return t!==null&&t<-2}function Se(t){return t!==null&&(t<0||t===32)}function Et(t){return t===-2||t===-1||t===32}const b$=tr(new RegExp("\\p{P}|\\p{S}","u")),w$=tr(/\s/);function tr(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Ci(t){const e=[];let n=-1,r=0,i=0;for(;++n55295&&s<57344){const o=t.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function Ot(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Et(l)?(t.enter(n),o(l)):e(l)}function o(l){return Et(l)&&s++a))return;const A=e.events.length;let O=A,H,N;for(;O--;)if(e.events[O][0]==="exit"&&e.events[O][1].type==="chunkFlow"){if(H){N=e.events[O][1].end;break}H=!0}for(y(r),_=A;_w;){const k=n[v];e.containerState=k[1],k[0].exit.call(e,t)}n.length=w}function b(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function S$(t,e,n){return Ot(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qp(t){if(t===null||Se(t)||w$(t))return 1;if(b$(t))return 2}function du(t,e,n){const r=[];let i=-1;for(;++i1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const u={...t[r][1].end},f={...t[n][1].start};Jp(u,-l),Jp(f,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...t[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:f},s={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},t[r][1].end={...a.start},t[n][1].start={...o.end},c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=qe(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=qe(c,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),c=qe(c,du(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=qe(c,[["exit",s,e],["enter",o,e],["exit",o,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(h=2,c=qe(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):h=0,xn(t,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n0&&Et(_)?Ot(t,b,"linePrefix",s+1)(_):b(_)}function b(_){return _===null||dt(_)?t.check(td,g,v)(_):(t.enter("codeFlowValue"),w(_))}function w(_){return _===null||dt(_)?(t.exit("codeFlowValue"),b(_)):(t.consume(_),w)}function v(_){return t.exit("codeFenced"),e(_)}function k(_,A,O){let H=0;return N;function N(I){return _.enter("lineEnding"),_.consume(I),_.exit("lineEnding"),M}function M(I){return _.enter("codeFencedFence"),Et(I)?Ot(_,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):$(I)}function $(I){return I===o?(_.enter("codeFencedFenceSequence"),z(I)):O(I)}function z(I){return I===o?(H++,_.consume(I),z):H>=a?(_.exit("codeFencedFenceSequence"),Et(I)?Ot(_,R,"whitespace")(I):R(I)):O(I)}function R(I){return I===null||dt(I)?(_.exit("codeFencedFence"),A(I)):O(I)}}}function O$(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const bl={name:"codeIndented",tokenize:N$},$$={partial:!0,tokenize:z$};function N$(t,e,n){const r=this;return i;function i(c){return t.enter("codeIndented"),Ot(t,s,"linePrefix",5)(c)}function s(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):dt(c)?t.attempt($$,a,l)(c):(t.enter("codeFlowValue"),o(c))}function o(c){return c===null||dt(c)?(t.exit("codeFlowValue"),a(c)):(t.consume(c),o)}function l(c){return t.exit("codeIndented"),e(c)}}function z$(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):dt(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):Ot(t,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):dt(a)?i(a):n(a)}}const j$={name:"codeText",previous:H$,resolve:q$,tokenize:W$};function q$(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ni(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Ni(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ni(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function m1(t,e,n,r,i,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let h=0;return u;function u(y){return y===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(y),t.exit(s),f):y===null||y===32||y===41||Nc(y)?n(y):(t.enter(r),t.enter(a),t.enter(o),t.enter("chunkString",{contentType:"string"}),g(y))}function f(y){return y===62?(t.enter(s),t.consume(y),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(t.exit("chunkString"),t.exit(o),f(y)):y===null||y===60||dt(y)?n(y):(t.consume(y),y===92?d:p)}function d(y){return y===60||y===62||y===92?(t.consume(y),p):p(y)}function g(y){return!h&&(y===null||y===41||Se(y))?(t.exit("chunkString"),t.exit(o),t.exit(a),t.exit(r),e(y)):h999||p===null||p===91||p===93&&!l||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(t.exit(s),t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):dt(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),h):(t.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===null||p===91||p===93||dt(p)||o++>999?(t.exit("chunkString"),h(p)):(t.consume(p),l||(l=!Et(p)),p===92?f:u)}function f(p){return p===91||p===92||p===93?(t.consume(p),o++,u):u(p)}}function x1(t,e,n,r,i,s){let a;return o;function o(f){return f===34||f===39||f===40?(t.enter(r),t.enter(i),t.consume(f),t.exit(i),a=f===40?41:f,l):n(f)}function l(f){return f===a?(t.enter(i),t.consume(f),t.exit(i),t.exit(r),e):(t.enter(s),c(f))}function c(f){return f===a?(t.exit(s),l(a)):f===null?n(f):dt(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Ot(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===a||f===null||dt(f)?(t.exit("chunkString"),c(f)):(t.consume(f),f===92?u:h)}function u(f){return f===a||f===92?(t.consume(f),h):h(f)}}function is(t,e){let n;return r;function r(i){return dt(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Et(i)?Ot(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Q$={name:"definition",tokenize:tN},J$={partial:!0,tokenize:eN};function tN(t,e,n){const r=this;let i;return s;function s(p){return t.enter("definition"),a(p)}function a(p){return y1.call(r,t,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=Nr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):n(p)}function l(p){return Se(p)?is(t,c)(p):c(p)}function c(p){return m1(t,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return t.attempt(J$,u,u)(p)}function u(p){return Et(p)?Ot(t,f,"whitespace")(p):f(p)}function f(p){return p===null||dt(p)?(t.exit("definition"),r.parser.defined.push(i),e(p)):n(p)}}function eN(t,e,n){return r;function r(o){return Se(o)?is(t,i)(o):n(o)}function i(o){return x1(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Et(o)?Ot(t,a,"whitespace")(o):a(o)}function a(o){return o===null||dt(o)?e(o):n(o)}}const nN={name:"hardBreakEscape",tokenize:rN};function rN(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return dt(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const iN={name:"headingAtx",resolve:sN,tokenize:aN};function sN(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},xn(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function aN(t,e,n){let r=0;return i;function i(h){return t.enter("atxHeading"),s(h)}function s(h){return t.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(t.consume(h),a):h===null||Se(h)?(t.exit("atxHeadingSequence"),o(h)):n(h)}function o(h){return h===35?(t.enter("atxHeadingSequence"),l(h)):h===null||dt(h)?(t.exit("atxHeading"),e(h)):Et(h)?Ot(t,o,"whitespace")(h):(t.enter("atxHeadingText"),c(h))}function l(h){return h===35?(t.consume(h),l):(t.exit("atxHeadingSequence"),o(h))}function c(h){return h===null||h===35||Se(h)?(t.exit("atxHeadingText"),o(h)):(t.consume(h),c)}}const oN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],nd=["pre","script","style","textarea"],lN={concrete:!0,name:"htmlFlow",resolveTo:uN,tokenize:fN},cN={partial:!0,tokenize:dN},hN={partial:!0,tokenize:pN};function uN(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function fN(t,e,n){const r=this;let i,s,a,o,l;return c;function c(S){return h(S)}function h(S){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(S),u}function u(S){return S===33?(t.consume(S),f):S===47?(t.consume(S),s=!0,g):S===63?(t.consume(S),i=3,r.interrupt?e:C):hn(S)?(t.consume(S),a=String.fromCharCode(S),x):n(S)}function f(S){return S===45?(t.consume(S),i=2,p):S===91?(t.consume(S),i=5,o=0,d):hn(S)?(t.consume(S),i=4,r.interrupt?e:C):n(S)}function p(S){return S===45?(t.consume(S),r.interrupt?e:C):n(S)}function d(S){const ut="CDATA[";return S===ut.charCodeAt(o++)?(t.consume(S),o===ut.length?r.interrupt?e:$:d):n(S)}function g(S){return hn(S)?(t.consume(S),a=String.fromCharCode(S),x):n(S)}function x(S){if(S===null||S===47||S===62||Se(S)){const ut=S===47,ct=a.toLowerCase();return!ut&&!s&&nd.includes(ct)?(i=1,r.interrupt?e(S):$(S)):oN.includes(a.toLowerCase())?(i=6,ut?(t.consume(S),y):r.interrupt?e(S):$(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):s?b(S):w(S))}return S===45||Me(S)?(t.consume(S),a+=String.fromCharCode(S),x):n(S)}function y(S){return S===62?(t.consume(S),r.interrupt?e:$):n(S)}function b(S){return Et(S)?(t.consume(S),b):N(S)}function w(S){return S===47?(t.consume(S),N):S===58||S===95||hn(S)?(t.consume(S),v):Et(S)?(t.consume(S),w):N(S)}function v(S){return S===45||S===46||S===58||S===95||Me(S)?(t.consume(S),v):k(S)}function k(S){return S===61?(t.consume(S),_):Et(S)?(t.consume(S),k):w(S)}function _(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(t.consume(S),l=S,A):Et(S)?(t.consume(S),_):O(S)}function A(S){return S===l?(t.consume(S),l=null,H):S===null||dt(S)?n(S):(t.consume(S),A)}function O(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||Se(S)?k(S):(t.consume(S),O)}function H(S){return S===47||S===62||Et(S)?w(S):n(S)}function N(S){return S===62?(t.consume(S),M):n(S)}function M(S){return S===null||dt(S)?$(S):Et(S)?(t.consume(S),M):n(S)}function $(S){return S===45&&i===2?(t.consume(S),E):S===60&&i===1?(t.consume(S),D):S===62&&i===4?(t.consume(S),Y):S===63&&i===3?(t.consume(S),C):S===93&&i===5?(t.consume(S),j):dt(S)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(cN,Q,z)(S)):S===null||dt(S)?(t.exit("htmlFlowData"),z(S)):(t.consume(S),$)}function z(S){return t.check(hN,R,Q)(S)}function R(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),I}function I(S){return S===null||dt(S)?z(S):(t.enter("htmlFlowData"),$(S))}function E(S){return S===45?(t.consume(S),C):$(S)}function D(S){return S===47?(t.consume(S),a="",T):$(S)}function T(S){if(S===62){const ut=a.toLowerCase();return nd.includes(ut)?(t.consume(S),Y):$(S)}return hn(S)&&a.length<8?(t.consume(S),a+=String.fromCharCode(S),T):$(S)}function j(S){return S===93?(t.consume(S),C):$(S)}function C(S){return S===62?(t.consume(S),Y):S===45&&i===2?(t.consume(S),C):$(S)}function Y(S){return S===null||dt(S)?(t.exit("htmlFlowData"),Q(S)):(t.consume(S),Y)}function Q(S){return t.exit("htmlFlow"),e(S)}}function pN(t,e,n){const r=this;return i;function i(a){return dt(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function dN(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt($o,e,n)}}const gN={name:"htmlText",tokenize:mN};function mN(t,e,n){const r=this;let i,s,a;return o;function o(C){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(C),l}function l(C){return C===33?(t.consume(C),c):C===47?(t.consume(C),k):C===63?(t.consume(C),w):hn(C)?(t.consume(C),O):n(C)}function c(C){return C===45?(t.consume(C),h):C===91?(t.consume(C),s=0,d):hn(C)?(t.consume(C),b):n(C)}function h(C){return C===45?(t.consume(C),p):n(C)}function u(C){return C===null?n(C):C===45?(t.consume(C),f):dt(C)?(a=u,D(C)):(t.consume(C),u)}function f(C){return C===45?(t.consume(C),p):u(C)}function p(C){return C===62?E(C):C===45?f(C):u(C)}function d(C){const Y="CDATA[";return C===Y.charCodeAt(s++)?(t.consume(C),s===Y.length?g:d):n(C)}function g(C){return C===null?n(C):C===93?(t.consume(C),x):dt(C)?(a=g,D(C)):(t.consume(C),g)}function x(C){return C===93?(t.consume(C),y):g(C)}function y(C){return C===62?E(C):C===93?(t.consume(C),y):g(C)}function b(C){return C===null||C===62?E(C):dt(C)?(a=b,D(C)):(t.consume(C),b)}function w(C){return C===null?n(C):C===63?(t.consume(C),v):dt(C)?(a=w,D(C)):(t.consume(C),w)}function v(C){return C===62?E(C):w(C)}function k(C){return hn(C)?(t.consume(C),_):n(C)}function _(C){return C===45||Me(C)?(t.consume(C),_):A(C)}function A(C){return dt(C)?(a=A,D(C)):Et(C)?(t.consume(C),A):E(C)}function O(C){return C===45||Me(C)?(t.consume(C),O):C===47||C===62||Se(C)?H(C):n(C)}function H(C){return C===47?(t.consume(C),E):C===58||C===95||hn(C)?(t.consume(C),N):dt(C)?(a=H,D(C)):Et(C)?(t.consume(C),H):E(C)}function N(C){return C===45||C===46||C===58||C===95||Me(C)?(t.consume(C),N):M(C)}function M(C){return C===61?(t.consume(C),$):dt(C)?(a=M,D(C)):Et(C)?(t.consume(C),M):H(C)}function $(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(t.consume(C),i=C,z):dt(C)?(a=$,D(C)):Et(C)?(t.consume(C),$):(t.consume(C),R)}function z(C){return C===i?(t.consume(C),i=void 0,I):C===null?n(C):dt(C)?(a=z,D(C)):(t.consume(C),z)}function R(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||Se(C)?H(C):(t.consume(C),R)}function I(C){return C===47||C===62||Se(C)?H(C):n(C)}function E(C){return C===62?(t.consume(C),t.exit("htmlTextData"),t.exit("htmlText"),e):n(C)}function D(C){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),T}function T(C){return Et(C)?Ot(t,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):j(C)}function j(C){return t.enter("htmlTextData"),a(C)}}const gu={name:"labelEnd",resolveAll:wN,resolveTo:CN,tokenize:vN},yN={tokenize:_N},xN={tokenize:kN},bN={tokenize:SN};function wN(t){let e=-1;const n=[];for(;++e=3&&(c===null||dt(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),Et(c)?Ot(t,o,"whitespace")(c):o(c))}}const Ce={continuation:{tokenize:PN},exit:ON,name:"list",tokenize:RN},IN={partial:!0,tokenize:$N},FN={partial:!0,tokenize:DN};function RN(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(p){const d=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(d==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:zc(p)){if(r.containerState.type||(r.containerState.type=d,t.enter(d,{_container:!0})),d==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(fa,n,c)(p):c(p);if(!r.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return n(p)}function l(p){return zc(p)&&++a<10?(t.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),c(p)):n(p)}function c(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,t.check($o,r.interrupt?n:h,t.attempt(IN,f,u))}function h(p){return r.containerState.initialBlankLine=!0,s++,f(p)}function u(p){return Et(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function PN(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check($o,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ot(t,e,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Et(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(FN,e,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ot(t,t.attempt(Ce,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function DN(t,e,n){const r=this;return Ot(t,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(s):n(s)}}function ON(t){t.exit(this.containerState.type)}function $N(t,e,n){const r=this;return Ot(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Et(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const rd={name:"setextUnderline",resolveTo:NN,tokenize:zN};function NN(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",a,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function zN(t,e,n){const r=this;let i;return s;function s(c){let h=r.events.length,u;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){u=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(t.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return t.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(t.consume(c),o):(t.exit("setextHeadingLineSequence"),Et(c)?Ot(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||dt(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const jN={tokenize:qN};function qN(t){const e=this,n=t.attempt($o,r,t.attempt(this.parser.constructs.flowInitial,i,Ot(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Y$,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const HN={resolveAll:w1()},WN=b1("string"),UN=b1("text");function b1(t){return{resolveAll:w1(t==="text"?VN:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,a,o);return a;function a(h){return c(h)?s(h):o(h)}function o(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),l}function l(h){return c(h)?(n.exit("data"),s(h)):(n.consume(h),l)}function c(h){if(h===null)return!0;const u=i[h];let f=-1;if(u)for(;++f-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(t[i].slice(0,s))}return a}function s5(t,e){let n=-1;const r=[];let i;for(;++n0){const ye=yt.tokenStack[yt.tokenStack.length-1];(ye[1]||sd).call(yt,void 0,ye[0])}for(G.position={start:Nn(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Nn(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},Tt=-1;++Tt1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function v5(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function _5(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function _1(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function k5(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return _1(t,e);const i={src:Ci(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,s),t.applyData(e,s)}function S5(t,e){const n={src:Ci(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function T5(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function E5(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return _1(t,e);const i={href:Ci(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function A5(t,e){const n={href:Ci(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function L5(t,e,n){const r=t.all(e),i=n?M5(n):k1(e),s={},a=[];if(typeof e.checked=="boolean"){const h=r[0];let u;h&&h.type==="element"&&h.tagName==="p"?u=h:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o1}function B5(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},o=cu(e.children[1]),l=i1(e.children[e.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}function D5(t,e,n){const r=n?n.children:void 0,s=(r?r.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:e.children.length;let l=-1;const c=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return s.push(ld(e.slice(i),i>0,!1)),s.join("")}function ld(t,e,n){let r=0,i=t.length;if(e){let s=t.codePointAt(r);for(;s===ad||s===od;)r++,s=t.codePointAt(r)}if(n){let s=t.codePointAt(i-1);for(;s===ad||s===od;)i--,s=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function N5(t,e){const n={type:"text",value:$5(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function z5(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const j5={blockquote:m5,break:y5,code:x5,delete:b5,emphasis:w5,footnoteReference:C5,heading:v5,html:_5,imageReference:k5,image:S5,inlineCode:T5,linkReference:E5,link:A5,listItem:L5,list:B5,paragraph:I5,root:F5,strong:R5,table:P5,tableCell:O5,tableRow:D5,text:N5,thematicBreak:z5,toml:Xs,yaml:Xs,definition:Xs,footnoteDefinition:Xs};function Xs(){}const S1=-1,No=0,Ja=1,to=2,mu=3,yu=4,xu=5,bu=6,T1=7,E1=8,cd=typeof self=="object"?self:globalThis,q5=(t,e)=>{const n=(i,s)=>(t.set(s,i),i),r=i=>{if(t.has(i))return t.get(i);const[s,a]=e[i];switch(s){case No:case S1:return n(a,i);case Ja:{const o=n([],i);for(const l of a)o.push(r(l));return o}case to:{const o=n({},i);for(const[l,c]of a)o[r(l)]=r(c);return o}case mu:return n(new Date(a),i);case yu:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case xu:{const o=n(new Map,i);for(const[l,c]of a)o.set(r(l),r(c));return o}case bu:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case T1:{const{name:o,message:l}=a;return n(new cd[o](l),i)}case E1:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new cd[s](a),i)};return r},hd=t=>q5(new Map,t)(0),Ir="",{toString:H5}={},{keys:W5}=Object,zi=t=>{const e=typeof t;if(e!=="object"||!t)return[No,e];const n=H5.call(t).slice(8,-1);switch(n){case"Array":return[Ja,Ir];case"Object":return[to,Ir];case"Date":return[mu,Ir];case"RegExp":return[yu,Ir];case"Map":return[xu,Ir];case"Set":return[bu,Ir]}return n.includes("Array")?[Ja,n]:n.includes("Error")?[T1,n]:[to,n]},Ks=([t,e])=>t===No&&(e==="function"||e==="symbol"),U5=(t,e,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=zi(a);switch(o){case No:{let h=a;switch(l){case"bigint":o=E1,h=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return i([S1],a)}return i([o,h],a)}case Ja:{if(l)return i([l,[...a]],a);const h=[],u=i([o,h],a);for(const f of a)h.push(s(f));return u}case to:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(e&&"toJSON"in a)return s(a.toJSON());const h=[],u=i([o,h],a);for(const f of W5(a))(t||!Ks(zi(a[f])))&&h.push([s(f),s(a[f])]);return u}case mu:return i([o,a.toISOString()],a);case yu:{const{source:h,flags:u}=a;return i([o,{source:h,flags:u}],a)}case xu:{const h=[],u=i([o,h],a);for(const[f,p]of a)(t||!(Ks(zi(f))||Ks(zi(p))))&&h.push([s(f),s(p)]);return u}case bu:{const h=[],u=i([o,h],a);for(const f of a)(t||!Ks(zi(f)))&&h.push(s(f));return u}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},ud=(t,{json:e,lossy:n}={})=>{const r=[];return U5(!(e||n),!!e,new Map,r)(t),r},eo=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?hd(ud(t,e)):structuredClone(t):(t,e)=>hd(ud(t,e));function V5(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function Y5(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function G5(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||V5,r=t.options.footnoteBackLabel||Y5,i=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l0&&d.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,p);typeof b=="string"&&(b={type:"text",value:b}),d.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const x=h[h.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const b=x.children[x.children.length-1];b&&b.type==="text"?b.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...d)}else h.push(...d);const y={type:"element",tagName:"li",properties:{id:e+"fn-"+f},children:t.wrap(h,!0)};t.patch(c,y),o.push(y)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...eo(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:t.wrap(o,!0)},{type:"text",value:` -`}]}}const jx=function(t){if(t==null)return gD;if(typeof t=="function")return Ys(t);if(typeof t=="object")return Array.isArray(t)?fD(t):pD(t);if(typeof t=="string")return dD(t);throw new Error("Expected function, string, or object as test")};function fD(t){const e=[];let r=-1;for(;++r":""))+")"})}return f;function f(){let p=Ux,d,m,x;if((!e||a(l,c,h[h.length-1]||void 0))&&(p=wD(r(l,h)),p[0]===Of))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==xD)for(m=(n?y.children.length:-1)+s,x=h.concat(y);m>-1&&m0&&r.push({type:"text",value:` -`}),r}function Nf(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}function zf(t,e){const r=kD(t,e),n=r.one(t,void 0),i=uD(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` -`},i),a}function ED(t,e){return t&&"run"in t?async function(r,n){const i=zf(r,{file:n,...e});await t.run(i,n)}:function(r,n){return zf(r,{file:n,...t||e})}}function qf(t){if(t)throw t}var Ia=Object.prototype.hasOwnProperty,Vx=Object.prototype.toString,Hf=Object.defineProperty,Wf=Object.getOwnPropertyDescriptor,jf=function(e){return typeof Array.isArray=="function"?Array.isArray(e):Vx.call(e)==="[object Array]"},Uf=function(e){if(!e||Vx.call(e)!=="[object Object]")return!1;var r=Ia.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Ia.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||Ia.call(e,i)},Yf=function(e,r){Hf&&r.name==="__proto__"?Hf(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},Vf=function(e,r){if(r==="__proto__")if(Ia.call(e,r)){if(Wf)return Wf(e,r).value}else return;return e[r]},AD=function t(){var e,r,n,i,a,s,o=arguments[0],l=1,c=arguments.length,h=!1;for(typeof o=="boolean"&&(h=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});ls.length;let l;o&&s.push(i);try{l=t.apply(this,s)}catch(c){const h=c;if(o&&r)throw h;return i(h)}o||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){r||(r=!0,e(s,...o))}function a(s){i(null,s)}}const Ue={basename:MD,dirname:FD,extname:ID,join:$D,sep:"/"};function MD(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ea(t);let r=0,n=-1,i=t.length,a;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":t.slice(r,n)}if(e===t)return"";let s=-1,o=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(t.codePointAt(i)===e.codePointAt(o--)?o<0&&(n=i):(o=-1,n=s));return r===n?n=s:n<0&&(n=t.length),t.slice(r,n)}function FD(t){if(ea(t),t.length===0)return".";let e=-1,r=t.length,n;for(;--r;)if(t.codePointAt(r)===47){if(n){e=r;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function ID(t){ea(t);let e=t.length,r=-1,n=0,i=-1,a=0,s;for(;e--;){const o=t.codePointAt(e);if(o===47){if(s){n=e+1;break}continue}r<0&&(s=!0,r=e+1),o===46?i<0?i=e:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":t.slice(i,r)}function $D(...t){let e=-1,r;for(;++e0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}function DD(t,e){let r="",n=0,i=-1,a=0,s=-1,o,l;for(;++s<=t.length;){if(s2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}}else if(r.length>0){r="",n=0,i=s,a=0;continue}}e&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,s):r=t.slice(i+1,s),n=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return r}function ea(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const PD={cwd:OD};function OD(){return"/"}function zl(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function ND(t){if(typeof t=="string")t=new URL(t);else if(!zl(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return zD(t)}function zD(t){if(t.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const e=t.pathname;let r=-1;for(;++r0){let[p,...d]=h;const m=n[f][1];Nl(m)&&Nl(p)&&(p=So(!0,m,p)),n[f]=[c,p,...d]}}}}const jD=new ih().freeze();function Lo(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Bo(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Mo(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xf(t){if(!Nl(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Kf(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function xa(t){return UD(t)?t:new Gx(t)}function UD(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function YD(t){return typeof t=="string"||VD(t)}function VD(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const GD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Zf=[],Qf={allowDangerousHtml:!0},XD=/^(https?|ircs?|mailto|xmpp)$/i,KD=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ZD(t){const e=t.allowedElements,r=t.allowElement,n=t.children||"",i=t.className,a=t.components,s=t.disallowedElements,o=t.rehypePlugins||Zf,l=t.remarkPlugins||Zf,c=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Qf}:Qf,h=t.skipHtml,u=t.unwrapDisallowed,f=t.urlTransform||QD,p=jD().use(FR).use(l).use(ED,c).use(o),d=new Gx;typeof n=="string"&&(d.value=n);for(const b of KD)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+GD+b.id,void 0);const m=p.parse(d);let x=p.runSync(m,d);return i&&(x={type:"element",tagName:"div",properties:{className:i},children:x.type==="root"?x.children:[x]}),Yx(x,y),hI(x,{Fragment:W.Fragment,components:a,ignoreInvalidStyle:!0,jsx:W.jsx,jsxs:W.jsxs,passKeys:!0,passNode:!0});function y(b,C,v){if(b.type==="raw"&&v&&typeof C=="number")return h?v.children.splice(C,1):v.children[C]={type:"text",value:b.value},C;if(b.type==="element"){let S;for(S in ko)if(Object.hasOwn(ko,S)&&Object.hasOwn(b.properties,S)){const _=b.properties[S],F=ko[S];(F===null||F.includes(b.tagName))&&(b.properties[S]=f(String(_||""),S,b))}}if(b.type==="element"){let S=e?!e.includes(b.tagName):s?s.includes(b.tagName):!1;if(!S&&r&&typeof C=="number"&&(S=!r(b,C,v)),S&&v&&typeof C=="number")return u&&b.children?v.children.splice(C,1,...b.children):v.children.splice(C,1),C}}}function QD(t){const e=t.indexOf(":"),r=t.indexOf("?"),n=t.indexOf("#"),i=t.indexOf("/");return e<0||i>-1&&e>i||r>-1&&e>r||n>-1&&e>n||XD.test(t.slice(0,e))?t:""}function JD(t){const e=X.useRef({value:t,previous:t});return X.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function t3(t){const[e,r]=X.useState(void 0);return Mb(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,o=c.blockSize}else s=t.offsetWidth,o=t.offsetHeight;r({width:s,height:o})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var ah="Switch",[e3,eP]=tp(ah),[r3,n3]=e3(ah),Xx=X.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:a,required:s,disabled:o,value:l="on",onCheckedChange:c,form:h,...u}=t,[f,p]=X.useState(null),d=ep(e,C=>p(C)),m=X.useRef(!1),x=f?h||!!f.closest("form"):!0,[y=!1,b]=Ul({prop:i,defaultProp:a,onChange:c});return W.jsxs(r3,{scope:r,checked:y,disabled:o,children:[W.jsx(Br.button,{type:"button",role:"switch","aria-checked":y,"aria-required":s,"data-state":Qx(y),"data-disabled":o?"":void 0,disabled:o,value:l,...u,ref:d,onClick:Ze(t.onClick,C=>{b(v=>!v),x&&(m.current=C.isPropagationStopped(),m.current||C.stopPropagation())})}),x&&W.jsx(i3,{control:f,bubbles:!m.current,name:n,value:l,checked:y,required:s,disabled:o,form:h,style:{transform:"translateX(-100%)"}})]})});Xx.displayName=ah;var Kx="SwitchThumb",Zx=X.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,i=n3(Kx,r);return W.jsx(Br.span,{"data-state":Qx(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:e})});Zx.displayName=Kx;var i3=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,a=X.useRef(null),s=JD(r),o=t3(e);return X.useEffect(()=>{const l=a.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(s!==r&&u){const f=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(f)}},[s,r,n]),W.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:a,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Qx(t){return t?"checked":"unchecked"}var Jx=Xx,a3=Zx;const ql=X.forwardRef(({className:t,...e},r)=>W.jsx(Jx,{className:Sr("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:r,children:W.jsx(a3,{className:Sr("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));ql.displayName=Jx.displayName;function s3(t,e=[]){let r=[];function n(a,s){const o=X.createContext(s),l=r.length;r=[...r,s];function c(u){const{scope:f,children:p,...d}=u,m=(f==null?void 0:f[t][l])||o,x=X.useMemo(()=>d,Object.values(d));return W.jsx(m.Provider,{value:x,children:p})}function h(u,f){const p=(f==null?void 0:f[t][l])||o,d=X.useContext(p);if(d)return d;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,h]}const i=()=>{const a=r.map(s=>X.createContext(s));return function(o){const l=(o==null?void 0:o[t])||a;return X.useMemo(()=>({[`__scope${t}`]:{...o,[t]:l}}),[o,l])}};return i.scopeName=t,[n,o3(i,...e)]}function o3(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((o,{useScope:l,scopeName:c})=>{const u=l(a)[`__scope${c}`];return{...o,...u}},{});return X.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return r.scopeName=e.scopeName,r}var l3=X.createContext(void 0);function tb(t){const e=X.useContext(l3);return t||e||"ltr"}var Fo="rovingFocusGroup.onEntryFocus",c3={bubbles:!1,cancelable:!0},Vs="RovingFocusGroup",[Hl,eb,h3]=Fb(Vs),[u3,rb]=s3(Vs,[h3]),[f3,p3]=u3(Vs),nb=X.forwardRef((t,e)=>W.jsx(Hl.Provider,{scope:t.__scopeRovingFocusGroup,children:W.jsx(Hl.Slot,{scope:t.__scopeRovingFocusGroup,children:W.jsx(d3,{...t,ref:e})})}));nb.displayName=Vs;var d3=X.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:h=!1,...u}=t,f=X.useRef(null),p=ep(e,f),d=tb(a),[m=null,x]=Ul({prop:s,defaultProp:o,onChange:l}),[y,b]=X.useState(!1),C=Ib(c),v=eb(r),S=X.useRef(!1),[_,F]=X.useState(0);return X.useEffect(()=>{const D=f.current;if(D)return D.addEventListener(Fo,C),()=>D.removeEventListener(Fo,C)},[C]),W.jsx(f3,{scope:r,orientation:n,dir:d,loop:i,currentTabStopId:m,onItemFocus:X.useCallback(D=>x(D),[x]),onItemShiftTab:X.useCallback(()=>b(!0),[]),onFocusableItemAdd:X.useCallback(()=>F(D=>D+1),[]),onFocusableItemRemove:X.useCallback(()=>F(D=>D-1),[]),children:W.jsx(Br.div,{tabIndex:y||_===0?-1:0,"data-orientation":n,...u,ref:p,style:{outline:"none",...t.style},onMouseDown:Ze(t.onMouseDown,()=>{S.current=!0}),onFocus:Ze(t.onFocus,D=>{const q=!S.current;if(D.target===D.currentTarget&&q&&!y){const O=new CustomEvent(Fo,c3);if(D.currentTarget.dispatchEvent(O),!O.defaultPrevented){const B=v().filter(A=>A.focusable),P=B.find(A=>A.active),N=B.find(A=>A.id===m),T=[P,N,...B].filter(Boolean).map(A=>A.ref.current);sb(T,h)}}S.current=!1}),onBlur:Ze(t.onBlur,()=>b(!1))})})}),ib="RovingFocusGroupItem",ab=X.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,...s}=t,o=rp(),l=a||o,c=p3(ib,r),h=c.currentTabStopId===l,u=eb(r),{onFocusableItemAdd:f,onFocusableItemRemove:p}=c;return X.useEffect(()=>{if(n)return f(),()=>p()},[n,f,p]),W.jsx(Hl.ItemSlot,{scope:r,id:l,focusable:n,active:i,children:W.jsx(Br.span,{tabIndex:h?0:-1,"data-orientation":c.orientation,...s,ref:e,onMouseDown:Ze(t.onMouseDown,d=>{n?c.onItemFocus(l):d.preventDefault()}),onFocus:Ze(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Ze(t.onKeyDown,d=>{if(d.key==="Tab"&&d.shiftKey){c.onItemShiftTab();return}if(d.target!==d.currentTarget)return;const m=y3(d,c.orientation,c.dir);if(m!==void 0){if(d.metaKey||d.ctrlKey||d.altKey||d.shiftKey)return;d.preventDefault();let y=u().filter(b=>b.focusable).map(b=>b.ref.current);if(m==="last")y.reverse();else if(m==="prev"||m==="next"){m==="prev"&&y.reverse();const b=y.indexOf(d.currentTarget);y=c.loop?x3(y,b+1):y.slice(b+1)}setTimeout(()=>sb(y))}})})})});ab.displayName=ib;var g3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function m3(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function y3(t,e,r){const n=m3(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return g3[n]}function sb(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function x3(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var b3=nb,w3=ab,sh="Tabs",[C3,rP]=tp(sh,[rb]),ob=rb(),[k3,oh]=C3(sh),lb=X.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:o,activationMode:l="automatic",...c}=t,h=tb(o),[u,f]=Ul({prop:n,onChange:i,defaultProp:a});return W.jsx(k3,{scope:r,baseId:rp(),value:u,onValueChange:f,orientation:s,dir:h,activationMode:l,children:W.jsx(Br.div,{dir:h,"data-orientation":s,...c,ref:e})})});lb.displayName=sh;var cb="TabsList",hb=X.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...i}=t,a=oh(cb,r),s=ob(r);return W.jsx(b3,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:W.jsx(Br.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:e})})});hb.displayName=cb;var ub="TabsTrigger",fb=X.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=t,s=oh(ub,r),o=ob(r),l=gb(s.baseId,n),c=mb(s.baseId,n),h=n===s.value;return W.jsx(w3,{asChild:!0,...o,focusable:!i,active:h,children:W.jsx(Br.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":c,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...a,ref:e,onMouseDown:Ze(t.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?s.onValueChange(n):u.preventDefault()}),onKeyDown:Ze(t.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&s.onValueChange(n)}),onFocus:Ze(t.onFocus,()=>{const u=s.activationMode!=="manual";!h&&!i&&u&&s.onValueChange(n)})})})});fb.displayName=ub;var pb="TabsContent",db=X.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=t,o=oh(pb,r),l=gb(o.baseId,n),c=mb(o.baseId,n),h=n===o.value,u=X.useRef(h);return X.useEffect(()=>{const f=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(f)},[]),W.jsx($b,{present:i||h,children:({present:f})=>W.jsx(Br.div,{"data-state":h?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...s,ref:e,style:{...t.style,animationDuration:u.current?"0s":void 0},children:f&&a})})});db.displayName=pb;function gb(t,e){return`${t}-trigger-${e}`}function mb(t,e){return`${t}-content-${e}`}var _3=lb,yb=hb,xb=fb,bb=db;const v3=_3,wb=X.forwardRef(({className:t,...e},r)=>W.jsx(yb,{ref:r,className:Sr("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...e}));wb.displayName=yb.displayName;const Wl=X.forwardRef(({className:t,...e},r)=>W.jsx(xb,{ref:r,className:Sr("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...e}));Wl.displayName=xb.displayName;const jl=X.forwardRef(({className:t,...e},r)=>W.jsx(bb,{ref:r,className:Sr("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));jl.displayName=bb.displayName;const S3=t=>{const r=Math.min(t/10,1),n=Math.floor(255-r*100);return`rgb(${n}, ${n+50}, 255)`};function T3({entities:t,minimumEntityCount:e,setMinimumEntityCount:r,selectedEntity:n,handleShowAllRelationships:i,handleEntityClick:a,deleteEntity:s}){const o=(l,c)=>{l.preventDefault(),window.confirm(`Delete ${c} and its relationships?`)&&s(c)};return W.jsx("div",{className:"entities-list",children:W.jsxs("div",{className:"chips-container mb-4 flex flex-wrap",children:[W.jsx("button",{className:"chip-button border rounded-sm px-2 py-1 mr-1 my-1 flex items-center hover:bg-gray-800 hover:text-white",style:{backgroundColor:n===null?"green":"inherit",color:n===null?"white":"inherit"},onClick:i,children:"All"},"Docagram-All"),t.sort((l,c)=>c.count-l.count).filter(l=>l.count>=e).map(l=>W.jsxs("button",{className:"chip-button border rounded-sm px-2 py-1 mr-1 my-1 flex items-center hover:bg-gray-800 hover:text-white",style:{backgroundColor:l.name===n?"green":S3(l.count),color:l.name===n?"white":"inherit"},onClick:()=>a(l.name),onContextMenu:c=>o(c,l.name),children:[l.name," ",W.jsxs("span",{className:"ml-1 text-sm",children:["(",l.count,")"]})]},l.name))]})})}function E3({loading:t,aiService:e,relationshipService:r}){const[n,i]=X.useState([]),[a,s]=X.useState(""),[o,l]=X.useState(null),[c,h]=X.useState(!0),[u,f]=X.useState(!0),[p,d]=X.useState([]),[m,x]=X.useState([]),[y,b]=X.useState("diagram"),[C,v]=X.useState(null),[S,_]=X.useState(1);X.useEffect(()=>()=>{chrome.tabs.query({active:!0,currentWindow:!0},L=>{L[0].id&&chrome.tabs.sendMessage(L[0].id,{action:"highlight",entity:""})})},[]);const F=X.useCallback(async()=>{try{r.reset(),i([]),l(null),s("Analyzing page content..."),d([]),x([]),v(null);const L=await Eh.getPageContent(),T=await Eh.splitIntoChunks(L),A=window.location.href,$=[];for(let I=0;IsetTimeout(w,0))}}catch(L){console.error("Analysis failed:",L),l(L.message)}finally{s("")}},[e]),D=async L=>{try{const[T]=await chrome.tabs.query({active:!0,currentWindow:!0});T.id&&await chrome.tabs.sendMessage(T.id,{action:"highlight",entity:L===C?"":L})}catch(T){console.error("Failed to send highlight message:",T)}},q=L=>{if(L===C)v(null);else{v(L);const T=p.filter(A=>A.entity1===L||A.entity2===L);d(T)}},O=()=>{v(null)},B=L=>{const T=p.filter($=>$.entity1!==L&&$.entity2!==L);d(T);const A=m.filter($=>$.name!==L);x(A),C===L&&v(null)},P=L=>{D(L),q(L)},N=()=>{const L=n.flatMap($=>$.relationships);d(L);const T=new Map;L.forEach($=>{T.set($.entity1,(T.get($.entity1)||0)+1),T.set($.entity2,(T.get($.entity2)||0)+1)});const A=Array.from(T.entries()).map(([$,I])=>({name:$,count:I}));x(A)};return W.jsx(Ks,{className:"w-full",children:W.jsxs(Zs,{className:"pt-0",children:[W.jsx("div",{className:"sticky top-0 bg-white z-10 border-b",style:{borderBottom:"1px solid #e5e7eb"},children:W.jsxs("div",{className:"flex flex-wrap items-center gap-2 p-2 md:p-4",children:[W.jsx(ia,{onClick:F,disabled:t,className:"mr-4",children:"Analyze"}),W.jsx(ia,{className:"block md:hidden",onClick:N,disabled:n.length===0,variant:"outline",children:"Combine All Diagrams"}),W.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[W.jsxs("div",{className:"flex items-center",children:[W.jsx(ql,{id:"show-summaries",checked:c,onCheckedChange:h}),W.jsx(Th,{htmlFor:"show-summaries",className:"ml-2 mr-4",children:"Show Summaries"})]}),W.jsxs("div",{className:"flex items-center",children:[W.jsx(ql,{id:"show-diagrams",checked:u,onCheckedChange:f}),W.jsx(Th,{htmlFor:"show-diagrams",className:"ml-2 mr-4",children:"Show Diagrams"})]}),W.jsx(ia,{className:"hidden md:block",onClick:N,disabled:n.length===0,variant:"outline",children:"Combine All Diagrams"})]})]})}),W.jsxs("div",{className:"space-y-6 pt-6",children:[W.jsx(zb,{status:a,error:o}),p&&p.length>0&&W.jsx(Ks,{className:"mb-6",children:W.jsx(Zs,{children:W.jsxs(v3,{value:y,onValueChange:b,children:[W.jsxs("div",{className:"flex gap-8 pt-4",children:[W.jsx("h2",{className:"text-xl font-bold",children:"Combined Diagram"}),W.jsxs(wb,{children:[W.jsx(Wl,{value:"diagram",children:"Diagram"}),W.jsx(Wl,{value:"entities",children:"Entities"})]}),C&&W.jsx(ia,{variant:"outline",onClick:O,children:"Show All"})]}),W.jsx(jl,{value:"diagram",children:W.jsx(lf,{relationships:p,onNodeClick:P})}),W.jsx(jl,{value:"entities",children:W.jsx(T3,{entities:m,minimumEntityCount:S,setMinimumEntityCount:_,selectedEntity:C,handleShowAllRelationships:O,handleEntityClick:L=>{q(L),b("diagram")},deleteEntity:B})})]})})}),n.map((L,T)=>W.jsx(Ks,{className:"mb-6",children:W.jsxs(Zs,{className:"space-y-4",children:[W.jsxs("h2",{className:"text-xl font-bold pt-4",children:["Section ",T+1]}),c&&W.jsxs("div",{className:"bg-muted rounded-lg p-4",children:[W.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Summary"}),W.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:W.jsx(ZD,{children:L.summary})})]}),u&&W.jsx(lf,{relationships:L.relationships,onNodeClick:D})]})},T))]})]})})}function A3(){const[t,e]=X.useState(!1),[r,n]=X.useState(null),a=X.useRef(new Pb).current,o=X.useRef(new np).current;return X.useEffect(()=>((async()=>{try{await a.initialize();const c=a.getSessionStats();console.log("AI Service Initialized:",c);const h=await a.checkSupport();n(h)}catch(c){console.error("AIService initialization failed:",c)}})(),()=>{a.destroy()}),[]),W.jsx("div",{className:"p-4 space-y-4 w-full",children:W.jsx(E3,{loading:t,aiService:a,relationshipService:o})})}const lh=document.createElement("div");lh.className="container";document.body.appendChild(lh);const L3=Rb.createRoot(lh);L3.render(W.jsx(Db.StrictMode,{children:W.jsx(A3,{})}));export{cv as $,ki as A,bp as B,Lc as C,Ne as D,gE as E,cw as F,CL as G,Yu as H,S1 as I,yC as J,pv as K,Mn as L,I3 as M,Gl as N,$s as O,F3 as P,Yg as Q,dE as R,Ui as S,y1 as T,Lp as U,Z1 as V,ji as W,rt as X,at as Y,sE as Z,g as _,Vt as a,kr as a$,hu as a0,cu as a1,j3 as a2,N3 as a3,H3 as a4,q3 as a5,P3 as a6,gc as a7,W3 as a8,O3 as a9,GS as aA,XT as aB,wc as aC,tf as aD,aA as aE,hv as aF,NC as aG,zC as aH,_s as aI,tn as aJ,nE as aK,dm as aL,Ls as aM,Is as aN,ns as aO,mm as aP,pm as aQ,IT as aR,hc as aS,Lg as aT,ye as aU,Gi as aV,D_ as aW,Fg as aX,D3 as aY,jb as aZ,uc as a_,hn as aa,Y3 as ab,U3 as ac,z3 as ad,FA as ae,y0 as af,Z3 as ag,km as ah,Gt as ai,Wn as aj,sc as ak,QA as al,Vm as am,Hn as an,ot as ao,Je as ap,xL as aq,K3 as ar,Q3 as as,G3 as at,nt as au,X3 as av,sL as aw,rL as ax,eL as ay,rE as az,aw as b,Di as b0,nu as b1,W_ as b2,eE as b3,GT as b4,RS as b5,Cc as b6,LT as b7,aE as b8,Ki as b9,zn as ba,ts as bb,zT as bc,qL as bd,Xi as be,rs as bf,$T as bg,om as bh,OS as bi,NS as bj,Nr as bk,Su as bl,zS as bm,kc as bn,PS as bo,WS as bp,qn as bq,Mr as br,wu as bs,_c as bt,cm as bu,Al as bv,iE as bw,Fs as bx,Tt as by,iw as c,_t as d,Nn as e,vm as f,nw as g,Dn as h,Gr as i,kt as j,Ap as k,z as l,gg as m,$3 as n,R3 as o,sw as p,ow as q,xC as r,rw as s,ZA as t,Ve as u,ew as v,xE as w,V3 as x,tP as y,J3 as z}; +`}]}}const A1=function(t){if(t==null)return Q5;if(typeof t=="function")return zo(t);if(typeof t=="object")return Array.isArray(t)?X5(t):K5(t);if(typeof t=="string")return Z5(t);throw new Error("Expected function, string, or object as test")};function X5(t){const e=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let p=L1,d,g,x;if((!e||s(l,c,h[h.length-1]||void 0))&&(p=r3(n(l,h)),p[0]===fd))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==e3)for(g=(r?y.children.length:-1)+a,x=h.concat(y);g>-1&&g0&&n.push({type:"text",value:` +`}),n}function pd(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function dd(t,e){const n=s3(t,e),r=n.one(t,void 0),i=G5(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:` +`},i),s}function h3(t,e){return t&&"run"in t?async function(n,r){const i=dd(n,{file:r,...e});await t.run(i,r)}:function(n,r){return dd(n,{file:r,...t||e})}}function gd(t){if(t)throw t}var pa=Object.prototype.hasOwnProperty,B1=Object.prototype.toString,md=Object.defineProperty,yd=Object.getOwnPropertyDescriptor,xd=function(e){return typeof Array.isArray=="function"?Array.isArray(e):B1.call(e)==="[object Array]"},bd=function(e){if(!e||B1.call(e)!=="[object Object]")return!1;var n=pa.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&pa.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var i;for(i in e);return typeof i>"u"||pa.call(e,i)},wd=function(e,n){md&&n.name==="__proto__"?md(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},Cd=function(e,n){if(n==="__proto__")if(pa.call(e,n)){if(yd)return yd(e,n).value}else return;return e[n]},u3=function t(){var e,n,r,i,s,a,o=arguments[0],l=1,c=arguments.length,h=!1;for(typeof o=="boolean"&&(h=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});la.length;let l;o&&a.push(i);try{l=t.apply(this,a)}catch(c){const h=c;if(o&&n)throw h;return i(h)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,e(a,...o))}function s(a){i(null,a)}}const on={basename:d3,dirname:g3,extname:m3,join:y3,sep:"/"};function d3(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Rs(t);let n=0,r=-1,i=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,o=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(t.codePointAt(i)===e.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function g3(t){if(Rs(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function m3(t){Rs(t);let e=t.length,n=-1,r=0,i=-1,s=0,a;for(;e--;){const o=t.codePointAt(e);if(o===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),o===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function y3(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function b3(t,e){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=t.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function Rs(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const w3={cwd:C3};function C3(){return"/"}function Wc(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function v3(t){if(typeof t=="string")t=new URL(t);else if(!Wc(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return _3(t)}function _3(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n0){let[p,...d]=h;const g=r[f][1];Hc(g)&&Hc(p)&&(p=Cl(!0,g,p)),r[f]=[c,p,...d]}}}}const E3=new wu().freeze();function Sl(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Tl(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function El(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _d(t){if(!Hc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function kd(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Zs(t){return A3(t)?t:new I1(t)}function A3(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function L3(t){return typeof t=="string"||M3(t)}function M3(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const B3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Sd=[],Td={allowDangerousHtml:!0},I3=/^(https?|ircs?|mailto|xmpp)$/i,F3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function R3(t){const e=t.allowedElements,n=t.allowElement,r=t.children||"",i=t.className,s=t.components,a=t.disallowedElements,o=t.rehypePlugins||Sd,l=t.remarkPlugins||Sd,c=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Td}:Td,h=t.skipHtml,u=t.unwrapDisallowed,f=t.urlTransform||P3,p=E3().use(g5).use(l).use(h3,c).use(o),d=new I1;typeof r=="string"&&(d.value=r);for(const b of F3)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+B3+b.id,void 0);const g=p.parse(d);let x=p.runSync(g,d);return i&&(x={type:"element",tagName:"div",properties:{className:i},children:x.type==="root"?x.children:[x]}),M1(x,y),YO(x,{Fragment:L.Fragment,components:s,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function y(b,w,v){if(b.type==="raw"&&v&&typeof w=="number")return h?v.children.splice(w,1):v.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let k;for(k in xl)if(Object.hasOwn(xl,k)&&Object.hasOwn(b.properties,k)){const _=b.properties[k],A=xl[k];(A===null||A.includes(b.tagName))&&(b.properties[k]=f(String(_||""),k,b))}}if(b.type==="element"){let k=e?!e.includes(b.tagName):a?a.includes(b.tagName):!1;if(!k&&n&&typeof w=="number"&&(k=!n(b,w,v)),k&&v&&typeof w=="number")return u&&b.children?v.children.splice(w,1,...b.children):v.children.splice(w,1),w}}}function P3(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),i=t.indexOf("/");return e<0||i>-1&&e>i||n>-1&&e>n||r>-1&&e>r||I3.test(t.slice(0,e))?t:""}var Cu="Switch",[D3,z4]=ro(Cu),[O3,$3]=D3(Cu),F1=B.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:s,required:a,disabled:o,value:l="on",onCheckedChange:c,form:h,...u}=t,[f,p]=B.useState(null),d=me(e,w=>p(w)),g=B.useRef(!1),x=f?h||!!f.closest("form"):!0,[y=!1,b]=Gr({prop:i,defaultProp:s,onChange:c});return L.jsxs(O3,{scope:n,checked:y,disabled:o,children:[L.jsx($t.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":D1(y),"data-disabled":o?"":void 0,disabled:o,value:l,...u,ref:d,onClick:Bt(t.onClick,w=>{b(v=>!v),x&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),x&&L.jsx(N3,{control:f,bubbles:!g.current,name:r,value:l,checked:y,required:a,disabled:o,form:h,style:{transform:"translateX(-100%)"}})]})});F1.displayName=Cu;var R1="SwitchThumb",P1=B.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,i=$3(R1,n);return L.jsx($t.span,{"data-state":D1(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:e})});P1.displayName=R1;var N3=t=>{const{control:e,checked:n,bubbles:r=!0,...i}=t,s=B.useRef(null),a=cw(n),o=Qb(e);return B.useEffect(()=>{const l=s.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(a!==n&&u){const f=new Event("click",{bubbles:r});u.call(l,n),l.dispatchEvent(f)}},[a,n,r]),L.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function D1(t){return t?"checked":"unchecked"}var O1=F1,z3=P1;const Uc=B.forwardRef(({className:t,...e},n)=>L.jsx(O1,{className:se("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:n,children:L.jsx(z3,{className:se("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Uc.displayName=O1.displayName;function j3(t,e=[]){let n=[];function r(s,a){const o=B.createContext(a),l=n.length;n=[...n,a];function c(u){const{scope:f,children:p,...d}=u,g=(f==null?void 0:f[t][l])||o,x=B.useMemo(()=>d,Object.values(d));return L.jsx(g.Provider,{value:x,children:p})}function h(u,f){const p=(f==null?void 0:f[t][l])||o,d=B.useContext(p);if(d)return d;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,h]}const i=()=>{const s=n.map(a=>B.createContext(a));return function(o){const l=(o==null?void 0:o[t])||s;return B.useMemo(()=>({[`__scope${t}`]:{...o,[t]:l}}),[o,l])}};return i.scopeName=t,[r,q3(i,...e)]}function q3(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...o,...u}},{});return B.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var Al="rovingFocusGroup.onEntryFocus",H3={bubbles:!1,cancelable:!0},jo="RovingFocusGroup",[Vc,$1,W3]=Bd(jo),[U3,N1]=j3(jo,[W3]),[V3,Y3]=U3(jo),z1=B.forwardRef((t,e)=>L.jsx(Vc.Provider,{scope:t.__scopeRovingFocusGroup,children:L.jsx(Vc.Slot,{scope:t.__scopeRovingFocusGroup,children:L.jsx(G3,{...t,ref:e})})}));z1.displayName=jo;var G3=B.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:h=!1,...u}=t,f=B.useRef(null),p=me(e,f),d=Kh(s),[g=null,x]=Gr({prop:a,defaultProp:o,onChange:l}),[y,b]=B.useState(!1),w=Kc(c),v=$1(n),k=B.useRef(!1),[_,A]=B.useState(0);return B.useEffect(()=>{const O=f.current;if(O)return O.addEventListener(Al,w),()=>O.removeEventListener(Al,w)},[w]),L.jsx(V3,{scope:n,orientation:r,dir:d,loop:i,currentTabStopId:g,onItemFocus:B.useCallback(O=>x(O),[x]),onItemShiftTab:B.useCallback(()=>b(!0),[]),onFocusableItemAdd:B.useCallback(()=>A(O=>O+1),[]),onFocusableItemRemove:B.useCallback(()=>A(O=>O-1),[]),children:L.jsx($t.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...u,ref:p,style:{outline:"none",...t.style},onMouseDown:Bt(t.onMouseDown,()=>{k.current=!0}),onFocus:Bt(t.onFocus,O=>{const H=!k.current;if(O.target===O.currentTarget&&H&&!y){const N=new CustomEvent(Al,H3);if(O.currentTarget.dispatchEvent(N),!N.defaultPrevented){const M=v().filter(E=>E.focusable),$=M.find(E=>E.active),z=M.find(E=>E.id===g),I=[$,z,...M].filter(Boolean).map(E=>E.ref.current);H1(I,h)}}k.current=!1}),onBlur:Bt(t.onBlur,()=>b(!1))})})}),j1="RovingFocusGroupItem",q1=B.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,...a}=t,o=li(),l=s||o,c=Y3(j1,n),h=c.currentTabStopId===l,u=$1(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=c;return B.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),L.jsx(Vc.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:L.jsx($t.span,{tabIndex:h?0:-1,"data-orientation":c.orientation,...a,ref:e,onMouseDown:Bt(t.onMouseDown,d=>{r?c.onItemFocus(l):d.preventDefault()}),onFocus:Bt(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Bt(t.onKeyDown,d=>{if(d.key==="Tab"&&d.shiftKey){c.onItemShiftTab();return}if(d.target!==d.currentTarget)return;const g=Z3(d,c.orientation,c.dir);if(g!==void 0){if(d.metaKey||d.ctrlKey||d.altKey||d.shiftKey)return;d.preventDefault();let y=u().filter(b=>b.focusable).map(b=>b.ref.current);if(g==="last")y.reverse();else if(g==="prev"||g==="next"){g==="prev"&&y.reverse();const b=y.indexOf(d.currentTarget);y=c.loop?Q3(y,b+1):y.slice(b+1)}setTimeout(()=>H1(y))}})})})});q1.displayName=j1;var X3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function K3(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Z3(t,e,n){const r=K3(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return X3[r]}function H1(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Q3(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var J3=z1,t4=q1,vu="Tabs",[e4,j4]=ro(vu,[N1]),W1=N1(),[n4,_u]=e4(vu),U1=B.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:o,activationMode:l="automatic",...c}=t,h=Kh(o),[u,f]=Gr({prop:r,onChange:i,defaultProp:s});return L.jsx(n4,{scope:n,baseId:li(),value:u,onValueChange:f,orientation:a,dir:h,activationMode:l,children:L.jsx($t.div,{dir:h,"data-orientation":a,...c,ref:e})})});U1.displayName=vu;var V1="TabsList",Y1=B.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...i}=t,s=_u(V1,n),a=W1(n);return L.jsx(J3,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:r,children:L.jsx($t.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:e})})});Y1.displayName=V1;var G1="TabsTrigger",X1=B.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=t,a=_u(G1,n),o=W1(n),l=Q1(a.baseId,r),c=J1(a.baseId,r),h=r===a.value;return L.jsx(t4,{asChild:!0,...o,focusable:!i,active:h,children:L.jsx($t.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":c,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:e,onMouseDown:Bt(t.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?a.onValueChange(r):u.preventDefault()}),onKeyDown:Bt(t.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&a.onValueChange(r)}),onFocus:Bt(t.onFocus,()=>{const u=a.activationMode!=="manual";!h&&!i&&u&&a.onValueChange(r)})})})});X1.displayName=G1;var K1="TabsContent",Z1=B.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...a}=t,o=_u(K1,n),l=Q1(o.baseId,r),c=J1(o.baseId,r),h=r===o.value,u=B.useRef(h);return B.useEffect(()=>{const f=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(f)},[]),L.jsx(Id,{present:i||h,children:({present:f})=>L.jsx($t.div,{"data-state":h?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...a,ref:e,style:{...t.style,animationDuration:u.current?"0s":void 0},children:f&&s})})});Z1.displayName=K1;function Q1(t,e){return`${t}-trigger-${e}`}function J1(t,e){return`${t}-content-${e}`}var r4=U1,tC=Y1,eC=X1,nC=Z1;const i4=r4,rC=B.forwardRef(({className:t,...e},n)=>L.jsx(tC,{ref:n,className:se("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...e}));rC.displayName=tC.displayName;const Yc=B.forwardRef(({className:t,...e},n)=>L.jsx(eC,{ref:n,className:se("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...e}));Yc.displayName=eC.displayName;const Gc=B.forwardRef(({className:t,...e},n)=>L.jsx(nC,{ref:n,className:se("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));Gc.displayName=nC.displayName;const s4=t=>{const n=Math.min(t/10,1),r=Math.floor(255-n*100);return`rgb(${r}, ${r+50}, 255)`};function a4({entities:t,minimumEntityCount:e,setMinimumEntityCount:n,selectedEntity:r,handleShowAllRelationships:i,handleEntityClick:s,deleteEntity:a}){const o=(l,c)=>{l.preventDefault(),window.confirm(`Delete ${c} and its relationships?`)&&a(c)};return L.jsx("div",{className:"entities-list",children:L.jsxs("div",{className:"chips-container mb-4 flex flex-wrap",children:[L.jsx("button",{className:"chip-button border rounded-sm px-2 py-1 mr-1 my-1 flex items-center hover:bg-gray-800 hover:text-white",style:{backgroundColor:r===null?"green":"inherit",color:r===null?"white":"inherit"},onClick:i,children:"All"},"Docagram-All"),t.sort((l,c)=>c.count-l.count).filter(l=>l.count>=e).map(l=>L.jsxs("button",{className:"chip-button border rounded-sm px-2 py-1 mr-1 my-1 flex items-center hover:bg-gray-800 hover:text-white",style:{backgroundColor:l.name===r?"green":s4(l.count),color:l.name===r?"white":"inherit"},onClick:()=>s(l.name),onContextMenu:c=>o(c,l.name),children:[l.name," ",L.jsxs("span",{className:"ml-1 text-sm",children:["(",l.count,")"]})]},l.name))]})})}var ku="Collapsible",[o4,q4]=ro(ku),[l4,Su]=o4(ku),iC=B.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:a,...o}=t,[l=!1,c]=Gr({prop:r,defaultProp:i,onChange:a});return L.jsx(l4,{scope:n,disabled:s,contentId:li(),open:l,onOpenToggle:B.useCallback(()=>c(h=>!h),[c]),children:L.jsx($t.div,{"data-state":Eu(l),"data-disabled":s?"":void 0,...o,ref:e})})});iC.displayName=ku;var sC="CollapsibleTrigger",aC=B.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=Su(sC,n);return L.jsx($t.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Eu(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:Bt(t.onClick,i.onOpenToggle)})});aC.displayName=sC;var Tu="CollapsibleContent",oC=B.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=Su(Tu,t.__scopeCollapsible);return L.jsx(Id,{present:n||i.open,children:({present:s})=>L.jsx(c4,{...r,ref:e,present:s})})});oC.displayName=Tu;var c4=B.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,a=Su(Tu,n),[o,l]=B.useState(r),c=B.useRef(null),h=me(e,c),u=B.useRef(0),f=u.current,p=B.useRef(0),d=p.current,g=a.open||o,x=B.useRef(g),y=B.useRef();return B.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),He(()=>{const b=c.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();u.current=w.height,p.current=w.width,x.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),l(r)}},[a.open,r]),L.jsx($t.div,{"data-state":Eu(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!g,...s,ref:h,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":d?`${d}px`:void 0,...t.style},children:g&&i})});function Eu(t){return t?"open":"closed"}var h4=iC;const Ed=h4,Ad=aC,Ld=oC;function u4({loading:t,aiService:e,relationshipService:n}){const[r,i]=B.useState([]),[s,a]=B.useState(""),[o,l]=B.useState(null),[c,h]=B.useState(!0),[u,f]=B.useState(!0),[p,d]=B.useState([]),[g,x]=B.useState([]),[y,b]=B.useState("diagram"),[w,v]=B.useState(null),[k,_]=B.useState(1),[A,O]=B.useState(!0),[H,N]=B.useState([]);B.useEffect(()=>()=>{chrome.tabs.query({active:!0,currentWindow:!0},T=>{T[0].id&&chrome.tabs.sendMessage(T[0].id,{action:"highlight",entity:""})})},[]),B.useEffect(()=>{N(new Array(r.length).fill(!0))},[r]);const M=B.useCallback(async()=>{try{n.reset(),i([]),l(null),a("Analyzing page content..."),d([]),x([]),v(null);const T=await Yu.getPageContent(),j=await Yu.splitIntoChunks(T),C=window.location.href,Y=[];for(let Q=0;QsetTimeout(ut,0))}}catch(T){console.error("Analysis failed:",T),l(T.message)}finally{a("")}},[e]),$=async T=>{try{const[j]=await chrome.tabs.query({active:!0,currentWindow:!0});j.id&&await chrome.tabs.sendMessage(j.id,{action:"highlight",entity:T===w?"":T})}catch(j){console.error("Failed to send highlight message:",j)}},z=T=>{if(T===w)v(null),d(r.flatMap(j=>j.relationships));else{v(T);const j=p.filter(C=>C.entity1===T||C.entity2===T);d(j)}},R=()=>{v(null),d(r.flatMap(T=>T.relationships))},I=T=>{const j=p.filter(Y=>Y.entity1!==T&&Y.entity2!==T);d(j);const C=g.filter(Y=>Y.name!==T);x(C),w===T&&v(null)},E=T=>{$(T),z(T)},D=()=>{const T=r.flatMap(Q=>Q.relationships),j=n.getUniqueRelationships(T);d(j);const C=new Map;j.forEach(Q=>{C.set(Q.entity1,(C.get(Q.entity1)||0)+1),C.set(Q.entity2,(C.get(Q.entity2)||0)+1)});const Y=Array.from(C.entries()).map(([Q,S])=>({name:Q,count:S}));x(Y)};return L.jsx(Wo,{className:"w-full bg-background",children:L.jsxs(Uo,{className:"pt-0 px-0",children:[L.jsx("div",{className:"sticky top-0 z-10 border-b-[1px] border-secondary bg-background rounded-t-xl",children:L.jsxs("div",{className:"flex flex-wrap items-center gap-2 p-2 md:p-4",children:[L.jsx("img",{src:"/docagram.png",alt:"Docagram Logo",className:"h-9 w-auto mr-4 rounded-sm"}),L.jsx(Lr,{onClick:M,disabled:t,className:"mr-4",children:"Analyze"}),L.jsx(Lr,{className:"block md:hidden",onClick:D,disabled:r.length===0,variant:"outline",children:"Combine All Diagrams"}),L.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[L.jsxs("div",{className:"flex items-center",children:[L.jsx(Uc,{id:"show-summaries",checked:c,onCheckedChange:h}),L.jsx(Uu,{htmlFor:"show-summaries",className:"ml-2 mr-4",children:"Show Summaries"})]}),L.jsxs("div",{className:"flex items-center",children:[L.jsx(Uc,{id:"show-diagrams",checked:u,onCheckedChange:f}),L.jsx(Uu,{htmlFor:"show-diagrams",className:"ml-2 mr-4",children:"Show Diagrams"})]}),L.jsx(Lr,{className:"hidden md:block",onClick:D,disabled:r.length===0,variant:"outline",children:"Combine All Diagrams"})]})]})}),L.jsxs("div",{className:"space-y-6 pt-6 px-4",children:[L.jsx(RC,{status:s,error:o}),p&&p.length>0&&L.jsx(Wo,{className:"mb-6",children:L.jsx(Uo,{children:L.jsxs(Ed,{open:A,onOpenChange:O,children:[L.jsxs("div",{className:"flex items-center justify-between",children:[L.jsx("h2",{className:"text-xl font-bold pt-4",children:"Combined Diagram"}),L.jsx(Ad,{asChild:!0,children:L.jsxs(Lr,{variant:"ghost",size:"sm",children:[L.jsx(Vu,{className:"h-4 w-4"}),L.jsx("span",{className:"sr-only",children:"Toggle"})]})})]}),L.jsx(Ld,{children:L.jsxs(i4,{value:y,onValueChange:b,children:[L.jsxs("div",{className:"flex gap-4 pt-4",children:[L.jsxs(rC,{children:[L.jsx(Yc,{value:"diagram",children:"Diagram"}),L.jsx(Yc,{value:"entities",children:"Entities"})]}),w&&L.jsx(Lr,{variant:"outline",onClick:R,children:"Show All"})]}),L.jsx(Gc,{value:"diagram",children:L.jsx(Dp,{relationships:p,onNodeClick:E})}),L.jsx(Gc,{value:"entities",children:L.jsx(a4,{entities:g,minimumEntityCount:k,setMinimumEntityCount:_,selectedEntity:w,handleShowAllRelationships:R,handleEntityClick:T=>{z(T),b("diagram")},deleteEntity:I})})]})})]})})}),r.map((T,j)=>L.jsx(Wo,{className:"mb-6",children:L.jsx(Uo,{className:"space-y-4",children:L.jsxs(Ed,{open:H[j],onOpenChange:C=>{const Y=[...H];Y[j]=C,N(Y)},children:[L.jsxs("div",{className:"flex items-center justify-between",children:[L.jsxs("h2",{className:"text-xl font-bold py-4",children:["Section ",j+1]}),L.jsx(Ad,{asChild:!0,children:L.jsxs(Lr,{variant:"ghost",size:"sm",children:[L.jsx(Vu,{className:"h-4 w-4"}),L.jsx("span",{className:"sr-only",children:"Toggle"})]})})]}),L.jsxs(Ld,{children:[c&&L.jsxs("div",{className:"bg-muted rounded-lg p-4",children:[L.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Summary"}),L.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:L.jsx(R3,{children:T.summary})})]}),u&&L.jsx("div",{className:"mt-4",children:L.jsx(Dp,{relationships:T.relationships,onNodeClick:$})})]})]})})},j))]})]})})}function f4(){const[t,e]=B.useState(!1),[n,r]=B.useState(null),s=B.useRef(new BC).current,o=B.useRef(new Rd).current;return B.useEffect(()=>((async()=>{try{await s.initialize();const c=s.getSessionStats();console.log("AI Service Initialized:",c);const h=await s.checkSupport();r(h)}catch(c){console.error("AIService initialization failed:",c)}})(),()=>{s.destroy()}),[]),L.jsx("div",{className:"p-4 space-y-4 w-full",children:L.jsx(u4,{loading:t,aiService:s,relationshipService:o})})}const lC=document.createElement("div");document.body.appendChild(lC);const p4=EC.createRoot(lC);p4.render(L.jsx(AC.StrictMode,{children:L.jsx(f4,{})}));export{rE as $,Zi as A,Kd as B,Rh as C,en as D,cM as E,r_ as F,gI as G,pp as H,bv as I,uk as J,oE as K,Jr as L,y4 as M,Jc as N,vo as O,m4 as P,_y as Q,lM as R,vs as S,uv as T,ag as U,Uv as V,Cs as W,it as X,lt as Y,tM as Z,m as _,Jt as a,jn as a$,Bf as a0,Mf as a1,A4 as a2,_4 as a3,T4 as a4,S4 as a5,C4 as a6,wh as a7,E4 as a8,v4 as a9,qA as aA,HL as aB,Sh as aC,Cp as aD,JM as aE,iE as aF,Fk as aG,Rk as aH,ho as aI,_r as aJ,ZL as aK,Uy as aL,yo as aM,Co as aN,Oa as aO,Yy as aP,Wy as aQ,EL as aR,gh as aS,ay as aT,ke as aU,Ss as aV,M2 as aW,cy as aX,w4 as aY,$C as aZ,mh as a_,Mr as aa,M4 as ab,L4 as ac,k4 as ad,TB as ae,G0 as af,P4 as ag,Jy as ah,te as ai,pi as aj,uh as ak,VB as al,kx as am,fi as an,pt as ao,gn as ap,fI as aq,R4 as ar,D4 as as,I4 as at,st as au,F4 as av,tI as aw,KB as ax,XB as ay,KL as az,Jv as b,us as b0,kf as b1,O2 as b2,XL as b3,qL as b4,LA as b5,Th as b6,_L as b7,JL as b8,Es as b9,hi as ba,Ra as bb,RL as bc,PI as bd,Ts as be,Da as bf,AL as bg,$y as bh,IA as bi,FA as bj,ar as bk,Vf as bl,RA as bm,Eh as bn,BA as bo,OA as bp,ui as bq,Zn as br,jf as bs,Ah as bt,zy as bu,kc as bv,QL as bw,wo as bx,Ft as by,Qv as c,Lt as d,ci as e,ex as f,Zv as g,ii as h,gr as i,At as j,sg as k,W as l,Vm as m,x4 as n,b4 as o,t_ as p,e_ as q,fk as r,Kv as s,UB as t,cn as u,Xv as v,fM as w,B4 as x,$4 as y,O4 as z}; diff --git a/manifest.json b/manifest.json index a904dab..f68bc40 100644 --- a/manifest.json +++ b/manifest.json @@ -22,5 +22,9 @@ "matches": [""], "js": ["content.js"] } - ] + ], + "icons": { + "48": "icon48.png", + "128": "icon128.png" + } } diff --git a/package-lock.json b/package-lock.json index a0990b2..fb3e399 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "@radix-ui/react-alert-dialog": "^1.1.2", + "@radix-ui/react-collapsible": "^1.1.1", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-scroll-area": "^1.2.1", "@radix-ui/react-select": "^2.1.2", @@ -3634,6 +3635,35 @@ } } }, + "node_modules/@radix-ui/react-collapsible": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.1.tgz", + "integrity": "sha512-1///SnrfQHJEofLokyczERxQbWfCGQlQ2XsCZMucVs6it+lq9iw4vXy+uDn1edlb58cOZOWSldnfPAYcT4O/Yg==", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.1", + "@radix-ui/react-id": "1.1.0", + "@radix-ui/react-presence": "1.1.1", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-collection": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz", diff --git a/package.json b/package.json index 4059227..72a9b01 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "type": "module", "dependencies": { "@radix-ui/react-alert-dialog": "^1.1.2", + "@radix-ui/react-collapsible": "^1.1.1", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-scroll-area": "^1.2.1", "@radix-ui/react-select": "^2.1.2", diff --git a/public/docagram.png b/public/docagram.png new file mode 100644 index 0000000..85d22d6 Binary files /dev/null and b/public/docagram.png differ diff --git a/public/icon128.png b/public/icon128.png new file mode 100644 index 0000000..eaf8dd5 Binary files /dev/null and b/public/icon128.png differ diff --git a/public/icon48.png b/public/icon48.png new file mode 100644 index 0000000..697b9f9 Binary files /dev/null and b/public/icon48.png differ diff --git a/public/logo192.png b/public/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/public/logo192.png and /dev/null differ diff --git a/public/logo512.png b/public/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/public/logo512.png and /dev/null differ diff --git a/src/App.css b/src/App.css index 072a12c..8d13dbb 100644 --- a/src/App.css +++ b/src/App.css @@ -4,57 +4,48 @@ @layer base { :root { - --background: 0 0% 100%; - --foreground: 20 14.3% 4.1%; - --card: 0 0% 100%; - --card-foreground: 20 14.3% 4.1%; - --popover: 0 0% 100%; - --popover-foreground: 20 14.3% 4.1%; - --primary: 24 9.8% 10%; - --primary-foreground: 60 9.1% 97.8%; - --secondary: 60 4.8% 95.9%; - --secondary-foreground: 24 9.8% 10%; - --muted: 60 4.8% 95.9%; - --muted-foreground: 25 5.3% 44.7%; - --accent: 60 4.8% 95.9%; - --accent-foreground: 24 9.8% 10%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 20 5.9% 90%; - --input: 20 5.9% 90%; - --ring: 20 14.3% 4.1%; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; - --radius: 0.5rem + --background: 221 100% 95%; + --foreground: 221 5% 0%; + --card: 221 50% 90%; + --card-foreground: 221 5% 10%; + --popover: 221 100% 95%; + --popover-foreground: 221 100% 0%; + --primary: 221 83.2% 53.3%; + --primary-foreground: 0 0% 100%; + --secondary: 221 30% 70%; + --secondary-foreground: 0 0% 0%; + --muted: 183 30% 85%; + --muted-foreground: 221 5% 35%; + --accent: 183 30% 80%; + --accent-foreground: 221 5% 10%; + --destructive: 0 100% 30%; + --destructive-foreground: 221 5% 90%; + --border: 221 30% 50%; + --input: 221 30% 18%; + --ring: 221 83.2% 53.3%; + --radius: 0.5rem; } .dark { - --background: 20 14.3% 4.1%; - --foreground: 60 9.1% 97.8%; - --card: 20 14.3% 4.1%; - --card-foreground: 60 9.1% 97.8%; - --popover: 20 14.3% 4.1%; - --popover-foreground: 60 9.1% 97.8%; - --primary: 60 9.1% 97.8%; - --primary-foreground: 24 9.8% 10%; - --secondary: 12 6.5% 15.1%; - --secondary-foreground: 60 9.1% 97.8%; - --muted: 12 6.5% 15.1%; - --muted-foreground: 24 5.4% 63.9%; - --accent: 12 6.5% 15.1%; - --accent-foreground: 60 9.1% 97.8%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 12 6.5% 15.1%; - --input: 12 6.5% 15.1%; - --ring: 24 5.7% 82.9%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55% + --background: 221 50% 5%; + --foreground: 221 5% 90%; + --card: 221 50% 0%; + --card-foreground: 221 5% 90%; + --popover: 221 50% 5%; + --popover-foreground: 221 5% 90%; + --primary: 221 83.2% 53.3%; + --primary-foreground: 0 0% 100%; + --secondary: 221 30% 10%; + --secondary-foreground: 0 0% 100%; + --muted: 183 30% 15%; + --muted-foreground: 221 5% 60%; + --accent: 183 30% 15%; + --accent-foreground: 221 5% 90%; + --destructive: 0 100% 30%; + --destructive-foreground: 221 5% 90%; + --border: 221 30% 18%; + --input: 221 30% 18%; + --ring: 221 83.2% 53.3%; + --radius: 0.5rem; } } @layer base { @@ -64,4 +55,4 @@ body { @apply bg-background text-foreground; } -} \ No newline at end of file +} diff --git a/src/components/ui/collapsible.tsx b/src/components/ui/collapsible.tsx new file mode 100644 index 0000000..a23e7a2 --- /dev/null +++ b/src/components/ui/collapsible.tsx @@ -0,0 +1,9 @@ +import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" + +const Collapsible = CollapsiblePrimitive.Root + +const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger + +const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent + +export { Collapsible, CollapsibleTrigger, CollapsibleContent } diff --git a/src/features/options/Options.tsx b/src/features/options/Options.tsx index 60d1208..2578a68 100644 --- a/src/features/options/Options.tsx +++ b/src/features/options/Options.tsx @@ -13,7 +13,7 @@ export const DEFAULT_OPTIONS: DocagramOptions = { temperature: 0.7, topK: 40, minimumEntityCount: 2, - chunkSize: 2000, + chunkSize: 3000, systemPrompt: `Analyze this and identify key relationships between entities. Express each relationship using this format: Entity1 to Entity2 (Description of relationship) diff --git a/src/features/shared/services/ai_service.ts b/src/features/shared/services/ai_service.ts index 9e00a16..7a04a25 100644 --- a/src/features/shared/services/ai_service.ts +++ b/src/features/shared/services/ai_service.ts @@ -135,7 +135,6 @@ export class AIService { try { const summary = await this.summarizeSession.summarize(content); - console.log("Summarized content: " + summary); return summary; } catch (error) { // If session is invalid, try to reinitialize summarizer @@ -166,11 +165,7 @@ export class AIService { * @param {number} totalChunks - The total number of chunks. * @returns {Promise>} An async iterable of the analysis results. */ - async streamAnalysis( - chunk: string, - chunkIndex: number, - totalChunks: number - ): Promise> { + async streamAnalysis(chunk: string): Promise> { if (!this.model) { throw new Error("Language model session not initialized"); } else { diff --git a/src/features/shared/services/relationship_service.ts b/src/features/shared/services/relationship_service.ts index a663a3e..2ea6fb8 100644 --- a/src/features/shared/services/relationship_service.ts +++ b/src/features/shared/services/relationship_service.ts @@ -88,6 +88,27 @@ export class RelationshipService { return newRelationships; } + /** + * Returns a list of unique relationships by comparing each relationship using areRelationshipsEqual. + * @param relationships Array of relationships to filter. + * @returns Array of unique relationships. + */ + getUniqueRelationships(relationships: Relationship[]): Relationship[] { + const uniqueRelationships: Relationship[] = []; + + for (const rel of relationships) { + const isDuplicate = uniqueRelationships.some(existingRel => + this.areRelationshipsEqual(existingRel, rel) + ); + + if (!isDuplicate) { + uniqueRelationships.push(rel); + } + } + + return uniqueRelationships; + } + /** * Resets the manager's state, clearing all relationships and entities. */ diff --git a/src/features/side_panel/components/CombinedTab.tsx b/src/features/side_panel/components/CombinedTab.tsx index 8f0ce2f..7632831 100644 --- a/src/features/side_panel/components/CombinedTab.tsx +++ b/src/features/side_panel/components/CombinedTab.tsx @@ -19,6 +19,12 @@ import { Label } from "@/components/ui/label"; import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import { EntityList } from "./EntityList"; import { tab } from "@testing-library/user-event/dist/tab"; +import { + Collapsible, + CollapsibleContent, + CollapsibleTrigger, +} from "@/components/ui/collapsible"; +import { ChevronsUpDown } from "lucide-react"; interface SectionData { summary: string; @@ -37,6 +43,7 @@ export default function CombinedTab({ aiService, relationshipService, }: CombinedTabProps) { + // Existing state variables const [sections, setSections] = useState([]); const [status, setStatus] = useState(""); const [error, setError] = useState(null); @@ -59,6 +66,11 @@ export default function CombinedTab({ const [selectedEntity, setSelectedEntity] = useState(null); const [minimumEntityCount, setMinimumEntityCount] = useState(1); + // Collapsible state variables + const [isCombinedDiagramOpen, setIsCombinedDiagramOpen] = + useState(true); + const [isSectionOpen, setIsSectionOpen] = useState([]); + useEffect(() => { // Cleanup highlights when component unmounts return () => { @@ -73,6 +85,10 @@ export default function CombinedTab({ }; }, []); + useEffect(() => { + setIsSectionOpen(new Array(sections.length).fill(true)); + }, [sections]); + const analyzeSummaryAndContent = useCallback(async () => { try { relationshipService.reset(); @@ -163,6 +179,9 @@ export default function CombinedTab({ const handleEntityClick = (entity: string) => { if (entity === selectedEntity) { setSelectedEntity(null); + setCombinedRelationships( + sections.flatMap((section) => section.relationships) + ); } else { setSelectedEntity(entity); // Filter relationships to those involving the selected entity @@ -175,6 +194,9 @@ export default function CombinedTab({ const handleShowAllRelationships = () => { setSelectedEntity(null); + setCombinedRelationships( + sections.flatMap((section) => section.relationships) + ); }; const deleteEntity = (entity: string) => { @@ -204,12 +226,16 @@ export default function CombinedTab({ const allRelationships = sections.flatMap( (section) => section.relationships ); + + const uniqueRelationships = + relationshipService.getUniqueRelationships(allRelationships); + // Generate mermaid diagram - setCombinedRelationships(allRelationships); + setCombinedRelationships(uniqueRelationships); // Collect entities and their counts const entityCounts = new Map(); - allRelationships.forEach((rel) => { + uniqueRelationships.forEach((rel) => { entityCounts.set(rel.entity1, (entityCounts.get(rel.entity1) || 0) + 1); entityCounts.set(rel.entity2, (entityCounts.get(rel.entity2) || 0) + 1); }); @@ -223,14 +249,16 @@ export default function CombinedTab({ }; return ( - - + + {/* Sticky Header */} -
    +
    + Docagram Logo - )} +
    - - - - - { - handleEntityClick(entity); - setSelectedCombinedTab("diagram"); - }} - deleteEntity={deleteEntity} - /> - - + + +
    + + Diagram + Entities + + {selectedEntity && ( + + )} +
    + + + + + { + handleEntityClick(entity); + setSelectedCombinedTab("diagram"); + }} + deleteEntity={deleteEntity} + /> + +
    +
    + )} @@ -334,23 +379,45 @@ export default function CombinedTab({ {sections.map((section, index) => ( -

    Section {index + 1}

    - - {showSummaries && ( -
    -

    Summary

    -

    - {section.summary} -

    + { + const newIsSectionOpen = [...isSectionOpen]; + newIsSectionOpen[index] = open; + setIsSectionOpen(newIsSectionOpen); + }} + > +
    +

    + Section {index + 1} +

    + + +
    - )} - - {showDiagrams && ( - - )} + + {showSummaries && ( +
    +

    Summary

    +

    + {section.summary} +

    +
    + )} + + {showDiagrams && ( +
    + +
    + )} +
    +
    ))} diff --git a/src/features/side_panel/components/DiagramComponent.tsx b/src/features/side_panel/components/DiagramComponent.tsx index 0af1cbc..b8f9f45 100644 --- a/src/features/side_panel/components/DiagramComponent.tsx +++ b/src/features/side_panel/components/DiagramComponent.tsx @@ -5,6 +5,7 @@ import { sanitizeMermaidText, sanitizeMermaidLabel, } from "../utils/diagram_utils"; +import DirectionSelector from "./DirectionSelector"; interface DiagramComponentProps { relationships: Relationship[]; @@ -15,37 +16,49 @@ const DiagramComponent: React.FC = ({ relationships, onNodeClick, }) => { + const [direction, setDirection] = useState<"LR" | "RL" | "TD" | "BT">("LR"); + const [diagramDefinition, setDiagramDefinition] = useState(""); const diagramRef = useRef(null); + useEffect(() => { + setDiagramDefinition(renderMermaidDiagram(relationships)); + }, [relationships, direction]); + const renderMermaidDiagram = (relationships: Relationship[]): string => { - let mermaidCode = "graph LR\n"; + let mermaidCode = `---\n +config:\n + look: handDrawn\n + theme: dark\n +---\ngraph ${direction}\n`; relationships.forEach((rel) => { const { entity1, entity2, description } = rel; const safeEntity1 = sanitizeMermaidText(entity1); const safeEntity2 = sanitizeMermaidText(entity2); - const safeDescription = sanitizeMermaidLabel(description); + const safeDescription = sanitizeMermaidText(description); mermaidCode += ` ${safeEntity1}[${sanitizeMermaidLabel( entity1 - )}] -->|${safeDescription}| ${safeEntity2}[${sanitizeMermaidLabel( - entity2 - )}]\n`; - mermaidCode += ` style ${safeEntity1} fill:#0077be,color:#fff\n`; - mermaidCode += ` style ${safeEntity2} fill:#0077be,color:#fff\n`; + )}] -->${safeDescription}(${sanitizeMermaidLabel( + description + )}) -->${safeEntity2}[${sanitizeMermaidLabel(entity2)}]\n`; + mermaidCode += ` style ${safeEntity1} fill:2563eb,stroke:#ffffff, color:#ffffff\n`; + mermaidCode += ` style ${safeEntity2} fill:2563eb,stroke:#ffffff, color:#ffffff\n`; + mermaidCode += ` style ${safeDescription} fill:#ffffff50,stroke-dasharray: 5 5,fontWeight: 12,stroke:#ffffff,color:#ffffff\n`; }); + // Set all links (arrows) to white + mermaidCode += ` linkStyle default stroke:#ffffff\n`; return mermaidCode; }; useEffect(() => { // Initialize Mermaid only once mermaid.initialize({ startOnLoad: false }); - setDiagramDefinition(renderMermaidDiagram(relationships)); - }, [relationships]); + }, []); useEffect(() => { const renderMermaidDiagram = async () => { - if (diagramRef.current) { + if (diagramRef.current && diagramRef.current !== null) { try { // Generate a unique ID for the diagram const uniqueId = `mermaid-diagram-${Math.random() @@ -67,7 +80,7 @@ const DiagramComponent: React.FC = ({ } // Add custom click listeners to nodes - const nodes = diagramRef.current.querySelectorAll("g.node"); + const nodes = diagramRef.current.querySelectorAll("g.rough-node"); nodes.forEach((node) => { (node as HTMLElement).style.cursor = "pointer"; node.addEventListener("click", () => { @@ -102,14 +115,23 @@ const DiagramComponent: React.FC = ({ }; renderMermaidDiagram(); - }, [diagramDefinition, onNodeClick]); + }, [diagramDefinition, direction, onNodeClick]); if (!diagramDefinition) { return null; } return ( -
    +
    + +
    +
    ); }; diff --git a/src/features/side_panel/components/DiagramView.tsx b/src/features/side_panel/components/DiagramView.tsx index 270c851..ff5f018 100644 --- a/src/features/side_panel/components/DiagramView.tsx +++ b/src/features/side_panel/components/DiagramView.tsx @@ -1,7 +1,4 @@ -import { Button } from "@/components/ui/button"; -import { ScrollArea } from "@/components/ui/scroll-area"; import DiagramComponent from "./DiagramComponent"; -import RelationshipTile from "./RelationshipTile"; import { Relationship } from "../types/relationship"; interface DiagramViewProps { @@ -34,7 +31,7 @@ export function DiagramView({ {tab === "diagram" && diagram && ( */} {diagram && ( )} diff --git a/src/features/side_panel/index.tsx b/src/features/side_panel/index.tsx index 8d6daf5..d650ec5 100644 --- a/src/features/side_panel/index.tsx +++ b/src/features/side_panel/index.tsx @@ -4,7 +4,6 @@ import SidePanel from './SidePanel'; import "../../App.css"; const root = document.createElement("div") -root.className = "container" document.body.appendChild(root) const rootDiv = ReactDOM.createRoot(root); rootDiv.render( diff --git a/src/index.tsx b/src/index.tsx index 30b24df..5031822 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -4,7 +4,6 @@ import App from './App'; import "./App.css"; const root = document.createElement("div") -root.className = "container" document.body.appendChild(root) const rootDiv = ReactDOM.createRoot(root); rootDiv.render( diff --git a/vite.config.js b/vite.config.js index 765c8e4..66f9629 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,6 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; -import path from "path" +import path from "path"; import { resolve } from "path"; import { viteStaticCopy } from "vite-plugin-static-copy";