@ws-ui/roles-editor 1.12.3 → 1.13.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,72 +1,117 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),J=require("@ws-ui/store"),T=require("react"),Te=require("@ws-ui/shared"),_r=require("@headlessui/react"),fD=require("react-dom"),ye=require("@ws-ui/icons"),dD=require("./common.cjs.js");function hD(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ve=hD(T),Jb=hD(fD);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Un(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gf={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),C=require("react"),fe=require("@ws-ui/shared"),ei=require("react-dom"),xn=require("@headlessui/react"),Qe=require("@ws-ui/store"),DD=require("./common.cjs.js");function jD(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const vt=jD(C),J$=jD(ei);(function(){try{const e=document.createElement("style");e.setAttribute("data-vite-dev-id","ui-components.css"),e.textContent=`/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}:root:not(#\\#),:host:not(#\\#){--color-green-500:oklch(72.3% .219 149.579);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-500:oklch(65.6% .241 354.308);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--container-md:28rem;--text-xs:.65rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-bounce:bounce 1s infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--color-grey-50:var(--ws-grey-50);--color-grey-100:var(--ws-grey-100);--color-grey-200:var(--ws-grey-200);--color-grey-300:var(--ws-grey-300);--color-grey-400:var(--ws-grey-400);--color-grey-500:var(--ws-grey-500);--color-grey-600:var(--ws-grey-600);--color-grey-700:var(--ws-grey-700);--color-grey-800:var(--ws-grey-800);--color-primary-500:var(--ws-primary-500);--color-primary-600:var(--ws-primary-600);--color-primary-700:var(--ws-primary-700);--color-positive-200:var(--ws-positive-200);--color-positive-400:var(--ws-positive-400);--color-positive-500:var(--ws-positive-500);--color-positive-600:var(--ws-positive-600);--color-warning-500:var(--ws-warning-500);--color-negative-400:var(--ws-negative-400);--color-negative-500:var(--ws-negative-500);--text-xxs:.55rem;--text-s:.75rem;--min-height-6:1.5rem;--color-canvas-default:var(--ws-bg-default);--color-canvas-subtle:var(--ws-grey-100);--color-panel:var(--ws-grey-300);--color-panel-subtle:var(--ws-grey-200);--color-card:var(--ws-card-bg);--color-card-border:var(--ws-card-border);--color-body:var(--ws-bg-foreground);--color-body-bg:var(--ws-bg-default);--color-body-light:var(--ws-grey-100);--color-muted:var(--ws-text-muted);--color-neutral:var(--ws-grey-200);--color-button-text:var(--ws-button-fg);--color-primary:var(--ws-primary-default);--color-primary-hover:var(--ws-primary-hover);--color-primary-light:var(--ws-primary-light);--color-primary-dark:var(--ws-primary-dark);--color-positive:var(--ws-positive-500);--color-positive-hover:var(--ws-positive-hover);--color-positive-text:var(--ws-positive-text);--color-positive-bg:var(--ws-positive-bg);--color-positive-light:var(--ws-positive-light);--color-positive-dark:var(--ws-positive-dark);--color-negative:var(--ws-negative-500);--color-negative-hover:var(--ws-negative-hover);--color-negative-text:var(--ws-negative-text);--color-negative-bg:var(--ws-negative-bg);--color-negative-light:var(--ws-negative-light);--color-negative-dark:var(--ws-negative-dark);--color-warning:var(--ws-warning-500);--color-warning-hover:var(--ws-warning-hover);--color-warning-text:var(--ws-warning-text);--color-warning-bg:var(--ws-warning-bg);--color-warning-light:var(--ws-warning-light);--color-warning-dark:var(--ws-warning-dark);--color-input-bg:var(--ws-input-bg);--color-input-border:var(--ws-input-border);--color-input-text:var(--ws-input-text);--color-input-placeholder:var(--ws-input-placeholder);--color-input-focus-border:var(--ws-input-focus-border);--color-select-border:var(--ws-select-border);--color-select-text:var(--ws-select-text);--color-select-list-bg:var(--ws-select-list-bg);--color-input-option-hover-bg:var(--ws-input-option-hover-bg);--color-input-option-active-bg:var(--ws-input-option-active-bg);--color-input-option-active-text:var(--ws-input-option-active-text);--color-input-error-border:var(--ws-input-error-border);--color-input-error-bg:var(--ws-input-error-bg);--color-input-warning-border:var(--ws-input-warning-border);--color-input-warning-bg:var(--ws-input-warning-bg);--color-input-message-bg:var(--ws-input-message-bg);--color-input-message-text:var(--ws-input-message-text);--color-input-disable:var(--ws-disable-input);--color-inactive-text:var(--ws-inactive-text);--color-panel-0:var(--ws-panel-0);--color-panel-1:var(--ws-panel-1);--color-panel-2:var(--ws-panel-2);--color-panel-3:var(--ws-panel-3);--color-panel-4:var(--ws-panel-4);--color-panel-5:var(--ws-panel-5);--color-panel-border-subtle:var(--ws-panel-border-subtle);--color-tab-bg-default:var(--ws-tab-bg-default);--color-tab-border:var(--ws-tab-border);--color-tab-active-bg:var(--ws-tab-active-bg);--color-tab-active-fg:var(--ws-tab-active-fg);--color-tab-inactive-bg:var(--ws-tab-inactive-bg);--color-tab-inactive-fg:var(--ws-tab-inactive-fg);--color-panel-border:var(--ws-panel-border)}.pointer-events-auto:not(#\\#){pointer-events:auto}.pointer-events-none:not(#\\#){pointer-events:none}.collapse:not(#\\#){visibility:collapse}.visible:not(#\\#){visibility:visible}.sr-only:not(#\\#){clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute:not(#\\#){position:absolute}.fixed:not(#\\#){position:fixed}.relative:not(#\\#){position:relative}.static:not(#\\#){position:static}.inset-0:not(#\\#){inset:calc(var(--spacing)*0)}.-top-1\\/5:not(#\\#){top:-20%}.top-0:not(#\\#){top:calc(var(--spacing)*0)}.top-1:not(#\\#){top:calc(var(--spacing)*1)}.top-full:not(#\\#){top:100%}.-right-12:not(#\\#){right:calc(var(--spacing)*-12)}.-right-px:not(#\\#){right:-1px}.right-0:not(#\\#){right:calc(var(--spacing)*0)}.right-1:not(#\\#){right:calc(var(--spacing)*1)}.bottom-0:not(#\\#){bottom:calc(var(--spacing)*0)}.bottom-full:not(#\\#){bottom:100%}.-left-px:not(#\\#){left:-1px}.left-0:not(#\\#){left:calc(var(--spacing)*0)}.left-0\\.5:not(#\\#){left:calc(var(--spacing)*.5)}.left-1\\/2:not(#\\#){left:50%}.left-3\\.5:not(#\\#){left:calc(var(--spacing)*3.5)}.left-4:not(#\\#){left:calc(var(--spacing)*4)}.left-4\\.5:not(#\\#){left:calc(var(--spacing)*4.5)}.left-5\\.5:not(#\\#){left:calc(var(--spacing)*5.5)}.left-full:not(#\\#){left:100%}.z-1:not(#\\#){z-index:1}.z-2:not(#\\#){z-index:2}.z-10:not(#\\#){z-index:10}.z-40:not(#\\#){z-index:40}.z-50:not(#\\#){z-index:50}.z-60:not(#\\#){z-index:60}.z-9999:not(#\\#){z-index:9999}.container:not(#\\#){width:100%}@media(min-width:40rem){.container:not(#\\#){max-width:40rem}}@media(min-width:48rem){.container:not(#\\#){max-width:48rem}}@media(min-width:64rem){.container:not(#\\#){max-width:64rem}}@media(min-width:80rem){.container:not(#\\#){max-width:80rem}}@media(min-width:96rem){.container:not(#\\#){max-width:96rem}}.m-0:not(#\\#){margin:calc(var(--spacing)*0)}.m-0\\.5:not(#\\#){margin:calc(var(--spacing)*.5)}.m-px:not(#\\#){margin:1px}.mx-1:not(#\\#){margin-inline:calc(var(--spacing)*1)}.-my-1:not(#\\#){margin-block:calc(var(--spacing)*-1)}.mt-1:not(#\\#){margin-top:calc(var(--spacing)*1)}.mt-2:not(#\\#){margin-top:calc(var(--spacing)*2)}.mt-4:not(#\\#){margin-top:calc(var(--spacing)*4)}.mt-8:not(#\\#){margin-top:calc(var(--spacing)*8)}.mr-1:not(#\\#){margin-right:calc(var(--spacing)*1)}.mr-2:not(#\\#){margin-right:calc(var(--spacing)*2)}.mb-1:not(#\\#){margin-bottom:calc(var(--spacing)*1)}.mb-2:not(#\\#){margin-bottom:calc(var(--spacing)*2)}.mb-4:not(#\\#){margin-bottom:calc(var(--spacing)*4)}.ml-1:not(#\\#){margin-left:calc(var(--spacing)*1)}.ml-1\\.5:not(#\\#){margin-left:calc(var(--spacing)*1.5)}.ml-2:not(#\\#){margin-left:calc(var(--spacing)*2)}.box-border:not(#\\#){box-sizing:border-box}.block:not(#\\#){display:block}.flex:not(#\\#){display:flex}.grid:not(#\\#){display:grid}.hidden:not(#\\#){display:none}.inline:not(#\\#){display:inline}.inline-block:not(#\\#){display:inline-block}.inline-flex:not(#\\#){display:inline-flex}.table:not(#\\#){display:table}.size-1\\.5:not(#\\#){width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-1\\.75:not(#\\#){width:calc(var(--spacing)*1.75);height:calc(var(--spacing)*1.75)}.size-2:not(#\\#){width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\\.5:not(#\\#){width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3:not(#\\#){width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.size-3\\.5:not(#\\#){width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-3\\.25:not(#\\#){width:calc(var(--spacing)*3.25);height:calc(var(--spacing)*3.25)}.size-4:not(#\\#){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5:not(#\\#){width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6:not(#\\#){width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-fit:not(#\\#){width:fit-content;height:fit-content}.h-2:not(#\\#){height:calc(var(--spacing)*2)}.h-3:not(#\\#){height:calc(var(--spacing)*3)}.h-3\\.5:not(#\\#){height:calc(var(--spacing)*3.5)}.h-4:not(#\\#){height:calc(var(--spacing)*4)}.h-4\\.5:not(#\\#){height:calc(var(--spacing)*4.5)}.h-5:not(#\\#){height:calc(var(--spacing)*5)}.h-5\\.5:not(#\\#){height:calc(var(--spacing)*5.5)}.h-6:not(#\\#){height:calc(var(--spacing)*6)}.h-7:not(#\\#){height:calc(var(--spacing)*7)}.h-7\\.5:not(#\\#){height:calc(var(--spacing)*7.5)}.h-8:not(#\\#){height:calc(var(--spacing)*8)}.h-10:not(#\\#){height:calc(var(--spacing)*10)}.h-14:not(#\\#){height:calc(var(--spacing)*14)}.h-20:not(#\\#){height:calc(var(--spacing)*20)}.h-30:not(#\\#){height:calc(var(--spacing)*30)}.h-100:not(#\\#){height:calc(var(--spacing)*100)}.h-fit:not(#\\#){height:fit-content}.h-full:not(#\\#){height:100%}.max-h-\\[400px\\]:not(#\\#){max-height:400px}.max-h-full:not(#\\#){max-height:100%}.min-h-5:not(#\\#){min-height:calc(var(--spacing)*5)}.min-h-6:not(#\\#){min-height:var(--min-height-6)}.min-h-7:not(#\\#){min-height:calc(var(--spacing)*7)}.min-h-\\[100px\\]:not(#\\#){min-height:100px}.min-h-fit:not(#\\#){min-height:fit-content}.min-h-screen:not(#\\#){min-height:100vh}.w-0\\.5:not(#\\#){width:calc(var(--spacing)*.5)}.w-1\\/2:not(#\\#){width:50%}.w-3:not(#\\#){width:calc(var(--spacing)*3)}.w-3\\.5:not(#\\#){width:calc(var(--spacing)*3.5)}.w-4:not(#\\#){width:calc(var(--spacing)*4)}.w-5:not(#\\#){width:calc(var(--spacing)*5)}.w-6:not(#\\#){width:calc(var(--spacing)*6)}.w-7:not(#\\#){width:calc(var(--spacing)*7)}.w-8:not(#\\#){width:calc(var(--spacing)*8)}.w-9:not(#\\#){width:calc(var(--spacing)*9)}.w-11:not(#\\#){width:calc(var(--spacing)*11)}.w-16:not(#\\#){width:calc(var(--spacing)*16)}.w-20:not(#\\#){width:calc(var(--spacing)*20)}.w-32:not(#\\#){width:calc(var(--spacing)*32)}.w-48:not(#\\#){width:calc(var(--spacing)*48)}.w-52:not(#\\#){width:calc(var(--spacing)*52)}.w-60:not(#\\#){width:calc(var(--spacing)*60)}.w-64:not(#\\#){width:calc(var(--spacing)*64)}.w-80:not(#\\#){width:calc(var(--spacing)*80)}.w-96:not(#\\#){width:calc(var(--spacing)*96)}.w-fit:not(#\\#){width:fit-content}.w-full:not(#\\#){width:100%}.w-px:not(#\\#){width:1px}.max-w-100:not(#\\#){max-width:calc(var(--spacing)*100)}.max-w-\\[300px\\]:not(#\\#){max-width:300px}.max-w-md:not(#\\#){max-width:var(--container-md)}.min-w-0:not(#\\#){min-width:calc(var(--spacing)*0)}.min-w-3\\.5:not(#\\#){min-width:calc(var(--spacing)*3.5)}.min-w-4\\.5:not(#\\#){min-width:calc(var(--spacing)*4.5)}.min-w-5:not(#\\#){min-width:calc(var(--spacing)*5)}.min-w-7\\.5:not(#\\#){min-width:calc(var(--spacing)*7.5)}.min-w-50:not(#\\#){min-width:calc(var(--spacing)*50)}.min-w-\\[150px\\]:not(#\\#){min-width:150px}.min-w-fit:not(#\\#){min-width:fit-content}.min-w-full:not(#\\#){min-width:100%}.flex-1:not(#\\#){flex:1}.flex-3:not(#\\#){flex:3}.flex-none:not(#\\#){flex:none}.shrink-0:not(#\\#){flex-shrink:0}.grow:not(#\\#){flex-grow:1}.origin-top-right:not(#\\#){transform-origin:100% 0}.-translate-x-1\\/2:not(#\\#){--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full:not(#\\#){--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0:not(#\\#){--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full:not(#\\#){--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full:not(#\\#){--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0:not(#\\#){--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\\/2:not(#\\#){--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full:not(#\\#){--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-0:not(#\\#){--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95:not(#\\#){--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100:not(#\\#){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110:not(#\\#){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-45:not(#\\#){rotate:-45deg}.rotate-45:not(#\\#){rotate:45deg}.rotate-90:not(#\\#){rotate:90deg}.rotate-180:not(#\\#){rotate:180deg}.transform:not(#\\#){transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-bounce:not(#\\#){animation:var(--animate-bounce)}.cursor-auto:not(#\\#){cursor:auto}.cursor-not-allowed:not(#\\#){cursor:not-allowed}.cursor-pointer:not(#\\#){cursor:pointer}.cursor-se-resize:not(#\\#){cursor:se-resize}.resize:not(#\\#){resize:both}.resize-none:not(#\\#){resize:none}.list-disc:not(#\\#){list-style-type:disc}.appearance-none:not(#\\#){-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2:not(#\\#){grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3:not(#\\#){grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col:not(#\\#){flex-direction:column}.flex-row:not(#\\#){flex-direction:row}.flex-wrap:not(#\\#){flex-wrap:wrap}.place-content-center:not(#\\#){place-content:center}.place-items-center:not(#\\#){place-items:center}.items-center:not(#\\#){align-items:center}.items-end:not(#\\#){align-items:flex-end}.items-start:not(#\\#){align-items:flex-start}.justify-around:not(#\\#){justify-content:space-around}.justify-between:not(#\\#){justify-content:space-between}.justify-center:not(#\\#){justify-content:center}.gap-0\\.5:not(#\\#){gap:calc(var(--spacing)*.5)}.gap-1:not(#\\#){gap:calc(var(--spacing)*1)}.gap-1\\.5:not(#\\#){gap:calc(var(--spacing)*1.5)}.gap-2:not(#\\#){gap:calc(var(--spacing)*2)}.gap-2\\.5:not(#\\#){gap:calc(var(--spacing)*2.5)}.gap-3:not(#\\#){gap:calc(var(--spacing)*3)}.gap-4:not(#\\#){gap:calc(var(--spacing)*4)}.gap-6:not(#\\#){gap:calc(var(--spacing)*6)}.gap-8:not(#\\#){gap:calc(var(--spacing)*8)}.gap-10:not(#\\#){gap:calc(var(--spacing)*10)}.gap-14:not(#\\#){gap:calc(var(--spacing)*14)}:where(.space-y-1>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-1:not(#\\#){column-gap:calc(var(--spacing)*1)}.gap-x-2:not(#\\#){column-gap:calc(var(--spacing)*2)}.gap-x-3:not(#\\#){column-gap:calc(var(--spacing)*3)}.gap-x-4:not(#\\#){column-gap:calc(var(--spacing)*4)}.gap-x-20:not(#\\#){column-gap:calc(var(--spacing)*20)}:where(.space-x-4>:not(:last-child)):not(#\\#){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.truncate:not(#\\#){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden:not(#\\#){overflow:hidden}.overflow-y-auto:not(#\\#){overflow-y:auto}.rounded:not(#\\#){border-radius:.25rem}.rounded-full:not(#\\#){border-radius:3.40282e38px}.rounded-lg:not(#\\#){border-radius:var(--radius-lg)}.rounded-md:not(#\\#){border-radius:var(--radius-md)}.rounded-xs:not(#\\#){border-radius:var(--radius-xs)}.rounded-t:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-b:not(#\\#){border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-none:not(#\\#){border-bottom-right-radius:0;border-bottom-left-radius:0}.border:not(#\\#){border-style:var(--tw-border-style);border-width:1px}.border-0:not(#\\#){border-style:var(--tw-border-style);border-width:0}.border-2:not(#\\#){border-style:var(--tw-border-style);border-width:2px}.border-px:not(#\\#){border-width:1px}.divide:not(#\\#){border-width:.5px}.border-t:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:0}.border-r:not(#\\#){border-right-style:var(--tw-border-style);border-right-width:1px}.border-b:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed:not(#\\#){--tw-border-style:dashed;border-style:dashed}.border-body:not(#\\#){border-color:var(--color-body)}.border-body-light:not(#\\#){border-color:var(--color-body-light)}.border-canvas-default:not(#\\#){border-color:var(--color-canvas-default)}.border-card-border:not(#\\#){border-color:var(--color-card-border)}.border-grey-100:not(#\\#){border-color:var(--color-grey-100)}.border-grey-200:not(#\\#){border-color:var(--color-grey-200)}.border-input-border:not(#\\#){border-color:var(--color-input-border)}.border-input-disable:not(#\\#){border-color:var(--color-input-disable)}.border-input-error-border:not(#\\#){border-color:var(--color-input-error-border)}.border-input-focus-border:not(#\\#){border-color:var(--color-input-focus-border)}.border-input-warning-border:not(#\\#){border-color:var(--color-input-warning-border)}.border-negative:not(#\\#){border-color:var(--color-negative)}.border-negative-500:not(#\\#){border-color:var(--color-negative-500)}.border-neutral:not(#\\#){border-color:var(--color-neutral)}.border-panel:not(#\\#){border-color:var(--color-panel)}.border-panel-border:not(#\\#){border-color:var(--color-panel-border)}.border-panel-border-subtle:not(#\\#){border-color:var(--color-panel-border-subtle)}.border-panel-subtle:not(#\\#){border-color:var(--color-panel-subtle)}.border-positive:not(#\\#){border-color:var(--color-positive)}.border-positive-text:not(#\\#){border-color:var(--color-positive-text)}.border-primary:not(#\\#){border-color:var(--color-primary)}.border-primary-700:not(#\\#){border-color:var(--color-primary-700)}.border-primary-hover:not(#\\#){border-color:var(--color-primary-hover)}.border-select-border:not(#\\#){border-color:var(--color-select-border)}.border-tab-border:not(#\\#){border-color:var(--color-tab-border)}.border-transparent:not(#\\#){border-color:#0000}.border-warning:not(#\\#){border-color:var(--color-warning)}.border-warning-bg:not(#\\#){border-color:var(--color-warning-bg)}.border-white:not(#\\#){border-color:var(--color-white)}.bg-blue-500:not(#\\#){background-color:var(--color-blue-500)}.bg-body:not(#\\#){background-color:var(--color-body)}.bg-body-bg:not(#\\#){background-color:var(--color-body-bg)}.bg-canvas-default:not(#\\#){background-color:var(--color-canvas-default)}.bg-canvas-subtle:not(#\\#){background-color:var(--color-canvas-subtle)}.bg-card:not(#\\#){background-color:var(--color-card)}.bg-gray-100:not(#\\#){background-color:var(--color-gray-100)}.bg-grey-50:not(#\\#){background-color:var(--color-grey-50)}.bg-grey-200:not(#\\#){background-color:var(--color-grey-200)}.bg-grey-300:not(#\\#){background-color:var(--color-grey-300)}.bg-grey-400:not(#\\#){background-color:var(--color-grey-400)}.bg-grey-500:not(#\\#){background-color:var(--color-grey-500)}.bg-grey-600:not(#\\#){background-color:var(--color-grey-600)}.bg-grey-700:not(#\\#){background-color:var(--color-grey-700)}.bg-grey-800:not(#\\#){background-color:var(--color-grey-800)}.bg-input-bg:not(#\\#){background-color:var(--color-input-bg)}.bg-input-border:not(#\\#){background-color:var(--color-input-border)}.bg-input-disable:not(#\\#){background-color:var(--color-input-disable)}.bg-input-error-bg:not(#\\#){background-color:var(--color-input-error-bg)}.bg-input-message-bg:not(#\\#){background-color:var(--color-input-message-bg)}.bg-input-option-active-bg:not(#\\#){background-color:var(--color-input-option-active-bg)}.bg-input-option-hover-bg:not(#\\#){background-color:var(--color-input-option-hover-bg)}.bg-input-text:not(#\\#){background-color:var(--color-input-text)}.bg-input-warning-bg:not(#\\#){background-color:var(--color-input-warning-bg)}.bg-negative:not(#\\#){background-color:var(--color-negative)}.bg-negative-400:not(#\\#){background-color:var(--color-negative-400)}.bg-negative-500:not(#\\#){background-color:var(--color-negative-500)}.bg-negative-bg:not(#\\#){background-color:var(--color-negative-bg)}.bg-negative-hover:not(#\\#){background-color:var(--color-negative-hover)}.bg-negative-light:not(#\\#){background-color:var(--color-negative-light)}.bg-panel:not(#\\#){background-color:var(--color-panel)}.bg-panel-0:not(#\\#){background-color:var(--color-panel-0)}.bg-panel-1:not(#\\#){background-color:var(--color-panel-1)}.bg-panel-2:not(#\\#){background-color:var(--color-panel-2)}.bg-panel-3:not(#\\#){background-color:var(--color-panel-3)}.bg-panel-4:not(#\\#){background-color:var(--color-panel-4)}.bg-panel-5:not(#\\#){background-color:var(--color-panel-5)}.bg-panel-subtle:not(#\\#){background-color:var(--color-panel-subtle)}.bg-positive:not(#\\#){background-color:var(--color-positive)}.bg-positive-200:not(#\\#){background-color:var(--color-positive-200)}.bg-positive-500:not(#\\#){background-color:var(--color-positive-500)}.bg-positive-bg:not(#\\#){background-color:var(--color-positive-bg)}.bg-positive-hover:not(#\\#){background-color:var(--color-positive-hover)}.bg-positive-light:not(#\\#){background-color:var(--color-positive-light)}.bg-primary:not(#\\#){background-color:var(--color-primary)}.bg-primary-500:not(#\\#){background-color:var(--color-primary-500)}.bg-primary-600:not(#\\#){background-color:var(--color-primary-600)}.bg-primary-hover:not(#\\#){background-color:var(--color-primary-hover)}.bg-primary-light:not(#\\#){background-color:var(--color-primary-light)}.bg-primary\\/30:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/30:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.bg-select-list-bg:not(#\\#){background-color:var(--color-select-list-bg)}.bg-tab-active-bg:not(#\\#){background-color:var(--color-tab-active-bg)}.bg-tab-bg-default:not(#\\#){background-color:var(--color-tab-bg-default)}.bg-tab-inactive-bg:not(#\\#){background-color:var(--color-tab-inactive-bg)}.bg-transparent:not(#\\#){background-color:#0000}.bg-warning:not(#\\#){background-color:var(--color-warning)}.bg-warning-500:not(#\\#){background-color:var(--color-warning-500)}.bg-warning-bg:not(#\\#){background-color:var(--color-warning-bg)}.bg-warning-hover:not(#\\#){background-color:var(--color-warning-hover)}.bg-warning-light:not(#\\#){background-color:var(--color-warning-light)}.bg-white:not(#\\#){background-color:var(--color-white)}.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right in oklab}}.bg-linear-to-r:not(#\\#){background-image:linear-gradient(var(--tw-gradient-stops))}.from-green-500:not(#\\#){--tw-gradient-from:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-primary:not(#\\#){--tw-gradient-from:var(--color-primary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-500:not(#\\#){--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500:not(#\\#){--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.stroke-current:not(#\\#){stroke:currentColor}.p-0:not(#\\#){padding:calc(var(--spacing)*0)}.p-0\\.5:not(#\\#){padding:calc(var(--spacing)*.5)}.p-1:not(#\\#){padding:calc(var(--spacing)*1)}.p-1\\!{padding:calc(var(--spacing)*1)!important}.p-1\\.5:not(#\\#){padding:calc(var(--spacing)*1.5)}.p-2:not(#\\#){padding:calc(var(--spacing)*2)}.p-2\\.5:not(#\\#){padding:calc(var(--spacing)*2.5)}.p-3:not(#\\#){padding:calc(var(--spacing)*3)}.p-4:not(#\\#){padding:calc(var(--spacing)*4)}.p-6:not(#\\#){padding:calc(var(--spacing)*6)}.p-8:not(#\\#){padding:calc(var(--spacing)*8)}.p-10:not(#\\#){padding:calc(var(--spacing)*10)}.p-50:not(#\\#){padding:calc(var(--spacing)*50)}.p-px:not(#\\#){padding:1px}.px-0\\.5:not(#\\#){padding-inline:calc(var(--spacing)*.5)}.px-1:not(#\\#){padding-inline:calc(var(--spacing)*1)}.px-1\\.5:not(#\\#){padding-inline:calc(var(--spacing)*1.5)}.px-2:not(#\\#){padding-inline:calc(var(--spacing)*2)}.px-3:not(#\\#){padding-inline:calc(var(--spacing)*3)}.px-4:not(#\\#){padding-inline:calc(var(--spacing)*4)}.px-6:not(#\\#){padding-inline:calc(var(--spacing)*6)}.px-7:not(#\\#){padding-inline:calc(var(--spacing)*7)}.px-8:not(#\\#){padding-inline:calc(var(--spacing)*8)}.py-0\\.5:not(#\\#){padding-block:calc(var(--spacing)*.5)}.py-1:not(#\\#){padding-block:calc(var(--spacing)*1)}.py-1\\.5:not(#\\#){padding-block:calc(var(--spacing)*1.5)}.py-2:not(#\\#){padding-block:calc(var(--spacing)*2)}.py-3:not(#\\#){padding-block:calc(var(--spacing)*3)}.pt-0\\.5:not(#\\#){padding-top:calc(var(--spacing)*.5)}.pt-1:not(#\\#){padding-top:calc(var(--spacing)*1)}.pt-1\\.5:not(#\\#){padding-top:calc(var(--spacing)*1.5)}.pt-2:not(#\\#){padding-top:calc(var(--spacing)*2)}.pl-1:not(#\\#){padding-left:calc(var(--spacing)*1)}.pl-4:not(#\\#){padding-left:calc(var(--spacing)*4)}.text-center:not(#\\#){text-align:center}.text-left:not(#\\#){text-align:left}.text-2xl:not(#\\#){font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl:not(#\\#){font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl:not(#\\#){font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl:not(#\\#){font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl:not(#\\#){font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-7xl:not(#\\#){font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-8xl:not(#\\#){font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}.text-9xl:not(#\\#){font-size:var(--text-9xl);line-height:var(--tw-leading,var(--text-9xl--line-height))}.text-base:not(#\\#){font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg:not(#\\#){font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm:not(#\\#){font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl:not(#\\#){font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs:not(#\\#){font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-s:not(#\\#){font-size:var(--text-s)}.text-xxs:not(#\\#){font-size:var(--text-xxs)}.leading-3:not(#\\#){--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-4:not(#\\#){--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5:not(#\\#){--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-none:not(#\\#){--tw-leading:1;line-height:1}.font-bold:not(#\\#){--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium:not(#\\#){--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold:not(#\\#){--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin:not(#\\#){--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.whitespace-nowrap:not(#\\#){white-space:nowrap}.text-body:not(#\\#){color:var(--color-body)}.text-button-text:not(#\\#){color:var(--color-button-text)}.text-gray-50:not(#\\#){color:var(--color-gray-50)}.text-gray-400:not(#\\#){color:var(--color-gray-400)}.text-gray-500:not(#\\#){color:var(--color-gray-500)}.text-gray-800:not(#\\#){color:var(--color-gray-800)}.text-grey-100:not(#\\#){color:var(--color-grey-100)}.text-grey-200:not(#\\#){color:var(--color-grey-200)}.text-grey-300:not(#\\#){color:var(--color-grey-300)}.text-grey-700:not(#\\#){color:var(--color-grey-700)}.text-inactive-text:not(#\\#){color:var(--color-inactive-text)}.text-inherit:not(#\\#){color:inherit}.text-input-disable:not(#\\#){color:var(--color-input-disable)}.text-input-message-text:not(#\\#){color:var(--color-input-message-text)}.text-input-option-active-text:not(#\\#){color:var(--color-input-option-active-text)}.text-input-placeholder:not(#\\#){color:var(--color-input-placeholder)}.text-input-text:not(#\\#){color:var(--color-input-text)}.text-muted:not(#\\#){color:var(--color-muted)}.text-negative:not(#\\#){color:var(--color-negative)}.text-negative-500:not(#\\#){color:var(--color-negative-500)}.text-negative-dark:not(#\\#){color:var(--color-negative-dark)}.text-negative-text:not(#\\#){color:var(--color-negative-text)}.text-panel-subtle:not(#\\#){color:var(--color-panel-subtle)}.text-positive:not(#\\#){color:var(--color-positive)}.text-positive-500:not(#\\#){color:var(--color-positive-500)}.text-positive-600:not(#\\#){color:var(--color-positive-600)}.text-positive-dark:not(#\\#){color:var(--color-positive-dark)}.text-positive-text:not(#\\#),.text-positive-text\\/70:not(#\\#){color:var(--color-positive-text)}@supports (color:color-mix(in lab,red,red)){.text-positive-text\\/70:not(#\\#){color:color-mix(in oklab,var(--color-positive-text)70%,transparent)}}.text-primary:not(#\\#){color:var(--color-primary)}.text-primary-dark:not(#\\#){color:var(--color-primary-dark)}.text-primary-hover:not(#\\#){color:var(--color-primary-hover)}.text-select-text:not(#\\#){color:var(--color-select-text)}.text-tab-active-fg:not(#\\#){color:var(--color-tab-active-fg)}.text-tab-inactive-fg:not(#\\#){color:var(--color-tab-inactive-fg)}.text-warning:not(#\\#){color:var(--color-warning)}.text-warning-dark:not(#\\#){color:var(--color-warning-dark)}.text-warning-text:not(#\\#){color:var(--color-warning-text)}.capitalize:not(#\\#){text-transform:capitalize}.lowercase:not(#\\#){text-transform:lowercase}.uppercase:not(#\\#){text-transform:uppercase}.italic:not(#\\#){font-style:italic}.underline:not(#\\#){text-decoration-line:underline}.decoration-transparent:not(#\\#){text-decoration-color:#0000}.opacity-0:not(#\\#){opacity:0}.opacity-50:not(#\\#){opacity:.5}.opacity-60:not(#\\#){opacity:.6}.opacity-80:not(#\\#){opacity:.8}.opacity-100:not(#\\#){opacity:1}.shadow:not(#\\#){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner:not(#\\#){--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg:not(#\\#){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md:not(#\\#){--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs:not(#\\#){--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-input-error-border:not(#\\#){--tw-ring-color:var(--color-input-error-border)}.ring-input-focus-border:not(#\\#){--tw-ring-color:var(--color-input-focus-border)}.ring-input-warning-border:not(#\\#){--tw-ring-color:var(--color-input-warning-border)}.ring-positive:not(#\\#){--tw-ring-color:var(--color-positive)}.outline-hidden:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.outline:not(#\\#),.outline-1:not(#\\#){outline-style:var(--tw-outline-style);outline-width:1px}.outline-s:not(#\\#){outline-width:.5px}.outline-xs:not(#\\#){outline-width:.3px}.outline-xxs:not(#\\#){outline-width:.1px}.outline-canvas-default:not(#\\#){outline-color:var(--color-canvas-default)}.outline-primary:not(#\\#){outline-color:var(--color-primary)}.blur:not(#\\#){--tw-blur:blur(8px);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,)}.filter:not(#\\#){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:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all:not(#\\#){transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity:not(#\\#){transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform:not(#\\#){transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150:not(#\\#){--tw-duration:.15s;transition-duration:.15s}.duration-200:not(#\\#){--tw-duration:.2s;transition-duration:.2s}.duration-300:not(#\\#){--tw-duration:.3s;transition-duration:.3s}.ease-in-out:not(#\\#){--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out:not(#\\#){--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-solid:not(#\\#){--tw-outline-style:solid;outline-style:solid}.select-none:not(#\\#){-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:flex:is(:where(.group):hover *):not(#\\#){display:flex}.group-hover\\:grid:is(:where(.group):hover *):not(#\\#){display:grid}.group-hover\\:border-body:is(:where(.group):hover *):not(#\\#){border-color:var(--color-body)}.group-hover\\:border-negative-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-negative-text)}.group-hover\\:border-positive-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-positive-text)}.group-hover\\:border-warning-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-warning-text)}.group-hover\\:bg-grey-400:is(:where(.group):hover *):not(#\\#){background-color:var(--color-grey-400)}.group-hover\\:bg-negative-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-hover)}.group-hover\\:bg-negative-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-light)}.group-hover\\:bg-positive-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-hover)}.group-hover\\:bg-positive-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-light)}.group-hover\\:bg-primary-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-hover)}.group-hover\\:bg-primary-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-light)}.group-hover\\:bg-warning-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-hover)}.group-hover\\:bg-warning-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-light)}.group-hover\\:opacity-100:is(:where(.group):hover *):not(#\\#){opacity:1}}.placeholder\\:text-sm:not(#\\#)::placeholder{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.placeholder\\:text-xs:not(#\\#)::placeholder{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.placeholder\\:text-s:not(#\\#)::placeholder{font-size:var(--text-s)}.placeholder\\:text-input-placeholder:not(#\\#)::placeholder{color:var(--color-input-placeholder)}.placeholder\\:opacity-60:not(#\\#)::placeholder{opacity:.6}.first\\:bottom-full:first-child:not(#\\#){bottom:100%}.first\\:-ml-1\\.5:first-child:not(#\\#){margin-left:calc(var(--spacing)*-1.5)}.first\\:rounded-t:first-child:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.first\\:rounded-l:first-child:not(#\\#){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.last\\:top-full:last-child:not(#\\#){top:100%}.last\\:-mr-1\\.5:last-child:not(#\\#){margin-right:calc(var(--spacing)*-1.5)}.last\\:rounded-r:last-child:not(#\\#){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.last\\:rounded-b:last-child:not(#\\#){border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.only\\:top-full:only-child:not(#\\#){top:100%}.only\\:-mx-0\\.5:only-child:not(#\\#){margin-inline:calc(var(--spacing)*-.5)}.only\\:rounded:only-child:not(#\\#){border-radius:.25rem}.only\\:ring-1:only-child:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:border-input-error-border:focus-within:not(#\\#){border-color:var(--color-input-error-border)}.focus-within\\:border-input-focus-border:focus-within:not(#\\#){border-color:var(--color-input-focus-border)}.focus-within\\:border-input-warning-border:focus-within:not(#\\#){border-color:var(--color-input-warning-border)}.focus-within\\:border-positive:focus-within:not(#\\#){border-color:var(--color-positive)}@media(hover:hover){.hover\\:border-canvas-default:hover:not(#\\#){border-color:var(--color-canvas-default)}.hover\\:border-canvas-subtle:hover:not(#\\#){border-color:var(--color-canvas-subtle)}.hover\\:border-negative-hover:hover:not(#\\#){border-color:var(--color-negative-hover)}.hover\\:border-positive-hover:hover:not(#\\#){border-color:var(--color-positive-hover)}.hover\\:border-primary-hover:hover:not(#\\#){border-color:var(--color-primary-hover)}.hover\\:border-warning-hover:hover:not(#\\#){border-color:var(--color-warning-hover)}.hover\\:bg-canvas-default:hover:not(#\\#){background-color:var(--color-canvas-default)}.hover\\:bg-canvas-subtle:hover:not(#\\#){background-color:var(--color-canvas-subtle)}.hover\\:bg-grey-500:hover:not(#\\#){background-color:var(--color-grey-500)}.hover\\:bg-grey-700:hover:not(#\\#){background-color:var(--color-grey-700)}.hover\\:bg-input-option-hover-bg:hover:not(#\\#){background-color:var(--color-input-option-hover-bg)}.hover\\:bg-negative:hover:not(#\\#){background-color:var(--color-negative)}.hover\\:bg-negative-hover:hover:not(#\\#){background-color:var(--color-negative-hover)}.hover\\:bg-positive:hover:not(#\\#){background-color:var(--color-positive)}.hover\\:bg-positive-hover:hover:not(#\\#){background-color:var(--color-positive-hover)}.hover\\:bg-primary:hover:not(#\\#){background-color:var(--color-primary)}.hover\\:bg-primary-600:hover:not(#\\#){background-color:var(--color-primary-600)}.hover\\:bg-primary-hover:hover:not(#\\#){background-color:var(--color-primary-hover)}.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)20%,transparent)}}.hover\\:bg-transparent:hover:not(#\\#){background-color:#0000}.hover\\:bg-warning:hover:not(#\\#){background-color:var(--color-warning)}.hover\\:bg-warning-hover:hover:not(#\\#){background-color:var(--color-warning-hover)}.hover\\:text-body:hover:not(#\\#){color:var(--color-body)}.hover\\:text-button-text:hover:not(#\\#){color:var(--color-button-text)}.hover\\:text-grey-200:hover:not(#\\#){color:var(--color-grey-200)}.hover\\:text-negative-400:hover:not(#\\#){color:var(--color-negative-400)}.hover\\:text-positive-400:hover:not(#\\#){color:var(--color-positive-400)}.hover\\:text-positive-text:hover:not(#\\#){color:var(--color-positive-text)}.hover\\:text-primary:hover:not(#\\#){color:var(--color-primary)}.hover\\:text-primary-hover:hover:not(#\\#){color:var(--color-primary-hover)}.hover\\:text-tab-active-fg:hover:not(#\\#){color:var(--color-tab-active-fg)}.hover\\:decoration-current:hover:not(#\\#){text-decoration-color:currentColor}}.focus\\:bg-transparent:focus:not(#\\#){background-color:#0000}.focus\\:ring-2:focus:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-negative:focus:not(#\\#){--tw-ring-color:var(--color-negative)}.focus\\:ring-positive:focus:not(#\\#){--tw-ring-color:var(--color-positive)}.focus\\:ring-primary:focus:not(#\\#){--tw-ring-color:var(--color-primary)}.focus\\:ring-warning:focus:not(#\\#){--tw-ring-color:var(--color-warning)}.focus\\:ring-offset-0:focus:not(#\\#){--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-2:focus:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:ring-2:focus-visible:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-primary:focus-visible:not(#\\#){--tw-ring-color:var(--color-primary)}.focus-visible\\:ring-offset-2:focus-visible:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}:root:not(#\\#){--ws-primary-50:#f2ddff;--ws-primary-100:#edd0ff;--ws-primary-300:#d0acef;--ws-primary-400:#c190ea;--ws-primary-600:#935ebf;--ws-primary-800:#563374;--ws-primary-900:#381e4f;--ws-primary-950:#29133c;--ws-positive-50:#ecf9f2;--ws-positive-100:#d9f2e6;--ws-positive-300:#8ed9b3;--ws-positive-400:#68cd99;--ws-positive-700:#28734d;--ws-positive-800:#28734d;--ws-positive-900:#0d261a;--ws-positive-950:#07130d;--ws-warning-50:#fff7e6;--ws-warning-100:#ffefcc;--ws-warning-300:#fed066;--ws-warning-400:#fdc133;--ws-warning-700:#986a00;--ws-warning-800:#654700;--ws-warning-900:#332300;--ws-warning-950:#191200;--ws-negative-50:#feeeee;--ws-negative-100:#fcdcdc;--ws-negative-300:#f69797;--ws-negative-400:#f37575;--ws-negative-700:#9a3232;--ws-negative-800:#6e2222;--ws-negative-900:#431212;--ws-negative-950:#2e0a0a;--ws-grey-300:#535353;--ws-grey-400:#484848;--ws-grey-600:#3f3f3f;--ws-palette-primary-200:#e0c7f5;--ws-palette-primary-500:#b174e5;--ws-palette-primary-700:#75499a;--ws-button-bg:var(--vscode-button-background,var(--theia-button-background,var(--ws-palette-primary-500)));--ws-button-fg:var(--vscode-button-foreground,var(--theia-button-foreground,var(--ws-palette-white)));--ws-primary-default:var(--ws-button-bg);--ws-button-text:var(--ws-button-fg);--ws-primary-hover:var(--vscode-button-hoverBackground,var(--theia-button-hoverBackground,var(--ws-palette-primary-700)));--ws-primary-light:var(--vscode-editorInfo-foreground,var(--vscode-button-background,var(--theia-button-secondaryForeground,var(--theia-button-background,var(--ws-palette-primary-200)))));--ws-primary-dark:var(--vscode-editor-lineHighlightBackground,var(--vscode-button-foreground,var(--theia-button-secondaryBackground,var(--theia-button-foreground,var(--ws-palette-primary-700)))));--ws-primary-200:var(--ws-primary-light);--ws-primary-500:var(--ws-primary-default);--ws-primary-700:var(--ws-primary-hover);--ws-palette-positive-200:#b3e6cc;--ws-palette-positive-500:#42c080;--ws-palette-positive-600:#359a66;--ws-positive-dark:var(--vscode-gitDecoration-addedResourceForeground,var(--ws-palette-positive-600));--ws-positive-hover:var(--ws-positive-dark);--ws-positive-bg:var(--ws-palette-positive-100);--ws-positive-light:var(--ws-palette-positive-200);--ws-positive-border:var(--ws-positive-500);--ws-positive-text:var(--ws-positive-500);--ws-positive-500:var(--vscode-testing-iconPassed,var(--ws-palette-positive-500));--ws-positive-200:var(--ws-positive-light);--ws-positive-600:var(--ws-positive-dark);--ws-palette-warning-200:#fee099;--ws-palette-warning-500:#fdb100;--ws-palette-warning-600:#ca8e00;--ws-warning-hover:var(--ws-warning-600);--ws-warning-text:var(--ws-warning-500);--ws-warning-border:var(--ws-warning-500);--ws-warning-500:var(--vscode-list-warningForeground,var(--ws-palette-warning-500));--ws-warning-bg:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-500));--ws-warning-light:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-200));--ws-warning-dark:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-600));--ws-warning-200:var(--ws-warning-light);--ws-warning-600:var(--ws-warning-dark);--ws-palette-negative-200:#f9baba;--ws-palette-negative-500:#f05252;--ws-palette-negative-600:#c54242;--ws-negative-hover:var(--ws-negative-600);--ws-negative-text:var(--ws-negative-500);--ws-negative-500:var(--vscode-errorForeground,var(--ws-palette-negative-500));--ws-negative-light:var(--ws-palette-negative-200);--ws-negative-dark:var(--ws-palette-negative-600);--ws-negative-200:var(--ws-negative-light);--ws-negative-600:var(--ws-negative-dark);--ws-palette-white:#fff;--ws-palette-grey-50:#f1f5f9;--ws-palette-grey-100:#ccc;--ws-palette-grey-200:#888;--ws-palette-grey-300:#535353;--ws-palette-grey-400:#484848;--ws-palette-grey-500:#444;--ws-palette-grey-600:#3f3f3f;--ws-palette-grey-700:#393939;--ws-palette-grey-800:#383838;--ws-palette-grey-900:#262626;--ws-palette-grey-950:#151515;--ws-bg-default:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-white)));--ws-bg-foreground:var(--vscode-editor-foreground,var(--theia-editor-foreground,var(--ws-palette-grey-50)));--ws-grey-50:var(--ws-bg-foreground);--ws-grey-100:var(--vscode-panel-background,var(--theia-panel-background,var(--ws-palette-grey-100)));--ws-grey-200:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-grey-200)));--ws-grey-950:var(--vscode-panel-border,var(--theia-border-color,var(--ws-palette-grey-950)));--ws-grey-500:var(--vscode-descriptionForeground,var(--ws-palette-grey-500));--ws-grey-800:var(--vscode-descriptionForeground,var(--ws-palette-grey-800));--ws-card-bg:var(--vscode-editorGroupHeader-tabsBackground,var(--theia-editorGroupHeader-tabsBackground,var(--ws-palette-grey-900)));--ws-card-border:var(--vscode-editorGroupHeader-tabsBorder,var(--theia-editorGroupHeader-tabsBorder,var(--ws-palette-grey-50)));--ws-palette-input-bg:var(--ws-palette-grey-300);--ws-palette-input-border:var(--ws-palette-grey-300);--ws-palette-input-text:var(--ws-palette-grey-50);--ws-palette-input-placeholder:var(--ws-palette-grey-200);--ws-palette-input-focus-border:var(--ws-palette-grey-50);--ws-input-bg:var(--vscode-input-background,var(--vscode-editorWidget-background,var(--theia-input-background,var(--ws-palette-input-bg))));--ws-input-border:var(--vscode-input-border,var(--vscode-panel-border,var(--theia-input-border,var(--ws-palette-input-border))));--ws-input-text:var(--vscode-input-foreground,var(--vscode-editor-foreground,var(--theia-input-foreground,var(--ws-palette-input-text))));--ws-input-placeholder:var(--vscode-input-placeholderForeground,var(--vscode-editor-foreground,var(--theia-input-placeholderForeground,var(--ws-palette-input-placeholder))));--ws-input-focus-border:var(--vscode-focusBorder,var(--vscode-button-background,var(--theia-focusBorder,var(--ws-palette-primary-500))));--ws-select-bg:var(--vscode-dropdown-background,var(--vscode-editorWidget-background,var(--theia-dropdown-background,var(--ws-input-bg))));--ws-select-border:var(--vscode-dropdown-border,var(--vscode-panel-border,var(--theia-dropdown-border,var(--ws-input-border))));--ws-select-text:var(--vscode-dropdown-foreground,var(--vscode-editor-foreground,var(--theia-dropdown-foreground,var(--ws-input-text))));--ws-select-list-bg:var(--vscode-dropdown-listBackground,var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-900))));--ws-input-option-hover-bg:var(--vscode-list-hoverBackground,var(--vscode-button-hoverBackground,var(--theia-list-hoverBackground,var(--ws-palette-primary-700))));--ws-input-option-active-bg:var(--vscode-list-activeSelectionBackground,var(--theia-list-activeSelectionBackground,var(--ws-palette-primary-500)));--ws-input-option-active-text:var(--vscode-list-activeSelectionForeground,var(--theia-list-activeSelectionForeground,var(--ws-palette-white)));--ws-input-error-border:var(--vscode-inputValidation-errorBorder,var(--theia-inputValidation-errorBorder,var(--ws-palette-negative-500)));--ws-input-error-bg:var(--vscode-inputValidation-errorBackground,var(--theia-inputValidation-errorBackground,var(--ws-palette-negative-200)));--ws-input-warning-border:var(--vscode-inputValidation-warningBorder,var(--theia-inputValidation-warningBorder,var(--ws-palette-warning-500)));--ws-input-warning-bg:var(--vscode-inputValidation-warningBackground,var(--theia-inputValidation-warningBackground,var(--ws-palette-warning-200)));--ws-input-info-bg:var(--vscode-panel-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200)));--ws-input-message-bg:var(--vscode-editor-lineHighlightBackground,var(--vscode-editorWidget-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200))));--ws-input-message-text:var(--vscode-editorInfo-foreground,var(--vscode-editor-foreground,var(--theia-inputValidation-infoForeground,var(--ws-palette-primary-500))));--ws-inactive-text:var(--vscode-disabledForeground,var(--theia-disabled-foreground,var(--ws-palette-grey-200)));--ws-text-muted:var(--vscode-descriptionForeground,var(--vscode-editor-foreground,var(--theia-descriptionForeground,var(--ws-palette-grey-100))));--ws-disable-bg:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-300)));--ws-disable-input:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-200)));--ws-panel-base-ide:var(--vscode-editor-background,var(--theia-editor-background));--ws-panel-shift-ide:var(--vscode-editor-foreground,var(--theia-panel-foreground));--ws-panel-0-mix:var(--ws-panel-base-ide);--ws-panel-1-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-1-mix:color-mix(in srgb,var(--ws-panel-base-ide)96%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-2-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-2-mix:color-mix(in srgb,var(--ws-panel-base-ide)92%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-3-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-3-mix:color-mix(in srgb,var(--ws-panel-base-ide)88%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-4-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-4-mix:color-mix(in srgb,var(--ws-panel-base-ide)84%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-5-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-5-mix:color-mix(in srgb,var(--ws-panel-base-ide)80%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-light-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-light-mix:color-mix(in srgb,var(--ws-panel-base-ide)90%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-0:var(--ws-panel-0-mix,var(--ws-palette-grey-900));--ws-panel-1:var(--ws-panel-1-mix,var(--ws-palette-grey-700));--ws-panel-2:var(--ws-panel-2-mix,var(--ws-palette-grey-900));--ws-panel-3:var(--ws-panel-3-mix,var(--ws-palette-grey-900));--ws-panel-4:var(--ws-panel-4-mix,var(--ws-palette-grey-300));--ws-panel-5:var(--ws-panel-5-mix,var(--ws-palette-grey-950));--ws-panel-light:var(--ws-panel-light-mix,var(--ws-palette-grey-200));--ws-panel-border-subtle:var(--vscode-panel-border,var(--vscode-tab-border,var(--theia-border-color,var(--ws-palette-grey-100))));--ws-panel-border-strong:var(--vscode-contrastBorder,var(--vscode-focusBorder,var(--theia-contrastBorder,var(--ws-palette-grey-300))));--ws-tab-bg-default:var(--vscode-editorGroupHeader-tabsBackground,var(--vscode-editorWidget-background,var(--ws-palette-grey-900)));--ws-tab-border:var(--vscode-tab-border,var(--vscode-editorGroupHeader-tabsBorder,var(--ws-palette-grey-950)));--ws-tab-active-bg:var(--vscode-tab-activeBackground,var(--ws-palette-grey-800));--ws-tab-active-fg:var(--vscode-tab-activeForeground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-tab-inactive-bg:var(--vscode-tab-inactiveBackground,var(--ws-palette-grey-900));--ws-tab-inactive-fg:var(--vscode-tab-inactiveForeground,var(--vscode-descriptionForeground,var(--ws-palette-grey-200)));--ws-tab-hover-bg:var(--vscode-tab-hoverBackground,var(--vscode-toolbar-hoverBackground,var(--ws-palette-grey-700)));--ws-panel-header-bg:var(--vscode-sideBarSectionHeader-background,var(--vscode-editorGroupHeader-tabsBackground,var(--ws-palette-grey-800)));--ws-panel-header-fg:var(--vscode-sideBarSectionHeader-foreground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-bg:var(--vscode-panel-background,var(--vscode-editor-background,var(--ws-bg-default)));--ws-panel-border:var(--vscode-panel-border,var(--vscode-tab-border,var(--ws-palette-grey-950)));--ws-panel-title-active-border:var(--vscode-panelTitle-activeBorder,var(--vscode-focusBorder,var(--ws-palette-primary-500)));--ws-panel-title-active-fg:var(--vscode-panelTitle-activeForeground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-title-inactive-fg:var(--vscode-panelTitle-inactiveForeground,var(--vscode-descriptionForeground,var(--ws-palette-grey-100)))}.center-absolute:not(#\\#){--tw-translate-x: -50% ;--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);position:absolute;top:50%;left:50%}.ws-group:hover .ws-checkbox-hover-target{opacity:1!important}.simplebar-scrollbar:not(#\\#):before{background-color:#ccc}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
2
+ `,document.head.prepend(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const qD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M18 2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v3.67a3.001 3.001 0 0 1 0 5.66v9.67a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-9.67a3.001 3.001 0 0 1 0-5.66V2.5ZM11.5 2a.5.5 0 0 0-.5.5v9.67a3.001 3.001 0 0 0 0 5.66v3.67a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-3.67a3.001 3.001 0 0 0 0-5.66V2.5a.5.5 0 0 0-.5-.5h-1ZM4.5 2a.5.5 0 0 0-.5.5v3.67a3.001 3.001 0 0 0 0 5.66v9.67a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-9.67a3.001 3.001 0 0 0 0-5.66V2.5a.5.5 0 0 0-.5-.5h-1Z",fill:"currentColor"})}),xi=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M8.82 19.748c.001.245.075.486.214.69l.38 1.004c.117.172.573.312.758.41.185.097.391.148.601.148h2.454c.21 0 .417-.05.601-.148.185-.098.621-.238.737-.41l.402-1.003c.138-.205.213-.445.213-.691l.001-1.498H8.82l.002 1.498ZM5 8.875c0 1.733.654 3.314 1.732 4.522.658.737 1.685 2.275 2.077 3.573l.004.03h6.374l.004-.03c.392-1.298 1.42-2.836 2.076-3.573A6.766 6.766 0 0 0 19 8.875C19 5.07 15.854 1.988 11.978 2 7.921 2.012 5 5.241 5 8.875Z",fill:"currentColor"})}),Q$=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm5.645-14.836a.5.5 0 0 0-.707-.034l-7.703 6.997-1.67-1.684a.5.5 0 0 0-.707-.003l-.71.704a.5.5 0 0 0-.003.707l2.386 2.408.266.292a.5.5 0 0 0 .42.162.498.498 0 0 0 .325-.144l.225-.223 8.516-7.736a.5.5 0 0 0 .034-.706l-.672-.74Z",fill:"currentColor"})}),eH=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M21.66 6.28a.5.5 0 0 0 0-.697l-.967-.993a.5.5 0 0 0-.716 0L8.499 16.373 4.023 11.78a.5.5 0 0 0-.716 0l-.967.993a.5.5 0 0 0 0 .697l5.889 6.046.014-.014a.377.377 0 0 0 .54 0L21.66 6.28Z",fill:"currentColor"})}),LD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M10.84 2.714c0-.394.346-.714.773-.714h.774c.427 0 .773.32.773.714V9.5h5.025c.427 0 .773.32.773.714v3.572H5.042v-3.572c0-.394.346-.714.773-.714h5.025V2.714ZM5.042 14.5h13.916l1.034 6.685c.067.43-.295.815-.765.815h-2.1l-.681-5.929L15.764 22h-3.236l-.721-2.143L11.086 22h-2.85l-.682-3.929L6.872 22H4.773c-.47 0-.832-.385-.765-.815L5.042 14.5Z",fill:"currentColor"})}),id=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M4.497 5.361a.5.5 0 0 0 0 .707L10.429 12l-5.932 5.932a.5.5 0 0 0 0 .707l.864.864a.5.5 0 0 0 .707 0L12 13.571l5.932 5.932a.5.5 0 0 0 .707 0l.864-.864a.5.5 0 0 0 0-.707L13.571 12l5.932-5.932a.5.5 0 0 0 0-.707l-.864-.864a.5.5 0 0 0-.707 0L12 10.429 6.068 4.497a.5.5 0 0 0-.707 0l-.864.864Z",fill:"currentColor"})}),zD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.071 19.071c3.905-3.905 3.905-10.237 0-14.142-3.905-3.905-10.237-3.905-14.142 0-3.905 3.905-3.905 10.237 0 14.142 3.905 3.905 10.237 3.905 14.142 0Zm-3.182-4.596a.5.5 0 0 1 0 .707l-.707.707a.5.5 0 0 1-.707 0L12 13.414 9.525 15.89a.5.5 0 0 1-.707 0l-.707-.707a.5.5 0 0 1 0-.707L10.586 12 8.11 9.525a.5.5 0 0 1 0-.707l.707-.707a.5.5 0 0 1 .707 0L12 10.586l2.475-2.475a.5.5 0 0 1 .707 0l.707.707a.5.5 0 0 1 0 .707L13.414 12l2.475 2.475Z",fill:"currentColor"})}),BD=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M7.126 7.145c-.19-.2-.5-.2-.69 0l-3.538 3.703-.008.008a.403.403 0 0 0-.013.013l-.733.767a.525.525 0 0 0 0 .724l.733.767a.622.622 0 0 0 .019.02l3.54 3.704c.19.2.5.2.69 0l.733-.767c.19-.2.19-.523 0-.723l-3.213-3.363L7.86 8.635c.19-.2.19-.523 0-.723l-.733-.767ZM16.875 16.85c.191.2.5.2.691 0l3.537-3.702a.549.549 0 0 0 .022-.022l.733-.767a.525.525 0 0 0 0-.724l-.733-.767a.564.564 0 0 0-.02-.019l-3.539-3.705c-.19-.2-.5-.2-.69 0l-.733.767c-.19.2-.19.523 0 .723l3.212 3.363-3.212 3.363c-.191.2-.191.524 0 .723l.732.767Z",fill:"currentColor"}),O.jsx("path",{d:"M9 12.995a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM13 11.995a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM15 12.995a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"currentColor"})]}),tH=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22 4v13a2 2 0 0 1-2 2V4H5a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 20V8H4v12h12Zm1 2a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14Z",fill:"currentColor"}),O.jsx("path",{d:"M14 15v-2H6v2h8ZM18 17h2v2h-2v-2ZM7 4v2H5V4h2Z",fill:"currentColor"})]}),rH=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M4.221 16.944a.383.383 0 0 1-.373-.283L2.012 9.525c-.08-.312.256-.57.55-.422l4.124 2.077c.177.09.395.032.502-.131l4.487-6.875a.39.39 0 0 1 .65 0l4.487 6.875c.107.163.325.22.502.131l4.124-2.077c.294-.148.63.11.55.422l-1.836 7.136a.383.383 0 0 1-.373.283H4.22ZM4.221 19a.38.38 0 0 1 .385-.374H19.61a.38.38 0 0 1 .385.374v.747a.38.38 0 0 1-.385.374H4.606a.38.38 0 0 1-.385-.373V19Z",fill:"currentColor"})}),FD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M11.701 18.797c.206.195.52.195.726 0l2.487-2.349-.008-.007 6.973-6.585a.58.58 0 0 0 0-.835l-2.045-1.932a.524.524 0 0 0-.726 0l-7.052 6.66-7.051-6.66a.524.524 0 0 0-.726 0L2.234 9.021a.58.58 0 0 0 0 .835l9.467 8.941Z",fill:"currentColor"})}),$D=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.987 11.615c0-.346.291-.626.65-.626H21.35c.36 0 .651.28.651.626v8.758a.639.639 0 0 1-.65.626H9.637c-.36 0-.651-.28-.651-.626v-8.758Zm7.808 1.877h-6.507v2.502h6.507v-2.502Zm1.301 0H20.7v6.256h-2.603V13.49Zm-1.301 3.753h-6.507v2.503h6.507v-2.503Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),HD=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M15.493 19.397c-2.887 0-5.374-.466-6.506-1.137v1.788C8.987 21.126 11.9 22 15.493 22 19.087 22 22 21.126 22 20.048V18.26c-1.132.671-3.62 1.137-6.507 1.137ZM8.987 13.055c1.132.671 3.62 1.137 6.506 1.137 2.888 0 5.375-.466 6.507-1.137v-2.116c0-1.078-2.913-1.952-6.507-1.952-3.593 0-6.506.874-6.506 1.952v2.116ZM8.987 14.356v2.603c1.132.67 3.62 1.137 6.506 1.137 2.888 0 5.375-.466 6.507-1.137v-2.603c-1.132.671-3.62 1.137-6.507 1.137-2.887 0-5.374-.466-6.506-1.137Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),VD=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m15.666 9.018 6.002 2.193c.2.073.332.263.332.476v6.867c0 .193-.11.37-.283.455l-6.002 2.94a.504.504 0 0 1-.443 0l-6.002-2.94a.507.507 0 0 1-.283-.455v-6.867c0-.213.133-.403.332-.476l6.002-2.193a.503.503 0 0 1 .345 0Zm4.77 3.528-4.993-1.922-4.993 1.922 4.993 2.024 4.994-2.024Zm.263 1.646-4.348 1.845v3.845L20.7 17.77v-3.579Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),WD=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M21.735 10.502c.352.204.354.744.004.951l-5.954 3.516a.474.474 0 0 1-.484.002l-6.05-3.516c-.354-.206-.352-.752.004-.954l6.05-3.453a.474.474 0 0 1 .476.002l5.954 3.452Z",fill:"currentColor"}),O.jsx("path",{d:"M20.253 13.146a.474.474 0 0 0-.483.002L15.785 15.5a.474.474 0 0 1-.484.002l-4.059-2.36a.474.474 0 0 0-.477-.001l-1.51.862c-.356.203-.358.748-.004.954l6.05 3.516c.151.088.333.087.484-.002l5.954-3.516c.35-.206.348-.747-.004-.95l-1.482-.86Z",fill:"currentColor"}),O.jsx("path",{d:"M20.253 16.606a.474.474 0 0 0-.483.002l-3.985 2.354a.474.474 0 0 1-.484.001l-4.059-2.359a.474.474 0 0 0-.477-.002l-1.51.862c-.356.203-.358.749-.004.955l6.05 3.516c.151.087.333.087.484-.002l5.954-3.516c.35-.207.348-.747-.004-.951l-1.482-.86ZM6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),UD=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m21.668 11.21-6.002-2.192a.503.503 0 0 0-.345 0L9.319 11.21a.506.506 0 0 0-.332.476v6.867c0 .193.11.37.283.455l6.002 2.94c.14.068.303.068.443 0l6.002-2.94a.507.507 0 0 0 .283-.455v-6.867a.506.506 0 0 0-.332-.476Zm-7.159-.271a.534.534 0 0 0-.244.052l-1.22.508c-.103.034-.154.112-.154.234v1.496c0 .122.051.182.154.182h.051l1.22-.247c.018-.008.03-.004.039.013.017.018.025.035.025.052v4.867h-1.326a.163.163 0 0 0-.163.163v1.626c0 .09.073.163.163.163h4.88c.09 0 .162-.073.162-.163V18.26a.163.163 0 0 0-.163-.163h-1.138v-6.962a.195.195 0 0 0-.052-.143.19.19 0 0 0-.14-.052h-2.094Z",fill:"currentColor"}),O.jsx("path",{d:"M6.294 8.386h-.87c-.23 0-.441-.07-.581-.25a.911.911 0 0 1-.17-.5c0-.18.06-.34.17-.48.14-.201.35-.281.59-.281h.871c0-.47 0-.981.02-1.552.03-.69.14-1.281.33-1.781.21-.511.541-.901.992-1.152.44-.25.91-.39 1.391-.39.58 0 1.091.18 1.552.53.48.37.7.921.7 1.592 0 .19-.05.39-.2.52-.12.11-.27.16-.43.16a.96.96 0 0 1-.51-.16.926.926 0 0 1-.341-.37v-.03c-.03-.1-.06-.18-.08-.26v-.04a.825.825 0 0 0-.06-.19c-.03-.07-.08-.12-.18-.16a.938.938 0 0 0-.37-.07c-.181 0-.381.05-.601.16a.84.84 0 0 0-.41.42c-.101.22-.251.49-.251.941v1.822h2.602c.27.04.43.11.581.27.1.15.17.32.17.5s-.06.341-.17.481c-.14.2-.35.28-.59.28H7.855v8.269c0 .73-.1 1.421-.2 2.072-.1.66-.26 1.221-.49 1.691-.241.51-.581.901-1.022 1.162-.42.27-.88.41-1.381.41-.66 0-1.251-.23-1.792-.68-.39-.341-.65-.751-.77-1.242-.13-.46-.201-.91-.201-1.351 0-.23.07-.44.26-.57.15-.111.31-.171.5-.171.191 0 .371.06.521.17.19.14.26.34.26.57 0 .251.03.521.1.832.06.29.18.48.331.61.27.22.53.32.79.32.201 0 .381-.06.561-.17.19-.11.34-.28.45-.52.16-.32.281-.781.361-1.382.08-.61.14-1.27.17-1.992V8.376l-.01.01Z",fill:"currentColor"})]}),od=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M7.907 11.533c-1.762 0-3.19-1.462-3.19-3.266S6.145 5 7.907 5s3.19 1.463 3.19 3.267c0 1.804-1.428 3.266-3.19 3.266ZM7.907 13.4c3.119 0 5.675 2.467 5.908 5.6H2c.233-3.133 2.789-5.6 5.907-5.6ZM12.903 8.267c0 1.804 1.428 3.266 3.19 3.266s3.19-1.462 3.19-3.266S17.855 5 16.093 5s-3.19 1.463-3.19 3.267ZM22 19c-.233-3.133-2.789-5.6-5.907-5.6-1.371 0-2.633.477-3.637 1.277A6.099 6.099 0 0 1 14.726 19H22Z",fill:"currentColor"})}),nH=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M13.912 15.708v.075h-3.738v-.075c0-1.122.837-2.031 1.869-2.031s1.869.91 1.869 2.03ZM12.669 18.044a.7.7 0 0 1-.332.6v.789h-.665v-.787a.7.7 0 0 1-.334-.602c0-.383.298-.694.665-.694.368 0 .666.31.666.694Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 20v2H4v-2a8 8 0 1 1 16 0Zm-5-4.217h-.466v-.075c0-1.496-1.115-2.708-2.491-2.708-1.376 0-2.492 1.212-2.492 2.708v.075H9V20.6c0 .22.172.4.383.4h5.234c.211 0 .383-.18.383-.4v-4.818Z",fill:"currentColor"}),O.jsx("path",{d:"M7.68 6.433c0 2.449 1.934 4.434 4.32 4.434s4.32-1.985 4.32-4.434C16.32 3.985 14.386 2 12 2S7.68 3.985 7.68 6.433Z",fill:"currentColor"})]}),tn=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 21c5.523 0 10-4.477 10-10S16.523 1 11 1 1 5.477 1 11s4.477 10 10 10Zm0-14a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm1 1.5a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h.5v4h-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5H12V8.5Z",fill:"currentColor"})}),gw=e=>O.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{d:"M13 17.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-8a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v8ZM12 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",fill:"currentColor"}),O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z",fill:"currentColor"})]}),GD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 2a1 1 0 0 0-1 1v1h10V3a1 1 0 0 0-1-1H8Zm9 3H7v1h10V5ZM7 8V7h10v1a1 1 0 0 1-1 1h-3.5v2H17a1 1 0 0 1 1 1v3h3a1 1 0 0 1 1 1v1h-9v-1a1 1 0 0 1 1-1h3v-2.5a.5.5 0 0 0-.5-.5h-9a.5.5 0 0 0-.5.5V15h3a1 1 0 0 1 1 1v1H2v-1a1 1 0 0 1 1-1h3v-3a1 1 0 0 1 1-1h4.5V9H8a1 1 0 0 1-1-1Zm15 10h-9v1h9v-1Zm-9 3v-1h9v1a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1ZM2 18h9v1H2v-1Zm0 2v1a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1v-1H2Z",fill:"currentColor"})}),KD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m19 10 1.965-1.964a3.536 3.536 0 0 0-5-5L14 5l5 5Zm-1 1-5-5L2.146 16.854a.5.5 0 0 0-.146.353V21.5a.5.5 0 0 0 .5.5h4.293a.5.5 0 0 0 .353-.146L18 11Z",fill:"currentColor"})}),Yi=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Zm1-5.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5V13H7.5a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H11V7.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5V11h3.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5H13v3.5Z",fill:"currentColor"})}),iH=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M11.83 20c4.492 0 8.134-3.582 8.134-8s-3.642-8-8.134-8a8.177 8.177 0 0 0-5.704 2.297l1.332.766a.494.494 0 0 1-.013.863L2.76 10.505a.5.5 0 0 1-.746-.429L2 4.796a.506.506 0 0 1 .758-.434l1.562.897A10.217 10.217 0 0 1 11.83 2c5.615 0 10.167 4.477 10.167 10S17.445 22 11.83 22A10.205 10.205 0 0 1 3.5 17.733c-.225-.315.012-.733.398-.733h1.346c.15 0 .292.068.39.182A8.172 8.172 0 0 0 11.83 20Z",fill:"currentColor"})}),oH=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M20.673 5.133c.136.24.053.55-.185.69l-16.25 9.623a.487.487 0 0 1-.676-.18l-.497-.884a.513.513 0 0 1 .185-.69L19.5 4.069c.238-.141.54-.06.676.18l.497.884ZM20.938 9.657c.136.24.053.55-.185.69L7.925 17.944a.487.487 0 0 1-.676-.181l-.497-.884a.513.513 0 0 1 .185-.69l12.829-7.597c.237-.14.54-.06.675.181l.497.884ZM20.16 15.376c.237-.14.32-.45.184-.69l-.497-.884a.487.487 0 0 0-.676-.18l-7.695 4.556a.513.513 0 0 0-.185.69l.498.884c.135.24.437.322.675.181l7.695-4.557Z",fill:"currentColor"})}),YD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M18.797 12.299a.524.524 0 0 0 0-.726l-2.349-2.487-.007.008L9.856 2.12a.58.58 0 0 0-.835 0L7.089 4.166a.524.524 0 0 0 0 .726l6.66 7.051-6.66 7.053a.524.524 0 0 0 0 .725l1.932 2.045a.58.58 0 0 0 .835 0l8.941-9.467Z",fill:"currentColor"})}),aH=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.076 2.203a.5.5 0 0 0-.354-.146H3.001a1 1 0 0 0-1 1v18a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V8.335a.5.5 0 0 0-.147-.354l-5.778-5.778ZM12 19.057a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm-8-14.5a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-4Z",fill:"currentColor"})}),XD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.774 15.7A7.513 7.513 0 0 1 4.2 4.2a7.511 7.511 0 0 1 10.623 0 7.515 7.515 0 0 1 .876 9.573l6.01 6.01a.995.995 0 0 1 0 1.407l-.52.519a.995.995 0 0 1-1.406 0l-6.009-6.01Zm-1.076-3a4.507 4.507 0 1 1-6.373-6.374 4.507 4.507 0 0 1 6.373 6.373Z",fill:"currentColor"})}),ZD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m21.49 5.418-9.224-3.371a.774.774 0 0 0-.532 0L2.51 5.417A.778.778 0 0 0 2 6.15v10.554c0 .298.169.57.435.7l9.224 4.518a.774.774 0 0 0 .681 0l9.224-4.518a.779.779 0 0 0 .436-.7V6.15a.778.778 0 0 0-.51-.731ZM10.487 5a.82.82 0 0 0-.375.08l-1.875.78c-.158.053-.237.173-.237.36v2.3c0 .187.079.28.237.28h.079l1.875-.38c.026-.013.046-.007.059.02.026.027.04.053.04.08V16H8.25a.25.25 0 0 0-.25.25v2.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-2.5a.25.25 0 0 0-.25-.25H14V5.3a.3.3 0 0 0-.079-.22.291.291 0 0 0-.217-.08h-3.217Z",fill:"currentColor"})}),JD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H3Zm5 2H4v3h4V6Zm-4 5h4v7H4v-7Zm10-5h-4v3h4V6Zm2 0h4v3h-4V6Zm4 5h-4v7h4v-7Z",fill:"currentColor"})}),Eu=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5Zm12 3H4v4h10V8Zm2 0h4v10h-4V8Zm-2 6H4v4h10v-4Z",fill:"currentColor"})}),QD=e=>O.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:O.jsx("path",{d:"M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1h6.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-19a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5H9V3ZM4 7h16l-.934 14.071a1 1 0 0 1-.997.929H5.93a1 1 0 0 1-.997-.929L4 7Z",fill:"currentColor"})}),sH=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},lH=(e,t)=>({classGroupId:e,validator:t}),ej=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ou="-",EO=[],cH="arbitrary..",uH=e=>{const t=fH(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return dH(i);const o=i.split(Ou),a=o[0]===""&&o.length>1?1:0;return tj(o,a,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const a=n[i],s=r[i];return a?s?sH(s,a):a:s||EO}return r[i]||EO}}},tj=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],i=r.nextPart.get(n);if(i){const c=tj(e,t+1,i);if(c)return c}const o=r.validators;if(o===null)return;const a=t===0?e.join(Ou):e.slice(t).join(Ou),s=o.length;for(let c=0;c<s;c++){const u=o[c];if(u.validator(a))return u.classGroupId}},dH=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?cH+n:void 0})(),fH=e=>{const{theme:t,classGroups:r}=e;return hH(r,t)},hH=(e,t)=>{const r=ej();for(const n in e){const i=e[n];Jw(i,r,n,t)}return r},Jw=(e,t,r,n)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];pH(a,t,r,n)}},pH=(e,t,r,n)=>{if(typeof e=="string"){vH(e,t,r);return}if(typeof e=="function"){gH(e,t,r,n);return}mH(e,t,r,n)},vH=(e,t,r)=>{const n=e===""?t:rj(t,e);n.classGroupId=r},gH=(e,t,r,n)=>{if(bH(e)){Jw(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(lH(r,e))},mH=(e,t,r,n)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[s,c]=i[a];Jw(c,rj(t,s),r,n)}},rj=(e,t)=>{let r=e;const n=t.split(Ou),i=n.length;for(let o=0;o<i;o++){const a=n[o];let s=r.nextPart.get(a);s||(s=ej(),r.nextPart.set(a,s)),r=s}return r},bH=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,yH=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(o,a)=>{r[o]=a,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=n[o])!==void 0)return i(o,a),a},set(o,a){o in r?r[o]=a:i(o,a)}}},mw="!",OO=":",xH=[],CO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),wH=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const o=[];let a=0,s=0,c=0,u;const d=i.length;for(let g=0;g<d;g++){const b=i[g];if(a===0&&s===0){if(b===OO){o.push(i.slice(c,g)),c=g+1;continue}if(b==="/"){u=g;continue}}b==="["?a++:b==="]"?a--:b==="("?s++:b===")"&&s--}const h=o.length===0?i:i.slice(c);let p=h,v=!1;h.endsWith(mw)?(p=h.slice(0,-1),v=!0):h.startsWith(mw)&&(p=h.slice(1),v=!0);const x=u&&u>c?u-c:void 0;return CO(o,v,p,x)};if(t){const i=t+OO,o=n;n=a=>a.startsWith(i)?o(a.slice(i.length)):CO(xH,!1,a,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},_H=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let o=0;o<r.length;o++){const a=r[o],s=a[0]==="[",c=t.has(a);s||c?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(a)):i.push(a)}return i.length>0&&(i.sort(),n.push(...i)),n}},SH=e=>({cache:yH(e.cacheSize),parseClassName:wH(e),sortModifiers:_H(e),...uH(e)}),EH=/\s+/,OH=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split(EH);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:h,modifiers:p,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:g}=r(d);if(h){c=d+(c.length>0?" "+c:c);continue}let b=!!g,w=n(b?x.substring(0,g):x);if(!w){if(!b){c=d+(c.length>0?" "+c:c);continue}if(w=n(x),!w){c=d+(c.length>0?" "+c:c);continue}b=!1}const y=p.length===0?"":p.length===1?p[0]:o(p).join(":"),_=v?y+mw:y,E=_+w;if(a.indexOf(E)>-1)continue;a.push(E);const S=i(w,b);for(let I=0;I<S.length;++I){const N=S[I];a.push(_+N)}c=d+(c.length>0?" "+c:c)}return c},CH=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=nj(r))&&(i&&(i+=" "),i+=n);return i},nj=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=nj(e[n]))&&(r&&(r+=" "),r+=t);return r},IO=(e,...t)=>{let r,n,i,o;const a=c=>{const u=t.reduce((d,h)=>h(d),e());return r=SH(u),n=r.cache.get,i=r.cache.set,o=s,s(c)},s=c=>{const u=n(c);if(u)return u;const d=OH(c,r);return i(c,d),d};return o=a,(...c)=>o(CH(...c))},IH=[],Xt=e=>{const t=r=>r[e]||IH;return t.isThemeGetter=!0,t},ij=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RH=/^\d+\/\d+$/,NH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TH=/\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$/,PH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,MH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ea=e=>RH.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),Li=e=>!!e&&Number.isInteger(Number(e)),_h=e=>e.endsWith("%")&&We(e.slice(0,-1)),mi=e=>NH.test(e),AH=()=>!0,DH=e=>TH.test(e)&&!PH.test(e),aj=()=>!1,jH=e=>kH.test(e),qH=e=>MH.test(e),LH=e=>!Ie(e)&&!Re(e),zH=e=>Ta(e,cj,aj),Ie=e=>ij.test(e),po=e=>Ta(e,uj,DH),Sh=e=>Ta(e,VH,We),RO=e=>Ta(e,sj,aj),BH=e=>Ta(e,lj,qH),Oc=e=>Ta(e,dj,jH),Re=e=>oj.test(e),fs=e=>Pa(e,uj),FH=e=>Pa(e,WH),NO=e=>Pa(e,sj),$H=e=>Pa(e,cj),HH=e=>Pa(e,lj),Cc=e=>Pa(e,dj,!0),Ta=(e,t,r)=>{const n=ij.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Pa=(e,t,r=!1)=>{const n=oj.exec(e);return n?n[1]?t(n[1]):r:!1},sj=e=>e==="position"||e==="percentage",lj=e=>e==="image"||e==="url",cj=e=>e==="length"||e==="size"||e==="bg-size",uj=e=>e==="length",VH=e=>e==="number",WH=e=>e==="family-name",dj=e=>e==="shadow",TO=()=>{const e=Xt("color"),t=Xt("font"),r=Xt("text"),n=Xt("font-weight"),i=Xt("tracking"),o=Xt("leading"),a=Xt("breakpoint"),s=Xt("container"),c=Xt("spacing"),u=Xt("radius"),d=Xt("shadow"),h=Xt("inset-shadow"),p=Xt("text-shadow"),v=Xt("drop-shadow"),x=Xt("blur"),g=Xt("perspective"),b=Xt("aspect"),w=Xt("ease"),y=Xt("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...E(),Re,Ie],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Re,Ie,c],k=()=>[ea,"full","auto",...T()],z=()=>[Li,"none","subgrid",Re,Ie],L=()=>["auto",{span:["full",Li,Re,Ie]},Li,Re,Ie],K=()=>[Li,"auto",Re,Ie],G=()=>["auto","min","max","fr",Re,Ie],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...T()],X=()=>[ea,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],U=()=>[e,Re,Ie],re=()=>[...E(),NO,RO,{position:[Re,Ie]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",$H,zH,{size:[Re,Ie]}],Z=()=>[_h,fs,po],J=()=>["","none","full",u,Re,Ie],M=()=>["",We,fs,po],H=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>[We,_h,NO,RO],V=()=>["","none",x,Re,Ie],Q=()=>["none",We,Re,Ie],ne=()=>["none",We,Re,Ie],ce=()=>[We,Re,Ie],ee=()=>[ea,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mi],breakpoint:[mi],color:[AH],container:[mi],"drop-shadow":[mi],ease:["in","out","in-out"],font:[LH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mi],shadow:[mi],spacing:["px",We],text:[mi],"text-shadow":[mi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ea,Ie,Re,b]}],container:["container"],columns:[{columns:[We,Ie,Re,s]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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"],sr:["sr-only","not-sr-only"],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:S()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Li,"auto",Re,Ie]}],basis:[{basis:[ea,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,ea,"auto","initial","none",Ie]}],grow:[{grow:["",We,Re,Ie]}],shrink:[{shrink:["",We,Re,Ie]}],order:[{order:[Li,"first","last","none",Re,Ie]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[s,"screen",...X()]}],"min-w":[{"min-w":[s,"screen","none",...X()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,fs,po]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Re,Sh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_h,Ie]}],"font-family":[{font:[FH,Ie,t]}],"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-fractions"],tracking:[{tracking:[i,Re,Ie]}],"line-clamp":[{"line-clamp":[We,"none",Re,Sh]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Re,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Re,po]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[We,"auto",Re,Ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Re,Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Li,Re,Ie],radial:["",Re,Ie],conic:[Li,Re,Ie]},HH,BH]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:M()}],"border-w-x":[{"border-x":M()}],"border-w-y":[{"border-y":M()}],"border-w-s":[{"border-s":M()}],"border-w-e":[{"border-e":M()}],"border-w-t":[{"border-t":M()}],"border-w-r":[{"border-r":M()}],"border-w-b":[{"border-b":M()}],"border-w-l":[{"border-l":M()}],"divide-x":[{"divide-x":M()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":M()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Re,Ie]}],"outline-w":[{outline:["",We,fs,po]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",d,Cc,Oc]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",h,Cc,Oc]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[We,po]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":M()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",p,Cc,Oc]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[We,Re,Ie]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[Re,Ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ie]}],filter:[{filter:["","none",Re,Ie]}],blur:[{blur:V()}],brightness:[{brightness:[We,Re,Ie]}],contrast:[{contrast:[We,Re,Ie]}],"drop-shadow":[{"drop-shadow":["","none",v,Cc,Oc]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",We,Re,Ie]}],"hue-rotate":[{"hue-rotate":[We,Re,Ie]}],invert:[{invert:["",We,Re,Ie]}],saturate:[{saturate:[We,Re,Ie]}],sepia:[{sepia:["",We,Re,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ie]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[We,Re,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[We,Re,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Re,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Re,Ie]}],"backdrop-invert":[{"backdrop-invert":["",We,Re,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[We,Re,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[We,Re,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Re,Ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Re,Ie]}],ease:[{ease:["linear","initial",w,Re,Ie]}],delay:[{delay:[We,Re,Ie]}],animate:[{animate:["none",y,Re,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,Re,Ie]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Re,Ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ee()}],"translate-x":[{"translate-x":ee()}],"translate-y":[{"translate-y":ee()}],"translate-z":[{"translate-z":ee()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Re,Ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",Re,Ie]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[We,fs,po,Sh]}],stroke:[{stroke:["none",...U()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},UH=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:i={},override:o={}})=>(js(e,"cacheSize",t),js(e,"prefix",r),js(e,"experimentalParseClassName",n),Ic(e.theme,o.theme),Ic(e.classGroups,o.classGroups),Ic(e.conflictingClassGroups,o.conflictingClassGroups),Ic(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),js(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Rc(e.theme,i.theme),Rc(e.classGroups,i.classGroups),Rc(e.conflictingClassGroups,i.conflictingClassGroups),Rc(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),fj(e,i,"orderSensitiveModifiers"),e),js=(e,t,r)=>{r!==void 0&&(e[t]=r)},Ic=(e,t)=>{if(t)for(const r in t)js(e,r,t[r])},Rc=(e,t)=>{if(t)for(const r in t)fj(e,t,r)},fj=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},GH=(e,...t)=>typeof e=="function"?IO(TO,e,...t):IO(()=>UH(TO(),e),...t);function hj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var PO={exports:{}};/*!
2
3
  Copyright (c) 2018 Jed Watson.
3
4
  Licensed under the MIT License (MIT), see
4
5
  http://jedwatson.github.io/classnames
5
- */var z1;function Qz(){return z1||(z1=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var u=arguments[a];u&&(o=i(o,n(u)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var u in o)t.call(o,u)&&o[u]&&(a=i(a,u));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Gf)),Gf.exports}var eH=Qz();const We=Un(eH);function tH({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return C.jsx(C.Fragment,{children:C.jsx("nav",{className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b border-grey-900 bg-grey-800 px-4 py-3",children:C.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:C.jsxs("div",{className:"relative flex w-full justify-between",children:[C.jsx("span",{className:"inline-block whitespace-nowrap text-sm leading-relaxed text-white",children:C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx("button",{"data-cy":"roles_btn_navbar",className:We(" min-w-[110px] rounded-l px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="roles"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("roles"),children:"Roles"}),C.jsx("button",{"data-cy":"privileges_btn_navbar",className:We(" min-w-[110px] rounded-r px-4 py-2 text-xs text-white outline-none transition-all duration-150 ease-linear focus:bg-primary-dark focus:text-white focus:outline-none",t==="privileges"?"bg-primary-dark font-bold":"bg-grey-300 hover:bg-primary-hover hover:text-white"),type:"button",onClick:()=>n("privileges"),children:"Privileges"})]})}),C.jsxs("div",{className:"flex gap-2 justify-between",children:[C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(Te.ControlledSwitch,{size:"sm",value:i||!1,onChange:u=>{o(u)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Restrict Access By Default"}),C.jsx(Te.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&C.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[C.jsx(Te.ControlledSwitch,{size:"sm",value:r||!1,onChange:u=>{a(u)}}),C.jsx("span",{className:"px-1 text-xs text-white",children:"Force login"}),C.jsx(Te.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const pD=T.createContext(void 0),rH=({children:e})=>{const[t,r]=T.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return C.jsx(pD.Provider,{value:i,children:e})};function Qb(){const e=T.useContext(pD);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var H1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},U1=typeof window<"u"&&window.document&&window.document.createElement?ve.useLayoutEffect:ve.useEffect,Gt="top",Sr="bottom",Or="right",Kt="left",ex="auto",Ha=[Gt,Sr,Or,Kt],po="start",Da="end",nH="clippingParents",vD="viewport",ta="popper",iH="reference",V1=Ha.reduce(function(e,t){return e.concat([t+"-"+po,t+"-"+Da])},[]),gD=[].concat(Ha,[ex]).reduce(function(e,t){return e.concat([t,t+"-"+po,t+"-"+Da])},[]),oH="beforeRead",aH="read",sH="afterRead",uH="beforeMain",cH="main",lH="afterMain",fH="beforeWrite",dH="write",hH="afterWrite",pH=[oH,aH,sH,uH,cH,lH,fH,dH,hH];function nn(e){return e?(e.nodeName||"").toLowerCase():null}function ur(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function mi(e){var t=ur(e).Element;return e instanceof t||e instanceof Element}function Er(e){var t=ur(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function tx(e){if(typeof ShadowRoot>"u")return!1;var t=ur(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function vH(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Er(o)||!nn(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var u=i[a];u===!1?o.removeAttribute(a):o.setAttribute(a,u===!0?"":u)}))})}function gH(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),u=a.reduce(function(l,d){return l[d]="",l},{});!Er(i)||!nn(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const mH={name:"applyStyles",enabled:!0,phase:"write",fn:vH,effect:gH,requires:["computeStyles"]};function en(e){return e.split("-")[0]}var fi=Math.max,qu=Math.min,vo=Math.round;function Cb(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function mD(){return!/^((?!chrome|android).)*safari/i.test(Cb())}function go(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Er(e)&&(i=e.offsetWidth>0&&vo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&vo(n.height)/e.offsetHeight||1);var a=mi(e)?ur(e):window,u=a.visualViewport,l=!mD()&&r,d=(n.left+(l&&u?u.offsetLeft:0))/i,f=(n.top+(l&&u?u.offsetTop:0))/o,h=n.width/i,p=n.height/o;return{width:h,height:p,top:f,right:d+h,bottom:f+p,left:d,x:d,y:f}}function rx(e){var t=go(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function yD(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&tx(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function bn(e){return ur(e).getComputedStyle(e)}function yH(e){return["table","td","th"].indexOf(nn(e))>=0}function Vn(e){return((mi(e)?e.ownerDocument:e.document)||window.document).documentElement}function hc(e){return nn(e)==="html"?e:e.assignedSlot||e.parentNode||(tx(e)?e.host:null)||Vn(e)}function W1(e){return!Er(e)||bn(e).position==="fixed"?null:e.offsetParent}function bH(e){var t=/firefox/i.test(Cb()),r=/Trident/i.test(Cb());if(r&&Er(e)){var n=bn(e);if(n.position==="fixed")return null}var i=hc(e);for(tx(i)&&(i=i.host);Er(i)&&["html","body"].indexOf(nn(i))<0;){var o=bn(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Ua(e){for(var t=ur(e),r=W1(e);r&&yH(r)&&bn(r).position==="static";)r=W1(r);return r&&(nn(r)==="html"||nn(r)==="body"&&bn(r).position==="static")?t:r||bH(e)||t}function nx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Pa(e,t,r){return fi(e,qu(t,r))}function xH(e,t,r){var n=Pa(e,t,r);return n>r?r:n}function bD(){return{top:0,right:0,bottom:0,left:0}}function xD(e){return Object.assign({},bD(),e)}function wD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var wH=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,xD(typeof t!="number"?t:wD(t,Ha))};function _H(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,u=en(r.placement),l=nx(u),d=[Kt,Or].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=wH(i.padding,r),p=rx(o),v=l==="y"?Gt:Kt,m=l==="y"?Sr:Or,y=r.rects.reference[f]+r.rects.reference[l]-a[l]-r.rects.popper[f],x=a[l]-r.rects.reference[l],b=Ua(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,E=y/2-x/2,_=h[v],S=w-p[f]-h[m],R=w/2-p[f]/2+E,I=Pa(_,R,S),N=l;r.modifiersData[n]=(t={},t[N]=I,t.centerOffset=I-R,t)}}function EH(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||yD(t.elements.popper,i)&&(t.elements.arrow=i))}const SH={name:"arrow",enabled:!0,phase:"main",fn:_H,effect:EH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function mo(e){return e.split("-")[1]}var OH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function CH(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:vo(r*i)/i||0,y:vo(n*i)/i||0}}function G1(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,u=e.position,l=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=a.x,v=p===void 0?0:p,m=a.y,y=m===void 0?0:m,x=typeof f=="function"?f({x:v,y}):{x:v,y};v=x.x,y=x.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),E=Kt,_=Gt,S=window;if(d){var R=Ua(r),I="clientHeight",N="clientWidth";if(R===ur(r)&&(R=Vn(r),bn(R).position!=="static"&&u==="absolute"&&(I="scrollHeight",N="scrollWidth")),R=R,i===Gt||(i===Kt||i===Or)&&o===Da){_=Sr;var A=h&&R===S&&S.visualViewport?S.visualViewport.height:R[I];y-=A-n.height,y*=l?1:-1}if(i===Kt||(i===Gt||i===Sr)&&o===Da){E=Or;var L=h&&R===S&&S.visualViewport?S.visualViewport.width:R[N];v-=L-n.width,v*=l?1:-1}}var B=Object.assign({position:u},d&&OH),U=f===!0?CH({x:v,y},ur(r)):{x:v,y};if(v=U.x,y=U.y,l){var j;return Object.assign({},B,(j={},j[_]=w?"0":"",j[E]=b?"0":"",j.transform=(S.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",j))}return Object.assign({},B,(t={},t[_]=w?y+"px":"",t[E]=b?v+"px":"",t.transform="",t))}function RH(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,u=r.roundOffsets,l=u===void 0?!0:u,d={placement:en(t.placement),variation:mo(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,G1(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,G1(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const IH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:RH,data:{}};var tu={passive:!0};function PH(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,u=a===void 0?!0:a,l=ur(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,tu)}),u&&l.addEventListener("resize",r.update,tu),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,tu)}),u&&l.removeEventListener("resize",r.update,tu)}}const NH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:PH,data:{}};var TH={left:"right",right:"left",bottom:"top",top:"bottom"};function Cu(e){return e.replace(/left|right|bottom|top/g,function(t){return TH[t]})}var AH={start:"end",end:"start"};function K1(e){return e.replace(/start|end/g,function(t){return AH[t]})}function ix(e){var t=ur(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function ox(e){return go(Vn(e)).left+ix(e).scrollLeft}function MH(e,t){var r=ur(e),n=Vn(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;var d=mD();(d||!d&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u+ox(e),y:l}}function DH(e){var t,r=Vn(e),n=ix(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=fi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=fi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+ox(e),l=-n.scrollTop;return bn(i||r).direction==="rtl"&&(u+=fi(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:l}}function ax(e){var t=bn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function _D(e){return["html","body","#document"].indexOf(nn(e))>=0?e.ownerDocument.body:Er(e)&&ax(e)?e:_D(hc(e))}function Na(e,t){var r;t===void 0&&(t=[]);var n=_D(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=ur(n),a=i?[o].concat(o.visualViewport||[],ax(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(Na(hc(a)))}function Rb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jH(e,t){var r=go(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Y1(e,t,r){return t===vD?Rb(MH(e,r)):mi(t)?jH(t,r):Rb(DH(Vn(e)))}function qH(e){var t=Na(hc(e)),r=["absolute","fixed"].indexOf(bn(e).position)>=0,n=r&&Er(e)?Ua(e):e;return mi(n)?t.filter(function(i){return mi(i)&&yD(i,n)&&nn(i)!=="body"}):[]}function kH(e,t,r,n){var i=t==="clippingParents"?qH(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(l,d){var f=Y1(e,d,n);return l.top=fi(f.top,l.top),l.right=qu(f.right,l.right),l.bottom=qu(f.bottom,l.bottom),l.left=fi(f.left,l.left),l},Y1(e,a,n));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function ED(e){var t=e.reference,r=e.element,n=e.placement,i=n?en(n):null,o=n?mo(n):null,a=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,l;switch(i){case Gt:l={x:a,y:t.y-r.height};break;case Sr:l={x:a,y:t.y+t.height};break;case Or:l={x:t.x+t.width,y:u};break;case Kt:l={x:t.x-r.width,y:u};break;default:l={x:t.x,y:t.y}}var d=i?nx(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case po:l[d]=l[d]-(t[f]/2-r[f]/2);break;case Da:l[d]=l[d]+(t[f]/2-r[f]/2);break}}return l}function ja(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,u=r.boundary,l=u===void 0?nH:u,d=r.rootBoundary,f=d===void 0?vD:d,h=r.elementContext,p=h===void 0?ta:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,x=y===void 0?0:y,b=xD(typeof x!="number"?x:wD(x,Ha)),w=p===ta?iH:ta,E=e.rects.popper,_=e.elements[m?w:p],S=kH(mi(_)?_:_.contextElement||Vn(e.elements.popper),l,f,a),R=go(e.elements.reference),I=ED({reference:R,element:E,placement:i}),N=Rb(Object.assign({},E,I)),A=p===ta?N:R,L={top:S.top-A.top+b.top,bottom:A.bottom-S.bottom+b.bottom,left:S.left-A.left+b.left,right:A.right-S.right+b.right},B=e.modifiersData.offset;if(p===ta&&B){var U=B[i];Object.keys(L).forEach(function(j){var D=[Or,Sr].indexOf(j)>=0?1:-1,G=[Gt,Sr].indexOf(j)>=0?"y":"x";L[j]+=U[G]*D})}return L}function LH(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,u=r.flipVariations,l=r.allowedAutoPlacements,d=l===void 0?gD:l,f=mo(n),h=f?u?V1:V1.filter(function(m){return mo(m)===f}):Ha,p=h.filter(function(m){return d.indexOf(m)>=0});p.length===0&&(p=h);var v=p.reduce(function(m,y){return m[y]=ja(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[en(y)],m},{});return Object.keys(v).sort(function(m,y){return v[m]-v[y]})}function BH(e){if(en(e)===ex)return[];var t=Cu(e);return[K1(e),t,K1(t)]}function FH(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!0:a,l=r.fallbackPlacements,d=r.padding,f=r.boundary,h=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,m=v===void 0?!0:v,y=r.allowedAutoPlacements,x=t.options.placement,b=en(x),w=b===x,E=l||(w||!m?[Cu(x)]:BH(x)),_=[x].concat(E).reduce(function(H,K){return H.concat(en(K)===ex?LH(t,{placement:K,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):K)},[]),S=t.rects.reference,R=t.rects.popper,I=new Map,N=!0,A=_[0],L=0;L<_.length;L++){var B=_[L],U=en(B),j=mo(B)===po,D=[Gt,Sr].indexOf(U)>=0,G=D?"width":"height",F=ja(t,{placement:B,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),X=D?j?Or:Kt:j?Sr:Gt;S[G]>R[G]&&(X=Cu(X));var Z=Cu(X),Q=[];if(o&&Q.push(F[U]<=0),u&&Q.push(F[X]<=0,F[Z]<=0),Q.every(function(H){return H})){A=B,N=!1;break}I.set(B,Q)}if(N)for(var W=m?3:1,ee=function(K){var $=_.find(function(k){var z=I.get(k);if(z)return z.slice(0,K).every(function(re){return re})});if($)return A=$,"break"},oe=W;oe>0;oe--){var ae=ee(oe);if(ae==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const $H={name:"flip",enabled:!0,phase:"main",fn:FH,requiresIfExists:["offset"],data:{_skip:!1}};function X1(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Z1(e){return[Gt,Or,Sr,Kt].some(function(t){return e[t]>=0})}function zH(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ja(t,{elementContext:"reference"}),u=ja(t,{altBoundary:!0}),l=X1(a,n),d=X1(u,i,o),f=Z1(l),h=Z1(d);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const HH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:zH};function UH(e,t,r){var n=en(e),i=[Kt,Gt].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],u=o[1];return a=a||0,u=(u||0)*i,[Kt,Or].indexOf(n)>=0?{x:u,y:a}:{x:a,y:u}}function VH(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=gD.reduce(function(f,h){return f[h]=UH(h,t.rects,o),f},{}),u=a[t.placement],l=u.x,d=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[n]=a}const WH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:VH};function GH(e){var t=e.state,r=e.name;t.modifiersData[r]=ED({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const KH={name:"popperOffsets",enabled:!0,phase:"read",fn:GH,data:{}};function YH(e){return e==="x"?"y":"x"}function XH(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,u=a===void 0?!1:a,l=r.boundary,d=r.rootBoundary,f=r.altBoundary,h=r.padding,p=r.tether,v=p===void 0?!0:p,m=r.tetherOffset,y=m===void 0?0:m,x=ja(t,{boundary:l,rootBoundary:d,padding:h,altBoundary:f}),b=en(t.placement),w=mo(t.placement),E=!w,_=nx(b),S=YH(_),R=t.modifiersData.popperOffsets,I=t.rects.reference,N=t.rects.popper,A=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,L=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(R){if(o){var j,D=_==="y"?Gt:Kt,G=_==="y"?Sr:Or,F=_==="y"?"height":"width",X=R[_],Z=X+x[D],Q=X-x[G],W=v?-N[F]/2:0,ee=w===po?I[F]:N[F],oe=w===po?-N[F]:-I[F],ae=t.elements.arrow,H=v&&ae?rx(ae):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:bD(),$=K[D],k=K[G],z=Pa(0,I[F],H[F]),re=E?I[F]/2-W-z-$-L.mainAxis:ee-z-$-L.mainAxis,ie=E?-I[F]/2+W+z+k+L.mainAxis:oe+z+k+L.mainAxis,se=t.elements.arrow&&Ua(t.elements.arrow),ce=se?_==="y"?se.clientTop||0:se.clientLeft||0:0,be=(j=B==null?void 0:B[_])!=null?j:0,Ce=X+re-be-ce,_e=X+ie-be,he=Pa(v?qu(Z,Ce):Z,X,v?fi(Q,_e):Q);R[_]=he,U[_]=he-X}if(u){var fe,Ee=_==="x"?Gt:Kt,Pe=_==="x"?Sr:Or,Ze=R[S],ze=S==="y"?"height":"width",Fe=Ze+x[Ee],Ue=Ze-x[Pe],ct=[Gt,Kt].indexOf(b)!==-1,lt=(fe=B==null?void 0:B[S])!=null?fe:0,mt=ct?Fe:Ze-I[ze]-N[ze]-lt+L.altAxis,yt=ct?Ze+I[ze]+N[ze]-lt-L.altAxis:Ue,rt=v&&ct?xH(mt,Ze,yt):Pa(v?mt:Fe,Ze,v?yt:Ue);R[S]=rt,U[S]=rt-Ze}t.modifiersData[n]=U}}const ZH={name:"preventOverflow",enabled:!0,phase:"main",fn:XH,requiresIfExists:["offset"]};function JH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function QH(e){return e===ur(e)||!Er(e)?ix(e):JH(e)}function e4(e){var t=e.getBoundingClientRect(),r=vo(t.width)/e.offsetWidth||1,n=vo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function t4(e,t,r){r===void 0&&(r=!1);var n=Er(t),i=Er(t)&&e4(t),o=Vn(t),a=go(e,i,r),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((nn(t)!=="body"||ax(o))&&(u=QH(t)),Er(t)?(l=go(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=ox(o))),{x:a.left+u.scrollLeft-l.x,y:a.top+u.scrollTop-l.y,width:a.width,height:a.height}}function r4(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(u){if(!r.has(u)){var l=t.get(u);l&&i(l)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function n4(e){var t=r4(e);return pH.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function i4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function o4(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var J1={placement:"bottom",modifiers:[],strategy:"absolute"};function Q1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function a4(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?J1:i;return function(u,l,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},J1,o),modifiersData:{},elements:{reference:u,popper:l},attributes:{},styles:{}},h=[],p=!1,v={state:f,setOptions:function(b){var w=typeof b=="function"?b(f.options):b;y(),f.options=Object.assign({},o,f.options,w),f.scrollParents={reference:mi(u)?Na(u):u.contextElement?Na(u.contextElement):[],popper:Na(l)};var E=n4(o4([].concat(n,f.options.modifiers)));return f.orderedModifiers=E.filter(function(_){return _.enabled}),m(),v.update()},forceUpdate:function(){if(!p){var b=f.elements,w=b.reference,E=b.popper;if(Q1(w,E)){f.rects={reference:t4(w,Ua(E),f.options.strategy==="fixed"),popper:rx(E)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(L){return f.modifiersData[L.name]=Object.assign({},L.data)});for(var _=0;_<f.orderedModifiers.length;_++){if(f.reset===!0){f.reset=!1,_=-1;continue}var S=f.orderedModifiers[_],R=S.fn,I=S.options,N=I===void 0?{}:I,A=S.name;typeof R=="function"&&(f=R({state:f,options:N,name:A,instance:v})||f)}}}},update:i4(function(){return new Promise(function(x){v.forceUpdate(),x(f)})}),destroy:function(){y(),p=!0}};if(!Q1(u,l))return v;v.setOptions(d).then(function(x){!p&&d.onFirstUpdate&&d.onFirstUpdate(x)});function m(){f.orderedModifiers.forEach(function(x){var b=x.name,w=x.options,E=w===void 0?{}:w,_=x.effect;if(typeof _=="function"){var S=_({state:f,name:b,instance:v,options:E}),R=function(){};h.push(S||R)}})}function y(){h.forEach(function(x){return x()}),h=[]}return v}}var s4=[NH,KH,IH,mH,WH,$H,ZH,SH,HH],u4=a4({defaultModifiers:s4}),Kf,eE;function c4(){if(eE)return Kf;eE=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var u,l,d;if(Array.isArray(o)){if(u=o.length,u!=a.length)return!1;for(l=u;l--!==0;)if(!i(o[l],a[l]))return!1;return!0}var f;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(f=o.entries();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;for(f=o.entries();!(l=f.next()).done;)if(!i(l.value[1],a.get(l.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(f=o.entries();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(u=o.length,u!=a.length)return!1;for(l=u;l--!==0;)if(o[l]!==a[l])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if(d=Object.keys(o),u=d.length,u!==Object.keys(a).length)return!1;for(l=u;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,d[l]))return!1;if(e&&o instanceof Element)return!1;for(l=u;l--!==0;)if(!((d[l]==="_owner"||d[l]==="__v"||d[l]==="__o")&&o.$$typeof)&&!i(o[d[l]],a[d[l]]))return!1;return!0}return o!==o&&a!==a}return Kf=function(a,u){try{return i(a,u)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},Kf}var l4=c4();const f4=Un(l4);var d4=[],pc=function(t,r,n){n===void 0&&(n={});var i=ve.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||d4},a=ve.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],l=a[1],d=ve.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var m=v.state,y=Object.keys(m.elements);Jb.flushSync(function(){l({styles:H1(y.map(function(x){return[x,m.styles[x]||{}]})),attributes:H1(y.map(function(x){return[x,m.attributes[x]]}))})})},requires:["computeStyles"]}},[]),f=ve.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[d,{name:"applyStyles",enabled:!1}])};return f4(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=ve.useRef();return U1(function(){h.current&&h.current.setOptions(f)},[f]),U1(function(){if(!(t==null||r==null)){var p=n.createPopper||u4,v=p(t,r,f);return h.current=v,function(){v.destroy(),h.current=null}}},[t,r,n.createPopper]),{state:h.current?h.current.state:null,styles:u.styles,attributes:u.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};const SD=({tab:e})=>C.jsx("div",{className:"flex flex-1 items-center justify-center border-l-[0.5px] border-grey-900 bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),C.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function sx(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Yf,tE;function h4(){if(tE)return Yf;tE=1;function e(){this.__data__=[],this.size=0}return Yf=e,Yf}var Xf,rE;function _o(){if(rE)return Xf;rE=1;function e(t,r){return t===r||t!==t&&r!==r}return Xf=e,Xf}var Zf,nE;function vc(){if(nE)return Zf;nE=1;var e=_o();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Zf=t,Zf}var Jf,iE;function p4(){if(iE)return Jf;iE=1;var e=vc(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var u=o.length-1;return a==u?o.pop():r.call(o,a,1),--this.size,!0}return Jf=n,Jf}var Qf,oE;function v4(){if(oE)return Qf;oE=1;var e=vc();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Qf=t,Qf}var ed,aE;function g4(){if(aE)return ed;aE=1;var e=vc();function t(r){return e(this.__data__,r)>-1}return ed=t,ed}var td,sE;function m4(){if(sE)return td;sE=1;var e=vc();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return td=t,td}var rd,uE;function gc(){if(uE)return rd;uE=1;var e=h4(),t=p4(),r=v4(),n=g4(),i=m4();function o(a){var u=-1,l=a==null?0:a.length;for(this.clear();++u<l;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,rd=o,rd}var nd,cE;function y4(){if(cE)return nd;cE=1;var e=gc();function t(){this.__data__=new e,this.size=0}return nd=t,nd}var id,lE;function b4(){if(lE)return id;lE=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return id=e,id}var od,fE;function x4(){if(fE)return od;fE=1;function e(t){return this.__data__.get(t)}return od=e,od}var ad,dE;function w4(){if(dE)return ad;dE=1;function e(t){return this.__data__.has(t)}return ad=e,ad}var sd,hE;function OD(){if(hE)return sd;hE=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return sd=e,sd}var ud,pE;function Hr(){if(pE)return ud;pE=1;var e=OD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ud=r,ud}var cd,vE;function Eo(){if(vE)return cd;vE=1;var e=Hr(),t=e.Symbol;return cd=t,cd}var ld,gE;function _4(){if(gE)return ld;gE=1;var e=Eo(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var u=r.call(a,i),l=a[i];try{a[i]=void 0;var d=!0}catch{}var f=n.call(a);return d&&(u?a[i]=l:delete a[i]),f}return ld=o,ld}var fd,mE;function E4(){if(mE)return fd;mE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return fd=r,fd}var dd,yE;function Ei(){if(yE)return dd;yE=1;var e=Eo(),t=_4(),r=E4(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(u){return u==null?u===void 0?i:n:o&&o in Object(u)?t(u):r(u)}return dd=a,dd}var hd,bE;function Cr(){if(bE)return hd;bE=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return hd=e,hd}var pd,xE;function Va(){if(xE)return pd;xE=1;var e=Ei(),t=Cr(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(u){if(!t(u))return!1;var l=e(u);return l==n||l==i||l==r||l==o}return pd=a,pd}var vd,wE;function S4(){if(wE)return vd;wE=1;var e=Hr(),t=e["__core-js_shared__"];return vd=t,vd}var gd,_E;function O4(){if(_E)return gd;_E=1;var e=S4(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return gd=r,gd}var md,EE;function CD(){if(EE)return md;EE=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return md=r,md}var yd,SE;function C4(){if(SE)return yd;SE=1;var e=Va(),t=O4(),r=Cr(),n=CD(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,u=Object.prototype,l=a.toString,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(p){if(!r(p)||t(p))return!1;var v=e(p)?f:o;return v.test(n(p))}return yd=h,yd}var bd,OE;function R4(){if(OE)return bd;OE=1;function e(t,r){return t==null?void 0:t[r]}return bd=e,bd}var xd,CE;function Si(){if(CE)return xd;CE=1;var e=C4(),t=R4();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return xd=r,xd}var wd,RE;function ux(){if(RE)return wd;RE=1;var e=Si(),t=Hr(),r=e(t,"Map");return wd=r,wd}var _d,IE;function mc(){if(IE)return _d;IE=1;var e=Si(),t=e(Object,"create");return _d=t,_d}var Ed,PE;function I4(){if(PE)return Ed;PE=1;var e=mc();function t(){this.__data__=e?e(null):{},this.size=0}return Ed=t,Ed}var Sd,NE;function P4(){if(NE)return Sd;NE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Sd=e,Sd}var Od,TE;function N4(){if(TE)return Od;TE=1;var e=mc(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var a=this.__data__;if(e){var u=a[o];return u===t?void 0:u}return n.call(a,o)?a[o]:void 0}return Od=i,Od}var Cd,AE;function T4(){if(AE)return Cd;AE=1;var e=mc(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Cd=n,Cd}var Rd,ME;function A4(){if(ME)return Rd;ME=1;var e=mc(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return Rd=r,Rd}var Id,DE;function M4(){if(DE)return Id;DE=1;var e=I4(),t=P4(),r=N4(),n=T4(),i=A4();function o(a){var u=-1,l=a==null?0:a.length;for(this.clear();++u<l;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Id=o,Id}var Pd,jE;function D4(){if(jE)return Pd;jE=1;var e=M4(),t=gc(),r=ux();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Pd=n,Pd}var Nd,qE;function j4(){if(qE)return Nd;qE=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Nd=e,Nd}var Td,kE;function yc(){if(kE)return Td;kE=1;var e=j4();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Td=t,Td}var Ad,LE;function q4(){if(LE)return Ad;LE=1;var e=yc();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Ad=t,Ad}var Md,BE;function k4(){if(BE)return Md;BE=1;var e=yc();function t(r){return e(this,r).get(r)}return Md=t,Md}var Dd,FE;function L4(){if(FE)return Dd;FE=1;var e=yc();function t(r){return e(this,r).has(r)}return Dd=t,Dd}var jd,$E;function B4(){if($E)return jd;$E=1;var e=yc();function t(r,n){var i=e(this,r),o=i.size;return i.set(r,n),this.size+=i.size==o?0:1,this}return jd=t,jd}var qd,zE;function cx(){if(zE)return qd;zE=1;var e=D4(),t=q4(),r=k4(),n=L4(),i=B4();function o(a){var u=-1,l=a==null?0:a.length;for(this.clear();++u<l;){var d=a[u];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,qd=o,qd}var kd,HE;function F4(){if(HE)return kd;HE=1;var e=gc(),t=ux(),r=cx(),n=200;function i(o,a){var u=this.__data__;if(u instanceof e){var l=u.__data__;if(!t||l.length<n-1)return l.push([o,a]),this.size=++u.size,this;u=this.__data__=new r(l)}return u.set(o,a),this.size=u.size,this}return kd=i,kd}var Ld,UE;function bc(){if(UE)return Ld;UE=1;var e=gc(),t=y4(),r=b4(),n=x4(),i=w4(),o=F4();function a(u){var l=this.__data__=new e(u);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,Ld=a,Ld}var Bd,VE;function lx(){if(VE)return Bd;VE=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return Bd=e,Bd}var Fd,WE;function RD(){if(WE)return Fd;WE=1;var e=Si(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Fd=t,Fd}var $d,GE;function xc(){if(GE)return $d;GE=1;var e=RD();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return $d=t,$d}var zd,KE;function wc(){if(KE)return zd;KE=1;var e=xc(),t=_o(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u){var l=o[a];(!(n.call(o,a)&&t(l,u))||u===void 0&&!(a in o))&&e(o,a,u)}return zd=i,zd}var Hd,YE;function Wa(){if(YE)return Hd;YE=1;var e=wc(),t=xc();function r(n,i,o,a){var u=!o;o||(o={});for(var l=-1,d=i.length;++l<d;){var f=i[l],h=a?a(o[f],n[f],f,o,n):void 0;h===void 0&&(h=n[f]),u?t(o,f,h):e(o,f,h)}return o}return Hd=r,Hd}var Ud,XE;function $4(){if(XE)return Ud;XE=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Ud=e,Ud}var Vd,ZE;function on(){if(ZE)return Vd;ZE=1;function e(t){return t!=null&&typeof t=="object"}return Vd=e,Vd}var Wd,JE;function z4(){if(JE)return Wd;JE=1;var e=Ei(),t=on(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Wd=n,Wd}var Gd,QE;function Ga(){if(QE)return Gd;QE=1;var e=z4(),t=on(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Gd=o,Gd}var Kd,eS;function xt(){if(eS)return Kd;eS=1;var e=Array.isArray;return Kd=e,Kd}var _a={exports:{}},Yd,tS;function H4(){if(tS)return Yd;tS=1;function e(){return!1}return Yd=e,Yd}_a.exports;var rS;function So(){return rS||(rS=1,(function(e,t){var r=Hr(),n=H4(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,l=u?u.isBuffer:void 0,d=l||n;e.exports=d})(_a,_a.exports)),_a.exports}var Xd,nS;function _c(){if(nS)return Xd;nS=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Xd=r,Xd}var Zd,iS;function fx(){if(iS)return Zd;iS=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Zd=t,Zd}var Jd,oS;function U4(){if(oS)return Jd;oS=1;var e=Ei(),t=fx(),r=on(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",l="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",N="[object Uint8ClampedArray]",A="[object Uint16Array]",L="[object Uint32Array]",B={};B[w]=B[E]=B[_]=B[S]=B[R]=B[I]=B[N]=B[A]=B[L]=!0,B[n]=B[i]=B[x]=B[o]=B[b]=B[a]=B[u]=B[l]=B[d]=B[f]=B[h]=B[p]=B[v]=B[m]=B[y]=!1;function U(j){return r(j)&&t(j.length)&&!!B[e(j)]}return Jd=U,Jd}var Qd,aS;function Ec(){if(aS)return Qd;aS=1;function e(t){return function(r){return t(r)}}return Qd=e,Qd}var Ea={exports:{}};Ea.exports;var sS;function dx(){return sS||(sS=1,(function(e,t){var r=OD(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,u=(function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();e.exports=u})(Ea,Ea.exports)),Ea.exports}var eh,uS;function Ka(){if(uS)return eh;uS=1;var e=U4(),t=Ec(),r=dx(),n=r&&r.isTypedArray,i=n?t(n):e;return eh=i,eh}var th,cS;function ID(){if(cS)return th;cS=1;var e=$4(),t=Ga(),r=xt(),n=So(),i=_c(),o=Ka(),a=Object.prototype,u=a.hasOwnProperty;function l(d,f){var h=r(d),p=!h&&t(d),v=!h&&!p&&n(d),m=!h&&!p&&!v&&o(d),y=h||p||v||m,x=y?e(d.length,String):[],b=x.length;for(var w in d)(f||u.call(d,w))&&!(y&&(w=="length"||v&&(w=="offset"||w=="parent")||m&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,b)))&&x.push(w);return x}return th=l,th}var rh,lS;function Sc(){if(lS)return rh;lS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return rh=t,rh}var nh,fS;function PD(){if(fS)return nh;fS=1;function e(t,r){return function(n){return t(r(n))}}return nh=e,nh}var ih,dS;function V4(){if(dS)return ih;dS=1;var e=PD(),t=e(Object.keys,Object);return ih=t,ih}var oh,hS;function hx(){if(hS)return oh;hS=1;var e=Sc(),t=V4(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var u in Object(o))n.call(o,u)&&u!="constructor"&&a.push(u);return a}return oh=i,oh}var ah,pS;function En(){if(pS)return ah;pS=1;var e=Va(),t=fx();function r(n){return n!=null&&t(n.length)&&!e(n)}return ah=r,ah}var sh,vS;function Wn(){if(vS)return sh;vS=1;var e=ID(),t=hx(),r=En();function n(i){return r(i)?e(i):t(i)}return sh=n,sh}var uh,gS;function W4(){if(gS)return uh;gS=1;var e=Wa(),t=Wn();function r(n,i){return n&&e(i,t(i),n)}return uh=r,uh}var ch,mS;function G4(){if(mS)return ch;mS=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return ch=e,ch}var lh,yS;function K4(){if(yS)return lh;yS=1;var e=Cr(),t=Sc(),r=G4(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var u=t(a),l=[];for(var d in a)d=="constructor"&&(u||!i.call(a,d))||l.push(d);return l}return lh=o,lh}var fh,bS;function Oi(){if(bS)return fh;bS=1;var e=ID(),t=K4(),r=En();function n(i){return r(i)?e(i,!0):t(i)}return fh=n,fh}var dh,xS;function Y4(){if(xS)return dh;xS=1;var e=Wa(),t=Oi();function r(n,i){return n&&e(i,t(i),n)}return dh=r,dh}var Sa={exports:{}};Sa.exports;var wS;function ND(){return wS||(wS=1,(function(e,t){var r=Hr(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;function l(d,f){if(f)return d.slice();var h=d.length,p=u?u(h):new d.constructor(h);return d.copy(p),p}e.exports=l})(Sa,Sa.exports)),Sa.exports}var hh,_S;function TD(){if(_S)return hh;_S=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return hh=e,hh}var ph,ES;function AD(){if(ES)return ph;ES=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,a=[];++n<i;){var u=t[n];r(u,n,t)&&(a[o++]=u)}return a}return ph=e,ph}var vh,SS;function MD(){if(SS)return vh;SS=1;function e(){return[]}return vh=e,vh}var gh,OS;function px(){if(OS)return gh;OS=1;var e=AD(),t=MD(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(u){return n.call(a,u)}))}:t;return gh=o,gh}var mh,CS;function X4(){if(CS)return mh;CS=1;var e=Wa(),t=px();function r(n,i){return e(n,t(n),i)}return mh=r,mh}var yh,RS;function vx(){if(RS)return yh;RS=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return yh=e,yh}var bh,IS;function Oc(){if(IS)return bh;IS=1;var e=PD(),t=e(Object.getPrototypeOf,Object);return bh=t,bh}var xh,PS;function DD(){if(PS)return xh;PS=1;var e=vx(),t=Oc(),r=px(),n=MD(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return xh=o,xh}var wh,NS;function Z4(){if(NS)return wh;NS=1;var e=Wa(),t=DD();function r(n,i){return e(n,t(n),i)}return wh=r,wh}var _h,TS;function jD(){if(TS)return _h;TS=1;var e=vx(),t=xt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return _h=r,_h}var Eh,AS;function qD(){if(AS)return Eh;AS=1;var e=jD(),t=px(),r=Wn();function n(i){return e(i,r,t)}return Eh=n,Eh}var Sh,MS;function J4(){if(MS)return Sh;MS=1;var e=jD(),t=DD(),r=Oi();function n(i){return e(i,r,t)}return Sh=n,Sh}var Oh,DS;function Q4(){if(DS)return Oh;DS=1;var e=Si(),t=Hr(),r=e(t,"DataView");return Oh=r,Oh}var Ch,jS;function eU(){if(jS)return Ch;jS=1;var e=Si(),t=Hr(),r=e(t,"Promise");return Ch=r,Ch}var Rh,qS;function kD(){if(qS)return Rh;qS=1;var e=Si(),t=Hr(),r=e(t,"Set");return Rh=r,Rh}var Ih,kS;function tU(){if(kS)return Ih;kS=1;var e=Si(),t=Hr(),r=e(t,"WeakMap");return Ih=r,Ih}var Ph,LS;function Oo(){if(LS)return Ph;LS=1;var e=Q4(),t=ux(),r=eU(),n=kD(),i=tU(),o=Ei(),a=CD(),u="[object Map]",l="[object Object]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),m=a(t),y=a(r),x=a(n),b=a(i),w=o;return(e&&w(new e(new ArrayBuffer(1)))!=p||t&&w(new t)!=u||r&&w(r.resolve())!=d||n&&w(new n)!=f||i&&w(new i)!=h)&&(w=function(E){var _=o(E),S=_==l?E.constructor:void 0,R=S?a(S):"";if(R)switch(R){case v:return p;case m:return u;case y:return d;case x:return f;case b:return h}return _}),Ph=w,Ph}var Nh,BS;function rU(){if(BS)return Nh;BS=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return Nh=r,Nh}var Th,FS;function LD(){if(FS)return Th;FS=1;var e=Hr(),t=e.Uint8Array;return Th=t,Th}var Ah,$S;function gx(){if($S)return Ah;$S=1;var e=LD();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Ah=t,Ah}var Mh,zS;function nU(){if(zS)return Mh;zS=1;var e=gx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Mh=t,Mh}var Dh,HS;function iU(){if(HS)return Dh;HS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Dh=t,Dh}var jh,US;function oU(){if(US)return jh;US=1;var e=Eo(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return jh=n,jh}var qh,VS;function BD(){if(VS)return qh;VS=1;var e=gx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return qh=t,qh}var kh,WS;function aU(){if(WS)return kh;WS=1;var e=gx(),t=nU(),r=iU(),n=oU(),i=BD(),o="[object Boolean]",a="[object Date]",u="[object Map]",l="[object Number]",d="[object RegExp]",f="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",m="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",b="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",_="[object Uint8Array]",S="[object Uint8ClampedArray]",R="[object Uint16Array]",I="[object Uint32Array]";function N(A,L,B){var U=A.constructor;switch(L){case v:return e(A);case o:case a:return new U(+A);case m:return t(A,B);case y:case x:case b:case w:case E:case _:case S:case R:case I:return i(A,B);case u:return new U;case l:case h:return new U(A);case d:return r(A);case f:return new U;case p:return n(A)}}return kh=N,kh}var Lh,GS;function FD(){if(GS)return Lh;GS=1;var e=Cr(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}})();return Lh=r,Lh}var Bh,KS;function $D(){if(KS)return Bh;KS=1;var e=FD(),t=Oc(),r=Sc();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Bh=n,Bh}var Fh,YS;function sU(){if(YS)return Fh;YS=1;var e=Oo(),t=on(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Fh=n,Fh}var $h,XS;function uU(){if(XS)return $h;XS=1;var e=sU(),t=Ec(),r=dx(),n=r&&r.isMap,i=n?t(n):e;return $h=i,$h}var zh,ZS;function cU(){if(ZS)return zh;ZS=1;var e=Oo(),t=on(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return zh=n,zh}var Hh,JS;function lU(){if(JS)return Hh;JS=1;var e=cU(),t=Ec(),r=dx(),n=r&&r.isSet,i=n?t(n):e;return Hh=i,Hh}var Uh,QS;function zD(){if(QS)return Uh;QS=1;var e=bc(),t=lx(),r=wc(),n=W4(),i=Y4(),o=ND(),a=TD(),u=X4(),l=Z4(),d=qD(),f=J4(),h=Oo(),p=rU(),v=aU(),m=$D(),y=xt(),x=So(),b=uU(),w=Cr(),E=lU(),_=Wn(),S=Oi(),R=1,I=2,N=4,A="[object Arguments]",L="[object Array]",B="[object Boolean]",U="[object Date]",j="[object Error]",D="[object Function]",G="[object GeneratorFunction]",F="[object Map]",X="[object Number]",Z="[object Object]",Q="[object RegExp]",W="[object Set]",ee="[object String]",oe="[object Symbol]",ae="[object WeakMap]",H="[object ArrayBuffer]",K="[object DataView]",$="[object Float32Array]",k="[object Float64Array]",z="[object Int8Array]",re="[object Int16Array]",ie="[object Int32Array]",se="[object Uint8Array]",ce="[object Uint8ClampedArray]",be="[object Uint16Array]",Ce="[object Uint32Array]",_e={};_e[A]=_e[L]=_e[H]=_e[K]=_e[B]=_e[U]=_e[$]=_e[k]=_e[z]=_e[re]=_e[ie]=_e[F]=_e[X]=_e[Z]=_e[Q]=_e[W]=_e[ee]=_e[oe]=_e[se]=_e[ce]=_e[be]=_e[Ce]=!0,_e[j]=_e[D]=_e[ae]=!1;function he(fe,Ee,Pe,Ze,ze,Fe){var Ue,ct=Ee&R,lt=Ee&I,mt=Ee&N;if(Pe&&(Ue=ze?Pe(fe,Ze,ze,Fe):Pe(fe)),Ue!==void 0)return Ue;if(!w(fe))return fe;var yt=y(fe);if(yt){if(Ue=p(fe),!ct)return a(fe,Ue)}else{var rt=h(fe),bt=rt==D||rt==G;if(x(fe))return o(fe,ct);if(rt==Z||rt==A||bt&&!ze){if(Ue=lt||bt?{}:m(fe),!ct)return lt?l(fe,i(Ue,fe)):u(fe,n(Ue,fe))}else{if(!_e[rt])return ze?fe:{};Ue=v(fe,rt,ct)}}Fe||(Fe=new e);var Jt=Fe.get(fe);if(Jt)return Jt;Fe.set(fe,Ue),E(fe)?fe.forEach(function(_t){Ue.add(he(_t,Ee,Pe,_t,fe,Fe))}):b(fe)&&fe.forEach(function(_t,jt){Ue.set(jt,he(_t,Ee,Pe,jt,fe,Fe))});var fr=mt?lt?f:d:lt?S:_,Dt=yt?void 0:fr(fe);return t(Dt||fe,function(_t,jt){Dt&&(jt=_t,_t=fe[jt]),r(Ue,jt,he(_t,Ee,Pe,jt,fe,Fe))}),Ue}return Uh=he,Uh}var Vh,eO;function fU(){if(eO)return Vh;eO=1;var e=zD(),t=4;function r(n){return e(n,t)}return Vh=r,Vh}var Wh,tO;function mx(){if(tO)return Wh;tO=1;function e(t){return function(){return t}}return Wh=e,Wh}var Gh,rO;function dU(){if(rO)return Gh;rO=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),u=i(r),l=u.length;l--;){var d=u[t?l:++o];if(n(a[d],d,a)===!1)break}return r}}return Gh=e,Gh}var Kh,nO;function yx(){if(nO)return Kh;nO=1;var e=dU(),t=e();return Kh=t,Kh}var Yh,iO;function bx(){if(iO)return Yh;iO=1;var e=yx(),t=Wn();function r(n,i){return n&&e(n,i,t)}return Yh=r,Yh}var Xh,oO;function hU(){if(oO)return Xh;oO=1;var e=En();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var a=i.length,u=n?a:-1,l=Object(i);(n?u--:++u<a)&&o(l[u],u,l)!==!1;);return i}}return Xh=t,Xh}var Zh,aO;function Cc(){if(aO)return Zh;aO=1;var e=bx(),t=hU(),r=t(e);return Zh=r,Zh}var Jh,sO;function Ci(){if(sO)return Jh;sO=1;function e(t){return t}return Jh=e,Jh}var Qh,uO;function HD(){if(uO)return Qh;uO=1;var e=Ci();function t(r){return typeof r=="function"?r:e}return Qh=t,Qh}var ep,cO;function UD(){if(cO)return ep;cO=1;var e=lx(),t=Cc(),r=HD(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return ep=i,ep}var tp,lO;function VD(){return lO||(lO=1,tp=UD()),tp}var rp,fO;function pU(){if(fO)return rp;fO=1;var e=Cc();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return rp=t,rp}var np,dO;function vU(){if(dO)return np;dO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return np=t,np}var ip,hO;function gU(){if(hO)return ip;hO=1;function e(t){return this.__data__.has(t)}return ip=e,ip}var op,pO;function WD(){if(pO)return op;pO=1;var e=cx(),t=vU(),r=gU();function n(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,op=n,op}var ap,vO;function mU(){if(vO)return ap;vO=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return ap=e,ap}var sp,gO;function GD(){if(gO)return sp;gO=1;function e(t,r){return t.has(r)}return sp=e,sp}var up,mO;function KD(){if(mO)return up;mO=1;var e=WD(),t=mU(),r=GD(),n=1,i=2;function o(a,u,l,d,f,h){var p=l&n,v=a.length,m=u.length;if(v!=m&&!(p&&m>v))return!1;var y=h.get(a),x=h.get(u);if(y&&x)return y==u&&x==a;var b=-1,w=!0,E=l&i?new e:void 0;for(h.set(a,u),h.set(u,a);++b<v;){var _=a[b],S=u[b];if(d)var R=p?d(S,_,b,u,a,h):d(_,S,b,a,u,h);if(R!==void 0){if(R)continue;w=!1;break}if(E){if(!t(u,function(I,N){if(!r(E,N)&&(_===I||f(_,I,l,d,h)))return E.push(N)})){w=!1;break}}else if(!(_===S||f(_,S,l,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return up=o,up}var cp,yO;function yU(){if(yO)return cp;yO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return cp=e,cp}var lp,bO;function xx(){if(bO)return lp;bO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return lp=e,lp}var fp,xO;function bU(){if(xO)return fp;xO=1;var e=Eo(),t=LD(),r=_o(),n=KD(),i=yU(),o=xx(),a=1,u=2,l="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",m="[object Set]",y="[object String]",x="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,_=E?E.valueOf:void 0;function S(R,I,N,A,L,B,U){switch(N){case w:if(R.byteLength!=I.byteLength||R.byteOffset!=I.byteOffset)return!1;R=R.buffer,I=I.buffer;case b:return!(R.byteLength!=I.byteLength||!B(new t(R),new t(I)));case l:case d:case p:return r(+R,+I);case f:return R.name==I.name&&R.message==I.message;case v:case y:return R==I+"";case h:var j=i;case m:var D=A&a;if(j||(j=o),R.size!=I.size&&!D)return!1;var G=U.get(R);if(G)return G==I;A|=u,U.set(R,I);var F=n(j(R),j(I),A,L,B,U);return U.delete(R),F;case x:if(_)return _.call(R)==_.call(I)}return!1}return fp=S,fp}var dp,wO;function xU(){if(wO)return dp;wO=1;var e=qD(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u,l,d,f){var h=u&t,p=e(o),v=p.length,m=e(a),y=m.length;if(v!=y&&!h)return!1;for(var x=v;x--;){var b=p[x];if(!(h?b in a:n.call(a,b)))return!1}var w=f.get(o),E=f.get(a);if(w&&E)return w==a&&E==o;var _=!0;f.set(o,a),f.set(a,o);for(var S=h;++x<v;){b=p[x];var R=o[b],I=a[b];if(l)var N=h?l(I,R,b,a,o,f):l(R,I,b,o,a,f);if(!(N===void 0?R===I||d(R,I,u,l,f):N)){_=!1;break}S||(S=b=="constructor")}if(_&&!S){var A=o.constructor,L=a.constructor;A!=L&&"constructor"in o&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof L=="function"&&L instanceof L)&&(_=!1)}return f.delete(o),f.delete(a),_}return dp=i,dp}var hp,_O;function wU(){if(_O)return hp;_O=1;var e=bc(),t=KD(),r=bU(),n=xU(),i=Oo(),o=xt(),a=So(),u=Ka(),l=1,d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function m(y,x,b,w,E,_){var S=o(y),R=o(x),I=S?f:i(y),N=R?f:i(x);I=I==d?h:I,N=N==d?h:N;var A=I==h,L=N==h,B=I==N;if(B&&a(y)){if(!a(x))return!1;S=!0,A=!1}if(B&&!A)return _||(_=new e),S||u(y)?t(y,x,b,w,E,_):r(y,x,I,b,w,E,_);if(!(b&l)){var U=A&&v.call(y,"__wrapped__"),j=L&&v.call(x,"__wrapped__");if(U||j){var D=U?y.value():y,G=j?x.value():x;return _||(_=new e),E(D,G,b,w,_)}}return B?(_||(_=new e),n(y,x,b,w,E,_)):!1}return hp=m,hp}var pp,EO;function YD(){if(EO)return pp;EO=1;var e=wU(),t=on();function r(n,i,o,a,u){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,a,r,u)}return pp=r,pp}var vp,SO;function _U(){if(SO)return vp;SO=1;var e=bc(),t=YD(),r=1,n=2;function i(o,a,u,l){var d=u.length,f=d,h=!l;if(o==null)return!f;for(o=Object(o);d--;){var p=u[d];if(h&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++d<f;){p=u[d];var v=p[0],m=o[v],y=p[1];if(h&&p[2]){if(m===void 0&&!(v in o))return!1}else{var x=new e;if(l)var b=l(m,y,v,o,a,x);if(!(b===void 0?t(y,m,r|n,l,x):b))return!1}}return!0}return vp=i,vp}var gp,OO;function XD(){if(OO)return gp;OO=1;var e=Cr();function t(r){return r===r&&!e(r)}return gp=t,gp}var mp,CO;function EU(){if(CO)return mp;CO=1;var e=XD(),t=Wn();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],u=n[a];i[o]=[a,u,e(u)]}return i}return mp=r,mp}var yp,RO;function ZD(){if(RO)return yp;RO=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return yp=e,yp}var bp,IO;function SU(){if(IO)return bp;IO=1;var e=_U(),t=EU(),r=ZD();function n(i){var o=t(i);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return bp=n,bp}var xp,PO;function Co(){if(PO)return xp;PO=1;var e=Ei(),t=on(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return xp=n,xp}var wp,NO;function wx(){if(NO)return wp;NO=1;var e=xt(),t=Co(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,a){if(e(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||a!=null&&o in Object(a)}return wp=i,wp}var _p,TO;function OU(){if(TO)return _p;TO=1;var e=cx(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,u=i?i.apply(this,a):a[0],l=o.cache;if(l.has(u))return l.get(u);var d=n.apply(this,a);return o.cache=l.set(u,d)||l,d};return o.cache=new(r.Cache||e),o}return r.Cache=e,_p=r,_p}var Ep,AO;function CU(){if(AO)return Ep;AO=1;var e=OU(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Ep=r,Ep}var Sp,MO;function RU(){if(MO)return Sp;MO=1;var e=CU(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,u,l,d){o.push(l?d.replace(r,"$1"):u||a)}),o});return Sp=n,Sp}var Op,DO;function Rc(){if(DO)return Op;DO=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return Op=e,Op}var Cp,jO;function IU(){if(jO)return Cp;jO=1;var e=Eo(),t=Rc(),r=xt(),n=Co(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(u){if(typeof u=="string")return u;if(r(u))return t(u,a)+"";if(n(u))return o?o.call(u):"";var l=u+"";return l=="0"&&1/u==-1/0?"-0":l}return Cp=a,Cp}var Rp,qO;function JD(){if(qO)return Rp;qO=1;var e=IU();function t(r){return r==null?"":e(r)}return Rp=t,Rp}var Ip,kO;function Ic(){if(kO)return Ip;kO=1;var e=xt(),t=wx(),r=RU(),n=JD();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Ip=i,Ip}var Pp,LO;function Ya(){if(LO)return Pp;LO=1;var e=Co();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Pp=t,Pp}var Np,BO;function Pc(){if(BO)return Np;BO=1;var e=Ic(),t=Ya();function r(n,i){i=e(i,n);for(var o=0,a=i.length;n!=null&&o<a;)n=n[t(i[o++])];return o&&o==a?n:void 0}return Np=r,Np}var Tp,FO;function PU(){if(FO)return Tp;FO=1;var e=Pc();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Tp=t,Tp}var Ap,$O;function NU(){if($O)return Ap;$O=1;function e(t,r){return t!=null&&r in Object(t)}return Ap=e,Ap}var Mp,zO;function QD(){if(zO)return Mp;zO=1;var e=Ic(),t=Ga(),r=xt(),n=_c(),i=fx(),o=Ya();function a(u,l,d){l=e(l,u);for(var f=-1,h=l.length,p=!1;++f<h;){var v=o(l[f]);if(!(p=u!=null&&d(u,v)))break;u=u[v]}return p||++f!=h?p:(h=u==null?0:u.length,!!h&&i(h)&&n(v,h)&&(r(u)||t(u)))}return Mp=a,Mp}var Dp,HO;function ej(){if(HO)return Dp;HO=1;var e=NU(),t=QD();function r(n,i){return n!=null&&t(n,i,e)}return Dp=r,Dp}var jp,UO;function TU(){if(UO)return jp;UO=1;var e=YD(),t=PU(),r=ej(),n=wx(),i=XD(),o=ZD(),a=Ya(),u=1,l=2;function d(f,h){return n(f)&&i(h)?o(a(f),h):function(p){var v=t(p,f);return v===void 0&&v===h?r(p,f):e(h,v,u|l)}}return jp=d,jp}var qp,VO;function tj(){if(VO)return qp;VO=1;function e(t){return function(r){return r==null?void 0:r[t]}}return qp=e,qp}var kp,WO;function AU(){if(WO)return kp;WO=1;var e=Pc();function t(r){return function(n){return e(n,r)}}return kp=t,kp}var Lp,GO;function MU(){if(GO)return Lp;GO=1;var e=tj(),t=AU(),r=wx(),n=Ya();function i(o){return r(o)?e(n(o)):t(o)}return Lp=i,Lp}var Bp,KO;function Sn(){if(KO)return Bp;KO=1;var e=SU(),t=TU(),r=Ci(),n=xt(),i=MU();function o(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):i(a)}return Bp=o,Bp}var Fp,YO;function rj(){if(YO)return Fp;YO=1;var e=AD(),t=pU(),r=Sn(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return Fp=i,Fp}var $p,XO;function DU(){if(XO)return $p;XO=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return $p=r,$p}var zp,ZO;function nj(){if(ZO)return zp;ZO=1;var e=DU(),t=QD();function r(n,i){return n!=null&&t(n,i,e)}return zp=r,zp}var Hp,JO;function jU(){if(JO)return Hp;JO=1;var e=hx(),t=Oo(),r=Ga(),n=xt(),i=En(),o=So(),a=Sc(),u=Ka(),l="[object Map]",d="[object Set]",f=Object.prototype,h=f.hasOwnProperty;function p(v){if(v==null)return!0;if(i(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||o(v)||u(v)||r(v)))return!v.length;var m=t(v);if(m==l||m==d)return!v.size;if(a(v))return!e(v).length;for(var y in v)if(h.call(v,y))return!1;return!0}return Hp=p,Hp}var Up,QO;function ij(){if(QO)return Up;QO=1;function e(t){return t===void 0}return Up=e,Up}var Vp,eC;function oj(){if(eC)return Vp;eC=1;var e=Cc(),t=En();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(u,l,d){a[++o]=i(u,l,d)}),a}return Vp=r,Vp}var Wp,tC;function aj(){if(tC)return Wp;tC=1;var e=Rc(),t=Sn(),r=oj(),n=xt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return Wp=i,Wp}var Gp,rC;function qU(){if(rC)return Gp;rC=1;function e(t,r,n,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(n=t[++o]);++o<a;)n=r(n,t[o],o,t);return n}return Gp=e,Gp}var Kp,nC;function kU(){if(nC)return Kp;nC=1;function e(t,r,n,i,o){return o(t,function(a,u,l){n=i?(i=!1,a):r(n,a,u,l)}),n}return Kp=e,Kp}var Yp,iC;function sj(){if(iC)return Yp;iC=1;var e=qU(),t=Cc(),r=Sn(),n=kU(),i=xt();function o(a,u,l){var d=i(a)?e:n,f=arguments.length<3;return d(a,r(u,4),l,f,t)}return Yp=o,Yp}var Xp,oC;function LU(){if(oC)return Xp;oC=1;var e=Ei(),t=xt(),r=on(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Xp=i,Xp}var Zp,aC;function BU(){if(aC)return Zp;aC=1;var e=tj(),t=e("length");return Zp=t,Zp}var Jp,sC;function FU(){if(sC)return Jp;sC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",u=RegExp("["+a+e+i+o+"]");function l(d){return u.test(d)}return Jp=l,Jp}var Qp,uC;function $U(){if(uC)return Qp;uC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="["+e+"]",u="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",d="(?:"+u+"|"+l+")",f="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",m=d+"?",y="["+o+"]?",x="(?:"+v+"(?:"+[f,h,p].join("|")+")"+y+m+")*",b=y+m+x,w="(?:"+[f+u+"?",u,h,p,a].join("|")+")",E=RegExp(l+"(?="+l+")|"+w+b,"g");function _(S){for(var R=E.lastIndex=0;E.test(S);)++R;return R}return Qp=_,Qp}var ev,cC;function zU(){if(cC)return ev;cC=1;var e=BU(),t=FU(),r=$U();function n(i){return t(i)?r(i):e(i)}return ev=n,ev}var tv,lC;function HU(){if(lC)return tv;lC=1;var e=hx(),t=Oo(),r=En(),n=LU(),i=zU(),o="[object Map]",a="[object Set]";function u(l){if(l==null)return 0;if(r(l))return n(l)?i(l):l.length;var d=t(l);return d==o||d==a?l.size:e(l).length}return tv=u,tv}var rv,fC;function UU(){if(fC)return rv;fC=1;var e=lx(),t=FD(),r=bx(),n=Sn(),i=Oc(),o=xt(),a=So(),u=Va(),l=Cr(),d=Ka();function f(h,p,v){var m=o(h),y=m||a(h)||d(h);if(p=n(p,4),v==null){var x=h&&h.constructor;y?v=m?new x:[]:l(h)?v=u(x)?t(i(h)):{}:v={}}return(y?e:r)(h,function(b,w,E){return p(v,b,w,E)}),v}return rv=f,rv}var nv,dC;function VU(){if(dC)return nv;dC=1;var e=Eo(),t=Ga(),r=xt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return nv=i,nv}var iv,hC;function _x(){if(hC)return iv;hC=1;var e=vx(),t=VU();function r(n,i,o,a,u){var l=-1,d=n.length;for(o||(o=t),u||(u=[]);++l<d;){var f=n[l];i>0&&o(f)?i>1?r(f,i-1,o,a,u):e(u,f):a||(u[u.length]=f)}return u}return iv=r,iv}var ov,pC;function WU(){if(pC)return ov;pC=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return ov=e,ov}var av,vC;function uj(){if(vC)return av;vC=1;var e=WU(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,u=-1,l=t(a.length-i,0),d=Array(l);++u<l;)d[u]=a[i+u];u=-1;for(var f=Array(i+1);++u<i;)f[u]=a[u];return f[i]=o(d),e(n,this,f)}}return av=r,av}var sv,gC;function GU(){if(gC)return sv;gC=1;var e=mx(),t=RD(),r=Ci(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return sv=n,sv}var uv,mC;function KU(){if(mC)return uv;mC=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var u=r(),l=t-(u-a);if(a=u,l>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return uv=n,uv}var cv,yC;function cj(){if(yC)return cv;yC=1;var e=GU(),t=KU(),r=t(e);return cv=r,cv}var lv,bC;function Nc(){if(bC)return lv;bC=1;var e=Ci(),t=uj(),r=cj();function n(i,o){return r(t(i,o,e),i+"")}return lv=n,lv}var fv,xC;function lj(){if(xC)return fv;xC=1;function e(t,r,n,i){for(var o=t.length,a=n+(i?1:-1);i?a--:++a<o;)if(r(t[a],a,t))return a;return-1}return fv=e,fv}var dv,wC;function YU(){if(wC)return dv;wC=1;function e(t){return t!==t}return dv=e,dv}var hv,_C;function XU(){if(_C)return hv;_C=1;function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}return hv=e,hv}var pv,EC;function ZU(){if(EC)return pv;EC=1;var e=lj(),t=YU(),r=XU();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return pv=n,pv}var vv,SC;function JU(){if(SC)return vv;SC=1;var e=ZU();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return vv=t,vv}var gv,OC;function QU(){if(OC)return gv;OC=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}return gv=e,gv}var mv,CC;function eV(){if(CC)return mv;CC=1;function e(){}return mv=e,mv}var yv,RC;function tV(){if(RC)return yv;RC=1;var e=kD(),t=eV(),r=xx(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return yv=i,yv}var bv,IC;function rV(){if(IC)return bv;IC=1;var e=WD(),t=JU(),r=QU(),n=GD(),i=tV(),o=xx(),a=200;function u(l,d,f){var h=-1,p=t,v=l.length,m=!0,y=[],x=y;if(f)m=!1,p=r;else if(v>=a){var b=d?null:i(l);if(b)return o(b);m=!1,p=n,x=new e}else x=d?[]:y;e:for(;++h<v;){var w=l[h],E=d?d(w):w;if(w=f||w!==0?w:0,m&&E===E){for(var _=x.length;_--;)if(x[_]===E)continue e;d&&x.push(E),y.push(w)}else p(x,E,f)||(x!==y&&x.push(E),y.push(w))}return y}return bv=u,bv}var xv,PC;function fj(){if(PC)return xv;PC=1;var e=En(),t=on();function r(n){return t(n)&&e(n)}return xv=r,xv}var wv,NC;function nV(){if(NC)return wv;NC=1;var e=_x(),t=Nc(),r=rV(),n=fj(),i=t(function(o){return r(e(o,1,n,!0))});return wv=i,wv}var _v,TC;function iV(){if(TC)return _v;TC=1;var e=Rc();function t(r,n){return e(n,function(i){return r[i]})}return _v=t,_v}var Ev,AC;function dj(){if(AC)return Ev;AC=1;var e=iV(),t=Wn();function r(n){return n==null?[]:e(n,t(n))}return Ev=r,Ev}var Sv,MC;function Rr(){if(MC)return Sv;MC=1;var e;if(typeof sx=="function")try{e={clone:fU(),constant:mx(),each:VD(),filter:rj(),has:nj(),isArray:xt(),isEmpty:jU(),isFunction:Va(),isUndefined:ij(),keys:Wn(),map:aj(),reduce:sj(),size:HU(),transform:UU(),union:nV(),values:dj()}}catch{}return e||(e=window._),Sv=e,Sv}var Ov,DC;function Ex(){if(DC)return Ov;DC=1;var e=Rr();Ov=i;var t="\0",r="\0",n="";function i(f){this._isDirected=e.has(f,"directed")?f.directed:!0,this._isMultigraph=e.has(f,"multigraph")?f.multigraph:!1,this._isCompound=e.has(f,"compound")?f.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(f){return this._label=f,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultNodeLabelFn=f,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var f=this;return e.filter(this.nodes(),function(h){return e.isEmpty(f._in[h])})},i.prototype.sinks=function(){var f=this;return e.filter(this.nodes(),function(h){return e.isEmpty(f._out[h])})},i.prototype.setNodes=function(f,h){var p=arguments,v=this;return e.each(f,function(m){p.length>1?v.setNode(m,h):v.setNode(m)}),this},i.prototype.setNode=function(f,h){return e.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=h),this):(this._nodes[f]=arguments.length>1?h:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=r,this._children[f]={},this._children[r][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},i.prototype.node=function(f){return this._nodes[f]},i.prototype.hasNode=function(f){return e.has(this._nodes,f)},i.prototype.removeNode=function(f){var h=this;if(e.has(this._nodes,f)){var p=function(v){h.removeEdge(h._edgeObjs[v])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],e.each(this.children(f),function(v){h.setParent(v)}),delete this._children[f]),e.each(e.keys(this._in[f]),p),delete this._in[f],delete this._preds[f],e.each(e.keys(this._out[f]),p),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},i.prototype.setParent=function(f,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=r;else{h+="";for(var p=h;!e.isUndefined(p);p=this.parent(p))if(p===f)throw new Error("Setting "+h+" as parent of "+f+" would create a cycle");this.setNode(h)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=h,this._children[h][f]=!0,this},i.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},i.prototype.parent=function(f){if(this._isCompound){var h=this._parent[f];if(h!==r)return h}},i.prototype.children=function(f){if(e.isUndefined(f)&&(f=r),this._isCompound){var h=this._children[f];if(h)return e.keys(h)}else{if(f===r)return this.nodes();if(this.hasNode(f))return[]}},i.prototype.predecessors=function(f){var h=this._preds[f];if(h)return e.keys(h)},i.prototype.successors=function(f){var h=this._sucs[f];if(h)return e.keys(h)},i.prototype.neighbors=function(f){var h=this.predecessors(f);if(h)return e.union(h,this.successors(f))},i.prototype.isLeaf=function(f){var h;return this.isDirected()?h=this.successors(f):h=this.neighbors(f),h.length===0},i.prototype.filterNodes=function(f){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var p=this;e.each(this._nodes,function(y,x){f(x)&&h.setNode(x,y)}),e.each(this._edgeObjs,function(y){h.hasNode(y.v)&&h.hasNode(y.w)&&h.setEdge(y,p.edge(y))});var v={};function m(y){var x=p.parent(y);return x===void 0||h.hasNode(x)?(v[y]=x,x):x in v?v[x]:m(x)}return this._isCompound&&e.each(h.nodes(),function(y){h.setParent(y,m(y))}),h},i.prototype.setDefaultEdgeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultEdgeLabelFn=f,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(f,h){var p=this,v=arguments;return e.reduce(f,function(m,y){return v.length>1?p.setEdge(m,y,h):p.setEdge(m,y),y}),this},i.prototype.setEdge=function(){var f,h,p,v,m=!1,y=arguments[0];typeof y=="object"&&y!==null&&"v"in y?(f=y.v,h=y.w,p=y.name,arguments.length===2&&(v=arguments[1],m=!0)):(f=y,h=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],m=!0)),f=""+f,h=""+h,e.isUndefined(p)||(p=""+p);var x=u(this._isDirected,f,h,p);if(e.has(this._edgeLabels,x))return m&&(this._edgeLabels[x]=v),this;if(!e.isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(h),this._edgeLabels[x]=m?v:this._defaultEdgeLabelFn(f,h,p);var b=l(this._isDirected,f,h,p);return f=b.v,h=b.w,Object.freeze(b),this._edgeObjs[x]=b,o(this._preds[h],f),o(this._sucs[f],h),this._in[h][x]=b,this._out[f][x]=b,this._edgeCount++,this},i.prototype.edge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p);return this._edgeLabels[v]},i.prototype.hasEdge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p);return e.has(this._edgeLabels,v)},i.prototype.removeEdge=function(f,h,p){var v=arguments.length===1?d(this._isDirected,arguments[0]):u(this._isDirected,f,h,p),m=this._edgeObjs[v];return m&&(f=m.v,h=m.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[h],f),a(this._sucs[f],h),delete this._in[h][v],delete this._out[f][v],this._edgeCount--),this},i.prototype.inEdges=function(f,h){var p=this._in[f];if(p){var v=e.values(p);return h?e.filter(v,function(m){return m.v===h}):v}},i.prototype.outEdges=function(f,h){var p=this._out[f];if(p){var v=e.values(p);return h?e.filter(v,function(m){return m.w===h}):v}},i.prototype.nodeEdges=function(f,h){var p=this.inEdges(f,h);if(p)return p.concat(this.outEdges(f,h))};function o(f,h){f[h]?f[h]++:f[h]=1}function a(f,h){--f[h]||delete f[h]}function u(f,h,p,v){var m=""+h,y=""+p;if(!f&&m>y){var x=m;m=y,y=x}return m+n+y+n+(e.isUndefined(v)?t:v)}function l(f,h,p,v){var m=""+h,y=""+p;if(!f&&m>y){var x=m;m=y,y=x}var b={v:m,w:y};return v&&(b.name=v),b}function d(f,h){return u(f,h.v,h.w,h.name)}return Ov}var Cv,jC;function oV(){return jC||(jC=1,Cv="2.1.8"),Cv}var Rv,qC;function aV(){return qC||(qC=1,Rv={Graph:Ex(),version:oV()}),Rv}var Iv,kC;function sV(){if(kC)return Iv;kC=1;var e=Rr(),t=Ex();Iv={write:r,read:o};function r(a){var u={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:i(a)};return e.isUndefined(a.graph())||(u.value=e.clone(a.graph())),u}function n(a){return e.map(a.nodes(),function(u){var l=a.node(u),d=a.parent(u),f={v:u};return e.isUndefined(l)||(f.value=l),e.isUndefined(d)||(f.parent=d),f})}function i(a){return e.map(a.edges(),function(u){var l=a.edge(u),d={v:u.v,w:u.w};return e.isUndefined(u.name)||(d.name=u.name),e.isUndefined(l)||(d.value=l),d})}function o(a){var u=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(l){u.setNode(l.v,l.value),l.parent&&u.setParent(l.v,l.parent)}),e.each(a.edges,function(l){u.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),u}return Iv}var Pv,LC;function uV(){if(LC)return Pv;LC=1;var e=Rr();Pv=t;function t(r){var n={},i=[],o;function a(u){e.has(n,u)||(n[u]=!0,o.push(u),e.each(r.successors(u),a),e.each(r.predecessors(u),a))}return e.each(r.nodes(),function(u){o=[],a(u),o.length&&i.push(o)}),i}return Pv}var Nv,BC;function hj(){if(BC)return Nv;BC=1;var e=Rr();Nv=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var i=this._keyIndices;if(r=String(r),!e.has(i,r)){var o=this._arr,a=o.length;return i[r]=a,o.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var i=this._keyIndices[r];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},t.prototype._heapify=function(r){var n=this._arr,i=2*r,o=i+1,a=r;i<n.length&&(a=n[i].priority<n[a].priority?i:a,o<n.length&&(a=n[o].priority<n[a].priority?o:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,i=n[r].priority,o;r!==0&&(o=r>>1,!(n[o].priority<i));)this._swap(r,o),r=o},t.prototype._swap=function(r,n){var i=this._arr,o=this._keyIndices,a=i[r],u=i[n];i[r]=u,i[n]=a,o[u.key]=r,o[a.key]=n},Nv}var Tv,FC;function pj(){if(FC)return Tv;FC=1;var e=Rr(),t=hj();Tv=n;var r=e.constant(1);function n(o,a,u,l){return i(o,String(a),u||r,l||function(d){return o.outEdges(d)})}function i(o,a,u,l){var d={},f=new t,h,p,v=function(m){var y=m.v!==h?m.v:m.w,x=d[y],b=u(m),w=p.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+b);w<x.distance&&(x.distance=w,x.predecessor=h,f.decrease(y,w))};for(o.nodes().forEach(function(m){var y=m===a?0:Number.POSITIVE_INFINITY;d[m]={distance:y},f.add(m,y)});f.size()>0&&(h=f.removeMin(),p=d[h],p.distance!==Number.POSITIVE_INFINITY);)l(h).forEach(v);return d}return Tv}var Av,$C;function cV(){if($C)return Av;$C=1;var e=pj(),t=Rr();Av=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Av}var Mv,zC;function vj(){if(zC)return Mv;zC=1;var e=Rr();Mv=t;function t(r){var n=0,i=[],o={},a=[];function u(l){var d=o[l]={onStack:!0,lowlink:n,index:n++};if(i.push(l),r.successors(l).forEach(function(p){e.has(o,p)?o[p].onStack&&(d.lowlink=Math.min(d.lowlink,o[p].index)):(u(p),d.lowlink=Math.min(d.lowlink,o[p].lowlink))}),d.lowlink===d.index){var f=[],h;do h=i.pop(),o[h].onStack=!1,f.push(h);while(l!==h);a.push(f)}}return r.nodes().forEach(function(l){e.has(o,l)||u(l)}),a}return Mv}var Dv,HC;function lV(){if(HC)return Dv;HC=1;var e=Rr(),t=vj();Dv=r;function r(n){return e.filter(t(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return Dv}var jv,UC;function fV(){if(UC)return jv;UC=1;var e=Rr();jv=r;var t=e.constant(1);function r(i,o,a){return n(i,o||t,a||function(u){return i.outEdges(u)})}function n(i,o,a){var u={},l=i.nodes();return l.forEach(function(d){u[d]={},u[d][d]={distance:0},l.forEach(function(f){d!==f&&(u[d][f]={distance:Number.POSITIVE_INFINITY})}),a(d).forEach(function(f){var h=f.v===d?f.w:f.v,p=o(f);u[d][h]={distance:p,predecessor:d}})}),l.forEach(function(d){var f=u[d];l.forEach(function(h){var p=u[h];l.forEach(function(v){var m=p[d],y=f[v],x=p[v],b=m.distance+y.distance;b<x.distance&&(x.distance=b,x.predecessor=y.predecessor)})})}),u}return jv}var qv,VC;function gj(){if(VC)return qv;VC=1;var e=Rr();qv=t,t.CycleException=r;function t(n){var i={},o={},a=[];function u(l){if(e.has(o,l))throw new r;e.has(i,l)||(o[l]=!0,i[l]=!0,e.each(n.predecessors(l),u),delete o[l],a.push(l))}if(e.each(n.sinks(),u),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,qv}var kv,WC;function dV(){if(WC)return kv;WC=1;var e=gj();kv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return kv}var Lv,GC;function mj(){if(GC)return Lv;GC=1;var e=Rr();Lv=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),u=[],l={};return e.each(i,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);r(n,d,o==="post",l,a,u)}),u}function r(n,i,o,a,u,l){e.has(a,i)||(a[i]=!0,o||l.push(i),e.each(u(i),function(d){r(n,d,o,a,u,l)}),o&&l.push(i))}return Lv}var Bv,KC;function hV(){if(KC)return Bv;KC=1;var e=mj();Bv=t;function t(r,n){return e(r,n,"post")}return Bv}var Fv,YC;function pV(){if(YC)return Fv;YC=1;var e=mj();Fv=t;function t(r,n){return e(r,n,"pre")}return Fv}var $v,XC;function vV(){if(XC)return $v;XC=1;var e=Rr(),t=Ex(),r=hj();$v=n;function n(i,o){var a=new t,u={},l=new r,d;function f(p){var v=p.v===d?p.w:p.v,m=l.priority(v);if(m!==void 0){var y=o(p);y<m&&(u[v]=d,l.decrease(v,y))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(p){l.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),l.decrease(i.nodes()[0],0);for(var h=!1;l.size()>0;){if(d=l.removeMin(),e.has(u,d))a.setEdge(d,u[d]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(d).forEach(f)}return a}return $v}var zv,ZC;function gV(){return ZC||(ZC=1,zv={components:uV(),dijkstra:pj(),dijkstraAll:cV(),findCycles:lV(),floydWarshall:fV(),isAcyclic:dV(),postorder:hV(),preorder:pV(),prim:vV(),tarjan:vj(),topsort:gj()}),zv}var Hv,JC;function mV(){if(JC)return Hv;JC=1;var e=aV();return Hv={Graph:e.Graph,json:sV(),alg:gV(),version:e.version},Hv}var Uv,QC;function Fr(){if(QC)return Uv;QC=1;var e;if(typeof sx=="function")try{e=mV()}catch{}return e||(e=window.graphlib),Uv=e,Uv}var Vv,eR;function yV(){if(eR)return Vv;eR=1;var e=zD(),t=1,r=4;function n(i){return e(i,t|r)}return Vv=n,Vv}var Wv,tR;function Tc(){if(tR)return Wv;tR=1;var e=_o(),t=En(),r=_c(),n=Cr();function i(o,a,u){if(!n(u))return!1;var l=typeof a;return(l=="number"?t(u)&&r(a,u.length):l=="string"&&a in u)?e(u[a],o):!1}return Wv=i,Wv}var Gv,rR;function bV(){if(rR)return Gv;rR=1;var e=Nc(),t=_o(),r=Tc(),n=Oi(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(u,l){u=Object(u);var d=-1,f=l.length,h=f>2?l[2]:void 0;for(h&&r(l[0],l[1],h)&&(f=1);++d<f;)for(var p=l[d],v=n(p),m=-1,y=v.length;++m<y;){var x=v[m],b=u[x];(b===void 0||t(b,i[x])&&!o.call(u,x))&&(u[x]=p[x])}return u});return Gv=a,Gv}var Kv,nR;function xV(){if(nR)return Kv;nR=1;var e=Sn(),t=En(),r=Wn();function n(i){return function(o,a,u){var l=Object(o);if(!t(o)){var d=e(a,3);o=r(o),a=function(h){return d(l[h],h,l)}}var f=i(o,a,u);return f>-1?l[d?o[f]:f]:void 0}}return Kv=n,Kv}var Yv,iR;function wV(){if(iR)return Yv;iR=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Yv=t,Yv}var Xv,oR;function _V(){if(oR)return Xv;oR=1;var e=wV(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Xv=r,Xv}var Zv,aR;function EV(){if(aR)return Zv;aR=1;var e=_V(),t=Cr(),r=Co(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt;function l(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var f=typeof d.valueOf=="function"?d.valueOf():d;d=t(f)?f+"":f}if(typeof d!="string")return d===0?d:+d;d=e(d);var h=o.test(d);return h||a.test(d)?u(d.slice(2),h?2:8):i.test(d)?n:+d}return Zv=l,Zv}var Jv,sR;function yj(){if(sR)return Jv;sR=1;var e=EV(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Jv=n,Jv}var Qv,uR;function SV(){if(uR)return Qv;uR=1;var e=yj();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Qv=t,Qv}var eg,cR;function OV(){if(cR)return eg;cR=1;var e=lj(),t=Sn(),r=SV(),n=Math.max;function i(o,a,u){var l=o==null?0:o.length;if(!l)return-1;var d=u==null?0:r(u);return d<0&&(d=n(l+d,0)),e(o,t(a,3),d)}return eg=i,eg}var tg,lR;function CV(){if(lR)return tg;lR=1;var e=xV(),t=OV(),r=e(t);return tg=r,tg}var rg,fR;function bj(){if(fR)return rg;fR=1;var e=_x();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return rg=t,rg}var ng,dR;function RV(){if(dR)return ng;dR=1;var e=yx(),t=HD(),r=Oi();function n(i,o){return i==null?i:e(i,t(o),r)}return ng=n,ng}var ig,hR;function IV(){if(hR)return ig;hR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return ig=e,ig}var og,pR;function PV(){if(pR)return og;pR=1;var e=xc(),t=bx(),r=Sn();function n(i,o){var a={};return o=r(o,3),t(i,function(u,l,d){e(a,l,o(u,l,d))}),a}return og=n,og}var ag,vR;function Sx(){if(vR)return ag;vR=1;var e=Co();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var u=r[o],l=n(u);if(l!=null&&(d===void 0?l===l&&!e(l):i(l,d)))var d=l,f=u}return f}return ag=t,ag}var sg,gR;function NV(){if(gR)return sg;gR=1;function e(t,r){return t>r}return sg=e,sg}var ug,mR;function TV(){if(mR)return ug;mR=1;var e=Sx(),t=NV(),r=Ci();function n(i){return i&&i.length?e(i,r,t):void 0}return ug=n,ug}var cg,yR;function xj(){if(yR)return cg;yR=1;var e=xc(),t=_o();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return cg=r,cg}var lg,bR;function AV(){if(bR)return lg;bR=1;var e=Ei(),t=Oc(),r=on(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,u=o.hasOwnProperty,l=a.call(Object);function d(f){if(!r(f)||e(f)!=n)return!1;var h=t(f);if(h===null)return!0;var p=u.call(h,"constructor")&&h.constructor;return typeof p=="function"&&p instanceof p&&a.call(p)==l}return lg=d,lg}var fg,xR;function wj(){if(xR)return fg;xR=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return fg=e,fg}var dg,wR;function MV(){if(wR)return dg;wR=1;var e=Wa(),t=Oi();function r(n){return e(n,t(n))}return dg=r,dg}var hg,_R;function DV(){if(_R)return hg;_R=1;var e=xj(),t=ND(),r=BD(),n=TD(),i=$D(),o=Ga(),a=xt(),u=fj(),l=So(),d=Va(),f=Cr(),h=AV(),p=Ka(),v=wj(),m=MV();function y(x,b,w,E,_,S,R){var I=v(x,w),N=v(b,w),A=R.get(N);if(A){e(x,w,A);return}var L=S?S(I,N,w+"",x,b,R):void 0,B=L===void 0;if(B){var U=a(N),j=!U&&l(N),D=!U&&!j&&p(N);L=N,U||j||D?a(I)?L=I:u(I)?L=n(I):j?(B=!1,L=t(N,!0)):D?(B=!1,L=r(N,!0)):L=[]:h(N)||o(N)?(L=I,o(I)?L=m(I):(!f(I)||d(I))&&(L=i(N))):B=!1}B&&(R.set(N,L),_(L,N,E,S,R),R.delete(N)),e(x,w,L)}return hg=y,hg}var pg,ER;function jV(){if(ER)return pg;ER=1;var e=bc(),t=xj(),r=yx(),n=DV(),i=Cr(),o=Oi(),a=wj();function u(l,d,f,h,p){l!==d&&r(d,function(v,m){if(p||(p=new e),i(v))n(l,d,m,f,u,h,p);else{var y=h?h(a(l,m),v,m+"",l,d,p):void 0;y===void 0&&(y=v),t(l,m,y)}},o)}return pg=u,pg}var vg,SR;function qV(){if(SR)return vg;SR=1;var e=Nc(),t=Tc();function r(n){return e(function(i,o){var a=-1,u=o.length,l=u>1?o[u-1]:void 0,d=u>2?o[2]:void 0;for(l=n.length>3&&typeof l=="function"?(u--,l):void 0,d&&t(o[0],o[1],d)&&(l=u<3?void 0:l,u=1),i=Object(i);++a<u;){var f=o[a];f&&n(i,f,a,l)}return i})}return vg=r,vg}var gg,OR;function kV(){if(OR)return gg;OR=1;var e=jV(),t=qV(),r=t(function(n,i,o){e(n,i,o)});return gg=r,gg}var mg,CR;function _j(){if(CR)return mg;CR=1;function e(t,r){return t<r}return mg=e,mg}var yg,RR;function LV(){if(RR)return yg;RR=1;var e=Sx(),t=_j(),r=Ci();function n(i){return i&&i.length?e(i,r,t):void 0}return yg=n,yg}var bg,IR;function BV(){if(IR)return bg;IR=1;var e=Sx(),t=Sn(),r=_j();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return bg=n,bg}var xg,PR;function FV(){if(PR)return xg;PR=1;var e=Hr(),t=function(){return e.Date.now()};return xg=t,xg}var wg,NR;function $V(){if(NR)return wg;NR=1;var e=wc(),t=Ic(),r=_c(),n=Cr(),i=Ya();function o(a,u,l,d){if(!n(a))return a;u=t(u,a);for(var f=-1,h=u.length,p=h-1,v=a;v!=null&&++f<h;){var m=i(u[f]),y=l;if(m==="__proto__"||m==="constructor"||m==="prototype")return a;if(f!=p){var x=v[m];y=d?d(x,m,v):void 0,y===void 0&&(y=n(x)?x:r(u[f+1])?[]:{})}e(v,m,y),v=v[m]}return a}return wg=o,wg}var _g,TR;function zV(){if(TR)return _g;TR=1;var e=Pc(),t=$V(),r=Ic();function n(i,o,a){for(var u=-1,l=o.length,d={};++u<l;){var f=o[u],h=e(i,f);a(h,f)&&t(d,r(f,i),h)}return d}return _g=n,_g}var Eg,AR;function HV(){if(AR)return Eg;AR=1;var e=zV(),t=ej();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return Eg=r,Eg}var Sg,MR;function UV(){if(MR)return Sg;MR=1;var e=bj(),t=uj(),r=cj();function n(i){return r(t(i,void 0,e),i+"")}return Sg=n,Sg}var Og,DR;function VV(){if(DR)return Og;DR=1;var e=HV(),t=UV(),r=t(function(n,i){return n==null?{}:e(n,i)});return Og=r,Og}var Cg,jR;function WV(){if(jR)return Cg;jR=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var u=-1,l=t(e((i-n)/(o||1)),0),d=Array(l);l--;)d[a?l:++u]=n,n+=o;return d}return Cg=r,Cg}var Rg,qR;function GV(){if(qR)return Rg;qR=1;var e=WV(),t=Tc(),r=yj();function n(i){return function(o,a,u){return u&&typeof u!="number"&&t(o,a,u)&&(a=u=void 0),o=r(o),a===void 0?(a=o,o=0):a=r(a),u=u===void 0?o<a?1:-1:r(u),e(o,a,u,i)}}return Rg=n,Rg}var Ig,kR;function KV(){if(kR)return Ig;kR=1;var e=GV(),t=e();return Ig=t,Ig}var Pg,LR;function YV(){if(LR)return Pg;LR=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Pg=e,Pg}var Ng,BR;function XV(){if(BR)return Ng;BR=1;var e=Co();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,u=e(r),l=n!==void 0,d=n===null,f=n===n,h=e(n);if(!d&&!h&&!u&&r>n||u&&l&&f&&!d&&!h||o&&l&&f||!i&&f||!a)return 1;if(!o&&!u&&!h&&r<n||h&&i&&a&&!o&&!u||d&&i&&a||!l&&a||!f)return-1}return 0}return Ng=t,Ng}var Tg,FR;function ZV(){if(FR)return Tg;FR=1;var e=XV();function t(r,n,i){for(var o=-1,a=r.criteria,u=n.criteria,l=a.length,d=i.length;++o<l;){var f=e(a[o],u[o]);if(f){if(o>=d)return f;var h=i[o];return f*(h=="desc"?-1:1)}}return r.index-n.index}return Tg=t,Tg}var Ag,$R;function JV(){if($R)return Ag;$R=1;var e=Rc(),t=Pc(),r=Sn(),n=oj(),i=YV(),o=Ec(),a=ZV(),u=Ci(),l=xt();function d(f,h,p){h.length?h=e(h,function(y){return l(y)?function(x){return t(x,y.length===1?y[0]:y)}:y}):h=[u];var v=-1;h=e(h,o(r));var m=n(f,function(y,x,b){var w=e(h,function(E){return E(y)});return{criteria:w,index:++v,value:y}});return i(m,function(y,x){return a(y,x,p)})}return Ag=d,Ag}var Mg,zR;function QV(){if(zR)return Mg;zR=1;var e=_x(),t=JV(),r=Nc(),n=Tc(),i=r(function(o,a){if(o==null)return[];var u=a.length;return u>1&&n(o,a[0],a[1])?a=[]:u>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return Mg=i,Mg}var Dg,HR;function eW(){if(HR)return Dg;HR=1;var e=JD(),t=0;function r(n){var i=++t;return e(n)+i}return Dg=r,Dg}var jg,UR;function tW(){if(UR)return jg;UR=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,u={};++i<o;){var l=i<a?r[i]:void 0;n(u,t[i],l)}return u}return jg=e,jg}var qg,VR;function rW(){if(VR)return qg;VR=1;var e=wc(),t=tW();function r(n,i){return t(n||[],i||[],e)}return qg=r,qg}var kg,WR;function ut(){if(WR)return kg;WR=1;var e;if(typeof sx=="function")try{e={cloneDeep:yV(),constant:mx(),defaults:bV(),each:VD(),filter:rj(),find:CV(),flatten:bj(),forEach:UD(),forIn:RV(),has:nj(),isUndefined:ij(),last:IV(),map:aj(),mapValues:PV(),max:TV(),merge:kV(),min:LV(),minBy:BV(),now:FV(),pick:VV(),range:KV(),reduce:sj(),sortBy:QV(),uniqueId:eW(),values:dj(),zipObject:rW()}}catch{}return e||(e=window._),kg=e,kg}var Lg,GR;function nW(){if(GR)return Lg;GR=1,Lg=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return t(i),i},e.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&t(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},e.prototype.toString=function(){for(var n=[],i=this._sentinel,o=i._prev;o!==i;)n.push(JSON.stringify(o,r)),o=o._prev;return"["+n.join(", ")+"]"};function t(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,i){if(n!=="_next"&&n!=="_prev")return i}return Lg}var Bg,KR;function iW(){if(KR)return Bg;KR=1;var e=ut(),t=Fr().Graph,r=nW();Bg=i;var n=e.constant(1);function i(d,f){if(d.nodeCount()<=1)return[];var h=u(d,f||n),p=o(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(p,function(v){return d.outEdges(v.v,v.w)}),!0)}function o(d,f,h){for(var p=[],v=f[f.length-1],m=f[0],y;d.nodeCount();){for(;y=m.dequeue();)a(d,f,h,y);for(;y=v.dequeue();)a(d,f,h,y);if(d.nodeCount()){for(var x=f.length-2;x>0;--x)if(y=f[x].dequeue(),y){p=p.concat(a(d,f,h,y,!0));break}}}return p}function a(d,f,h,p,v){var m=v?[]:void 0;return e.forEach(d.inEdges(p.v),function(y){var x=d.edge(y),b=d.node(y.v);v&&m.push({v:y.v,w:y.w}),b.out-=x,l(f,h,b)}),e.forEach(d.outEdges(p.v),function(y){var x=d.edge(y),b=y.w,w=d.node(b);w.in-=x,l(f,h,w)}),d.removeNode(p.v),m}function u(d,f){var h=new t,p=0,v=0;e.forEach(d.nodes(),function(x){h.setNode(x,{v:x,in:0,out:0})}),e.forEach(d.edges(),function(x){var b=h.edge(x.v,x.w)||0,w=f(x),E=b+w;h.setEdge(x.v,x.w,E),v=Math.max(v,h.node(x.v).out+=w),p=Math.max(p,h.node(x.w).in+=w)});var m=e.range(v+p+3).map(function(){return new r}),y=p+1;return e.forEach(h.nodes(),function(x){l(m,y,h.node(x))}),{graph:h,buckets:m,zeroIdx:y}}function l(d,f,h){h.out?h.in?d[h.out-h.in+f].enqueue(h):d[d.length-1].enqueue(h):d[0].enqueue(h)}return Bg}var Fg,YR;function oW(){if(YR)return Fg;YR=1;var e=ut(),t=iW();Fg={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,u(o)):n(o);e.forEach(a,function(l){var d=o.edge(l);o.removeEdge(l),d.forwardName=l.name,d.reversed=!0,o.setEdge(l.w,l.v,d,e.uniqueId("rev"))});function u(l){return function(d){return l.edge(d).weight}}}function n(o){var a=[],u={},l={};function d(f){e.has(l,f)||(l[f]=!0,u[f]=!0,e.forEach(o.outEdges(f),function(h){e.has(u,h.w)?a.push(h):d(h.w)}),delete u[f])}return e.forEach(o.nodes(),d),a}function i(o){e.forEach(o.edges(),function(a){var u=o.edge(a);if(u.reversed){o.removeEdge(a);var l=u.forwardName;delete u.reversed,delete u.forwardName,o.setEdge(a.w,a.v,u,l)}})}return Fg}var $g,XR;function Yt(){if(XR)return $g;XR=1;var e=ut(),t=Fr().Graph;$g={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:u,buildLayerMatrix:l,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:h,maxRank:p,partition:v,time:m,notime:y};function r(x,b,w,E){var _;do _=e.uniqueId(E);while(x.hasNode(_));return w.dummy=b,x.setNode(_,w),_}function n(x){var b=new t().setGraph(x.graph());return e.forEach(x.nodes(),function(w){b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){var E=b.edge(w.v,w.w)||{weight:0,minlen:1},_=x.edge(w);b.setEdge(w.v,w.w,{weight:E.weight+_.weight,minlen:Math.max(E.minlen,_.minlen)})}),b}function i(x){var b=new t({multigraph:x.isMultigraph()}).setGraph(x.graph());return e.forEach(x.nodes(),function(w){x.children(w).length||b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){b.setEdge(w,x.edge(w))}),b}function o(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.outEdges(w),function(_){E[_.w]=(E[_.w]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function a(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.inEdges(w),function(_){E[_.v]=(E[_.v]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function u(x,b){var w=x.x,E=x.y,_=b.x-w,S=b.y-E,R=x.width/2,I=x.height/2;if(!_&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var N,A;return Math.abs(S)*R>Math.abs(_)*I?(S<0&&(I=-I),N=I*_/S,A=I):(_<0&&(R=-R),N=R,A=R*S/_),{x:w+N,y:E+A}}function l(x){var b=e.map(e.range(p(x)+1),function(){return[]});return e.forEach(x.nodes(),function(w){var E=x.node(w),_=E.rank;e.isUndefined(_)||(b[_][E.order]=w)}),b}function d(x){var b=e.min(e.map(x.nodes(),function(w){return x.node(w).rank}));e.forEach(x.nodes(),function(w){var E=x.node(w);e.has(E,"rank")&&(E.rank-=b)})}function f(x){var b=e.min(e.map(x.nodes(),function(S){return x.node(S).rank})),w=[];e.forEach(x.nodes(),function(S){var R=x.node(S).rank-b;w[R]||(w[R]=[]),w[R].push(S)});var E=0,_=x.graph().nodeRankFactor;e.forEach(w,function(S,R){e.isUndefined(S)&&R%_!==0?--E:E&&e.forEach(S,function(I){x.node(I).rank+=E})})}function h(x,b,w,E){var _={width:0,height:0};return arguments.length>=4&&(_.rank=w,_.order=E),r(x,"border",_,b)}function p(x){return e.max(e.map(x.nodes(),function(b){var w=x.node(b).rank;if(!e.isUndefined(w))return w}))}function v(x,b){var w={lhs:[],rhs:[]};return e.forEach(x,function(E){b(E)?w.lhs.push(E):w.rhs.push(E)}),w}function m(x,b){var w=e.now();try{return b()}finally{console.log(x+" time: "+(e.now()-w)+"ms")}}function y(x,b){return b()}return $g}var zg,ZR;function aW(){if(ZR)return zg;ZR=1;var e=ut(),t=Yt();zg={run:r,undo:i};function r(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){n(o,a)})}function n(o,a){var u=a.v,l=o.node(u).rank,d=a.w,f=o.node(d).rank,h=a.name,p=o.edge(a),v=p.labelRank;if(f!==l+1){o.removeEdge(a);var m,y,x;for(x=0,++l;l<f;++x,++l)p.points=[],y={width:0,height:0,edgeLabel:p,edgeObj:a,rank:l},m=t.addDummyNode(o,"edge",y,"_d"),l===v&&(y.width=p.width,y.height=p.height,y.dummy="edge-label",y.labelpos=p.labelpos),o.setEdge(u,m,{weight:p.weight},h),x===0&&o.graph().dummyChains.push(m),u=m;o.setEdge(u,d,{weight:p.weight},h)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var u=o.node(a),l=u.edgeLabel,d;for(o.setEdge(u.edgeObj,l);u.dummy;)d=o.successors(a)[0],o.removeNode(a),l.points.push({x:u.x,y:u.y}),u.dummy==="edge-label"&&(l.x=u.x,l.y=u.y,l.width=u.width,l.height=u.height),a=d,u=o.node(a)})}return zg}var Hg,JR;function ku(){if(JR)return Hg;JR=1;var e=ut();Hg={longestPath:t,slack:r};function t(n){var i={};function o(a){var u=n.node(a);if(e.has(i,a))return u.rank;i[a]=!0;var l=e.min(e.map(n.outEdges(a),function(d){return o(d.w)-n.edge(d).minlen}));return(l===Number.POSITIVE_INFINITY||l===void 0||l===null)&&(l=0),u.rank=l}e.forEach(n.sources(),o)}function r(n,i){return n.node(i.w).rank-n.node(i.v).rank-n.edge(i).minlen}return Hg}var Ug,QR;function Ej(){if(QR)return Ug;QR=1;var e=ut(),t=Fr().Graph,r=ku().slack;Ug=n;function n(u){var l=new t({directed:!1}),d=u.nodes()[0],f=u.nodeCount();l.setNode(d,{});for(var h,p;i(l,u)<f;)h=o(l,u),p=l.hasNode(h.v)?r(u,h):-r(u,h),a(l,u,p);return l}function i(u,l){function d(f){e.forEach(l.nodeEdges(f),function(h){var p=h.v,v=f===p?h.w:p;!u.hasNode(v)&&!r(l,h)&&(u.setNode(v,{}),u.setEdge(f,v,{}),d(v))})}return e.forEach(u.nodes(),d),u.nodeCount()}function o(u,l){return e.minBy(l.edges(),function(d){if(u.hasNode(d.v)!==u.hasNode(d.w))return r(l,d)})}function a(u,l,d){e.forEach(u.nodes(),function(f){l.node(f).rank+=d})}return Ug}var Vg,eI;function sW(){if(eI)return Vg;eI=1;var e=ut(),t=Ej(),r=ku().slack,n=ku().longestPath,i=Fr().alg.preorder,o=Fr().alg.postorder,a=Yt().simplify;Vg=u,u.initLowLimValues=h,u.initCutValues=l,u.calcCutValue=f,u.leaveEdge=v,u.enterEdge=m,u.exchangeEdges=y;function u(E){E=a(E),n(E);var _=t(E);h(_),l(_,E);for(var S,R;S=v(_);)R=m(_,E,S),y(_,E,S,R)}function l(E,_){var S=o(E,E.nodes());S=S.slice(0,S.length-1),e.forEach(S,function(R){d(E,_,R)})}function d(E,_,S){var R=E.node(S),I=R.parent;E.edge(S,I).cutvalue=f(E,_,S)}function f(E,_,S){var R=E.node(S),I=R.parent,N=!0,A=_.edge(S,I),L=0;return A||(N=!1,A=_.edge(I,S)),L=A.weight,e.forEach(_.nodeEdges(S),function(B){var U=B.v===S,j=U?B.w:B.v;if(j!==I){var D=U===N,G=_.edge(B).weight;if(L+=D?G:-G,b(E,S,j)){var F=E.edge(S,j).cutvalue;L+=D?-F:F}}}),L}function h(E,_){arguments.length<2&&(_=E.nodes()[0]),p(E,{},1,_)}function p(E,_,S,R,I){var N=S,A=E.node(R);return _[R]=!0,e.forEach(E.neighbors(R),function(L){e.has(_,L)||(S=p(E,_,S,L,R))}),A.low=N,A.lim=S++,I?A.parent=I:delete A.parent,S}function v(E){return e.find(E.edges(),function(_){return E.edge(_).cutvalue<0})}function m(E,_,S){var R=S.v,I=S.w;_.hasEdge(R,I)||(R=S.w,I=S.v);var N=E.node(R),A=E.node(I),L=N,B=!1;N.lim>A.lim&&(L=A,B=!0);var U=e.filter(_.edges(),function(j){return B===w(E,E.node(j.v),L)&&B!==w(E,E.node(j.w),L)});return e.minBy(U,function(j){return r(_,j)})}function y(E,_,S,R){var I=S.v,N=S.w;E.removeEdge(I,N),E.setEdge(R.v,R.w,{}),h(E),l(E,_),x(E,_)}function x(E,_){var S=e.find(E.nodes(),function(I){return!_.node(I).parent}),R=i(E,S);R=R.slice(1),e.forEach(R,function(I){var N=E.node(I).parent,A=_.edge(I,N),L=!1;A||(A=_.edge(N,I),L=!0),_.node(I).rank=_.node(N).rank+(L?A.minlen:-A.minlen)})}function b(E,_,S){return E.hasEdge(_,S)}function w(E,_,S){return S.low<=_.lim&&_.lim<=S.lim}return Vg}var Wg,tI;function uW(){if(tI)return Wg;tI=1;var e=ku(),t=e.longestPath,r=Ej(),n=sW();Wg=i;function i(l){switch(l.graph().ranker){case"network-simplex":u(l);break;case"tight-tree":a(l);break;case"longest-path":o(l);break;default:u(l)}}var o=t;function a(l){t(l),r(l)}function u(l){n(l)}return Wg}var Gg,rI;function cW(){if(rI)return Gg;rI=1;var e=ut();Gg=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var u=i.node(a),l=u.edgeObj,d=r(i,o,l.v,l.w),f=d.path,h=d.lca,p=0,v=f[p],m=!0;a!==l.w;){if(u=i.node(a),m){for(;(v=f[p])!==h&&i.node(v).maxRank<u.rank;)p++;v===h&&(m=!1)}if(!m){for(;p<f.length-1&&i.node(v=f[p+1]).minRank<=u.rank;)p++;v=f[p]}i.setParent(a,v),a=i.successors(a)[0]}})}function r(i,o,a,u){var l=[],d=[],f=Math.min(o[a].low,o[u].low),h=Math.max(o[a].lim,o[u].lim),p,v;p=a;do p=i.parent(p),l.push(p);while(p&&(o[p].low>f||h>o[p].lim));for(v=p,p=u;(p=i.parent(p))!==v;)d.push(p);return{path:l.concat(d.reverse()),lca:v}}function n(i){var o={},a=0;function u(l){var d=a;e.forEach(i.children(l),u),o[l]={low:d,lim:a++}}return e.forEach(i.children(),u),o}return Gg}var Kg,nI;function lW(){if(nI)return Kg;nI=1;var e=ut(),t=Yt();Kg={run:r,cleanup:a};function r(u){var l=t.addDummyNode(u,"root",{},"_root"),d=i(u),f=e.max(e.values(d))-1,h=2*f+1;u.graph().nestingRoot=l,e.forEach(u.edges(),function(v){u.edge(v).minlen*=h});var p=o(u)+1;e.forEach(u.children(),function(v){n(u,l,h,p,f,d,v)}),u.graph().nodeRankFactor=h}function n(u,l,d,f,h,p,v){var m=u.children(v);if(!m.length){v!==l&&u.setEdge(l,v,{weight:0,minlen:d});return}var y=t.addBorderNode(u,"_bt"),x=t.addBorderNode(u,"_bb"),b=u.node(v);u.setParent(y,v),b.borderTop=y,u.setParent(x,v),b.borderBottom=x,e.forEach(m,function(w){n(u,l,d,f,h,p,w);var E=u.node(w),_=E.borderTop?E.borderTop:w,S=E.borderBottom?E.borderBottom:w,R=E.borderTop?f:2*f,I=_!==S?1:h-p[v]+1;u.setEdge(y,_,{weight:R,minlen:I,nestingEdge:!0}),u.setEdge(S,x,{weight:R,minlen:I,nestingEdge:!0})}),u.parent(v)||u.setEdge(l,y,{weight:0,minlen:h+p[v]})}function i(u){var l={};function d(f,h){var p=u.children(f);p&&p.length&&e.forEach(p,function(v){d(v,h+1)}),l[f]=h}return e.forEach(u.children(),function(f){d(f,1)}),l}function o(u){return e.reduce(u.edges(),function(l,d){return l+u.edge(d).weight},0)}function a(u){var l=u.graph();u.removeNode(l.nestingRoot),delete l.nestingRoot,e.forEach(u.edges(),function(d){var f=u.edge(d);f.nestingEdge&&u.removeEdge(d)})}return Kg}var Yg,iI;function fW(){if(iI)return Yg;iI=1;var e=ut(),t=Yt();Yg=r;function r(i){function o(a){var u=i.children(a),l=i.node(a);if(u.length&&e.forEach(u,o),e.has(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(var d=l.minRank,f=l.maxRank+1;d<f;++d)n(i,"borderLeft","_bl",a,l,d),n(i,"borderRight","_br",a,l,d)}}e.forEach(i.children(),o)}function n(i,o,a,u,l,d){var f={width:0,height:0,rank:d,borderType:o},h=l[o][d-1],p=t.addDummyNode(i,"border",f,a);l[o][d]=p,i.setParent(p,u),h&&i.setEdge(h,p,{weight:1})}return Yg}var Xg,oI;function dW(){if(oI)return Xg;oI=1;var e=ut();Xg={adjust:t,undo:r};function t(d){var f=d.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&n(d)}function r(d){var f=d.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&o(d),(f==="lr"||f==="rl")&&(u(d),n(d))}function n(d){e.forEach(d.nodes(),function(f){i(d.node(f))}),e.forEach(d.edges(),function(f){i(d.edge(f))})}function i(d){var f=d.width;d.width=d.height,d.height=f}function o(d){e.forEach(d.nodes(),function(f){a(d.node(f))}),e.forEach(d.edges(),function(f){var h=d.edge(f);e.forEach(h.points,a),e.has(h,"y")&&a(h)})}function a(d){d.y=-d.y}function u(d){e.forEach(d.nodes(),function(f){l(d.node(f))}),e.forEach(d.edges(),function(f){var h=d.edge(f);e.forEach(h.points,l),e.has(h,"x")&&l(h)})}function l(d){var f=d.x;d.x=d.y,d.y=f}return Xg}var Zg,aI;function hW(){if(aI)return Zg;aI=1;var e=ut();Zg=t;function t(r){var n={},i=e.filter(r.nodes(),function(d){return!r.children(d).length}),o=e.max(e.map(i,function(d){return r.node(d).rank})),a=e.map(e.range(o+1),function(){return[]});function u(d){if(!e.has(n,d)){n[d]=!0;var f=r.node(d);a[f.rank].push(d),e.forEach(r.successors(d),u)}}var l=e.sortBy(i,function(d){return r.node(d).rank});return e.forEach(l,u),a}return Zg}var Jg,sI;function pW(){if(sI)return Jg;sI=1;var e=ut();Jg=t;function t(n,i){for(var o=0,a=1;a<i.length;++a)o+=r(n,i[a-1],i[a]);return o}function r(n,i,o){for(var a=e.zipObject(o,e.map(o,function(p,v){return v})),u=e.flatten(e.map(i,function(p){return e.sortBy(e.map(n.outEdges(p),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),l=1;l<o.length;)l<<=1;var d=2*l-1;l-=1;var f=e.map(new Array(d),function(){return 0}),h=0;return e.forEach(u.forEach(function(p){var v=p.pos+l;f[v]+=p.weight;for(var m=0;v>0;)v%2&&(m+=f[v+1]),v=v-1>>1,f[v]+=p.weight;h+=p.weight*m})),h}return Jg}var Qg,uI;function vW(){if(uI)return Qg;uI=1;var e=ut();Qg=t;function t(r,n){return e.map(n,function(i){var o=r.inEdges(i);if(o.length){var a=e.reduce(o,function(u,l){var d=r.edge(l),f=r.node(l.v);return{sum:u.sum+d.weight*f.order,weight:u.weight+d.weight}},{sum:0,weight:0});return{v:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return Qg}var em,cI;function gW(){if(cI)return em;cI=1;var e=ut();em=t;function t(i,o){var a={};e.forEach(i,function(l,d){var f=a[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:d};e.isUndefined(l.barycenter)||(f.barycenter=l.barycenter,f.weight=l.weight)}),e.forEach(o.edges(),function(l){var d=a[l.v],f=a[l.w];!e.isUndefined(d)&&!e.isUndefined(f)&&(f.indegree++,d.out.push(a[l.w]))});var u=e.filter(a,function(l){return!l.indegree});return r(u)}function r(i){var o=[];function a(d){return function(f){f.merged||(e.isUndefined(f.barycenter)||e.isUndefined(d.barycenter)||f.barycenter>=d.barycenter)&&n(d,f)}}function u(d){return function(f){f.in.push(d),--f.indegree===0&&i.push(f)}}for(;i.length;){var l=i.pop();o.push(l),e.forEach(l.in.reverse(),a(l)),e.forEach(l.out,u(l))}return e.map(e.filter(o,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(i,o){var a=0,u=0;i.weight&&(a+=i.barycenter*i.weight,u+=i.weight),o.weight&&(a+=o.barycenter*o.weight,u+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/u,i.weight=u,i.i=Math.min(o.i,i.i),o.merged=!0}return em}var tm,lI;function mW(){if(lI)return tm;lI=1;var e=ut(),t=Yt();tm=r;function r(o,a){var u=t.partition(o,function(y){return e.has(y,"barycenter")}),l=u.lhs,d=e.sortBy(u.rhs,function(y){return-y.i}),f=[],h=0,p=0,v=0;l.sort(i(!!a)),v=n(f,d,v),e.forEach(l,function(y){v+=y.vs.length,f.push(y.vs),h+=y.barycenter*y.weight,p+=y.weight,v=n(f,d,v)});var m={vs:e.flatten(f,!0)};return p&&(m.barycenter=h/p,m.weight=p),m}function n(o,a,u){for(var l;a.length&&(l=e.last(a)).i<=u;)a.pop(),o.push(l.vs),u++;return u}function i(o){return function(a,u){return a.barycenter<u.barycenter?-1:a.barycenter>u.barycenter?1:o?u.i-a.i:a.i-u.i}}return tm}var rm,fI;function yW(){if(fI)return rm;fI=1;var e=ut(),t=vW(),r=gW(),n=mW();rm=i;function i(u,l,d,f){var h=u.children(l),p=u.node(l),v=p?p.borderLeft:void 0,m=p?p.borderRight:void 0,y={};v&&(h=e.filter(h,function(S){return S!==v&&S!==m}));var x=t(u,h);e.forEach(x,function(S){if(u.children(S.v).length){var R=i(u,S.v,d,f);y[S.v]=R,e.has(R,"barycenter")&&a(S,R)}});var b=r(x,d);o(b,y);var w=n(b,f);if(v&&(w.vs=e.flatten([v,w.vs,m],!0),u.predecessors(v).length)){var E=u.node(u.predecessors(v)[0]),_=u.node(u.predecessors(m)[0]);e.has(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+E.order+_.order)/(w.weight+2),w.weight+=2}return w}function o(u,l){e.forEach(u,function(d){d.vs=e.flatten(d.vs.map(function(f){return l[f]?l[f].vs:f}),!0)})}function a(u,l){e.isUndefined(u.barycenter)?(u.barycenter=l.barycenter,u.weight=l.weight):(u.barycenter=(u.barycenter*u.weight+l.barycenter*l.weight)/(u.weight+l.weight),u.weight+=l.weight)}return rm}var nm,dI;function bW(){if(dI)return nm;dI=1;var e=ut(),t=Fr().Graph;nm=r;function r(i,o,a){var u=n(i),l=new t({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(d){return i.node(d)});return e.forEach(i.nodes(),function(d){var f=i.node(d),h=i.parent(d);(f.rank===o||f.minRank<=o&&o<=f.maxRank)&&(l.setNode(d),l.setParent(d,h||u),e.forEach(i[a](d),function(p){var v=p.v===d?p.w:p.v,m=l.edge(v,d),y=e.isUndefined(m)?0:m.weight;l.setEdge(v,d,{weight:i.edge(p).weight+y})}),e.has(f,"minRank")&&l.setNode(d,{borderLeft:f.borderLeft[o],borderRight:f.borderRight[o]}))}),l}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return nm}var im,hI;function xW(){if(hI)return im;hI=1;var e=ut();im=t;function t(r,n,i){var o={},a;e.forEach(i,function(u){for(var l=r.parent(u),d,f;l;){if(d=r.parent(l),d?(f=o[d],o[d]=l):(f=a,a=l),f&&f!==l){n.setEdge(f,l);return}l=d}})}return im}var om,pI;function wW(){if(pI)return om;pI=1;var e=ut(),t=hW(),r=pW(),n=yW(),i=bW(),o=xW(),a=Fr().Graph,u=Yt();om=l;function l(p){var v=u.maxRank(p),m=d(p,e.range(1,v+1),"inEdges"),y=d(p,e.range(v-1,-1,-1),"outEdges"),x=t(p);h(p,x);for(var b=Number.POSITIVE_INFINITY,w,E=0,_=0;_<4;++E,++_){f(E%2?m:y,E%4>=2),x=u.buildLayerMatrix(p);var S=r(p,x);S<b&&(_=0,w=e.cloneDeep(x),b=S)}h(p,w)}function d(p,v,m){return e.map(v,function(y){return i(p,y,m)})}function f(p,v){var m=new a;e.forEach(p,function(y){var x=y.graph().root,b=n(y,x,m,v);e.forEach(b.vs,function(w,E){y.node(w).order=E}),o(y,m,b.vs)})}function h(p,v){e.forEach(v,function(m){e.forEach(m,function(y,x){p.node(y).order=x})})}return om}var am,vI;function _W(){if(vI)return am;vI=1;var e=ut(),t=Fr().Graph,r=Yt();am={positionX:m,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:u,verticalAlignment:l,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(b,w){var E={};function _(S,R){var I=0,N=0,A=S.length,L=e.last(R);return e.forEach(R,function(B,U){var j=o(b,B),D=j?b.node(j).order:A;(j||B===L)&&(e.forEach(R.slice(N,U+1),function(G){e.forEach(b.predecessors(G),function(F){var X=b.node(F),Z=X.order;(Z<I||D<Z)&&!(X.dummy&&b.node(G).dummy)&&a(E,F,G)})}),N=U+1,I=D)}),R}return e.reduce(w,_),E}function i(b,w){var E={};function _(R,I,N,A,L){var B;e.forEach(e.range(I,N),function(U){B=R[U],b.node(B).dummy&&e.forEach(b.predecessors(B),function(j){var D=b.node(j);D.dummy&&(D.order<A||D.order>L)&&a(E,j,B)})})}function S(R,I){var N=-1,A,L=0;return e.forEach(I,function(B,U){if(b.node(B).dummy==="border"){var j=b.predecessors(B);j.length&&(A=b.node(j[0]).order,_(I,L,U,N,A),L=U,N=A)}_(I,L,I.length,A,R.length)}),I}return e.reduce(w,S),E}function o(b,w){if(b.node(w).dummy)return e.find(b.predecessors(w),function(E){return b.node(E).dummy})}function a(b,w,E){if(w>E){var _=w;w=E,E=_}var S=b[w];S||(b[w]=S={}),S[E]=!0}function u(b,w,E){if(w>E){var _=w;w=E,E=_}return e.has(b[w],E)}function l(b,w,E,_){var S={},R={},I={};return e.forEach(w,function(N){e.forEach(N,function(A,L){S[A]=A,R[A]=A,I[A]=L})}),e.forEach(w,function(N){var A=-1;e.forEach(N,function(L){var B=_(L);if(B.length){B=e.sortBy(B,function(F){return I[F]});for(var U=(B.length-1)/2,j=Math.floor(U),D=Math.ceil(U);j<=D;++j){var G=B[j];R[L]===L&&A<I[G]&&!u(E,L,G)&&(R[G]=L,R[L]=S[L]=S[G],A=I[G])}}})}),{root:S,align:R}}function d(b,w,E,_,S){var R={},I=f(b,w,E,S),N=S?"borderLeft":"borderRight";function A(U,j){for(var D=I.nodes(),G=D.pop(),F={};G;)F[G]?U(G):(F[G]=!0,D.push(G),D=D.concat(j(G))),G=D.pop()}function L(U){R[U]=I.inEdges(U).reduce(function(j,D){return Math.max(j,R[D.v]+I.edge(D))},0)}function B(U){var j=I.outEdges(U).reduce(function(G,F){return Math.min(G,R[F.w]-I.edge(F))},Number.POSITIVE_INFINITY),D=b.node(U);j!==Number.POSITIVE_INFINITY&&D.borderType!==N&&(R[U]=Math.max(R[U],j))}return A(L,I.predecessors.bind(I)),A(B,I.successors.bind(I)),e.forEach(_,function(U){R[U]=R[E[U]]}),R}function f(b,w,E,_){var S=new t,R=b.graph(),I=y(R.nodesep,R.edgesep,_);return e.forEach(w,function(N){var A;e.forEach(N,function(L){var B=E[L];if(S.setNode(B),A){var U=E[A],j=S.edge(U,B);S.setEdge(U,B,Math.max(I(b,L,A),j||0))}A=L})}),S}function h(b,w){return e.minBy(e.values(w),function(E){var _=Number.NEGATIVE_INFINITY,S=Number.POSITIVE_INFINITY;return e.forIn(E,function(R,I){var N=x(b,I)/2;_=Math.max(R+N,_),S=Math.min(R-N,S)}),_-S})}function p(b,w){var E=e.values(w),_=e.min(E),S=e.max(E);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(I){var N=R+I,A=b[N],L;if(A!==w){var B=e.values(A);L=I==="l"?_-e.min(B):S-e.max(B),L&&(b[N]=e.mapValues(A,function(U){return U+L}))}})})}function v(b,w){return e.mapValues(b.ul,function(E,_){if(w)return b[w.toLowerCase()][_];var S=e.sortBy(e.map(b,_));return(S[1]+S[2])/2})}function m(b){var w=r.buildLayerMatrix(b),E=e.merge(n(b,w),i(b,w)),_={},S;e.forEach(["u","d"],function(I){S=I==="u"?w:e.values(w).reverse(),e.forEach(["l","r"],function(N){N==="r"&&(S=e.map(S,function(U){return e.values(U).reverse()}));var A=(I==="u"?b.predecessors:b.successors).bind(b),L=l(b,S,E,A),B=d(b,S,L.root,L.align,N==="r");N==="r"&&(B=e.mapValues(B,function(U){return-U})),_[I+N]=B})});var R=h(b,_);return p(_,R),v(_,b.graph().align)}function y(b,w,E){return function(_,S,R){var I=_.node(S),N=_.node(R),A=0,L;if(A+=I.width/2,e.has(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":L=-I.width/2;break;case"r":L=I.width/2;break}if(L&&(A+=E?L:-L),L=0,A+=(I.dummy?w:b)/2,A+=(N.dummy?w:b)/2,A+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":L=N.width/2;break;case"r":L=-N.width/2;break}return L&&(A+=E?L:-L),L=0,A}}function x(b,w){return b.node(w).width}return am}var sm,gI;function EW(){if(gI)return sm;gI=1;var e=ut(),t=Yt(),r=_W().positionX;sm=n;function n(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(r(o),function(a,u){o.node(u).x=a})}function i(o){var a=t.buildLayerMatrix(o),u=o.graph().ranksep,l=0;e.forEach(a,function(d){var f=e.max(e.map(d,function(h){return o.node(h).height}));e.forEach(d,function(h){o.node(h).y=l+f/2}),l+=f+u})}return sm}var um,mI;function SW(){if(mI)return um;mI=1;var e=ut(),t=oW(),r=aW(),n=uW(),i=Yt().normalizeRanks,o=cW(),a=Yt().removeEmptyRanks,u=lW(),l=fW(),d=dW(),f=wW(),h=EW(),p=Yt(),v=Fr().Graph;um=m;function m(H,K){var $=K&&K.debugTiming?p.time:p.notime;$("layout",function(){var k=$(" buildLayoutGraph",function(){return A(H)});$(" runLayout",function(){y(k,$)}),$(" updateInputGraph",function(){x(H,k)})})}function y(H,K){K(" makeSpaceForEdgeLabels",function(){L(H)}),K(" removeSelfEdges",function(){Q(H)}),K(" acyclic",function(){t.run(H)}),K(" nestingGraph.run",function(){u.run(H)}),K(" rank",function(){n(p.asNonCompoundGraph(H))}),K(" injectEdgeLabelProxies",function(){B(H)}),K(" removeEmptyRanks",function(){a(H)}),K(" nestingGraph.cleanup",function(){u.cleanup(H)}),K(" normalizeRanks",function(){i(H)}),K(" assignRankMinMax",function(){U(H)}),K(" removeEdgeLabelProxies",function(){j(H)}),K(" normalize.run",function(){r.run(H)}),K(" parentDummyChains",function(){o(H)}),K(" addBorderSegments",function(){l(H)}),K(" order",function(){f(H)}),K(" insertSelfEdges",function(){W(H)}),K(" adjustCoordinateSystem",function(){d.adjust(H)}),K(" position",function(){h(H)}),K(" positionSelfEdges",function(){ee(H)}),K(" removeBorderNodes",function(){Z(H)}),K(" normalize.undo",function(){r.undo(H)}),K(" fixupEdgeLabelCoords",function(){F(H)}),K(" undoCoordinateSystem",function(){d.undo(H)}),K(" translateGraph",function(){D(H)}),K(" assignNodeIntersects",function(){G(H)}),K(" reversePoints",function(){X(H)}),K(" acyclic.undo",function(){t.undo(H)})}function x(H,K){e.forEach(H.nodes(),function($){var k=H.node($),z=K.node($);k&&(k.x=z.x,k.y=z.y,K.children($).length&&(k.width=z.width,k.height=z.height))}),e.forEach(H.edges(),function($){var k=H.edge($),z=K.edge($);k.points=z.points,e.has(z,"x")&&(k.x=z.x,k.y=z.y)}),H.graph().width=K.graph().width,H.graph().height=K.graph().height}var b=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],_=["width","height"],S={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],I={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},N=["labelpos"];function A(H){var K=new v({multigraph:!0,compound:!0}),$=ae(H.graph());return K.setGraph(e.merge({},w,oe($,b),e.pick($,E))),e.forEach(H.nodes(),function(k){var z=ae(H.node(k));K.setNode(k,e.defaults(oe(z,_),S)),K.setParent(k,H.parent(k))}),e.forEach(H.edges(),function(k){var z=ae(H.edge(k));K.setEdge(k,e.merge({},I,oe(z,R),e.pick(z,N)))}),K}function L(H){var K=H.graph();K.ranksep/=2,e.forEach(H.edges(),function($){var k=H.edge($);k.minlen*=2,k.labelpos.toLowerCase()!=="c"&&(K.rankdir==="TB"||K.rankdir==="BT"?k.width+=k.labeloffset:k.height+=k.labeloffset)})}function B(H){e.forEach(H.edges(),function(K){var $=H.edge(K);if($.width&&$.height){var k=H.node(K.v),z=H.node(K.w),re={rank:(z.rank-k.rank)/2+k.rank,e:K};p.addDummyNode(H,"edge-proxy",re,"_ep")}})}function U(H){var K=0;e.forEach(H.nodes(),function($){var k=H.node($);k.borderTop&&(k.minRank=H.node(k.borderTop).rank,k.maxRank=H.node(k.borderBottom).rank,K=e.max(K,k.maxRank))}),H.graph().maxRank=K}function j(H){e.forEach(H.nodes(),function(K){var $=H.node(K);$.dummy==="edge-proxy"&&(H.edge($.e).labelRank=$.rank,H.removeNode(K))})}function D(H){var K=Number.POSITIVE_INFINITY,$=0,k=Number.POSITIVE_INFINITY,z=0,re=H.graph(),ie=re.marginx||0,se=re.marginy||0;function ce(be){var Ce=be.x,_e=be.y,he=be.width,fe=be.height;K=Math.min(K,Ce-he/2),$=Math.max($,Ce+he/2),k=Math.min(k,_e-fe/2),z=Math.max(z,_e+fe/2)}e.forEach(H.nodes(),function(be){ce(H.node(be))}),e.forEach(H.edges(),function(be){var Ce=H.edge(be);e.has(Ce,"x")&&ce(Ce)}),K-=ie,k-=se,e.forEach(H.nodes(),function(be){var Ce=H.node(be);Ce.x-=K,Ce.y-=k}),e.forEach(H.edges(),function(be){var Ce=H.edge(be);e.forEach(Ce.points,function(_e){_e.x-=K,_e.y-=k}),e.has(Ce,"x")&&(Ce.x-=K),e.has(Ce,"y")&&(Ce.y-=k)}),re.width=$-K+ie,re.height=z-k+se}function G(H){e.forEach(H.edges(),function(K){var $=H.edge(K),k=H.node(K.v),z=H.node(K.w),re,ie;$.points?(re=$.points[0],ie=$.points[$.points.length-1]):($.points=[],re=z,ie=k),$.points.unshift(p.intersectRect(k,re)),$.points.push(p.intersectRect(z,ie))})}function F(H){e.forEach(H.edges(),function(K){var $=H.edge(K);if(e.has($,"x"))switch(($.labelpos==="l"||$.labelpos==="r")&&($.width-=$.labeloffset),$.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}})}function X(H){e.forEach(H.edges(),function(K){var $=H.edge(K);$.reversed&&$.points.reverse()})}function Z(H){e.forEach(H.nodes(),function(K){if(H.children(K).length){var $=H.node(K),k=H.node($.borderTop),z=H.node($.borderBottom),re=H.node(e.last($.borderLeft)),ie=H.node(e.last($.borderRight));$.width=Math.abs(ie.x-re.x),$.height=Math.abs(z.y-k.y),$.x=re.x+$.width/2,$.y=k.y+$.height/2}}),e.forEach(H.nodes(),function(K){H.node(K).dummy==="border"&&H.removeNode(K)})}function Q(H){e.forEach(H.edges(),function(K){if(K.v===K.w){var $=H.node(K.v);$.selfEdges||($.selfEdges=[]),$.selfEdges.push({e:K,label:H.edge(K)}),H.removeEdge(K)}})}function W(H){var K=p.buildLayerMatrix(H);e.forEach(K,function($){var k=0;e.forEach($,function(z,re){var ie=H.node(z);ie.order=re+k,e.forEach(ie.selfEdges,function(se){p.addDummyNode(H,"selfedge",{width:se.label.width,height:se.label.height,rank:ie.rank,order:re+ ++k,e:se.e,label:se.label},"_se")}),delete ie.selfEdges})})}function ee(H){e.forEach(H.nodes(),function(K){var $=H.node(K);if($.dummy==="selfedge"){var k=H.node($.e.v),z=k.x+k.width/2,re=k.y,ie=$.x-z,se=k.height/2;H.setEdge($.e,$.label),H.removeNode(K),$.label.points=[{x:z+2*ie/3,y:re-se},{x:z+5*ie/6,y:re-se},{x:z+ie,y:re},{x:z+5*ie/6,y:re+se},{x:z+2*ie/3,y:re+se}],$.label.x=$.x,$.label.y=$.y}})}function oe(H,K){return e.mapValues(e.pick(H,K),Number)}function ae(H){var K={};return e.forEach(H,function($,k){K[k.toLowerCase()]=$}),K}return um}var cm,yI;function OW(){if(yI)return cm;yI=1;var e=ut(),t=Yt(),r=Fr().Graph;cm={debugOrdering:n};function n(i){var o=t.buildLayerMatrix(i),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(u){a.setNode(u,{label:u}),a.setParent(u,"layer"+i.node(u).rank)}),e.forEach(i.edges(),function(u){a.setEdge(u.v,u.w,{},u.name)}),e.forEach(o,function(u,l){var d="layer"+l;a.setNode(d,{rank:"same"}),e.reduce(u,function(f,h){return a.setEdge(f,h,{style:"invis"}),h})}),a}return cm}var lm,bI;function CW(){return bI||(bI=1,lm="0.8.5"),lm}var fm,xI;function RW(){return xI||(xI=1,fm={graphlib:Fr(),layout:SW(),debug:OW(),util:{time:Yt().time,notime:Yt().notime},version:CW()}),fm}var IW=RW();const wI=Un(IW);function PW(e){let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(h!==t){const p=t;t=f?h:Object.assign({},t,h),r.forEach(v=>v(t,p))}},i=()=>t,o=(d,f=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=f(t);function v(){const m=f(t);if(!h(p,m)){const y=p;d(p=m,y)}}return r.add(v),()=>r.delete(v)},l={setState:n,getState:i,subscribe:(d,f,h)=>f||h?o(d,f,h):(r.add(d),()=>r.delete(d)),destroy:()=>r.clear()};return t=e(n,i,l),l}const NW=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),_I=NW?T.useEffect:T.useLayoutEffect;function TW(e){const t=typeof e=="function"?PW(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=T.useReducer(x=>x+1,0),a=t.getState(),u=T.useRef(a),l=T.useRef(n),d=T.useRef(i),f=T.useRef(!1),h=T.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(u.current!==a||l.current!==n||d.current!==i||f.current)&&(p=n(a),v=!i(h.current,p)),_I(()=>{v&&(h.current=p),u.current=a,l.current=n,d.current=i,f.current=!1});const m=T.useRef(a);_I(()=>{const x=()=>{try{const w=t.getState(),E=l.current(w);d.current(h.current,E)||(u.current=w,h.current=E,o())}catch{f.current=!0,o()}},b=t.subscribe(x);return t.getState()!==m.current&&x(),b},[]);const y=v?p:h.current;return T.useDebugValue(y),y};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const i=n.length<=0;return{value:n.shift(),done:i}}}},r}function AW(){const e=T.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const u=T.useRef();return u.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),u.current=o()),T.createElement(e.Provider,{value:u.current},a)},useStore:(i,o=Object.is)=>{const a=T.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(i,o)},useStoreApi:()=>{const i=T.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return T.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var MW={value:()=>{}};function Ac(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Ru(r)}function Ru(e){this._=e}function DW(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Ru.prototype=Ac.prototype={constructor:Ru,on:function(e,t){var r=this._,n=DW(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=jW(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=EI(r[i],e.name,t);else if(t==null)for(i in r)r[i]=EI(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ru(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function jW(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function EI(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=MW,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ib="http://www.w3.org/1999/xhtml";const SI={svg:"http://www.w3.org/2000/svg",xhtml:Ib,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),SI.hasOwnProperty(t)?{space:SI[t],local:e}:e}function qW(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ib&&t.documentElement.namespaceURI===Ib?t.createElement(e):t.createElementNS(r,e)}}function kW(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sj(e){var t=Mc(e);return(t.local?kW:qW)(t)}function LW(){}function Ox(e){return e==null?LW:function(){return this.querySelector(e)}}function BW(e){typeof e!="function"&&(e=Ox(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=new Array(a),l,d,f=0;f<a;++f)(l=o[f])&&(d=e.call(l,l.__data__,f,o))&&("__data__"in l&&(d.__data__=l.__data__),u[f]=d);return new cr(n,this._parents)}function FW(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function $W(){return[]}function Oj(e){return e==null?$W:function(){return this.querySelectorAll(e)}}function zW(e){return function(){return FW(e.apply(this,arguments))}}function HW(e){typeof e=="function"?e=zW(e):e=Oj(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],u=a.length,l,d=0;d<u;++d)(l=a[d])&&(n.push(e.call(l,l.__data__,d,a)),i.push(l));return new cr(n,i)}function Cj(e){return function(){return this.matches(e)}}function Rj(e){return function(t){return t.matches(e)}}var UW=Array.prototype.find;function VW(e){return function(){return UW.call(this.children,e)}}function WW(){return this.firstElementChild}function GW(e){return this.select(e==null?WW:VW(typeof e=="function"?e:Rj(e)))}var KW=Array.prototype.filter;function YW(){return Array.from(this.children)}function XW(e){return function(){return KW.call(this.children,e)}}function ZW(e){return this.selectAll(e==null?YW:XW(typeof e=="function"?e:Rj(e)))}function JW(e){typeof e!="function"&&(e=Cj(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=[],l,d=0;d<a;++d)(l=o[d])&&e.call(l,l.__data__,d,o)&&u.push(l);return new cr(n,this._parents)}function Ij(e){return new Array(e.length)}function QW(){return new cr(this._enter||this._groups.map(Ij),this._parents)}function Lu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Lu.prototype={constructor:Lu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function e6(e){return function(){return e}}function t6(e,t,r,n,i,o){for(var a=0,u,l=t.length,d=o.length;a<d;++a)(u=t[a])?(u.__data__=o[a],n[a]=u):r[a]=new Lu(e,o[a]);for(;a<l;++a)(u=t[a])&&(i[a]=u)}function r6(e,t,r,n,i,o,a){var u,l,d=new Map,f=t.length,h=o.length,p=new Array(f),v;for(u=0;u<f;++u)(l=t[u])&&(p[u]=v=a.call(l,l.__data__,u,t)+"",d.has(v)?i[u]=l:d.set(v,l));for(u=0;u<h;++u)v=a.call(e,o[u],u,o)+"",(l=d.get(v))?(n[u]=l,l.__data__=o[u],d.delete(v)):r[u]=new Lu(e,o[u]);for(u=0;u<f;++u)(l=t[u])&&d.get(p[u])===l&&(i[u]=l)}function n6(e){return e.__data__}function i6(e,t){if(!arguments.length)return Array.from(this,n6);var r=t?r6:t6,n=this._parents,i=this._groups;typeof e!="function"&&(e=e6(e));for(var o=i.length,a=new Array(o),u=new Array(o),l=new Array(o),d=0;d<o;++d){var f=n[d],h=i[d],p=h.length,v=o6(e.call(f,f&&f.__data__,d,n)),m=v.length,y=u[d]=new Array(m),x=a[d]=new Array(m),b=l[d]=new Array(p);r(f,h,y,x,b,v,t);for(var w=0,E=0,_,S;w<m;++w)if(_=y[w]){for(w>=E&&(E=w+1);!(S=x[E])&&++E<m;);_._next=S||null}}return a=new cr(a,n),a._enter=u,a._exit=l,a}function o6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function a6(){return new cr(this._exit||this._groups.map(Ij),this._parents)}function s6(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function u6(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),u=new Array(i),l=0;l<a;++l)for(var d=r[l],f=n[l],h=d.length,p=u[l]=new Array(h),v,m=0;m<h;++m)(v=d[m]||f[m])&&(p[m]=v);for(;l<i;++l)u[l]=r[l];return new cr(u,this._parents)}function c6(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function l6(e){e||(e=f6);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],u=a.length,l=i[o]=new Array(u),d,f=0;f<u;++f)(d=a[f])&&(l[f]=d);l.sort(t)}return new cr(i,this._parents).order()}function f6(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function d6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function h6(){return Array.from(this)}function p6(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function v6(){let e=0;for(const t of this)++e;return e}function g6(){return!this.node()}function m6(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,u;o<a;++o)(u=i[o])&&e.call(u,u.__data__,o,i);return this}function y6(e){return function(){this.removeAttribute(e)}}function b6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function x6(e,t){return function(){this.setAttribute(e,t)}}function w6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function _6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function E6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function S6(e,t){var r=Mc(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?b6:y6:typeof t=="function"?r.local?E6:_6:r.local?w6:x6)(r,t))}function Pj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function O6(e){return function(){this.style.removeProperty(e)}}function C6(e,t,r){return function(){this.style.setProperty(e,t,r)}}function R6(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function I6(e,t,r){return arguments.length>1?this.each((t==null?O6:typeof t=="function"?R6:C6)(e,t,r??"")):yo(this.node(),e)}function yo(e,t){return e.style.getPropertyValue(t)||Pj(e).getComputedStyle(e,null).getPropertyValue(t)}function P6(e){return function(){delete this[e]}}function N6(e,t){return function(){this[e]=t}}function T6(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function A6(e,t){return arguments.length>1?this.each((t==null?P6:typeof t=="function"?T6:N6)(e,t)):this.node()[e]}function Nj(e){return e.trim().split(/^|\s+/)}function Cx(e){return e.classList||new Tj(e)}function Tj(e){this._node=e,this._names=Nj(e.getAttribute("class")||"")}Tj.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Aj(e,t){for(var r=Cx(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Mj(e,t){for(var r=Cx(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function M6(e){return function(){Aj(this,e)}}function D6(e){return function(){Mj(this,e)}}function j6(e,t){return function(){(t.apply(this,arguments)?Aj:Mj)(this,e)}}function q6(e,t){var r=Nj(e+"");if(arguments.length<2){for(var n=Cx(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?j6:t?M6:D6)(r,t))}function k6(){this.textContent=""}function L6(e){return function(){this.textContent=e}}function B6(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function F6(e){return arguments.length?this.each(e==null?k6:(typeof e=="function"?B6:L6)(e)):this.node().textContent}function $6(){this.innerHTML=""}function z6(e){return function(){this.innerHTML=e}}function H6(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function U6(e){return arguments.length?this.each(e==null?$6:(typeof e=="function"?H6:z6)(e)):this.node().innerHTML}function V6(){this.nextSibling&&this.parentNode.appendChild(this)}function W6(){return this.each(V6)}function G6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function K6(){return this.each(G6)}function Y6(e){var t=typeof e=="function"?e:Sj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function X6(){return null}function Z6(e,t){var r=typeof e=="function"?e:Sj(e),n=t==null?X6:typeof t=="function"?t:Ox(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function J6(){var e=this.parentNode;e&&e.removeChild(this)}function Q6(){return this.each(J6)}function e8(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function t8(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function r8(e){return this.select(e?t8:e8)}function n8(e){return arguments.length?this.property("__data__",e):this.node().__data__}function i8(e){return function(t){e.call(this,t,this.__data__)}}function o8(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function a8(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function s8(e,t,r){return function(){var n=this.__on,i,o=i8(t);if(n){for(var a=0,u=n.length;a<u;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function u8(e,t,r){var n=o8(e+""),i,o=n.length,a;if(arguments.length<2){var u=this.node().__on;if(u){for(var l=0,d=u.length,f;l<d;++l)for(i=0,f=u[l];i<o;++i)if((a=n[i]).type===f.type&&a.name===f.name)return f.value}return}for(u=t?s8:a8,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function Dj(e,t,r){var n=Pj(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function c8(e,t){return function(){return Dj(this,e,t)}}function l8(e,t){return function(){return Dj(this,e,t.apply(this,arguments))}}function f8(e,t){return this.each((typeof t=="function"?l8:c8)(e,t))}function*d8(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var jj=[null];function cr(e,t){this._groups=e,this._parents=t}function Xa(){return new cr([[document.documentElement]],jj)}function h8(){return this}cr.prototype=Xa.prototype={constructor:cr,select:BW,selectAll:HW,selectChild:GW,selectChildren:ZW,filter:JW,data:i6,enter:QW,exit:a6,join:s6,merge:u6,selection:h8,order:c6,sort:l6,call:d6,nodes:h6,node:p6,size:v6,empty:g6,each:m6,attr:S6,style:I6,property:A6,classed:q6,text:F6,html:U6,raise:W6,lower:K6,append:Y6,insert:Z6,remove:Q6,clone:r8,datum:n8,on:u8,dispatch:f8,[Symbol.iterator]:d8};function qr(e){return typeof e=="string"?new cr([[document.querySelector(e)]],[document.documentElement]):new cr([[e]],jj)}function p8(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Zr(e,t){if(e=p8(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const v8={passive:!1},qa={capture:!0,passive:!1};function dm(e){e.stopImmediatePropagation()}function oo(e){e.preventDefault(),e.stopImmediatePropagation()}function qj(e){var t=e.document.documentElement,r=qr(e).on("dragstart.drag",oo,qa);"onselectstart"in t?r.on("selectstart.drag",oo,qa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function kj(e,t){var r=e.document.documentElement,n=qr(e).on("dragstart.drag",null);t&&(n.on("click.drag",oo,qa),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const ru=e=>()=>e;function Pb(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:u,dx:l,dy:d,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:f}})}Pb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function g8(e){return!e.ctrlKey&&!e.button}function m8(){return this.parentNode}function y8(e,t){return t??{x:e.x,y:e.y}}function b8(){return navigator.maxTouchPoints||"ontouchstart"in this}function x8(){var e=g8,t=m8,r=y8,n=b8,i={},o=Ac("start","drag","end"),a=0,u,l,d,f,h=0;function p(_){_.on("mousedown.drag",v).filter(n).on("touchstart.drag",x).on("touchmove.drag",b,v8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(_,S){if(!(f||!e.call(this,_,S))){var R=E(this,t.call(this,_,S),_,S,"mouse");R&&(qr(_.view).on("mousemove.drag",m,qa).on("mouseup.drag",y,qa),qj(_.view),dm(_),d=!1,u=_.clientX,l=_.clientY,R("start",_))}}function m(_){if(oo(_),!d){var S=_.clientX-u,R=_.clientY-l;d=S*S+R*R>h}i.mouse("drag",_)}function y(_){qr(_.view).on("mousemove.drag mouseup.drag",null),kj(_.view,d),oo(_),i.mouse("end",_)}function x(_,S){if(e.call(this,_,S)){var R=_.changedTouches,I=t.call(this,_,S),N=R.length,A,L;for(A=0;A<N;++A)(L=E(this,I,_,S,R[A].identifier,R[A]))&&(dm(_),L("start",_,R[A]))}}function b(_){var S=_.changedTouches,R=S.length,I,N;for(I=0;I<R;++I)(N=i[S[I].identifier])&&(oo(_),N("drag",_,S[I]))}function w(_){var S=_.changedTouches,R=S.length,I,N;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),I=0;I<R;++I)(N=i[S[I].identifier])&&(dm(_),N("end",_,S[I]))}function E(_,S,R,I,N,A){var L=o.copy(),B=Zr(A||R,S),U,j,D;if((D=r.call(_,new Pb("beforestart",{sourceEvent:R,target:p,identifier:N,active:a,x:B[0],y:B[1],dx:0,dy:0,dispatch:L}),I))!=null)return U=D.x-B[0]||0,j=D.y-B[1]||0,function G(F,X,Z){var Q=B,W;switch(F){case"start":i[N]=G,W=a++;break;case"end":delete i[N],--a;case"drag":B=Zr(Z||X,S),W=a;break}L.call(F,_,new Pb(F,{sourceEvent:X,subject:D,target:p,identifier:N,active:W,x:B[0]+U,y:B[1]+j,dx:B[0]-Q[0],dy:B[1]-Q[1],dispatch:L}),I)}}return p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:ru(!!_),p):e},p.container=function(_){return arguments.length?(t=typeof _=="function"?_:ru(_),p):t},p.subject=function(_){return arguments.length?(r=typeof _=="function"?_:ru(_),p):r},p.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:ru(!!_),p):n},p.on=function(){var _=o.on.apply(o,arguments);return _===o?p:_},p.clickDistance=function(_){return arguments.length?(h=(_=+_)*_,p):Math.sqrt(h)},p}function Rx(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Lj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Za(){}var ka=.7,Bu=1/ka,ao="\\s*([+-]?\\d+)\\s*",La="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w8=/^#([0-9a-f]{3,8})$/,_8=new RegExp(`^rgb\\(${ao},${ao},${ao}\\)$`),E8=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),S8=new RegExp(`^rgba\\(${ao},${ao},${ao},${La}\\)$`),O8=new RegExp(`^rgba\\(${tn},${tn},${tn},${La}\\)$`),C8=new RegExp(`^hsl\\(${La},${tn},${tn}\\)$`),R8=new RegExp(`^hsla\\(${La},${tn},${tn},${La}\\)$`),OI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Rx(Za,Ba,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:CI,formatHex:CI,formatHex8:I8,formatHsl:P8,formatRgb:RI,toString:RI});function CI(){return this.rgb().formatHex()}function I8(){return this.rgb().formatHex8()}function P8(){return Bj(this).formatHsl()}function RI(){return this.rgb().formatRgb()}function Ba(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=w8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?II(t):r===3?new Wt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_8.exec(e))?new Wt(t[1],t[2],t[3],1):(t=E8.exec(e))?new Wt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=S8.exec(e))?nu(t[1],t[2],t[3],t[4]):(t=O8.exec(e))?nu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=C8.exec(e))?TI(t[1],t[2]/100,t[3]/100,1):(t=R8.exec(e))?TI(t[1],t[2]/100,t[3]/100,t[4]):OI.hasOwnProperty(e)?II(OI[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function II(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function nu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Wt(e,t,r,n)}function N8(e){return e instanceof Za||(e=Ba(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function Nb(e,t,r,n){return arguments.length===1?N8(e):new Wt(e,t,r,n??1)}function Wt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Rx(Wt,Nb,Lj(Za,{brighter(e){return e=e==null?Bu:Math.pow(Bu,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(di(this.r),di(this.g),di(this.b),Fu(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:PI,formatHex:PI,formatHex8:T8,formatRgb:NI,toString:NI}));function PI(){return`#${li(this.r)}${li(this.g)}${li(this.b)}`}function T8(){return`#${li(this.r)}${li(this.g)}${li(this.b)}${li((isNaN(this.opacity)?1:this.opacity)*255)}`}function NI(){const e=Fu(this.opacity);return`${e===1?"rgb(":"rgba("}${di(this.r)}, ${di(this.g)}, ${di(this.b)}${e===1?")":`, ${e})`}`}function Fu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function di(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function li(e){return e=di(e),(e<16?"0":"")+e.toString(16)}function TI(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kr(e,t,r,n)}function Bj(e){if(e instanceof kr)return new kr(e.h,e.s,e.l,e.opacity);if(e instanceof Za||(e=Ba(e)),!e)return new kr;if(e instanceof kr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,u=o-i,l=(o+i)/2;return u?(t===o?a=(r-n)/u+(r<n)*6:r===o?a=(n-t)/u+2:a=(t-r)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new kr(a,u,l,e.opacity)}function A8(e,t,r,n){return arguments.length===1?Bj(e):new kr(e,t,r,n??1)}function kr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Rx(kr,A8,Lj(Za,{brighter(e){return e=e==null?Bu:Math.pow(Bu,e),new kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ka:Math.pow(ka,e),new kr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Wt(hm(e>=240?e-240:e+120,i,n),hm(e,i,n),hm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kr(AI(this.h),iu(this.s),iu(this.l),Fu(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 e=Fu(this.opacity);return`${e===1?"hsl(":"hsla("}${AI(this.h)}, ${iu(this.s)*100}%, ${iu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function AI(e){return e=(e||0)%360,e<0?e+360:e}function iu(e){return Math.max(0,Math.min(1,e||0))}function hm(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Fj=e=>()=>e;function M8(e,t){return function(r){return e+r*t}}function D8(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function j8(e){return(e=+e)==1?$j:function(t,r){return r-t?D8(t,r,e):Fj(isNaN(t)?r:t)}}function $j(e,t){var r=t-e;return r?M8(e,r):Fj(isNaN(e)?t:e)}const MI=(function e(t){var r=j8(t);function n(i,o){var a=r((i=Nb(i)).r,(o=Nb(o)).r),u=r(i.g,o.g),l=r(i.b,o.b),d=$j(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=u(f),i.b=l(f),i.opacity=d(f),i+""}}return n.gamma=e,n})(1);function Bn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Tb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pm=new RegExp(Tb.source,"g");function q8(e){return function(){return e}}function k8(e){return function(t){return e(t)+""}}function L8(e,t){var r=Tb.lastIndex=pm.lastIndex=0,n,i,o,a=-1,u=[],l=[];for(e=e+"",t=t+"";(n=Tb.exec(e))&&(i=pm.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),u[a]?u[a]+=o:u[++a]=o),(n=n[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,l.push({i:a,x:Bn(n,i)})),r=pm.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?k8(l[0].x):q8(t):(t=l.length,function(d){for(var f=0,h;f<t;++f)u[(h=l[f]).i]=h.x(d);return u.join("")})}var DI=180/Math.PI,Ab={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zj(e,t,r,n,i,o){var a,u,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(u=Math.sqrt(r*r+n*n))&&(r/=u,n/=u,l/=u),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*DI,skewX:Math.atan(l)*DI,scaleX:a,scaleY:u}}var ou;function B8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ab:zj(t.a,t.b,t.c,t.d,t.e,t.f)}function F8(e){return e==null||(ou||(ou=document.createElementNS("http://www.w3.org/2000/svg","g")),ou.setAttribute("transform",e),!(e=ou.transform.baseVal.consolidate()))?Ab:(e=e.matrix,zj(e.a,e.b,e.c,e.d,e.e,e.f))}function Hj(e,t,r,n){function i(d){return d.length?d.pop()+" ":""}function o(d,f,h,p,v,m){if(d!==h||f!==p){var y=v.push("translate(",null,t,null,r);m.push({i:y-4,x:Bn(d,h)},{i:y-2,x:Bn(f,p)})}else(h||p)&&v.push("translate("+h+t+p+r)}function a(d,f,h,p){d!==f?(d-f>180?f+=360:f-d>180&&(d+=360),p.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Bn(d,f)})):f&&h.push(i(h)+"rotate("+f+n)}function u(d,f,h,p){d!==f?p.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Bn(d,f)}):f&&h.push(i(h)+"skewX("+f+n)}function l(d,f,h,p,v,m){if(d!==h||f!==p){var y=v.push(i(v)+"scale(",null,",",null,")");m.push({i:y-4,x:Bn(d,h)},{i:y-2,x:Bn(f,p)})}else(h!==1||p!==1)&&v.push(i(v)+"scale("+h+","+p+")")}return function(d,f){var h=[],p=[];return d=e(d),f=e(f),o(d.translateX,d.translateY,f.translateX,f.translateY,h,p),a(d.rotate,f.rotate,h,p),u(d.skewX,f.skewX,h,p),l(d.scaleX,d.scaleY,f.scaleX,f.scaleY,h,p),d=f=null,function(v){for(var m=-1,y=p.length,x;++m<y;)h[(x=p[m]).i]=x.x(v);return h.join("")}}}var $8=Hj(B8,"px, ","px)","deg)"),z8=Hj(F8,", ",")",")"),H8=1e-12;function jI(e){return((e=Math.exp(e))+1/e)/2}function U8(e){return((e=Math.exp(e))-1/e)/2}function V8(e){return((e=Math.exp(2*e))-1)/(e+1)}const W8=(function e(t,r,n){function i(o,a){var u=o[0],l=o[1],d=o[2],f=a[0],h=a[1],p=a[2],v=f-u,m=h-l,y=v*v+m*m,x,b;if(y<H8)b=Math.log(p/d)/t,x=function(I){return[u+I*v,l+I*m,d*Math.exp(t*I*b)]};else{var w=Math.sqrt(y),E=(p*p-d*d+n*y)/(2*d*r*w),_=(p*p-d*d-n*y)/(2*p*r*w),S=Math.log(Math.sqrt(E*E+1)-E),R=Math.log(Math.sqrt(_*_+1)-_);b=(R-S)/t,x=function(I){var N=I*b,A=jI(S),L=d/(r*w)*(A*V8(t*N+S)-U8(S));return[u+L*v,l+L*m,d*A/jI(t*N+S)]}}return x.duration=b*1e3*t/Math.SQRT2,x}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,l=u*u;return e(a,u,l)},i})(Math.SQRT2,2,4);var bo=0,Oa=0,ra=0,Uj=1e3,$u,Ca,zu=0,yi=0,Dc=0,Fa=typeof performance=="object"&&performance.now?performance:Date,Vj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ix(){return yi||(Vj(G8),yi=Fa.now()+Dc)}function G8(){yi=0}function Hu(){this._call=this._time=this._next=null}Hu.prototype=Wj.prototype={constructor:Hu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ix():+r)+(t==null?0:+t),!this._next&&Ca!==this&&(Ca?Ca._next=this:$u=this,Ca=this),this._call=e,this._time=r,Mb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Mb())}};function Wj(e,t,r){var n=new Hu;return n.restart(e,t,r),n}function K8(){Ix(),++bo;for(var e=$u,t;e;)(t=yi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--bo}function qI(){yi=(zu=Fa.now())+Dc,bo=Oa=0;try{K8()}finally{bo=0,X8(),yi=0}}function Y8(){var e=Fa.now(),t=e-zu;t>Uj&&(Dc-=t,zu=e)}function X8(){for(var e,t=$u,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:$u=r);Ca=e,Mb(n)}function Mb(e){if(!bo){Oa&&(Oa=clearTimeout(Oa));var t=e-yi;t>24?(e<1/0&&(Oa=setTimeout(qI,e-Fa.now()-Dc)),ra&&(ra=clearInterval(ra))):(ra||(zu=Fa.now(),ra=setInterval(Y8,Uj)),bo=1,Vj(qI))}}function kI(e,t,r){var n=new Hu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var Z8=Ac("start","end","cancel","interrupt"),J8=[],Gj=0,LI=1,Db=2,Iu=3,BI=4,jb=5,Pu=6;function jc(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Q8(e,r,{name:t,index:n,group:i,on:Z8,tween:J8,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Gj})}function Px(e,t){var r=Ur(e,t);if(r.state>Gj)throw new Error("too late; already scheduled");return r}function an(e,t){var r=Ur(e,t);if(r.state>Iu)throw new Error("too late; already running");return r}function Ur(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Q8(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Wj(o,0,r.time);function o(d){r.state=LI,r.timer.restart(a,r.delay,r.time),r.delay<=d&&a(d-r.delay)}function a(d){var f,h,p,v;if(r.state!==LI)return l();for(f in n)if(v=n[f],v.name===r.name){if(v.state===Iu)return kI(a);v.state===BI?(v.state=Pu,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=Pu,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(kI(function(){r.state===Iu&&(r.state=BI,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=Db,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Db){for(r.state=Iu,i=new Array(p=r.tween.length),f=0,h=-1;f<p;++f)(v=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=v);i.length=h+1}}function u(d){for(var f=d<r.duration?r.ease.call(null,d/r.duration):(r.timer.restart(l),r.state=jb,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===jb&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Pu,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function Nu(e,t){var r=e.__transition,n,i,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>Db&&n.state<jb,n.state=Pu,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function eG(e){return this.each(function(){Nu(this,e)})}function tG(e,t){var r,n;return function(){var i=an(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,u=n.length;a<u;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function rG(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=an(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var u={name:t,value:r},l=0,d=i.length;l<d;++l)if(i[l].name===t){i[l]=u;break}l===d&&i.push(u)}o.tween=i}}function nG(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Ur(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?tG:rG)(r,e,t))}function Nx(e,t,r){var n=e._id;return e.each(function(){var i=an(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Ur(i,n).value[t]}}function Kj(e,t){var r;return(typeof t=="number"?Bn:t instanceof Ba?MI:(r=Ba(t))?(t=r,MI):L8)(e,t)}function iG(e){return function(){this.removeAttribute(e)}}function oG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function aG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function sG(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function uG(e,t,r){var n,i,o;return function(){var a,u=r(this),l;return u==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=u+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u)))}}function cG(e,t,r){var n,i,o;return function(){var a,u=r(this),l;return u==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=u+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u)))}}function lG(e,t){var r=Mc(e),n=r==="transform"?z8:Kj;return this.attrTween(e,typeof t=="function"?(r.local?cG:uG)(r,n,Nx(this,"attr."+e,t)):t==null?(r.local?oG:iG)(r):(r.local?sG:aG)(r,n,t))}function fG(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function dG(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function hG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&dG(e,o)),r}return i._value=t,i}function pG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&fG(e,o)),r}return i._value=t,i}function vG(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Mc(e);return this.tween(r,(n.local?hG:pG)(n,t))}function gG(e,t){return function(){Px(this,e).delay=+t.apply(this,arguments)}}function mG(e,t){return t=+t,function(){Px(this,e).delay=t}}function yG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gG:mG)(t,e)):Ur(this.node(),t).delay}function bG(e,t){return function(){an(this,e).duration=+t.apply(this,arguments)}}function xG(e,t){return t=+t,function(){an(this,e).duration=t}}function wG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bG:xG)(t,e)):Ur(this.node(),t).duration}function _G(e,t){if(typeof t!="function")throw new Error;return function(){an(this,e).ease=t}}function EG(e){var t=this._id;return arguments.length?this.each(_G(t,e)):Ur(this.node(),t).ease}function SG(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;an(this,e).ease=r}}function OG(e){if(typeof e!="function")throw new Error;return this.each(SG(this._id,e))}function CG(e){typeof e!="function"&&(e=Cj(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=[],l,d=0;d<a;++d)(l=o[d])&&e.call(l,l.__data__,d,o)&&u.push(l);return new xn(n,this._parents,this._name,this._id)}function RG(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),u=0;u<o;++u)for(var l=t[u],d=r[u],f=l.length,h=a[u]=new Array(f),p,v=0;v<f;++v)(p=l[v]||d[v])&&(h[v]=p);for(;u<n;++u)a[u]=t[u];return new xn(a,this._parents,this._name,this._id)}function IG(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function PG(e,t,r){var n,i,o=IG(t)?Px:an;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function NG(e,t){var r=this._id;return arguments.length<2?Ur(this.node(),r).on.on(e):this.each(PG(r,e,t))}function TG(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function AG(){return this.on("end.remove",TG(this._id))}function MG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ox(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var u=n[a],l=u.length,d=o[a]=new Array(l),f,h,p=0;p<l;++p)(f=u[p])&&(h=e.call(f,f.__data__,p,u))&&("__data__"in f&&(h.__data__=f.__data__),d[p]=h,jc(d[p],t,r,p,d,Ur(f,r)));return new xn(o,this._parents,t,r)}function DG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Oj(e));for(var n=this._groups,i=n.length,o=[],a=[],u=0;u<i;++u)for(var l=n[u],d=l.length,f,h=0;h<d;++h)if(f=l[h]){for(var p=e.call(f,f.__data__,h,l),v,m=Ur(f,r),y=0,x=p.length;y<x;++y)(v=p[y])&&jc(v,t,r,y,p,m);o.push(p),a.push(f)}return new xn(o,a,t,r)}var jG=Xa.prototype.constructor;function qG(){return new jG(this._groups,this._parents)}function kG(e,t){var r,n,i;return function(){var o=yo(this,e),a=(this.style.removeProperty(e),yo(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function Yj(e){return function(){this.style.removeProperty(e)}}function LG(e,t,r){var n,i=r+"",o;return function(){var a=yo(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function BG(e,t,r){var n,i,o;return function(){var a=yo(this,e),u=r(this),l=u+"";return u==null&&(l=u=(this.style.removeProperty(e),yo(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u))}}function FG(e,t){var r,n,i,o="style."+t,a="end."+o,u;return function(){var l=an(this,e),d=l.on,f=l.value[o]==null?u||(u=Yj(t)):void 0;(d!==r||i!==f)&&(n=(r=d).copy()).on(a,i=f),l.on=n}}function $G(e,t,r){var n=(e+="")=="transform"?$8:Kj;return t==null?this.styleTween(e,kG(e,n)).on("end.style."+e,Yj(e)):typeof t=="function"?this.styleTween(e,BG(e,n,Nx(this,"style."+e,t))).each(FG(this._id,e)):this.styleTween(e,LG(e,n,t),r).on("end.style."+e,null)}function zG(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function HG(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&zG(e,a,r)),n}return o._value=t,o}function UG(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,HG(e,t,r??""))}function VG(e){return function(){this.textContent=e}}function WG(e){return function(){var t=e(this);this.textContent=t??""}}function GG(e){return this.tween("text",typeof e=="function"?WG(Nx(this,"text",e)):VG(e==null?"":e+""))}function KG(e){return function(t){this.textContent=e.call(this,t)}}function YG(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&KG(i)),t}return n._value=e,n}function XG(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,YG(e))}function ZG(){for(var e=this._name,t=this._id,r=Xj(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,l,d=0;d<u;++d)if(l=a[d]){var f=Ur(l,t);jc(l,e,r,d,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new xn(n,this._parents,e,r)}function JG(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var u={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var d=an(this,n),f=d.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(l)),d.on=t}),i===0&&o()})}var QG=0;function xn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Xj(){return++QG}var mn=Xa.prototype;xn.prototype={constructor:xn,select:MG,selectAll:DG,selectChild:mn.selectChild,selectChildren:mn.selectChildren,filter:CG,merge:RG,selection:qG,transition:ZG,call:mn.call,nodes:mn.nodes,node:mn.node,size:mn.size,empty:mn.empty,each:mn.each,on:NG,attr:lG,attrTween:vG,style:$G,styleTween:UG,text:GG,textTween:XG,remove:AG,tween:nG,delay:yG,duration:wG,ease:EG,easeVarying:OG,end:JG,[Symbol.iterator]:mn[Symbol.iterator]};function eK(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var tK={time:null,delay:0,duration:250,ease:eK};function rK(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function nK(e){var t,r;e instanceof xn?(t=e._id,e=e._name):(t=Xj(),(r=tK).time=Ix(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,l,d=0;d<u;++d)(l=a[d])&&jc(l,e,t,d,a,r||rK(l,t));return new xn(n,this._parents,e,t)}Xa.prototype.interrupt=eG;Xa.prototype.transition=nK;const au=e=>()=>e;function iK(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function yn(e,t,r){this.k=e,this.x=t,this.y=r}yn.prototype={constructor:yn,scale:function(e){return e===1?this:new yn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var hi=new yn(1,0,0);yn.prototype;function vm(e){e.stopImmediatePropagation()}function na(e){e.preventDefault(),e.stopImmediatePropagation()}function oK(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function aK(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function FI(){return this.__zoom||hi}function sK(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function uK(){return navigator.maxTouchPoints||"ontouchstart"in this}function cK(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function lK(){var e=oK,t=aK,r=cK,n=sK,i=uK,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,l=W8,d=Ac("start","zoom","end"),f,h,p,v=500,m=150,y=0,x=10;function b(D){D.property("__zoom",FI).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",B).on("touchmove.zoom",U).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(D,G,F,X){var Z=D.selection?D.selection():D;Z.property("__zoom",FI),D!==Z?S(D,G,F,X):Z.interrupt().each(function(){R(this,arguments).event(X).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},b.scaleBy=function(D,G,F,X){b.scaleTo(D,function(){var Z=this.__zoom.k,Q=typeof G=="function"?G.apply(this,arguments):G;return Z*Q},F,X)},b.scaleTo=function(D,G,F,X){b.transform(D,function(){var Z=t.apply(this,arguments),Q=this.__zoom,W=F==null?_(Z):typeof F=="function"?F.apply(this,arguments):F,ee=Q.invert(W),oe=typeof G=="function"?G.apply(this,arguments):G;return r(E(w(Q,oe),W,ee),Z,a)},F,X)},b.translateBy=function(D,G,F,X){b.transform(D,function(){return r(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),a)},null,X)},b.translateTo=function(D,G,F,X,Z){b.transform(D,function(){var Q=t.apply(this,arguments),W=this.__zoom,ee=X==null?_(Q):typeof X=="function"?X.apply(this,arguments):X;return r(hi.translate(ee[0],ee[1]).scale(W.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof F=="function"?-F.apply(this,arguments):-F),Q,a)},X,Z)};function w(D,G){return G=Math.max(o[0],Math.min(o[1],G)),G===D.k?D:new yn(G,D.x,D.y)}function E(D,G,F){var X=G[0]-F[0]*D.k,Z=G[1]-F[1]*D.k;return X===D.x&&Z===D.y?D:new yn(D.k,X,Z)}function _(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function S(D,G,F,X){D.on("start.zoom",function(){R(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(X).end()}).tween("zoom",function(){var Z=this,Q=arguments,W=R(Z,Q).event(X),ee=t.apply(Z,Q),oe=F==null?_(ee):typeof F=="function"?F.apply(Z,Q):F,ae=Math.max(ee[1][0]-ee[0][0],ee[1][1]-ee[0][1]),H=Z.__zoom,K=typeof G=="function"?G.apply(Z,Q):G,$=l(H.invert(oe).concat(ae/H.k),K.invert(oe).concat(ae/K.k));return function(k){if(k===1)k=K;else{var z=$(k),re=ae/z[2];k=new yn(re,oe[0]-z[0]*re,oe[1]-z[1]*re)}W.zoom(null,k)}})}function R(D,G,F){return!F&&D.__zooming||new I(D,G)}function I(D,G){this.that=D,this.args=G,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,G),this.taps=0}I.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,G){return this.mouse&&D!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var G=qr(this.that).datum();d.call(D,this.that,new iK(D,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:d}),G)}};function N(D,...G){if(!e.apply(this,arguments))return;var F=R(this,G).event(D),X=this.__zoom,Z=Math.max(o[0],Math.min(o[1],X.k*Math.pow(2,n.apply(this,arguments)))),Q=Zr(D);if(F.wheel)(F.mouse[0][0]!==Q[0]||F.mouse[0][1]!==Q[1])&&(F.mouse[1]=X.invert(F.mouse[0]=Q)),clearTimeout(F.wheel);else{if(X.k===Z)return;F.mouse=[Q,X.invert(Q)],Nu(this),F.start()}na(D),F.wheel=setTimeout(W,m),F.zoom("mouse",r(E(w(X,Z),F.mouse[0],F.mouse[1]),F.extent,a));function W(){F.wheel=null,F.end()}}function A(D,...G){if(p||!e.apply(this,arguments))return;var F=D.currentTarget,X=R(this,G,!0).event(D),Z=qr(D.view).on("mousemove.zoom",oe,!0).on("mouseup.zoom",ae,!0),Q=Zr(D,F),W=D.clientX,ee=D.clientY;qj(D.view),vm(D),X.mouse=[Q,this.__zoom.invert(Q)],Nu(this),X.start();function oe(H){if(na(H),!X.moved){var K=H.clientX-W,$=H.clientY-ee;X.moved=K*K+$*$>y}X.event(H).zoom("mouse",r(E(X.that.__zoom,X.mouse[0]=Zr(H,F),X.mouse[1]),X.extent,a))}function ae(H){Z.on("mousemove.zoom mouseup.zoom",null),kj(H.view,X.moved),na(H),X.event(H).end()}}function L(D,...G){if(e.apply(this,arguments)){var F=this.__zoom,X=Zr(D.changedTouches?D.changedTouches[0]:D,this),Z=F.invert(X),Q=F.k*(D.shiftKey?.5:2),W=r(E(w(F,Q),X,Z),t.apply(this,G),a);na(D),u>0?qr(this).transition().duration(u).call(S,W,X,D):qr(this).call(b.transform,W,X,D)}}function B(D,...G){if(e.apply(this,arguments)){var F=D.touches,X=F.length,Z=R(this,G,D.changedTouches.length===X).event(D),Q,W,ee,oe;for(vm(D),W=0;W<X;++W)ee=F[W],oe=Zr(ee,this),oe=[oe,this.__zoom.invert(oe),ee.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==oe[2]&&(Z.touch1=oe,Z.taps=0):(Z.touch0=oe,Q=!0,Z.taps=1+!!f);f&&(f=clearTimeout(f)),Q&&(Z.taps<2&&(h=oe[0],f=setTimeout(function(){f=null},v)),Nu(this),Z.start())}}function U(D,...G){if(this.__zooming){var F=R(this,G).event(D),X=D.changedTouches,Z=X.length,Q,W,ee,oe;for(na(D),Q=0;Q<Z;++Q)W=X[Q],ee=Zr(W,this),F.touch0&&F.touch0[2]===W.identifier?F.touch0[0]=ee:F.touch1&&F.touch1[2]===W.identifier&&(F.touch1[0]=ee);if(W=F.that.__zoom,F.touch1){var ae=F.touch0[0],H=F.touch0[1],K=F.touch1[0],$=F.touch1[1],k=(k=K[0]-ae[0])*k+(k=K[1]-ae[1])*k,z=(z=$[0]-H[0])*z+(z=$[1]-H[1])*z;W=w(W,Math.sqrt(k/z)),ee=[(ae[0]+K[0])/2,(ae[1]+K[1])/2],oe=[(H[0]+$[0])/2,(H[1]+$[1])/2]}else if(F.touch0)ee=F.touch0[0],oe=F.touch0[1];else return;F.zoom("touch",r(E(W,ee,oe),F.extent,a))}}function j(D,...G){if(this.__zooming){var F=R(this,G).event(D),X=D.changedTouches,Z=X.length,Q,W;for(vm(D),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),Q=0;Q<Z;++Q)W=X[Q],F.touch0&&F.touch0[2]===W.identifier?delete F.touch0:F.touch1&&F.touch1[2]===W.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(W=Zr(W,this),Math.hypot(h[0]-W[0],h[1]-W[1])<x)){var ee=qr(this).on("dblclick.zoom");ee&&ee.apply(this,arguments)}}}return b.wheelDelta=function(D){return arguments.length?(n=typeof D=="function"?D:au(+D),b):n},b.filter=function(D){return arguments.length?(e=typeof D=="function"?D:au(!!D),b):e},b.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:au(!!D),b):i},b.extent=function(D){return arguments.length?(t=typeof D=="function"?D:au([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),b):t},b.scaleExtent=function(D){return arguments.length?(o[0]=+D[0],o[1]=+D[1],b):[o[0],o[1]]},b.translateExtent=function(D){return arguments.length?(a[0][0]=+D[0][0],a[1][0]=+D[1][0],a[0][1]=+D[0][1],a[1][1]=+D[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(D){return arguments.length?(r=D,b):r},b.duration=function(D){return arguments.length?(u=+D,b):u},b.interpolate=function(D){return arguments.length?(l=D,b):l},b.on=function(){var D=d.on.apply(d,arguments);return D===d?b:D},b.clickDistance=function(D){return arguments.length?(y=(D=+D)*D,b):Math.sqrt(y)},b.tapDistance=function(D){return arguments.length?(x=+D,b):x},b}function He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Zj(e,t){if(e){if(typeof e=="string")return qb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return qb(e,t)}}function fK(e){if(Array.isArray(e))return e}function dK(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,u;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(l){o=!0,u=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw u}}return n}}function hK(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Le(e,t){return fK(e)||dK(e,t)||Zj(e,t)||hK()}var xo;(function(e){e.Strict="strict",e.Loose="loose"})(xo||(xo={}));var bi;(function(e){e.Lines="lines",e.Dots="dots"})(bi||(bi={}));var so;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(so||(so={}));var $n;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($n||($n={}));var Uu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Uu||(Uu={}));var we;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(we||(we={}));var Tx=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},uo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,r),n)},Jj=function(t,r){return{x:uo(t.x,r[0][0],r[1][0]),y:uo(t.y,r[0][1],r[1][1])}},Qj=function(t){var r,n;return((r=t.getRootNode)===null||r===void 0?void 0:r.call(t))||((n=window)===null||n===void 0?void 0:n.document)},pK=function(t,r){return{x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}},Vu=function(t){var r=t.x,n=t.y,i=t.width,o=t.height;return{x:r,y:n,x2:r+i,y2:n+o}},vK=function(t){var r=t.x,n=t.y,i=t.x2,o=t.y2;return{x:r,y:n,width:i-r,height:o-n}},e2=function(t){return!isNaN(t)&&isFinite(t)},Nt=Symbol("internals");function $I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$I(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$I(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zI(e,t){var r=e.find(function(d){return d.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(n>0||i>0||t.position.x<0||t.position.y<0){var o,a;if(r.style=Ra({},r.style)||{},r.style.width=(o=r.style.width)!==null&&o!==void 0?o:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),i>0&&(r.style.height+=i),t.position.x<0){var u=Math.abs(t.position.x);r.position.x=r.position.x-u,r.style.width+=u,t.position.x=0}if(t.position.y<0){var l=Math.abs(t.position.y);r.position.y=r.position.y-l,r.style.height+=l,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function t2(e,t){if(e.some(function(n){return n.type==="reset"}))return e.filter(function(n){return n.type==="reset"}).map(function(n){return n.item});var r=e.filter(function(n){return n.type==="add"}).map(function(n){return n.item});return t.reduce(function(n,i){var o=e.find(function(l){return l.id===i.id});if(o)switch(o.type){case"select":return n.push(Ra(Ra({},i),{},{selected:o.selected})),n;case"position":{var a=Ra({},i);return typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&zI(n,a),n.push(a),n}case"dimensions":{var u=Ra({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&zI(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function r2(e,t){return t2(e,t)}function gK(e,t){return t2(e,t)}var Fn=function(t,r){return{id:t,type:"select",selected:r}};function ro(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Fn(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Fn(n.id,!1))),r},[])}function HI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function n2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var UI=function(t,r,n){var i=r.querySelectorAll(t);if(!i||!i.length)return null;var o=Array.from(i),a=r.getBoundingClientRect();return o.map(function(u){var l=u.getBoundingClientRect();return n2({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(l.left-a.left)/n,y:(l.top-a.top)/n},Tx(u))})};function ia(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,n2({},i))}}function i2(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,u=n.nodeInternals,l=u.get(t);r.setState({nodesSelectionActive:!1}),l.selected?l.selected&&a&&o({nodes:[l]}):i([t])}function VI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mK=function(t){return"id"in t&&"source"in t&&"target"in t},yK=function(t){var r=t.source,n=t.sourceHandle,i=t.target,o=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(i).concat(o||"")},kb=function(t,r){if(typeof t>"u")return"";if(typeof t=="string")return t;var n=r?"".concat(r,"__"):"";return"".concat(n).concat(Object.keys(t).sort().map(function(i){return"".concat(i,"=").concat(t[i])}).join("&"))},bK=function(t,r){return r.some(function(n){return n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)})},xK=function(t,r){if(!t.source||!t.target)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Can't create edge. An edge needs a source and a target. Help: https://reactflow.dev/error#600"),r;var n;return mK(t)?n=Ta({},t):n=Ta(Ta({},t),{},{id:yK(t)}),bK(n,r)?r:r.concat(n)},o2=function(t,r,n,i){var o=t.x,a=t.y,u=Le(r,3),l=u[0],d=u[1],f=u[2],h=Le(i,2),p=h[0],v=h[1],m={x:(o-l)/f,y:(a-d)/f};return n?{x:p*Math.round(m.x/p),y:v*Math.round(m.y/v)}:m},Ax=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,i){var o=i.positionAbsolute,a=i.position,u=i.width,l=i.height;return pK(n,Vu({x:o?o.x:a.x,y:o?o.y:a.y,width:u||0,height:l||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return vK(r)},a2=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Le(n,3),o=i[0],a=i[1],u=i[2],l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,f=Vu({x:(r.x-o)/u,y:(r.y-a)/u,width:r.width/u,height:r.height/u}),h=[];return t.forEach(function(p){var v=p.positionAbsolute,m=p.width,y=p.height,x=p.selectable,b=x===void 0?!0:x;if(d&&!b)return!1;var w=Vu(Ta(Ta({},v),{},{width:m||0,height:y||0})),E=Math.max(0,Math.min(f.x2,w.x2)-Math.max(f.x,w.x)),_=Math.max(0,Math.min(f.y2,w.y2)-Math.max(f.y,w.y)),S=Math.ceil(E*_),R=typeof m>"u"||typeof y>"u"||m===null||y===null,I=l&&S>0,N=(m||0)*(y||0),A=R||I||S>=N;A&&h.push(p)}),h},s2=function(t,r){var n=t.map(function(i){return i.id});return r.filter(function(i){return n.includes(i.source)||n.includes(i.target)})},u2=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,u=r/(t.width*(1+a)),l=n/(t.height*(1+a)),d=Math.min(u,l),f=uo(d,i,o),h=t.x+t.width/2,p=t.y+t.height/2,v=r/2-h*f,m=n/2-p*f;return[v,m,f]},ui=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function WI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function no(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c2(e,t,r,n){var i,o,a,u,l,d,f,h,p,v,m,y;if(!e.parentNode)return n;var x=t.get(e.parentNode);return c2(x,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=x.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((u=n.y)!==null&&u!==void 0?u:0)+((l=(d=x.position)===null||d===void 0?void 0:d.y)!==null&&l!==void 0?l:0),z:((f=(h=x[Nt])===null||h===void 0?void 0:h.z)!==null&&f!==void 0?f:0)>((p=n.z)!==null&&p!==void 0?p:0)?(v=(m=x[Nt])===null||m===void 0?void 0:m.z)!==null&&v!==void 0?v:0:(y=n.z)!==null&&y!==void 0?y:0})}function gm(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=e2(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),l=no(no({width:u==null?void 0:u.width,height:u==null?void 0:u.height},i),{},{positionAbsolute:{x:i.position.x,y:i.position.y}});i.parentNode&&(l.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(l,Nt,{enumerable:!1,value:{handleBounds:u==null||(o=u[Nt])===null||o===void 0?void 0:o.handleBounds,z:a}}),r.set(i.id,l)}),r.forEach(function(i){if(i.parentNode&&!r.has(i.parentNode))throw new Error("Parent node ".concat(i.parentNode," not found"));if(i.parentNode||n[i.id]){var o,a,u=c2(i,r,n,no(no({},i.position),{},{z:(o=(a=i[Nt])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),l=u.x,d=u.y,f=u.z;i.positionAbsolute={x:l,y:d},i[Nt].z=f,n[i.id]&&(i[Nt].isParent=!0)}}),r}function l2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,i=r.width,o=r.height,a=r.minZoom,u=r.maxZoom,l=r.d3Zoom,d=r.d3Selection,f=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!f&&h||!t.initial)&&l&&d){var p=Array.from(n.values()).filter(function(N){return t.includeHiddenNodes?N.width&&N.height:!N.hidden}),v=p.every(function(N){return N.width&&N.height});if(p.length>0&&v){var m,y,x,b=Ax(p),w=u2(b,i,o,(m=t.minZoom)!==null&&m!==void 0?m:a,(y=t.maxZoom)!==null&&y!==void 0?y:u,(x=t.padding)!==null&&x!==void 0?x:.1),E=Le(w,3),_=E[0],S=E[1],R=E[2],I=hi.translate(_,S).scale(R);return typeof t.duration=="number"&&t.duration>0?l.transform(ui(d,t.duration),I):l.transform(d,I),!0}}return!1}function wK(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,no(no({},n),{},(i={},He(i,Nt,n[Nt]),He(i,"selected",r.selected),i)))}}),new Map(t)}function _K(e,t){return t.map(function(r){var n=e.find(function(i){return i.id===r.id});return n&&(r.selected=n.selected),r})}function su(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,u=o.edges,l=o.onNodesChange,d=o.onEdgesChange,f=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(f&&i({nodeInternals:wK(t,a)}),l==null||l(t)),r!=null&&r.length&&(h&&i({edges:_K(r,u)}),d==null||d(r))}var Lb=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],GI={width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Lb,nodeExtent:Lb,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:xo.Strict,domNode:null,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,reactFlowVersion:"10.3.17",connectionStartHandle:null,connectOnClick:!0};function KI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Mx=AW(),EK=Mx.Provider,gt=Mx.useStore,Ft=Mx.useStoreApi,SK=function(){return TW(function(t,r){return Yr(Yr({},GI),{},{setNodes:function(i){t({nodeInternals:gm(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,u=a===void 0?{}:a;t({edges:i.map(function(l){return Yr(Yr({},u),l)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",u=typeof o<"u",l=a?gm(i,new Map):new Map,d=u?o:[];t({nodeInternals:l,edges:d,hasDefaultNodes:a,hasDefaultEdges:u})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,u=o.nodeInternals,l=o.fitViewOnInit,d=o.fitViewOnInitDone,f=o.fitViewOnInitOptions,h=o.domNode,p=h==null?void 0:h.querySelector(".react-flow__viewport");if(p){var v=window.getComputedStyle(p),m=new window.DOMMatrixReadOnly(v.transform),y=m.m22,x=i.reduce(function(w,E){var _=u.get(E.id);if(_){var S=Tx(E.nodeElement),R=!!(S.width&&S.height&&(_.width!==S.width||_.height!==S.height||E.forceUpdate));R&&(u.set(_.id,Yr(Yr({},_),{},He({},Nt,Yr(Yr({},_[Nt]),{},{handleBounds:{source:UI(".source",E.nodeElement,y),target:UI(".target",E.nodeElement,y)}})),S)),w.push({id:_.id,type:"dimensions",dimensions:S}))}return w},[]),b=d||l&&!d&&l2(r,Yr({initial:!0},f));t({nodeInternals:new Map(u),fitViewOnInitDone:b}),(x==null?void 0:x.length)>0&&(a==null||a(x))}},updateNodePositions:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,u=r(),l=u.onNodesChange,d=u.nodeInternals,f=u.hasDefaultNodes;if(f||l){var h=i.map(function(m){var y={id:m.id,type:"position",dragging:a};return o&&(y.positionAbsolute=m.positionAbsolute,y.position=m.position),y});if(h!=null&&h.length){if(f){var p=r2(h,Array.from(d.values())),v=gm(p,d);t({nodeInternals:v})}l==null||l(h)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,u=o.nodeInternals,l=o.edges,d,f=null;a?d=i.map(function(h){return Fn(h,!0)}):(d=ro(Array.from(u.values()),i),f=ro(l,[])),su({changedNodes:d,changedEdges:f,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,u=o.edges,l=o.nodeInternals,d,f=null;a?d=i.map(function(h){return Fn(h,!0)}):(d=ro(u,i),f=ro(Array.from(l.values()),[])),su({changedNodes:f,changedEdges:d,get:r,set:t})},unselectNodesAndEdges:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.nodes,a=i.edges,u=r(),l=u.nodeInternals,d=u.edges,f=o||Array.from(l.values()),h=a||d,p=f.map(function(m){return m.selected=!1,Fn(m.id,!1)}),v=h.map(function(m){return Fn(m.id,!1)});su({changedNodes:p,changedEdges:v,get:r,set:t})},setMinZoom:function(i){var o=r(),a=o.d3Zoom,u=o.maxZoom;a==null||a.scaleExtent([i,u]),t({minZoom:i})},setMaxZoom:function(i){var o=r(),a=o.d3Zoom,u=o.minZoom;a==null||a.scaleExtent([u,i]),t({maxZoom:i})},setTranslateExtent:function(i){var o=r(),a=o.d3Zoom;a==null||a.translateExtent(i),t({translateExtent:i})},resetSelectedElements:function(){var i=r(),o=i.nodeInternals,a=i.edges,u=Array.from(o.values()),l=u.filter(function(f){return f.selected}).map(function(f){return Fn(f.id,!1)}),d=a.filter(function(f){return f.selected}).map(function(f){return Fn(f.id,!1)});su({changedNodes:l,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(u){u.positionAbsolute=Jj(u.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Yr({},GI))}})})};function lr(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=lr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Xt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function OK(e){if(Array.isArray(e))return qb(e)}function CK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RK(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
7
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pi(e){return OK(e)||CK(e)||Zj(e)||RK()}var IK={zoomIn:function(){},zoomOut:function(){},zoomTo:function(t){},getZoom:function(){return 1},setViewport:function(t){},getViewport:function(){return{x:0,y:0,zoom:1}},fitView:function(){},setCenter:function(t,r){},fitBounds:function(t){},project:function(t){return t},viewportInitialized:!1},PK=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},NK=function(){var t=Ft(),r=gt(PK,Xt),n=r.d3Zoom,i=r.d3Selection,o=T.useMemo(function(){return i&&n?{zoomIn:function(u){return n.scaleBy(ui(i,u==null?void 0:u.duration),1.2)},zoomOut:function(u){return n.scaleBy(ui(i,u==null?void 0:u.duration),1/1.2)},zoomTo:function(u,l){return n.scaleTo(ui(i,l==null?void 0:l.duration),u)},getZoom:function(){return t.getState().transform[2]},setViewport:function(u,l){var d,f,h,p=Le(t.getState().transform,3),v=p[0],m=p[1],y=p[2],x=hi.translate((d=u.x)!==null&&d!==void 0?d:v,(f=u.y)!==null&&f!==void 0?f:m).scale((h=u.zoom)!==null&&h!==void 0?h:y);n.transform(ui(i,l==null?void 0:l.duration),x)},getViewport:function(){var u=Le(t.getState().transform,3),l=u[0],d=u[1],f=u[2];return{x:l,y:d,zoom:f}},fitView:function(u){return l2(t.getState,u)},setCenter:function(u,l,d){var f=t.getState(),h=f.width,p=f.height,v=f.maxZoom,m=typeof(d==null?void 0:d.zoom)<"u"?d.zoom:v,y=h/2-u*m,x=p/2-l*m,b=hi.translate(y,x).scale(m);n.transform(ui(i,d==null?void 0:d.duration),b)},fitBounds:function(u,l){var d,f=t.getState(),h=f.width,p=f.height,v=f.minZoom,m=f.maxZoom,y=u2(u,h,p,v,m,(d=l==null?void 0:l.padding)!==null&&d!==void 0?d:.1),x=Le(y,3),b=x[0],w=x[1],E=x[2],_=hi.translate(b,w).scale(E);n.transform(ui(i,l==null?void 0:l.duration),_)},project:function(u){var l=t.getState(),d=l.transform,f=l.snapToGrid,h=l.snapGrid;return o2(u,d,f,h)},viewportInitialized:!0}:IK},[n,i]);return o};function YI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f2(){var e=NK(),t=Ft(),r=T.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return Xi({},m)})},[]),n=T.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=T.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(m){return Xi({},m)})},[]),o=T.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v;return m.find(function(y){return y.id===h})},[]),a=T.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,m=p.setNodes,y=p.hasDefaultNodes,x=p.onNodesChange,b=Array.from(v.values()),w=typeof h=="function"?h(b):h;if(y)m(w);else if(x){var E=w.length===0?b.map(function(_){return{type:"remove",id:_.id}}):w.map(function(_){return{item:_,type:"reset"}});x(E)}},[]),u=T.useCallback(function(h){var p=t.getState(),v=p.edges,m=v===void 0?[]:v,y=p.setEdges,x=p.hasDefaultEdges,b=p.onEdgesChange,w=typeof h=="function"?h(m):h;if(x)y(w);else if(b){var E=w.length===0?m.map(function(_){return{type:"remove",id:_.id}}):w.map(function(_){return{item:_,type:"reset"}});b(E)}},[]),l=T.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.nodeInternals,y=v.setNodes,x=v.hasDefaultNodes,b=v.onNodesChange;if(x){var w=Array.from(m.values()),E=[].concat(w,pi(p));y(E)}else if(b){var _=p.map(function(S){return{item:S,type:"add"}});b(_)}},[]),d=T.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),m=v.edges,y=m===void 0?[]:m,x=v.setEdges,b=v.hasDefaultEdges,w=v.onEdgesChange;if(b)x([].concat(pi(y),pi(p)));else if(w){var E=p.map(function(_){return{item:_,type:"add"}});w(E)}},[]),f=T.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,m=v===void 0?[]:v,y=h.transform,x=Array.from(p.values()),b=Le(y,3),w=b[0],E=b[1],_=b[2];return{nodes:x.map(function(S){return Xi({},S)}),edges:m.map(function(S){return Xi({},S)}),viewport:{x:w,y:E,zoom:_}}},[]);return T.useMemo(function(){return Xi(Xi({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:u,addNodes:l,addEdges:d,toObject:f})},[e,r,n,i,o,a,u,l,d,f])}function TK(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function qc(e,t){if(e==null)return{};var r=TK(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function AK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},T.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function MK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},T.createElement("path",{d:"M0 0h32v4.2H0z"}))}function DK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},T.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function jK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function qK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}var kK=["children","className"];function XI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function LK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var uu=function(t){var r=t.children,n=t.className,i=qc(t,kK);return T.createElement("button",LK({type:"button",className:lr(["react-flow__controls-button",n])},i),r)},BK=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},FK=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,u=t.showInteractive,l=u===void 0?!0:u,d=t.fitViewOptions,f=t.onZoomIn,h=t.onZoomOut,p=t.onFitView,v=t.onInteractiveChange,m=t.className,y=t.children,x=Ft(),b=T.useState(!1),w=Le(b,2),E=w[0],_=w[1],S=gt(BK),R=f2(),I=R.zoomIn,N=R.zoomOut,A=R.fitView;if(T.useEffect(function(){_(!0)},[]),!E)return null;var L=function(){I==null||I(),f==null||f()},B=function(){N==null||N(),h==null||h()},U=function(){A==null||A(d),p==null||p()},j=function(){x.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),v==null||v(!S)};return T.createElement("div",{className:lr(["react-flow__controls",m]),style:r},i&&T.createElement(T.Fragment,null,T.createElement(uu,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},T.createElement(AK,null)),T.createElement(uu,{onClick:B,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},T.createElement(MK,null))),a&&T.createElement(uu,{className:"react-flow__controls-fitview",onClick:U,title:"fit view","aria-label":"fit view"},T.createElement(DK,null)),l&&T.createElement(uu,{className:"react-flow__controls-interactive",onClick:j,title:"toggle interactivity","aria-label":"toggle interactivity"},S?T.createElement(qK,null):T.createElement(jK,null)),y)};FK.displayName="Controls";var $K=function(t,r,n){return T.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},zK=function(t,r){return T.createElement("circle",{cx:t,cy:t,r:t,fill:r})},cu;function ZI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function JI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var HK=(cu={},He(cu,bi.Dots,"#81818a"),He(cu,bi.Lines,"#eee"),cu),UK=function(t){return t.transform},d2=function(t){var r=t.variant,n=r===void 0?bi.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,u=a===void 0?.4:a,l=t.color,d=t.style,f=t.className,h=T.useRef(null),p=T.useState(null),v=Le(p,2),m=v[0],y=v[1],x=gt(UK),b=Le(x,3),w=b[0],E=b[1],_=b[2];T.useEffect(function(){var B=document.querySelectorAll(".react-flow__background"),U=Array.from(B).findIndex(function(j){return j===h.current});y("pattern-".concat(U))},[]);var S=o*_||1,R=w%S,I=E%S,N=n===bi.Lines,A=l||HK[n],L=N?$K(S,u,A):zK(u*_,A);return T.createElement("svg",{className:lr(["react-flow__background","react-flow__container",f]),style:JI(JI({},d),{},{width:"100%",height:"100%"}),ref:h},m&&T.createElement(T.Fragment,null,T.createElement("pattern",{id:m,x:R,y:I,width:S,height:S,patternUnits:"userSpaceOnUse"},L),T.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};d2.displayName="Background";var VK=T.memo(d2),WK=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function GK(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&WK.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return T.createElement("div",{className:lr(["react-flow__attribution"].concat(pi(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},T.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var KK=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function QI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var XK=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,u=t.labelShowBg,l=u===void 0?!0:u,d=t.labelBgStyle,f=d===void 0?{}:d,h=t.labelBgPadding,p=h===void 0?[2,4]:h,v=t.labelBgBorderRadius,m=v===void 0?2:v,y=t.children,x=t.className,b=qc(t,KK),w=T.useRef(null),E=T.useState({x:0,y:0,width:0,height:0}),_=Le(E,2),S=_[0],R=_[1],I=lr(["react-flow__edge-textwrapper",x]);return T.useEffect(function(){if(w.current){var N=w.current.getBBox();R({x:N.x,y:N.y,width:N.width,height:N.height})}},[i]),typeof i>"u"||!i?null:T.createElement("g",YK({transform:"translate(".concat(r-S.width/2," ").concat(n-S.height/2,")"),className:I},b),l&&T.createElement("rect",{width:S.width+2*p[0],x:-p[0],y:-p[1],height:S.height+2*p[1],className:"react-flow__edge-textbg",style:f,rx:m,ry:m}),T.createElement("text",{className:"react-flow__edge-text",y:S.height/2,dy:"0.3em",ref:w,style:a},i),y)},ZK=T.memo(XK),kc=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,u=e.labelBgStyle,l=e.labelBgPadding,d=e.labelBgBorderRadius,f=e.style,h=e.markerEnd,p=e.markerStart,v=i?T.createElement(ZK,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:l,labelBgBorderRadius:d}):null;return T.createElement(T.Fragment,null,T.createElement("path",{style:f,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function Wu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,u;switch(t){case we.Left:case we.Right:a=.5*(r+i),u=n;break;case we.Top:case we.Bottom:a=r,u=.5*(n+o);break}return[a,u]}function h2(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?we.Top:u,d=Wu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Wu({pos:l,x1:o,y1:a,x2:t,y2:r}),m=Le(v,2),y=m[0],x=m[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(y,",").concat(x," ").concat(o,",").concat(a)}function JK(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?we.Top:u,d=Wu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Wu({pos:l,x1:o,y1:a,x2:t,y2:r}),m=Le(v,2),y=m[0],x=m[1],b=t*.125+h*.375+y*.375+o*.125,w=r*.125+p*.375+x*.375+a*.125,E=Math.abs(b-t),_=Math.abs(w-r);return[b,w,E,_]}var p2=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?we.Bottom:o,u=e.targetPosition,l=u===void 0?we.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:l},E=h2(w),_=JK(w),S=Le(_,2),R=S[0],I=S[1];return T.createElement(kc,{path:E,centerX:R,centerY:I,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})});function eP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QK(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var tP=[we.Left,we.Right],v2=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,u=a===void 0?we.Bottom:a,l=t.targetPosition,d=l===void 0?we.Top:l,f=tP.includes(u),h=tP.includes(d),p=f&&!h||h&&!f;if(p){var v=f?Math.abs(i-r):0,m=r>i?r-v:r+v,y=f?0:Math.abs(o-n),x=n<o?n+y:n-y;return[m,x,v,y]}var b=Math.abs(i-r)/2,w=i<r?i+b:i-b,E=Math.abs(o-n)/2,_=o<n?o+E:o-E;return[w,_,b,E]};function oa(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,QK({},i))}}var mm=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},ym=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},bm=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},xm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},wm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},_m=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},Em=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},Sm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Bb(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?we.Top:u,d=e.borderRadius,f=d===void 0?5:d,h=e.centerX,p=e.centerY,v=v2({sourceX:t,sourceY:r,targetX:o,targetY:a}),m=Le(v,4),y=m[0],x=m[1],b=m[2],w=m[3],E=Math.min(f,Math.abs(o-t)),_=Math.min(f,Math.abs(a-r)),S=Math.min(E,_,b,w),R=[we.Left,we.Right],I=typeof h<"u"?h:y,N=typeof p<"u"?p:x,A=null,L=null;return t<=o?(A=r<=a?mm(t,N,S):_m(t,N,S),L=r<=a?Sm(o,N,S):xm(o,N,S)):(A=r<a?bm(t,N,S):Em(t,N,S),L=r<a?wm(o,N,S):ym(o,N,S)),R.includes(i)&&R.includes(l)?t<=o?(A=r<=a?Sm(I,r,S):xm(I,r,S),L=r<=a?mm(I,a,S):_m(I,a,S)):(i===we.Right&&l===we.Left||i===we.Left&&l===we.Right||i===we.Left&&l===we.Left)&&(A=r<=a?wm(I,r,S):ym(I,r,S),L=r<=a?bm(I,a,S):Em(I,a,S)):R.includes(i)&&!R.includes(l)?(t<=o?A=r<=a?Sm(o,r,S):xm(o,r,S):A=r<=a?wm(o,r,S):ym(o,r,S),L=""):!R.includes(i)&&R.includes(l)&&(t<=o?A=r<=a?mm(t,a,S):_m(t,a,S):A=r<=a?bm(t,a,S):Em(t,a,S),L=""),"M ".concat(t,",").concat(r).concat(A).concat(L,"L ").concat(o,",").concat(a)}var Dx=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,l=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?we.Bottom:p,m=e.targetPosition,y=m===void 0?we.Top:m,x=e.markerEnd,b=e.markerStart,w=e.borderRadius,E=w===void 0?5:w,_=v2({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),S=Le(_,2),R=S[0],I=S[1],N=Bb({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:E});return T.createElement(kc,{path:N,centerX:R,centerY:I,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:l,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:x,markerStart:b})});function rP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var g2=T.memo(function(e){return T.createElement(Dx,nP(nP({},e),{},{borderRadius:0}))}),m2=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,u=e.labelShowBg,l=e.labelBgStyle,d=e.labelBgPadding,f=e.labelBgBorderRadius,h=e.style,p=e.markerEnd,v=e.markerStart,m=Math.abs(i-r)/2,y=i<r?i+m:i-m,x=Math.abs(n-t)/2,b=n<t?n+x:n-x,w="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return T.createElement(kc,{path:w,centerX:b,centerY:y,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:l,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:v})});function lu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Gu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,u,l;switch(t){case we.Left:u=r-lu(r-i,a),l=n;break;case we.Right:u=r+lu(i-r,a),l=n;break;case we.Top:u=r,l=n-lu(n-o,a);break;case we.Bottom:u=r,l=n+lu(o-n,a);break}return[u,l]}function Lc(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?we.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Gu({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Gu({pos:l,x1:o,y1:a,x2:t,y2:r,c:f}),x=Le(y,2),b=x[0],w=x[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(m," ").concat(b,",").concat(w," ").concat(o,",").concat(a)}function eY(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?we.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?we.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Gu({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Gu({pos:l,x1:o,y1:a,x2:t,y2:r,c:f}),x=Le(y,2),b=x[0],w=x[1],E=t*.125+v*.375+b*.375+o*.125,_=r*.125+m*.375+w*.375+a*.125,S=Math.abs(E-t),R=Math.abs(_-r);return[E,_,S,R]}var Fb=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?we.Bottom:o,u=e.targetPosition,l=u===void 0?we.Top:u,d=e.label,f=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,m=e.labelBgBorderRadius,y=e.style,x=e.markerEnd,b=e.markerStart,w=e.curvature,E={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:l,curvature:w},_=Lc(E),S=eY(E),R=Le(S,2),I=R[0],N=R[1];return T.createElement(kc,{path:_,centerX:I,centerY:N,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})}),jx=T.createContext(null),tY=jx.Provider;jx.Consumer;function $b(e,t,r,n,i,o,a){var u=a.elementFromPoint(e.clientX,e.clientY),l=(u==null?void 0:u.classList.contains("target"))||!1,d=(u==null?void 0:u.classList.contains("source"))||!1,f={elementBelow:u,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(u&&(l||d)){f.isHoveringHandle=!0;var h=u.getAttribute("data-nodeid"),p=u.getAttribute("data-handleid"),v=r?{source:h,sourceHandle:p,target:n,targetHandle:i}:{source:n,sourceHandle:i,target:h,targetHandle:p};f.connection=v;var m=t===xo.Strict?r&&d||!r&&l:!0;m&&(f.isValid=o(v))}return f}function Om(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function y2(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,u=e.setState,l=e.isValidConnection,d=e.elementEdgeUpdaterType,f=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=Qj(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),m=v==null?void 0:v.classList.contains("target"),y=v==null?void 0:v.classList.contains("source");if(!h||!m&&!y&&!d)return;var x=a(),b=x.onConnectStart,w=x.connectionMode,E=d||(m?"target":"source"),_=h.getBoundingClientRect(),S;u({connectionPosition:{x:t.clientX-_.left,y:t.clientY-_.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:E}),b==null||b(t,{nodeId:n,handleId:r,handleType:E});function R(N){u({connectionPosition:{x:N.clientX-_.left,y:N.clientY-_.top}});var A=$b(N,w,o,n,r,l,p),L=A.connection,B=A.elementBelow,U=A.isValid,j=A.isHoveringHandle;if(!j)return Om(S);L.source!==L.target&&B&&(Om(S),S=B,B.classList.add("react-flow__handle-connecting"),B.classList.toggle("react-flow__handle-valid",U))}function I(N){var A=a(),L=A.onConnectStop,B=A.onConnectEnd,U=$b(N,w,o,n,r,l,p),j=U.connection,D=U.isValid;L==null||L(N),D&&(i==null||i(j)),B==null||B(N),d&&f&&f(N),Om(S),u({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",R),p.removeEventListener("mouseup",I)}p.addEventListener("mousemove",R),p.addEventListener("mouseup",I)}var rY=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function iP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nY=function(){return!0},iY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},b2=T.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?we.Top:i,a=e.isValidConnection,u=a===void 0?nY:a,l=e.isConnectable,d=l===void 0?!0:l,f=e.id,h=e.onConnect,p=e.children,v=e.className,m=e.onMouseDown,y=qc(e,rY),x=Ft(),b=T.useContext(jx),w=gt(iY,Xt),E=w.connectionStartHandle,_=w.connectOnClick,S=f||null,R=n==="target",I=function(B){var U=x.getState(),j=U.defaultEdgeOptions,D=U.onConnect,G=U.hasDefaultEdges,F=Cm(Cm({},j),B);if(G){var X=x.getState(),Z=X.edges;x.setState({edges:xK(F,Z)})}D==null||D(F),h==null||h(F)},N=function(B){B.button===0&&y2({event:B,handleId:S,nodeId:b,onConnect:I,isTarget:R,getState:x.getState,setState:x.setState,isValidConnection:u}),m==null||m(B)},A=function(B){var U=x.getState(),j=U.onClickConnectStart,D=U.onClickConnectStop,G=U.onClickConnectEnd,F=U.connectionMode;if(!E){j==null||j(B,{nodeId:b,handleId:S,handleType:n}),x.setState({connectionStartHandle:{nodeId:b,type:n,handleId:S}});return}var X=Qj(B.target),Z=$b(B,F,E.type==="target",E.nodeId,E.handleId||null,u,X),Q=Z.connection,W=Z.isValid;D==null||D(B),W&&I(Q),G==null||G(B),x.setState({connectionStartHandle:null})};return T.createElement("div",Cm({"data-handleid":S,"data-nodeid":b,"data-handlepos":o,className:lr(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!R,target:R,connectable:d,connecting:(E==null?void 0:E.nodeId)===b&&(E==null?void 0:E.handleId)===S&&(E==null?void 0:E.type)===n}]),onMouseDown:N,onClick:_?A:void 0,ref:t},y),p)});b2.displayName="Handle";var Ku=T.memo(b2),x2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?we.Top:i,a=t.sourcePosition,u=a===void 0?we.Bottom:a;return T.createElement(T.Fragment,null,T.createElement(Ku,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,T.createElement(Ku,{type:"source",position:u,isConnectable:n}))};x2.displayName="DefaultNode";var zb=T.memo(x2),w2=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?we.Bottom:i;return T.createElement(T.Fragment,null,r==null?void 0:r.label,T.createElement(Ku,{type:"source",position:o,isConnectable:n}))};w2.displayName="InputNode";var _2=T.memo(w2),E2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?we.Top:i;return T.createElement(T.Fragment,null,T.createElement(Ku,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};E2.displayName="OutputNode";var S2=T.memo(E2),oY=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},aY=function(t,r){var n=t.selectedNodes.map(function(u){return u.id}),i=r.selectedNodes.map(function(u){return u.id}),o=t.selectedEdges.map(function(u){return u.id}),a=r.selectedEdges.map(function(u){return u.id});return Xt(n,i)&&Xt(o,a)};function sY(e){var t=e.onSelectionChange,r=gt(oY,aY),n=r.selectedNodes,i=r.selectedEdges;return T.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var uY=T.memo(sY),cY=function(t){return{setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset}};function qn(e,t){T.useEffect(function(){typeof e<"u"&&t(e)},[e])}function tt(e,t,r){T.useEffect(function(){typeof t<"u"&&r(He({},e,t))},[t])}var lY=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,u=t.onConnectStart,l=t.onConnectStop,d=t.onConnectEnd,f=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,m=t.nodesConnectable,y=t.minZoom,x=t.maxZoom,b=t.nodeExtent,w=t.onNodesChange,E=t.onEdgesChange,_=t.elementsSelectable,S=t.connectionMode,R=t.snapGrid,I=t.snapToGrid,N=t.translateExtent,A=t.connectOnClick,L=t.defaultEdgeOptions,B=t.fitView,U=t.fitViewOptions,j=t.onNodesDelete,D=t.onEdgesDelete,G=t.onNodeDrag,F=t.onNodeDragStart,X=t.onNodeDragStop,Z=t.onSelectionDrag,Q=t.onSelectionDragStart,W=t.onSelectionDragStop,ee=gt(cY,Xt),oe=ee.setNodes,ae=ee.setEdges,H=ee.setDefaultNodesAndEdges,K=ee.setMinZoom,$=ee.setMaxZoom,k=ee.setTranslateExtent,z=ee.setNodeExtent,re=ee.reset,ie=Ft();return T.useEffect(function(){return H(i,o),function(){re()}},[]),tt("defaultEdgeOptions",L,ie.setState),tt("connectionMode",S,ie.setState),tt("onConnect",a,ie.setState),tt("onConnectStart",u,ie.setState),tt("onConnectStop",l,ie.setState),tt("onConnectEnd",d,ie.setState),tt("onClickConnectStart",f,ie.setState),tt("onClickConnectStop",h,ie.setState),tt("onClickConnectEnd",p,ie.setState),tt("nodesDraggable",v,ie.setState),tt("nodesConnectable",m,ie.setState),tt("elementsSelectable",_,ie.setState),tt("snapToGrid",I,ie.setState),tt("snapGrid",R,ie.setState),tt("onNodesChange",w,ie.setState),tt("onEdgesChange",E,ie.setState),tt("connectOnClick",A,ie.setState),tt("fitViewOnInit",B,ie.setState),tt("fitViewOnInitOptions",U,ie.setState),tt("onNodesDelete",j,ie.setState),tt("onEdgesDelete",D,ie.setState),tt("onNodeDrag",G,ie.setState),tt("onNodeDragStart",F,ie.setState),tt("onNodeDragStop",X,ie.setState),tt("onSelectionDrag",Z,ie.setState),tt("onSelectionDragStart",Q,ie.setState),tt("onSelectionDragStop",W,ie.setState),qn(r,oe),qn(n,ae),qn(i,oe),qn(o,ae),qn(y,K),qn(x,$),qn(N,k),qn(b,z),null},fY=".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow .react-flow__connectionline{z-index:1001}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none;position:absolute}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__controls{bottom:20px;left:15px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:20px;position:absolute;right:15px;z-index:5}.react-flow__attribution{background:hsla(0,0%,100%,.5);color:#999;font-size:10px;padding:2px 3px;position:absolute;z-index:1000}.react-flow__attribution a{color:#555;text-decoration:none}.react-flow__attribution.top{top:0}.react-flow__attribution.bottom{bottom:0}.react-flow__attribution.left{left:0}.react-flow__attribution.right{right:0}.react-flow__attribution.center{left:50%;transform:translateX(-50%)}",dY=fY,hY=".react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selected,.react-flow__node-group.selected,.react-flow__node-input.selected,.react-flow__node-output.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle,.react-flow__node-group .react-flow__handle,.react-flow__node-input .react-flow__handle,.react-flow__node-output .react-flow__handle{background:#1a192b}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-default.selectable.selected,.react-flow__node-group.selectable.selected,.react-flow__node-input.selectable.selected,.react-flow__node-output.selectable.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background:hsla(0,0%,94%,.25);border-color:#1a192b}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}",pY=hY,vY=function(t,r,n){return n===we.Left?t-r:n===we.Right?t+r:t},gY=function(t,r,n){return n===we.Top?t-r:n===we.Bottom?t+r:t},oP=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,u=a===void 0?10:a;return T.createElement("circle",{className:lr(["react-flow__edgeupdater",r]),cx:vY(i,u,n),cy:gY(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},Zi=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,u=n.data,l=n.onClick,d=n.onEdgeDoubleClick,f=n.selected,h=n.animated,p=n.label,v=n.labelStyle,m=n.labelShowBg,y=n.labelBgStyle,x=n.labelBgPadding,b=n.labelBgBorderRadius,w=n.style,E=n.source,_=n.target,S=n.sourceX,R=n.sourceY,I=n.targetX,N=n.targetY,A=n.sourcePosition,L=n.targetPosition,B=n.elementsSelectable,U=n.hidden,j=n.sourceHandleId,D=n.targetHandleId,G=n.onContextMenu,F=n.onMouseEnter,X=n.onMouseMove,Z=n.onMouseLeave,Q=n.edgeUpdaterRadius,W=n.onEdgeUpdate,ee=n.onEdgeUpdateStart,oe=n.onEdgeUpdateEnd,ae=n.markerEnd,H=n.markerStart,K=n.rfId,$=T.useState(!1),k=Le($,2),z=k[0],re=k[1],ie=Ft(),se=function(rt){var bt=ie.getState(),Jt=bt.edges,fr=bt.addSelectedEdges,Dt=Jt.find(function(_t){return _t.id===i});B&&(ie.setState({nodesSelectionActive:!1}),fr([i])),l==null||l(rt,Dt)},ce=oa(i,ie.getState,d),be=oa(i,ie.getState,G),Ce=oa(i,ie.getState,F),_e=oa(i,ie.getState,X),he=oa(i,ie.getState,Z),fe=function(rt,bt){var Jt=bt?_:E,fr=(bt?D:j)||null,Dt=bt?"target":"source",_t=function(){return!0},jt=bt,Vr=ie.getState().edges.find(function(dr){return dr.id===i});ee==null||ee(rt,Vr,Dt);var Yn=oe?function(dr){return oe(dr,Vr,Dt)}:void 0,Cn=function(Ti){return W==null?void 0:W(Vr,Ti)};y2({event:rt,handleId:fr,nodeId:Jt,onConnect:Cn,isTarget:jt,getState:ie.getState,setState:ie.setState,isValidConnection:_t,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Yn})},Ee=function(rt){return fe(rt,!0)},Pe=function(rt){return fe(rt,!1)},Ze=function(){return re(!0)},ze=function(){return re(!1)},Fe=T.useMemo(function(){return"url(#".concat(kb(H,K),")")},[H,K]),Ue=T.useMemo(function(){return"url(#".concat(kb(ae,K),")")},[ae,K]);if(U)return null;var ct=!B&&!l,lt=typeof W<"u",mt=lr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:ct,updating:z}]);return T.createElement("g",{className:mt,onClick:se,onDoubleClick:ce,onContextMenu:be,onMouseEnter:Ce,onMouseMove:_e,onMouseLeave:he},T.createElement(e,{id:i,source:E,target:_,selected:f,animated:h,label:p,labelStyle:v,labelShowBg:m,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:b,data:u,style:w,sourceX:S,sourceY:R,targetX:I,targetY:N,sourcePosition:A,targetPosition:L,sourceHandleId:j,targetHandleId:D,markerStart:Fe,markerEnd:Ue,"data-testid":"rf__edge-".concat(i)}),lt&&T.createElement("g",{onMouseDown:Ee,onMouseEnter:Ze,onMouseOut:ze},T.createElement(oP,{position:A,centerX:S,centerY:R,radius:Q})),lt&&T.createElement("g",{onMouseDown:Pe,onMouseEnter:Ze,onMouseOut:ze},T.createElement(oP,{position:L,centerX:I,centerY:N,radius:Q})))};return t.displayName="EdgeWrapper",T.memo(t)});function aP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mY(e){var t={default:Zi(e.default||Fb),straight:Zi(e.bezier||m2),step:Zi(e.step||g2),smoothstep:Zi(e.step||Dx),simplebezier:Zi(e.simplebezier||p2)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Zi(e[o]||Fb),i},r);return sP(sP({},t),n)}function uP(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,o=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case we.Top:return{x:n+o/2,y:i};case we.Right:return{x:n+o,y:i+a/2};case we.Bottom:return{x:n+o/2,y:i+a};case we.Left:return{x:n,y:i+a/2}}}function cP(e,t){if(!e)return null;var r=null;return e.length===1||!t?r=e[0]:t&&(r=e.find(function(n){return n.id===t})),typeof r>"u"?null:r}var yY=function(t,r,n,i,o,a){var u=uP(n,t,r),l=uP(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:l.x,targetY:l.y}};function bY(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,u=e.width,l=e.height,d=e.transform,f={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+o),y2:Math.max(t.y+i,r.y+a)};f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);var h=Vu({x:(0-d[0])/d[2],y:(0-d[1])/d[2],width:u/d[2],height:l/d[2]}),p=Math.max(0,Math.min(h.x2,f.x2)-Math.max(h.x,f.x)),v=Math.max(0,Math.min(h.y2,f.y2)-Math.max(h.y,f.y)),m=Math.ceil(p*v);return m>0}function lP(e,t){var r,n,i,o,a,u=e.get(t),l=(u==null||(r=u[Nt])===null||r===void 0?void 0:r.handleBounds)||null,d=!u||!l||!u.width||!u.height||typeof((n=u.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((i=u.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(u==null||(o=u.positionAbsolute)===null||o===void 0?void 0:o.x)||0,y:(u==null||(a=u.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(u==null?void 0:u.width)||0,height:(u==null?void 0:u.height)||0},l,!d]}var xY=typeof document<"u"?document:null,Yu=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:xY},r=T.useState(!1),n=Le(r,2),i=n[0],o=n[1],a=T.useRef(new Set([])),u=T.useMemo(function(){if(e!==null){var h=Array.isArray(e)?e:[e],p=h.filter(function(m){return typeof m=="string"}).map(function(m){return m.split("+")}),v=p.reduce(function(m,y){return m.concat.apply(m,pi(y))},[]);return[p,v]}return[[],[]]},[e]),l=Le(u,2),d=l[0],f=l[1];return T.useEffect(function(){if(e!==null){var h,p,v=function(b){if(hP(b))return!1;var w=dP(b.code,f);a.current.add(b[w]),fP(d,a.current,!1)&&(b.preventDefault(),o(!0))},m=function(b){if(hP(b))return!1;var w=dP(b.code,f);fP(d,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(b[w])},y=function(){a.current.clear(),o(!1)};return t==null||(h=t.target)===null||h===void 0||h.addEventListener("keydown",v),t==null||(p=t.target)===null||p===void 0||p.addEventListener("keyup",m),window.addEventListener("blur",y),function(){var x,b;t==null||(x=t.target)===null||x===void 0||x.removeEventListener("keydown",v),t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keyup",m),window.removeEventListener("blur",y)}}},[e,o]),i});function fP(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(i){return t.has(i)})})}function dP(e,t){return t.includes(e)?"code":"key"}function hP(e){var t,r=((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))}var wY=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},_Y=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Ft(),i=gt(wY,Xt),o=i.onNodesChange,a=i.onEdgesChange,u=Yu(t),l=Yu(r);T.useEffect(function(){var d=n.getState(),f=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,m=d.onNodesDelete,y=d.onEdgesDelete,x=Array.from(f.values()),b=x.reduce(function(N,A){return(!A.selected&&A.parentNode&&N.find(function(L){return L.id===A.parentNode})||A.selected)&&N.push(A),N},[]),w=h.filter(function(N){return N.selected});if(u&&(b||w)){var E=s2(b,h),_=[].concat(pi(w),pi(E)),S=_.reduce(function(N,A){return N.includes(A.id)||N.push(A.id),N},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(N){return!S.includes(N.id)})}),p&&(b.forEach(function(N){f.delete(N.id)}),n.setState({nodeInternals:new Map(f)}))),S.length>0&&(y==null||y(_),a)){var R=S.map(function(N){return{id:N,type:"remove"}});a(R)}if(b.length>0&&(m==null||m(b),o)){var I=b.map(function(N){return{id:N.id,type:"remove"}});o(I)}n.setState({nodesSelectionActive:!1})}},[u,o,a]),T.useEffect(function(){n.setState({multiSelectionActive:l})},[l])});function EY(e){var t=Ft();T.useEffect(function(){var r,n=function(){if(e.current){var o=Tx(e.current);process.env.NODE_ENV==="development"&&(o.height===0||o.width===0)&&console.warn("[React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#400"),t.setState({width:o.width||500,height:o.height||500})}};return n(),window.onresize=n,e.current&&(r=new ResizeObserver(function(){return n()}),r.observe(e.current)),function(){window.onresize=null,r&&e.current&&r.unobserve(e.current)}},[])}var SY=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Rm=function(t){return{x:t.x,y:t.y,zoom:t.k}},fu=function(t,r){return t.target.closest(".".concat(r))},OY=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},CY=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,u=t.zoomOnPinch,l=u===void 0?!0:u,d=t.panOnScroll,f=d===void 0?!1:d,h=t.panOnScrollSpeed,p=h===void 0?.5:h,v=t.panOnScrollMode,m=v===void 0?so.Free:v,y=t.zoomOnDoubleClick,x=y===void 0?!0:y,b=t.selectionKeyPressed,w=t.elementsSelectable,E=t.panOnDrag,_=E===void 0?!0:E,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,A=N===void 0?1:N,L=t.defaultPosition,B=L===void 0?[0,0]:L,U=t.zoomActivationKeyCode,j=t.preventScrolling,D=j===void 0?!0:j,G=t.children,F=t.noWheelClassName,X=t.noPanClassName,Z=Ft(),Q=T.useRef(!1),W=T.useRef(null),ee=T.useRef({x:0,y:0,zoom:0}),oe=gt(OY,Xt),ae=oe.d3Zoom,H=oe.d3Selection,K=oe.d3ZoomHandler,$=Yu(U);return EY(W),T.useEffect(function(){if(W.current){var k,z=lK().scaleExtent([R,I]).translateExtent(S),re=qr(W.current).call(z),ie=uo(B[0],S[0][0],S[1][0]),se=uo(B[1],S[0][1],S[1][1]),ce=uo(A,R,I),be=hi.translate(ie,se).scale(ce);z.transform(re,be),Z.setState({d3Zoom:z,d3Selection:re,d3ZoomHandler:re.on("wheel.zoom"),transform:[ie,se,ce],domNode:(k=re.node())===null||k===void 0?void 0:k.closest(".react-flow")})}},[]),T.useEffect(function(){H&&ae&&(f&&!$?H.on("wheel",function(k){if(fu(k,F))return!1;k.preventDefault(),k.stopImmediatePropagation();var z=H.property("__zoom").k||1;if(k.ctrlKey&&l){var re=Zr(k),ie=-k.deltaY*(k.deltaMode===1?.05:k.deltaMode?1:.002)*10,se=z*Math.pow(2,ie);ae.scaleTo(H,se,re);return}var ce=k.deltaMode===1?20:1,be=m===so.Vertical?0:k.deltaX*ce,Ce=m===so.Horizontal?0:k.deltaY*ce;ae.translateBy(H,-(be/z)*p,-(Ce/z)*p)}).on("wheel.zoom",null):typeof K<"u"&&H.on("wheel",function(k){if(!D||fu(k,F))return null;k.preventDefault()}).on("wheel.zoom",K))},[f,m,H,ae,K,$,l,D,F]),T.useEffect(function(){ae&&(b&&!Q.current?ae.on("zoom",null):b||ae.on("zoom",function(k){if(Z.setState({transform:[k.transform.x,k.transform.y,k.transform.k]}),r){var z=Rm(k.transform);r(k.sourceEvent,z)}}))},[b,ae,r]),T.useEffect(function(){ae&&ae.on("start",function(k){if(Q.current=!0,n){var z=Rm(k.transform);ee.current=z,n(k.sourceEvent,z)}})},[ae,n]),T.useEffect(function(){ae&&ae.on("end",function(k){if(Q.current=!1,i&&SY(ee.current,k.transform)){var z=Rm(k.transform);ee.current=z,i(k.sourceEvent,z)}})},[ae,i]),T.useEffect(function(){ae&&ae.filter(function(k){var z=$||a,re=l&&k.ctrlKey;return!_&&!z&&!f&&!x&&!l||b||!x&&k.type==="dblclick"||fu(k,F)&&k.type==="wheel"||fu(k,X)&&k.type!=="wheel"||!l&&k.ctrlKey&&k.type==="wheel"||!z&&!f&&!re&&k.type==="wheel"||!_&&(k.type==="mousedown"||k.type==="touchstart")?!1:(!k.ctrlKey||k.type==="wheel")&&!k.button})},[ae,a,l,f,x,_,b,w,$]),T.createElement("div",{className:"react-flow__renderer react-flow__container",ref:W},G)};function pP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gP(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var RY=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},mP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},IY=T.memo(function(e){var t=e.selectionKeyPressed,r=Ft(),n=T.useRef(0),i=T.useRef(0),o=T.useRef(),a=T.useState(mP),u=Le(a,2),l=u[0],d=u[1],f=gt(RY,Xt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(mP),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(_){var S=_.target.closest(".react-flow");o.current=S.getBoundingClientRect();var R=gP(_,o.current);d({width:0,height:0,startX:R.x,startY:R.y,x:R.x,y:R.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},x=function(_){var S,R;if(!(!t||!l.draw||!o.current)){var I=gP(_,o.current),N=(S=l.startX)!==null&&S!==void 0?S:0,A=(R=l.startY)!==null&&R!==void 0?R:0,L=vP(vP({},l),{},{x:I.x<N?I.x:N,y:I.y<A?I.y:A,width:Math.abs(I.x-N),height:Math.abs(I.y-A)}),B=r.getState(),U=B.nodeInternals,j=B.edges,D=B.transform,G=B.onNodesChange,F=B.onEdgesChange,X=Array.from(U.values()),Z=a2(U,L,D,!1,!0),Q=s2(Z,j).map(function(ae){return ae.id}),W=Z.map(function(ae){return ae.id});if(n.current!==W.length){n.current=W.length;var ee=ro(X,W);ee.length&&(G==null||G(ee))}if(i.current!==Q.length){i.current=Q.length;var oe=ro(j,Q);oe.length&&(F==null||F(oe))}d(L)}},b=function(){r.setState({nodesSelectionActive:n.current>0}),m()},w=function(){r.setState({nodesSelectionActive:!1}),m()};return T.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:y,onMouseMove:x,onMouseUp:b,onMouseLeave:w},l.draw&&T.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:l.width,height:l.height,transform:"translate(".concat(l.x,"px, ").concat(l.y,"px)")}}))});function yP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O2(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:O2(r,t):!1}function xP(e,t,r){var n=e;do{var i;if((i=n)!==null&&i!==void 0&&i.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function PY(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!O2(n,e))}).map(function(n){var i,o,a,u;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((i=(o=n.positionAbsolute)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i:0),y:t.y-((a=(u=n.positionAbsolute)===null||u===void 0?void 0:u.y)!==null&&a!==void 0?a:0)},delta:{x:0,y:0},extent:n.extent,parentNode:n.parentNode,width:n.width,height:n.height}})}function NY(e,t,r,n,i,o){var a=Le(n,2),u=a[0],l=a[1],d=e.extent||o,f={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(f.x=u*Math.round(f.x/u),f.y=l*Math.round(f.y/l)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var h=i.get(e.parentNode);d=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.height-e.height]]:d}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),d=o;else if(e.extent&&e.parentNode){var p,v,m,y,x=i.get(e.parentNode),b=(p=x==null||(v=x.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,w=(m=x==null||(y=x.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&m!==void 0?m:0;d=[[e.extent[0][0]+b,e.extent[0][1]+w],[e.extent[1][0]+b,e.extent[1][1]+w]]}var E={x:0,y:0};if(e.parentNode){var _,S,R,I,N=i.get(e.parentNode);E={x:(_=N==null||(S=N.positionAbsolute)===null||S===void 0?void 0:S.x)!==null&&_!==void 0?_:0,y:(R=N==null||(I=N.positionAbsolute)===null||I===void 0?void 0:I.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?Jj(f,d):f,e.position={x:e.positionAbsolute.x-E.x,y:e.positionAbsolute.y-E.y},e}function Im(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return bP(bP({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function Pm(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function C2(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,u=e.isSelectable,l=e.selectNodesOnDrag,d=T.useState(!1),f=Le(d,2),h=f[0],p=f[1],v=Ft(),m=T.useRef(),y=T.useRef({x:null,y:null}),x=T.useCallback(function(b){var w=b.sourceEvent,E=v.getState(),_=E.transform,S=E.snapGrid,R=E.snapToGrid,I=w.touches?w.touches[0].clientX:w.clientX,N=w.touches?w.touches[0].clientY:w.clientY,A=o2({x:I,y:N},_,R,S);return A},[]);return T.useEffect(function(){if(t!=null&&t.current){var b=qr(t.current);if(n)b.on(".drag",null);else{var w=x8().on("start",function(E){var _=v.getState(),S=_.nodeInternals,R=_.multiSelectionActive,I=_.unselectNodesAndEdges,N=_.onNodeDragStart,A=_.onSelectionDragStart,L=a?N:Pm(A);if(!l&&!R&&a){var B;(B=S.get(a))!==null&&B!==void 0&&B.selected||I()}a&&u&&l&&i2({id:a,store:v});var U=x(E);if(y.current=U,m.current=PY(S,U,a),L&&m.current){var j=Im({nodeId:a,dragItems:m.current,nodeInternals:S}),D=Le(j,2),G=D[0],F=D[1];L(E.sourceEvent,G,F)}}).on("drag",function(E){var _=v.getState(),S=_.updateNodePositions,R=_.snapToGrid,I=_.snapGrid,N=_.nodeInternals,A=_.nodeExtent,L=_.onNodeDrag,B=_.onSelectionDrag,U=x(E);if((y.current.x!==U.x||y.current.y!==U.y)&&m.current){y.current=U,m.current=m.current.map(function(Z){return NY(Z,U,R,I,N,A)});var j=a?L:Pm(B);if(S(m.current,!0,!0),p(!0),j){var D=Im({nodeId:a,dragItems:m.current,nodeInternals:N}),G=Le(D,2),F=G[0],X=G[1];j(E.sourceEvent,F,X)}}E.on("end",function(Z){if(p(!1),m.current){var Q=v.getState(),W=Q.updateNodePositions,ee=Q.nodeInternals,oe=Q.onNodeDragStop,ae=Q.onSelectionDragStop,H=a?oe:Pm(ae);if(W(m.current,!1,!1),H){var K=Im({nodeId:a,dragItems:m.current,nodeInternals:ee}),$=Le(K,2),k=$[0],z=$[1];H(Z.sourceEvent,k,z)}}})}).filter(function(E){var _=E.target,S=!E.button&&(!i||!xP(_,".".concat(i),t))&&(!o||xP(_,o,t));return S});return b.call(w),function(){b.on(".drag",null)}}}},[t,n,i,o,u,v,a,l,x]),h}function wP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var AY=function(t){return TY({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Ax(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},MY=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Ax(r)};function DY(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Ft(),i=gt(AY,Xt),o=i.transformString,a=i.userSelectionActive,u=gt(MY,Xt),l=u.width,d=u.height,f=u.x,h=u.y,p=T.useRef(null);if(C2({nodeRef:p}),a||!l||!d)return null;var v=t?function(m){var y=Array.from(n.getState().nodeInternals.values()).filter(function(x){return x.selected});t(m,y)}:void 0;return T.createElement("div",{className:lr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},T.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:l,height:d,top:h,left:f}}))}var jY=T.memo(DY),qY=function(t){return t.nodesSelectionActive},R2=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,u=t.onMove,l=t.onMoveStart,d=t.onMoveEnd,f=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,m=t.zoomOnScroll,y=t.zoomOnPinch,x=t.panOnScroll,b=t.panOnScrollSpeed,w=t.panOnScrollMode,E=t.zoomOnDoubleClick,_=t.panOnDrag,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,A=t.defaultPosition,L=t.preventScrolling,B=t.onSelectionContextMenu,U=t.noWheelClassName,j=t.noPanClassName,D=Ft(),G=gt(qY),F=Yu(f);_Y({deleteKeyCode:a,multiSelectionKeyCode:h});var X=function(ee){n==null||n(ee),D.getState().resetSelectedElements(),D.setState({nodesSelectionActive:!1})},Z=i?function(W){return i(W)}:void 0,Q=o?function(W){return o(W)}:void 0;return T.createElement(CY,{onMove:u,onMoveStart:l,onMoveEnd:d,selectionKeyPressed:F,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:b,panOnScrollMode:w,zoomOnDoubleClick:E,panOnDrag:_,translateExtent:S,minZoom:R,maxZoom:I,defaultZoom:N,defaultPosition:A,zoomActivationKeyCode:p,preventScrolling:L,noWheelClassName:U,noPanClassName:j},r,T.createElement(IY,{selectionKeyPressed:F}),G&&T.createElement(jY,{onSelectionContextMenu:B,noPanClassName:j}),T.createElement("div",{className:"react-flow__pane react-flow__container",onClick:X,onContextMenu:Z,onWheel:Q}))};R2.displayName="FlowRenderer";var kY=T.memo(R2);function LY(e){var t=gt(T.useCallback(function(r){return e?a2(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var BY=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},I2=function(t){var r=gt(BY,Xt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=LY(t.onlyRenderVisibleElements),l=T.useRef(),d=T.useMemo(function(){if(typeof ResizeObserver>"u")return null;var f=new ResizeObserver(function(h){var p=h.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(p)});return l.current=f,f},[]);return T.useEffect(function(){return function(){var f;l==null||(f=l.current)===null||f===void 0||f.disconnect()}},[]),T.createElement("div",{className:"react-flow__nodes react-flow__container"},u.map(function(f){var h,p,v,m,y,x,b,w=f.type||"default";t.nodeTypes[w]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(w,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),w="default");var E=t.nodeTypes[w]||t.nodeTypes.default,_=!!(f.draggable||n&&typeof f.draggable>"u"),S=!!(f.selectable||o&&typeof f.selectable>"u"),R=!!(f.connectable||i&&typeof f.connectable>"u");return T.createElement(E,{key:f.id,id:f.id,className:f.className,style:f.style,type:w,data:f.data,sourcePosition:f.sourcePosition||we.Bottom,targetPosition:f.targetPosition||we.Top,hidden:f.hidden,xPos:(h=(p=f.positionAbsolute)===null||p===void 0?void 0:p.x)!==null&&h!==void 0?h:0,yPos:(v=(m=f.positionAbsolute)===null||m===void 0?void 0:m.y)!==null&&v!==void 0?v:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!f.selected,isDraggable:_,isSelectable:S,isConnectable:R,resizeObserver:d,dragHandle:f.dragHandle,zIndex:(y=(x=f[Nt])===null||x===void 0?void 0:x.z)!==null&&y!==void 0?y:0,isParent:!!((b=f[Nt])!==null&&b!==void 0&&b.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!f.width&&!!f.height})}))};I2.displayName="NodeRenderer";var FY=T.memo(I2),Ji;function _P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_P(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_P(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $Y=(Ji={},He(Ji,we.Left,we.Right),He(Ji,we.Right,we.Left),He(Ji,we.Top,we.Bottom),He(Ji,we.Bottom,we.Top),Ji),zY=(function(e){var t,r,n,i,o,a=e.connectionNodeId,u=e.connectionHandleType,l=e.connectionLineStyle,d=e.connectionLineType,f=d===void 0?$n.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=gt(T.useCallback(function(Q){return{fromNode:Q.nodeInternals.get(a),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2]}},[a]),Xt),m=v.fromNode,y=v.handleId,x=v.toX,b=v.toY,w=m==null||(t=m[Nt])===null||t===void 0?void 0:t.handleBounds;if(!m||!h||!(w!=null&&w[u]))return null;var E=w[u],_=y?E.find(function(Q){return Q.id===y}):E[0],S=_?_.x+_.width/2:((r=m==null?void 0:m.width)!==null&&r!==void 0?r:0)/2,R=_?_.y+_.height/2:(n=m==null?void 0:m.height)!==null&&n!==void 0?n:0,I=((m==null||(i=m.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+S,N=((m==null||(o=m.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+R,A=_==null?void 0:_.position;if(!A)return null;var L=$Y[A],B,U,j,D,G,F;switch(u){case"source":B=I,U=N,j=A,D=x,G=b,F=L;break;case"target":B=x,U=b,j=L,D=I,G=N,F=A;break}if(p)return T.createElement("g",{className:"react-flow__connection"},T.createElement(p,{connectionLineType:f,connectionLineStyle:l,fromNode:m,fromHandle:_,fromX:I,fromY:N,toX:x,toY:b,fromPosition:A,toPosition:L,sourcePosition:j,targetPosition:F,sourceNode:m,sourceHandle:_,targetX:D,targetY:G,sourceX:B,sourceY:U}));var X="",Z={sourceX:B,sourceY:U,sourcePosition:j,targetX:D,targetY:G,targetPosition:F};return f===$n.Bezier?X=Lc(Z):f===$n.Step?X=Bb(EP(EP({},Z),{},{borderRadius:0})):f===$n.SmoothStep?X=Bb(Z):f===$n.SimpleBezier?X=h2(Z):X="M".concat(B,",").concat(U," ").concat(D,",").concat(G),T.createElement("g",{className:"react-flow__connection"},T.createElement("path",{d:X,className:"react-flow__connection-path",style:l}))});function Hb(e){"@babel/helpers - typeof";return Hb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hb(e)}var du,HY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},UY=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return T.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},SP=(du={},He(du,Uu.Arrow,HY),He(du,Uu.ArrowClosed,UY),du);function VY(e){var t=T.useMemo(function(){var r=SP.hasOwnProperty(e);return r?SP[e]:(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Marker type "'.concat(e,`" doesn't exist. Help: https://reactflow.dev/error#900`)),function(){return null})},[e]);return t}function OP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function WY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var GY=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,u=t.height,l=u===void 0?12.5:u,d=t.markerUnits,f=d===void 0?"strokeWidth":d,h=t.strokeWidth,p=t.orient,v=p===void 0?"auto":p,m=VY(n);return T.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(l),viewBox:"-10 -10 20 20",markerUnits:f,orient:v,refX:"0",refY:"0"},T.createElement(m,{color:i,strokeWidth:h}))},KY=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,u){return[u.markerStart,u.markerEnd].forEach(function(l){if(l&&Hb(l)==="object"){var d=kb(l,n);o.includes(d)||(a.push(WY({id:d,color:l.color||r},l)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},P2=function(t){var r=t.defaultColor,n=t.rfId,i=gt(T.useCallback(KY({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(u,l){return u.id!==a[l].id}))});return T.createElement("defs",null,i.map(function(o){return T.createElement(GY,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})}))};P2.displayName="MarkerDefinitions";var YY=T.memo(P2),XY=[{level:0,isMaxLevel:!0,edges:[]}];function ZY(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var l=e2(u.zIndex),d=l?u.zIndex:0;if(r){var f,h,p,v;d=l?u.zIndex:Math.max(((f=t.get(u.source))===null||f===void 0||(h=f[Nt])===null||h===void 0?void 0:h.z)||0,((p=t.get(u.target))===null||p===void 0||(v=p[Nt])===null||v===void 0?void 0:v.z)||0)}return a[d]?a[d].push(u):a[d]=[u],n=d>n?d:n,a},{}),o=Object.entries(i).map(function(a){var u=Le(a,2),l=u[0],d=u[1],f=+l;return{edges:d,level:f,isMaxLevel:f===n}});return o.length===0?XY:o}function JY(e,t,r){var n=gt(T.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),u=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(u==null?void 0:u.width)&&(u==null?void 0:u.height)&&bY({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:u.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:u.width,targetHeight:u.height,width:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return ZY(n,t,r)}var QY=function(t){return{connectionNodeId:t.connectionNodeId,connectionHandleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals}},N2=function(t){var r=gt(QY,Xt),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,u=r.width,l=r.height,d=r.connectionMode,f=r.nodeInternals,h=JY(t.onlyRenderVisibleElements,f,t.elevateEdgesOnSelect);if(!u)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,m=t.connectionLineStyle,y=t.connectionLineComponent,x=t.connectionLineContainerStyle,b=n&&i;return T.createElement(T.Fragment,null,h.map(function(w){var E=w.level,_=w.edges,S=w.isMaxLevel;return T.createElement("svg",{key:E,style:{zIndex:E},width:u,height:l,className:"react-flow__edges react-flow__container"},S&&T.createElement(YY,{defaultColor:v,rfId:t.rfId}),T.createElement("g",null,_.map(function(R){var I=lP(f,R.source),N=Le(I,3),A=N[0],L=N[1],B=N[2],U=lP(f,R.target),j=Le(U,3),D=j[0],G=j[1],F=j[2];if(!B||!F)return null;var X=R.type||"default";t.edgeTypes[X]||(console.warn('[React Flow]: Edge type "'.concat(X,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),X="default");var Z=t.edgeTypes[X]||t.edgeTypes.default,Q=d===xo.Strict?G.target:G.target||G.source,W=cP(L.source,R.sourceHandle||null),ee=cP(Q,R.targetHandle||null),oe=(W==null?void 0:W.position)||we.Bottom,ae=(ee==null?void 0:ee.position)||we.Top;if(!W)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(R.sourceHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;if(!ee)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(R.targetHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;var H=yY(A,W,oe,D,ee,ae),K=H.sourceX,$=H.sourceY,k=H.targetX,z=H.targetY;return T.createElement(Z,{key:R.id,id:R.id,className:lr([R.className,t.noPanClassName]),type:X,data:R.data,selected:!!R.selected,animated:!!R.animated,hidden:!!R.hidden,label:R.label,labelStyle:R.labelStyle,labelShowBg:R.labelShowBg,labelBgStyle:R.labelBgStyle,labelBgPadding:R.labelBgPadding,labelBgBorderRadius:R.labelBgBorderRadius,style:R.style,source:R.source,target:R.target,sourceHandleId:R.sourceHandle,targetHandleId:R.targetHandle,markerEnd:R.markerEnd,markerStart:R.markerStart,sourceX:K,sourceY:$,targetX:k,targetY:z,sourcePosition:oe,targetPosition:ae,elementsSelectable:a,onEdgeUpdate:t.onEdgeUpdate,onContextMenu:t.onEdgeContextMenu,onMouseEnter:t.onEdgeMouseEnter,onMouseMove:t.onEdgeMouseMove,onMouseLeave:t.onEdgeMouseLeave,onClick:t.onEdgeClick,edgeUpdaterRadius:t.edgeUpdaterRadius,onEdgeDoubleClick:t.onEdgeDoubleClick,onEdgeUpdateStart:t.onEdgeUpdateStart,onEdgeUpdateEnd:t.onEdgeUpdateEnd,rfId:t.rfId})})))}),b&&T.createElement("svg",{style:x,width:u,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},T.createElement(zY,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};N2.displayName="EdgeRenderer";var e9=T.memo(N2),t9=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function r9(e){var t=e.children,r=gt(t9);return T.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function n9(e){var t=f2(),r=T.useRef(!1);T.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var T2=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,u=t.onInit,l=t.onNodeClick,d=t.onEdgeClick,f=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,m=t.onNodeMouseLeave,y=t.onNodeContextMenu,x=t.onSelectionContextMenu,b=t.connectionLineType,w=t.connectionLineStyle,E=t.connectionLineComponent,_=t.connectionLineContainerStyle,S=t.selectionKeyCode,R=t.multiSelectionKeyCode,I=t.zoomActivationKeyCode,N=t.deleteKeyCode,A=t.onlyRenderVisibleElements,L=t.elementsSelectable,B=t.selectNodesOnDrag,U=t.translateExtent,j=t.minZoom,D=t.maxZoom,G=t.defaultZoom,F=t.defaultPosition,X=t.preventScrolling,Z=t.defaultMarkerColor,Q=t.zoomOnScroll,W=t.zoomOnPinch,ee=t.panOnScroll,oe=t.panOnScrollSpeed,ae=t.panOnScrollMode,H=t.zoomOnDoubleClick,K=t.panOnDrag,$=t.onPaneClick,k=t.onPaneScroll,z=t.onPaneContextMenu,re=t.onEdgeUpdate,ie=t.onEdgeContextMenu,se=t.onEdgeMouseEnter,ce=t.onEdgeMouseMove,be=t.onEdgeMouseLeave,Ce=t.edgeUpdaterRadius,_e=t.onEdgeUpdateStart,he=t.onEdgeUpdateEnd,fe=t.noDragClassName,Ee=t.noWheelClassName,Pe=t.noPanClassName,Ze=t.elevateEdgesOnSelect,ze=t.id;return n9(u),T.createElement(kY,{onPaneClick:$,onPaneContextMenu:z,onPaneScroll:k,deleteKeyCode:N,selectionKeyCode:S,multiSelectionKeyCode:R,zoomActivationKeyCode:I,elementsSelectable:L,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:W,zoomOnDoubleClick:H,panOnScroll:ee,panOnScrollSpeed:oe,panOnScrollMode:ae,panOnDrag:K,translateExtent:U,minZoom:j,maxZoom:D,defaultZoom:G,defaultPosition:F,onSelectionContextMenu:x,preventScrolling:X,noDragClassName:fe,noWheelClassName:Ee,noPanClassName:Pe},T.createElement(r9,null,T.createElement(e9,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:_,onEdgeUpdate:re,onlyRenderVisibleElements:A,onEdgeContextMenu:ie,onEdgeMouseEnter:se,onEdgeMouseMove:ce,onEdgeMouseLeave:be,onEdgeUpdateStart:_e,onEdgeUpdateEnd:he,edgeUpdaterRadius:Ce,defaultMarkerColor:Z,noPanClassName:Pe,elevateEdgesOnSelect:!!Ze,rfId:ze}),T.createElement(FY,{nodeTypes:r,onNodeClick:l,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:B,onlyRenderVisibleElements:A,noPanClassName:Pe,noDragClassName:fe})))};T2.displayName="GraphView";var i9=T.memo(T2),A2=function(){return null};A2.displayName="GroupNode";function CP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var aa=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,u=n.xPos,l=n.yPos,d=n.selected,f=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,m=n.onContextMenu,y=n.onDoubleClick,x=n.style,b=n.className,w=n.isDraggable,E=n.isSelectable,_=n.isConnectable,S=n.selectNodesOnDrag,R=n.sourcePosition,I=n.targetPosition,N=n.hidden,A=n.resizeObserver,L=n.dragHandle,B=n.zIndex,U=n.isParent,j=n.noPanClassName,D=n.noDragClassName,G=n.initialized,F=Ft(),X=T.useRef(null),Z=T.useRef(R),Q=T.useRef(I),W=T.useRef(o),ee=E||w||f||h||p||v,oe=ia(i,F.getState,h),ae=ia(i,F.getState,p),H=ia(i,F.getState,v),K=ia(i,F.getState,m),$=ia(i,F.getState,y),k=function(ie){if(E&&(!S||!w)&&i2({id:i,store:F}),f){var se=F.getState().nodeInternals.get(i);f(ie,RP({},se))}};T.useEffect(function(){if(X.current&&!N){var re=X.current;return A==null||A.observe(re),function(){return A==null?void 0:A.unobserve(re)}}},[N]),T.useEffect(function(){var re=W.current!==o,ie=Z.current!==R,se=Q.current!==I;X.current&&(re||ie||se)&&(re&&(W.current=o),ie&&(Z.current=R),se&&(Q.current=I),F.getState().updateNodeDimensions([{id:i,nodeElement:X.current,forceUpdate:!0}]))},[i,o,R,I]);var z=C2({nodeRef:X,disabled:N||!w,noDragClassName:D,handleSelector:L,nodeId:i,isSelectable:E,selectNodesOnDrag:S});return N?null:T.createElement("div",{className:lr(["react-flow__node","react-flow__node-".concat(o),j,b,{selected:d,selectable:E,parent:U}]),ref:X,style:RP({zIndex:B,transform:"translate(".concat(u,"px,").concat(l,"px)"),pointerEvents:ee?"all":"none",visibility:G?"visible":"hidden"},x),onMouseEnter:oe,onMouseMove:ae,onMouseLeave:H,onContextMenu:K,onClick:k,onDoubleClick:$,"data-testid":"rf__node-".concat(i),"data-id":i},T.createElement(tY,{value:i},T.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:l,selected:d,isConnectable:_,sourcePosition:R,targetPosition:I,dragging:z,dragHandle:L,zIndex:B})))};return t.displayName="NodeWrapper",T.memo(t)});function IP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o9(e){var t={input:aa(e.input||_2),default:aa(e.default||zb),output:aa(e.output||S2),group:aa(e.group||A2)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=aa(e[o]||zb),i},r);return PP(PP({},t),n)}function NP(e,t){var r=T.useRef(null),n=T.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Xt(r.current,i)&&console.warn("[React Flow]: It looks like you have created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them. Help: https://reactflow.dev/error#200"),r.current=i}return t(e)},[e]);return n}function TP(e){if(!(!e||typeof document>"u")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");t.appendChild(r),r.appendChild(document.createTextNode(e))}}var M2=function(t){var r=t.children,n=!0;try{Ft()}catch{n=!1}return n?T.createElement(T.Fragment,null,r):T.createElement(EK,{createStore:SK},r)};M2.displayName="ReactFlowWrapper";var a9=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectStop","onConnectEnd","onClickConnectStart","onClickConnectStop","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateEdgesOnSelect"];function AP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}TP(dY),TP(pY);var s9={input:_2,default:zb,output:S2},u9={default:Fb,straight:m2,step:g2,smoothstep:Dx,simplebezier:p2},c9=[15,15],l9=[0,0],D2=T.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,u=e.nodeTypes,l=u===void 0?s9:u,d=e.edgeTypes,f=d===void 0?u9:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,m=e.onMove,y=e.onMoveStart,x=e.onMoveEnd,b=e.onConnect,w=e.onConnectStart,E=e.onConnectStop,_=e.onConnectEnd,S=e.onClickConnectStart,R=e.onClickConnectStop,I=e.onClickConnectEnd,N=e.onNodeMouseEnter,A=e.onNodeMouseMove,L=e.onNodeMouseLeave,B=e.onNodeContextMenu,U=e.onNodeDoubleClick,j=e.onNodeDragStart,D=e.onNodeDrag,G=e.onNodeDragStop,F=e.onNodesDelete,X=e.onEdgesDelete,Z=e.onSelectionChange,Q=e.onSelectionDragStart,W=e.onSelectionDrag,ee=e.onSelectionDragStop,oe=e.onSelectionContextMenu,ae=e.connectionMode,H=ae===void 0?xo.Strict:ae,K=e.connectionLineType,$=K===void 0?$n.Bezier:K,k=e.connectionLineStyle,z=e.connectionLineComponent,re=e.connectionLineContainerStyle,ie=e.deleteKeyCode,se=ie===void 0?"Backspace":ie,ce=e.selectionKeyCode,be=ce===void 0?"Shift":ce,Ce=e.multiSelectionKeyCode,_e=Ce===void 0?"Meta":Ce,he=e.zoomActivationKeyCode,fe=he===void 0?"Meta":he,Ee=e.snapToGrid,Pe=Ee===void 0?!1:Ee,Ze=e.snapGrid,ze=Ze===void 0?c9:Ze,Fe=e.onlyRenderVisibleElements,Ue=Fe===void 0?!1:Fe,ct=e.selectNodesOnDrag,lt=ct===void 0?!0:ct,mt=e.nodesDraggable,yt=e.nodesConnectable,rt=e.elementsSelectable,bt=e.minZoom,Jt=bt===void 0?.5:bt,fr=e.maxZoom,Dt=fr===void 0?2:fr,_t=e.defaultZoom,jt=_t===void 0?1:_t,Vr=e.defaultPosition,Yn=Vr===void 0?l9:Vr,Cn=e.translateExtent,dr=Cn===void 0?Lb:Cn,Ti=e.preventScrolling,cl=Ti===void 0?!0:Ti,ll=e.nodeExtent,Mo=e.defaultMarkerColor,is=Mo===void 0?"#b1b1b7":Mo,os=e.zoomOnScroll,fl=os===void 0?!0:os,as=e.zoomOnPinch,dl=as===void 0?!0:as,Do=e.panOnScroll,hl=Do===void 0?!1:Do,ss=e.panOnScrollSpeed,pl=ss===void 0?.5:ss,Ai=e.panOnScrollMode,vl=Ai===void 0?so.Free:Ai,Mi=e.zoomOnDoubleClick,gl=Mi===void 0?!0:Mi,us=e.panOnDrag,ml=us===void 0?!0:us,yl=e.onPaneClick,bl=e.onPaneScroll,cs=e.onPaneContextMenu,xl=e.children,wl=e.onEdgeUpdate,ls=e.onEdgeContextMenu,_l=e.onEdgeDoubleClick,El=e.onEdgeMouseEnter,Sl=e.onEdgeMouseMove,Ol=e.onEdgeMouseLeave,Cl=e.onEdgeUpdateStart,Rl=e.onEdgeUpdateEnd,Xn=e.edgeUpdaterRadius,Il=Xn===void 0?10:Xn,Di=e.onNodesChange,Pl=e.onEdgesChange,fs=e.noDragClassName,Nl=fs===void 0?"nodrag":fs,jo=e.noWheelClassName,ds=jo===void 0?"nowheel":jo,qo=e.noPanClassName,Tl=qo===void 0?"nopan":qo,hs=e.fitView,Al=hs===void 0?!1:hs,Ml=e.fitViewOptions,ko=e.connectOnClick,ps=ko===void 0?!0:ko,vs=e.attributionPosition,Lo=e.proOptions,Dl=e.defaultEdgeOptions,Bo=e.elevateEdgesOnSelect,ji=Bo===void 0?!1:Bo,Zn=qc(e,a9),jl=NP(l,o9),gs=NP(f,mY);return T.createElement("div",MP(MP({},Zn),{},{ref:t,className:lr(["react-flow",a])}),T.createElement(M2,null,T.createElement(i9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:x,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:N,onNodeMouseMove:A,onNodeMouseLeave:L,onNodeContextMenu:B,onNodeDoubleClick:U,nodeTypes:jl,edgeTypes:gs,connectionLineType:$,connectionLineStyle:k,connectionLineComponent:z,connectionLineContainerStyle:re,selectionKeyCode:be,deleteKeyCode:se,multiSelectionKeyCode:_e,zoomActivationKeyCode:fe,onlyRenderVisibleElements:Ue,selectNodesOnDrag:lt,translateExtent:dr,minZoom:Jt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Yn,preventScrolling:cl,zoomOnScroll:fl,zoomOnPinch:dl,zoomOnDoubleClick:gl,panOnScroll:hl,panOnScrollSpeed:pl,panOnScrollMode:vl,panOnDrag:ml,onPaneClick:yl,onPaneScroll:bl,onPaneContextMenu:cs,onSelectionContextMenu:oe,onEdgeUpdate:wl,onEdgeContextMenu:ls,onEdgeDoubleClick:_l,onEdgeMouseEnter:El,onEdgeMouseMove:Sl,onEdgeMouseLeave:Ol,onEdgeUpdateStart:Cl,onEdgeUpdateEnd:Rl,edgeUpdaterRadius:Il,defaultMarkerColor:is,noDragClassName:Nl,noWheelClassName:ds,noPanClassName:Tl,elevateEdgesOnSelect:ji,id:Zn==null?void 0:Zn.id}),T.createElement(lY,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:b,onConnectStart:w,onConnectStop:E,onConnectEnd:_,onClickConnectStart:S,onClickConnectStop:R,onClickConnectEnd:I,nodesDraggable:mt,nodesConnectable:yt,elementsSelectable:rt,minZoom:Jt,maxZoom:Dt,nodeExtent:ll,onNodesChange:Di,onEdgesChange:Pl,snapToGrid:Pe,snapGrid:ze,connectionMode:H,translateExtent:dr,connectOnClick:ps,defaultEdgeOptions:Dl,fitView:Al,fitViewOptions:Ml,onNodesDelete:F,onEdgesDelete:X,onNodeDragStart:j,onNodeDrag:D,onNodeDragStop:G,onSelectionDrag:W,onSelectionDragStart:Q,onSelectionDragStop:ee}),Z&&T.createElement(uY,{onSelectionChange:Z}),xl,T.createElement(GK,{proOptions:Lo,position:vs})))});D2.displayName="ReactFlow";function j2(e){return function(t){var r=T.useState(t),n=Le(r,2),i=n[0],o=n[1],a=T.useCallback(function(u){return o(function(l){return e(u,l)})},[]);return[i,o,a]}}var f9=j2(r2),d9=j2(gK);function DP(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,u=n/2,l=i.x+a,d=i.y+u,f=o.x+a,h=o.y+u,p=(f-l)/(2*a)-(h-d)/(2*u),v=(f-l)/(2*a)+(h-d)/(2*u),m=1/(Math.abs(p)+Math.abs(v)),y=m*p,x=m*v,b=a*(y+x)+l,w=u*(-y+x)+d;return{x:b,y:w}}function jP(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),i=Math.round(r.y),o=Math.round(t.x),a=Math.round(t.y);return o<=n+1?we.Left:o>=n+r.width-1?we.Right:a<=i+1?we.Top:a>=r.y+r.height-1?we.Bottom:we.Top}function q2(e,t){const r=DP(e,t),n=DP(t,e),i=jP(e,r),o=jP(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const h9=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:i})=>{if(!i)return null;const o={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:u}=q2(i,o),l=Lc({sourceX:a,sourceY:u,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return C.jsxs("g",{children:[C.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:l}),C.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},p9=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=gt(T.useCallback(m=>m.nodeInternals.get(t),[t])),a=gt(T.useCallback(m=>m.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:u,sy:l,tx:d,ty:f,sourcePos:h,targetPos:p}=q2(o,a),v=Lc({sourceX:u,sourceY:l,sourcePosition:h,targetPosition:p,targetX:d,targetY:f});return C.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:i})},qP=172,kP=36,v9={custom:p9},g9=(e,t,r="LR")=>{const n=new wI.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:qP,height:kP})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),wI.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?we.Left:we.Top,o.sourcePosition=i?we.Right:we.Bottom,o.position={x:a.x-qP/2,y:a.y-kP/2},o}),{nodes:e,edges:t}},m9=()=>{},y9=({data:e,dict:t,onSelect:r=m9})=>{const{nodes:n,edges:i}=g9(Object.values(t).filter(h=>h.id===e.selected||e.parents.flat().includes(h.id)||e.children.flat().includes(h.id)).map(h=>({id:h.id,type:h.parents.length===0?"input":h.includes.length===0?"output":"default",sourcePosition:we.Right,targetPosition:we.Left,data:{label:h.privilege},position:{x:0,y:0},className:h.id===e.selected?"highlighted":"",selected:h.id===e.selected})),e.links.map(({source:h,target:p})=>({id:`e${h}-${p}`,source:h,target:p}))),[o,a,u]=f9(n),[l,d,f]=d9(i);return T.useEffect(()=>{a([...n]),d([...i])},[e]),C.jsx(D2,{nodes:o,edges:l,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:v9,connectionLineComponent:h9,children:C.jsx(VK,{variant:bi.Dots,color:"#81818140",gap:18,size:1})})};var k2=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(k2||{});const L2=e=>{switch(e){case"entityCollection":return J.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return J.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return J.ESubPermissionType.DS_METHOD;case"entity":return J.ESubPermissionType.ENTITY_METHOD;default:return J.EPermissionType.METHOD}},LP=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[k2[r]])==null||i.forEach(a=>{if(`${o.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const l={applyTo:`${o.name}.${a.name}`,type:r};r===J.EPermissionType.METHOD&&(l.subType=L2(a.applyTo)),n.push(l)}});return n},b9=(e=[],t)=>{var n;const r=[];for(const i of e)(n=i.methods)==null||n.forEach(o=>{(`${i.name.toLowerCase()}.${o.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${i.name}.${o.name}`,type:J.EPermissionType.SINGLETON_METHOD})});return r};function qx(e,t=[],r=[],n=[]){const i=LP(r,e,J.EPermissionType.ATTRIBUTE),o=LP(r,e,J.EPermissionType.METHOD),a=b9(n,e),u=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:J.ESubPermissionType.DS_METHOD})),l=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{l.push({applyTo:h.name,type:J.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:J.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:J.EPermissionType.DATASTORE}].filter(h=>!e||`ds.${h.applyTo.toLowerCase()}`.includes(e)),...u,...l,...i,...o,...d,...a].reduce((h,p)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[m,y]=p.applyTo.split("."),x=h.find(b=>b.prefix===m);return x?(x.resources=[...x.resources,p].sort((b,w)=>{const E=v.indexOf(b.type),_=v.indexOf(w.type);return E>_?1:-1}),x.type=y?x.type:p.type,[...h].sort((b,w)=>{const E=v.indexOf(b.type),_=v.indexOf(w.type);return E>_?1:-1})):[...h,{prefix:m,type:y?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const x9=(e=[],t=[],r=[])=>{const n=qx("",e,t,r),i={ds:{applyTo:"ds",type:J.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(u,l)=>u.applyTo.localeCompare(l.applyTo);n.forEach(u=>{const[l,d]=u.applyTo.split(".");if(d||(u.type===J.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:l,type:J.EPermissionType.DATACLASS,methods:[],attributes:[]}):u.type===J.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:l,type:J.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const f=(h,p,v)=>{h.forEach(m=>{m.applyTo===l&&m[p].push(v)})};[J.ESubPermissionType.DS_METHOD,J.ESubPermissionType.DATACLASS_METHOD,J.ESubPermissionType.ENTITY_METHOD,J.ESubPermissionType.ENTITY_SEL_METHOD].includes(u.type)?l==="ds"?i.ds.methods.push(u):f(i.ds.dataClasses,"methods",u):u.type===J.EPermissionType.ATTRIBUTE?(f(i.ds.dataClasses,"attributes",u),f(i.ds.singletons,"attributes",u)):u.type===J.EPermissionType.SINGLETON_METHOD&&f(i.ds.singletons,"methods",u)}});const a=u=>{u.forEach(l=>{l.methods&&l.methods.sort(o),l.attributes&&l.attributes.sort(o)})};return i.ds.methods.sort(o),i.ds.dataClasses.sort(o),i.ds.singletons.sort(o),a(i.ds.dataClasses),a(i.ds.singletons),i},B2=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,u,l;if(o.type===J.EPermissionType.METHOD&&t.length){const[d,f]=o.resource.split("."),h=d==="ds"?"dataStore":((l=(u=(a=t.find(p=>p.name===d))==null?void 0:a.methods)==null?void 0:u.find(p=>p.name===f))==null?void 0:l.applyTo)||"dataClass";return{...o,type:o.type,subType:L2(h)}}return o})}}),r},F2=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var d,f,h,p,v,m,y,x;const[a,u]=o.resource.split(".");let l=!0;switch(o.type){case J.EPermissionType.DATASTORE:l=!!t;break;case J.EPermissionType.METHOD:a==="ds"?l=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore"):l=!!((f=(d=t.dataClasses[a])==null?void 0:d.methods)!=null&&f.find(b=>b.name===u));break;case J.ESubPermissionType.DS_METHOD:l=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore");break;case J.EPermissionType.DATACLASS:l=!!t.dataClasses[a];break;case J.EPermissionType.ATTRIBUTE:l=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(b=>b.name===u));break;case J.ESubPermissionType.ENTITY_SEL_METHOD:l=!!((v=t.dataClasses[a])!=null&&v.methods.find(b=>b.name===u&&b.applyTo==="entityCollection"));break;case J.ESubPermissionType.DATACLASS_METHOD:l=!!((m=t.dataClasses[a])!=null&&m.methods.find(b=>b.name===u&&b.applyTo==="dataClass"));break;case J.ESubPermissionType.ENTITY_METHOD:l=!!((y=t.dataClasses[a])!=null&&y.methods.find(b=>b.name===u&&b.applyTo==="entity"));break;case J.EPermissionType.SINGLETON_METHOD:l=!!((x=t.singletons[a])!=null&&x.methods.find(b=>b.name===u));break;case J.EPermissionType.SINGLETON:l=!!t.singletons[a];break;default:l=!0}return{...o,exists:l}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{}),Nm=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=J.useAppDispatch(),a=J.useAppSelector(J.selectPrivileges);function u(){const d=J.addIn(t.id,e.id,a);o(J.updatePrivileges(d))}function l(){const d=J.removeFrom(t.id,e.id,a);o(J.updatePrivileges(d))}return C.jsxs("div",{className:We("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":r==="included","bg-grey-300 text-grey-100":r!=="included","opacity-40":r==="disabled"}),children:[C.jsx("span",{onClick:()=>n(i),className:"text-xs hover:underline",children:e.privilege}),r==="included"?C.jsx("button",{onClick:l,children:C.jsx("span",{className:"text-[13px]",children:C.jsx(ye.FdPlus,{className:"rotate-45 transform text-white"})})}):C.jsx("button",{disabled:r==="disabled",onClick:u,className:"opacity-70 disabled:cursor-not-allowed",children:C.jsx("span",{className:"text-[13px]",children:C.jsx(ye.FdPlus,{className:"text-white"})})})]})},w9=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=J.getPrivilegeById(e.id,t);let u=a?J.populateShallow(a.includes,t):[],l=a?J.populateShallow(J.parents(a.id,t),t):[],d=a?J.populateShallow(J.allowed(a.id,t),t):[];return[u,l,d]=[u,l,d].map(f=>f.filter(h=>(h==null?void 0:h.privilege)!=="guest")),o.length<2&&u.length+l.length+d.length===0?null:C.jsxs("div",{className:"w-full border-b border-grey-900 p-4",children:[C.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",o.length>2?C.jsx("h4",{className:"text-[13px] font-semibold text-white",children:"Include a privilege"}):C.jsx("div",{}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx(Te.ControlledSwitch,{onChange:()=>n(!i),value:i}),C.jsxs("label",{className:"text-xs text-[#F6F6F6]",children:[" ","Show inherited permissions"]})]})]}),C.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[u.map(f=>C.jsx(Nm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>C.jsx(Nm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),l.map(f=>C.jsx(Nm,{child:f,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:f.id},f.id))]})]})};function wr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function $2(e,t=[]){let r=[];function n(o,a){const u=ve.createContext(a),l=r.length;r=[...r,a];const d=h=>{var b;const{scope:p,children:v,...m}=h,y=((b=p==null?void 0:p[e])==null?void 0:b[l])||u,x=ve.useMemo(()=>m,Object.values(m));return C.jsx(y.Provider,{value:x,children:v})};d.displayName=o+"Provider";function f(h,p){var y;const v=((y=p==null?void 0:p[e])==null?void 0:y[l])||u,m=ve.useContext(v);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,f]}const i=()=>{const o=r.map(a=>ve.createContext(a));return function(u){const l=(u==null?void 0:u[e])||o;return ve.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[n,_9(i,...t)]}function _9(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((u,{useScope:l,scopeName:d})=>{const h=l(o)[`__scope${d}`];return{...u,...h}},{});return ve.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var xi=globalThis!=null&&globalThis.document?ve.useLayoutEffect:()=>{},E9=ve[" useInsertionEffect ".trim().toString()]||xi;function S9({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=O9({defaultProp:t,onChange:r}),u=e!==void 0,l=u?e:i;{const f=ve.useRef(e!==void 0);ve.useEffect(()=>{const h=f.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=u},[u,n])}const d=ve.useCallback(f=>{var h;if(u){const p=C9(f)?f(e):f;p!==e&&((h=a.current)==null||h.call(a,p))}else o(f)},[u,e,o,a]);return[l,d]}function O9({defaultProp:e,onChange:t}){const[r,n]=ve.useState(e),i=ve.useRef(r),o=ve.useRef(t);return E9(()=>{o.current=t},[t]),ve.useEffect(()=>{var a;i.current!==r&&((a=o.current)==null||a.call(o,r),i.current=r)},[r,i]),[r,n,o]}function C9(e){return typeof e=="function"}function BP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function z2(...e){return t=>{let r=!1;const n=e.map(i=>{const o=BP(i,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let i=0;i<n.length;i++){const o=n[i];typeof o=="function"?o():BP(e[i],null)}}}}function Ro(...e){return ve.useCallback(z2(...e),e)}const R9=["top","right","bottom","left"],zn=Math.min,ar=Math.max,Xu=Math.round,hu=Math.floor,rn=e=>({x:e,y:e}),I9={left:"right",right:"left",bottom:"top",top:"bottom"};function Ub(e,t,r){return ar(e,zn(t,r))}function wn(e,t){return typeof e=="function"?e(t):e}function _n(e){return e.split("-")[0]}function Io(e){return e.split("-")[1]}function kx(e){return e==="x"?"y":"x"}function Lx(e){return e==="y"?"height":"width"}function Qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Bx(e){return kx(Qr(e))}function P9(e,t,r){r===void 0&&(r=!1);const n=Io(e),i=Bx(e),o=Lx(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Zu(a)),[a,Zu(a)]}function N9(e){const t=Zu(e);return[Vb(e),t,Vb(t)]}function Vb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const FP=["left","right"],$P=["right","left"],T9=["top","bottom"],A9=["bottom","top"];function M9(e,t,r){switch(e){case"top":case"bottom":return r?t?$P:FP:t?FP:$P;case"left":case"right":return t?T9:A9;default:return[]}}function D9(e,t,r,n){const i=Io(e);let o=M9(_n(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Vb)))),o}function Zu(e){const t=_n(e);return I9[t]+e.slice(t.length)}function j9(e){return{top:0,right:0,bottom:0,left:0,...e}}function H2(e){return typeof e!="number"?j9(e):{top:e,right:e,bottom:e,left:e}}function Ju(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function zP(e,t,r){let{reference:n,floating:i}=e;const o=Qr(t),a=Bx(t),u=Lx(a),l=_n(t),d=o==="y",f=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,p=n[u]/2-i[u]/2;let v;switch(l){case"top":v={x:f,y:n.y-i.height};break;case"bottom":v={x:f,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:h};break;case"left":v={x:n.x-i.width,y:h};break;default:v={x:n.x,y:n.y}}switch(Io(t)){case"start":v[a]-=p*(r&&d?-1:1);break;case"end":v[a]+=p*(r&&d?-1:1);break}return v}async function q9(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:u,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:v=0}=wn(t,e),m=H2(v),x=u[p?h==="floating"?"reference":"floating":h],b=Ju(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(x)))==null||r?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:f,strategy:l})),w=h==="floating"?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),_=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},S=Ju(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:w,offsetParent:E,strategy:l}):w);return{top:(b.top-S.top+m.top)/_.y,bottom:(S.bottom-b.bottom+m.bottom)/_.y,left:(b.left-S.left+m.left)/_.x,right:(S.right-b.right+m.right)/_.x}}const k9=50,L9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=a.detectOverflow?a:{...a,detectOverflow:q9},l=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:h}=zP(d,n,l),p=n,v=0;const m={};for(let y=0;y<o.length;y++){const x=o[y];if(!x)continue;const{name:b,fn:w}=x,{x:E,y:_,data:S,reset:R}=await w({x:f,y:h,initialPlacement:n,placement:p,strategy:i,middlewareData:m,rects:d,platform:u,elements:{reference:e,floating:t}});f=E??f,h=_??h,m[b]={...m[b],...S},R&&v<k9&&(v++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(d=R.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):R.rects),{x:f,y:h}=zP(d,p,l)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:m}},B9=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:a,elements:u,middlewareData:l}=t,{element:d,padding:f=0}=wn(e,t)||{};if(d==null)return{};const h=H2(f),p={x:r,y:n},v=Bx(i),m=Lx(v),y=await a.getDimensions(d),x=v==="y",b=x?"top":"left",w=x?"bottom":"right",E=x?"clientHeight":"clientWidth",_=o.reference[m]+o.reference[v]-p[v]-o.floating[m],S=p[v]-o.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let I=R?R[E]:0;(!I||!await(a.isElement==null?void 0:a.isElement(R)))&&(I=u.floating[E]||o.floating[m]);const N=_/2-S/2,A=I/2-y[m]/2-1,L=zn(h[b],A),B=zn(h[w],A),U=L,j=I-y[m]-B,D=I/2-y[m]/2+N,G=Ub(U,D,j),F=!l.arrow&&Io(i)!=null&&D!==G&&o.reference[m]/2-(D<U?L:B)-y[m]/2<0,X=F?D<U?D-U:D-j:0;return{[v]:p[v]+X,data:{[v]:G,centerOffset:D-G-X,...F&&{alignmentOffset:X}},reset:F}}}),F9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...x}=wn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const b=_n(i),w=Qr(u),E=_n(u)===u,_=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=p||(E||!y?[Zu(u)]:N9(u)),R=m!=="none";!p&&R&&S.push(...D9(u,y,m,_));const I=[u,...S],N=await l.detectOverflow(t,x),A=[];let L=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&A.push(N[b]),h){const D=P9(i,a,_);A.push(N[D[0]],N[D[1]])}if(L=[...L,{placement:i,overflows:A}],!A.every(D=>D<=0)){var B,U;const D=(((B=o.flip)==null?void 0:B.index)||0)+1,G=I[D];if(G&&(!(h==="alignment"?w!==Qr(G):!1)||L.every(Z=>Qr(Z.placement)===w?Z.overflows[0]>0:!0)))return{data:{index:D,overflows:L},reset:{placement:G}};let F=(U=L.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:U.placement;if(!F)switch(v){case"bestFit":{var j;const X=(j=L.filter(Z=>{if(R){const Q=Qr(Z.placement);return Q===w||Q==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(Q=>Q>0).reduce((Q,W)=>Q+W,0)]).sort((Z,Q)=>Z[1]-Q[1])[0])==null?void 0:j[0];X&&(F=X);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function HP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function UP(e){return R9.some(t=>e[t]>=0)}const $9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...o}=wn(e,t);switch(i){case"referenceHidden":{const a=await n.detectOverflow(t,{...o,elementContext:"reference"}),u=HP(a,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:UP(u)}}}case"escaped":{const a=await n.detectOverflow(t,{...o,altBoundary:!0}),u=HP(a,r.floating);return{data:{escapedOffsets:u,escaped:UP(u)}}}default:return{}}}}},U2=new Set(["left","top"]);async function z9(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=_n(r),u=Io(r),l=Qr(r)==="y",d=U2.has(a)?-1:1,f=o&&l?-1:1,h=wn(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof m=="number"&&(v=u==="end"?m*-1:m),l?{x:v*f,y:p*d}:{x:p*d,y:v*f}}const H9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:a,middlewareData:u}=t,l=await z9(t,e);return a===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},U9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:l={fn:b=>{let{x:w,y:E}=b;return{x:w,y:E}}},...d}=wn(e,t),f={x:r,y:n},h=await o.detectOverflow(t,d),p=Qr(_n(i)),v=kx(p);let m=f[v],y=f[p];if(a){const b=v==="y"?"top":"left",w=v==="y"?"bottom":"right",E=m+h[b],_=m-h[w];m=Ub(E,m,_)}if(u){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=y+h[b],_=y-h[w];y=Ub(E,y,_)}const x=l.fn({...t,[v]:m,[p]:y});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[v]:a,[p]:u}}}}}},V9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:l=!0,crossAxis:d=!0}=wn(e,t),f={x:r,y:n},h=Qr(i),p=kx(h);let v=f[p],m=f[h];const y=wn(u,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const E=p==="y"?"height":"width",_=o.reference[p]-o.floating[E]+x.mainAxis,S=o.reference[p]+o.reference[E]-x.mainAxis;v<_?v=_:v>S&&(v=S)}if(d){var b,w;const E=p==="y"?"width":"height",_=U2.has(_n(i)),S=o.reference[h]-o.floating[E]+(_&&((b=a.offset)==null?void 0:b[h])||0)+(_?0:x.crossAxis),R=o.reference[h]+o.reference[E]+(_?0:((w=a.offset)==null?void 0:w[h])||0)-(_?x.crossAxis:0);m<S?m=S:m>R&&(m=R)}return{[p]:v,[h]:m}}}},W9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:l=()=>{},...d}=wn(e,t),f=await a.detectOverflow(t,d),h=_n(i),p=Io(i),v=Qr(i)==="y",{width:m,height:y}=o.floating;let x,b;h==="top"||h==="bottom"?(x=h,b=p===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(b=h,x=p==="end"?"top":"bottom");const w=y-f.top-f.bottom,E=m-f.left-f.right,_=zn(y-f[x],w),S=zn(m-f[b],E),R=!t.middlewareData.shift;let I=_,N=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=w),R&&!p){const L=ar(f.left,0),B=ar(f.right,0),U=ar(f.top,0),j=ar(f.bottom,0);v?N=m-2*(L!==0||B!==0?L+B:ar(f.left,f.right)):I=y-2*(U!==0||j!==0?U+j:ar(f.top,f.bottom))}await l({...t,availableWidth:N,availableHeight:I});const A=await a.getDimensions(u.floating);return m!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Bc(){return typeof window<"u"}function Po(e){return V2(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sn(e){var t;return(t=(V2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function V2(e){return Bc()?e instanceof Node||e instanceof sr(e).Node:!1}function $r(e){return Bc()?e instanceof Element||e instanceof sr(e).Element:!1}function On(e){return Bc()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function VP(e){return!Bc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function Ja(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function G9(e){return/^(table|td|th)$/.test(Po(e))}function Fc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const K9=/transform|translate|scale|rotate|perspective|filter/,Y9=/paint|layout|strict|content/,si=e=>!!e&&e!=="none";let Tm;function Fx(e){const t=$r(e)?zr(e):e;return si(t.transform)||si(t.translate)||si(t.scale)||si(t.rotate)||si(t.perspective)||!$x()&&(si(t.backdropFilter)||si(t.filter))||K9.test(t.willChange||"")||Y9.test(t.contain||"")}function X9(e){let t=Hn(e);for(;On(t)&&!wo(t);){if(Fx(t))return t;if(Fc(t))return null;t=Hn(t)}return null}function $x(){return Tm==null&&(Tm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Tm}function wo(e){return/^(html|body|#document)$/.test(Po(e))}function zr(e){return sr(e).getComputedStyle(e)}function $c(e){return $r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(Po(e)==="html")return e;const t=e.assignedSlot||e.parentNode||VP(e)&&e.host||sn(e);return VP(t)?t.host:t}function W2(e){const t=Hn(e);return wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&Ja(t)?t:W2(t)}function $a(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=W2(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=sr(i);if(o){const u=Wb(a);return t.concat(a,a.visualViewport||[],Ja(i)?i:[],u&&r?$a(u):[])}else return t.concat(i,$a(i,[],r))}function Wb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function G2(e){const t=zr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=On(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=Xu(r)!==o||Xu(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function zx(e){return $r(e)?e:e.contextElement}function co(e){const t=zx(e);if(!On(t))return rn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=G2(t);let a=(o?Xu(r.width):r.width)/n,u=(o?Xu(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const Z9=rn(0);function K2(e){const t=sr(e);return!$x()||!t.visualViewport?Z9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function J9(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==sr(e)?!1:t}function wi(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=zx(e);let a=rn(1);t&&(n?$r(n)&&(a=co(n)):a=co(e));const u=J9(o,r,n)?K2(o):rn(0);let l=(i.left+u.x)/a.x,d=(i.top+u.y)/a.y,f=i.width/a.x,h=i.height/a.y;if(o){const p=sr(o),v=n&&$r(n)?sr(n):n;let m=p,y=Wb(m);for(;y&&n&&v!==m;){const x=co(y),b=y.getBoundingClientRect(),w=zr(y),E=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*x.x,_=b.top+(y.clientTop+parseFloat(w.paddingTop))*x.y;l*=x.x,d*=x.y,f*=x.x,h*=x.y,l+=E,d+=_,m=sr(y),y=Wb(m)}}return Ju({width:f,height:h,x:l,y:d})}function zc(e,t){const r=$c(e).scrollLeft;return t?t.left+r:wi(sn(e)).left+r}function Y2(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zc(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function Q9(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=sn(n),u=t?Fc(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},d=rn(1);const f=rn(0),h=On(n);if((h||!h&&!o)&&((Po(n)!=="body"||Ja(a))&&(l=$c(n)),h)){const v=wi(n);d=co(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?Y2(a,l):rn(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+f.x+p.x,y:r.y*d.y-l.scrollTop*d.y+f.y+p.y}}function e7(e){return Array.from(e.getClientRects())}function t7(e){const t=sn(e),r=$c(e),n=e.ownerDocument.body,i=ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+zc(e);const u=-r.scrollTop;return zr(n).direction==="rtl"&&(a+=ar(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}const WP=25;function r7(e,t){const r=sr(e),n=sn(e),i=r.visualViewport;let o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;const f=$x();(!f||f&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}const d=zc(n);if(d<=0){const f=n.ownerDocument,h=f.body,p=getComputedStyle(h),v=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,m=Math.abs(n.clientWidth-h.clientWidth-v);m<=WP&&(o-=m)}else d<=WP&&(o+=d);return{width:o,height:a,x:u,y:l}}function n7(e,t){const r=wi(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=On(e)?co(e):rn(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,l=i*o.x,d=n*o.y;return{width:a,height:u,x:l,y:d}}function GP(e,t,r){let n;if(t==="viewport")n=r7(e,r);else if(t==="document")n=t7(sn(e));else if($r(t))n=n7(t,r);else{const i=K2(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ju(n)}function X2(e,t){const r=Hn(e);return r===t||!$r(r)||wo(r)?!1:zr(r).position==="fixed"||X2(r,t)}function i7(e,t){const r=t.get(e);if(r)return r;let n=$a(e,[],!1).filter(u=>$r(u)&&Po(u)!=="body"),i=null;const o=zr(e).position==="fixed";let a=o?Hn(e):e;for(;$r(a)&&!wo(a);){const u=zr(a),l=Fx(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ja(a)&&!l&&X2(e,a))?n=n.filter(f=>f!==a):i=u,a=Hn(a)}return t.set(e,n),n}function o7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Fc(t)?[]:i7(t,this._c):[].concat(r),n],u=GP(t,a[0],i);let l=u.top,d=u.right,f=u.bottom,h=u.left;for(let p=1;p<a.length;p++){const v=GP(t,a[p],i);l=ar(v.top,l),d=zn(v.right,d),f=zn(v.bottom,f),h=ar(v.left,h)}return{width:d-h,height:f-l,x:h,y:l}}function a7(e){const{width:t,height:r}=G2(e);return{width:t,height:r}}function s7(e,t,r){const n=On(t),i=sn(t),o=r==="fixed",a=wi(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const l=rn(0);function d(){l.x=zc(i)}if(n||!n&&!o)if((Po(t)!=="body"||Ja(i))&&(u=$c(t)),n){const v=wi(t,!0,o,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else i&&d();o&&!n&&i&&d();const f=i&&!n&&!o?Y2(i,u):rn(0),h=a.left+u.scrollLeft-l.x-f.x,p=a.top+u.scrollTop-l.y-f.y;return{x:h,y:p,width:a.width,height:a.height}}function Am(e){return zr(e).position==="static"}function KP(e,t){if(!On(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return sn(e)===r&&(r=r.ownerDocument.body),r}function Z2(e,t){const r=sr(e);if(Fc(e))return r;if(!On(e)){let i=Hn(e);for(;i&&!wo(i);){if($r(i)&&!Am(i))return i;i=Hn(i)}return r}let n=KP(e,t);for(;n&&G9(n)&&Am(n);)n=KP(n,t);return n&&wo(n)&&Am(n)&&!Fx(n)?r:n||X9(e)||r}const u7=async function(e){const t=this.getOffsetParent||Z2,r=this.getDimensions,n=await r(e.floating);return{reference:s7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function c7(e){return zr(e).direction==="rtl"}const l7={convertOffsetParentRelativeRectToViewportRelativeRect:Q9,getDocumentElement:sn,getClippingRect:o7,getOffsetParent:Z2,getElementRects:u7,getClientRects:e7,getDimensions:a7,getScale:co,isElement:$r,isRTL:c7};function J2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function f7(e,t){let r=null,n;const i=sn(e);function o(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,l){u===void 0&&(u=!1),l===void 0&&(l=1),o();const d=e.getBoundingClientRect(),{left:f,top:h,width:p,height:v}=d;if(u||t(),!p||!v)return;const m=hu(h),y=hu(i.clientWidth-(f+p)),x=hu(i.clientHeight-(h+v)),b=hu(f),E={rootMargin:-m+"px "+-y+"px "+-x+"px "+-b+"px",threshold:ar(0,zn(1,l))||1};let _=!0;function S(R){const I=R[0].intersectionRatio;if(I!==l){if(!_)return a();I?a(!1,I):n=setTimeout(()=>{a(!1,1e-7)},1e3)}I===1&&!J2(d,e.getBoundingClientRect())&&a(),_=!1}try{r=new IntersectionObserver(S,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,E)}r.observe(e)}return a(!0),o}function d7(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,d=zx(e),f=i||o?[...d?$a(d):[],...t?$a(t):[]]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const h=d&&u?f7(d,r):null;let p=-1,v=null;a&&(v=new ResizeObserver(b=>{let[w]=b;w&&w.target===d&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=v)==null||E.observe(t)})),r()}),d&&!l&&v.observe(d),t&&v.observe(t));let m,y=l?wi(e):null;l&&x();function x(){const b=wi(e);y&&!J2(y,b)&&r(),y=b,m=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(w=>{i&&w.removeEventListener("scroll",r),o&&w.removeEventListener("resize",r)}),h==null||h(),(b=v)==null||b.disconnect(),v=null,l&&cancelAnimationFrame(m)}}const h7=H9,p7=U9,v7=F9,g7=W9,m7=$9,YP=B9,y7=V9,b7=(e,t,r)=>{const n=new Map,i={platform:l7,...r},o={...i.platform,_c:n};return L9(e,t,{...i,platform:o})};var x7=typeof document<"u",w7=function(){},Tu=x7?T.useLayoutEffect:w7;function Qu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Qu(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!Qu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Q2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function XP(e,t){const r=Q2(e);return Math.round(t*r)/r}function Mm(e){const t=ve.useRef(e);return Tu(()=>{t.current=e}),t}function _7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:l,open:d}=e,[f,h]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=ve.useState(n);Qu(p,n)||v(n);const[m,y]=ve.useState(null),[x,b]=ve.useState(null),w=ve.useCallback(Z=>{Z!==R.current&&(R.current=Z,y(Z))},[]),E=ve.useCallback(Z=>{Z!==I.current&&(I.current=Z,b(Z))},[]),_=o||m,S=a||x,R=ve.useRef(null),I=ve.useRef(null),N=ve.useRef(f),A=l!=null,L=Mm(l),B=Mm(i),U=Mm(d),j=ve.useCallback(()=>{if(!R.current||!I.current)return;const Z={placement:t,strategy:r,middleware:p};B.current&&(Z.platform=B.current),b7(R.current,I.current,Z).then(Q=>{const W={...Q,isPositioned:U.current!==!1};D.current&&!Qu(N.current,W)&&(N.current=W,Jb.flushSync(()=>{h(W)}))})},[p,t,r,B,U]);Tu(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[d]);const D=ve.useRef(!1);Tu(()=>(D.current=!0,()=>{D.current=!1}),[]),Tu(()=>{if(_&&(R.current=_),S&&(I.current=S),_&&S){if(L.current)return L.current(_,S,j);j()}},[_,S,j,L,A]);const G=ve.useMemo(()=>({reference:R,floating:I,setReference:w,setFloating:E}),[w,E]),F=ve.useMemo(()=>({reference:_,floating:S}),[_,S]),X=ve.useMemo(()=>{const Z={position:r,left:0,top:0};if(!F.floating)return Z;const Q=XP(F.floating,f.x),W=XP(F.floating,f.y);return u?{...Z,transform:"translate("+Q+"px, "+W+"px)",...Q2(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:W}},[r,u,F.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:j,refs:G,elements:F,floatingStyles:X}),[f,j,G,F,X])}const E7=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?YP({element:n.current,padding:i}).fn(r):{}:n?YP({element:n,padding:i}).fn(r):{}}}},S7=(e,t)=>{const r=h7(e);return{name:r.name,fn:r.fn,options:[e,t]}},O7=(e,t)=>{const r=p7(e);return{name:r.name,fn:r.fn,options:[e,t]}},C7=(e,t)=>({fn:y7(e).fn,options:[e,t]}),R7=(e,t)=>{const r=v7(e);return{name:r.name,fn:r.fn,options:[e,t]}},I7=(e,t)=>{const r=g7(e);return{name:r.name,fn:r.fn,options:[e,t]}},P7=(e,t)=>{const r=m7(e);return{name:r.name,fn:r.fn,options:[e,t]}},N7=(e,t)=>{const r=E7(e);return{name:r.name,fn:r.fn,options:[e,t]}};function T7(e){const t=A7(e),r=ve.forwardRef((n,i)=>{const{children:o,...a}=n,u=ve.Children.toArray(o),l=u.find(D7);if(l){const d=l.props.children,f=u.map(h=>h===l?ve.Children.count(d)>1?ve.Children.only(null):ve.isValidElement(d)?d.props.children:null:h);return C.jsx(t,{...a,ref:i,children:ve.isValidElement(d)?ve.cloneElement(d,void 0,f):null})}return C.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}function A7(e){const t=ve.forwardRef((r,n)=>{const{children:i,...o}=r;if(ve.isValidElement(i)){const a=q7(i),u=j7(o,i.props);return i.type!==ve.Fragment&&(u.ref=n?z2(n,a):a),ve.cloneElement(i,u)}return ve.Children.count(i)>1?ve.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var M7=Symbol("radix.slottable");function D7(e){return ve.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===M7}function j7(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...u)=>{const l=o(...u);return i(...u),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}function q7(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var k7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ri=k7.reduce((e,t)=>{const r=T7(`Primitive.${t}`),n=ve.forwardRef((i,o)=>{const{asChild:a,...u}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(l,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function L7(e,t){e&&Jb.flushSync(()=>e.dispatchEvent(t))}var B7="Arrow",eq=ve.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return C.jsx(Ri.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:C.jsx("polygon",{points:"0,0 30,0 15,10"})})});eq.displayName=B7;var F7=eq;function Hc(e){const t=ve.useRef(e);return ve.useEffect(()=>{t.current=e}),ve.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function $7(e){const[t,r]=ve.useState(void 0);return xi(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,u;if("borderBoxSize"in o){const l=o.borderBoxSize,d=Array.isArray(l)?l[0]:l;a=d.inlineSize,u=d.blockSize}else a=e.offsetWidth,u=e.offsetHeight;r({width:a,height:u})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Hx="Popper",[tq,rq]=$2(Hx),[z7,nq]=tq(Hx),iq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=ve.useState(null);return C.jsx(z7,{scope:t,anchor:n,onAnchorChange:i,children:r})};iq.displayName=Hx;var oq="PopperAnchor",aq=ve.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=nq(oq,r),a=ve.useRef(null),u=Ro(t,a),l=ve.useRef(null);return ve.useEffect(()=>{const d=l.current;l.current=(n==null?void 0:n.current)||a.current,d!==l.current&&o.onAnchorChange(l.current)}),n?null:C.jsx(Ri.div,{...i,ref:u})});aq.displayName=oq;var Ux="PopperContent",[H7,U7]=tq(Ux),sq=ve.forwardRef((e,t)=>{var k,z,re,ie,se,ce;const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:u=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:v="optimized",onPlaced:m,...y}=e,x=nq(Ux,r),[b,w]=ve.useState(null),E=Ro(t,be=>w(be)),[_,S]=ve.useState(null),R=$7(_),I=(R==null?void 0:R.width)??0,N=(R==null?void 0:R.height)??0,A=n+(o!=="center"?"-"+o:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(d)?d:[d],U=B.length>0,j={padding:L,boundary:B.filter(W7),altBoundary:U},{refs:D,floatingStyles:G,placement:F,isPositioned:X,middlewareData:Z}=_7({strategy:"fixed",placement:A,whileElementsMounted:(...be)=>d7(...be,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[S7({mainAxis:i+N,alignmentAxis:a}),l&&O7({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?C7():void 0,...j}),l&&R7({...j}),I7({...j,apply:({elements:be,rects:Ce,availableWidth:_e,availableHeight:he})=>{const{width:fe,height:Ee}=Ce.reference,Pe=be.floating.style;Pe.setProperty("--radix-popper-available-width",`${_e}px`),Pe.setProperty("--radix-popper-available-height",`${he}px`),Pe.setProperty("--radix-popper-anchor-width",`${fe}px`),Pe.setProperty("--radix-popper-anchor-height",`${Ee}px`)}}),_&&N7({element:_,padding:u}),G7({arrowWidth:I,arrowHeight:N}),p&&P7({strategy:"referenceHidden",...j})]}),[Q,W]=lq(F),ee=Hc(m);xi(()=>{X&&(ee==null||ee())},[X,ee]);const oe=(k=Z.arrow)==null?void 0:k.x,ae=(z=Z.arrow)==null?void 0:z.y,H=((re=Z.arrow)==null?void 0:re.centerOffset)!==0,[K,$]=ve.useState();return xi(()=>{b&&$(window.getComputedStyle(b).zIndex)},[b]),C.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:X?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(ie=Z.transformOrigin)==null?void 0:ie.x,(se=Z.transformOrigin)==null?void 0:se.y].join(" "),...((ce=Z.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(H7,{scope:r,placedSide:Q,onArrowChange:S,arrowX:oe,arrowY:ae,shouldHideArrow:H,children:C.jsx(Ri.div,{"data-side":Q,"data-align":W,...y,ref:E,style:{...y.style,animation:X?void 0:"none"}})})})});sq.displayName=Ux;var uq="PopperArrow",V7={top:"bottom",right:"left",bottom:"top",left:"right"},cq=ve.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=U7(uq,n),a=V7[o.placedSide];return C.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:C.jsx(F7,{...i,ref:r,style:{...i.style,display:"block"}})})});cq.displayName=uq;function W7(e){return e!==null}var G7=e=>({name:"transformOrigin",options:e,fn(t){var x,b,w;const{placement:r,rects:n,middlewareData:i}=t,a=((x=i.arrow)==null?void 0:x.centerOffset)!==0,u=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[d,f]=lq(r),h={start:"0%",center:"50%",end:"100%"}[f],p=(((b=i.arrow)==null?void 0:b.x)??0)+u/2,v=(((w=i.arrow)==null?void 0:w.y)??0)+l/2;let m="",y="";return d==="bottom"?(m=a?h:`${p}px`,y=`${-l}px`):d==="top"?(m=a?h:`${p}px`,y=`${n.floating.height+l}px`):d==="right"?(m=`${-l}px`,y=a?h:`${v}px`):d==="left"&&(m=`${n.floating.width+l}px`,y=a?h:`${v}px`),{data:{x:m,y}}}});function lq(e){const[t,r="center"]=e.split("-");return[t,r]}var K7=iq,Y7=aq,X7=sq,Z7=cq,J7="Portal",fq=ve.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=ve.useState(!1);xi(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?fD.createPortal(C.jsx(Ri.div,{...n,ref:t}),a):null});fq.displayName=J7;function Q7(e,t){return ve.useReducer((r,n)=>t[r][n]??r,e)}var Vx=e=>{const{present:t,children:r}=e,n=eX(t),i=typeof r=="function"?r({present:n.isPresent}):ve.Children.only(r),o=Ro(n.ref,tX(i));return typeof r=="function"||n.isPresent?ve.cloneElement(i,{ref:o}):null};Vx.displayName="Presence";function eX(e){const[t,r]=ve.useState(),n=ve.useRef(null),i=ve.useRef(e),o=ve.useRef("none"),a=e?"mounted":"unmounted",[u,l]=Q7(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ve.useEffect(()=>{const d=pu(n.current);o.current=u==="mounted"?d:"none"},[u]),xi(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=pu(d);e?l("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(f&&p!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),xi(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=pu(n.current).includes(CSS.escape(v.animationName));if(v.target===t&&y&&(l("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=v=>{v.target===t&&(o.current=pu(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:ve.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function pu(e){return(e==null?void 0:e.animationName)||"none"}function tX(e){var n,i;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function rX(e,t=globalThis==null?void 0:globalThis.document){const r=Hc(e);ve.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var nX="DismissableLayer",Gb="dismissableLayer.update",iX="dismissableLayer.pointerDownOutside",oX="dismissableLayer.focusOutside",ZP,dq=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hq=ve.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...l}=e,d=ve.useContext(dq),[f,h]=ve.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ve.useState({}),m=Ro(t,I=>h(I)),y=Array.from(d.layers),[x]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(x),w=f?y.indexOf(f):-1,E=d.layersWithOutsidePointerEventsDisabled.size>0,_=w>=b,S=uX(I=>{const N=I.target,A=[...d.branches].some(L=>L.contains(N));!_||A||(i==null||i(I),a==null||a(I),I.defaultPrevented||u==null||u())},p),R=cX(I=>{const N=I.target;[...d.branches].some(L=>L.contains(N))||(o==null||o(I),a==null||a(I),I.defaultPrevented||u==null||u())},p);return rX(I=>{w===d.layers.size-1&&(n==null||n(I),!I.defaultPrevented&&u&&(I.preventDefault(),u()))},p),ve.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ZP=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),JP(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ZP)}},[f,p,r,d]),ve.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),JP())},[f,d]),ve.useEffect(()=>{const I=()=>v({});return document.addEventListener(Gb,I),()=>document.removeEventListener(Gb,I)},[]),C.jsx(Ri.div,{...l,ref:m,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:wr(e.onFocusCapture,R.onFocusCapture),onBlurCapture:wr(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:wr(e.onPointerDownCapture,S.onPointerDownCapture)})});hq.displayName=nX;var aX="DismissableLayerBranch",sX=ve.forwardRef((e,t)=>{const r=ve.useContext(dq),n=ve.useRef(null),i=Ro(t,n);return ve.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),C.jsx(Ri.div,{...e,ref:i})});sX.displayName=aX;function uX(e,t=globalThis==null?void 0:globalThis.document){const r=Hc(e),n=ve.useRef(!1),i=ve.useRef(()=>{});return ve.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let l=function(){pq(iX,r,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function cX(e,t=globalThis==null?void 0:globalThis.document){const r=Hc(e),n=ve.useRef(!1);return ve.useEffect(()=>{const i=o=>{o.target&&!n.current&&pq(oX,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function JP(){const e=new CustomEvent(Gb);document.dispatchEvent(e)}function pq(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?L7(i,o):i.dispatchEvent(o)}var Dm,Uc="HoverCard",[vq]=$2(Uc,[rq]),Vc=rq(),[lX,Wc]=vq(Uc),gq=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,l=Vc(t),d=ve.useRef(0),f=ve.useRef(0),h=ve.useRef(!1),p=ve.useRef(!1),[v,m]=S9({prop:n,defaultProp:i??!1,onChange:o,caller:Uc}),y=ve.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>m(!0),a)},[a,m]),x=ve.useCallback(()=>{clearTimeout(d.current),!h.current&&!p.current&&(f.current=window.setTimeout(()=>m(!1),u))},[u,m]),b=ve.useCallback(()=>m(!1),[m]);return ve.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),C.jsx(lX,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:x,onDismiss:b,hasSelectionRef:h,isPointerDownOnContentRef:p,children:C.jsx(K7,{...l,children:r})})};gq.displayName=Uc;var mq="HoverCardTrigger",yq=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Wc(mq,r),o=Vc(r);return C.jsx(Y7,{asChild:!0,...o,children:C.jsx(Ri.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:wr(e.onPointerEnter,tc(i.onOpen)),onPointerLeave:wr(e.onPointerLeave,tc(i.onClose)),onFocus:wr(e.onFocus,i.onOpen),onBlur:wr(e.onBlur,i.onClose),onTouchStart:wr(e.onTouchStart,a=>a.preventDefault())})})});yq.displayName=mq;var Wx="HoverCardPortal",[fX,dX]=vq(Wx,{forceMount:void 0}),bq=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=Wc(Wx,t);return C.jsx(fX,{scope:t,forceMount:r,children:C.jsx(Vx,{present:r||o.open,children:C.jsx(fq,{asChild:!0,container:i,children:n})})})};bq.displayName=Wx;var ec="HoverCardContent",xq=ve.forwardRef((e,t)=>{const r=dX(ec,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=Wc(ec,e.__scopeHoverCard);return C.jsx(Vx,{present:n||o.open,children:C.jsx(hX,{"data-state":o.open?"open":"closed",...i,onPointerEnter:wr(e.onPointerEnter,tc(o.onOpen)),onPointerLeave:wr(e.onPointerLeave,tc(o.onClose)),ref:t})})});xq.displayName=ec;var hX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,l=Wc(ec,r),d=Vc(r),f=ve.useRef(null),h=Ro(t,f),[p,v]=ve.useState(!1);return ve.useEffect(()=>{if(p){const m=document.body;return Dm=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Dm,m.style.webkitUserSelect=Dm}}},[p]),ve.useEffect(()=>{if(f.current){const m=()=>{v(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var x;((x=document.getSelection())==null?void 0:x.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),ve.useEffect(()=>{f.current&&gX(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),C.jsx(hq,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:wr(o,m=>{m.preventDefault()}),onDismiss:l.onDismiss,children:C.jsx(X7,{...d,...u,onPointerDown:wr(u.onPointerDown,m=>{m.currentTarget.contains(m.target)&&v(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:h,style:{...u.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),pX="HoverCardArrow",vX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Vc(r);return C.jsx(Z7,{...i,...n,ref:t})});vX.displayName=pX;function tc(e){return t=>t.pointerType==="touch"?void 0:e()}function gX(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var Gx=gq,Kx=yq,Lr=bq,Br=xq;const mX=({item:e,depth:t})=>{const[r,n]=T.useState(!1),i=J.useAppSelector(J.selectPrivileges),o=J.populateShallow(e.includes,i);return C.jsxs("div",{className:"py-1 text-xs text-white",children:[C.jsxs("div",{className:"flex items-center",children:[C.jsx("button",{className:"-ml-1",onClick:a=>{a.stopPropagation(),n(!r)},children:C.jsx(ye.FdRight,{className:We("h-4 w-4",{"tranform rotate-90":r})})})," ",C.jsx("div",{children:e.privilege})]}),C.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:r&&C.jsx(wq,{depth:t+1,data:o})})]})},wq=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(mX,{item:r,depth:t},r.id):C.jsx("div",{className:We("py-1 text-xs text-white",{}),children:r.privilege},r.id)),Bt=()=>document.querySelector(`.${dD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Gc=({container:e,...t})=>C.jsx(Te.Portal,{...t,container:e||Bt()}),QP=Gx,eN=Kx,tN=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=J.useAppDispatch(),o=J.useAppSelector(J.selectPrivileges),a=J.populateShallow(e.includes,o),[u,l]=T.useState(!1),[d,f]=T.useState(e.privilege),[h,p]=T.useState(null),v=Te.useOutsideClick(()=>{u&&x()});Te.useDidMountEffect(()=>{e.privilege!==d&&f(e.privilege)},[e.privilege]);function m(){l(!0),p(null)}function y(){l(!1),f(e.privilege)}function x(){p(null);try{Te.validateName(d);const E=J.rename(d,e.id,o);i(J.updatePrivileges(E)),l(!1)}catch(E){p(E.message)}}const b=async E=>{E.stopPropagation();const{confirmed:_}=await i(J.openModal({title:"Delete Privilege",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"})).unwrap();if(_){const S=J.remove(e.id,o);if((t==null?void 0:t.id)!==e.id){i(J.updatePrivileges(S));return}const R=Object.keys(S).filter(I=>S[I].privilege!=="guest");if(R.length===0)r(null);else{const I=Object.keys(o).filter(B=>o[B].privilege!=="guest"),N=I.indexOf(e.id),A=Math.max(0,N-1),L=I[A];N===0?r(S[R[0]]):S[L]?r(S[L]):r(S[R[0]])}i(J.updatePrivileges(S))}},w=T.useMemo(()=>e.resources.some(E=>E.exists===!1),[e]);return C.jsxs(QP,{openDelay:0,closeDelay:0,children:[C.jsx(eN,{asChild:!0,children:C.jsxs("div",{className:We("rounded border bg-grey-300 p-2",{"border-grey-100":(t==null?void 0:t.id)!==e.id,"border-primary-dark":(t==null?void 0:t.id)===e.id,"border-red-400":w&&(t==null?void 0:t.id)!==e.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{r(e)},ref:v,children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:n?C.jsx(ye.FdGuest,{className:"h-6 w-6"}):C.jsx(ye.FdGroup,{className:"h-6 w-6"})}),u?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{autoFocus:!0,onKeyDown:E=>{E.key==="Enter"&&x(),E.key==="Escape"&&y()},type:"text",className:We("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":h,"focus:border-primary-dark":!h}),value:d,onChange:E=>f(E.target.value)}),h&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:h})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:d})]}),n?C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs(QP,{openDelay:0,closeDelay:0,children:[C.jsx(eN,{asChild:!0,children:C.jsx("span",{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"the guest privilege must be used to indicate resources accessible without any permission required (e.g. an authenticate function)"})]})})})})]})}):C.jsx("div",{className:"flex items-center space-x-2",children:u?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:y,children:C.jsx("span",{children:C.jsx(ye.FdClose,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:C.jsx("span",{children:C.jsx(ye.FdCheckCircle,{className:"h-4 w-4 text-grey-50"})})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:m,children:C.jsx("span",{children:C.jsx(ye.FdPen,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:b,children:C.jsx("span",{children:C.jsx(ye.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),a.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(wq,{data:a})}):null]})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{hidden:!w,style:{zIndex:50},avoidCollisions:!0,side:"top",className:"text-red-500 mb-1 flex max-w-xs items-center gap-x-1 rounded bg-negative-200 px-2 py-2 text-s font-semibold",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})},yX=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=J.useAppSelector(J.selectGuestPrivilege),i=J.useAppSelector(J.selectCatalog),o=T.useMemo(()=>{if(i===null||!n)return n;const a=B2({guest:n},Object.values((i==null?void 0:i.dataClasses)??{}));return F2(a,i).guest},[e,i]);return C.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[o?C.jsx(tN,{privilege:o,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,a])=>a.privilege!=="guest").sort(([,a],[,u])=>Te.localeCompare(a.privilege,u.privilege)).map(([a,u])=>C.jsx(tN,{privilege:u,onSelect:t,selectedPrivilege:r},a)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no privileges"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",C.jsx(ye.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var vu={exports:{}},gu={exports:{}},Ye={};/** @license React v16.13.1
6
+ */var kO;function KH(){return kO||(kO=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)t.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(PO)),PO.exports}var YH=KH();const XH=hj(YH),ZH=GH({extend:{classGroups:{"font-size":["text-xxs","text-xs","text-s","text-sm","text-base","text-lg","text-xl","text-2xl","text-3xl","text-4xl","text-5xl","text-6xl","text-7xl","text-8xl","text-9xl"],"text-color":["text-body","text-muted","text-inactive-text","text-button-text","text-positive-text","text-negative-text","text-negative","text-warning-text","text-input-text","text-select-text","text-input-message-text","text-placeholder"]}}});function be(...e){return ZH(XH(e))}const fl={sm:{checkbox:"size-4",hoverSquare:"size-2.5",text:"text-xs",spacing:"gap-1",icon:"size-3.25"},md:{checkbox:"size-5",hoverSquare:"size-3.5",text:"text-sm",spacing:"gap-1.5",icon:"size-4"},lg:{checkbox:"size-6",hoverSquare:"size-4",text:"text-base",spacing:"gap-2",icon:"size-5"}},bn={primary:{checked:"bg-primary border-primary",unchecked:"border border-body bg-transparent",checkedHover:"hover:bg-primary-hover hover:border-primary-hover",hoverSquare:"bg-primary-hover",focus:"focus:ring-primary",label:"text-body"},positive:{checked:"bg-positive border-positive",unchecked:"border border-positive bg-transparent",checkedHover:"hover:bg-positive-hover hover:border-positive-hover",hoverSquare:"bg-positive-hover",focus:"focus:ring-positive",label:"text-positive"},warning:{checked:"bg-warning border-warning",unchecked:"border border-warning bg-transparent",checkedHover:"hover:bg-warning-hover hover:border-warning-hover",hoverSquare:"bg-warning-hover",focus:"focus:ring-warning",label:"text-warning"},negative:{checked:"bg-negative border-negative",unchecked:"border border-negative bg-transparent",checkedHover:"hover:bg-negative-hover hover:border-negative-hover",hoverSquare:"bg-negative-hover",focus:"focus:ring-negative",label:"text-negative"}},JH=`
7
+ appearance-none border rounded transition-all duration-200
8
+ focus:ring-2 focus:ring-offset-2 focus:outline-hidden
9
+ relative
10
+ `,QH=(e,t,r)=>{const{isChecked:n,isIndeterminate:i,isDisabled:o,isInvalid:a}=r,s=n||i;return be(JH,fl[e].checkbox,{"cursor-pointer":!o},a?{[bn.negative.checked]:s,[bn.negative.unchecked]:!s,[bn.negative.checkedHover]:!o&&s,[bn.negative.focus]:!o,"border-input-disable":o}:{[bn[t].checked]:s&&!o,[bn[t].unchecked]:!s&&!o,[bn[t].checkedHover]:!o&&s,[bn[t].focus]:!o,"border-input-disable":o,"bg-input-disable":o&&s})},eV=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return be(fl[e].text,i?{[bn.negative.label]:i}:{"text-input-disable":n,[bn[t].label]:!n,"cursor-pointer":!n})},tV=e=>be("inline-flex items-center ws-group",fl[e].spacing),rV=(e,t,r)=>be("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",fl[e].hoverSquare,{[bn.negative.hoverSquare]:r,[bn[t].hoverSquare]:!r}),nV=e=>`${fl[e].icon}`,iV=e=>O.jsx("svg",{className:`absolute inset-0 ${e.className}`,fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e,children:O.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",fill:"none"})}),or=C.forwardRef(({label:e,isDisabled:t=!1,isInvalid:r=!1,isRequired:n=!1,size:i="md",color:o="primary",onChange:a,onFocus:s,onBlur:c,value:u,defaultValue:d,name:h,id:p,...v},x)=>{const[g,b]=C.useState(d),w=u===!0||g===!0,y=u===null,_=w||y,E={isChecked:w,isIndeterminate:y,isDisabled:t,isInvalid:r},S=QH(i,o,E),I=eV(i,o,E),N=tV(i),T=rV(i,o,r),k=nV(i);return O.jsxs("label",{"data-qui":"Checkbox",className:N,children:[O.jsxs("div",{className:S,children:[O.jsx("input",{ref:x,type:"checkbox",className:"sr-only",checked:w,disabled:t,required:n,onChange:z=>{u===void 0&&b(z.target.checked),a==null||a(z)},onFocus:s,onBlur:c,name:h,id:p,...v}),_&&O.jsx("div",{className:"center-absolute",children:y?O.jsx(iV,{className:k}):O.jsx(eH,{className:k})}),!_&&!t&&O.jsx("div",{className:T})]}),e&&O.jsxs("span",{className:I,children:[e,n&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});or.displayName="Checkbox";const hl={sm:{container:"gap-2",radio:"size-3",label:"text-xs",dot:"size-2",hoverDot:"size-1.5"},md:{container:"gap-2.5",radio:"size-4",label:"text-sm",dot:"size-2.5",hoverDot:"size-2"},lg:{container:"gap-3",radio:"size-6",label:"text-base",dot:"size-4",hoverDot:"size-3"}},Js={primary:{radio:"border-body-light group-hover:border-body",radioInvalid:"border-negative",dot:"bg-primary group-hover:bg-primary-hover",hoverDot:"bg-primary-hover",label:"text-body"},positive:{radio:"border-positive group-hover:border-positive-text",radioInvalid:"border-negative",dot:"bg-positive group-hover:bg-positive-hover",hoverDot:"bg-positive-bg",label:"text-positive-text"},warning:{radio:"border-warning group-hover:border-warning-text",radioInvalid:"border-negative",dot:"bg-warning group-hover:bg-warning-hover",hoverDot:"bg-warning-bg",label:"text-warning-text"},negative:{radio:"border-negative group-hover:border-negative-text",radioInvalid:"border-negative",dot:"bg-negative group-hover:bg-negative-hover",hoverDot:"bg-negative-bg",label:"text-negative"}},oV=`
11
+ relative rounded-full border transition-all duration-200 ease-in-out bg-transparent
12
+ focus:outline-hidden focus:ring-2 focus:ring-offset-0
13
+ cursor-pointer peer
14
+ `,aV=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return be(oV,hl[e].radio,i?Js[t].radioInvalid:{[Js[t].radio]:!n,"cursor-not-allowed opacity-60":n})},sV=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return be("center-absolute rounded-full transition-all duration-200 ease-in-out",hl[e].dot,o?"bg-negative":{[Js[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},lV=(e,t,r)=>be("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",hl[e].hoverDot,{[Js[t].hoverDot]:!r,"bg-negative-bg":r}),cV=e=>be("cursor-pointer select-none transition-colors duration-200",hl[e].label),uV=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return be("inline-flex items-center group",hl[e].container,o?{"text-negative":o}:{[Js[t].label]:!i,"text-muted":i},n)},dV=C.createContext(null),fV=()=>{const e=C.useContext(dV);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},hV=C.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:i,isInvalid:o,isRequired:a,className:s,...c},u)=>{const d=fV(),h=r??d.size,p=n??d.color,v=i??d.isDisabled,x=o??d.isInvalid,g=a??d.isRequired,b=d.value===e,w={checked:b,isDisabled:v,isInvalid:x},y=aV(h,p,w),_=sV(h,p,w),E=lV(h,p,x),S=cV(h),I=uV(h,p,w,s),N=()=>{v||d.onChange(e)};return O.jsxs("label",{"data-qui":"RadioItem",className:I,children:[O.jsxs("div",{className:be("relative",{hidden:d.hideIndicator}),children:[O.jsx("input",{ref:u,type:"radio",value:e,checked:b,disabled:v,required:g,"aria-invalid":x,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),O.jsxs("div",{className:y,children:[O.jsx("div",{className:_}),!b&&!v&&O.jsx("div",{className:E})]})]}),t&&O.jsxs("span",{className:S,children:[t,g&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});hV.displayName="RadioItem";const pj={sm:{container:"h-4.5 p-1 rounded",text:"text-xxs"},md:{container:"h-6 p-1 rounded",text:"text-s"},lg:{container:"h-7 p-1 rounded",text:"text-sm"},xl:{container:"h-7.5 p-1 rounded",text:"text-lg"}},pV={primary:{bg:{solid:"bg-primary",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-primary",ghost:"text-primary"},border:{solid:"border-primary",outline:"border-primary",ghost:"border-transparent"},hover:{solid:"hover:bg-primary-hover hover:border-primary-hover",outline:"hover:border-primary-hover hover:bg-primary hover:text-body",ghost:"hover:bg-primary-hover hover:text-body"}},white:{bg:{solid:"bg-white",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-primary",outline:"text-body",ghost:"text-body"},border:{solid:"border-white",outline:"border-white",ghost:"border-transparent"},hover:{solid:"hover:bg-canvas-subtle hover:border-canvas-subtle",outline:"hover:border-canvas-default hover:bg-canvas-default hover:text-primary",ghost:"hover:bg-primary-hover hover:text-body"}},positive:{bg:{solid:"bg-positive",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-positive-text",ghost:"text-positive-text"},border:{solid:"border-positive",outline:"border-positive",ghost:"border-transparent"},hover:{solid:"hover:bg-positive-hover hover:border-positive-hover",outline:"hover:border-positive-hover hover:bg-positive-hover hover:text-body",ghost:"hover:bg-positive-hover hover:text-body"}},warning:{bg:{solid:"bg-warning",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-warning-text",ghost:"text-warning-text"},border:{solid:"border-warning",outline:"border-warning",ghost:"border-transparent"},hover:{solid:"hover:bg-warning-hover hover:border-warning-hover",outline:"hover:border-warning-hover hover:bg-warning-hover hover:text-body",ghost:"hover:bg-warning-hover hover:text-body"}},negative:{bg:{solid:"bg-negative",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-button-text",outline:"text-negative",ghost:"text-negative"},border:{solid:"border-negative",outline:"border-negative",ghost:"border-transparent"},hover:{solid:"hover:bg-negative-hover hover:border-negative-hover",outline:"hover:border-negative-hover hover:bg-negative-hover hover:text-body",ghost:"hover:bg-negative-hover hover:text-body"}}},vV=(e,t,r,n)=>{const i=pj[e],o=pV[r],a=be("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},i.container);return n?be(a,"text-inactive-text pointer-events-none",{"border-panel":t!=="ghost"&&t==="solid","border-panel-subtle":t==="outline","bg-panel":t==="solid","bg-transparent ":t==="outline"||t==="ghost","border-transparent":t==="ghost"}):be(a,o.bg[t],o.text[t],o.hover[t],o.border[t])},gV=e=>be("flex items-center justify-center gap-1",pj[e].text),Jt=C.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:i,disabled:o,...a},s)=>O.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:be(vV(e,t,r,o),gV(e),n),disabled:o,...a,children:i}));Jt.displayName="Button";const vj=C.createContext(null),pl=()=>{const e=C.useContext(vj);if(!e)throw new Error("Input components must be used within Input.Root");return e},ka={sm:{group:"h-5 min-h-fit",input:"text-xxs",message:"text-xxs p-1.5",icon:"text-sm"},md:{group:"h-6 min-h-fit",input:"text-xs",message:"text-xs p-2",icon:"text-base"},lg:{group:"h-7 min-h-fit",input:"text-s",message:"text-s p-2.5",icon:"text-lg"}},mo={primary:{border:"border border-input-border focus-within:border-input-focus-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-focus-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-input-message-text",messageBackground:"bg-input-message-bg",icon:"text-input-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},positive:{border:"border border-input-border focus-within:border-positive",borderInvalid:"ring-input-error-border",borderMessage:"ring-positive",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-positive-dark",messageBackground:"bg-positive-light",icon:"text-positive-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},warning:{border:"border border-input-border focus-within:border-input-warning-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-warning-border",text:"text-input-text",placeholder:"placeholder:text-input-placeholder",messageText:"text-warning-dark",messageBackground:"bg-input-warning-bg",icon:"text-warning-text",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"},negative:{border:"border border-input-border focus-within:border-input-error-border",borderInvalid:"ring-input-error-border",borderMessage:"ring-input-error-border",text:"text-negative",placeholder:"placeholder:text-input-placeholder",messageText:"text-negative-dark",messageBackground:"bg-input-error-bg",icon:"text-negative",action:"text-input-text",actionHover:"hover:text-body hover:bg-primary-hover"}},mV=()=>be("flex flex-col relative"),bV=({size:e,color:t,isDisabled:r,isReadOnly:n,hasMessage:i,hasArea:o,isInvalid:a})=>{const s=mo[a?"negative":t];return be("bg-input-bg flex gap-1 relative px-1 transition-all duration-200 ease-in-out only:rounded first:rounded-t last:rounded-b",s.text,i?s.borderMessage:!n&&s.border,ka[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},yV=({size:e,color:t})=>be("bg-transparent ring-0 w-full","focus:outline-hidden",[ka[e].input],mo[t].placeholder),MO=({size:e,color:t})=>be("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",ka[e].input,mo[t].placeholder),xV=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=mo[t];return be("transition-colors duration-200 rounded max-h-full h-fit",ka[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?i.action:i.icon,{"cursor-pointer p-0.5":n&&!r,[i.actionHover]:n&&!r,"pointer-events-none":!n})},wV=({size:e,color:t,isDisabled:r})=>be("absolute left-0 right-0 z-10","flex items-start gap-x-2 ring-1","first:bottom-full first:rounded-t first:ring-b-0","last:top-full last:rounded-b last:ring-t-0","only:top-full only:rounded only:ring-1",r?"text-muted":mo[t].messageText,mo[t].borderMessage,mo[t].messageBackground,ka[e].message,{"opacity-60":r}),_V=({size:e})=>be(ka[e].icon);function Cu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var SV=typeof global=="object"&&global&&global.Object===Object&&global,EV=typeof self=="object"&&self&&self.Object===Object&&self,gj=SV||EV||Function("return this")(),Eh=function(){return gj.Date.now()},OV=/\s/;function CV(e){for(var t=e.length;t--&&OV.test(e.charAt(t)););return t}var IV=/^\s+/;function RV(e){return e&&e.slice(0,CV(e)+1).replace(IV,"")}var Iu=gj.Symbol,mj=Object.prototype,NV=mj.hasOwnProperty,TV=mj.toString,hs=Iu?Iu.toStringTag:void 0;function PV(e){var t=NV.call(e,hs),r=e[hs];try{e[hs]=void 0;var n=!0}catch{}var i=TV.call(e);return n&&(t?e[hs]=r:delete e[hs]),i}var kV=Object.prototype,MV=kV.toString;function AV(e){return MV.call(e)}var DV="[object Null]",jV="[object Undefined]",AO=Iu?Iu.toStringTag:void 0;function qV(e){return e==null?e===void 0?jV:DV:AO&&AO in Object(e)?PV(e):AV(e)}function LV(e){return e!=null&&typeof e=="object"}var zV="[object Symbol]";function BV(e){return typeof e=="symbol"||LV(e)&&qV(e)==zV}var DO=NaN,FV=/^[-+]0x[0-9a-f]+$/i,$V=/^0b[01]+$/i,HV=/^0o[0-7]+$/i,VV=parseInt;function jO(e){if(typeof e=="number")return e;if(BV(e))return DO;if(Cu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=RV(e);var r=$V.test(e);return r||HV.test(e)?VV(e.slice(2),r?2:8):FV.test(e)?DO:+e}var WV="Expected a function",UV=Math.max,GV=Math.min;function au(e,t,r){var n,i,o,a,s,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(WV);t=jO(t)||0,Cu(r)&&(d=!!r.leading,h="maxWait"in r,o=h?UV(jO(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function v(I){var N=n,T=i;return n=i=void 0,u=I,a=e.apply(T,N),a}function x(I){return u=I,s=setTimeout(w,t),d?v(I):a}function g(I){var N=I-c,T=I-u,k=t-N;return h?GV(k,o-T):k}function b(I){var N=I-c,T=I-u;return c===void 0||N>=t||N<0||h&&T>=o}function w(){var I=Eh();if(b(I))return y(I);s=setTimeout(w,g(I))}function y(I){return s=void 0,p&&n?v(I):(n=i=void 0,a)}function _(){s!==void 0&&clearTimeout(s),u=0,n=c=i=s=void 0}function E(){return s===void 0?a:y(Eh())}function S(){var I=Eh(),N=b(I);if(n=arguments,i=this,c=I,N){if(s===void 0)return x(c);if(h)return clearTimeout(s),s=setTimeout(w,t),v(c)}return s===void 0&&(s=setTimeout(w,t)),a}return S.cancel=_,S.flush=E,S}var KV="Expected a function";function YV(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(KV);return Cu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),au(e,t,{leading:n,maxWait:t,trailing:i})}var da=function(){return da=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},da.apply(this,arguments)};function bj(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function yj(e){return!e||!e.ownerDocument?document:e.ownerDocument}var xj=function(e){var t={},r=Array.prototype.reduce.call(e,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},t);return r};function wj(e,t){var r;e&&(r=e.classList).add.apply(r,t.split(" "))}function _j(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function Sj(e){return".".concat(e.split(" ").join("."))}var Qw=!!(typeof window<"u"&&window.document&&window.document.createElement),XV=Object.freeze({__proto__:null,addClasses:wj,canUseDOM:Qw,classNamesToQuery:Sj,getElementDocument:yj,getElementWindow:bj,getOptions:xj,removeClasses:_j}),ca=null,qO=null;Qw&&window.addEventListener("resize",function(){qO!==window.devicePixelRatio&&(qO=window.devicePixelRatio,ca=null)});function LO(){if(ca===null){if(typeof document>"u")return ca=0,ca;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var r=t.getBoundingClientRect().right;e.removeChild(t),ca=r}return ca}var zi=bj,Oh=yj,ZV=xj,Bi=wj,Fi=_j,qr=Sj,ps=(function(){function e(t,r){r===void 0&&(r={});var n=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var i=zi(n.el);n.scrollXTicking||(i.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(i.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0),n.isScrolling||(n.isScrolling=!0,Bi(n.el,n.classNames.scrolling)),n.showScrollbar("x"),n.showScrollbar("y"),n.onStopScrolling()},this.scrollX=function(){n.axis.x.isOverflowing&&n.positionScrollbar("x"),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&n.positionScrollbar("y"),n.scrollYTicking=!1},this._onStopScrolling=function(){Fi(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(Bi(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){Fi(n.el,n.classNames.mouseEntered),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isMouseEntering=!1},this._onMouseMove=function(i){n.mouseX=i.clientX,n.mouseY=i.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this._onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.onPointerEvent=function(i){if(!(!n.axis.x.track.el||!n.axis.y.track.el||!n.axis.x.scrollbar.el||!n.axis.y.scrollbar.el)){var o,a;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(o=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(a=n.isWithinBounds(n.axis.y.track.rect)),(o||a)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(i,"x"):n.onTrackClick(i,"x")),a&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(i,"y"):n.onTrackClick(i,"y"))))}},this.drag=function(i){var o,a,s,c,u,d,h,p,v,x,g;if(!(!n.draggedAxis||!n.contentWrapperEl)){var b,w=n.axis[n.draggedAxis].track,y=(a=(o=w.rect)===null||o===void 0?void 0:o[n.axis[n.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,_=n.axis[n.draggedAxis].scrollbar,E=(c=(s=n.contentWrapperEl)===null||s===void 0?void 0:s[n.axis[n.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,S=parseInt((d=(u=n.elStyles)===null||u===void 0?void 0:u[n.axis[n.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);i.preventDefault(),i.stopPropagation(),n.draggedAxis==="y"?b=i.pageY:b=i.pageX;var I=b-((p=(h=w.rect)===null||h===void 0?void 0:h[n.axis[n.draggedAxis].offsetAttr])!==null&&p!==void 0?p:0)-n.axis[n.draggedAxis].dragOffset;I=n.draggedAxis==="x"&&n.isRtl?((x=(v=w.rect)===null||v===void 0?void 0:v[n.axis[n.draggedAxis].sizeAttr])!==null&&x!==void 0?x:0)-_.size-I:I;var N=I/(y-_.size),T=N*(E-S);n.draggedAxis==="x"&&n.isRtl&&(T=!((g=e.getRtlHelpers())===null||g===void 0)&&g.isScrollingToNegative?-T:T),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=T}},this.onEndDrag=function(i){n.isDragging=!1;var o=Oh(n.el),a=zi(n.el);i.preventDefault(),i.stopPropagation(),Fi(n.el,n.classNames.dragging),n.onStopScrolling(),o.removeEventListener("mousemove",n.drag,!0),o.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=a.setTimeout(function(){o.removeEventListener("click",n.preventClick,!0),o.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=t,this.options=da(da({},e.defaultOptions),r),this.classNames=da(da({},e.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=YV(this._onMouseMove,64),this.onWindowResize=au(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=au(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=au(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var r=t.firstElementChild,n=r==null?void 0:r.firstElementChild;if(!n)return null;document.body.appendChild(r),r.scrollLeft=0;var i=e.getOffset(r),o=e.getOffset(n);r.scrollLeft=-999;var a=e.getOffset(n);return document.body.removeChild(r),e.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:LO()}catch{return LO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=Oh(t),i=zi(t);return{top:r.top+(i.pageYOffset||n.documentElement.scrollTop),left:r.left+(i.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){Qw&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(qr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(qr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(qr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(qr(this.classNames.offset)),this.maskEl=this.el.querySelector(qr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,qr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(qr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(qr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(qr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(qr(this.classNames.scrollbar)))||null,this.options.autoHide||(Bi(this.axis.x.scrollbar.el,this.classNames.visible),Bi(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=zi(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(r=this.contentWrapperEl)===null||r===void 0||r.addEventListener("scroll",this.onScroll),n.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var i=!1,o=n.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&n.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new n.MutationObserver(function(){n.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=zi(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var r=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||r>0,o=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=i?"".concat(r||u,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var d=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=r!==0&&u>r,this.axis.y.isOverflowing=c>d,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=s==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var h=this.axis.x.isOverflowing?this.scrollbarWidth:0,p=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>o-p,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>d-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var r,n;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var i=this.contentEl[this.axis[t].scrollSizeAttr],o=(n=(r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])!==null&&n!==void 0?n:0,a=o/i,s;return s=Math.max(~~(a*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(s=Math.min(s,this.options.scrollbarMaxSize)),s},e.prototype.positionScrollbar=function(t){var r,n,i;t===void 0&&(t="y");var o=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],s=((r=this.axis[t].track.el)===null||r===void 0?void 0:r[this.axis[t].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[t].sizeAttr],10),u=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];u=t==="x"&&this.isRtl&&!((n=e.getRtlHelpers())===null||n===void 0)&&n.isScrollOriginAtZero?-u:u,t==="x"&&this.isRtl&&(u=!((i=e.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?u:-u);var d=u/(a-c),h=~~((s-o.size)*d);h=t==="x"&&this.isRtl?-h+(s-o.size):h,o.el.style.transform=t==="x"?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var r=this.axis[t].track.el,n=this.axis[t].scrollbar.el;!r||!n||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(r.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(r.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(Bi(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(Fi(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var r=this.axis[t];!r.track.el||!r.scrollbar.el||(r.track.rect=r.track.el.getBoundingClientRect(),r.scrollbar.rect=r.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(r.track.rect)?(this.showScrollbar(t),Bi(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?Bi(r.scrollbar.el,this.classNames.hover):Fi(r.scrollbar.el,this.classNames.hover)):(Fi(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),Fi(this.axis[t].track.el,this.classNames.hover),Fi(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,r){var n;r===void 0&&(r="y"),this.isDragging=!0;var i=Oh(this.el),o=zi(this.el),a=this.axis[r].scrollbar,s=r==="y"?t.pageY:t.pageX;this.axis[r].dragOffset=s-(((n=a.rect)===null||n===void 0?void 0:n[this.axis[r].offsetAttr])||0),this.draggedAxis=r,Bi(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,r){var n=this,i,o,a,s;r===void 0&&(r="y");var c=this.axis[r];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var u=zi(this.el);this.axis[r].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var d=this.axis[r].scrollbar,h=(o=(i=d.rect)===null||i===void 0?void 0:i[this.axis[r].offsetAttr])!==null&&o!==void 0?o:0,p=parseInt((s=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[r].sizeAttr])!==null&&s!==void 0?s:"0px",10),v=this.contentWrapperEl[this.axis[r].scrollOffsetAttr],x=r==="y"?this.mouseY-h:this.mouseX-h,g=x<0?-1:1,b=g===-1?v-p:v+p,w=40,y=function(){n.contentWrapperEl&&(g===-1?v>b&&(v-=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(y)):v<b&&(v+=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(y)))};y()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=zi(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,r){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(i){return n.call(i,r)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=ZV,e.helpers=XV,e})(),en=function(){return en=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},en.apply(this,arguments)};function JV(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}var e1=vt.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=JV(e,["children","scrollableNodeProps"]),a=vt.useRef(),s=vt.useRef(),c=vt.useRef(),u={},d={};Object.keys(o).forEach(function(v){Object.prototype.hasOwnProperty.call(ps.defaultOptions,v)?u[v]=o[v]:d[v]=o[v]});var h=en(en({},ps.defaultOptions.classNames),u.classNames),p=en(en({},i),{className:"".concat(h.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:u.tabIndex||ps.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||ps.defaultOptions.ariaLabel});return vt.useEffect(function(){var v;return s.current=p.ref?p.ref.current:s.current,a.current&&(v=new ps(a.current,en(en(en({},u),s.current&&{scrollableNode:s.current}),c.current&&{contentNode:c.current})),typeof t=="function"?t(v):t&&(t.current=v)),function(){v==null||v.unMount(),v=null,typeof t=="function"&&t(null)}},[]),vt.createElement("div",en({"data-simplebar":"init",ref:a},d),vt.createElement("div",{className:h.wrapper},vt.createElement("div",{className:h.heightAutoObserverWrapperEl},vt.createElement("div",{className:h.heightAutoObserverEl})),vt.createElement("div",{className:h.mask},vt.createElement("div",{className:h.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:en(en({},p),{ref:s}),contentNodeRef:c,contentNodeProps:{className:h.contentEl,ref:c}}):vt.createElement("div",en({},p),vt.createElement("div",{className:h.contentEl},r)))),vt.createElement("div",{className:h.placeholder})),vt.createElement("div",{className:"".concat(h.track," ").concat(h.horizontal)},vt.createElement("div",{className:h.scrollbar})),vt.createElement("div",{className:"".concat(h.track," ").concat(h.vertical)},vt.createElement("div",{className:h.scrollbar})))});e1.displayName="SimpleBar";const Ej=C.forwardRef(({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,isReadOnly:i=!1,className:o,children:a,...s},c)=>{const[u,d]=C.useState(!1),[h,p]=C.useState(!1),v={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,isReadOnly:i,hasMessage:u,setHasMessage:d,hasArea:h,setHasArea:p};return O.jsx(vj.Provider,{value:v,children:O.jsx("div",{ref:c,"data-qui":"Input",className:be(mV(),o),...s,children:a})})}),Oj=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}=pl();return O.jsx("div",{ref:n,"data-qui":"InputGroup",className:be(bV({size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}),e),...r,children:t})}),Cj=C.forwardRef(({className:e,...t},r)=>{const{size:n,color:i,isInvalid:o,isDisabled:a,isReadOnly:s}=pl(),{isDisabled:c,isReadOnly:u,...d}=t;return O.jsx("input",{ref:r,disabled:a||c,readOnly:u||s||!1,"aria-invalid":o,className:be(yV({size:n,color:i}),e),...d})}),QV=C.forwardRef(({className:e,wrapperClassName:t,autoHeight:r,...n},i)=>{const{size:o,color:a,isInvalid:s,isDisabled:c,setHasArea:u}=pl(),d=C.useRef(null),h=i||d,p=C.useRef(null);C.useEffect(()=>(u(!0),()=>{u(!1)}),[u]);const v=C.useCallback(()=>{if(d.current){const _=d.current;_.style.height="auto",_.style.height=`${_.scrollHeight}px`}},[]),x=_=>{var E;v(),(E=n.onInput)==null||E.call(n,_)};C.useEffect(()=>{v()},[v,n.value]),C.useEffect(()=>{r&&p.current&&p.current.style.removeProperty("height")},[r]);const g=_=>{_.preventDefault();const E=p.current;if(!E)return;const S=_.clientY,I=E.offsetHeight,N=k=>{const z=I+(k.clientY-S);z>30&&(E.style.height=z+"px")},T=()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",T)};document.addEventListener("mousemove",N),document.addEventListener("mouseup",T)},{isDisabled:b,isReadOnly:w,...y}=n;return O.jsxs("div",{ref:p,className:be("w-full relative",!r&&!n.rows&&"h-30",t),children:[r?O.jsx("textarea",{ref:h,rows:1,className:be(MO({size:o,color:a}),e),disabled:c||b,onInput:x,readOnly:w||!1,"aria-invalid":s,style:{overflow:"hidden"},...y}):O.jsx(e1,{style:{height:"100%"},children:O.jsx("textarea",{ref:h,rows:1,className:be(MO({size:o,color:a}),e),disabled:c||b,onInput:x,readOnly:w||!1,"aria-invalid":s,style:{height:"auto",overflow:"hidden",width:"100%"},...y})}),!r&&O.jsx("div",{className:"absolute right-0 bottom-0 -translate-x-full -translate-y-full size-1.75 text-sm cursor-se-resize z-10",onMouseDown:g,children:O.jsx(oH,{})})]})}),Ij=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=pl(),d=r||u,h=xV({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"InputIcon",className:be(h,t),style:n,role:e||o.onClick?"button":void 0,tabIndex:(e||o.onClick)&&!d?0:void 0,"aria-disabled":d,...o,children:i})}),Rj=C.forwardRef(({icon:e,className:t,children:r,...n},i)=>{const{size:o,color:a,setHasMessage:s,isDisabled:c}=pl();return C.useEffect(()=>(s(!0),()=>{s(!1)}),[s]),O.jsxs("div",{ref:i,"data-qui":"InputMessage",role:"alert",className:be(wV({size:o,color:a,isDisabled:c}),t),...n,children:[e!==void 0&&O.jsx("div",{className:be(_V({size:o}),t),children:e}),O.jsx("p",{children:r})]})});Ej.displayName="InputRoot";Oj.displayName="InputGroup";Cj.displayName="InputField";QV.displayName="InputArea";Ij.displayName="InputIcon";Rj.displayName="InputMessage";const xt={Root:Ej,Group:Oj,Field:Cj,Icon:Ij,Message:Rj},Qs={primary:{container:"bg-primary-light",text:"text-primary-dark",icon:"text-primary-dark",button:"hover:bg-primary-hover hover:text-body"},positive:{container:"bg-positive-light",text:"text-positive-dark",icon:"text-positive-dark",button:"hover:bg-positive hover:text-body"},negative:{container:"bg-negative-light",text:"text-negative-dark",icon:"text-negative-dark",button:"hover:bg-negative hover:text-body"},warning:{container:"bg-warning-light",text:"text-warning-dark",icon:"text-warning-dark",button:"hover:bg-warning hover:text-body"}},eW=({color:e})=>be("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",Qs[e].container,Qs[e].icon),tW=({color:e})=>be("text-xs font-medium leading-3",Qs[e].text),rW=({color:e})=>be("p-0.5 rounded cursor-pointer",Qs[e].button,Qs[e].icon),zr=({label:e,color:t="primary",position:r="up",showCloseButton:n=!1,icon:i,children:o,delay:a=0,trigger:s="hover",className:c,container:u,isHidden:d=!1})=>{const[h,p]=C.useState(!1),[v,x]=C.useState(!1),[g,b]=C.useState({position:r,transform:""}),w=C.useRef(null),y=C.useRef(null),_=C.useRef(null),E=h&&!d;C.useEffect(()=>{E||x(!1)},[E]);const S=C.useCallback(()=>{if(!w.current||!y.current)return;const B=w.current.getBoundingClientRect(),X=y.current.getBoundingClientRect(),U=window.innerWidth,re=window.innerHeight,j=window.scrollX,W=window.scrollY,Z=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,U),J=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,re),M=4;let H=r,q={position:H,transform:""};const D=ce=>{const{top:ee,left:pe,width:ue,height:xe}=B,le=ee+W,ie=pe+j;switch(ce){case"up":return{top:`${le-X.height-M}px`,left:`${ie+ue/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${le-X.height-M}px`,left:`${ie}px`,transform:"translateX(0)"};case"up-end":return{top:`${le-X.height-M}px`,left:`${ie+ue-X.width}px`,transform:"translateX(0)"};case"down":return{top:`${le+xe+M}px`,left:`${ie+ue/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${le+xe+M}px`,left:`${ie}px`,transform:"translateX(0)"};case"down-end":return{top:`${le+xe+M}px`,left:`${ie+ue-X.width}px`,transform:"translateX(0)"};case"left":return{top:`${le+xe/2}px`,left:`${ie-X.width-M}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${le}px`,left:`${ie-X.width-M}px`,transform:"translateY(0)"};case"left-end":return{top:`${le+xe-X.height}px`,left:`${ie-X.width-M}px`,transform:"translateY(0)"};case"right":return{top:`${le+xe/2}px`,left:`${ie+ue+M}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${le}px`,left:`${ie+ue+M}px`,transform:"translateY(0)"};case"right-end":return{top:`${le+xe-X.height}px`,left:`${ie+ue+M}px`,transform:"translateY(0)"};default:return{}}},V={up:{fits:B.top-X.height-M>=0},"up-start":{fits:B.top-X.height-M>=0&&B.left+X.width<=U},"up-end":{fits:B.top-X.height-M>=0&&B.right-X.width>=0},down:{fits:B.bottom+X.height+M<=re&&B.bottom+X.height+M<=J},"down-start":{fits:B.bottom+X.height+M<=re&&B.bottom+X.height+M<=J&&B.left+X.width<=U},"down-end":{fits:B.bottom+X.height+M<=re&&B.bottom+X.height+M<=J&&B.right-X.width>=0},left:{fits:B.left-X.width-M>=0},"left-start":{fits:B.left-X.width-M>=0&&B.top+X.height<=re},"left-end":{fits:B.left-X.width-M>=0&&B.bottom-X.height>=0},right:{fits:B.right+X.width+M<=U&&B.right+X.width+M<=Z},"right-start":{fits:B.right+X.width+M<=U&&B.right+X.width+M<=Z&&B.top+X.height<=re},"right-end":{fits:B.right+X.width+M<=U&&B.right+X.width+M<=Z&&B.bottom-X.height>=0}},Q=B.left+B.width/2-X.width/2,ne=B.left+B.width/2+X.width/2;if((r==="up"||r==="down")&&(Q<0||ne>U)&&(V[r].fits=!1),V[r].fits){const ce=D(r);q={position:r,...ce,transform:ce.transform||""}}else{const ce=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(ee=>V[ee].fits);if(ce){H=ce;const ee=D(ce);q={position:H,...ee,transform:ee.transform||""}}else{const ee={up:B.top,"up-start":B.top,"up-end":B.top,down:Math.min(re-B.bottom,J-B.bottom),"down-start":Math.min(re-B.bottom,J-B.bottom),"down-end":Math.min(re-B.bottom,J-B.bottom),left:B.left,"left-start":B.left,"left-end":B.left,right:Math.min(U-B.right,Z-B.right),"right-start":Math.min(U-B.right,Z-B.right),"right-end":Math.min(U-B.right,Z-B.right)},pe=Object.entries(ee).reduce((xe,[le,ie])=>ie>xe.space?{position:le,space:ie}:xe,{position:"up",space:0}).position;H=pe;const ue=D(pe);q={position:H,...ue,transform:ue.transform||""}}}b(q)},[r]),I=()=>{_.current&&(clearTimeout(_.current),_.current=null)},N=()=>{I(),p(!1)},T=()=>{I(),a===0?p(!1):_.current=setTimeout(()=>p(!1),a)},k=()=>{s==="click"&&(p(!0),I(),_.current=setTimeout(()=>{v||p(!1)},a))},z=B=>{B.stopPropagation(),N()},L=()=>{x(!0),I()},K=()=>{x(!1),h&&T()},G=()=>{s==="hover"&&(I(),p(!0))},A=()=>{s==="hover"&&T()};C.useEffect(()=>{if(!h||d||!w.current)return;const B=w.current;let X=!1,U=!1;const re=new IntersectionObserver(([j])=>{if(!X){U=j.isIntersecting,X=!0;return}U&&!j.isIntersecting&&N(),U=j.isIntersecting},{threshold:0});return re.observe(B),()=>re.disconnect()},[h,d]),C.useEffect(()=>{if(h){const B=requestAnimationFrame(()=>S());return()=>cancelAnimationFrame(B)}},[h,e,S]),C.useEffect(()=>{if(h){const B=setTimeout(()=>S(),0);return()=>clearTimeout(B)}},[h,S]),C.useEffect(()=>{const B=()=>{h&&S()},X=()=>{h&&S()};return window.addEventListener("resize",B),window.addEventListener("scroll",X,!0),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",X,!0),I()}},[h,S]);const Y=u||(typeof document<"u"?document.body:null);return Y?O.jsxs(O.Fragment,{children:[O.jsx("div",{"data-qui":"Tooltip",ref:w,onClick:k,onMouseEnter:G,onMouseLeave:A,className:be("relative inline-flex items-center",c),children:o}),h&&!d&&!!e&&ei.createPortal(O.jsxs("div",{ref:y,role:"tooltip",className:eW({color:t}),style:{position:"absolute",left:g.left??0,top:g.top??0,transform:g.transform,zIndex:1e3,opacity:g.left?1:0,pointerEvents:n?"auto":"none"},onMouseEnter:n?L:void 0,onMouseLeave:n?K:void 0,children:[i&&O.jsx("span",{"data-testid":"tooltip-icon",children:i}),O.jsx("div",{className:tW({color:t}),children:e}),n&&O.jsx("div",{onClick:z,className:rW({color:t}),role:"button",children:O.jsx(id,{})})]}),Y)]}):null};function nW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>n=>{t.forEach(i=>i(n))},t)}const ad=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ma(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function t1(e){return"nodeType"in e}function Ir(e){var t,r;return e?Ma(e)?e:t1(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function r1(e){const{Document:t}=Ir(e);return e instanceof t}function vl(e){return Ma(e)?!1:e instanceof Ir(e).HTMLElement}function Nj(e){return e instanceof Ir(e).SVGElement}function Aa(e){return e?Ma(e)?e.document:t1(e)?r1(e)?e:vl(e)||Nj(e)?e.ownerDocument:document:document:document}const zn=ad?C.useLayoutEffect:C.useEffect;function sd(e){const t=C.useRef(e);return zn(()=>{t.current=e}),C.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current==null?void 0:t.current(...n)},[])}function iW(){const e=C.useRef(null),t=C.useCallback((n,i)=>{e.current=setInterval(n,i)},[]),r=C.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function el(e,t){t===void 0&&(t=[e]);const r=C.useRef(e);return zn(()=>{r.current!==e&&(r.current=e)},t),r}function gl(e,t){const r=C.useRef();return C.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Ru(e){const t=sd(e),r=C.useRef(null),n=C.useCallback(i=>{i!==r.current&&(t==null||t(i,r.current)),r.current=i},[]);return[r,n]}function Nu(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let Ch={};function ml(e,t){return C.useMemo(()=>{if(t)return t;const r=Ch[e]==null?0:Ch[e]+1;return Ch[e]=r,e+"-"+r},[e,t])}function Tj(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>{const s=Object.entries(a);for(const[c,u]of s){const d=o[c];d!=null&&(o[c]=d+e*u)}return o},{...t})}}const pa=Tj(1),Tu=Tj(-1);function oW(e){return"clientX"in e&&"clientY"in e}function ld(e){if(!e)return!1;const{KeyboardEvent:t}=Ir(e.target);return t&&e instanceof t}function aW(e){if(!e)return!1;const{TouchEvent:t}=Ir(e.target);return t&&e instanceof t}function Pu(e){if(aW(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return oW(e)?{x:e.clientX,y:e.clientY}:null}const Xi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Xi.Translate.toString(e),Xi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),zO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function sW(e){return e.matches(zO)?e:e.querySelector(zO)}const lW={display:"none"};function cW(e){let{id:t,value:r}=e;return C.createElement("div",{id:t,style:lW},r)}function uW(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return C.createElement("div",{id:t,style:i,role:"status","aria-live":n,"aria-atomic":!0},r)}function dW(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Pj=C.createContext(null);function fW(e){const t=C.useContext(Pj);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function hW(){const[e]=C.useState(()=>new Set),t=C.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[C.useCallback(r=>{let{type:n,event:i}=r;e.forEach(o=>{var a;return(a=o[n])==null?void 0:a.call(o,i)})},[e]),t]}const pW={draggable:`
15
+ To pick up a draggable item, press the space bar.
16
+ While dragging, use the arrow keys to move the item.
17
+ Press space again to drop the item in its new position, or press escape to cancel.
18
+ `},vW={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function gW(e){let{announcements:t=vW,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=pW}=e;const{announce:o,announcement:a}=dW(),s=ml("DndLiveRegion"),[c,u]=C.useState(!1);if(C.useEffect(()=>{u(!0)},[]),fW(C.useMemo(()=>({onDragStart(h){let{active:p}=h;o(t.onDragStart({active:p}))},onDragMove(h){let{active:p,over:v}=h;t.onDragMove&&o(t.onDragMove({active:p,over:v}))},onDragOver(h){let{active:p,over:v}=h;o(t.onDragOver({active:p,over:v}))},onDragEnd(h){let{active:p,over:v}=h;o(t.onDragEnd({active:p,over:v}))},onDragCancel(h){let{active:p,over:v}=h;o(t.onDragCancel({active:p,over:v}))}}),[o,t])),!c)return null;const d=C.createElement(C.Fragment,null,C.createElement(cW,{id:n,value:i.draggable}),C.createElement(uW,{id:s,announcement:a}));return r?ei.createPortal(d,r):d}var Zt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Zt||(Zt={}));function ku(){}function mW(e,t){return C.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function bW(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Bn=Object.freeze({x:0,y:0});function yW(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function xW(e,t){const r=Pu(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function wW(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function _W(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function SW(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function BO(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const EW=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=BO(t,t.left,t.top),o=[];for(const a of n){const{id:s}=a,c=r.get(s);if(c){const u=yW(BO(c),i);o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(wW)};function OW(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-n,s=o-r;if(n<i&&r<o){const c=t.width*t.height,u=e.width*e.height,d=a*s,h=d/(c+u-d);return Number(h.toFixed(4))}return 0}const CW=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=[];for(const o of n){const{id:a}=o,s=r.get(a);if(s){const c=OW(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(_W)};function IW(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function kj(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Bn}function RW(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.reduce((o,a)=>({...o,top:o.top+e*a.y,bottom:o.bottom+e*a.y,left:o.left+e*a.x,right:o.right+e*a.x}),{...t})}}const NW=RW(1);function Mj(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function TW(e,t,r){const n=Mj(t);if(!n)return e;const{scaleX:i,scaleY:o,x:a,y:s}=n,c=e.left-a-(1-i)*parseFloat(r),u=e.top-s-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),d=i?e.width/i:e.width,h=o?e.height/o:e.height;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c}}const PW={ignoreTransform:!1};function Da(e,t){t===void 0&&(t=PW);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Ir(e).getComputedStyle(e);u&&(r=TW(r,u,d))}const{top:n,left:i,width:o,height:a,bottom:s,right:c}=r;return{top:n,left:i,width:o,height:a,bottom:s,right:c}}function FO(e){return Da(e,{ignoreTransform:!0})}function kW(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function MW(e,t){return t===void 0&&(t=Ir(e).getComputedStyle(e)),t.position==="fixed"}function AW(e,t){t===void 0&&(t=Ir(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(n=>{const i=t[n];return typeof i=="string"?r.test(i):!1})}function n1(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(r1(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!vl(i)||Nj(i)||r.includes(i))return r;const o=Ir(e).getComputedStyle(i);return i!==e&&AW(i,o)&&r.push(i),MW(i,o)?r:n(i.parentNode)}return e?n(e):r}function Aj(e){const[t]=n1(e,1);return t??null}function Ih(e){return!ad||!e?null:Ma(e)?e:t1(e)?r1(e)||e===Aa(e).scrollingElement?window:vl(e)?e:null:null}function Dj(e){return Ma(e)?e.scrollX:e.scrollLeft}function jj(e){return Ma(e)?e.scrollY:e.scrollTop}function bw(e){return{x:Dj(e),y:jj(e)}}var ir;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ir||(ir={}));function qj(e){return!ad||!e?!1:e===document.scrollingElement}function Lj(e){const t={x:0,y:0},r=qj(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,a=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:i,isLeft:o,isBottom:a,isRight:s,maxScroll:n,minScroll:t}}const DW={x:.2,y:.2};function jW(e,t,r,n,i){let{top:o,left:a,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=DW);const{isTop:u,isBottom:d,isLeft:h,isRight:p}=Lj(e),v={x:0,y:0},x={x:0,y:0},g={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+g.height?(v.y=ir.Backward,x.y=n*Math.abs((t.top+g.height-o)/g.height)):!d&&c>=t.bottom-g.height&&(v.y=ir.Forward,x.y=n*Math.abs((t.bottom-g.height-c)/g.height)),!p&&s>=t.right-g.width?(v.x=ir.Forward,x.x=n*Math.abs((t.right-g.width-s)/g.width)):!h&&a<=t.left+g.width&&(v.x=ir.Backward,x.x=n*Math.abs((t.left+g.width-a)/g.width)),{direction:v,speed:x}}function qW(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:a}=window;return{top:0,left:0,right:o,bottom:a,width:o,height:a}}const{top:t,left:r,right:n,bottom:i}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:i,width:e.clientWidth,height:e.clientHeight}}function zj(e){return e.reduce((t,r)=>pa(t,bw(r)),Bn)}function LW(e){return e.reduce((t,r)=>t+Dj(r),0)}function zW(e){return e.reduce((t,r)=>t+jj(r),0)}function Bj(e,t){if(t===void 0&&(t=Da),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);Aj(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const BW=[["x",["left","right"],LW],["y",["top","bottom"],zW]];class i1{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=n1(r),i=zj(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of BW)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(n),d=i[o]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Vs{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var i;(i=this.target)==null||i.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function FW(e){const{EventTarget:t}=Ir(e);return e instanceof t?e:Aa(e)}function Rh(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var yn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(yn||(yn={}));function $O(e){e.preventDefault()}function $W(e){e.stopPropagation()}var ot;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ot||(ot={}));const Fj={start:[ot.Space,ot.Enter],cancel:[ot.Esc],end:[ot.Space,ot.Enter,ot.Tab]},HW=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case ot.Right:return{...r,x:r.x+25};case ot.Left:return{...r,x:r.x-25};case ot.Down:return{...r,y:r.y+25};case ot.Up:return{...r,y:r.y-25}}};class $j{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Vs(Aa(r)),this.windowListeners=new Vs(Ir(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(yn.Resize,this.handleCancel),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(yn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Bj(n),r(Bn)}handleKeyDown(t){if(ld(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=Fj,coordinateGetter:a=HW,scrollBehavior:s="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=n.current,d=u?{x:u.left,y:u.top}:Bn;this.referenceCoordinates||(this.referenceCoordinates=d);const h=a(t,{active:r,context:n.current,currentCoordinates:d});if(h){const p=Tu(h,d),v={x:0,y:0},{scrollableAncestors:x}=n.current;for(const g of x){const b=t.code,{isTop:w,isRight:y,isLeft:_,isBottom:E,maxScroll:S,minScroll:I}=Lj(g),N=qW(g),T={x:Math.min(b===ot.Right?N.right-N.width/2:N.right,Math.max(b===ot.Right?N.left:N.left+N.width/2,h.x)),y:Math.min(b===ot.Down?N.bottom-N.height/2:N.bottom,Math.max(b===ot.Down?N.top:N.top+N.height/2,h.y))},k=b===ot.Right&&!y||b===ot.Left&&!_,z=b===ot.Down&&!E||b===ot.Up&&!w;if(k&&T.x!==h.x){const L=g.scrollLeft+p.x,K=b===ot.Right&&L<=S.x||b===ot.Left&&L>=I.x;if(K&&!p.y){g.scrollTo({left:L,behavior:s});return}K?v.x=g.scrollLeft-L:v.x=b===ot.Right?g.scrollLeft-S.x:g.scrollLeft-I.x,v.x&&g.scrollBy({left:-v.x,behavior:s});break}else if(z&&T.y!==h.y){const L=g.scrollTop+p.y,K=b===ot.Down&&L<=S.y||b===ot.Up&&L>=I.y;if(K&&!p.x){g.scrollTo({top:L,behavior:s});return}K?v.y=g.scrollTop-L:v.y=b===ot.Down?g.scrollTop-S.y:g.scrollTop-I.y,v.y&&g.scrollBy({top:-v.y,behavior:s});break}}this.handleMove(t,pa(Tu(h,this.referenceCoordinates),v))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}$j.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=Fj,onActivation:i}=t,{active:o}=r;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function HO(e){return!!(e&&"distance"in e)}function VO(e){return!!(e&&"delay"in e)}class o1{constructor(t,r,n){var i;n===void 0&&(n=FW(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:o}=t,{target:a}=o;this.props=t,this.events=r,this.document=Aa(a),this.documentListeners=new Vs(this.document),this.listeners=new Vs(n),this.windowListeners=new Vs(Ir(a)),this.initialCoordinates=(i=Pu(o))!=null?i:Bn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(yn.Resize,this.handleCancel),this.windowListeners.add(yn.DragStart,$O),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),this.windowListeners.add(yn.ContextMenu,$O),this.documentListeners.add(yn.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(VO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(HO(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(yn.Click,$W,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(yn.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const c=(r=Pu(t))!=null?r:Bn,u=Tu(i,c);if(!n&&s){if(HO(s)){if(s.tolerance!=null&&Rh(u,s.tolerance))return this.handleCancel();if(Rh(u,s.distance))return this.handleStart()}if(VO(s)&&Rh(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===ot.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const VW={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class a1 extends o1{constructor(t){const{event:r}=t,n=Aa(r.target);super(t,VW,n)}}a1.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const WW={move:{name:"mousemove"},end:{name:"mouseup"}};var yw;(function(e){e[e.RightClick=2]="RightClick"})(yw||(yw={}));class UW extends o1{constructor(t){super(t,WW,Aa(t.event.target))}}UW.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===yw.RightClick?!1:(n==null||n({event:r}),!0)}}];const Nh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class GW extends o1{constructor(t){super(t,Nh)}static setup(){return window.addEventListener(Nh.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Nh.move.name,t)};function t(){}}}GW.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:i}=r;return i.length>1?!1:(n==null||n({event:r}),!0)}}];var Ws;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ws||(Ws={}));var Mu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Mu||(Mu={}));function KW(e){let{acceleration:t,activator:r=Ws.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=Mu.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:h,threshold:p}=e;const v=XW({delta:h,disabled:!o}),[x,g]=iW(),b=C.useRef({x:0,y:0}),w=C.useRef({x:0,y:0}),y=C.useMemo(()=>{switch(r){case Ws.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ws.DraggableRect:return i}},[r,i,c]),_=C.useRef(null),E=C.useCallback(()=>{const I=_.current;if(!I)return;const N=b.current.x*w.current.x,T=b.current.y*w.current.y;I.scrollBy(N,T)},[]),S=C.useMemo(()=>s===Mu.TreeOrder?[...u].reverse():u,[s,u]);C.useEffect(()=>{if(!o||!u.length||!y){g();return}for(const I of S){if((n==null?void 0:n(I))===!1)continue;const N=u.indexOf(I),T=d[N];if(!T)continue;const{direction:k,speed:z}=jW(I,T,y,t,p);for(const L of["x","y"])v[L][k[L]]||(z[L]=0,k[L]=0);if(z.x>0||z.y>0){g(),_.current=I,x(E,a),b.current=z,w.current=k;return}}b.current={x:0,y:0},w.current={x:0,y:0},g()},[t,E,n,g,o,a,JSON.stringify(y),JSON.stringify(v),x,u,S,d,JSON.stringify(p)])}const YW={x:{[ir.Backward]:!1,[ir.Forward]:!1},y:{[ir.Backward]:!1,[ir.Forward]:!1}};function XW(e){let{delta:t,disabled:r}=e;const n=Nu(t);return gl(i=>{if(r||!n||!i)return YW;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[ir.Backward]:i.x[ir.Backward]||o.x===-1,[ir.Forward]:i.x[ir.Forward]||o.x===1},y:{[ir.Backward]:i.y[ir.Backward]||o.y===-1,[ir.Forward]:i.y[ir.Forward]||o.y===1}}},[r,t,n])}function ZW(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return gl(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function JW(e,t){return C.useMemo(()=>e.reduce((r,n)=>{const{sensor:i}=n,o=i.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,n)}));return[...r,...o]},[]),[e,t])}var tl;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(tl||(tl={}));var xw;(function(e){e.Optimized="optimized"})(xw||(xw={}));const WO=new Map;function QW(e,t){let{dragging:r,dependencies:n,config:i}=t;const[o,a]=C.useState(null),{frequency:s,measure:c,strategy:u}=i,d=C.useRef(e),h=b(),p=el(h),v=C.useCallback(function(w){w===void 0&&(w=[]),!p.current&&a(y=>y===null?w:y.concat(w.filter(_=>!y.includes(_))))},[p]),x=C.useRef(null),g=gl(w=>{if(h&&!r)return WO;if(!w||w===WO||d.current!==e||o!=null){const y=new Map;for(let _ of e){if(!_)continue;if(o&&o.length>0&&!o.includes(_.id)&&_.rect.current){y.set(_.id,_.rect.current);continue}const E=_.node.current,S=E?new i1(c(E),E):null;_.rect.current=S,S&&y.set(_.id,S)}return y}return w},[e,o,r,h,c]);return C.useEffect(()=>{d.current=e},[e]),C.useEffect(()=>{h||v()},[r,h]),C.useEffect(()=>{o&&o.length>0&&a(null)},[JSON.stringify(o)]),C.useEffect(()=>{h||typeof s!="number"||x.current!==null||(x.current=setTimeout(()=>{v(),x.current=null},s))},[s,h,v,...n]),{droppableRects:g,measureDroppableContainers:v,measuringScheduled:o!=null};function b(){switch(u){case tl.Always:return!1;case tl.BeforeDragging:return r;default:return!r}}}function s1(e,t){return gl(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function eU(e,t){return s1(e,t)}function tU(e){let{callback:t,disabled:r}=e;const n=sd(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(n)},[n,r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function cd(e){let{callback:t,disabled:r}=e;const n=sd(t),i=C.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(n)},[r]);return C.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function rU(e){return new i1(Da(e),e)}function UO(e,t,r){t===void 0&&(t=rU);const[n,i]=C.useState(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??r)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const a=tU({callback(c){if(e)for(const u of c){const{type:d,target:h}=u;if(d==="childList"&&h instanceof HTMLElement&&h.contains(e)){o();break}}}}),s=cd({callback:o});return zn(()=>{o(),e?(s==null||s.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(s==null||s.disconnect(),a==null||a.disconnect())},[e]),n}function nU(e){const t=s1(e);return kj(e,t)}const GO=[];function iU(e){const t=C.useRef(e),r=gl(n=>e?n&&n!==GO&&e&&t.current&&e.parentNode===t.current.parentNode?n:n1(e):GO,[e]);return C.useEffect(()=>{t.current=e},[e]),r}function oU(e){const[t,r]=C.useState(null),n=C.useRef(e),i=C.useCallback(o=>{const a=Ih(o.target);a&&r(s=>s?(s.set(a,bw(a)),new Map(s)):null)},[]);return C.useEffect(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(c=>{const u=Ih(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,bw(u)]):null}).filter(c=>c!=null);r(s.length?new Map(s):null),n.current=e}return()=>{a(e),a(o)};function a(s){s.forEach(c=>{const u=Ih(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>pa(o,a),Bn):zj(e):Bn,[e,t])}function KO(e,t){t===void 0&&(t=[]);const r=C.useRef(null);return C.useEffect(()=>{r.current=null},t),C.useEffect(()=>{const n=e!==Bn;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Tu(e,r.current):Bn}function aU(e){C.useEffect(()=>{if(!ad)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function sU(e,t){return C.useMemo(()=>e.reduce((r,n)=>{let{eventName:i,handler:o}=n;return r[i]=a=>{o(a,t)},r},{}),[e,t])}function Hj(e){return C.useMemo(()=>e?kW(e):null,[e])}const YO=[];function lU(e,t){t===void 0&&(t=Da);const[r]=e,n=Hj(r?Ir(r):null),[i,o]=C.useState(YO);function a(){o(()=>e.length?e.map(c=>qj(c)?n:new i1(t(c),c)):YO)}const s=cd({callback:a});return zn(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function Vj(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vl(t)?t:e}function cU(e){let{measure:t}=e;const[r,n]=C.useState(null),i=C.useCallback(u=>{for(const{target:d}of u)if(vl(d)){n(h=>{const p=t(d);return h?{...h,width:p.width,height:p.height}:p});break}},[t]),o=cd({callback:i}),a=C.useCallback(u=>{const d=Vj(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),n(d?t(d):null)},[t,o]),[s,c]=Ru(a);return C.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const uU=[{sensor:a1,options:{}},{sensor:$j,options:{}}],dU={current:{}},su={draggable:{measure:FO},droppable:{measure:FO,strategy:tl.WhileDragging,frequency:xw.Optimized},dragOverlay:{measure:Da}};class Us extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const fU={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Us,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ku},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:su,measureDroppableContainers:ku,windowRect:null,measuringScheduled:!1},Wj={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:ku,draggableNodes:new Map,over:null,measureDroppableContainers:ku},bl=C.createContext(Wj),Uj=C.createContext(fU);function hU(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Us}}}function pU(e,t){switch(t.type){case Zt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Zt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Zt.DragEnd:case Zt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Zt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Us(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Zt.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Us(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Zt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Us(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function vU(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=C.useContext(bl),o=Nu(n),a=Nu(r==null?void 0:r.id);return C.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!ld(o)||document.activeElement===o.target)return;const s=i.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const h=sW(d);if(h){h.focus();break}}})}},[n,t,i,a,o]),null}function Gj(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function gU(e){return C.useMemo(()=>({draggable:{...su.draggable,...e==null?void 0:e.draggable},droppable:{...su.droppable,...e==null?void 0:e.droppable},dragOverlay:{...su.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function mU(e){let{activeNode:t,measure:r,initialRect:n,config:i=!0}=e;const o=C.useRef(!1),{x:a,y:s}=typeof i=="boolean"?{x:i,y:i}:i;zn(()=>{if(!a&&!s||!t){o.current=!1;return}if(o.current||!n)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=r(c),d=kj(u,n);if(a||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const h=Aj(c);h&&h.scrollBy({top:d.y,left:d.x})}},[t,a,s,n,r])}const ud=C.createContext({...Bn,scaleX:1,scaleY:1});var Wi;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Wi||(Wi={}));const bU=C.memo(function(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=!0,children:c,sensors:u=uU,collisionDetection:d=CW,measuring:h,modifiers:p,...v}=e;const x=C.useReducer(pU,void 0,hU),[g,b]=x,[w,y]=hW(),[_,E]=C.useState(Wi.Uninitialized),S=_===Wi.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:k}}=g,z=I!=null?N.get(I):null,L=C.useRef({initial:null,translated:null}),K=C.useMemo(()=>{var At;return I!=null?{id:I,data:(At=z==null?void 0:z.data)!=null?At:dU,rect:L}:null},[I,z]),G=C.useRef(null),[A,Y]=C.useState(null),[B,X]=C.useState(null),U=el(v,Object.values(v)),re=ml("DndDescribedBy",o),j=C.useMemo(()=>k.getEnabled(),[k]),W=gU(h),{droppableRects:Z,measureDroppableContainers:J,measuringScheduled:M}=QW(j,{dragging:S,dependencies:[T.x,T.y],config:W.droppable}),H=ZW(N,I),q=C.useMemo(()=>B?Pu(B):null,[B]),D=Ii(),V=eU(H,W.draggable.measure);mU({activeNode:I!=null?N.get(I):null,config:D.layoutShiftCompensation,initialRect:V,measure:W.draggable.measure});const Q=UO(H,W.draggable.measure,V),ne=UO(H?H.parentElement:null),ce=C.useRef({activatorEvent:null,active:null,activeNode:H,collisionRect:null,collisions:null,droppableRects:Z,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ee=k.getNodeFor((t=ce.current.over)==null?void 0:t.id),pe=cU({measure:W.dragOverlay.measure}),ue=(r=pe.nodeRef.current)!=null?r:H,xe=S?(n=pe.rect)!=null?n:Q:null,le=!!(pe.nodeRef.current&&pe.rect),ie=nU(le?null:Q),me=Hj(ue?Ir(ue):null),_e=iU(S?ee??H:null),Ce=lU(_e),je=Gj(p,{transform:{x:T.x-ie.x,y:T.y-ie.y,scaleX:1,scaleY:1},activatorEvent:B,active:K,activeNodeRect:Q,containerNodeRect:ne,draggingNodeRect:xe,over:ce.current.over,overlayNodeRect:pe.rect,scrollableAncestors:_e,scrollableAncestorRects:Ce,windowRect:me}),Pe=q?pa(q,T):null,Te=oU(_e),Be=KO(Te),rt=KO(Te,[Q]),$e=pa(je,Be),Ye=xe?NW(xe,je):null,qe=K&&Ye?d({active:K,collisionRect:Ye,droppableRects:Z,droppableContainers:j,pointerCoordinates:Pe}):null,Xe=SW(qe,"id"),[Ue,sr]=C.useState(null),Ut=le?je:pa(je,rt),nt=IW(Ut,(i=Ue==null?void 0:Ue.rect)!=null?i:null,Q),Ct=C.useRef(null),yr=C.useCallback((At,Tt)=>{let{sensor:St,options:lr}=Tt;if(G.current==null)return;const tr=N.get(G.current);if(!tr)return;const Dt=At.nativeEvent,rr=new St({active:G.current,activeNode:tr,event:Dt,options:lr,context:ce,onAbort(It){if(!N.get(It))return;const{onDragAbort:Bt}=U.current,wr={id:It};Bt==null||Bt(wr),w({type:"onDragAbort",event:wr})},onPending(It,Bt,wr,Ft){if(!N.get(It))return;const{onDragPending:Pr}=U.current,jt={id:It,constraint:Bt,initialCoordinates:wr,offset:Ft};Pr==null||Pr(jt),w({type:"onDragPending",event:jt})},onStart(It){const Bt=G.current;if(Bt==null)return;const wr=N.get(Bt);if(!wr)return;const{onDragStart:Ft}=U.current,Pr={activatorEvent:Dt,active:{id:Bt,data:wr.data,rect:L}};ei.unstable_batchedUpdates(()=>{Ft==null||Ft(Pr),E(Wi.Initializing),b({type:Zt.DragStart,initialCoordinates:It,active:Bt}),w({type:"onDragStart",event:Pr}),Y(Ct.current),X(Dt)})},onMove(It){b({type:Zt.DragMove,coordinates:It})},onEnd:xr(Zt.DragEnd),onCancel:xr(Zt.DragCancel)});Ct.current=rr;function xr(It){return async function(){const{active:Bt,collisions:wr,over:Ft,scrollAdjustedTranslate:Pr}=ce.current;let jt=null;if(Bt&&Pr){const{cancelDrop:kr}=U.current;jt={activatorEvent:Dt,active:Bt,collisions:wr,delta:Pr,over:Ft},It===Zt.DragEnd&&typeof kr=="function"&&await Promise.resolve(kr(jt))&&(It=Zt.DragCancel)}G.current=null,ei.unstable_batchedUpdates(()=>{b({type:It}),E(Wi.Uninitialized),sr(null),Y(null),X(null),Ct.current=null;const kr=It===Zt.DragEnd?"onDragEnd":"onDragCancel";if(jt){const Wn=U.current[kr];Wn==null||Wn(jt),w({type:kr,event:jt})}})}}},[N]),sn=C.useCallback((At,Tt)=>(St,lr)=>{const tr=St.nativeEvent,Dt=N.get(lr);if(G.current!==null||!Dt||tr.dndKit||tr.defaultPrevented)return;const rr={active:Dt};At(St,Tt.options,rr)===!0&&(tr.dndKit={capturedBy:Tt.sensor},G.current=lr,yr(St,Tt))},[N,yr]),Tr=JW(u,sn);aU(u),zn(()=>{Q&&_===Wi.Initializing&&E(Wi.Initialized)},[Q,_]),C.useEffect(()=>{const{onDragMove:At}=U.current,{active:Tt,activatorEvent:St,collisions:lr,over:tr}=ce.current;if(!Tt||!St)return;const Dt={active:Tt,activatorEvent:St,collisions:lr,delta:{x:$e.x,y:$e.y},over:tr};ei.unstable_batchedUpdates(()=>{At==null||At(Dt),w({type:"onDragMove",event:Dt})})},[$e.x,$e.y]),C.useEffect(()=>{const{active:At,activatorEvent:Tt,collisions:St,droppableContainers:lr,scrollAdjustedTranslate:tr}=ce.current;if(!At||G.current==null||!Tt||!tr)return;const{onDragOver:Dt}=U.current,rr=lr.get(Xe),xr=rr&&rr.rect.current?{id:rr.id,rect:rr.rect.current,data:rr.data,disabled:rr.disabled}:null,It={active:At,activatorEvent:Tt,collisions:St,delta:{x:tr.x,y:tr.y},over:xr};ei.unstable_batchedUpdates(()=>{sr(xr),Dt==null||Dt(It),w({type:"onDragOver",event:It})})},[Xe]),zn(()=>{ce.current={activatorEvent:B,active:K,activeNode:H,collisionRect:Ye,collisions:qe,droppableRects:Z,draggableNodes:N,draggingNode:ue,draggingNodeRect:xe,droppableContainers:k,over:Ue,scrollableAncestors:_e,scrollAdjustedTranslate:$e},L.current={initial:xe,translated:Ye}},[K,H,qe,Ye,N,ue,xe,Z,k,Ue,_e,$e]),KW({...D,delta:T,draggingRect:Ye,pointerCoordinates:Pe,scrollableAncestors:_e,scrollableAncestorRects:Ce});const pr=C.useMemo(()=>({active:K,activeNode:H,activeNodeRect:Q,activatorEvent:B,collisions:qe,containerNodeRect:ne,dragOverlay:pe,draggableNodes:N,droppableContainers:k,droppableRects:Z,over:Ue,measureDroppableContainers:J,scrollableAncestors:_e,scrollableAncestorRects:Ce,measuringConfiguration:W,measuringScheduled:M,windowRect:me}),[K,H,Q,B,qe,ne,pe,N,k,Z,Ue,J,_e,Ce,W,M,me]),Rn=C.useMemo(()=>({activatorEvent:B,activators:Tr,active:K,activeNodeRect:Q,ariaDescribedById:{draggable:re},dispatch:b,draggableNodes:N,over:Ue,measureDroppableContainers:J}),[B,Tr,K,Q,b,re,N,Ue,J]);return C.createElement(Pj.Provider,{value:y},C.createElement(bl.Provider,{value:Rn},C.createElement(Uj.Provider,{value:pr},C.createElement(ud.Provider,{value:nt},c)),C.createElement(vU,{disabled:(a==null?void 0:a.restoreFocus)===!1})),C.createElement(gW,{...a,hiddenTextDescribedById:re}));function Ii(){const At=(A==null?void 0:A.autoScrollEnabled)===!1,Tt=typeof s=="object"?s.enabled===!1:s===!1,St=S&&!At&&!Tt;return typeof s=="object"?{...s,enabled:St}:{enabled:St}}}),yU=C.createContext(null),XO="button",xU="Draggable";function wU(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=ml(xU),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:h,over:p}=C.useContext(bl),{role:v=XO,roleDescription:x="draggable",tabIndex:g=0}=i??{},b=(c==null?void 0:c.id)===t,w=C.useContext(b?ud:yU),[y,_]=Ru(),[E,S]=Ru(),I=sU(a,t),N=el(r);zn(()=>(h.set(t,{id:t,key:o,node:y,activatorNode:E,data:N}),()=>{const k=h.get(t);k&&k.key===o&&h.delete(t)}),[h,t]);const T=C.useMemo(()=>({role:v,tabIndex:g,"aria-disabled":n,"aria-pressed":b&&v===XO?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[n,v,g,b,x,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:T,isDragging:b,listeners:n?void 0:I,node:y,over:p,setNodeRef:_,setActivatorNodeRef:S,transform:w}}function Kj(){return C.useContext(Uj)}const _U="Droppable",SU={timeout:25};function EU(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=ml(_U),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=C.useContext(bl),d=C.useRef({disabled:r}),h=C.useRef(!1),p=C.useRef(null),v=C.useRef(null),{disabled:x,updateMeasurementsFor:g,timeout:b}={...SU,...i},w=el(g??n),y=C.useCallback(()=>{if(!h.current){h.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{u(Array.isArray(w.current)?w.current:[w.current]),v.current=null},b)},[b]),_=cd({callback:y,disabled:x||!a}),E=C.useCallback((T,k)=>{_&&(k&&(_.unobserve(k),h.current=!1),T&&_.observe(T))},[_]),[S,I]=Ru(E),N=el(t);return C.useEffect(()=>{!_||!S.current||(_.disconnect(),h.current=!1,_.observe(S.current))},[S,_]),C.useEffect(()=>(s({type:Zt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:S,rect:p,data:N}}),()=>s({type:Zt.UnregisterDroppable,key:o,id:n})),[n]),C.useEffect(()=>{r!==d.current.disabled&&(s({type:Zt.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:p,isOver:(c==null?void 0:c.id)===n,node:S,over:c,setNodeRef:I}}function OU(e){let{animation:t,children:r}=e;const[n,i]=C.useState(null),[o,a]=C.useState(null),s=Nu(r);return!r&&!n&&s&&i(s),zn(()=>{if(!o)return;const c=n==null?void 0:n.key,u=n==null?void 0:n.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,n,o]),C.createElement(C.Fragment,null,r,n?C.cloneElement(n,{ref:a}):null)}const CU={x:0,y:0,scaleX:1,scaleY:1};function IU(e){let{children:t}=e;return C.createElement(bl.Provider,{value:Wj},C.createElement(ud.Provider,{value:CU},t))}const RU={position:"fixed",touchAction:"none"},NU=e=>ld(e)?"transform 250ms ease":void 0,TU=C.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:d=NU}=e;if(!s)return null;const h=i?u:{...u,scaleX:1,scaleY:1},p={...RU,width:s.width,height:s.height,top:s.top,left:s.left,transform:Xi.Transform.toString(h),transformOrigin:i&&n?xW(n,s):void 0,transition:typeof d=="function"?d(n):d,...c};return C.createElement(r,{className:a,style:p,ref:t},o)}),PU=e=>t=>{let{active:r,dragOverlay:n}=t;const i={},{styles:o,className:a}=e;if(o!=null&&o.active)for(const[s,c]of Object.entries(o.active))c!==void 0&&(i[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,c));if(o!=null&&o.dragOverlay)for(const[s,c]of Object.entries(o.dragOverlay))c!==void 0&&n.node.style.setProperty(s,c);return a!=null&&a.active&&r.node.classList.add(a.active),a!=null&&a.dragOverlay&&n.node.classList.add(a.dragOverlay),function(){for(const[s,c]of Object.entries(i))r.node.style.setProperty(s,c);a!=null&&a.active&&r.node.classList.remove(a.active)}},kU=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:Xi.Transform.toString(t)},{transform:Xi.Transform.toString(r)}]},MU={duration:250,easing:"ease",keyframes:kU,sideEffects:PU({styles:{active:{opacity:"0"}}})};function AU(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return sd((o,a)=>{if(t===null)return;const s=r.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=Vj(a);if(!u)return;const{transform:d}=Ir(a).getComputedStyle(a),h=Mj(d);if(!h)return;const p=typeof t=="function"?t:DU(t);return Bj(c,i.draggable.measure),p({active:{id:o,data:s.data,node:c,rect:i.draggable.measure(c)},draggableNodes:r,dragOverlay:{node:a,rect:i.dragOverlay.measure(u)},droppableContainers:n,measuringConfiguration:i,transform:h})})}function DU(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...MU,...e};return o=>{let{active:a,dragOverlay:s,transform:c,...u}=o;if(!t)return;const d={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},h={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},p={x:c.x-d.x,y:c.y-d.y,...h},v=i({...u,active:a,dragOverlay:s,transform:{initial:c,final:p}}),[x]=v,g=v[v.length-1];if(JSON.stringify(x)===JSON.stringify(g))return;const b=n==null?void 0:n({active:a,dragOverlay:s,...u}),w=s.node.animate(v,{duration:t,easing:r,fill:"forwards"});return new Promise(y=>{w.onfinish=()=>{b==null||b(),y()}})}}let ZO=0;function jU(e){return C.useMemo(()=>{if(e!=null)return ZO++,ZO},[e])}const qU=C.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:i,transition:o,modifiers:a,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:h,activeNodeRect:p,containerNodeRect:v,draggableNodes:x,droppableContainers:g,dragOverlay:b,over:w,measuringConfiguration:y,scrollableAncestors:_,scrollableAncestorRects:E,windowRect:S}=Kj(),I=C.useContext(ud),N=jU(h==null?void 0:h.id),T=Gj(a,{activatorEvent:d,active:h,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:b.rect,over:w,overlayNodeRect:b.rect,scrollableAncestors:_,scrollableAncestorRects:E,transform:I,windowRect:S}),k=s1(p),z=AU({config:n,draggableNodes:x,droppableContainers:g,measuringConfiguration:y}),L=k?b.setRef:void 0;return C.createElement(IU,null,C.createElement(OU,{animation:z},h&&N?C.createElement(TU,{key:N,id:h.id,ref:L,as:s,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:k,style:{zIndex:u,...i},transform:T},r):null))});function l1(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function LU(e,t){return e.reduce((r,n,i)=>{const o=t.get(n);return o&&(r[i]=o),r},Array(e.length))}function Nc(e){return e!==null&&e>=0}function zU(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function BU(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Tc={scaleX:1,scaleY:1},FU=e=>{var t;let{rects:r,activeNodeRect:n,activeIndex:i,overIndex:o,index:a}=e;const s=(t=r[i])!=null?t:n;if(!s)return null;const c=$U(r,a,i);if(a===i){const u=r[o];return u?{x:i<o?u.left+u.width-(s.left+s.width):u.left-s.left,y:0,...Tc}:null}return a>i&&a<=o?{x:-s.width-c,y:0,...Tc}:a<i&&a>=o?{x:s.width+c,y:0,...Tc}:{x:0,y:0,...Tc}};function $U(e,t,r){const n=e[t],i=e[t-1],o=e[t+1];return!n||!i&&!o?0:r<t?i?n.left-(i.left+i.width):o.left-(n.left+n.width):o?o.left-(n.left+n.width):n.left-(i.left+i.width)}const Yj=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=l1(t,n,r),a=t[i],s=o[i];return!s||!a?null:{x:s.left-a.left,y:s.top-a.top,scaleX:s.width/a.width,scaleY:s.height/a.height}},Xj="Sortable",Zj=C.createContext({activeIndex:-1,containerId:Xj,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Yj,disabled:{draggable:!1,droppable:!1}});function HU(e){let{children:t,id:r,items:n,strategy:i=Yj,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:d}=Kj(),h=ml(Xj,r),p=s.rect!==null,v=C.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),x=a!=null,g=a?v.indexOf(a.id):-1,b=u?v.indexOf(u.id):-1,w=C.useRef(v),y=!zU(v,w.current),_=b!==-1&&g===-1||y,E=BU(o);zn(()=>{y&&x&&d(v)},[y,v,x,d]),C.useEffect(()=>{w.current=v},[v]);const S=C.useMemo(()=>({activeIndex:g,containerId:h,disabled:E,disableTransforms:_,items:v,overIndex:b,useDragOverlay:p,sortedRects:LU(v,c),strategy:i}),[g,h,E.draggable,E.droppable,_,v,b,c,p,i]);return C.createElement(Zj.Provider,{value:S},t)}const VU=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return l1(r,n,i).indexOf(t)},WU=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:c,transition:u}=e;return!u||!n||s!==o&&i===a?!1:r?!0:a!==i&&t===c},UU={duration:200,easing:"ease"},Jj="transform",GU=Xi.Transition.toString({property:Jj,duration:0,easing:"linear"}),KU={roleDescription:"sortable"};function YU(e){let{disabled:t,index:r,node:n,rect:i}=e;const[o,a]=C.useState(null),s=C.useRef(r);return zn(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const u=Da(n.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&a(d)}}r!==s.current&&(s.current=r)},[t,r,n,i]),C.useEffect(()=>{o&&a(null)},[o]),o}function XU(e){let{animateLayoutChanges:t=WU,attributes:r,disabled:n,data:i,getNewIndex:o=VU,id:a,strategy:s,resizeObserverConfig:c,transition:u=UU}=e;const{items:d,containerId:h,activeIndex:p,disabled:v,disableTransforms:x,sortedRects:g,overIndex:b,useDragOverlay:w,strategy:y}=C.useContext(Zj),_=ZU(n,v),E=d.indexOf(a),S=C.useMemo(()=>({sortable:{containerId:h,index:E,items:d},...i}),[h,i,E,d]),I=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:N,node:T,isOver:k,setNodeRef:z}=EU({id:a,data:S,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:L,activatorEvent:K,activeNodeRect:G,attributes:A,setNodeRef:Y,listeners:B,isDragging:X,over:U,setActivatorNodeRef:re,transform:j}=wU({id:a,data:S,attributes:{...KU,...r},disabled:_.draggable}),W=nW(z,Y),Z=!!L,J=Z&&!x&&Nc(p)&&Nc(b),M=!w&&X,H=M&&J?j:null,q=J?H??(s??y)({rects:g,activeNodeRect:G,activeIndex:p,overIndex:b,index:E}):null,D=Nc(p)&&Nc(b)?o({id:a,items:d,activeIndex:p,overIndex:b}):E,V=L==null?void 0:L.id,Q=C.useRef({activeId:V,items:d,newIndex:D,containerId:h}),ne=d!==Q.current.items,ce=t({active:L,containerId:h,isDragging:X,isSorting:Z,id:a,index:E,items:d,newIndex:Q.current.newIndex,previousItems:Q.current.items,previousContainerId:Q.current.containerId,transition:u,wasDragging:Q.current.activeId!=null}),ee=YU({disabled:!ce,index:E,node:T,rect:N});return C.useEffect(()=>{Z&&Q.current.newIndex!==D&&(Q.current.newIndex=D),h!==Q.current.containerId&&(Q.current.containerId=h),d!==Q.current.items&&(Q.current.items=d)},[Z,D,h,d]),C.useEffect(()=>{if(V===Q.current.activeId)return;if(V!=null&&Q.current.activeId==null){Q.current.activeId=V;return}const ue=setTimeout(()=>{Q.current.activeId=V},50);return()=>clearTimeout(ue)},[V]),{active:L,activeIndex:p,attributes:A,data:S,rect:N,index:E,newIndex:D,items:d,isOver:k,isSorting:Z,isDragging:X,listeners:B,node:T,overIndex:b,over:U,setNodeRef:W,setActivatorNodeRef:re,setDroppableNodeRef:z,setDraggableNodeRef:Y,transform:ee??q,transition:pe()};function pe(){if(ee||ne&&Q.current.newIndex===E)return GU;if(!(M&&!ld(K)||!u)&&(Z||ce))return Xi.Transition.toString({...u,property:Jj})}}function ZU(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}ot.Down,ot.Right,ot.Up,ot.Left;const JU=e=>{let{transform:t}=e;return{...t,y:0}};function QU(e,t,r){const n={...e};return t.top+e.y<=r.top?n.y=r.top-t.top:t.bottom+e.y>=r.top+r.height&&(n.y=r.top+r.height-t.bottom),t.left+e.x<=r.left?n.x=r.left-t.left:t.right+e.x>=r.left+r.width&&(n.x=r.left+r.width-t.right),n}const eG=e=>{let{draggingNodeRect:t,transform:r,scrollableAncestorRects:n}=e;const i=n[0];return!t||!i?r:QU(r,t,i)},JO=({tab:e,value:t,isActive:r,onTabClick:n,dragOverlay:i=!1})=>{const o=e,a=o.onClose,s=o.renderTab,{attributes:c,listeners:u,setNodeRef:d,transform:h,transition:p,isDragging:v}=XU({id:t}),x={transform:Xi.Transform.toString(h),transition:p||"transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",opacity:v&&!i?.5:1,cursor:"pointer"},g=()=>{n(t)},b=w=>{w==null||w.stopPropagation(),a&&a(t)};return s?O.jsx("div",{ref:d,style:x,...c,...u,className:"flex h-full shrink-0 select-none focus:outline-hidden","aria-roledescription":"sortable",children:s({tab:e,isActive:r,onClick:g,onClose:a?b:void 0})}):null},Qj={sm:{padding:"px-4 py-0.5",text:"text-xxs",icon:"w-3 h-3",gap:"gap-0.5",badge:"min-w-3.5 h-3.5 text-2"},md:{padding:"px-6 py-1",text:"text-s",icon:"w-4 h-4",gap:"gap-1",badge:"min-w-4.5 h-4.5 text-xxs"},lg:{padding:"px-8 py-1.5",text:"text-base",icon:"w-5 h-5",gap:"gap-1.5",badge:"min-w-5 h-5 text-xs"}},tG={primary:{active:{bg:"bg-primary",text:"text-button-text",border:"border-primary"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-primary-hover",text:"hover:text-button-text"}},positive:{active:{bg:"bg-positive",text:"text-button-text",border:"border-positive"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-positive-hover",text:"hover:text-body"}},warning:{active:{bg:"bg-warning",text:"text-warning-text",border:"border-warning"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-warning-hover",text:"hover:text-body"}},negative:{active:{bg:"bg-negative",text:"text-button-text",border:"border-negative"},inactive:{bg:"bg-input-bg",text:"text-inactive-text",border:"border-transparent"},hover:{bg:"hover:bg-negative-hover",text:"hover:text-body"}}},QO=()=>be("inline-flex items-center rounded overflow-hidden"),e3=(e,t,r,n)=>{const i=tG[e],o=Qj[t],a="relative inline-flex items-center font-medium cursor-pointer transition-all duration-200";return n?be(a,o.padding,o.text,o.gap,"pointer-events-none cursor-not-allowed opacity-50","bg-card","text-inactive-text"):r?be(a,o.padding,o.text,o.gap,i.active.bg,i.active.text,"shadow-xs"):be(a,o.padding,o.text,o.gap,i.inactive.bg,i.inactive.text,i.hover.bg,i.hover.text)},t3=(e,t)=>be("flex items-center justify-center",Qj[e].icon,{"opacity-50":t}),r3=()=>be("whitespace-nowrap"),Th=()=>be("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),n3=(e,t)=>{const r=be("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?be(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?be(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):be(r,"border border-transparent bg-tab-inactive-bg text-tab-inactive-fg","hover:text-tab-active-fg")},ww=C.createContext(void 0),i3=C.forwardRef(({value:e,label:t,icon:r,disabled:n,children:i,className:o,onClick:a,active:s,onClose:c,closable:u,touched:d,content:h,renderTab:p,...v},x)=>{const g=C.useContext(ww);if(!g)return null;const{activeTab:b,onTabChange:w,variant:y,color:_,size:E,showIcons:S,disabled:I}=g,N=s!==void 0?s:b===e,T=n||I,k=z=>{T||(w(e),a==null||a(z))};return y==="file"?O.jsx("div",{"data-qui":"FileTabItem",className:be(n3(N,!1),"cursor-pointer",o),onClick:z=>!T&&k(z),children:i||O.jsx(O.Fragment,{children:O.jsxs("span",{className:"flex items-center gap-2",children:[r,O.jsx("span",{children:t})]})})}):O.jsxs("button",{ref:x,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":N,"aria-disabled":T,className:be(e3(_,E,N,T||!1),o),onClick:k,disabled:T,...v,children:[S&&r&&O.jsx("span",{className:t3(E,T||!1),children:r}),O.jsx("span",{className:r3(),children:i||t})]})});i3.displayName="TabItem";const rG=({tab:e,value:t,label:r,isActive:n,color:i="primary",size:o="md",showIcons:a,onTabClick:s})=>{const c=e,u=c.icon,d=c.disabled??!1,h=c.onClose,p=c.renderTab,v=()=>{d||s(t)},x=g=>{g==null||g.stopPropagation(),!d&&h&&h(t)};return p?O.jsx(O.Fragment,{children:p({tab:e,isActive:n,onClick:v,onClose:h?x:void 0})}):O.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":d,className:e3(i,o,n,d),onClick:v,disabled:d,children:[a&&u&&O.jsx("span",{className:t3(o,d),children:u}),O.jsx("span",{className:r3(),children:r})]})},nG=({tab:e,value:t,isActive:r,onTabClick:n})=>{const i=e,o=i.onClose,a=i.renderTab,s=()=>{n(t)},c=u=>{u==null||u.stopPropagation(),o&&o(t)};return a?O.jsx("div",{"data-qui":"FileTabItem",className:"flex h-full shrink-0 select-none focus:outline-hidden",children:a({tab:e,isActive:r,onClick:s,onClose:o?c:void 0})}):null},iG=[],c1=({tabs:e=iG,valueKey:t="value",labelKey:r="label",activeTab:n,defaultValue:i,variant:o="default",color:a="primary",size:s="md",draggable:c=!1,showIcons:u=!0,disabled:d=!1,className:h,tabListClassName:p,onTabChange:v,onReorder:x,renderTab:g,children:b})=>{const w=U=>{const re=U[t]??U.value??U.key;return re!==void 0?String(re):""},y=U=>U[r]??U.label,_=i||(e[0]?w(e[0]):""),[E,S]=C.useState(_),[I,N]=C.useState(null),[T,k]=C.useState(e),z=n!==void 0?n:E,L=T,K=bW(mW(a1,{activationConstraint:{distance:10}})),G=U=>{n===void 0&&S(U),v==null||v(U)},A=U=>L.findIndex(re=>w(re)===U),Y=I?A(I):-1;C.useEffect(()=>{k(e)},[e]);const B={activeTab:z,onTabChange:G,variant:o,color:a,size:s,showIcons:u,disabled:d};if(b)return O.jsxs(ww.Provider,{value:B,children:[O.jsx("div",{"data-qui":"Tabs",role:"tablist",className:be(o==="file"?Th():QO(),h,p),children:b}),o==="file"&&O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const X=o==="file"&&c?O.jsxs("div",{className:"relative h-full w-full",children:[O.jsxs(bU,{collisionDetection:EW,modifiers:[JU,eG],sensors:K,onDragStart:({active:U})=>{U&&N(U.id)},onDragEnd:({over:U})=>{if(N(null),U){const re=A(U.id);if(Y!==re&&Y!==-1){const j=l1(L,Y,re);k(j),x&&x(j,j[re]),G(w(j[re]))}}},onDragCancel:()=>{N(null)},children:[O.jsx(HU,{items:L.map(U=>w(U)),strategy:FU,children:O.jsx("div",{role:"tablist",className:be(Th(),p),children:L.map(U=>{const re=w(U);return O.jsx(JO,{value:re,tab:{...U,renderTab:U.renderTab||g},isActive:z===re,onTabClick:G,className:h},re)})})}),O.jsx(qU,{children:I&&Y!==-1?O.jsx(JO,{value:w(L[Y]),tab:{...L[Y],renderTab:L[Y].renderTab||g},isActive:z===w(L[Y]),onTabClick:G,dragOverlay:!0,className:h}):null})]}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):o==="file"?O.jsxs("div",{className:"relative",children:[O.jsx("div",{role:"tablist",className:be(Th(),p),children:e.map(U=>{const re=w(U);return O.jsx(nG,{value:re,tab:{...U,renderTab:U.renderTab||g},isActive:z===re,onTabClick:G},re)})}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):O.jsx("div",{role:"tablist",className:be(QO(),p),children:e.map(U=>{const re=w(U);return O.jsx(rG,{value:re,label:y(U),tab:{...U,renderTab:U.renderTab||g},isActive:z===re,color:a,size:s,showIcons:u,onTabClick:G},re)})});return O.jsx(ww.Provider,{value:B,children:O.jsx("div",{"data-qui":"Tabs",className:h,children:X})})},oG=C.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},i)=>O.jsx("div",{"data-qui":"TabNavContainer",className:n3(e,t),ref:i,...n,children:r}));oG.displayName="TabNavContainer";c1.displayName="Tabs";c1.Item=i3;const Ph=c1;var Ht=function(){return Ht=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ht.apply(this,arguments)},eC={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},tC={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Pc={width:"20px",height:"20px",position:"absolute",zIndex:1},aG={top:Ht(Ht({},eC),{top:"-5px"}),right:Ht(Ht({},tC),{left:void 0,right:"-5px"}),bottom:Ht(Ht({},eC),{top:void 0,bottom:"-5px"}),left:Ht(Ht({},tC),{left:"-5px"}),topRight:Ht(Ht({},Pc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ht(Ht({},Pc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ht(Ht({},Pc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ht(Ht({},Pc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},sG=C.memo(function(e){var t=e.onResizeStart,r=e.direction,n=e.children,i=e.replaceStyles,o=e.className,a=C.useCallback(function(u){t(u,r)},[t,r]),s=C.useCallback(function(u){t(u,r)},[t,r]),c=C.useMemo(function(){return Ht(Ht({position:"absolute",userSelect:"none"},aG[r]),i??{})},[i,r]);return O.jsx("div",{className:o||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),lG=(function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Jn=function(){return Jn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Jn.apply(this,arguments)},cG={width:"auto",height:"auto"},kc=function(e,t,r){return Math.max(Math.min(e,r),t)},rC=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},ta=function(e,t){return new RegExp(e,"i").test(t)},Mc=function(e){return!!(e.touches&&e.touches.length)},uG=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},nC=function(e,t,r){r===void 0&&(r=0);var n=t.reduce(function(o,a,s){return Math.abs(a-e)<Math.abs(t[o]-e)?s:o},0),i=Math.abs(t[n]-e);return r===0||i<r?t[n]:e},kh=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},Ac=function(e,t,r,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return r*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return n*i}}return e},dG=function(e,t,r,n,i,o,a){return n=Ac(n,e.width,t,r),i=Ac(i,e.height,t,r),o=Ac(o,e.width,t,r),a=Ac(a,e.height,t,r),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},fG=function(e){return Array.isArray(e)?e:[e,e]},hG=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],iC="__resizable_base__",pG=(function(e){lG(t,e);function t(r){var n,i,o,a,s=e.call(this,r)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var c=s.parentNode;if(!c)return null;var u=s.window.document.createElement("div");return u.style.width="100%",u.style.height="100%",u.style.position="absolute",u.style.transform="scale(0, 0)",u.style.left="0",u.style.flex="0 0 100%",u.classList?u.classList.add(iC):u.className+=iC,c.appendChild(u),u},s.removeBase=function(c){var u=s.parentNode;u&&u.removeChild(c)},s.state={isResizing:!1,width:(i=(n=s.propsSize)===null||n===void 0?void 0:n.width)!==null&&i!==void 0?i:"auto",height:(a=(o=s.propsSize)===null||o===void 0?void 0:o.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||cG},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var r=0,n=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),r=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:r,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var r=this,n=this.props.size,i=function(s){var c;if(typeof r.state[s]>"u"||r.state[s]==="auto")return"auto";if(r.propsSize&&r.propsSize[s]&&!((c=r.propsSize[s])===null||c===void 0)&&c.toString().endsWith("%")){if(r.state[s].toString().endsWith("%"))return r.state[s].toString();var u=r.getParentSize(),d=Number(r.state[s].toString().replace("px","")),h=d/u[s]*100;return"".concat(h,"%")}return kh(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?kh(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?kh(n.height):i("height");return{width:o,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var r=this.appendBase();if(!r)return{width:0,height:0};var n=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),r.style.position="relative",r.style.minWidth="100%",r.style.minHeight="100%";var o={width:r.offsetWidth,height:r.offsetHeight};return n&&(this.parentNode.style.flexWrap=i),this.removeBase(r),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var r=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:r.flexBasis!=="auto"?r.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(r,n){var i=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===r&&(typeof i>"u"||i==="auto")?"auto":r},t.prototype.calculateNewMaxFromBoundary=function(r,n){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&ta("left",o),s=i&&ta("top",o),c,u;if(this.props.bounds==="parent"){var d=this.parentNode;d&&(c=a?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(c=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),u=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(r=r&&r<c?r:c),u&&Number.isFinite(u)&&(n=n&&n<u?n:u),{maxWidth:r,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(r,n){var i=this.props.scale||1,o=fG(this.props.resizeRatio||1),a=o[0],s=o[1],c=this.state,u=c.direction,d=c.original,h=this.props,p=h.lockAspectRatio,v=h.lockAspectRatioExtraHeight,x=h.lockAspectRatioExtraWidth,g=d.width,b=d.height,w=v||0,y=x||0;return ta("right",u)&&(g=d.width+(r-d.x)*a/i,p&&(b=(g-y)/this.ratio+w)),ta("left",u)&&(g=d.width-(r-d.x)*a/i,p&&(b=(g-y)/this.ratio+w)),ta("bottom",u)&&(b=d.height+(n-d.y)*s/i,p&&(g=(b-w)*this.ratio+y)),ta("top",u)&&(b=d.height-(n-d.y)*s/i,p&&(g=(b-w)*this.ratio+y)),{newWidth:g,newHeight:b}},t.prototype.calculateNewSizeFromAspectRatio=function(r,n,i,o){var a=this.props,s=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,u=a.lockAspectRatioExtraWidth,d=typeof o.width>"u"?10:o.width,h=typeof i.width>"u"||i.width<0?r:i.width,p=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?n:i.height,x=c||0,g=u||0;if(s){var b=(p-x)*this.ratio+g,w=(v-x)*this.ratio+g,y=(d-g)/this.ratio+x,_=(h-g)/this.ratio+x,E=Math.max(d,b),S=Math.min(h,w),I=Math.max(p,y),N=Math.min(v,_);r=kc(r,E,S),n=kc(n,I,N)}else r=kc(r,d,h),n=kc(n,p,v);return{newWidth:r,newHeight:n}},t.prototype.setBoundingClientRect=function(){var r=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var i=n.getBoundingClientRect();this.parentLeft=i.left*r,this.parentTop=i.top*r}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*r,this.targetTop=o.top*r}if(this.resizable){var a=this.resizable.getBoundingClientRect(),s=a.left,c=a.top,u=a.right,d=a.bottom;this.resizableLeft=s*r,this.resizableRight=u*r,this.resizableTop=c*r,this.resizableBottom=d*r}},t.prototype.onResizeStart=function(r,n){if(!(!this.resizable||!this.window)){var i=0,o=0;if(r.nativeEvent&&uG(r.nativeEvent)?(i=r.nativeEvent.clientX,o=r.nativeEvent.clientY):r.nativeEvent&&Mc(r.nativeEvent)&&(i=r.nativeEvent.touches[0].clientX,o=r.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(r,n,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,c=this.window.getComputedStyle(this.resizable);if(c.flexBasis!=="auto"){var u=this.parentNode;if(u){var d=this.window.getComputedStyle(u).flexDirection;this.flexDir=d.startsWith("row")?"row":"column",s=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Jn(Jn({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(r.target).cursor||"auto"}),direction:n,flexBasis:s};this.setState(h)}},t.prototype.onMouseMove=function(r){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Mc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,c=i.minHeight,u=Mc(r)?r.touches[0].clientX:r.clientX,d=Mc(r)?r.touches[0].clientY:r.clientY,h=this.state,p=h.direction,v=h.original,x=h.width,g=h.height,b=this.getParentSize(),w=dG(b,this.window.innerWidth,this.window.innerHeight,o,a,s,c);o=w.maxWidth,a=w.maxHeight,s=w.minWidth,c=w.minHeight;var y=this.calculateNewSizeFromDirection(u,d),_=y.newHeight,E=y.newWidth,S=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(E=nC(E,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=nC(_,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(E,_,{width:S.maxWidth,height:S.maxHeight},{width:s,height:c});if(E=I.newWidth,_=I.newHeight,this.props.grid){var N=rC(E,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=rC(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),k=this.props.snapGap||0,z=k===0||Math.abs(N-E)<=k?N:E,L=k===0||Math.abs(T-_)<=k?T:_;E=z,_=L}var K={width:E-v.width,height:_-v.height};if(this.delta=K,x&&typeof x=="string"){if(x.endsWith("%")){var G=E/b.width*100;E="".concat(G,"%")}else if(x.endsWith("vw")){var A=E/this.window.innerWidth*100;E="".concat(A,"vw")}else if(x.endsWith("vh")){var Y=E/this.window.innerHeight*100;E="".concat(Y,"vh")}}if(g&&typeof g=="string"){if(g.endsWith("%")){var G=_/b.height*100;_="".concat(G,"%")}else if(g.endsWith("vw")){var A=_/this.window.innerWidth*100;_="".concat(A,"vw")}else if(g.endsWith("vh")){var Y=_/this.window.innerHeight*100;_="".concat(Y,"vh")}}var B={width:this.createSizeForCssProperty(E,"width"),height:this.createSizeForCssProperty(_,"height")};this.flexDir==="row"?B.flexBasis=B.width:this.flexDir==="column"&&(B.flexBasis=B.height);var X=this.state.width!==B.width,U=this.state.height!==B.height,re=this.state.flexBasis!==B.flexBasis,j=X||U||re;j&&ei.flushSync(function(){n.setState(B)}),this.props.onResize&&j&&this.props.onResize(r,p,this.resizable,K)}},t.prototype.onMouseUp=function(r){var n,i,o=this.state,a=o.isResizing,s=o.direction;o.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(r,s,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(i=this.props.size.height)!==null&&i!==void 0?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Jn(Jn({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(r){var n,i;this.setState({width:(n=r.width)!==null&&n!==void 0?n:"auto",height:(i=r.height)!==null&&i!==void 0?i:"auto"})},t.prototype.renderResizer=function(){var r=this,n=this.props,i=n.enable,o=n.handleStyles,a=n.handleClasses,s=n.handleWrapperStyle,c=n.handleWrapperClass,u=n.handleComponent;if(!i)return null;var d=Object.keys(i).map(function(h){return i[h]!==!1?O.jsx(sG,{direction:h,onResizeStart:r.onResizeStart,replaceStyles:o&&o[h],className:a&&a[h],children:u&&u[h]?u[h]:null},h):null});return O.jsx("div",{className:c,style:s,children:d})},t.prototype.render=function(){var r=this,n=Object.keys(this.props).reduce(function(a,s){return hG.indexOf(s)!==-1||(a[s]=r.props[s]),a},{}),i=Jn(Jn(Jn({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return O.jsxs(o,Jn({style:i,className:this.props.className},n,{ref:function(a){a&&(r.resizable=a)},children:[this.state.isResizing&&O.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(C.PureComponent);const vG={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4",5:"bg-panel-5"},gG={tabs:"border-tab-border",primary:"border-primary",negative:"border-input-error-border",positive:"border-positive",light:"border-panel-border-subtle",default:"border-panel-border"},o3=({depth:e=0,className:t,borderType:r,disabled:n})=>be("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?gG[r]:"border-panel-border",vG[e],t),mG=e=>{if(!e)return{};const t={},r=e.match(/min-w-\[(\d+)px\]/);r&&(t.minWidth=parseInt(r[1],10));const n=e.match(/max-w-\[(\d+)px\]/);n&&(t.maxWidth=parseInt(n[1],10));const i=e.match(/min-h-\[(\d+)px\]/);i&&(t.minHeight=parseInt(i[1],10));const o=e.match(/max-h-\[(\d+)px\]/);return o&&(t.maxHeight=parseInt(o[1],10)),t},bG=C.forwardRef(({children:e,width:t,height:r,minWidth:n=10,minHeight:i=10,maxWidth:o,maxHeight:a,defaultWidth:s,defaultHeight:c,defaultSize:u,size:d,grid:h,snap:p,lockAspectRatio:v=!1,enable:x,handleStyles:g={},handleClasses:b={},handleComponent:w={},style:y={},className:_,onResizeStart:E,onResize:S,onResizeStop:I,scale:N=1,bounds:T,snapGap:k,as:z="div",depth:L,disabled:K},G)=>{const A=o3({depth:L,className:_,disabled:K}),Y=mG(_),B=d?{size:d}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},X=u?{defaultSize:u}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},U=C.useRef(null);return C.useImperativeHandle(G,()=>{var re;return(re=U.current)==null?void 0:re.resizable}),O.jsx(pG,{"data-qui":"Resizable",ref:U,...B,...X,minWidth:n??Y.minWidth,minHeight:i??Y.minHeight,maxWidth:o??Y.maxWidth,maxHeight:a??Y.maxHeight,grid:h,snap:p,lockAspectRatio:v,enable:x,handleStyles:g,handleClasses:b,handleComponent:w,style:y,className:be("relative box-border",A),onResizeStart:E,onResize:S,onResizeStop:I,scale:N,bounds:T,snapGap:k,as:z,children:e})});bG.displayName="Resizable";const ra={sm:{track:"h-4 w-7",thumb:"size-3",thumbUnchecked:"left-0.5",thumbChecked:"left-3.5",label:"text-xs",gap:"gap-2"},md:{track:"h-5 w-9",thumb:"size-4",thumbUnchecked:"left-0.5",thumbChecked:"left-4.5",label:"text-sm",gap:"gap-2.5"},lg:{track:"h-6 w-11",thumb:"size-5",thumbUnchecked:"left-0.5",thumbChecked:"left-5.5",label:"text-base",gap:"gap-3"}},Dc={primary:{bg:"bg-primary",thumb:"group-hover:bg-primary-light",icon:"text-primary"},positive:{bg:"bg-positive",thumb:"group-hover:bg-positive-light",icon:"text-positive"},warning:{bg:"bg-warning",thumb:"group-hover:bg-warning-light",icon:"text-warning"},negative:{bg:"bg-negative",thumb:"group-hover:bg-negative-light",icon:"text-negative"}},yG=(e,t,r,n,i,o)=>({container:be("inline-flex items-center",ra[e].gap,o),track:be("relative inline-flex items-center shrink-0 group","transition-colors duration-200 ease-in-out","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2","border border-input-border rounded-full justify-between",ra[e].track,{[Dc[t].bg]:r&&!n&&!i,"bg-input-bg":!r&&!n||i,"bg-panel cursor-not-allowed":n,"cursor-pointer":!n}),thumb:be("bg-input-text pointer-events-none inline-flex items-center justify-center shadow-xs","transition-all duration-200 ease-in-out","rounded-full absolute",ra[e].thumb,r?ra[e].thumbChecked:ra[e].thumbUnchecked,{[Dc[t].thumb]:!n,"bg-canvas-subtle":n}),iconLeft:be("flex items-center justify-center z-10 w-1/2 p-0.5",{[Dc[t].icon]:!r&&!n,"text-panel-subtle":n||r}),iconRight:be("flex items-center justify-center z-10 w-1/2 p-0.5",{[Dc[t].icon]:r&&!n,"text-panel-subtle":n||!r}),label:be("font-medium text-body",ra[e].label,{"cursor-pointer":!n,"cursor-not-allowed text-muted":n})}),Au=C.forwardRef(({label:e,checked:t,defaultChecked:r=!1,disabled:n=!1,size:i="md",color:o="primary",icons:a,onChange:s,className:c,id:u,name:d,...h},p)=>{const[v,x]=C.useState(r),g=t!==void 0,b=g?t:v,w=()=>{const _=!b;g||x(_),s==null||s(_)},y=yG(i,o,b,n,!!a,c);return O.jsxs("div",{"data-qui":"Toggle",className:y.container,children:[e&&O.jsx("label",{htmlFor:u,className:y.label,children:e}),O.jsxs("button",{ref:p,...h,type:"button",role:"switch","aria-checked":b,"aria-label":e,disabled:n,onClick:w,name:d,id:u,className:y.track,children:[a&&O.jsx("span",{className:y.iconLeft,children:a.unchecked}),O.jsx("span",{className:y.thumb,"aria-hidden":"true"}),a&&O.jsx("span",{className:y.iconRight,children:a.checked})]})]})});Au.displayName="Toggle";C.createContext(null);const mr=C.forwardRef(({depth:e=0,className:t,children:r,borderType:n,disabled:i,...o},a)=>{const s=o3({depth:e,className:t,borderType:n,disabled:i});return O.jsx("div",{"data-qui":"Panel",ref:a,className:s,"aria-disabled":i,...o,children:r})});mr.displayName="Panel";const rl={sm:{container:"h-5 px-0.5 gap-1 rounded",text:"text-xxs leading-3",icon:"text-s",iconButton:"text-s p-0.5 cursor-pointer"},md:{container:"h-5.5 px-1 gap-1 rounded",text:"text-xs leading-4",icon:"text-sm",iconButton:" text-sm p-0.5 cursor-pointer"},lg:{container:"h-6 px-1.5 gap-1.5 rounded",text:"text-s leading-none",icon:"text-base",iconButton:"text-base p-0.5 cursor-pointer"}},lu={primary:{bg:"bg-primary",text:"text-button-text",border:"border-primary",buttonHover:"hover:bg-primary-hover"},white:{bg:"bg-canvas-default",text:"text-primary",border:"border-canvas-default",buttonHover:"hover:bg-primary-hover hover:text-button-text"},positive:{bg:"bg-positive",text:"text-button-text",border:"border-positive",buttonHover:"hover:bg-positive-hover"},warning:{bg:"bg-warning",text:"text-button-text",border:"border-warning",buttonHover:"hover:bg-warning-hover"},negative:{bg:"bg-negative",text:"text-button-text",border:"border-negative",buttonHover:"hover:bg-negative-hover"},dark:{bg:"bg-input-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-primary-hover hover:text-button-text"}},xG=(e,t,r,n)=>be("inline-flex items-center justify-center font-medium border",rl[e].container,lu[t].bg,lu[t].text,lu[t].border,rl[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),wG=(e,t,r)=>be({[rl[e].icon]:!r,"bg-canvas-default outline-canvas-default text-primary":r&&t!=="white"||r,"bg-primary outline-primary text-button-text":r&&t==="white"&&!r,"outline-solid outline-1 h-full py-0.5 grid place-items-center -my-1 only:-mx-0.5 first:-ml-1.5 last:-mr-1.5 only:rounded first:rounded-l last:rounded-r":r||r}),_G=e=>be(rl[e].text),a3=(e,t,r)=>be("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",rl[e].iconButton,lu[t].buttonHover,{"pointer-events-none":r}),s3=C.createContext(null),dd=()=>{const e=C.useContext(s3);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},u1=C.forwardRef(({size:e="md",color:t="primary",className:r,children:n,disabled:i=!1,onClick:o,...a},s)=>{const c={size:e,color:t,disabled:i},u=!!o;return O.jsx(s3.Provider,{value:c,children:O.jsx("div",{"data-qui":"Pill",ref:s,onClick:o,className:be(xG(e,t,i,u),r),...a,children:n})})});u1.displayName="Pill.Root";const d1=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i}=dd();return O.jsx("span",{ref:n,className:be(_G(i),e),...r,children:t})});d1.displayName="Pill.Text";const f1=C.forwardRef(({className:e,children:t,label:r,position:n,...i},o)=>{const{size:a,color:s,disabled:c}=dd(),u=!!r,d=O.jsx("span",{ref:o,className:be(wG(a,s,u),e,{"opacity-60":c}),...i,children:t});return u&&!c?O.jsx(zr,{label:r||"",position:n||"up",children:d}):d});f1.displayName="Pill.Icon";const l3=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,disabled:a}=dd();return O.jsx("button",{ref:n,type:"button",disabled:a,className:be(a3(i,o,a),e),...r,children:t})});l3.displayName="Pill.Button";const h1=C.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...i},o)=>{const{size:a,color:s,disabled:c}=dd();return O.jsx("button",{ref:o,type:"button",disabled:c,className:be(a3(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||O.jsx(id,{})})});h1.displayName="Pill.Close";const c3=C.forwardRef(({size:e="md",color:t="primary",label:r,icon:n,onClose:i,closable:o=!1,className:a,children:s,disabled:c=!1,...u},d)=>O.jsxs(u1,{ref:d,size:e,color:t,className:a,disabled:c,...u,children:[n&&O.jsx(f1,{children:n}),s||r&&O.jsx(d1,{children:r}),o&&O.jsx(h1,{onClose:i})]}));c3.displayName="Pill";const cu=Object.assign(c3,{Root:u1,Text:d1,Icon:f1,Button:l3,Close:h1});function na(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var s,c,u;let d;r.key&&(s=r.debug)!=null&&s.call(r)&&(d=Date.now());const h=e();if(!(h.length!==n.length||h.some((v,x)=>n[x]!==v)))return i;n=h;let p;if(r.key&&(c=r.debug)!=null&&c.call(r)&&(p=Date.now()),i=t(...h),r.key&&(u=r.debug)!=null&&u.call(r)){const v=Math.round((Date.now()-d)*100)/100,x=Math.round((Date.now()-p)*100)/100,g=x/16,b=(w,y)=>{for(w=String(w);w.length<y;)w=" "+w;return w};console.info(`%c⏱ ${b(x,5)} /${b(v,5)} ms`,`
19
+ font-size: .6rem;
20
+ font-weight: bold;
21
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=s=>{n=s},a}function oC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const SG=(e,t)=>Math.abs(e-t)<1.01,EG=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},aC=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},OG=e=>e,CG=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},IG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:s,height:c}=a;t({width:Math.round(s),height:Math.round(c)})};if(i(aC(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const s=()=>{const c=a[0];if(c!=null&&c.borderBoxSize){const u=c.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(aC(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},sC={passive:!0},lC=typeof window>"u"?!0:"onscrollend"in window,RG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&lC?()=>{}:EG(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=d=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,d)},s=a(!0),c=a(!1);r.addEventListener("scroll",s,sC);const u=e.options.useScrollendEvent&&lC;return u&&r.addEventListener("scrollend",c,sC),()=>{r.removeEventListener("scroll",s),u&&r.removeEventListener("scrollend",c)}},NG=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},TG=(e,{adjustments:t=0,behavior:r},n)=>{var i,o;const a=e+t;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:r})};class PG{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null;const n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const s=o.target,c=this.indexFromElement(s);if(!s.isConnected){this.observer.unobserve(s);return}this.shouldMeasureDuringScroll(c)&&this.resizeItem(c,this.options.measureElement(s,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:OG,rangeExtractor:CG,onChange:()=>{},measureElement:NG,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r)},this.maybeNotify=na(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const s=r[a];if(i.has(s.lane))continue;const c=o.get(s.lane);if(c==null||s.end>c.end?o.set(s.lane,s):s.end<c.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,s)=>a.end===s.end?a.index-s.index:a.end-s.end)[0]:void 0},this.getMeasurementOptions=na(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s}),{key:!1}),this.getMeasurements=na(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:s},c)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,u),h=new Array(s).fill(void 0);for(let p=0;p<u;p++){const v=d[p];v&&(h[v.lane]=p)}for(let p=u;p<r;p++){const v=o(p),x=this.laneAssignments.get(p);let g,b;if(x!==void 0&&this.options.lanes>1){g=x;const E=h[g],S=E!==void 0?d[E]:void 0;b=S?S.end+this.options.gap:n+i}else{const E=this.options.lanes===1?d[p-1]:this.getFurthestMeasurement(d,p);b=E?E.end+this.options.gap:n+i,g=E?E.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,g)}const w=c.get(v),y=typeof w=="number"?w:this.options.estimateSize(p),_=b+y;d[p]={index:p,start:b,size:y,end:_,key:v,lane:g},h[g]=p}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=na(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?kG({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=na(()=>{let r=null,n=null;const i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,o,a)=>o===null||a===null?[]:r({startIndex:o,endIndex:a,overscan:n,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),s=Math.min(this.options.count-1,i+o);return r>=a&&r<=s}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,s)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(s))});return}const n=this.indexFromElement(r),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this))},this.resizeItem=(r,n)=>{var i;const o=this.measurementsCache[r];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,s=n-a;s!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",s),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=na(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const s=r[o],c=n[s];i.push(c)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const n=this.getMeasurements();if(n.length!==0)return oC(n[u3(0,n.length-1,i=>oC(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=r>=a+o?"end":"start"),n==="center"?r+=(i-o)/2:n==="end"&&(r-=o);const s=this.getMaxScrollOffset();return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[r];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];const s=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,n,a.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(r,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));const o=this.getOffsetForIndex(r,n);if(!o)return;const[a,s]=o,c=this.now();this.scrollState={index:r,align:s,behavior:i,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+r,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(s=>s===null);){const s=n[a];o[s.lane]===null&&(o[s.lane]=s.end),a--}i=Math.max(...o.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const t=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,r=t?t[0]:this.scrollState.lastTargetOffset,n=1,i=r!==this.scrollState.lastTargetOffset;if(!i&&SG(r,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=n){this.scrollState=null;return}}else this.scrollState.stableFrames=0,i&&(this.scrollState.lastTargetOffset=r,this.scrollState.behavior="auto",this._scrollToOffset(r,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const u3=(e,t,r,n)=>{for(;e<=t;){const i=(e+t)/2|0,o=r(i);if(o<n)e=i+1;else if(o>n)t=i-1;else return i}return e>0?e-1:0};function kG({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=c=>e[c].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=u3(0,i,o,r),s=a;if(n===1)for(;s<i&&e[s].end<r+t;)s++;else if(n>1){const c=Array(n).fill(0);for(;s<i&&c.some(d=>d<r+t);){const d=e[s];c[d.lane]=d.end,s++}const u=Array(n).fill(r+t);for(;a>=0&&u.some(d=>d>=r);){const d=e[a];u[d.lane]=d.start,a--}a=Math.max(0,a-a%n),s=Math.min(i,s+(n-1-s%n))}return{startIndex:a,endIndex:s}}const cC=typeof document<"u"?vt.useLayoutEffect:vt.useEffect;function MG({useFlushSync:e=!0,...t}){const r=vt.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?ei.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=vt.useState(()=>new PG(n));return i.setOptions(n),cC(()=>i._didMount(),[]),cC(()=>i._willUpdate()),i}function AG(e){return MG({observeElementRect:IG,observeElementOffset:RG,scrollToFn:TG,...e})}const d3=C.createContext(null),ar=()=>{const e=C.useContext(d3);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},Qt={sm:{trigger:"h-5 min-h-fit",control:"min-h-5 p-0.5 gap-1",input:"text-xs h-3.5",placeholder:"placeholder:text-xs text-xs",singleValue:"text-xs",multiValue:"h-3.5 px-0.5 gap-1 text-xxs",multiValueLabel:"text-xxs",multiValueRemove:"w-3 h-3",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-3",dropdownIndicator:"p-0.5 size-3",indicatorSeparator:"h-3",loadingIndicator:"w-3 h-3",menu:"m-0",menuList:"py-1",option:"px-1 py-0.5 text-xs",group:"pt-1",groupHeading:"px-2 py-0.5 text-xxs",noOptionsMessage:"px-2 py-1 text-xxs",loadingMessage:"px-2 py-1 text-xxs",message:"text-xxs p-1.5",icon:"text-sm"},md:{trigger:"h-6 min-h-fit",control:"min-h-6 p-1 gap-1.5",input:"text-s h-4",placeholder:"placeholder:text-s text-s",singleValue:"text-s",multiValue:"h-4 p-1 gap-1 text-xs",multiValueLabel:"text-xs",multiValueRemove:"w-3.5 h-3.5",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-4",dropdownIndicator:"p-0.5 size-4",indicatorSeparator:"h-4",loadingIndicator:"w-4 h-4",menu:"m-0",menuList:"py-1",option:"px-2 py-1 text-s",group:"pt-1.5",groupHeading:"px-3 py-1 text-xs",noOptionsMessage:"px-2 py-1.5 text-xs",loadingMessage:"px-3 py-1.5 text-xs",message:"text-xs p-2",icon:"text-base"},lg:{trigger:"h-7 min-h-fit",control:"min-h-7 p-1.5 gap-2",input:"text-sm h-5",placeholder:"placeholder:text-sm text-sm",singleValue:"text-sm",multiValue:"h-5 px-1.5 gap-1.5 text-s",multiValueLabel:"text-xs",multiValueRemove:"w-4 h-4",indicatorsContainer:"gap-1.5",clearIndicator:"p-0.5 size-5",dropdownIndicator:"p-1 size-5",indicatorSeparator:"h-5",loadingIndicator:"w-5 h-5",menu:"m-0",menuList:"py-1.5",option:"px-3 py-2 text-sm",group:"pt-2",groupHeading:"px-4 py-1.5 text-s",noOptionsMessage:"px-4 py-2 text-s",loadingMessage:"px-4 py-2 text-s",message:"text-s p-2.5",icon:"text-lg"}},Nt={primary:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-input-focus-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-primary",menu:"bg-select-list-bg border-input-focus-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-primary-dark",messageBackground:"bg-input-message-bg",messageBorder:"ring-input-info-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},positive:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-positive",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-positive",menu:"bg-select-list-bg border-positive shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-positive-dark",messageBackground:"bg-positive-light",messageBorder:"ring-positive",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},warning:{control:"cursor-pointer bg-input-bg text-select-text",controlFocused:"border-input-warning-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-select-text",placeholder:"placeholder:text-input-placeholder text-input-text placeholder:opacity-60",singleValue:"text-select-text",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-warning",menu:"bg-select-list-bg border-input-warning-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-warning-dark",messageBackground:"bg-input-warning-bg",messageBorder:"ring-input-warning-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"},negative:{control:"cursor-pointer bg-input-bg text-negative",controlFocused:"border-input-error-border",controlDisabled:"opacity-60",controlInvalid:"bg-input-bg border-input-error-border text-negative",placeholder:"placeholder:text-input-placeholder text-input-text placeholder:opacity-60",singleValue:"text-negative",singleValueDisabled:"text-input-placeholder",multiValue:"bg-input-option-active-bg text-input-option-active-text",multiValueLabel:"text-input-option-active-text",multiValueRemove:"text-input-option-active-text hover:bg-input-option-hover-bg hover:text-body rounded-xs p-px",multiValueRemoveHover:"hover:bg-input-option-hover-bg",multiValueDisabled:"bg-canvas-subtle text-muted",clearIndicator:"text-input-text hover:text-body cursor-pointer",clearIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",dropdownIndicator:"text-input-text",dropdownIndicatorHover:"hover:text-body hover:bg-input-option-hover-bg",indicatorSeparator:"bg-input-border",loadingIndicator:"text-negative",menu:"bg-select-list-bg border-input-error-border shadow-lg",menuList:"scrollbar-thin scrollbar-thumb-input-border scrollbar-track-transparent",option:"text-select-text cursor-pointer",optionFocused:"bg-input-option-hover-bg text-body",optionSelected:"bg-input-option-active-bg text-input-option-active-text",optionDisabled:"text-input-placeholder cursor-not-allowed",group:"",groupHeading:"text-input-placeholder font-semibold",noOptionsMessage:"text-input-placeholder",loadingMessage:"text-input-placeholder",message:"text-negative-dark",messageBackground:"bg-input-error-bg",messageBorder:"ring-input-error-border",icon:"text-input-text",iconAction:"text-input-text hover:text-body",iconActionHover:"hover:text-body hover:bg-input-option-hover-bg"}},DG=()=>be("flex flex-col relative"),jG=({size:e,color:t,isDisabled:r,hasMessage:n,isInvalid:i,isFocused:o,menuPlacement:a})=>{const s=Nt[i?"negative":t];return be("bg-input-bg flex relative transition-all duration-200 ease-in-out items-center",o&&a?a==="top"?"rounded-b":"rounded-t":"only:rounded first:rounded-t last:rounded-b",s.control,n?["ring-1",s.messageBorder]:["border",r?"border-input-border":o?s.controlFocused:`border-select-border focus-within:${s.controlFocused}`],Qt[e].trigger,{"ring-1":n,[s.controlDisabled]:r})},qG=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=Nt[t];return be("transition-colors duration-200 rounded max-h-full h-fit px-0.5",Qt[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?i.iconAction:i.icon,{"cursor-pointer p-0.5":n&&!r,[i.iconActionHover]:n&&!r,"pointer-events-none":!n})},LG=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:i,hasMessage:o,hasGroup:a,menuPlacement:s})=>{const c=Nt[i?"negative":t];return a?be("flex items-center justify-between flex-1 min-w-0",Qt[e].control,"bg-transparent border-0",{[c.controlDisabled]:r}):be("flex items-center justify-between",n&&s?s==="top"?"rounded-b":"rounded-t":"rounded",Qt[e].control,c.control,o?["ring-1",c.messageBorder]:["border",r?"border-input-border":n?c.controlFocused:`border-select-border
22
+ focus-within:${c.controlFocused}`],{[c.controlDisabled]:r})},zG=({isMulti:e})=>be("flex items-center gap-1 flex-1 min-w-0 overflow-hidden",{"flex-wrap":e,"px-0.5":!e}),BG=({size:e,color:t})=>be("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 text-input-text",Qt[e].input,Nt[t].placeholder),FG=({size:e,color:t})=>be("select-none truncate",Qt[e].placeholder,Nt[t].placeholder),$G=({size:e,color:t,isDisabled:r})=>be("truncate",Qt[e].singleValue,r?Nt[t].singleValueDisabled:Nt[t].singleValue),HG=({size:e,color:t,isDisabled:r,isFocused:n})=>be("inline-flex items-center rounded-xs",Qt[e].multiValue,r?Nt[t].multiValueDisabled:Nt[t].multiValue,{"border border-white":n&&!r}),VG=({size:e})=>be("truncate",Qt[e].multiValueLabel),WG=({size:e,color:t,isDisabled:r})=>be("flex items-center justify-center cursor-pointer transition-colors",Qt[e].multiValueRemove,Nt[t].multiValueRemove),f3=({size:e,color:t,isDisabled:r})=>be("flex items-center justify-center transition-colors rounded",Qt[e].clearIndicator,r?"hidden":[Nt[t].clearIndicator,Nt[t].clearIndicatorHover]),UG=({size:e,color:t,isDisabled:r})=>be("flex items-center justify-center transition-colors rounded",Qt[e].dropdownIndicator,r?"text-grey-200":[Nt[t].dropdownIndicator,Nt[t].dropdownIndicatorHover]),GG=({size:e,placement:t,hasMessage:r,color:n,hasGroup:i})=>{const o=t==="top";return be("absolute z-50 overflow-hidden border",i?"-left-px -right-px":"w-full",Nt[n].menu,{[Nt[n].messageBorder]:r},o?"bottom-full rounded-t rounded-b-none border-b-0":"top-full rounded-b border-t-0",Qt[e].menu)},KG=({size:e})=>be("overflow-y-auto",Qt[e].menuList,Nt.primary.menuList),YG=({size:e,color:t,isDisabled:r,isFocused:n,isSelected:i})=>be("transition-colors duration-150 cursor-pointer mx-1 rounded flex items-center gap-2",Qt[e].option,{[Nt[t].optionDisabled]:r,[Nt[t].optionSelected]:i&&!r,[Nt[t].optionFocused]:n&&!i&&!r,[Nt[t].option]:!i&&!n&&!r}),XG=({size:e})=>be(Qt[e].group),ZG=({size:e,color:t})=>be(Qt[e].groupHeading,Nt[t].groupHeading),JG=({size:e})=>be("text-grey-100",Qt[e].loadingMessage),QG=({size:e})=>be(Qt[e].noOptionsMessage,Nt.primary.noOptionsMessage),_w=e=>{const t=e[0];return e.length>0&&typeof t=="object"&&t!==null&&"options"in t&&Array.isArray(t.options)},eK=e=>_w(e)?e.reduce((t,r)=>[...t,...r.options],[]):e;function Cr(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ae(){return Ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ae.apply(null,arguments)}function Sw(e,t){return Sw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Sw(e,t)}function tK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Sw(e,t)}var jc={exports:{}},Mh={exports:{}},ct={};/** @license React v16.13.1
8
23
  * react-is.production.min.js
9
24
  *
10
25
  * Copyright (c) Facebook, Inc. and its affiliates.
11
26
  *
12
27
  * This source code is licensed under the MIT license found in the
13
28
  * LICENSE file in the root directory of this source tree.
14
- */var rN;function bX(){if(rN)return Ye;rN=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function E(S){if(typeof S=="object"&&S!==null){var R=S.$$typeof;switch(R){case t:switch(S=S.type,S){case l:case d:case n:case o:case i:case h:return S;default:switch(S=S&&S.$$typeof,S){case u:case f:case m:case v:case a:return S;default:return R}}case r:return R}}}function _(S){return E(S)===d}return Ye.AsyncMode=l,Ye.ConcurrentMode=d,Ye.ContextConsumer=u,Ye.ContextProvider=a,Ye.Element=t,Ye.ForwardRef=f,Ye.Fragment=n,Ye.Lazy=m,Ye.Memo=v,Ye.Portal=r,Ye.Profiler=o,Ye.StrictMode=i,Ye.Suspense=h,Ye.isAsyncMode=function(S){return _(S)||E(S)===l},Ye.isConcurrentMode=_,Ye.isContextConsumer=function(S){return E(S)===u},Ye.isContextProvider=function(S){return E(S)===a},Ye.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ye.isForwardRef=function(S){return E(S)===f},Ye.isFragment=function(S){return E(S)===n},Ye.isLazy=function(S){return E(S)===m},Ye.isMemo=function(S){return E(S)===v},Ye.isPortal=function(S){return E(S)===r},Ye.isProfiler=function(S){return E(S)===o},Ye.isStrictMode=function(S){return E(S)===i},Ye.isSuspense=function(S){return E(S)===h},Ye.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===d||S===o||S===i||S===h||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===v||S.$$typeof===a||S.$$typeof===u||S.$$typeof===f||S.$$typeof===x||S.$$typeof===b||S.$$typeof===w||S.$$typeof===y)},Ye.typeOf=E,Ye}var Xe={};/** @license React v16.13.1
29
+ */var uC;function rK(){if(uC)return ct;uC=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case t:switch(S=S.type,S){case c:case u:case n:case o:case i:case h:return S;default:switch(S=S&&S.$$typeof,S){case s:case d:case x:case v:case a:return S;default:return I}}case r:return I}}}function E(S){return _(S)===u}return ct.AsyncMode=c,ct.ConcurrentMode=u,ct.ContextConsumer=s,ct.ContextProvider=a,ct.Element=t,ct.ForwardRef=d,ct.Fragment=n,ct.Lazy=x,ct.Memo=v,ct.Portal=r,ct.Profiler=o,ct.StrictMode=i,ct.Suspense=h,ct.isAsyncMode=function(S){return E(S)||_(S)===c},ct.isConcurrentMode=E,ct.isContextConsumer=function(S){return _(S)===s},ct.isContextProvider=function(S){return _(S)===a},ct.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ct.isForwardRef=function(S){return _(S)===d},ct.isFragment=function(S){return _(S)===n},ct.isLazy=function(S){return _(S)===x},ct.isMemo=function(S){return _(S)===v},ct.isPortal=function(S){return _(S)===r},ct.isProfiler=function(S){return _(S)===o},ct.isStrictMode=function(S){return _(S)===i},ct.isSuspense=function(S){return _(S)===h},ct.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===u||S===o||S===i||S===h||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===x||S.$$typeof===v||S.$$typeof===a||S.$$typeof===s||S.$$typeof===d||S.$$typeof===b||S.$$typeof===w||S.$$typeof===y||S.$$typeof===g)},ct.typeOf=_,ct}var ht={};/** @license React v16.13.1
15
30
  * react-is.development.js
16
31
  *
17
32
  * Copyright (c) Facebook, Inc. and its affiliates.
18
33
  *
19
34
  * This source code is licensed under the MIT license found in the
20
35
  * LICENSE file in the root directory of this source tree.
21
- */var nN;function xX(){return nN||(nN=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function E(ce){return typeof ce=="string"||typeof ce=="function"||ce===n||ce===d||ce===o||ce===i||ce===h||ce===p||typeof ce=="object"&&ce!==null&&(ce.$$typeof===m||ce.$$typeof===v||ce.$$typeof===a||ce.$$typeof===u||ce.$$typeof===f||ce.$$typeof===x||ce.$$typeof===b||ce.$$typeof===w||ce.$$typeof===y)}function _(ce){if(typeof ce=="object"&&ce!==null){var be=ce.$$typeof;switch(be){case t:var Ce=ce.type;switch(Ce){case l:case d:case n:case o:case i:case h:return Ce;default:var _e=Ce&&Ce.$$typeof;switch(_e){case u:case f:case m:case v:case a:return _e;default:return be}}case r:return be}}}var S=l,R=d,I=u,N=a,A=t,L=f,B=n,U=m,j=v,D=r,G=o,F=i,X=h,Z=!1;function Q(ce){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),W(ce)||_(ce)===l}function W(ce){return _(ce)===d}function ee(ce){return _(ce)===u}function oe(ce){return _(ce)===a}function ae(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===t}function H(ce){return _(ce)===f}function K(ce){return _(ce)===n}function $(ce){return _(ce)===m}function k(ce){return _(ce)===v}function z(ce){return _(ce)===r}function re(ce){return _(ce)===o}function ie(ce){return _(ce)===i}function se(ce){return _(ce)===h}Xe.AsyncMode=S,Xe.ConcurrentMode=R,Xe.ContextConsumer=I,Xe.ContextProvider=N,Xe.Element=A,Xe.ForwardRef=L,Xe.Fragment=B,Xe.Lazy=U,Xe.Memo=j,Xe.Portal=D,Xe.Profiler=G,Xe.StrictMode=F,Xe.Suspense=X,Xe.isAsyncMode=Q,Xe.isConcurrentMode=W,Xe.isContextConsumer=ee,Xe.isContextProvider=oe,Xe.isElement=ae,Xe.isForwardRef=H,Xe.isFragment=K,Xe.isLazy=$,Xe.isMemo=k,Xe.isPortal=z,Xe.isProfiler=re,Xe.isStrictMode=ie,Xe.isSuspense=se,Xe.isValidElementType=E,Xe.typeOf=_})()),Xe}var iN;function _q(){return iN||(iN=1,process.env.NODE_ENV==="production"?gu.exports=bX():gu.exports=xX()),gu.exports}/*
36
+ */var dC;function nK(){return dC||(dC=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(ee){return typeof ee=="string"||typeof ee=="function"||ee===n||ee===u||ee===o||ee===i||ee===h||ee===p||typeof ee=="object"&&ee!==null&&(ee.$$typeof===x||ee.$$typeof===v||ee.$$typeof===a||ee.$$typeof===s||ee.$$typeof===d||ee.$$typeof===b||ee.$$typeof===w||ee.$$typeof===y||ee.$$typeof===g)}function E(ee){if(typeof ee=="object"&&ee!==null){var pe=ee.$$typeof;switch(pe){case t:var ue=ee.type;switch(ue){case c:case u:case n:case o:case i:case h:return ue;default:var xe=ue&&ue.$$typeof;switch(xe){case s:case d:case x:case v:case a:return xe;default:return pe}}case r:return pe}}}var S=c,I=u,N=s,T=a,k=t,z=d,L=n,K=x,G=v,A=r,Y=o,B=i,X=h,U=!1;function re(ee){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(ee)||E(ee)===c}function j(ee){return E(ee)===u}function W(ee){return E(ee)===s}function Z(ee){return E(ee)===a}function J(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===t}function M(ee){return E(ee)===d}function H(ee){return E(ee)===n}function q(ee){return E(ee)===x}function D(ee){return E(ee)===v}function V(ee){return E(ee)===r}function Q(ee){return E(ee)===o}function ne(ee){return E(ee)===i}function ce(ee){return E(ee)===h}ht.AsyncMode=S,ht.ConcurrentMode=I,ht.ContextConsumer=N,ht.ContextProvider=T,ht.Element=k,ht.ForwardRef=z,ht.Fragment=L,ht.Lazy=K,ht.Memo=G,ht.Portal=A,ht.Profiler=Y,ht.StrictMode=B,ht.Suspense=X,ht.isAsyncMode=re,ht.isConcurrentMode=j,ht.isContextConsumer=W,ht.isContextProvider=Z,ht.isElement=J,ht.isForwardRef=M,ht.isFragment=H,ht.isLazy=q,ht.isMemo=D,ht.isPortal=V,ht.isProfiler=Q,ht.isStrictMode=ne,ht.isSuspense=ce,ht.isValidElementType=_,ht.typeOf=E})()),ht}var fC;function h3(){return fC||(fC=1,process.env.NODE_ENV==="production"?Mh.exports=rK():Mh.exports=nK()),Mh.exports}/*
22
37
  object-assign
23
38
  (c) Sindre Sorhus
24
39
  @license MIT
25
- */var jm,oN;function wX(){if(oN)return jm;oN=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return jm=i()?Object.assign:function(o,a){for(var u,l=n(o),d,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var h in u)t.call(u,h)&&(l[h]=u[h]);if(e){d=e(u);for(var p=0;p<d.length;p++)r.call(u,d[p])&&(l[d[p]]=u[d[p]])}}return l},jm}var qm,aN;function Yx(){if(aN)return qm;aN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qm=e,qm}var km,sN;function Eq(){return sN||(sN=1,km=Function.call.bind(Object.prototype.hasOwnProperty)),km}var Lm,uN;function _X(){if(uN)return Lm;uN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yx(),r={},n=Eq();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,u,l,d){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var h;try{if(typeof o[f]!="function"){var p=Error((l||"React class")+": "+u+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[f](a,f,l,u,null,t)}catch(m){h=m}if(h&&!(h instanceof Error)&&e((l||"React class")+": type specification of "+u+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=d?d():"";e("Failed "+u+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Lm=i,Lm}var Bm,cN;function EX(){if(cN)return Bm;cN=1;var e=_q(),t=wX(),r=Yx(),n=Eq(),i=_X(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(u){var l="Warning: "+u;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Bm=function(u,l){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(W){var ee=W&&(d&&W[d]||W[f]);if(typeof ee=="function")return ee}var p="<<anonymous>>",v={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:E,element:_(),elementType:S(),instanceOf:R,node:L(),objectOf:N,oneOf:I,oneOfType:A,shape:U,exact:j};function m(W,ee){return W===ee?W!==0||1/W===1/ee:W!==W&&ee!==ee}function y(W,ee){this.message=W,this.data=ee&&typeof ee=="object"?ee:{},this.stack=""}y.prototype=Error.prototype;function x(W){if(process.env.NODE_ENV!=="production")var ee={},oe=0;function ae(K,$,k,z,re,ie,se){if(z=z||p,ie=ie||k,se!==r){if(l){var ce=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ce.name="Invariant Violation",ce}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var be=z+":"+k;!ee[be]&&oe<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),ee[be]=!0,oe++)}}return $[k]==null?K?$[k]===null?new y("The "+re+" `"+ie+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new y("The "+re+" `"+ie+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:W($,k,z,re,ie)}var H=ae.bind(null,!1);return H.isRequired=ae.bind(null,!0),H}function b(W){function ee(oe,ae,H,K,$,k){var z=oe[ae],re=F(z);if(re!==W){var ie=X(z);return new y("Invalid "+K+" `"+$+"` of type "+("`"+ie+"` supplied to `"+H+"`, expected ")+("`"+W+"`."),{expectedType:W})}return null}return x(ee)}function w(){return x(a)}function E(W){function ee(oe,ae,H,K,$){if(typeof W!="function")return new y("Property `"+$+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var k=oe[ae];if(!Array.isArray(k)){var z=F(k);return new y("Invalid "+K+" `"+$+"` of type "+("`"+z+"` supplied to `"+H+"`, expected an array."))}for(var re=0;re<k.length;re++){var ie=W(k,re,H,K,$+"["+re+"]",r);if(ie instanceof Error)return ie}return null}return x(ee)}function _(){function W(ee,oe,ae,H,K){var $=ee[oe];if(!u($)){var k=F($);return new y("Invalid "+H+" `"+K+"` of type "+("`"+k+"` supplied to `"+ae+"`, expected a single ReactElement."))}return null}return x(W)}function S(){function W(ee,oe,ae,H,K){var $=ee[oe];if(!e.isValidElementType($)){var k=F($);return new y("Invalid "+H+" `"+K+"` of type "+("`"+k+"` supplied to `"+ae+"`, expected a single ReactElement type."))}return null}return x(W)}function R(W){function ee(oe,ae,H,K,$){if(!(oe[ae]instanceof W)){var k=W.name||p,z=Q(oe[ae]);return new y("Invalid "+K+" `"+$+"` of type "+("`"+z+"` supplied to `"+H+"`, expected ")+("instance of `"+k+"`."))}return null}return x(ee)}function I(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function ee(oe,ae,H,K,$){for(var k=oe[ae],z=0;z<W.length;z++)if(m(k,W[z]))return null;var re=JSON.stringify(W,function(se,ce){var be=X(ce);return be==="symbol"?String(ce):ce});return new y("Invalid "+K+" `"+$+"` of value `"+String(k)+"` "+("supplied to `"+H+"`, expected one of "+re+"."))}return x(ee)}function N(W){function ee(oe,ae,H,K,$){if(typeof W!="function")return new y("Property `"+$+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var k=oe[ae],z=F(k);if(z!=="object")return new y("Invalid "+K+" `"+$+"` of type "+("`"+z+"` supplied to `"+H+"`, expected an object."));for(var re in k)if(n(k,re)){var ie=W(k,re,H,K,$+"."+re,r);if(ie instanceof Error)return ie}return null}return x(ee)}function A(W){if(!Array.isArray(W))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var ee=0;ee<W.length;ee++){var oe=W[ee];if(typeof oe!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(oe)+" at index "+ee+"."),a}function ae(H,K,$,k,z){for(var re=[],ie=0;ie<W.length;ie++){var se=W[ie],ce=se(H,K,$,k,z,r);if(ce==null)return null;ce.data&&n(ce.data,"expectedType")&&re.push(ce.data.expectedType)}var be=re.length>0?", expected one of type ["+re.join(", ")+"]":"";return new y("Invalid "+k+" `"+z+"` supplied to "+("`"+$+"`"+be+"."))}return x(ae)}function L(){function W(ee,oe,ae,H,K){return D(ee[oe])?null:new y("Invalid "+H+" `"+K+"` supplied to "+("`"+ae+"`, expected a ReactNode."))}return x(W)}function B(W,ee,oe,ae,H){return new y((W||"React class")+": "+ee+" type `"+oe+"."+ae+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function U(W){function ee(oe,ae,H,K,$){var k=oe[ae],z=F(k);if(z!=="object")return new y("Invalid "+K+" `"+$+"` of type `"+z+"` "+("supplied to `"+H+"`, expected `object`."));for(var re in W){var ie=W[re];if(typeof ie!="function")return B(H,K,$,re,X(ie));var se=ie(k,re,H,K,$+"."+re,r);if(se)return se}return null}return x(ee)}function j(W){function ee(oe,ae,H,K,$){var k=oe[ae],z=F(k);if(z!=="object")return new y("Invalid "+K+" `"+$+"` of type `"+z+"` "+("supplied to `"+H+"`, expected `object`."));var re=t({},oe[ae],W);for(var ie in re){var se=W[ie];if(n(W,ie)&&typeof se!="function")return B(H,K,$,ie,X(se));if(!se)return new y("Invalid "+K+" `"+$+"` key `"+ie+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(oe[ae],null," ")+`
26
- Valid keys: `+JSON.stringify(Object.keys(W),null," "));var ce=se(k,ie,H,K,$+"."+ie,r);if(ce)return ce}return null}return x(ee)}function D(W){switch(typeof W){case"number":case"string":case"undefined":return!0;case"boolean":return!W;case"object":if(Array.isArray(W))return W.every(D);if(W===null||u(W))return!0;var ee=h(W);if(ee){var oe=ee.call(W),ae;if(ee!==W.entries){for(;!(ae=oe.next()).done;)if(!D(ae.value))return!1}else for(;!(ae=oe.next()).done;){var H=ae.value;if(H&&!D(H[1]))return!1}}else return!1;return!0;default:return!1}}function G(W,ee){return W==="symbol"?!0:ee?ee["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ee instanceof Symbol:!1}function F(W){var ee=typeof W;return Array.isArray(W)?"array":W instanceof RegExp?"object":G(ee,W)?"symbol":ee}function X(W){if(typeof W>"u"||W===null)return""+W;var ee=F(W);if(ee==="object"){if(W instanceof Date)return"date";if(W instanceof RegExp)return"regexp"}return ee}function Z(W){var ee=X(W);switch(ee){case"array":case"object":return"an "+ee;case"boolean":case"date":case"regexp":return"a "+ee;default:return ee}}function Q(W){return!W.constructor||!W.constructor.name?p:W.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},Bm}var Fm,lN;function SX(){if(lN)return Fm;lN=1;var e=Yx();function t(){}function r(){}return r.resetWarningCache=t,Fm=function(){function n(a,u,l,d,f,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Fm}var fN;function OX(){if(fN)return vu.exports;if(fN=1,process.env.NODE_ENV!=="production"){var e=_q(),t=!0;vu.exports=EX()(e.isElement,t)}else vu.exports=SX()();return vu.exports}var CX=OX();const le=Un(CX);var mu={exports:{}},Je={};/** @license React v17.0.2
40
+ */var Ah,hC;function iK(){if(hC)return Ah;hC=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ah=i()?Object.assign:function(o,a){for(var s,c=n(o),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var h in s)t.call(s,h)&&(c[h]=s[h]);if(e){u=e(s);for(var p=0;p<u.length;p++)r.call(s,u[p])&&(c[u[p]]=s[u[p]])}}return c},Ah}var Dh,pC;function p1(){if(pC)return Dh;pC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Dh=e,Dh}var vC,gC;function p3(){return gC||(gC=1,vC=Function.call.bind(Object.prototype.hasOwnProperty)),vC}var jh,mC;function oK(){if(mC)return jh;mC=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=p1(),r={},n=p3();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in o)if(n(o,d)){var h;try{if(typeof o[d]!="function"){var p=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[d](a,d,c,s,null,t)}catch(x){h=x}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=u?u():"";e("Failed "+s+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},jh=i,jh}var qh,bC;function aK(){if(bC)return qh;bC=1;var e=h3(),t=iK(),r=p1(),n=p3(),i=oK(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return qh=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function h(j){var W=j&&(u&&j[u]||j[d]);if(typeof W=="function")return W}var p="<<anonymous>>",v={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:y(),arrayOf:_,element:E(),elementType:S(),instanceOf:I,node:z(),objectOf:T,oneOf:N,oneOfType:k,shape:K,exact:G};function x(j,W){return j===W?j!==0||1/j===1/W:j!==j&&W!==W}function g(j,W){this.message=j,this.data=W&&typeof W=="object"?W:{},this.stack=""}g.prototype=Error.prototype;function b(j){if(process.env.NODE_ENV!=="production")var W={},Z=0;function J(H,q,D,V,Q,ne,ce){if(V=V||p,ne=ne||D,ce!==r){if(c){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=V+":"+D;!W[pe]&&Z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[pe]=!0,Z++)}}return q[D]==null?H?q[D]===null?new g("The "+Q+" `"+ne+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new g("The "+Q+" `"+ne+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:j(q,D,V,Q,ne)}var M=J.bind(null,!1);return M.isRequired=J.bind(null,!0),M}function w(j){function W(Z,J,M,H,q,D){var V=Z[J],Q=B(V);if(Q!==j){var ne=X(V);return new g("Invalid "+H+" `"+q+"` of type "+("`"+ne+"` supplied to `"+M+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return b(W)}function y(){return b(a)}function _(j){function W(Z,J,M,H,q){if(typeof j!="function")return new g("Property `"+q+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var D=Z[J];if(!Array.isArray(D)){var V=B(D);return new g("Invalid "+H+" `"+q+"` of type "+("`"+V+"` supplied to `"+M+"`, expected an array."))}for(var Q=0;Q<D.length;Q++){var ne=j(D,Q,M,H,q+"["+Q+"]",r);if(ne instanceof Error)return ne}return null}return b(W)}function E(){function j(W,Z,J,M,H){var q=W[Z];if(!s(q)){var D=B(q);return new g("Invalid "+M+" `"+H+"` of type "+("`"+D+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return b(j)}function S(){function j(W,Z,J,M,H){var q=W[Z];if(!e.isValidElementType(q)){var D=B(q);return new g("Invalid "+M+" `"+H+"` of type "+("`"+D+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return b(j)}function I(j){function W(Z,J,M,H,q){if(!(Z[J]instanceof j)){var D=j.name||p,V=re(Z[J]);return new g("Invalid "+H+" `"+q+"` of type "+("`"+V+"` supplied to `"+M+"`, expected ")+("instance of `"+D+"`."))}return null}return b(W)}function N(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function W(Z,J,M,H,q){for(var D=Z[J],V=0;V<j.length;V++)if(x(D,j[V]))return null;var Q=JSON.stringify(j,function(ne,ce){var ee=X(ce);return ee==="symbol"?String(ce):ce});return new g("Invalid "+H+" `"+q+"` of value `"+String(D)+"` "+("supplied to `"+M+"`, expected one of "+Q+"."))}return b(W)}function T(j){function W(Z,J,M,H,q){if(typeof j!="function")return new g("Property `"+q+"` of component `"+M+"` has invalid PropType notation inside objectOf.");var D=Z[J],V=B(D);if(V!=="object")return new g("Invalid "+H+" `"+q+"` of type "+("`"+V+"` supplied to `"+M+"`, expected an object."));for(var Q in D)if(n(D,Q)){var ne=j(D,Q,M,H,q+"."+Q,r);if(ne instanceof Error)return ne}return null}return b(W)}function k(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<j.length;W++){var Z=j[W];if(typeof Z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(Z)+" at index "+W+"."),a}function J(M,H,q,D,V){for(var Q=[],ne=0;ne<j.length;ne++){var ce=j[ne],ee=ce(M,H,q,D,V,r);if(ee==null)return null;ee.data&&n(ee.data,"expectedType")&&Q.push(ee.data.expectedType)}var pe=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new g("Invalid "+D+" `"+V+"` supplied to "+("`"+q+"`"+pe+"."))}return b(J)}function z(){function j(W,Z,J,M,H){return A(W[Z])?null:new g("Invalid "+M+" `"+H+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return b(j)}function L(j,W,Z,J,M){return new g((j||"React class")+": "+W+" type `"+Z+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+M+"`.")}function K(j){function W(Z,J,M,H,q){var D=Z[J],V=B(D);if(V!=="object")return new g("Invalid "+H+" `"+q+"` of type `"+V+"` "+("supplied to `"+M+"`, expected `object`."));for(var Q in j){var ne=j[Q];if(typeof ne!="function")return L(M,H,q,Q,X(ne));var ce=ne(D,Q,M,H,q+"."+Q,r);if(ce)return ce}return null}return b(W)}function G(j){function W(Z,J,M,H,q){var D=Z[J],V=B(D);if(V!=="object")return new g("Invalid "+H+" `"+q+"` of type `"+V+"` "+("supplied to `"+M+"`, expected `object`."));var Q=t({},Z[J],j);for(var ne in Q){var ce=j[ne];if(n(j,ne)&&typeof ce!="function")return L(M,H,q,ne,X(ce));if(!ce)return new g("Invalid "+H+" `"+q+"` key `"+ne+"` supplied to `"+M+"`.\nBad object: "+JSON.stringify(Z[J],null," ")+`
41
+ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var ee=ce(D,ne,M,H,q+"."+ne,r);if(ee)return ee}return null}return b(W)}function A(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(A);if(j===null||s(j))return!0;var W=h(j);if(W){var Z=W.call(j),J;if(W!==j.entries){for(;!(J=Z.next()).done;)if(!A(J.value))return!1}else for(;!(J=Z.next()).done;){var M=J.value;if(M&&!A(M[1]))return!1}}else return!1;return!0;default:return!1}}function Y(j,W){return j==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function B(j){var W=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":Y(W,j)?"symbol":W}function X(j){if(typeof j>"u"||j===null)return""+j;var W=B(j);if(W==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return W}function U(j){var W=X(j);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function re(j){return!j.constructor||!j.constructor.name?p:j.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},qh}var Lh,yC;function sK(){if(yC)return Lh;yC=1;var e=p1();function t(){}function r(){}return r.resetWarningCache=t,Lh=function(){function n(a,s,c,u,d,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Lh}var xC;function lK(){if(xC)return jc.exports;if(xC=1,process.env.NODE_ENV!=="production"){var e=h3(),t=!0;jc.exports=aK()(e.isElement,t)}else jc.exports=sK()();return jc.exports}var cK=lK();const we=hj(cK);var zh={exports:{}},ut={};/**
42
+ * @license React
27
43
  * react-is.production.min.js
28
44
  *
29
45
  * Copyright (c) Facebook, Inc. and its affiliates.
30
46
  *
31
47
  * This source code is licensed under the MIT license found in the
32
48
  * LICENSE file in the root directory of this source tree.
33
- */var dN;function RX(){if(dN)return Je;dN=1;var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,l=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),t=b("react.portal"),r=b("react.fragment"),n=b("react.strict_mode"),i=b("react.profiler"),o=b("react.provider"),a=b("react.context"),u=b("react.forward_ref"),l=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),y=b("react.debug_trace_mode"),x=b("react.legacy_hidden")}function w(j){if(typeof j=="object"&&j!==null){var D=j.$$typeof;switch(D){case e:switch(j=j.type,j){case r:case i:case n:case l:case d:return j;default:switch(j=j&&j.$$typeof,j){case a:case u:case h:case f:case o:return j;default:return D}}case t:return D}}}var E=o,_=e,S=u,R=r,I=h,N=f,A=t,L=i,B=n,U=l;return Je.ContextConsumer=a,Je.ContextProvider=E,Je.Element=_,Je.ForwardRef=S,Je.Fragment=R,Je.Lazy=I,Je.Memo=N,Je.Portal=A,Je.Profiler=L,Je.StrictMode=B,Je.Suspense=U,Je.isAsyncMode=function(){return!1},Je.isConcurrentMode=function(){return!1},Je.isContextConsumer=function(j){return w(j)===a},Je.isContextProvider=function(j){return w(j)===o},Je.isElement=function(j){return typeof j=="object"&&j!==null&&j.$$typeof===e},Je.isForwardRef=function(j){return w(j)===u},Je.isFragment=function(j){return w(j)===r},Je.isLazy=function(j){return w(j)===h},Je.isMemo=function(j){return w(j)===f},Je.isPortal=function(j){return w(j)===t},Je.isProfiler=function(j){return w(j)===i},Je.isStrictMode=function(j){return w(j)===n},Je.isSuspense=function(j){return w(j)===l},Je.isValidElementType=function(j){return typeof j=="string"||typeof j=="function"||j===r||j===i||j===y||j===n||j===l||j===d||j===x||typeof j=="object"&&j!==null&&(j.$$typeof===h||j.$$typeof===f||j.$$typeof===o||j.$$typeof===a||j.$$typeof===u||j.$$typeof===m||j.$$typeof===p||j[0]===v)},Je.typeOf=w,Je}var Qe={};/** @license React v17.0.2
49
+ */var wC;function uK(){if(wC)return ut;wC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function g(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type,b){case r:case i:case n:case u:case d:return b;default:switch(b=b&&b.$$typeof,b){case s:case a:case c:case p:case h:case o:return b;default:return w}}case t:return w}}}return ut.ContextConsumer=a,ut.ContextProvider=o,ut.Element=e,ut.ForwardRef=c,ut.Fragment=r,ut.Lazy=p,ut.Memo=h,ut.Portal=t,ut.Profiler=i,ut.StrictMode=n,ut.Suspense=u,ut.SuspenseList=d,ut.isAsyncMode=function(){return!1},ut.isConcurrentMode=function(){return!1},ut.isContextConsumer=function(b){return g(b)===a},ut.isContextProvider=function(b){return g(b)===o},ut.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ut.isForwardRef=function(b){return g(b)===c},ut.isFragment=function(b){return g(b)===r},ut.isLazy=function(b){return g(b)===p},ut.isMemo=function(b){return g(b)===h},ut.isPortal=function(b){return g(b)===t},ut.isProfiler=function(b){return g(b)===i},ut.isStrictMode=function(b){return g(b)===n},ut.isSuspense=function(b){return g(b)===u},ut.isSuspenseList=function(b){return g(b)===d},ut.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===i||b===n||b===u||b===d||b===v||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===h||b.$$typeof===o||b.$$typeof===a||b.$$typeof===c||b.$$typeof===x||b.getModuleId!==void 0)},ut.typeOf=g,ut}var pt={};/**
50
+ * @license React
34
51
  * react-is.development.js
35
52
  *
36
53
  * Copyright (c) Facebook, Inc. and its affiliates.
37
54
  *
38
55
  * This source code is licensed under the MIT license found in the
39
56
  * LICENSE file in the root directory of this source tree.
40
- */var hN;function IX(){return hN||(hN=1,process.env.NODE_ENV!=="production"&&(function(){var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,l=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),t=b("react.portal"),r=b("react.fragment"),n=b("react.strict_mode"),i=b("react.profiler"),o=b("react.provider"),a=b("react.context"),u=b("react.forward_ref"),l=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),b("react.scope"),b("react.opaque.id"),y=b("react.debug_trace_mode"),b("react.offscreen"),x=b("react.legacy_hidden")}var w=!1;function E(se){return!!(typeof se=="string"||typeof se=="function"||se===r||se===i||se===y||se===n||se===l||se===d||se===x||w||typeof se=="object"&&se!==null&&(se.$$typeof===h||se.$$typeof===f||se.$$typeof===o||se.$$typeof===a||se.$$typeof===u||se.$$typeof===m||se.$$typeof===p||se[0]===v))}function _(se){if(typeof se=="object"&&se!==null){var ce=se.$$typeof;switch(ce){case e:var be=se.type;switch(be){case r:case i:case n:case l:case d:return be;default:var Ce=be&&be.$$typeof;switch(Ce){case a:case u:case h:case f:case o:return Ce;default:return ce}}case t:return ce}}}var S=a,R=o,I=e,N=u,A=r,L=h,B=f,U=t,j=i,D=n,G=l,F=!1,X=!1;function Z(se){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Q(se){return X||(X=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(se){return _(se)===a}function ee(se){return _(se)===o}function oe(se){return typeof se=="object"&&se!==null&&se.$$typeof===e}function ae(se){return _(se)===u}function H(se){return _(se)===r}function K(se){return _(se)===h}function $(se){return _(se)===f}function k(se){return _(se)===t}function z(se){return _(se)===i}function re(se){return _(se)===n}function ie(se){return _(se)===l}Qe.ContextConsumer=S,Qe.ContextProvider=R,Qe.Element=I,Qe.ForwardRef=N,Qe.Fragment=A,Qe.Lazy=L,Qe.Memo=B,Qe.Portal=U,Qe.Profiler=j,Qe.StrictMode=D,Qe.Suspense=G,Qe.isAsyncMode=Z,Qe.isConcurrentMode=Q,Qe.isContextConsumer=W,Qe.isContextProvider=ee,Qe.isElement=oe,Qe.isForwardRef=ae,Qe.isFragment=H,Qe.isLazy=K,Qe.isMemo=$,Qe.isPortal=k,Qe.isProfiler=z,Qe.isStrictMode=re,Qe.isSuspense=ie,Qe.isValidElementType=E,Qe.typeOf=_})()),Qe}var pN;function PX(){return pN||(pN=1,process.env.NODE_ENV==="production"?mu.exports=RX():mu.exports=IX()),mu.exports}var vN=PX();function gN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function mN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function $m(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return mN(r.overflowY,t)||mN(r.overflowX,t)||(function(n){var i=(function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1}function yu(e,t,r,n,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=r||a>=t&&u>=r?o-e-n:a>t&&u<r||o<e&&u>r?a-t+i:0}var NX=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(ce){return ce!==i};if(!gN(e))throw new TypeError("Invalid target");for(var u,l,d=document.scrollingElement||document.documentElement,f=[],h=e;gN(h)&&a(h);){if((h=(l=(u=h).parentElement)==null?u.getRootNode().host||null:l)===d){f.push(h);break}h!=null&&h===document.body&&$m(h)&&!$m(document.documentElement)||h!=null&&$m(h,o)&&f.push(h)}for(var p=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,x=e.getBoundingClientRect(),b=x.height,w=x.width,E=x.top,_=x.right,S=x.bottom,R=x.left,I=E,N=n==="center"?R+w/2:n==="end"?_:R,A=[],L=0;L<f.length;L++){var B=f[L],U=B.getBoundingClientRect(),j=U.height,D=U.width,G=U.top,F=U.right,X=U.bottom,Z=U.left;if(E>=0&&R>=0&&S<=v&&_<=p&&E>=G&&S<=X&&R>=Z&&_<=F)return A;var Q=getComputedStyle(B),W=parseInt(Q.borderLeftWidth,10),ee=parseInt(Q.borderTopWidth,10),oe=parseInt(Q.borderRightWidth,10),ae=parseInt(Q.borderBottomWidth,10),H=0,K=0,$="offsetWidth"in B?B.offsetWidth-B.clientWidth-W-oe:0,k="offsetHeight"in B?B.offsetHeight-B.clientHeight-ee-ae:0,z="offsetWidth"in B?B.offsetWidth===0?0:D/B.offsetWidth:0,re="offsetHeight"in B?B.offsetHeight===0?0:j/B.offsetHeight:0;if(d===B)H=yu(y,y+v,v,ee,ae,y+I,y+I+b,b),K=n==="start"?N:n==="center"?N-p/2:n==="end"?N-p:yu(m,m+p,p,W,oe,m+N,m+N+w,w),H=Math.max(0,H+y),K=Math.max(0,K+m);else{H=yu(G,X,j,ee,ae+k,I,I+b,b),K=n==="start"?N-Z-W:n==="center"?N-(Z+D/2)+$/2:n==="end"?N-F+oe+$:yu(Z,F,D,W,oe+$,N,N+w,w);var ie=B.scrollLeft,se=B.scrollTop;I+=se-(H=Math.max(0,Math.min(se+H/re,B.scrollHeight-j/re+k))),N+=ie-(K=Math.max(0,Math.min(ie+K/z,B.scrollWidth-D/z+$)))}A.push({el:B,top:H,left:K})}return A},rc=function(){return rc=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},rc.apply(this,arguments)};let TX=0;function yN(e){return typeof e=="function"?e:xr}function xr(){}function Sq(e,t){if(!e)return;NX(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function bN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function Xx(e,t){let r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];n(),r=setTimeout(()=>{r=null,e(...a)},t)}return i.cancel=n,i}function Rt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(u=>(u&&u(n,...o),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault))}}function ci(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n=>{t.forEach(i=>{typeof i=="function"?i(n):i&&(i.current=n)})}}function Oq(){return String(TX++)}function Cq(e){let{isOpen:t,resultCount:r,previousResultCount:n}=e;return t?r?r!==n?`${r} result${r===1?" is":"s are"} available, use up and down arrow keys to navigate. Press Enter key to select.`:"":"No results are available.":""}function xN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Rq(e){return typeof e.type=="string"}function Iq(e){return e.props}function AX(e,t){console.error(`The property "${t}" is required in "${e}"`)}const MX=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function bu(e){e===void 0&&(e={});const t={};return MX.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function nc(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=ic(t,n)?t[n]:e[n],r),{})}function ic(e,t){return e[t]!==void 0}function Kb(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function DX(e){return Object.prototype.toString.call(e)==="[object Object]"}function lo(e,t,r,n,i){if(i===void 0&&(i=!0),r===0)return-1;const o=r-1;(typeof t!="number"||t<0||t>=r)&&(t=e>0?-1:o+1);let a=t+e;a<0?a=i?o:0:a>o&&(a=i?0:o);const u=_i(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function _i(e,t,r,n,i){const o=n(t);if(!o||!o.hasAttribute("disabled"))return t;if(e>0){for(let a=t+1;a<r;a++)if(!n(a).hasAttribute("disabled"))return a}else for(let a=t-1;a>=0;a--)if(!n(a).hasAttribute("disabled"))return a;return i?e>0?_i(1,0,r,n,!1):_i(-1,r-1,r,n,!1):-1}function oc(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(bN(i,e,r)||n&&bN(i,r.document.activeElement,r)))}let Zx=xr;process.env.NODE_ENV!=="production"&&(Zx=(e,t,r)=>{const n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(i=>{t[i]!==void 0&&r[i]===void 0?console.error(`downshift: A component has changed the controlled prop "${i}" to be uncontrolled. ${n}`):t[i]===void 0&&r[i]!==void 0&&console.error(`downshift: A component has changed the uncontrolled prop "${i}" to be controlled. ${n}`)})});const jX=Xx(e=>{Nq(e).textContent=""},500);function Pq(e,t){const r=Nq(t);e&&(r.textContent=e,jX(t))}function Nq(e){e===void 0&&(e=document);let t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}const Tq=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Aq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Mq=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,Au=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Mu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Dq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,jq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,qq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,kq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Lq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,Bq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,Fq=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,$q=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Yb=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,zq=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Hq=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,Uq=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var qX=Object.freeze({__proto__:null,unknown:Tq,mouseUp:Aq,itemMouseEnter:Mq,keyDownArrowUp:Au,keyDownArrowDown:Mu,keyDownEscape:Dq,keyDownEnter:jq,keyDownHome:qq,keyDownEnd:kq,clickItem:Lq,blurInput:Bq,changeInput:Fq,keyDownSpaceButton:$q,clickButton:Yb,blurButton:zq,controlledPropUpdatedSelectedItem:Hq,touchEnd:Uq});const kX=(()=>{class e extends T.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${Oq()}`,this.menuId=this.props.menuId||`${this.id}-menu`,this.labelId=this.props.labelId||`${this.id}-label`,this.inputId=this.props.inputId||`${this.id}-input`,this.getItemId=this.props.getItemId||(h=>`${this.id}-item-${h}`),this.input=null,this.items=[],this.itemCount=null,this.previousResultCount=0,this.timeoutIds=[],this.internalSetTimeout=(h,p)=>{const v=setTimeout(()=>{this.timeoutIds=this.timeoutIds.filter(m=>m!==v),h()},p);this.timeoutIds.push(v)},this.setItemCount=h=>{this.itemCount=h},this.unsetItemCount=()=>{this.itemCount=null},this.setHighlightedIndex=function(h,p){h===void 0&&(h=n.props.defaultHighlightedIndex),p===void 0&&(p={}),p=bu(p),n.internalSetState({highlightedIndex:h,...p})},this.clearSelection=h=>{this.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:this.props.defaultHighlightedIndex,isOpen:this.props.defaultIsOpen},h)},this.selectItem=(h,p,v)=>{p=bu(p),this.internalSetState({isOpen:this.props.defaultIsOpen,highlightedIndex:this.props.defaultHighlightedIndex,selectedItem:h,inputValue:this.props.itemToString(h),...p},v)},this.selectItemAtIndex=(h,p,v)=>{const m=this.items[h];m!=null&&this.selectItem(m,p,v)},this.selectHighlightedItem=(h,p)=>this.selectItemAtIndex(this.getState().highlightedIndex,h,p),this.internalSetState=(h,p)=>{let v,m;const y={},x=typeof h=="function";return!x&&h.hasOwnProperty("inputValue")&&this.props.onInputValueChange(h.inputValue,{...this.getStateAndHelpers(),...h}),this.setState(b=>{b=this.getState(b);let w=x?h(b):h;w=this.props.stateReducer(b,w),v=w.hasOwnProperty("selectedItem");const E={};return v&&w.selectedItem!==b.selectedItem&&(m=w.selectedItem),w.type=w.type||Tq,Object.keys(w).forEach(_=>{b[_]!==w[_]&&(y[_]=w[_]),_!=="type"&&(w[_],ic(this.props,_)||(E[_]=w[_]))}),x&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),E},()=>{yN(p)(),Object.keys(y).length>1&&this.props.onStateChange(y,this.getStateAndHelpers()),v&&this.props.onSelect(h.selectedItem,this.getStateAndHelpers()),m!==void 0&&this.props.onChange(m,this.getStateAndHelpers()),this.props.onUserAction(y,this.getStateAndHelpers())})},this.rootRef=h=>this._rootNode=h,this.getRootProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:x=!1}=p===void 0?{}:p;n.getRootProps.called=!0,n.getRootProps.refKey=v,n.getRootProps.suppressRefError=x;const{isOpen:b}=n.getState();return{[v]:ci(m,n.rootRef),role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-owns":b?n.menuId:null,"aria-labelledby":n.labelId,...y}},this.keyDownHandlers={ArrowDown(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?5:1;this.moveHighlightedIndex(p,{type:Mu})}else this.internalSetState({isOpen:!0,type:Mu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=lo(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Mu})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:Au})}else this.internalSetState({isOpen:!0,type:Au},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=lo(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Au})}})},Enter(h){if(h.which===229)return;const{isOpen:p,highlightedIndex:v}=this.getState();if(p&&v!=null){h.preventDefault();const m=this.items[v],y=this.getItemNodeFromIndex(v);if(m==null||y&&y.hasAttribute("disabled"))return;this.selectHighlightedItem({type:jq})}},Escape(h){h.preventDefault(),this.reset({type:Dq,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:$q})}},this.inputKeyDownHandlers={...this.keyDownHandlers,Home(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=_i(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:qq})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=_i(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:kq})}},this.getToggleButtonProps=function(h){let{onClick:p,onPress:v,onKeyDown:m,onKeyUp:y,onBlur:x,...b}=h===void 0?{}:h;const{isOpen:w}=n.getState(),E={onClick:Rt(p,n.buttonHandleClick),onKeyDown:Rt(m,n.buttonHandleKeyDown),onKeyUp:Rt(y,n.buttonHandleKeyUp),onBlur:Rt(x,n.buttonHandleBlur)},_=b.disabled?{}:E;return{type:"button",role:"button","aria-label":w?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0,..._,...b}},this.buttonHandleKeyUp=h=>{h.preventDefault()},this.buttonHandleKeyDown=h=>{const p=Kb(h);this.buttonKeyDownHandlers[p]&&this.buttonKeyDownHandlers[p].call(this,h)},this.buttonHandleClick=h=>{h.preventDefault(),this.props.environment.document.activeElement===this.props.environment.document.body&&h.target.focus(),process.env.NODE_ENV==="test"?this.toggleMenu({type:Yb}):this.internalSetTimeout(()=>this.toggleMenu({type:Yb}))},this.buttonHandleBlur=h=>{const p=h.target;this.internalSetTimeout(()=>{!this.isMouseDown&&(this.props.environment.document.activeElement==null||this.props.environment.document.activeElement.id!==this.inputId)&&this.props.environment.document.activeElement!==p&&this.reset({type:zq})})},this.getLabelProps=h=>({htmlFor:this.inputId,id:this.labelId,...h}),this.getInputProps=function(h){let{onKeyDown:p,onBlur:v,onChange:m,onInput:y,onChangeText:x,...b}=h===void 0?{}:h,w,E={};w="onChange";const{inputValue:_,isOpen:S,highlightedIndex:R}=n.getState();return b.disabled||(E={[w]:Rt(m,y,n.inputHandleChange),onKeyDown:Rt(p,n.inputHandleKeyDown),onBlur:Rt(v,n.inputHandleBlur)}),{"aria-autocomplete":"list","aria-activedescendant":S&&typeof R=="number"&&R>=0?n.getItemId(R):null,"aria-controls":S?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:_,id:n.inputId,...E,...b}},this.inputHandleKeyDown=h=>{const p=Kb(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:Fq,isOpen:!0,inputValue:h.target.value,highlightedIndex:this.props.defaultHighlightedIndex})},this.inputHandleBlur=()=>{this.internalSetTimeout(()=>{const h=this.props.environment.document&&!!this.props.environment.document.activeElement&&!!this.props.environment.document.activeElement.dataset&&this.props.environment.document.activeElement.dataset.toggle&&this._rootNode&&this._rootNode.contains(this.props.environment.document.activeElement);!this.isMouseDown&&!h&&this.reset({type:Bq})})},this.menuRef=h=>{this._menuNode=h},this.getMenuProps=function(h,p){let{refKey:v="ref",ref:m,...y}=h===void 0?{}:h,{suppressRefError:x=!1}=p===void 0?{}:p;return n.getMenuProps.called=!0,n.getMenuProps.refKey=v,n.getMenuProps.suppressRefError=x,{[v]:ci(m,n.menuRef),role:"listbox","aria-labelledby":y&&y["aria-label"]?null:n.labelId,id:n.menuId,...y}},this.getItemProps=function(h){let{onMouseMove:p,onMouseDown:v,onClick:m,onPress:y,index:x,item:b=process.env.NODE_ENV==="production"?void 0:AX("getItemProps","item"),...w}=h===void 0?{}:h;x===void 0?(n.items.push(b),x=n.items.indexOf(b)):n.items[x]=b;const E="onClick",_=m,S={onMouseMove:Rt(p,()=>{x!==n.getState().highlightedIndex&&(n.setHighlightedIndex(x,{type:Mq}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Rt(v,I=>{I.preventDefault()}),[E]:Rt(_,()=>{n.selectItemAtIndex(x,{type:Lq})})},R=w.disabled?{onMouseDown:S.onMouseDown}:S;return{id:n.getItemId(x),role:"option","aria-selected":n.getState().highlightedIndex===x,...R,...w}},this.clearItems=()=>{this.items=[]},this.reset=function(h,p){h===void 0&&(h={}),h=bu(h),n.internalSetState(v=>{let{selectedItem:m}=v;return{isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(m),...h}},p)},this.toggleMenu=function(h,p){h===void 0&&(h={}),h=bu(h),n.internalSetState(v=>{let{isOpen:m}=v;return{isOpen:!m,...m&&{highlightedIndex:n.props.defaultHighlightedIndex},...h}},()=>{const{isOpen:v,highlightedIndex:m}=n.getState();v&&n.getItemCount()>0&&typeof m=="number"&&n.setHighlightedIndex(m,h),yN(p)()})},this.openMenu=h=>{this.internalSetState({isOpen:!0},h)},this.closeMenu=h=>{this.internalSetState({isOpen:!1},h)},this.updateStatus=Xx(()=>{const h=this.getState(),p=this.items[h.highlightedIndex],v=this.getItemCount(),m=this.props.getA11yStatusMessage({itemToString:this.props.itemToString,previousResultCount:this.previousResultCount,resultCount:v,highlightedItem:p,...h});this.previousResultCount=v,Pq(m,this.props.environment.document)},200);const{defaultHighlightedIndex:i,initialHighlightedIndex:o=i,defaultIsOpen:a,initialIsOpen:u=a,initialInputValue:l="",initialSelectedItem:d=null}=this.props,f=this.getState({highlightedIndex:o,isOpen:u,inputValue:l,selectedItem:d});f.selectedItem!=null&&this.props.initialInputValue===void 0&&(f.inputValue=this.props.itemToString(f.selectedItem)),this.state=f}internalClearTimeouts(){this.timeoutIds.forEach(r=>{clearTimeout(r)}),this.timeoutIds=[]}getState(r){return r===void 0&&(r=this.state),nc(r,this.props)}getItemCount(){let r=this.items.length;return this.itemCount!=null?r=this.itemCount:this.props.itemCount!==void 0&&(r=this.props.itemCount),r}getItemNodeFromIndex(r){return this.props.environment.document.getElementById(this.getItemId(r))}scrollHighlightedItemIntoView(){{const r=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(r,this._menuNode)}}moveHighlightedIndex(r,n){const i=this.getItemCount(),{highlightedIndex:o}=this.getState();if(i>0){const a=lo(r,o,i,u=>this.getItemNodeFromIndex(u));this.setHighlightedIndex(a,n)}}getStateAndHelpers(){const{highlightedIndex:r,inputValue:n,selectedItem:i,isOpen:o}=this.getState(),{itemToString:a}=this.props,{id:u}=this,{getRootProps:l,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,openMenu:m,closeMenu:y,toggleMenu:x,selectItem:b,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:_,clearSelection:S,clearItems:R,reset:I,setItemCount:N,unsetItemCount:A,internalSetState:L}=this;return{getRootProps:l,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,reset:I,openMenu:m,closeMenu:y,toggleMenu:x,selectItem:b,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:_,clearSelection:S,clearItems:R,setItemCount:N,unsetItemCount:A,setState:L,itemToString:a,id:u,highlightedIndex:r,inputValue:n,isOpen:o,selectedItem:i}}componentDidMount(){process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&wN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=l=>{this.isMouseDown=!1,!oc(l.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Aq},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=l=>{const d=oc(l.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:Uq},()=>this.props.onOuterClick(this.getStateAndHelpers()))},{environment:u}=this.props;u.addEventListener("mousedown",r),u.addEventListener("mouseup",n),u.addEventListener("touchstart",i),u.addEventListener("touchmove",o),u.addEventListener("touchend",a),this.cleanup=()=>{this.internalClearTimeouts(),this.updateStatus.cancel(),u.removeEventListener("mousedown",r),u.removeEventListener("mouseup",n),u.removeEventListener("touchstart",i),u.removeEventListener("touchmove",o),u.removeEventListener("touchend",a)}}}shouldScroll(r,n){const{highlightedIndex:i}=this.props.highlightedIndex===void 0?this.getState():this.props,{highlightedIndex:o}=n.highlightedIndex===void 0?r:n;return i&&this.getState().isOpen&&!r.isOpen||i!==o}componentDidUpdate(r,n){process.env.NODE_ENV!=="production"&&(Zx(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&wN(this._menuNode,this.getMenuProps)),ic(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Hq,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=xN(this.props.children,xr);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;const n=xN(r(this.getStateAndHelpers()));if(!n)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&LX(n,this.getRootProps),n;if(Rq(n))return T.cloneElement(n,this.getRootProps(Iq(n)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")}}return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:Cq,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&DX(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t)),onStateChange:xr,onInputValueChange:xr,onUserAction:xr,onChange:xr,onSelect:xr,onOuterClick:xr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:Sq},e.stateChangeTypes=qX,e})();process.env.NODE_ENV!=="production"&&(kX.propTypes={children:le.func,defaultHighlightedIndex:le.number,defaultIsOpen:le.bool,initialHighlightedIndex:le.number,initialSelectedItem:le.any,initialInputValue:le.string,initialIsOpen:le.bool,getA11yStatusMessage:le.func,itemToString:le.func,onChange:le.func,onSelect:le.func,onStateChange:le.func,onInputValueChange:le.func,onUserAction:le.func,onOuterClick:le.func,selectedItemChanged:le.func,stateReducer:le.func,itemCount:le.number,id:le.string,environment:le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})}),suppressRefError:le.bool,scrollIntoView:le.func,selectedItem:le.any,isOpen:le.bool,inputValue:le.string,highlightedIndex:le.number,labelId:le.string,inputId:le.string,menuId:le.string,getItemId:le.func});function wN(e,t){let{refKey:r}=t;e||console.error(`downshift: The ref prop "${r}" from getMenuProps was not applied correctly on your menu element.`)}function LX(e,t){let{refKey:r}=t;const n=r!=="ref",i=!Rq(e);i&&!n&&!vN.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&n&&console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${r}"`),!vN.isForwardRef(e)&&!Iq(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const Vq={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function BX(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{FX(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function FX(e,t,r,n){const{props:i,type:o}=t,a=`on${Jx(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function $X(e,t){return t.changes}function zX(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const HX=Xx((e,t)=>{Pq(e(),t)},200),UX=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function VX(e){let{id:t=`downshift-${Oq()}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:a}=e;return T.useRef({labelId:r||`${t}-label`,menuId:n||`${t}-menu`,getItemId:i||(l=>`${t}-item-${l}`),toggleButtonId:o||`${t}-toggle-button`,inputId:a||`${t}-input`}).current}function WX(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function GX(e){return e?String(e):""}function Jx(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function Wq(e){const t=T.useRef(e);return t.current=e,t}function KX(e,t,r){const n=T.useRef(),i=T.useRef(),o=T.useCallback((h,p)=>{i.current=p,h=nc(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=T.useReducer(o,t),l=Wq(r),d=T.useCallback(h=>u({props:l.current,...h}),[l]),f=i.current;return T.useEffect(()=>{f&&n.current&&n.current!==a&&BX(f,nc(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const Aa={itemToString:GX,stateReducer:$X,getA11ySelectionMessage:zX,scrollIntoView:Sq,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Jr(e,t,r){r===void 0&&(r=Vq);const n=e[`default${Jx(t)}`];return n!==void 0?n:r[t]}function xu(e,t,r){r===void 0&&(r=Vq);const n=e[t];if(n!==void 0)return n;const i=e[`initial${Jx(t)}`];return i!==void 0?i:Jr(e,t,r)}function YX(e){const t=xu(e,"selectedItem"),r=xu(e,"isOpen"),n=xu(e,"highlightedIndex"),i=xu(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function ac(e,t,r,n){const{items:i,initialHighlightedIndex:o,defaultHighlightedIndex:a}=e,{selectedItem:u,highlightedIndex:l}=t;return i.length===0?-1:o!==void 0&&l===o?o:a!==void 0?a:u?r===0?i.indexOf(u):lo(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function XX(e,t,r,n){const i=T.useRef({isMouseDown:!1,isTouchMove:!1});return T.useEffect(()=>{const o=()=>{i.current.isMouseDown=!0},a=f=>{i.current.isMouseDown=!1,e&&!oc(f.target,t.map(h=>h.current),r)&&n()},u=()=>{i.current.isTouchMove=!1},l=()=>{i.current.isTouchMove=!0},d=f=>{e&&!i.current.isTouchMove&&!oc(f.target,t.map(h=>h.current),r,!1)&&n()};return r.addEventListener("mousedown",o),r.addEventListener("mouseup",a),r.addEventListener("touchstart",u),r.addEventListener("touchmove",l),r.addEventListener("touchend",d),function(){r.removeEventListener("mousedown",o),r.removeEventListener("mouseup",a),r.removeEventListener("touchstart",u),r.removeEventListener("touchmove",l),r.removeEventListener("touchend",d)}},[e,r]),i}let Gq=()=>xr;process.env.NODE_ENV!=="production"&&(Gq=function(){const e=T.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=T.useRef(r.reduce((a,u)=>(a[u]={},a),{}));return T.useEffect(()=>{Object.keys(i.current).forEach(a=>{const u=i.current[a];if(e.current&&!Object.keys(u).length){console.error(`downshift: You forgot to call the ${a} getter function on your component / element.`);return}const{suppressRefError:l,refKey:d,elementRef:f}=u;(!f||!f.current)&&!l&&console.error(`downshift: The ref prop "${d}" from ${a} was not applied correctly on your element.`)}),e.current=!1}),T.useCallback((a,u,l,d)=>{i.current[a]={suppressRefError:u,refKey:l,elementRef:d}},[])});function _N(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;T.useEffect(()=>{n||HX(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function ZX(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=T.useRef(!0);return UX(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let Kq=xr;process.env.NODE_ENV!=="production"&&(Kq=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=T.useRef(r);T.useEffect(()=>{t||(Zx(n,i.current,r),i.current=r)},[n,r,t])});function JX(e,t,r){const{type:n,props:i}=t;let o;switch(n){case r.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:o={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:ac(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:ac(i,e,0)};break;case r.FunctionCloseMenu:o={isOpen:!1};break;case r.FunctionSetHighlightedIndex:o={highlightedIndex:t.highlightedIndex};break;case r.FunctionSetInputValue:o={inputValue:t.inputValue};break;case r.FunctionReset:o={highlightedIndex:Jr(i,"highlightedIndex"),isOpen:Jr(i,"isOpen"),selectedItem:Jr(i,"selectedItem"),inputValue:Jr(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return{...e,...o}}le.array.isRequired,le.func,le.func,le.func,le.bool,le.number,le.number,le.number,le.bool,le.bool,le.bool,le.any,le.any,le.any,le.string,le.string,le.string,le.func,le.string,le.func,le.func,le.func,le.func,le.func,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});function QX(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?"".concat(r," result").concat(r===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select."):"":"No results are available.":""}rc(rc({},Aa),{getA11yStatusMessage:QX});process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const Qx=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,ew=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,tw=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,rw=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,nw=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,iw=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,ow=process.env.NODE_ENV!=="production"?"__input_change__":6,sc=process.env.NODE_ENV!=="production"?"__input_blur__":7,Yq=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,Xq=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,aw=process.env.NODE_ENV!=="production"?"__item_click__":10,Zq=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,Jq=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,Qq=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,ek=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,tk=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,sw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,rk=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,nk=process.env.NODE_ENV!=="production"?"__function_reset__":18,uw=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var ik=Object.freeze({__proto__:null,InputKeyDownArrowDown:Qx,InputKeyDownArrowUp:ew,InputKeyDownEscape:tw,InputKeyDownHome:rw,InputKeyDownEnd:nw,InputKeyDownEnter:iw,InputChange:ow,InputBlur:sc,MenuMouseLeave:Yq,ItemMouseMove:Xq,ItemClick:aw,ToggleButtonClick:Zq,FunctionToggleMenu:Jq,FunctionOpenMenu:Qq,FunctionCloseMenu:ek,FunctionSetHighlightedIndex:tk,FunctionSelectItem:sw,FunctionSetInputValue:rk,FunctionReset:nk,ControlledPropUpdatedSelectedItem:uw});function eZ(e){const t=YX(e),{selectedItem:r}=t;let{inputValue:n}=t;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),{...t,inputValue:n}}const tZ={items:le.array.isRequired,itemToString:le.func,getA11yStatusMessage:le.func,getA11ySelectionMessage:le.func,circularNavigation:le.bool,highlightedIndex:le.number,defaultHighlightedIndex:le.number,initialHighlightedIndex:le.number,isOpen:le.bool,defaultIsOpen:le.bool,initialIsOpen:le.bool,selectedItem:le.any,initialSelectedItem:le.any,defaultSelectedItem:le.any,inputValue:le.string,defaultInputValue:le.string,initialInputValue:le.string,id:le.string,labelId:le.string,menuId:le.string,getItemId:le.func,inputId:le.string,toggleButtonId:le.string,stateReducer:le.func,onSelectedItemChange:le.func,onHighlightedIndexChange:le.func,onStateChange:le.func,onIsOpenChange:le.func,onInputValueChange:le.func,environment:le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})})};function rZ(e,t,r){const n=T.useRef(),[i,o]=KX(e,t,r);return T.useEffect(()=>{ic(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:uw,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[nc(i,r),o]}let ok=xr;process.env.NODE_ENV!=="production"&&(ok=(e,t)=>{le.checkPropTypes(tZ,e,"prop",t.name)});const nZ={...Aa,getA11yStatusMessage:Cq,circularNavigation:!0};function iZ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case aw:o={isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case Qx:e.isOpen?o={highlightedIndex:lo(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:ac(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case ew:e.isOpen?o={highlightedIndex:lo(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:ac(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case iw:o={...e.isOpen&&e.highlightedIndex>=0&&{selectedItem:n.items[e.highlightedIndex],isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case tw:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case rw:o={highlightedIndex:_i(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case nw:o={highlightedIndex:_i(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case sc:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case ow:o={isOpen:!0,highlightedIndex:Jr(n,"highlightedIndex"),inputValue:t.inputValue};break;case sw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case uw:o={inputValue:t.inputValue};break;default:return JX(e,t,ik)}return{...e,...o}}io.stateChangeTypes=ik;function io(e){e===void 0&&(e={}),ok(e,io);const t={...nZ,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:l,itemToString:d}=t,f=eZ(t),[h,p]=rZ(iZ,f,t),{isOpen:v,highlightedIndex:m,selectedItem:y,inputValue:x}=h,b=T.useRef(null),w=T.useRef({}),E=T.useRef(null),_=T.useRef(null),S=T.useRef(null),R=T.useRef(!0),I=VX(t),N=T.useRef(),A=Wq({state:h,props:t}),L=T.useCallback(z=>w.current[I.getItemId(z)],[I]);_N(u,[v,m,x,i],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h}),_N(l,[y],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h});const B=ZX({menuElement:b.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:L});Kq({isInitialMount:R.current,props:t,state:h}),T.useEffect(()=>{(r||n||v)&&E.current&&E.current.focus()},[]),T.useEffect(()=>{R.current||(N.current=i.length)});const U=XX(v,[S,b,_],a,()=>{p({type:sc,selectItem:!1})}),j=Gq("getInputProps","getComboboxProps","getMenuProps");T.useEffect(()=>{R.current=!1},[]),T.useEffect(()=>{v||(w.current={})},[v]);const D=T.useMemo(()=>({ArrowDown(z){z.preventDefault(),p({type:Qx,shiftKey:z.shiftKey,getItemNodeFromIndex:L})},ArrowUp(z){z.preventDefault(),p({type:ew,shiftKey:z.shiftKey,getItemNodeFromIndex:L})},Home(z){A.current.state.isOpen&&(z.preventDefault(),p({type:rw,getItemNodeFromIndex:L}))},End(z){A.current.state.isOpen&&(z.preventDefault(),p({type:nw,getItemNodeFromIndex:L}))},Escape(z){const re=A.current.state;(re.isOpen||re.inputValue||re.selectedItem||re.highlightedIndex>-1)&&(z.preventDefault(),p({type:tw}))},Enter(z){const re=A.current.state;!re.isOpen||re.highlightedIndex<0||z.which===229||(z.preventDefault(),p({type:iw,getItemNodeFromIndex:L}))}}),[p,A,L]),G=T.useCallback(z=>({id:I.labelId,htmlFor:I.inputId,...z}),[I]),F=T.useCallback(function(z,re){let{onMouseLeave:ie,refKey:se="ref",ref:ce,...be}=z===void 0?{}:z,{suppressRefError:Ce=!1}=re===void 0?{}:re;return j("getMenuProps",Ce,se,b),{[se]:ci(ce,_e=>{b.current=_e}),id:I.menuId,role:"listbox","aria-labelledby":I.labelId,onMouseLeave:Rt(ie,()=>{p({type:Yq})}),...be}},[p,j,I]),X=T.useCallback(function(z){let{item:re,index:ie,refKey:se="ref",ref:ce,onMouseMove:be,onMouseDown:Ce,onClick:_e,onPress:he,disabled:fe,...Ee}=z===void 0?{}:z;const{props:Pe,state:Ze}=A.current,ze=WX(ie,re,Pe.items);if(ze<0)throw new Error("Pass either item or item index in getItemProps!");const Fe="onClick",Ue=_e,ct=()=>{ie!==Ze.highlightedIndex&&(B.current=!1,p({type:Xq,index:ie,disabled:fe}))},lt=()=>{p({type:aw,index:ie})},mt=yt=>yt.preventDefault();return{[se]:ci(ce,yt=>{yt&&(w.current[I.getItemId(ze)]=yt)}),disabled:fe,role:"option","aria-selected":`${ze===Ze.highlightedIndex}`,id:I.getItemId(ze),...!fe&&{[Fe]:Rt(Ue,lt)},onMouseMove:Rt(be,ct),onMouseDown:Rt(Ce,mt),...Ee}},[p,A,B,I]),Z=T.useCallback(function(z){let{onClick:re,onPress:ie,refKey:se="ref",ref:ce,...be}=z===void 0?{}:z;const Ce=()=>{p({type:Zq}),!A.current.state.isOpen&&E.current&&E.current.focus()};return{[se]:ci(ce,_e=>{_.current=_e}),id:I.toggleButtonId,tabIndex:-1,...!be.disabled&&{onClick:Rt(re,Ce)},...be}},[p,A,I]),Q=T.useCallback(function(z,re){let{onKeyDown:ie,onChange:se,onInput:ce,onBlur:be,onChangeText:Ce,refKey:_e="ref",ref:he,...fe}=z===void 0?{}:z,{suppressRefError:Ee=!1}=re===void 0?{}:re;j("getInputProps",Ee,_e,E);const Pe=A.current.state,Ze=lt=>{const mt=Kb(lt);mt&&D[mt]&&D[mt](lt)},ze=lt=>{p({type:ow,inputValue:lt.target.value})},Fe=()=>{Pe.isOpen&&!U.current.isMouseDown&&p({type:sc,selectItem:!0})},Ue="onChange";let ct={};return fe.disabled||(ct={[Ue]:Rt(se,ce,ze),onKeyDown:Rt(ie,Ze),onBlur:Rt(be,Fe)}),{[_e]:ci(he,lt=>{E.current=lt}),id:I.inputId,"aria-autocomplete":"list","aria-controls":I.menuId,...Pe.isOpen&&Pe.highlightedIndex>-1&&{"aria-activedescendant":I.getItemId(Pe.highlightedIndex)},"aria-labelledby":I.labelId,autoComplete:"off",value:Pe.inputValue,...ct,...fe}},[p,D,A,U,j,I]),W=T.useCallback(function(z,re){let{refKey:ie="ref",ref:se,...ce}=z===void 0?{}:z,{suppressRefError:be=!1}=re===void 0?{}:re;return j("getComboboxProps",be,ie,S),{[ie]:ci(se,Ce=>{S.current=Ce}),role:"combobox","aria-haspopup":"listbox","aria-owns":I.menuId,"aria-expanded":A.current.state.isOpen,...ce}},[A,j,I]),ee=T.useCallback(()=>{p({type:Jq})},[p]),oe=T.useCallback(()=>{p({type:ek})},[p]),ae=T.useCallback(()=>{p({type:Qq})},[p]),H=T.useCallback(z=>{p({type:tk,highlightedIndex:z})},[p]),K=T.useCallback(z=>{p({type:sw,selectedItem:z})},[p]),$=T.useCallback(z=>{p({type:rk,inputValue:z})},[p]),k=T.useCallback(()=>{p({type:nk})},[p]);return{getItemProps:X,getLabelProps:G,getMenuProps:F,getInputProps:Q,getComboboxProps:W,getToggleButtonProps:Z,toggleMenu:ee,openMenu:ae,closeMenu:oe,setHighlightedIndex:H,setInputValue:$,selectItem:K,reset:k,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:x}}le.array,le.array,le.array,le.func,le.func,le.func,le.number,le.number,le.number,le.func,le.func,le.string,le.string,le.shape({addEventListener:le.func,removeEventListener:le.func,document:le.shape({getElementById:le.func,activeElement:le.any,body:le.any})});Aa.itemToString,Aa.stateReducer,Aa.environment;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;var Ia={exports:{}};/**
57
+ */var _C;function dK(){return _C||(_C=1,process.env.NODE_ENV!=="production"&&(function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),x=!1,g=!1,b=!1,w=!1,y=!1,_;_=Symbol.for("react.module.reference");function E(ue){return!!(typeof ue=="string"||typeof ue=="function"||ue===r||ue===i||y||ue===n||ue===u||ue===d||w||ue===v||x||g||b||typeof ue=="object"&&ue!==null&&(ue.$$typeof===p||ue.$$typeof===h||ue.$$typeof===o||ue.$$typeof===a||ue.$$typeof===c||ue.$$typeof===_||ue.getModuleId!==void 0))}function S(ue){if(typeof ue=="object"&&ue!==null){var xe=ue.$$typeof;switch(xe){case e:var le=ue.type;switch(le){case r:case i:case n:case u:case d:return le;default:var ie=le&&le.$$typeof;switch(ie){case s:case a:case c:case p:case h:case o:return ie;default:return xe}}case t:return xe}}}var I=a,N=o,T=e,k=c,z=r,L=p,K=h,G=t,A=i,Y=n,B=u,X=d,U=!1,re=!1;function j(ue){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function W(ue){return re||(re=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Z(ue){return S(ue)===a}function J(ue){return S(ue)===o}function M(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===e}function H(ue){return S(ue)===c}function q(ue){return S(ue)===r}function D(ue){return S(ue)===p}function V(ue){return S(ue)===h}function Q(ue){return S(ue)===t}function ne(ue){return S(ue)===i}function ce(ue){return S(ue)===n}function ee(ue){return S(ue)===u}function pe(ue){return S(ue)===d}pt.ContextConsumer=I,pt.ContextProvider=N,pt.Element=T,pt.ForwardRef=k,pt.Fragment=z,pt.Lazy=L,pt.Memo=K,pt.Portal=G,pt.Profiler=A,pt.StrictMode=Y,pt.Suspense=B,pt.SuspenseList=X,pt.isAsyncMode=j,pt.isConcurrentMode=W,pt.isContextConsumer=Z,pt.isContextProvider=J,pt.isElement=M,pt.isForwardRef=H,pt.isFragment=q,pt.isLazy=D,pt.isMemo=V,pt.isPortal=Q,pt.isProfiler=ne,pt.isStrictMode=ce,pt.isSuspense=ee,pt.isSuspenseList=pe,pt.isValidElementType=E,pt.typeOf=S})()),pt}var SC;function fK(){return SC||(SC=1,process.env.NODE_ENV==="production"?zh.exports=uK():zh.exports=dK()),zh.exports}var EC=fK();const OC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,CC=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",qc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return CC(r.overflowY,t)||CC(r.overflowX,t)||(n=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1},Lc=(e,t,r,n,i,o,a,s)=>o<e&&a>t||o>e&&a<t?0:o<=e&&s<=r||a>=t&&s>=r?o-e-n:a>t&&s<r||o<e&&s>r?a-t+i:0,hK=e=>e.parentElement??(e.getRootNode().host||null),pK=(e,t)=>{var r,n,i,o;if(typeof document>"u")return[];const{inline:a,boundary:s,skipOverflowHiddenElements:c}=t,u=typeof s=="function"?s:G=>G!==s;if(!OC(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=e;for(;OC(p)&&u(p);){if(p=hK(p),p===d){h.push(p);break}p!=null&&p===document.body&&qc(p)&&!qc(document.documentElement)||p!=null&&qc(p,c)&&h.push(p)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,x=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:g,scrollY:b}=window,{height:w,width:y,top:_,right:E,bottom:S,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:k}=(G=>{const A=window.getComputedStyle(G);return{top:parseFloat(A.scrollMarginTop)||0,right:parseFloat(A.scrollMarginRight)||0,bottom:parseFloat(A.scrollMarginBottom)||0,left:parseFloat(A.scrollMarginLeft)||0}})(e);let z=_-N,L=a==="center"?I+y/2-k+T:a==="end"?E+T:I-k;const K=[];for(let G=0;G<h.length;G++){const A=h[G],{height:Y,width:B,top:X,right:U,bottom:re,left:j}=A.getBoundingClientRect();if(_>=0&&I>=0&&S<=x&&E<=v&&(A===d&&!qc(A)||_>=X&&S<=re&&I>=j&&E<=U))return K;const W=getComputedStyle(A),Z=parseInt(W.borderLeftWidth,10),J=parseInt(W.borderTopWidth,10),M=parseInt(W.borderRightWidth,10),H=parseInt(W.borderBottomWidth,10);let q=0,D=0;const V="offsetWidth"in A?A.offsetWidth-A.clientWidth-Z-M:0,Q="offsetHeight"in A?A.offsetHeight-A.clientHeight-J-H:0,ne="offsetWidth"in A?A.offsetWidth===0?0:B/A.offsetWidth:0,ce="offsetHeight"in A?A.offsetHeight===0?0:Y/A.offsetHeight:0;if(d===A)q=Lc(b,b+x,x,J,H,b+z,b+z+w,w),D=a==="start"?L:a==="center"?L-v/2:a==="end"?L-v:Lc(g,g+v,v,Z,M,g+L,g+L+y,y),q=Math.max(0,q+b),D=Math.max(0,D+g);else{q=Lc(X,re,Y,J,H+Q,z,z+w,w),D=a==="start"?L-j-Z:a==="center"?L-(j+B/2)+V/2:a==="end"?L-U+M+V:Lc(j,U,B,Z,M+V,L,L+y,y);const{scrollLeft:ee,scrollTop:pe}=A;q=ce===0?0:Math.max(0,Math.min(pe+q/ce,A.scrollHeight-Y/ce+Q)),D=ne===0?0:Math.max(0,Math.min(ee+D/ne,A.scrollWidth-B/ne+V)),z+=pe-q,L+=ee-D}K.push({el:A,top:q,left:D})}return K};var wa=function(){return wa=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wa.apply(this,arguments)},vK=0;function IC(e){return typeof e=="function"?e:Or}function Or(){}function v3(e,t){if(e){var r=pK(e,{boundary:t});r.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scrollTop=o,i.scrollLeft=a})}}function RC(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function fd(e,t){var r;function n(){r&&clearTimeout(r)}function i(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];n(),r=setTimeout(function(){r=null,e.apply(void 0,a)},t)}return i.cancel=n,i}function at(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return s&&s.apply(void 0,[n].concat(o)),n.preventDownshiftDefault||n.hasOwnProperty("nativeEvent")&&n.nativeEvent.preventDownshiftDefault})}}function qn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){t.forEach(function(i){typeof i=="function"?i(n):i&&(i.current=n)})}}function g3(){return String(vK++)}function gK(e){var t=e.isOpen,r=e.resultCount,n=e.previousResultCount;return t?r?r!==n?r+" result"+(r===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function NC(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function m3(e){return typeof e.type=="string"}function b3(e){return e.props}function mK(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var bK=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function zc(e){e===void 0&&(e={});var t={};return bK.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function nl(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=Du(t,n)?t[n]:e[n],r},{})}function Du(e,t){return e[t]!==void 0}function _a(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function yK(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ln(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(o===0)return-1;var a=o-1;(typeof e!="number"||e<0||e>a)&&(e=t>0?-1:a+1);var s=e+t;s<0?s=i?a:0:s>a&&(s=i?0:a);var c=Zi(s,t<0,r,n,i);return c===-1?e>=o?-1:e:c}function Zi(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(t){for(var a=e;a>=0;a--)if(!n(r[a],a))return a}else for(var s=e;s<o;s++)if(!n(r[s],s))return s;return i?Zi(t?o-1:0,t,r,n):-1}function ju(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(i){return i&&(RC(i,e,r)||n&&RC(i,r.document.activeElement,r))})}var v1=Or;process.env.NODE_ENV!=="production"&&(v1=function(e,t,r){var n="This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props";Object.keys(e).forEach(function(i){t[i]!==void 0&&r[i]===void 0?console.error('downshift: A component has changed the controlled prop "'+i+'" to be uncontrolled. '+n):t[i]===void 0&&r[i]!==void 0&&console.error('downshift: A component has changed the uncontrolled prop "'+i+'" to be controlled. '+n)})});var xK=fd(function(e){y3(e).textContent=""},500);function y3(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function x3(e,t){if(!(!e||!t)){var r=y3(t);r.textContent=e,xK(t)}}function wK(e){var t=e==null?void 0:e.getElementById("a11y-status-message");t&&t.remove()}var w3=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,_3=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,S3=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,uu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,du=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,E3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,O3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,C3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,I3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,R3=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,N3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,T3=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,P3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Ew=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,k3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,M3=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,A3=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,_K=Object.freeze({__proto__:null,blurButton:k3,blurInput:N3,changeInput:T3,clickButton:Ew,clickItem:R3,controlledPropUpdatedSelectedItem:M3,itemMouseEnter:S3,keyDownArrowDown:du,keyDownArrowUp:uu,keyDownEnd:I3,keyDownEnter:O3,keyDownEscape:E3,keyDownHome:C3,keyDownSpaceButton:P3,mouseUp:_3,touchEnd:A3,unknown:w3}),SK=["refKey","ref"],EK=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],OK=["onKeyDown","onBlur","onChange","onInput","onChangeText"],CK=["refKey","ref"],IK=["onMouseMove","onMouseDown","onClick","onPress","index","item"],RK=(function(){var e=(function(t){function r(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+g3(),o.menuId=o.props.menuId||o.id+"-menu",o.labelId=o.props.labelId||o.id+"-label",o.inputId=o.props.inputId||o.id+"-input",o.getItemId=o.props.getItemId||function(y){return o.id+"-item-"+y},o.items=[],o.itemCount=null,o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(y,_){var E=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function(S){return S!==E}),y()},_);o.timeoutIds.push(E)},o.setItemCount=function(y){o.itemCount=y},o.unsetItemCount=function(){o.itemCount=null},o.isItemDisabled=function(y,_){var E=o.getItemNodeFromIndex(_);return E&&E.hasAttribute("disabled")},o.setHighlightedIndex=function(y,_){y===void 0&&(y=o.props.defaultHighlightedIndex),_===void 0&&(_={}),_=zc(_),o.internalSetState(Ae({highlightedIndex:y},_))},o.clearSelection=function(y){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},y)},o.selectItem=function(y,_,E){_=zc(_),o.internalSetState(Ae({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:y,inputValue:o.props.itemToString(y)},_),E)},o.selectItemAtIndex=function(y,_,E){var S=o.items[y];S!=null&&o.selectItem(S,_,E)},o.selectHighlightedItem=function(y,_){return o.selectItemAtIndex(o.getState().highlightedIndex,y,_)},o.internalSetState=function(y,_){var E,S,I={},N=typeof y=="function";return!N&&y.hasOwnProperty("inputValue")&&o.props.onInputValueChange(y.inputValue,Ae({},o.getStateAndHelpers(),y)),o.setState(function(T){var k;T=o.getState(T);var z=N?y(T):y;z=o.props.stateReducer(T,z),E=z.hasOwnProperty("selectedItem");var L={};return E&&z.selectedItem!==T.selectedItem&&(S=z.selectedItem),(k=z).type||(k.type=w3),Object.keys(z).forEach(function(K){T[K]!==z[K]&&(I[K]=z[K]),K!=="type"&&(z[K],Du(o.props,K)||(L[K]=z[K]))}),N&&z.hasOwnProperty("inputValue")&&o.props.onInputValueChange(z.inputValue,Ae({},o.getStateAndHelpers(),z)),L},function(){IC(_)();var T=Object.keys(I).length>1;T&&o.props.onStateChange(I,o.getStateAndHelpers()),E&&o.props.onSelect(y.selectedItem,o.getStateAndHelpers()),S!==void 0&&o.props.onChange(S,o.getStateAndHelpers()),o.props.onUserAction(I,o.getStateAndHelpers())})},o.rootRef=function(y){return o._rootNode=y},o.getRootProps=function(y,_){var E,S=y===void 0?{}:y,I=S.refKey,N=I===void 0?"ref":I,T=S.ref,k=Cr(S,SK),z=_===void 0?{}:_,L=z.suppressRefError,K=L===void 0?!1:L;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=K;var G=o.getState(),A=G.isOpen;return Ae((E={},E[N]=qn(T,o.rootRef),E.role="combobox",E["aria-expanded"]=A,E["aria-haspopup"]="listbox",E["aria-owns"]=A?o.menuId:void 0,E["aria-labelledby"]=o.labelId,E),k)},o.keyDownHandlers={ArrowDown:function(y){var _=this;if(y.preventDefault(),this.getState().isOpen){var E=y.shiftKey?5:1;this.moveHighlightedIndex(E,{type:du})}else this.internalSetState({isOpen:!0,type:du},function(){var S=_.getItemCount();if(S>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,1,{length:S},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:du})}})},ArrowUp:function(y){var _=this;if(y.preventDefault(),this.getState().isOpen){var E=y.shiftKey?-5:-1;this.moveHighlightedIndex(E,{type:uu})}else this.internalSetState({isOpen:!0,type:uu},function(){var S=_.getItemCount();if(S>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,-1,{length:S},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:uu})}})},Enter:function(y){if(y.which!==229){var _=this.getState(),E=_.isOpen,S=_.highlightedIndex;if(E&&S!=null){y.preventDefault();var I=this.items[S],N=this.getItemNodeFromIndex(S);if(I==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:O3})}}},Escape:function(y){y.preventDefault(),this.reset(Ae({type:E3},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=Ae({},o.keyDownHandlers,{" ":function(y){y.preventDefault(),this.toggleMenu({type:P3})}}),o.inputKeyDownHandlers=Ae({},o.keyDownHandlers,{Home:function(y){var _=this.getState(),E=_.isOpen;if(E){y.preventDefault();var S=this.getItemCount();if(!(S<=0||!E)){var I=Zi(0,!1,{length:S},this.isItemDisabled);this.setHighlightedIndex(I,{type:C3})}}},End:function(y){var _=this.getState(),E=_.isOpen;if(E){y.preventDefault();var S=this.getItemCount();if(!(S<=0||!E)){var I=Zi(S-1,!0,{length:S},this.isItemDisabled);this.setHighlightedIndex(I,{type:I3})}}}}),o.getToggleButtonProps=function(y){var _=y===void 0?{}:y,E=_.onClick;_.onPress;var S=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=Cr(_,EK),k=o.getState(),z=k.isOpen,L={onClick:at(E,o.buttonHandleClick),onKeyDown:at(S,o.buttonHandleKeyDown),onKeyUp:at(I,o.buttonHandleKeyUp),onBlur:at(N,o.buttonHandleBlur)},K=T.disabled?{}:L;return Ae({type:"button",role:"button","aria-label":z?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},K,T)},o.buttonHandleKeyUp=function(y){y.preventDefault()},o.buttonHandleKeyDown=function(y){var _=_a(y);o.buttonKeyDownHandlers[_]&&o.buttonKeyDownHandlers[_].call(o,y)},o.buttonHandleClick=function(y){if(y.preventDefault(),o.props.environment){var _=o.props.environment.document,E=_.body,S=_.activeElement;E&&E===S&&y.target.focus()}process.env.NODE_ENV==="test"?o.toggleMenu({type:Ew}):o.internalSetTimeout(function(){return o.toggleMenu({type:Ew})})},o.buttonHandleBlur=function(y){var _=y.target;o.internalSetTimeout(function(){if(!(o.isMouseDown||!o.props.environment)){var E=o.props.environment.document.activeElement;(E==null||E.id!==o.inputId)&&E!==_&&o.reset({type:k3})}})},o.getLabelProps=function(y){return Ae({htmlFor:o.inputId,id:o.labelId},y)},o.getInputProps=function(y){var _=y===void 0?{}:y,E=_.onKeyDown,S=_.onBlur,I=_.onChange,N=_.onInput;_.onChangeText;var T=Cr(_,OK),k,z={};k="onChange";var L=o.getState(),K=L.inputValue,G=L.isOpen,A=L.highlightedIndex;if(!T.disabled){var Y;z=(Y={},Y[k]=at(I,N,o.inputHandleChange),Y.onKeyDown=at(E,o.inputHandleKeyDown),Y.onBlur=at(S,o.inputHandleBlur),Y)}return Ae({"aria-autocomplete":"list","aria-activedescendant":G&&typeof A=="number"&&A>=0?o.getItemId(A):void 0,"aria-controls":G?o.menuId:void 0,"aria-labelledby":T&&T["aria-label"]?void 0:o.labelId,autoComplete:"off",value:K,id:o.inputId},z,T)},o.inputHandleKeyDown=function(y){var _=_a(y);_&&o.inputKeyDownHandlers[_]&&o.inputKeyDownHandlers[_].call(o,y)},o.inputHandleChange=function(y){o.internalSetState({type:T3,isOpen:!0,inputValue:y.target.value,highlightedIndex:o.props.defaultHighlightedIndex})},o.inputHandleBlur=function(){o.internalSetTimeout(function(){var y;if(!(o.isMouseDown||!o.props.environment)){var _=o.props.environment.document.activeElement,E=(_==null||(y=_.dataset)==null?void 0:y.toggle)&&o._rootNode&&o._rootNode.contains(_);E||o.reset({type:N3})}})},o.menuRef=function(y){o._menuNode=y},o.getMenuProps=function(y,_){var E,S=y===void 0?{}:y,I=S.refKey,N=I===void 0?"ref":I,T=S.ref,k=Cr(S,CK),z=_===void 0?{}:_,L=z.suppressRefError,K=L===void 0?!1:L;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=K,Ae((E={},E[N]=qn(T,o.menuRef),E.role="listbox",E["aria-labelledby"]=k&&k["aria-label"]?void 0:o.labelId,E.id=o.menuId,E),k)},o.getItemProps=function(y){var _,E=y===void 0?{}:y,S=E.onMouseMove,I=E.onMouseDown,N=E.onClick;E.onPress;var T=E.index,k=E.item,z=k===void 0?process.env.NODE_ENV==="production"?void 0:mK("getItemProps","item"):k,L=Cr(E,IK);T===void 0?(o.items.push(z),T=o.items.indexOf(z)):o.items[T]=z;var K="onClick",G=N,A=(_={onMouseMove:at(S,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:S3}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:at(I,function(B){B.preventDefault()})},_[K]=at(G,function(){o.selectItemAtIndex(T,{type:R3})}),_),Y=L.disabled?{onMouseDown:A.onMouseDown}:A;return Ae({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},Y,L)},o.clearItems=function(){o.items=[]},o.reset=function(y,_){y===void 0&&(y={}),y=zc(y),o.internalSetState(function(E){var S=E.selectedItem;return Ae({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString(S)},y)},_)},o.toggleMenu=function(y,_){y===void 0&&(y={}),y=zc(y),o.internalSetState(function(E){var S=E.isOpen;return Ae({isOpen:!S},S&&{highlightedIndex:o.props.defaultHighlightedIndex},y)},function(){var E=o.getState(),S=E.isOpen,I=E.highlightedIndex;S&&o.getItemCount()>0&&typeof I=="number"&&o.setHighlightedIndex(I,y),IC(_)()})},o.openMenu=function(y){o.internalSetState({isOpen:!0},y)},o.closeMenu=function(y){o.internalSetState({isOpen:!1},y)},o.updateStatus=fd(function(){var y;if((y=o.props)!=null&&(y=y.environment)!=null&&y.document){var _=o.getState(),E=o.items[_.highlightedIndex],S=o.getItemCount(),I=o.props.getA11yStatusMessage(Ae({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:S,highlightedItem:E},_));o.previousResultCount=S,x3(I,o.props.environment.document)}},200);var a=o.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=c===void 0?s:c,d=a.defaultIsOpen,h=a.initialIsOpen,p=h===void 0?d:h,v=a.initialInputValue,x=v===void 0?"":v,g=a.initialSelectedItem,b=g===void 0?null:g,w=o.getState({highlightedIndex:u,isOpen:p,inputValue:x,selectedItem:b});return w.selectedItem!=null&&o.props.initialInputValue===void 0&&(w.inputValue=o.props.itemToString(w.selectedItem)),o.state=w,o}tK(r,t);var n=r.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach(function(i){clearTimeout(i)}),this.timeoutIds=[]},n.getState=function(i){return i===void 0&&(i=this.state),nl(i,this.props)},n.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},n.getItemNodeFromIndex=function(i){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(i)):null},n.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},n.moveHighlightedIndex=function(i,o){var a=this.getItemCount(),s=this.getState(),c=s.highlightedIndex;if(a>0){var u=Ln(c,i,{length:a},this.isItemDisabled,!0);this.setHighlightedIndex(u,o)}},n.getStateAndHelpers=function(){var i=this.getState(),o=i.highlightedIndex,a=i.inputValue,s=i.selectedItem,c=i.isOpen,u=this.props.itemToString,d=this.id,h=this.getRootProps,p=this.getToggleButtonProps,v=this.getLabelProps,x=this.getMenuProps,g=this.getInputProps,b=this.getItemProps,w=this.openMenu,y=this.closeMenu,_=this.toggleMenu,E=this.selectItem,S=this.selectItemAtIndex,I=this.selectHighlightedItem,N=this.setHighlightedIndex,T=this.clearSelection,k=this.clearItems,z=this.reset,L=this.setItemCount,K=this.unsetItemCount,G=this.internalSetState;return{getRootProps:h,getToggleButtonProps:p,getLabelProps:v,getMenuProps:x,getInputProps:g,getItemProps:b,reset:z,openMenu:w,closeMenu:y,toggleMenu:_,selectItem:E,selectItemAtIndex:S,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:k,setItemCount:L,unsetItemCount:K,setState:G,itemToString:u,id:d,highlightedIndex:o,inputValue:a,isOpen:c,selectedItem:s}},n.componentDidMount=function(){var i=this;if(process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&TC(this._menuNode,this.getMenuProps),!this.props.environment)this.cleanup=function(){i.internalClearTimeouts()};else{var o=function(){i.isMouseDown=!0},a=function(h){i.isMouseDown=!1;var p=ju(h.target,[i._rootNode,i._menuNode],i.props.environment);!p&&i.getState().isOpen&&i.reset({type:_3},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},s=function(){i.isTouchMove=!1},c=function(){i.isTouchMove=!0},u=function(h){var p=ju(h.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!p&&i.getState().isOpen&&i.reset({type:A3},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},d=this.props.environment;d.addEventListener("mousedown",o),d.addEventListener("mouseup",a),d.addEventListener("touchstart",s),d.addEventListener("touchmove",c),d.addEventListener("touchend",u),this.cleanup=function(){i.internalClearTimeouts(),i.updateStatus.cancel(),d.removeEventListener("mousedown",o),d.removeEventListener("mouseup",a),d.removeEventListener("touchstart",s),d.removeEventListener("touchmove",c),d.removeEventListener("touchend",u)}}},n.shouldScroll=function(i,o){var a=this.props.highlightedIndex===void 0?this.getState():this.props,s=a.highlightedIndex,c=o.highlightedIndex===void 0?i:o,u=c.highlightedIndex,d=s&&this.getState().isOpen&&!i.isOpen,h=s!==u;return d||h},n.componentDidUpdate=function(i,o){process.env.NODE_ENV!=="production"&&(v1(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&TC(this._menuNode,this.getMenuProps)),Du(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:M3,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(o,i)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var i=NC(this.props.children,Or);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var o=NC(i(this.getStateAndHelpers()));if(!o)return null;if(this.getRootProps.called||this.props.suppressRefError)return process.env.NODE_ENV!=="production"&&!this.getRootProps.suppressRefError&&!this.props.suppressRefError&&NK(o,this.getRootProps),o;if(m3(o))return C.cloneElement(o,this.getRootProps(b3(o)));if(process.env.NODE_ENV!=="production")throw new Error("downshift: If you return a non-DOM element, you must apply the getRootProps function")},r})(C.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:gK,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&yK(t)&&!t.hasOwnProperty("toString")&&console.warn("downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.","The object that was passed:",t),String(t))},onStateChange:Or,onInputValueChange:Or,onUserAction:Or,onChange:Or,onSelect:Or,onOuterClick:Or,selectedItemChanged:function(t,r){return t!==r},environment:typeof window>"u"?void 0:window,stateReducer:function(t,r){return r},suppressRefError:!1,scrollIntoView:v3},e.stateChangeTypes=_K,e})();process.env.NODE_ENV!=="production"&&(RK.propTypes={children:we.func,defaultHighlightedIndex:we.number,defaultIsOpen:we.bool,initialHighlightedIndex:we.number,initialSelectedItem:we.any,initialInputValue:we.string,initialIsOpen:we.bool,getA11yStatusMessage:we.func,itemToString:we.func,onChange:we.func,onSelect:we.func,onStateChange:we.func,onInputValueChange:we.func,onUserAction:we.func,onOuterClick:we.func,selectedItemChanged:we.func,stateReducer:we.func,itemCount:we.number,id:we.string,environment:we.shape({addEventListener:we.func.isRequired,removeEventListener:we.func.isRequired,document:we.shape({createElement:we.func.isRequired,getElementById:we.func.isRequired,activeElement:we.any.isRequired,body:we.any.isRequired}).isRequired,Node:we.func.isRequired}),suppressRefError:we.bool,scrollIntoView:we.func,selectedItem:we.any,isOpen:we.bool,inputValue:we.string,highlightedIndex:we.number,labelId:we.string,inputId:we.string,menuId:we.string,getItemId:we.func});function TC(e,t){var r=t.refKey;e||console.error('downshift: The ref prop "'+r+'" from getMenuProps was not applied correctly on your menu element.')}function NK(e,t){var r=t.refKey,n=r!=="ref",i=!m3(e);i&&!n&&!EC.isForwardRef(e)?console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps"):!i&&n&&console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+r+'"'),!EC.isForwardRef(e)&&!b3(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}var D3={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function TK(e,t,r){var n=e.props,i=e.type,o={};Object.keys(t).forEach(function(a){PK(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange(Ae({type:i},o))}function PK(e,t,r,n){var i=t.props,o=t.type,a="on"+m1(e)+"Change";i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a](Ae({type:o},n))}function kK(e,t){return t.changes}var PC=fd(function(e,t){x3(e,t)},200),MK=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?C.useLayoutEffect:C.useEffect,j3="useId"in C?function(e){var t=e.id,r=e.labelId,n=e.menuId,i=e.getItemId,o=e.toggleButtonId,a=e.inputId,s="downshift-"+C.useId();t||(t=s);var c=C.useMemo(function(){return{labelId:r||t+"-label",menuId:n||t+"-menu",getItemId:i||function(u){return t+"-item-"+u},toggleButtonId:o||t+"-toggle-button",inputId:a||t+"-input"}},[i,t,a,r,n,o]);return c}:function(e){var t=e.id,r=t===void 0?"downshift-"+g3():t,n=e.labelId,i=e.menuId,o=e.getItemId,a=e.toggleButtonId,s=e.inputId,c=C.useMemo(function(){return{labelId:n||r+"-label",menuId:i||r+"-menu",getItemId:o||function(u){return r+"-item-"+u},toggleButtonId:a||r+"-toggle-button",inputId:s||r+"-input"}},[o,r,s,n,i,a]);return c};function g1(e,t,r,n){var i,o;if(e===void 0){if(t===void 0)throw new Error(n);i=r[t],o=t}else o=t===void 0?r.indexOf(e):t,i=e;return[i,o]}function AK(e){return/^\S{1}$/.test(e)}function m1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function hd(e){var t=C.useRef(e);return t.current=e,t}function q3(e,t,r,n){var i=C.useRef(),o=C.useRef(),a=C.useCallback(function(v,x){o.current=x,v=nl(v,x.props);var g=e(v,x),b=x.props.stateReducer(v,Ae({},x,{changes:g}));return b},[e]),s=C.useReducer(a,t,r),c=s[0],u=s[1],d=hd(t),h=C.useCallback(function(v){return u(Ae({props:d.current},v))},[d]),p=o.current;return C.useEffect(function(){var v=nl(i.current,p==null?void 0:p.props),x=p&&i.current&&!n(v,c);x&&TK(p,v,c),i.current=c},[c,p,n]),[c,h]}function L3(e,t,r,n){var i=q3(e,t,r,n),o=i[0],a=i[1];return[nl(o,t),a]}var Gs={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:kK,scrollIntoView:v3,environment:typeof window>"u"?void 0:window};function ti(e,t,r){r===void 0&&(r=D3);var n=e["default"+m1(t)];return n!==void 0?n:r[t]}function bo(e,t,r){r===void 0&&(r=D3);var n=e[t];if(n!==void 0)return n;var i=e["initial"+m1(t)];return i!==void 0?i:ti(e,t,r)}function z3(e){var t=bo(e,"selectedItem"),r=bo(e,"isOpen"),n=DK(e),i=bo(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.findIndex(function(o){return e.itemToKey(o)===e.itemToKey(t)}):n,isOpen:r,selectedItem:t,inputValue:i}}function yo(e,t,r){var n=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,a=e.isItemDisabled,s=e.itemToKey,c=t.selectedItem,u=t.highlightedIndex;return n.length===0?-1:i!==void 0&&u===i&&!a(n[i],i)?i:o!==void 0&&!a(n[o],o)?o:c?n.findIndex(function(d){return s(c)===s(d)}):r<0&&!a(n[n.length-1],n.length-1)?n.length-1:r>0&&!a(n[0],0)?0:-1}function B3(e,t,r){var n=C.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),i=C.useCallback(function(){return r.map(function(o){return o.current})},[r]);return C.useEffect(function(){if(!e)return Or;function o(){n.current.isTouchEnd=!1,n.current.isMouseDown=!0}function a(d){n.current.isMouseDown=!1,ju(d.target,i(),e)||t()}function s(){n.current.isTouchEnd=!1,n.current.isTouchMove=!1}function c(){n.current.isTouchMove=!0}function u(d){n.current.isTouchEnd=!0,!n.current.isTouchMove&&!ju(d.target,i(),e,!1)&&t()}return e.addEventListener("mousedown",o),e.addEventListener("mouseup",a),e.addEventListener("touchstart",s),e.addEventListener("touchmove",c),e.addEventListener("touchend",u),function(){e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",a),e.removeEventListener("touchstart",s),e.removeEventListener("touchmove",c),e.removeEventListener("touchend",u)}},[e,i,t]),n.current}var pd=function(){return Or};process.env.NODE_ENV!=="production"&&(pd=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=C.useRef(t.reduce(function(o,a){return o[a]={},o},{}));C.useEffect(function(){Object.keys(n.current).forEach(function(o){var a=n.current[o];if(!Object.keys(a).length){console.error("downshift: You forgot to call the "+o+" getter function on your component / element.");return}var s=a.suppressRefError,c=a.refKey,u=a.elementRef;s||u!=null&&u.current||console.error('downshift: The ref prop "'+c+'" from '+o+" was not applied correctly on your element.")})},[]);var i=C.useCallback(function(o,a,s,c){n.current[o]={suppressRefError:a,refKey:s,elementRef:c}},[]);return i});function b1(e,t,r,n){n===void 0&&(n={});var i=n.document,o=yl();C.useEffect(function(){if(!(!e||o||!i)){var a=e(t);PC(a,i)}},r),C.useEffect(function(){return function(){PC.cancel(),wK(i)}},[i])}function F3(e){var t=e.highlightedIndex,r=e.isOpen,n=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,a=e.scrollIntoView,s=C.useRef(!0);return MK(function(){t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(i(t),o))},[t]),s}var vd=Or;process.env.NODE_ENV!=="production"&&(vd=function(e){var t=e.props,r=e.state,n=C.useRef(t),i=yl();C.useEffect(function(){i||(v1(r,n.current,t),n.current=t)},[r,t,i])});function qu(e,t,r){var n;r===void 0&&(r=!0);var i=((n=e.items)==null?void 0:n.length)&&t>=0;return Ae({isOpen:!1,highlightedIndex:-1},i&&Ae({selectedItem:e.items[t],isOpen:ti(e,"isOpen"),highlightedIndex:ti(e,"highlightedIndex")},r&&{inputValue:e.itemToString(e.items[t])}))}function $3(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function yl(){var e=C.useRef(!0);return C.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Lu(e){var t=ti(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function DK(e){var t=bo(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var fu={environment:we.shape({addEventListener:we.func.isRequired,removeEventListener:we.func.isRequired,document:we.shape({createElement:we.func.isRequired,getElementById:we.func.isRequired,activeElement:we.any.isRequired,body:we.any.isRequired}).isRequired,Node:we.func.isRequired}),itemToString:we.func,itemToKey:we.func,stateReducer:we.func},H3=Ae({},fu,{getA11yStatusMessage:we.func,highlightedIndex:we.number,defaultHighlightedIndex:we.number,initialHighlightedIndex:we.number,isOpen:we.bool,defaultIsOpen:we.bool,initialIsOpen:we.bool,selectedItem:we.any,initialSelectedItem:we.any,defaultSelectedItem:we.any,id:we.string,labelId:we.string,menuId:we.string,getItemId:we.func,toggleButtonId:we.string,onSelectedItemChange:we.func,onHighlightedIndexChange:we.func,onStateChange:we.func,onIsOpenChange:we.func,scrollIntoView:we.func});function V3(e,t,r){var n=t.type,i=t.props,o;switch(n){case r.ItemMouseMove:o={highlightedIndex:t.disabled?-1:t.index};break;case r.MenuMouseLeave:o={highlightedIndex:-1};break;case r.ToggleButtonClick:case r.FunctionToggleMenu:o={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:yo(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:yo(i,e,0)};break;case r.FunctionCloseMenu:o={isOpen:!1};break;case r.FunctionSetHighlightedIndex:o={highlightedIndex:i.isItemDisabled(i.items[t.highlightedIndex],t.highlightedIndex)?-1:t.highlightedIndex};break;case r.FunctionSetInputValue:o={inputValue:t.inputValue};break;case r.FunctionReset:o={highlightedIndex:Lu(i),isOpen:ti(i,"isOpen"),selectedItem:ti(i,"selectedItem"),inputValue:ti(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Ae({},e,o)}function jK(e){for(var t=e.keysSoFar,r=e.highlightedIndex,n=e.items,i=e.itemToString,o=e.isItemDisabled,a=t.toLowerCase(),s=0;s<n.length;s++){var c=(s+r+(t.length<2?1:0))%n.length,u=n[c];if(u!==void 0&&i(u).toLowerCase().startsWith(a)&&!o(u,c))return c}return r}var qK=wa(wa({},H3),{items:we.array.isRequired,isItemDisabled:we.func}),LK=wa(wa({},Gs),{isItemDisabled:function(){return!1}}),W3=Or;process.env.NODE_ENV!=="production"&&(W3=function(e,t){we.checkPropTypes(qK,e,"prop",t.name)});var hu=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,y1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,x1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,zu=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,w1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,_1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,S1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,E1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,O1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,C1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,I1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,Bu=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,U3=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,G3=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,R1=process.env.NODE_ENV!=="production"?"__item_click__":14,K3=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,Y3=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,X3=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,Z3=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,N1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Ow=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,J3=process.env.NODE_ENV!=="production"?"__function_reset__":21,Q3=Object.freeze({__proto__:null,FunctionCloseMenu:X3,FunctionOpenMenu:Y3,FunctionReset:J3,FunctionSelectItem:N1,FunctionSetHighlightedIndex:Z3,FunctionSetInputValue:Ow,FunctionToggleMenu:K3,ItemClick:R1,ItemMouseMove:G3,MenuMouseLeave:U3,ToggleButtonBlur:Bu,ToggleButtonClick:hu,ToggleButtonKeyDownArrowDown:y1,ToggleButtonKeyDownArrowUp:x1,ToggleButtonKeyDownCharacter:zu,ToggleButtonKeyDownEnd:S1,ToggleButtonKeyDownEnter:E1,ToggleButtonKeyDownEscape:w1,ToggleButtonKeyDownHome:_1,ToggleButtonKeyDownPageDown:I1,ToggleButtonKeyDownPageUp:C1,ToggleButtonKeyDownSpaceButton:O1});function zK(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case R1:a={isOpen:ti(i,"isOpen"),highlightedIndex:Lu(i),selectedItem:i.items[t.index]};break;case zu:{var s=t.key,c=""+e.inputValue+s,u=!e.isOpen&&e.selectedItem?i.items.findIndex(function(v){return i.itemToKey(v)===i.itemToKey(e.selectedItem)}):e.highlightedIndex,d=jK({keysSoFar:c,highlightedIndex:u,items:i.items,itemToString:i.itemToString,isItemDisabled:i.isItemDisabled});a={inputValue:c,highlightedIndex:d,isOpen:!0}}break;case y1:{var h=e.isOpen?Ln(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:yo(i,e,1);a={highlightedIndex:h,isOpen:!0}}break;case x1:if(e.isOpen&&o)a=qu(i,e.highlightedIndex,!1);else{var p=e.isOpen?Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled):yo(i,e,-1);a={highlightedIndex:p,isOpen:!0}}break;case E1:case O1:a=qu(i,e.highlightedIndex,!1);break;case _1:a={highlightedIndex:Zi(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case S1:a={highlightedIndex:Zi(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case C1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case I1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case w1:a={isOpen:!1,highlightedIndex:-1};break;case Bu:a=Ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case N1:a={selectedItem:t.selectedItem};break;default:return V3(e,t,Q3)}return Ae({},e,a)}var BK=["onClick"],FK=["onMouseLeave","refKey","ref"],$K=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],HK=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];yi.stateChangeTypes=Q3;function yi(e){e===void 0&&(e={}),W3(e,yi);var t=Ae({},LK,e),r=t.scrollIntoView,n=t.environment,i=t.getA11yStatusMessage,o=L3(zK,t,z3,$3),a=o[0],s=o[1],c=a.isOpen,u=a.highlightedIndex,d=a.selectedItem,h=a.inputValue,p=C.useRef(null),v=C.useRef(null),x=C.useRef({}),g=C.useRef(null),b=j3(t),w=hd({state:a,props:t}),y=C.useCallback(function(j){return x.current[b.getItemId(j)]},[b]);b1(i,a,[c,u,d,h],n);var _=F3({menuElement:v.current,highlightedIndex:u,isOpen:c,itemRefs:x,scrollIntoView:r,getItemNodeFromIndex:y});C.useEffect(function(){return g.current=fd(function(j){j({type:Ow,inputValue:""})},500),function(){g.current.cancel()}},[]),C.useEffect(function(){h&&g.current(s)},[s,h]),vd({props:t,state:a}),C.useEffect(function(){var j=bo(t,"isOpen");j&&p.current&&p.current.focus()},[]);var E=C.useCallback(function(){w.current.state.isOpen&&s({type:Bu})},[s,w]),S=C.useMemo(function(){return[v,p]},[]),I=B3(n,E,S),N=pd("getMenuProps","getToggleButtonProps");C.useEffect(function(){c||(x.current={})},[c]);var T=C.useMemo(function(){return{ArrowDown:function(j){j.preventDefault(),s({type:y1,altKey:j.altKey})},ArrowUp:function(j){j.preventDefault(),s({type:x1,altKey:j.altKey})},Home:function(j){j.preventDefault(),s({type:_1})},End:function(j){j.preventDefault(),s({type:S1})},Escape:function(){w.current.state.isOpen&&s({type:w1})},Enter:function(j){j.preventDefault(),s({type:w.current.state.isOpen?E1:hu})},PageUp:function(j){w.current.state.isOpen&&(j.preventDefault(),s({type:C1}))},PageDown:function(j){w.current.state.isOpen&&(j.preventDefault(),s({type:I1}))}," ":function(j){j.preventDefault();var W=w.current.state;if(!W.isOpen){s({type:hu});return}W.inputValue?s({type:zu,key:" "}):s({type:O1})}}},[s,w]),k=C.useCallback(function(){s({type:K3})},[s]),z=C.useCallback(function(){s({type:X3})},[s]),L=C.useCallback(function(){s({type:Y3})},[s]),K=C.useCallback(function(j){s({type:Z3,highlightedIndex:j})},[s]),G=C.useCallback(function(j){s({type:N1,selectedItem:j})},[s]),A=C.useCallback(function(){s({type:J3})},[s]),Y=C.useCallback(function(j){s({type:Ow,inputValue:j})},[s]),B=C.useCallback(function(j){var W=j===void 0?{}:j,Z=W.onClick,J=Cr(W,BK),M=function(){var H;(H=p.current)==null||H.focus()};return Ae({id:b.labelId,htmlFor:b.toggleButtonId,onClick:at(Z,M)},J)},[b]),X=C.useCallback(function(j,W){var Z,J=j===void 0?{}:j,M=J.onMouseLeave,H=J.refKey,q=H===void 0?"ref":H,D=J.ref,V=Cr(J,FK),Q=W===void 0?{}:W,ne=Q.suppressRefError,ce=ne===void 0?!1:ne,ee=function(){s({type:U3})};return N("getMenuProps",ce,q,v),Ae((Z={},Z[q]=qn(D,function(pe){v.current=pe}),Z.id=b.menuId,Z.role="listbox",Z["aria-labelledby"]=V&&V["aria-label"]?void 0:""+b.labelId,Z.onMouseLeave=at(M,ee),Z),V)},[s,N,b]),U=C.useCallback(function(j,W){var Z,J=j===void 0?{}:j,M=J.onBlur,H=J.onClick;J.onPress;var q=J.onKeyDown,D=J.refKey,V=D===void 0?"ref":D,Q=J.ref,ne=Cr(J,$K),ce=W===void 0?{}:W,ee=ce.suppressRefError,pe=ee===void 0?!1:ee,ue=w.current.state,xe=function(){s({type:hu})},le=function(){ue.isOpen&&!I.isMouseDown&&s({type:Bu})},ie=function(_e){var Ce=_a(_e);Ce&&T[Ce]?T[Ce](_e):AK(Ce)&&s({type:zu,key:Ce})},me=Ae((Z={},Z[V]=qn(Q,function(_e){p.current=_e}),Z["aria-activedescendant"]=ue.isOpen&&ue.highlightedIndex>-1?b.getItemId(ue.highlightedIndex):"",Z["aria-controls"]=b.menuId,Z["aria-expanded"]=w.current.state.isOpen,Z["aria-haspopup"]="listbox",Z["aria-labelledby"]=ne&&ne["aria-label"]?void 0:""+b.labelId,Z.id=b.toggleButtonId,Z.role="combobox",Z.tabIndex=0,Z.onBlur=at(M,le),Z),ne);return ne.disabled||(me.onClick=at(H,xe),me.onKeyDown=at(q,ie)),N("getToggleButtonProps",pe,V,p),me},[s,b,w,I,N,T]),re=C.useCallback(function(j){var W,Z=j===void 0?{}:j,J=Z.item,M=Z.index,H=Z.onMouseMove,q=Z.onClick,D=Z.onMouseDown;Z.onPress;var V=Z.refKey,Q=V===void 0?"ref":V,ne=Z.disabled,ce=Z.ref,ee=Cr(Z,HK);ne!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var pe=w.current,ue=pe.state,xe=pe.props,le=g1(J,M,xe.items,"Pass either item or index to getItemProps!"),ie=le[0],me=le[1],_e=xe.isItemDisabled(ie,me),Ce=function(){I.isTouchEnd||me===ue.highlightedIndex||(_.current=!1,s({type:G3,index:me,disabled:_e}))},je=function(){s({type:R1,index:me})},Pe=function(Be){return Be.preventDefault()},Te=Ae((W={},W[Q]=qn(ce,function(Be){Be&&(x.current[b.getItemId(me)]=Be)}),W["aria-disabled"]=_e,W["aria-selected"]=ie===ue.selectedItem,W.id=b.getItemId(me),W.role="option",W),ee);return _e||(Te.onClick=at(q,je)),Te.onMouseMove=at(H,Ce),Te.onMouseDown=at(D,Pe),Te},[w,b,I,_,s]);return{getToggleButtonProps:U,getLabelProps:B,getMenuProps:X,getItemProps:re,toggleMenu:k,openMenu:L,closeMenu:z,setHighlightedIndex:K,selectItem:G,reset:A,setInputValue:Y,highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:h}}var T1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,P1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,k1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,M1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,A1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,D1=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,j1=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,q1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,L1=process.env.NODE_ENV!=="production"?"__input_change__":8,Fu=process.env.NODE_ENV!=="production"?"__input_blur__":9,z1=process.env.NODE_ENV!=="production"?"__input_click__":10,e4=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,t4=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,B1=process.env.NODE_ENV!=="production"?"__item_click__":13,r4=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,n4=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,i4=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,o4=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,a4=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,F1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,s4=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,l4=process.env.NODE_ENV!=="production"?"__function_reset__":21,$1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,c4=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:$1,FunctionCloseMenu:o4,FunctionOpenMenu:i4,FunctionReset:l4,FunctionSelectItem:F1,FunctionSetHighlightedIndex:a4,FunctionSetInputValue:s4,FunctionToggleMenu:n4,InputBlur:Fu,InputChange:L1,InputClick:z1,InputKeyDownArrowDown:T1,InputKeyDownArrowUp:P1,InputKeyDownEnd:A1,InputKeyDownEnter:q1,InputKeyDownEscape:k1,InputKeyDownHome:M1,InputKeyDownPageDown:j1,InputKeyDownPageUp:D1,ItemClick:B1,ItemMouseMove:t4,MenuMouseLeave:e4,ToggleButtonClick:r4});function VK(e){var t=z3(e),r=t.selectedItem,n=t.inputValue;return n===""&&r&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(n=e.itemToString(r)),Ae({},t,{inputValue:n})}var WK=Ae({},H3,{items:we.array.isRequired,isItemDisabled:we.func,inputValue:we.string,defaultInputValue:we.string,initialInputValue:we.string,inputId:we.string,onInputValueChange:we.func});function UK(e,t,r,n){var i=C.useRef(),o=q3(e,t,r,n),a=o[0],s=o[1],c=yl();return C.useEffect(function(){if(Du(t,"selectedItem")){if(!c){var u=t.itemToKey(t.selectedItem)!==t.itemToKey(i.current);u&&s({type:$1,inputValue:t.itemToString(t.selectedItem)})}i.current=a.selectedItem===i.current?t.selectedItem:a.selectedItem}},[a.selectedItem,t.selectedItem]),[nl(a,t),s]}var u4=Or;process.env.NODE_ENV!=="production"&&(u4=function(e,t){we.checkPropTypes(WK,e,"prop",t.name)});var GK=Ae({},Gs,{isItemDisabled:function(){return!1}});function KK(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case B1:a={isOpen:ti(i,"isOpen"),highlightedIndex:Lu(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case T1:e.isOpen?a={highlightedIndex:Ln(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:o&&e.selectedItem==null?-1:yo(i,e,1),isOpen:i.items.length>=0};break;case P1:e.isOpen?o?a=qu(i,e.highlightedIndex):a={highlightedIndex:Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:yo(i,e,-1),isOpen:i.items.length>=0};break;case q1:a=qu(i,e.highlightedIndex);break;case k1:a=Ae({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case D1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case j1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case M1:a={highlightedIndex:Zi(0,!1,i.items,i.isItemDisabled)};break;case A1:a={highlightedIndex:Zi(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Fu:a=Ae({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&t.selectItem&&{selectedItem:i.items[e.highlightedIndex],inputValue:i.itemToString(i.items[e.highlightedIndex])});break;case L1:a={isOpen:!0,highlightedIndex:Lu(i),inputValue:t.inputValue};break;case z1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:yo(i,e,0)};break;case F1:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case $1:a={inputValue:t.inputValue};break;default:return V3(e,t,c4)}return Ae({},e,a)}var YK=["onMouseLeave","refKey","ref"],XK=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],ZK=["onClick","onPress","refKey","ref"],JK=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];Lr.stateChangeTypes=c4;function Lr(e){e===void 0&&(e={}),u4(e,Lr);var t=Ae({},GK,e),r=t.items,n=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,a=UK(KK,t,VK,$3),s=a[0],c=a[1],u=s.isOpen,d=s.highlightedIndex,h=s.selectedItem,p=s.inputValue,v=C.useRef(null),x=C.useRef({}),g=C.useRef(null),b=C.useRef(null),w=yl(),y=j3(t),_=C.useRef(),E=hd({state:s,props:t}),S=C.useCallback(function(M){return x.current[y.getItemId(M)]},[y]);b1(o,s,[u,d,h,p],i);var I=F3({menuElement:v.current,highlightedIndex:d,isOpen:u,itemRefs:x,scrollIntoView:n,getItemNodeFromIndex:S});vd({props:t,state:s}),C.useEffect(function(){var M=bo(t,"isOpen");M&&g.current&&g.current.focus()},[]),C.useEffect(function(){w||(_.current=r.length)});var N=C.useCallback(function(){E.current.state.isOpen&&c({type:Fu})},[c,E]),T=C.useMemo(function(){return[v,b,g]},[]),k=B3(i,N,T),z=pd("getInputProps","getMenuProps");C.useEffect(function(){u||(x.current={})},[u]),C.useEffect(function(){var M;!u||!(i!=null&&i.document)||!(g!=null&&(M=g.current)!=null&&M.focus)||i.document.activeElement!==g.current&&g.current.focus()},[u,i]);var L=C.useMemo(function(){return{ArrowDown:function(M){M.preventDefault(),c({type:T1,altKey:M.altKey})},ArrowUp:function(M){M.preventDefault(),c({type:P1,altKey:M.altKey})},Home:function(M){E.current.state.isOpen&&(M.preventDefault(),c({type:M1}))},End:function(M){E.current.state.isOpen&&(M.preventDefault(),c({type:A1}))},Escape:function(M){var H=E.current.state;(H.isOpen||H.inputValue||H.selectedItem||H.highlightedIndex>-1)&&(M.preventDefault(),c({type:k1}))},Enter:function(M){var H=E.current.state;!H.isOpen||M.which===229||(M.preventDefault(),c({type:q1}))},PageUp:function(M){E.current.state.isOpen&&(M.preventDefault(),c({type:D1}))},PageDown:function(M){E.current.state.isOpen&&(M.preventDefault(),c({type:j1}))}}},[c,E]),K=C.useCallback(function(M){return Ae({id:y.labelId,htmlFor:y.inputId},M)},[y]),G=C.useCallback(function(M,H){var q,D=M===void 0?{}:M,V=D.onMouseLeave,Q=D.refKey,ne=Q===void 0?"ref":Q,ce=D.ref,ee=Cr(D,YK),pe=H===void 0?{}:H,ue=pe.suppressRefError,xe=ue===void 0?!1:ue;return z("getMenuProps",xe,ne,v),Ae((q={},q[ne]=qn(ce,function(le){v.current=le}),q.id=y.menuId,q.role="listbox",q["aria-labelledby"]=ee&&ee["aria-label"]?void 0:""+y.labelId,q.onMouseLeave=at(V,function(){c({type:e4})}),q),ee)},[c,z,y]),A=C.useCallback(function(M){var H,q,D=M===void 0?{}:M,V=D.item,Q=D.index,ne=D.refKey,ce=ne===void 0?"ref":ne,ee=D.ref,pe=D.onMouseMove,ue=D.onMouseDown,xe=D.onClick;D.onPress;var le=D.disabled,ie=Cr(D,XK);le!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var me=E.current,_e=me.props,Ce=me.state,je=g1(V,Q,_e.items,"Pass either item or index to getItemProps!"),Pe=je[0],Te=je[1],Be=_e.isItemDisabled(Pe,Te),rt="onClick",$e=xe,Ye=function(){k.isTouchEnd||Te===Ce.highlightedIndex||(I.current=!1,c({type:t4,index:Te,disabled:Be}))},qe=function(){c({type:B1,index:Te})},Xe=function(Ue){return Ue.preventDefault()};return Ae((H={},H[ce]=qn(ee,function(Ue){Ue&&(x.current[y.getItemId(Te)]=Ue)}),H["aria-disabled"]=Be,H["aria-selected"]=Te===Ce.highlightedIndex,H.id=y.getItemId(Te),H.role="option",H),!Be&&(q={},q[rt]=at($e,qe),q),{onMouseMove:at(pe,Ye),onMouseDown:at(ue,Xe)},ie)},[c,y,E,k,I]),Y=C.useCallback(function(M){var H,q=M===void 0?{}:M,D=q.onClick;q.onPress;var V=q.refKey,Q=V===void 0?"ref":V,ne=q.ref,ce=Cr(q,ZK),ee=E.current.state,pe=function(){c({type:r4})};return Ae((H={},H[Q]=qn(ne,function(ue){b.current=ue}),H["aria-controls"]=y.menuId,H["aria-expanded"]=ee.isOpen,H.id=y.toggleButtonId,H.tabIndex=-1,H),!ce.disabled&&Ae({},{onClick:at(D,pe)}),ce)},[c,E,y]),B=C.useCallback(function(M,H){var q,D=M===void 0?{}:M,V=D.onKeyDown,Q=D.onChange,ne=D.onInput,ce=D.onBlur;D.onChangeText;var ee=D.onClick,pe=D.refKey,ue=pe===void 0?"ref":pe,xe=D.ref,le=Cr(D,JK),ie=H===void 0?{}:H,me=ie.suppressRefError,_e=me===void 0?!1:me;z("getInputProps",_e,ue,g);var Ce=E.current.state,je=function(qe){var Xe=_a(qe);Xe&&L[Xe]&&L[Xe](qe)},Pe=function(qe){c({type:L1,inputValue:qe.target.value})},Te=function(qe){if(i!=null&&i.document&&Ce.isOpen&&!k.isMouseDown){var Xe=qe.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:Fu,selectItem:!Xe})}},Be=function(){c({type:z1})},rt="onChange",$e={};if(!le.disabled){var Ye;$e=(Ye={},Ye[rt]=at(Q,ne,Pe),Ye.onKeyDown=at(V,je),Ye.onBlur=at(ce,Te),Ye.onClick=at(ee,Be),Ye)}return Ae((q={},q[ue]=qn(xe,function(qe){g.current=qe}),q["aria-activedescendant"]=Ce.isOpen&&Ce.highlightedIndex>-1?y.getItemId(Ce.highlightedIndex):"",q["aria-autocomplete"]="list",q["aria-controls"]=y.menuId,q["aria-expanded"]=Ce.isOpen,q["aria-labelledby"]=le&&le["aria-label"]?void 0:y.labelId,q.autoComplete="off",q.id=y.inputId,q.role="combobox",q.value=Ce.inputValue,q),$e,le)},[c,y,i,L,E,k,z]),X=C.useCallback(function(){c({type:n4})},[c]),U=C.useCallback(function(){c({type:o4})},[c]),re=C.useCallback(function(){c({type:i4})},[c]),j=C.useCallback(function(M){c({type:a4,highlightedIndex:M})},[c]),W=C.useCallback(function(M){c({type:F1,selectedItem:M})},[c]),Z=C.useCallback(function(M){c({type:s4,inputValue:M})},[c]),J=C.useCallback(function(){c({type:l4})},[c]);return{getItemProps:A,getLabelProps:K,getMenuProps:G,getInputProps:B,getToggleButtonProps:Y,toggleMenu:X,openMenu:re,closeMenu:U,setHighlightedIndex:j,setInputValue:Z,selectItem:W,reset:J,highlightedIndex:d,isOpen:u,selectedItem:h,inputValue:p}}var d4={activeIndex:-1,selectedItems:[]};function kC(e,t){return bo(e,t,d4)}function MC(e,t){return ti(e,t,d4)}function QK(e){var t=kC(e,"activeIndex"),r=kC(e,"selectedItems");return{activeIndex:t,selectedItems:r}}function AC(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function eY(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var tY={stateReducer:fu.stateReducer,itemToKey:fu.itemToKey,environment:fu.environment,selectedItems:we.array,initialSelectedItems:we.array,defaultSelectedItems:we.array,getA11yStatusMessage:we.func,activeIndex:we.number,initialActiveIndex:we.number,defaultActiveIndex:we.number,onActiveIndexChange:we.func,onSelectedItemsChange:we.func,keyNavigationNext:we.string,keyNavigationPrevious:we.string},rY={itemToKey:Gs.itemToKey,stateReducer:Gs.stateReducer,environment:Gs.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},f4=Or;process.env.NODE_ENV!=="production"&&(f4=function(e,t){we.checkPropTypes(tY,e,"prop",t.name)});var H1=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,V1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,W1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,U1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,G1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,K1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,Y1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,X1=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,Z1=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,J1=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,Q1=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,e_=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,t_=process.env.NODE_ENV!=="production"?"__function_reset__":12,nY=Object.freeze({__proto__:null,DropdownClick:X1,DropdownKeyDownBackspace:Y1,DropdownKeyDownNavigationPrevious:K1,FunctionAddSelectedItem:Z1,FunctionRemoveSelectedItem:J1,FunctionReset:t_,FunctionSetActiveIndex:e_,FunctionSetSelectedItems:Q1,SelectedItemClick:H1,SelectedItemKeyDownBackspace:W1,SelectedItemKeyDownDelete:V1,SelectedItemKeyDownNavigationNext:U1,SelectedItemKeyDownNavigationPrevious:G1});function iY(e,t){var r=t.type,n=t.index,i=t.props,o=t.selectedItem,a=e.activeIndex,s=e.selectedItems,c;switch(r){case H1:c={activeIndex:n};break;case G1:c={activeIndex:a-1<0?0:a-1};break;case U1:c={activeIndex:a+1>=s.length?-1:a+1};break;case W1:case V1:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=Ae({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case K1:c={activeIndex:s.length-1};break;case Y1:c={selectedItems:s.slice(0,s.length-1)};break;case Z1:c={selectedItems:[].concat(s,[o])};break;case X1:c={activeIndex:-1};break;case J1:{var d=a,h=s.findIndex(function(x){return i.itemToKey(x)===i.itemToKey(o)});if(h<0)break;s.length===1?d=-1:h===s.length-1&&(d=s.length-2),c={selectedItems:[].concat(s.slice(0,h),s.slice(h+1)),activeIndex:d};break}case Q1:{var p=t.selectedItems;c={selectedItems:p};break}case e_:{var v=t.activeIndex;c={activeIndex:v};break}case t_:c={activeIndex:MC(i,"activeIndex"),selectedItems:MC(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return Ae({},e,c)}var oY=["refKey","ref","onClick","onKeyDown","selectedItem","index"],aY=["refKey","ref","onKeyDown","onClick","preventKeyAction"];r_.stateChangeTypes=nY;function r_(e){e===void 0&&(e={}),f4(e,r_);var t=Ae({},rY,e),r=t.getA11yStatusMessage,n=t.environment,i=t.keyNavigationNext,o=t.keyNavigationPrevious,a=L3(iY,t,QK,eY),s=a[0],c=a[1],u=s.activeIndex,d=s.selectedItems,h=yl(),p=C.useRef(null),v=C.useRef();v.current=[];var x=hd({state:s,props:t});b1(r,s,[u,d],n),C.useEffect(function(){h||(u===-1&&p.current?p.current.focus():v.current[u]&&v.current[u].focus())},[u]),vd({props:t,state:s});var g=pd("getDropdownProps"),b=C.useMemo(function(){var k;return k={},k[o]=function(){c({type:G1})},k[i]=function(){c({type:U1})},k.Delete=function(){c({type:V1})},k.Backspace=function(){c({type:W1})},k},[c,i,o]),w=C.useMemo(function(){var k;return k={},k[o]=function(z){AC(z)&&c({type:K1})},k.Backspace=function(z){AC(z)&&c({type:Y1})},k},[c,o]),y=C.useCallback(function(k){var z,L=k===void 0?{}:k,K=L.refKey,G=K===void 0?"ref":K,A=L.ref,Y=L.onClick,B=L.onKeyDown,X=L.selectedItem,U=L.index,re=Cr(L,oY),j=x.current.state,W=g1(X,U,j.selectedItems,"Pass either item or index to getSelectedItemProps!"),Z=W[1],J=Z>-1&&Z===j.activeIndex,M=function(){c({type:H1,index:Z})},H=function(q){var D=_a(q);D&&b[D]&&b[D](q)};return Ae((z={},z[G]=qn(A,function(q){q&&v.current.push(q)}),z.tabIndex=J?0:-1,z.onClick=at(Y,M),z.onKeyDown=at(B,H),z),re)},[c,x,b]),_=C.useCallback(function(k,z){var L,K=k===void 0?{}:k,G=K.refKey,A=G===void 0?"ref":G,Y=K.ref,B=K.onKeyDown,X=K.onClick,U=K.preventKeyAction,re=U===void 0?!1:U,j=Cr(K,aY),W=z===void 0?{}:z,Z=W.suppressRefError,J=Z===void 0?!1:Z;g("getDropdownProps",J,A,p);var M=function(q){var D=_a(q);D&&w[D]&&w[D](q)},H=function(){c({type:X1})};return Ae((L={},L[A]=qn(Y,function(q){q&&(p.current=q)}),L),!re&&{onKeyDown:at(B,M),onClick:at(X,H)},j)},[c,w,g]),E=C.useCallback(function(k){c({type:Z1,selectedItem:k})},[c]),S=C.useCallback(function(k){c({type:J1,selectedItem:k})},[c]),I=C.useCallback(function(k){c({type:Q1,selectedItems:k})},[c]),N=C.useCallback(function(k){c({type:e_,activeIndex:k})},[c]),T=C.useCallback(function(){c({type:t_})},[c]);return{getSelectedItemProps:y,getDropdownProps:_,addSelectedItem:E,removeSelectedItem:S,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:d,activeIndex:u}}let sY=0;const lY=()=>{const e=C.useRef(null);return e.current===null&&(e.current=`select-${++sY}`),e.current},cY=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:u=ie=>(ie==null?void 0:ie.label)||"",getOptionValue:d=ie=>(ie==null?void 0:ie.value)||"",isOpen:h,onOpenChange:p,customOptionGenerator:v,disableInternalFiltering:x=!1,stateReducer:g,isDisabled:b=!1,clearSearchOnSelect:w=!1,closeMenuOnSelect:y,onSelectionComplete:_,id:E}=e,S=lY(),I=E||S,N=C.useCallback(ie=>{const me=u(ie);if(typeof me=="string")return me;if(typeof me=="number")return String(me);const _e=ie;if(typeof _e=="object"&&_e!==null){if(typeof _e.label=="string")return _e.label;if(typeof _e.name=="string")return _e.name}return String(d(ie))},[u,d]),T=ie=>ie?Array.isArray(ie)?ie:[ie]:[],k=o!==void 0?o:i!==void 0?i:null,[z,L]=C.useState(()=>T(k)),[K,G]=C.useState(a||""),[A,Y]=C.useState(()=>h!==void 0?h:!1),B=i!==void 0?T(i):z,X=a!==void 0?a:K,U=h!==void 0?h:A,re=C.useRef(null),j=C.useRef(null),W=C.useCallback(ie=>{h===void 0&&Y(ie),p==null||p(ie)},[h,p]),Z=C.useCallback(ie=>{i===void 0&&L(ie);const me=r?ie:ie[0]||null;s==null||s(me)},[i,r,s]),J=C.useCallback(ie=>{a===void 0&&G(ie),c==null||c(ie)},[a,c]),M=r_({selectedItems:B,onSelectedItemsChange:ie=>{const me=ie.selectedItems||[];Z(me)}}),H=C.useCallback(ie=>{r&&M.removeSelectedItem(ie)},[r,M]),q=C.useCallback(ie=>{if(ie){if(r)B.some(me=>d(me)===d(ie))?H(ie):(M.addSelectedItem(ie),J(""));else{const me=B[0];(!me||d(me)!==d(ie))&&Z([ie]),n&&!w?J(N(ie)):w&&J("")}_==null||_(d(ie),ie)}},[r,B,d,H,M,J,Z,n,w,N,_]);C.useEffect(()=>{if(j.current){const ie=j.current;j.current=null,q(ie)}}),C.useLayoutEffect(()=>{if(n&&U){const ie=requestAnimationFrame(()=>{var me;(me=re.current)==null||me.focus()});return()=>cancelAnimationFrame(ie)}},[n,U]);const[D,V]=C.useState(X);C.useEffect(()=>{const ie=setTimeout(()=>V(X),120);return()=>clearTimeout(ie)},[X]);const Q=C.useMemo(()=>v?v(X,t):x||!n||!D?t:t.filter(ie=>N(ie).toLowerCase().includes(D.toLowerCase())),[t,X,D,v,x,n,N]),ne={items:Q,itemToString:ie=>ie?N(ie):"",isOpen:U,onIsOpenChange:({isOpen:ie})=>{ie!==void 0&&W(ie)},selectedItem:r?null:B[0]||null},ce=ie=>{const me=new Map;for(const[_e,Ce]of Object.entries(ie.stateChangeTypes))me.set(Ce,_e);return(_e,Ce)=>{const{changes:je,type:Pe}=Ce,Te=y??!r,Be=[Lr.stateChangeTypes.ItemClick,Lr.stateChangeTypes.InputKeyDownEnter,Lr.stateChangeTypes.FunctionSelectItem,yi.stateChangeTypes.ItemClick,yi.stateChangeTypes.ToggleButtonKeyDownEnter,yi.stateChangeTypes.ToggleButtonKeyDownSpaceButton,yi.stateChangeTypes.FunctionSelectItem].includes(Pe);if((Pe===Lr.stateChangeTypes.InputBlur||Pe===yi.stateChangeTypes.ToggleButtonBlur)&&typeof document<"u"){const rt=document.activeElement,$e=!!(rt!=null&&rt.closest('[data-qui="SelectMenu"], [data-qui="SelectPortal"], [data-qui="SelectControl"], [data-qui="Select"], [data-qui="SelectIndicator"], [role="option"]')),Ye=rt===document.body;if($e||r&&Ye)return{...je,isOpen:!0}}if(Be){const rt=je.selectedItem||null;rt&&(j.current=rt);const $e={...je};return r?($e.selectedItem=null,$e.isOpen=!Te,$e.highlightedIndex=_e.highlightedIndex,$e.inputValue=""):rt&&(w?$e.inputValue="":n&&($e.inputValue=N(rt)),y===!1&&($e.isOpen=!0,$e.highlightedIndex=_e.highlightedIndex)),$e}return n&&!Be&&Pe!==Lr.stateChangeTypes.InputChange&&(Pe===Lr.stateChangeTypes.ControlledPropUpdatedSelectedItem||Pe===Lr.stateChangeTypes.FunctionSetInputValue||Pe===Lr.stateChangeTypes.InputBlur||Pe===Lr.stateChangeTypes.FunctionReset)?{...je,inputValue:_e.inputValue}:g?g(_e,{...Ce,type:me.get(Ce.type)||Ce.type,changes:je}):je}},ee=n?Lr({...ne,inputValue:X,onInputValueChange:({inputValue:ie,type:me})=>{!r&&!ie&&me===Lr.stateChangeTypes.InputChange&&Z([]),J(ie||"")},stateReducer:ce(Lr),id:I}):yi({...ne,stateReducer:ce(yi),id:I}),pe=C.useCallback(()=>{b||("toggleMenu"in ee&&typeof ee.toggleMenu=="function"?ee.toggleMenu():W(!U))},[ee,b,W,U]),ue=C.useCallback(()=>{b||("openMenu"in ee&&typeof ee.openMenu=="function"?ee.openMenu():W(!0))},[ee,b,W]),xe=C.useCallback(()=>{"closeMenu"in ee&&typeof ee.closeMenu=="function"?ee.closeMenu():W(!1)},[ee,W]),le=C.useCallback(()=>{Z([]),J(""),r&&M.reset()},[Z,J,r,M]);return{isOpen:ee.isOpen,selectedItem:ee.selectedItem,highlightedIndex:ee.highlightedIndex,inputValue:X,getToggleButtonProps:ee.getToggleButtonProps,getMenuProps:ee.getMenuProps,getItemProps:ee.getItemProps,getInputProps:n?(ie,me)=>({..."getInputProps"in ee?ee.getInputProps(ie,me):{},ref:re,value:X}):void 0,selectedItems:B,filteredItems:Q,setInputValue:J,setIsOpen:W,toggleMenu:pe,openMenu:ue,closeMenu:xe,clearSelection:le,selectItem:"selectItem"in ee?ee.selectItem:void 0,removeItem:H,multipleSelection:M,isMulti:r,isSearchable:n,inputRef:re}},h4=({size:e="md",color:t="primary",isInvalid:r=!1,isDisabled:n=!1,className:i,children:o,options:a=[],value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:h,onInputChange:p,isSearchable:v,isOpen:x,onOpenChange:g,customOptionGenerator:b,disableInternalFiltering:w,getOptionLabel:y=L=>typeof L=="string"||typeof L=="number"?String(L):(L==null?void 0:L.label)||(L==null?void 0:L.name)||String(L),getOptionValue:_=L=>typeof L=="string"||typeof L=="number"?String(L):(L==null?void 0:L.value)||(L==null?void 0:L.id)||(L==null?void 0:L.name)||String(L),isOptionDisabled:E=L=>(L==null?void 0:L.isDisabled)||!1,stateReducer:S,clearSearchOnSelect:I,closeMenuOnSelect:N,inputClassName:T,onSelectionComplete:k,...z})=>{const[L,K]=C.useState(!1),[G,A]=C.useState(!1),[Y,B]=C.useState(!1),[X,U]=C.useState("bottom"),re=C.useRef(new Set),j=C.useCallback(H=>(re.current.add(H),()=>re.current.delete(H)),[]),W=C.useCallback((H,q)=>{k==null||k(H,q),re.current.forEach(D=>D(H,q))},[k]),Z=C.useMemo(()=>eK(a),[a]),J=cY({items:Z,value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:h,onInputChange:p,isSearchable:v,isOpen:x,onOpenChange:g,getOptionLabel:y,getOptionValue:_,customOptionGenerator:b,disableInternalFiltering:w,stateReducer:S,isDisabled:n,clearSearchOnSelect:I,closeMenuOnSelect:N,onSelectionComplete:W}),M={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:L,setHasMessage:K,hasGroup:G,setHasGroup:A,menuVisible:Y,setMenuVisible:B,menuPlacement:X,setMenuPlacement:U,downshift:J,options:a,getOptionLabel:y,getOptionValue:_,isOptionDisabled:E,inputClassName:T,registerOnSelectionComplete:j};return O.jsx(d3.Provider,{value:M,children:O.jsx("div",{"data-qui":"Select",className:be(DG(),i),...z,children:o})})},uY=C.forwardRef(({className:e,children:t,isFocused:r,isDisabled:n,...i},o)=>{const{size:a,color:s,isDisabled:c,hasMessage:u,hasGroup:d,downshift:h,isInvalid:p,menuPlacement:v}=ar(),x=n??c,g=r??h.isOpen;return O.jsx("div",{ref:o,className:be(LG({size:a,color:s,isDisabled:x,isFocused:!!g,isInvalid:p&&!h.isOpen,hasMessage:u,hasGroup:d,menuPlacement:h.isOpen?v:void 0}),e),"aria-disabled":x,"aria-invalid":p,role:"combobox",tabIndex:x?-1:0,...i,children:t})}),dY=({className:e,children:t,isMulti:r})=>O.jsx("div",{className:be(zG({isMulti:r}),e),children:t}),pu=C.forwardRef(({isHidden:e,inputClassName:t,className:r,...n},i)=>{const{size:o,color:a}=ar();return e?O.jsx("input",{ref:i,type:"text",className:r,style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...n}):O.jsx("input",{ref:i,type:"text","data-qui":"SelectSearchInput",className:be(BG({size:o,color:a}),t,e?"":r),...n})}),fY=({className:e,children:t})=>{const{size:r,color:n}=ar();return O.jsx("div",{className:be(FG({size:r,color:n}),e),children:t})},hY=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a}=ar();return O.jsx("div",{className:be($G({size:i,color:o,isDisabled:n}),e),children:t||a(r)})},p4=({className:e,children:t,data:r,isDisabled:n,isFocused:i,onRemove:o})=>{const{size:a,color:s,downshift:c,getOptionLabel:u}=ar(),d=()=>{o?o(r):c.removeItem(r)};return O.jsxs("div",{className:be(HG({size:a,color:s,isDisabled:n,isFocused:i}),e),children:[O.jsx("div",{className:VG({size:a}),children:t||u(r)}),!n&&O.jsx("div",{className:WG({size:a,color:s,isDisabled:!1}),onClick:d,children:O.jsx(id,{className:"w-3 h-3"})})]})},v4=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=ar(),d=i??c,h=u.selectedItems.length>0;if(d||!h)return null;const p=v=>{v.stopPropagation(),n?n(v):u.clearSelection()};return O.jsx("div",{className:be(f3({size:a,color:e||s,isDisabled:d}),t),onClick:p,role:"button",tabIndex:0,"aria-label":"Clear selection",...o,children:r||O.jsx(LD,{})})},pY=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=ar(),u=n??s,d=c.inputValue.length>0&&c.isSearchable;if(u||!d)return null;const h=p=>{u||(p.preventDefault(),p.stopPropagation(),r?r(p):(c.setInputValue(""),c.clearSelection()))};return O.jsx("div",{"data-qui":"SelectIndicator",className:be(f3({size:o,color:a,isDisabled:u}),"cursor-pointer",e),onClick:h,onMouseDown:p=>{p.preventDefault(),p.stopPropagation()},role:"button",tabIndex:-1,"aria-label":"Clear selection",...i,children:t||O.jsx(id,{})})},g4=C.forwardRef(({color:e,className:t,children:r,onClick:n,isDisabled:i,...o},a)=>{const{size:s,color:c,isDisabled:u,downshift:d}=ar(),h=i??u,p=d.isOpen,v=g=>{h||(g.preventDefault(),g.stopPropagation(),n?n(g):d.toggleMenu())},x=g=>{g.preventDefault(),g.stopPropagation()};return O.jsx("div",{ref:a,"data-qui":"SelectIndicator",className:be(UG({size:s,color:e||c,isDisabled:h}),"cursor-pointer",t),onClick:x,onMouseDown:v,role:"button",tabIndex:-1,"aria-label":p?"Close menu":"Open menu","aria-expanded":p,"aria-disabled":h,...o,children:r||O.jsx(FD,{className:be("transition-transform duration-200",{"rotate-180":p})})})}),vY=C.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s,hasGroup:c}=ar();return O.jsx("div",{"data-qui":"SelectMenu",ref:i,className:be(GG({size:o,placement:r,hasMessage:a,color:s,hasGroup:c}),e),...n,children:t})}),gY=C.forwardRef(({className:e,children:t,maxHeight:r=300,totalHeight:n,...i},o)=>{const{size:a}=ar();return O.jsx(e1,{scrollableNodeProps:{ref:o},className:be(KG({size:a}),e),style:{maxHeight:r},...i,children:n!==void 0?O.jsx("div",{style:{height:n,position:"relative",width:"100%"},children:t}):t})}),vu=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,optionClassName:s,...c})=>{const{size:u,color:d,getOptionLabel:h}=ar();return O.jsx("div",{"data-qui":"SelectOption",className:be(YG({size:u,color:d,isDisabled:n,isFocused:i,isSelected:o}),s,e),...a,...c,children:t??h(r)})},m4=({className:e,children:t,data:r,label:n,renderGroupHeading:i})=>{const{size:o}=ar();return O.jsxs("div",{"data-qui":"SelectOptionGroup",className:be(XG({size:o}),e),children:[O.jsx(mY,{children:i?i(r):n||r.label}),t]})},mY=({className:e,children:t})=>{const{size:r,color:n}=ar();return O.jsx("div",{className:be(ZG({size:r,color:n}),e),children:t})},Bh=({className:e,children:t,inputValue:r})=>{const{size:n}=ar();return O.jsx("div",{className:be(QG({size:n}),e),children:t||`No options found${r?` for "${r}"`:""}`})},b4=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,setHasGroup:u,menuVisible:d,menuPlacement:h}=ar();return C.useEffect(()=>(u(!0),()=>{u(!1)}),[u]),O.jsx("div",{ref:n,"data-qui":"SelectGroup",className:be(jG({size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,isFocused:d,menuPlacement:d?h:void 0}),e),...r,children:t})}),bY=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=ar(),d=r||u,h=qG({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"SelectIcon",className:be(h,t),style:n,role:e||o.onClick?"button":void 0,tabIndex:(e||o.onClick)&&!d?0:void 0,"aria-disabled":d,...o,children:i})}),yY=({isOpen:e,usePortal:t,controlRef:r,children:n})=>{const[i,o]=C.useState(null);return C.useLayoutEffect(()=>{if(t&&e&&r.current){const a=()=>{var s;const c=(s=r.current)==null?void 0:s.getBoundingClientRect();c&&o({top:c.top+window.scrollY,left:c.left+window.scrollX,width:c.width,height:c.height})};return a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}}},[e,t,r]),e?t&&i?ei.createPortal(O.jsx("div",{"data-qui":"SelectPortal",className:"absolute z-50",style:{top:i.top,left:i.left,width:i.width,height:i.height,pointerEvents:"none"},children:O.jsx("div",{className:"relative w-full h-full",children:O.jsx("div",{style:{pointerEvents:"auto"},children:n})})}),document.body):O.jsx(O.Fragment,{children:n}):null},vs=e=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&"current"in r&&(r.current=t)})},y4=C.forwardRef(({placeholder:e,noOptionsMessage:t,hideNoOptions:r=!1,loadingMessage:n="Loading...",isClearable:i=!1,isSearchClearable:o=!1,isLoading:a=!1,isRequired:s=!1,hideIndicators:c=!1,hideDropdownIndicator:u=!1,searchPlacement:d="trigger",hideSelectedOptions:h=!1,onFocus:p,onBlur:v,renderMenuHeader:x,formatOptionLabel:g,renderOption:b,optionClassName:w,renderValue:y,renderGroupHeading:_,inputRef:E,controlShouldRenderValue:S=!0,name:I,id:N,onSelectionComplete:T,"aria-label":k,"aria-labelledby":z,"aria-describedby":L,children:K,usePortal:G=!1,virtualizeThreshold:A=100,className:Y,inputClassName:B,...X},U)=>{const{size:re,isInvalid:j,isDisabled:W,hasGroup:Z,downshift:J,options:M=[],getOptionLabel:H,getOptionValue:q,isOptionDisabled:D,menuPlacement:V,setMenuPlacement:Q,menuVisible:ne,setMenuVisible:ce,inputClassName:ee}=ar(),pe=B||ee,ue=C.useMemo(()=>{if(b)return b;if(g)return({data:et})=>g(et)},[b,g]),xe=C.useRef(null),le=E||xe,ie=C.useRef(null),me=C.useRef(null),_e=C.useRef(null),{isOpen:Ce,openMenu:je,selectedItem:Pe,inputValue:Te,highlightedIndex:Be,getToggleButtonProps:rt,getMenuProps:$e,getInputProps:Ye,getItemProps:qe,isMulti:Xe,isSearchable:Ue,multipleSelection:sr}=J,{getDropdownProps:Ut}=sr;C.useLayoutEffect(()=>{if(!Ce||!ie.current)return;const et=ie.current.getBoundingClientRect(),Pt=window.innerHeight-et.bottom;Q(Pt<300?"top":"bottom")},[Ce,Q]),C.useLayoutEffect(()=>{const et=Ce&&!(r&&J.filteredItems.length===0);return ce(et),()=>ce(!1)},[Ce,r,J.filteredItems.length,ce]);const nt=Xe?J.selectedItems??[]:Pe?[Pe]:[],Ct=nt.length>0,yr=o&&!!Te&&!W&&!c,sn=i&&(Ct||!!Te)&&!W&&!c,Tr=!u&&!c,pr=!Ct&&(!Ue||!Te)||!S,Rn={},Ii={};Object.entries(X).forEach(([et,Pt])=>{et.startsWith("data-")||et.startsWith("aria-")||et==="role"?Rn[et]=Pt:Ii[et]=Pt});const At=C.useMemo(()=>vs([ie,U]),[U]),Tt=$e({},{suppressRefError:!0}),St=Ut({preventKeyAction:Ce}),lr={ref:le,disabled:W,required:s,name:I,id:N,"aria-label":k,"aria-labelledby":z,"aria-describedby":L,"aria-invalid":j,onFocus:p,onBlur:v,...Ii},tr=Ue?(Ye==null?void 0:Ye({...lr,...St}))??lr:{...lr,...St},{ref:Dt,...rr}=tr,xr=C.useMemo(()=>vs([Dt]),[Dt]),It=et=>nt.some(Pt=>q(Pt)===q(et)),Bt=et=>h?et.filter(Pt=>!It(Pt)):et,wr=et=>h?et.map(Pt=>({...Pt,options:Bt(Pt.options)})).filter(Pt=>Pt.options.length>0):et,Ft=_w(M)?[]:Bt(J.filteredItems),Pr={sm:22,md:28,lg:36}[re]??28,jt=Ft.length>=A,kr=AG({count:jt?Ft.length:0,getScrollElement:()=>_e.current,estimateSize:()=>Pr,overscan:5});C.useEffect(()=>{jt&&Ce&&Be>=0&&Be<Ft.length&&kr.scrollToIndex(Be,{align:"auto"})},[Be,jt,Ce]);const{registerOnSelectionComplete:Wn}=ar();C.useEffect(()=>{if(T)return Wn(T)},[T,Wn]);const Va=Ue?{}:rt({disabled:W,...St,ref:vs([At,St.ref])});return O.jsxs("div",{className:be({relative:!Z,"flex-1 min-w-0":Z}),children:[O.jsxs(uY,{"data-qui":"SelectControl",className:Y,...Ue?{ref:vs([At,St.ref])}:Va,...Rn,isFocused:ne,isDisabled:W,onClick:et=>{et.defaultPrevented||(Ue?je():J.toggleMenu())},children:[K||O.jsxs(dY,{isMulti:Xe,children:[Xe&&S&&nt.map((et,Pt)=>O.jsx(p4,{data:et,index:Pt,isDisabled:W,children:y?y(et):void 0},q(et))),!Xe&&Ct&&S&&!Ue&&O.jsx("div",{className:"flex items-center gap-2",children:O.jsx(hY,{data:nt[0],isDisabled:W,children:y?y(nt[0]):H(nt[0])})}),Ue&&d==="trigger"?O.jsx(pu,{ref:xr,...rr,className:Y,inputClassName:pe,placeholder:e}):O.jsxs(O.Fragment,{children:[O.jsx(pu,{ref:xr,...rr,className:Y,inputClassName:pe,isHidden:!0,readOnly:!0,value:nt.map(et=>q(et)).join(",")}),pr&&O.jsx(fY,{children:e})]})]}),O.jsxs("div",{className:be("flex items-center size-fit gap-1",{hidden:!sn&&!Tr}),children:[yr&&O.jsx(pY,{}),sn&&O.jsx(v4,{}),Tr&&O.jsx(g4,{...Ue?rt({disabled:W,"aria-label":Ce?"Close menu":"Open menu"}):{}})]})]}),!Ce&&O.jsx("div",{ref:Tt.ref,style:{display:"none"},"aria-hidden":"true"}),O.jsx(yY,{isOpen:Ce,usePortal:G,controlRef:ie,children:(()=>{const{ref:et,...Pt}=Tt,qo=vs([me,et]);return r&&J.filteredItems.length===0?O.jsx("div",{...Pt,style:{display:"none"},"aria-hidden":"true"}):O.jsxs(vY,{ref:qo,...Pt,placement:V,children:[x&&x(J),Ue&&d==="menu"&&O.jsx("div",{className:"p-2",children:O.jsx(pu,{ref:xr,...rr,className:Y,inputClassName:pe,autoFocus:!0,placeholder:e,onClick:$t=>$t.stopPropagation()})}),O.jsx(gY,{ref:_e,totalHeight:jt?kr.getTotalSize():void 0,children:a?O.jsx("div",{className:JG({size:re}),children:n}):J.filteredItems.length===0?O.jsx(Bh,{inputValue:Te,children:typeof t=="function"?t(Te):t}):_w(M)?(()=>{const $t=wr(M);return $t.length===0?O.jsx(Bh,{inputValue:Te,children:typeof t=="function"?t(Te):t}):$t.map((Gt,Nn)=>O.jsx(m4,{data:Gt,label:Gt.label,options:Gt.options,renderGroupHeading:_,children:Gt.options.map(cr=>{const ln=q(cr),cn=nt.some(Wa=>q(Wa)===ln),un=J.filteredItems.indexOf(cr),Un=Be===un,Ri=D(cr),li=qe({item:cr,index:un});return O.jsx(vu,{...li,data:cr,isDisabled:Ri,isFocused:Un,isSelected:cn,optionClassName:w,children:ue?ue({data:cr,isFocused:Un,isSelected:cn,isDisabled:Ri}):void 0},`${ln}-${un}`)})},`${Gt.label}-${Nn}`))})():Ft.length===0?O.jsx(Bh,{inputValue:Te,children:typeof t=="function"?t(Te):t}):jt?kr.getVirtualItems().map($t=>{const Gt=Ft[$t.index],Nn=q(Gt),cr=nt.some(Ri=>q(Ri)===Nn),ln=J.filteredItems.indexOf(Gt),cn=Be===ln,un=D(Gt),Un=qe({item:Gt,index:ln});return O.jsx("div",{"data-index":$t.index,ref:kr.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${$t.start}px)`},children:O.jsx(vu,{...Un,data:Gt,isDisabled:un,isFocused:cn,isSelected:cr,optionClassName:w,children:ue?ue({data:Gt,isFocused:cn,isSelected:cr,isDisabled:un}):void 0})},$t.key)}):Ft.map($t=>{const Gt=q($t),Nn=nt.some(Un=>q(Un)===Gt),cr=J.filteredItems.indexOf($t),ln=Be===cr,cn=D($t),un=qe({item:$t,index:cr});return O.jsx(vu,{...un,data:$t,isDisabled:cn,isFocused:ln,isSelected:Nn,optionClassName:w,children:ue?ue({data:$t,isFocused:ln,isSelected:Nn,isDisabled:cn}):void 0},`${Gt}-${cr}`)})})]})})()})]})});h4.displayName="Select.Root";b4.displayName="Select.Group";bY.displayName="Select.Icon";pu.displayName="Select.Input";p4.displayName="Select.MultiValue";v4.displayName="Select.ClearIndicator";g4.displayName="Select.DropdownIndicator";vu.displayName="Select.Option";m4.displayName="Select.OptionGroup";const xY=y4;xY.displayName="Select.Field";const Fh={Root:h4,Group:b4,Field:y4};C.createContext(void 0);const wY=({active:e,disabled:t,error:r,isOpen:n,className:i})=>be("flex w-full items-center justify-between text-left leading-5 transition-colors duration-200",{"cursor-pointer":!t,"text-inactive-text":t,"bg-primary hover:bg-primary-hover":e&&!t,"text-negative":r&&!e&&!t,"bg-primary-hover text-body":n&&!e&&!t,"text-body":!e&&!t&&!r,"hover:bg-primary-hover hover:text-tab-active-fg":!t&&!e},i),_Y=C.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const u=wY({active:e,disabled:t,error:r,isOpen:n,className:i});return O.jsx(a,{"data-qui":"ListItem",ref:c,className:u,"aria-disabled":t,"aria-selected":e,"aria-invalid":r,"aria-expanded":n,role:s.onClick?"button":"listitem",...s,children:o})});_Y.displayName="ListItem";function SY({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return O.jsx(O.Fragment,{children:O.jsx(mr,{depth:1,className:"relative mb-0 flex h-auto flex-wrap items-center justify-between border-b px-4 py-3",children:O.jsx("div",{className:"flex w-full flex-wrap items-center justify-between",children:O.jsxs("div",{className:"relative flex w-full justify-between",children:[O.jsxs(Ph,{defaultValue:t,onTabChange:s=>n(s),children:[O.jsx(Ph.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar",className:"min-w-[110px] place-content-center"}),O.jsx(Ph.Item,{label:"Privileges",value:"privileges","data-cy":"privileges_btn_navbar",className:"min-w-[110px] place-content-center"})]}),O.jsxs("div",{className:"flex gap-2 justify-between",children:[O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(Au,{checked:i||!1,onChange:s=>{o(s)}}),O.jsx("span",{className:"px-1 text-xs",children:"Restrict Access By Default"}),O.jsx(fe.Tip,{tipKey:"editors:roles:toolbar:restrictedByDefault",alwaysOn:!0,side:"left"})]}),e===!1&&O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(Au,{checked:r||!1,onChange:s=>{a(s)}}),O.jsx("span",{className:"px-1 text-xs",children:"Force login"}),O.jsx(fe.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const x4=C.createContext(void 0),EY=({children:e})=>{const[t,r]=C.useState(null);function n(o){r(o)}const i={selectedRole:t,selectRole:n};return O.jsx(x4.Provider,{value:i,children:e})};function n_(){const e=C.useContext(x4);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var DC=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},jC=typeof window<"u"&&window.document&&window.document.createElement?vt.useLayoutEffect:vt.useEffect,$r="top",_n="bottom",Sn="right",Hr="left",i_="auto",xl=[$r,_n,Sn,Hr],Sa="start",il="end",OY="clippingParents",w4="viewport",gs="popper",CY="reference",qC=xl.reduce(function(e,t){return e.concat([t+"-"+Sa,t+"-"+il])},[]),_4=[].concat(xl,[i_]).reduce(function(e,t){return e.concat([t,t+"-"+Sa,t+"-"+il])},[]),IY="beforeRead",RY="read",NY="afterRead",TY="beforeMain",PY="main",kY="afterMain",MY="beforeWrite",AY="write",DY="afterWrite",jY=[IY,RY,NY,TY,PY,kY,MY,AY,DY];function oi(e){return e?(e.nodeName||"").toLowerCase():null}function nn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Io(e){var t=nn(e).Element;return e instanceof t||e instanceof Element}function wn(e){var t=nn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function o_(e){if(typeof ShadowRoot>"u")return!1;var t=nn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function qY(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!wn(o)||!oi(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function LY(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=a.reduce(function(c,u){return c[u]="",c},{});!wn(i)||!oi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const zY={name:"applyStyles",enabled:!0,phase:"write",fn:qY,effect:LY,requires:["computeStyles"]};function ri(e){return e.split("-")[0]}var xo=Math.max,$u=Math.min,Ea=Math.round;function Cw(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function S4(){return!/^((?!chrome|android).)*safari/i.test(Cw())}function Oa(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&wn(e)&&(i=e.offsetWidth>0&&Ea(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ea(n.height)/e.offsetHeight||1);var a=Io(e)?nn(e):window,s=a.visualViewport,c=!S4()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/i,d=(n.top+(c&&s?s.offsetTop:0))/o,h=n.width/i,p=n.height/o;return{width:h,height:p,top:d,right:u+h,bottom:d+p,left:u,x:u,y:d}}function a_(e){var t=Oa(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function E4(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&o_(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function _i(e){return nn(e).getComputedStyle(e)}function BY(e){return["table","td","th"].indexOf(oi(e))>=0}function Ji(e){return((Io(e)?e.ownerDocument:e.document)||window.document).documentElement}function gd(e){return oi(e)==="html"?e:e.assignedSlot||e.parentNode||(o_(e)?e.host:null)||Ji(e)}function LC(e){return!wn(e)||_i(e).position==="fixed"?null:e.offsetParent}function FY(e){var t=/firefox/i.test(Cw()),r=/Trident/i.test(Cw());if(r&&wn(e)){var n=_i(e);if(n.position==="fixed")return null}var i=gd(e);for(o_(i)&&(i=i.host);wn(i)&&["html","body"].indexOf(oi(i))<0;){var o=_i(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function wl(e){for(var t=nn(e),r=LC(e);r&&BY(r)&&_i(r).position==="static";)r=LC(r);return r&&(oi(r)==="html"||oi(r)==="body"&&_i(r).position==="static")?t:r||FY(e)||t}function s_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ks(e,t,r){return xo(e,$u(t,r))}function $Y(e,t,r){var n=Ks(e,t,r);return n>r?r:n}function O4(){return{top:0,right:0,bottom:0,left:0}}function C4(e){return Object.assign({},O4(),e)}function I4(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var HY=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,C4(typeof t!="number"?t:I4(t,xl))};function VY(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=ri(r.placement),c=s_(s),u=[Hr,Sn].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=HY(i.padding,r),p=a_(o),v=c==="y"?$r:Hr,x=c==="y"?_n:Sn,g=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],b=a[c]-r.rects.reference[c],w=wl(o),y=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=g/2-b/2,E=h[v],S=y-p[d]-h[x],I=y/2-p[d]/2+_,N=Ks(E,I,S),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function WY(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||E4(t.elements.popper,i)&&(t.elements.arrow=i))}const UY={name:"arrow",enabled:!0,phase:"main",fn:VY,effect:WY,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ca(e){return e.split("-")[1]}var GY={top:"auto",right:"auto",bottom:"auto",left:"auto"};function KY(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Ea(r*i)/i||0,y:Ea(n*i)/i||0}}function zC(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=a.x,v=p===void 0?0:p,x=a.y,g=x===void 0?0:x,b=typeof d=="function"?d({x:v,y:g}):{x:v,y:g};v=b.x,g=b.y;var w=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),_=Hr,E=$r,S=window;if(u){var I=wl(r),N="clientHeight",T="clientWidth";if(I===nn(r)&&(I=Ji(r),_i(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===$r||(i===Hr||i===Sn)&&o===il){E=_n;var k=h&&I===S&&S.visualViewport?S.visualViewport.height:I[N];g-=k-n.height,g*=c?1:-1}if(i===Hr||(i===$r||i===_n)&&o===il){_=Sn;var z=h&&I===S&&S.visualViewport?S.visualViewport.width:I[T];v-=z-n.width,v*=c?1:-1}}var L=Object.assign({position:s},u&&GY),K=d===!0?KY({x:v,y:g},nn(r)):{x:v,y:g};if(v=K.x,g=K.y,c){var G;return Object.assign({},L,(G={},G[E]=y?"0":"",G[_]=w?"0":"",G.transform=(S.devicePixelRatio||1)<=1?"translate("+v+"px, "+g+"px)":"translate3d("+v+"px, "+g+"px, 0)",G))}return Object.assign({},L,(t={},t[E]=y?g+"px":"",t[_]=w?v+"px":"",t.transform="",t))}function YY(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:ri(t.placement),variation:Ca(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,zC(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,zC(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const XY={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:YY,data:{}};var Bc={passive:!0};function ZY(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,c=nn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",r.update,Bc)}),s&&c.addEventListener("resize",r.update,Bc),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,Bc)}),s&&c.removeEventListener("resize",r.update,Bc)}}const JY={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ZY,data:{}};var QY={left:"right",right:"left",bottom:"top",top:"bottom"};function gu(e){return e.replace(/left|right|bottom|top/g,function(t){return QY[t]})}var eX={start:"end",end:"start"};function BC(e){return e.replace(/start|end/g,function(t){return eX[t]})}function l_(e){var t=nn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function c_(e){return Oa(Ji(e)).left+l_(e).scrollLeft}function tX(e,t){var r=nn(e),n=Ji(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=S4();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+c_(e),y:c}}function rX(e){var t,r=Ji(e),n=l_(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=xo(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=xo(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+c_(e),c=-n.scrollTop;return _i(i||r).direction==="rtl"&&(s+=xo(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function u_(e){var t=_i(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function R4(e){return["html","body","#document"].indexOf(oi(e))>=0?e.ownerDocument.body:wn(e)&&u_(e)?e:R4(gd(e))}function Ys(e,t){var r;t===void 0&&(t=[]);var n=R4(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=nn(n),a=i?[o].concat(o.visualViewport||[],u_(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(Ys(gd(a)))}function Iw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function nX(e,t){var r=Oa(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function FC(e,t,r){return t===w4?Iw(tX(e,r)):Io(t)?nX(t,r):Iw(rX(Ji(e)))}function iX(e){var t=Ys(gd(e)),r=["absolute","fixed"].indexOf(_i(e).position)>=0,n=r&&wn(e)?wl(e):e;return Io(n)?t.filter(function(i){return Io(i)&&E4(i,n)&&oi(i)!=="body"}):[]}function oX(e,t,r,n){var i=t==="clippingParents"?iX(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,u){var d=FC(e,u,n);return c.top=xo(d.top,c.top),c.right=$u(d.right,c.right),c.bottom=$u(d.bottom,c.bottom),c.left=xo(d.left,c.left),c},FC(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function N4(e){var t=e.reference,r=e.element,n=e.placement,i=n?ri(n):null,o=n?Ca(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case $r:c={x:a,y:t.y-r.height};break;case _n:c={x:a,y:t.y+t.height};break;case Sn:c={x:t.x+t.width,y:s};break;case Hr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?s_(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case Sa:c[u]=c[u]-(t[d]/2-r[d]/2);break;case il:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function ol(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.strategy,a=o===void 0?e.strategy:o,s=r.boundary,c=s===void 0?OY:s,u=r.rootBoundary,d=u===void 0?w4:u,h=r.elementContext,p=h===void 0?gs:h,v=r.altBoundary,x=v===void 0?!1:v,g=r.padding,b=g===void 0?0:g,w=C4(typeof b!="number"?b:I4(b,xl)),y=p===gs?CY:gs,_=e.rects.popper,E=e.elements[x?y:p],S=oX(Io(E)?E:E.contextElement||Ji(e.elements.popper),c,d,a),I=Oa(e.elements.reference),N=N4({reference:I,element:_,placement:i}),T=Iw(Object.assign({},_,N)),k=p===gs?T:I,z={top:S.top-k.top+w.top,bottom:k.bottom-S.bottom+w.bottom,left:S.left-k.left+w.left,right:k.right-S.right+w.right},L=e.modifiersData.offset;if(p===gs&&L){var K=L[i];Object.keys(z).forEach(function(G){var A=[Sn,_n].indexOf(G)>=0?1:-1,Y=[$r,_n].indexOf(G)>=0?"y":"x";z[G]+=K[Y]*A})}return z}function aX(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?_4:c,d=Ca(n),h=d?s?qC:qC.filter(function(x){return Ca(x)===d}):xl,p=h.filter(function(x){return u.indexOf(x)>=0});p.length===0&&(p=h);var v=p.reduce(function(x,g){return x[g]=ol(e,{placement:g,boundary:i,rootBoundary:o,padding:a})[ri(g)],x},{});return Object.keys(v).sort(function(x,g){return v[x]-v[g]})}function sX(e){if(ri(e)===i_)return[];var t=gu(e);return[BC(e),t,BC(t)]}function lX(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,c=r.fallbackPlacements,u=r.padding,d=r.boundary,h=r.rootBoundary,p=r.altBoundary,v=r.flipVariations,x=v===void 0?!0:v,g=r.allowedAutoPlacements,b=t.options.placement,w=ri(b),y=w===b,_=c||(y||!x?[gu(b)]:sX(b)),E=[b].concat(_).reduce(function(M,H){return M.concat(ri(H)===i_?aX(t,{placement:H,boundary:d,rootBoundary:h,padding:u,flipVariations:x,allowedAutoPlacements:g}):H)},[]),S=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,k=E[0],z=0;z<E.length;z++){var L=E[z],K=ri(L),G=Ca(L)===Sa,A=[$r,_n].indexOf(K)>=0,Y=A?"width":"height",B=ol(t,{placement:L,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),X=A?G?Sn:Hr:G?_n:$r;S[Y]>I[Y]&&(X=gu(X));var U=gu(X),re=[];if(o&&re.push(B[K]<=0),s&&re.push(B[X]<=0,B[U]<=0),re.every(function(M){return M})){k=L,T=!1;break}N.set(L,re)}if(T)for(var j=x?3:1,W=function(H){var q=E.find(function(D){var V=N.get(D);if(V)return V.slice(0,H).every(function(Q){return Q})});if(q)return k=q,"break"},Z=j;Z>0;Z--){var J=W(Z);if(J==="break")break}t.placement!==k&&(t.modifiersData[n]._skip=!0,t.placement=k,t.reset=!0)}}const cX={name:"flip",enabled:!0,phase:"main",fn:lX,requiresIfExists:["offset"],data:{_skip:!1}};function $C(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function HC(e){return[$r,Sn,_n,Hr].some(function(t){return e[t]>=0})}function uX(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ol(t,{elementContext:"reference"}),s=ol(t,{altBoundary:!0}),c=$C(a,n),u=$C(s,i,o),d=HC(c),h=HC(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const dX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:uX};function fX(e,t,r){var n=ri(e),i=[Hr,$r].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Hr,Sn].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function hX(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=_4.reduce(function(d,h){return d[h]=fX(h,t.rects,o),d},{}),s=a[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=a}const pX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hX};function vX(e){var t=e.state,r=e.name;t.modifiersData[r]=N4({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const gX={name:"popperOffsets",enabled:!0,phase:"read",fn:vX,data:{}};function mX(e){return e==="x"?"y":"x"}function bX(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,h=r.padding,p=r.tether,v=p===void 0?!0:p,x=r.tetherOffset,g=x===void 0?0:x,b=ol(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),w=ri(t.placement),y=Ca(t.placement),_=!y,E=s_(w),S=mX(E),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,k=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,z=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,K={x:0,y:0};if(I){if(o){var G,A=E==="y"?$r:Hr,Y=E==="y"?_n:Sn,B=E==="y"?"height":"width",X=I[E],U=X+b[A],re=X-b[Y],j=v?-T[B]/2:0,W=y===Sa?N[B]:T[B],Z=y===Sa?-T[B]:-N[B],J=t.elements.arrow,M=v&&J?a_(J):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:O4(),q=H[A],D=H[Y],V=Ks(0,N[B],M[B]),Q=_?N[B]/2-j-V-q-z.mainAxis:W-V-q-z.mainAxis,ne=_?-N[B]/2+j+V+D+z.mainAxis:Z+V+D+z.mainAxis,ce=t.elements.arrow&&wl(t.elements.arrow),ee=ce?E==="y"?ce.clientTop||0:ce.clientLeft||0:0,pe=(G=L==null?void 0:L[E])!=null?G:0,ue=X+Q-pe-ee,xe=X+ne-pe,le=Ks(v?$u(U,ue):U,X,v?xo(re,xe):re);I[E]=le,K[E]=le-X}if(s){var ie,me=E==="x"?$r:Hr,_e=E==="x"?_n:Sn,Ce=I[S],je=S==="y"?"height":"width",Pe=Ce+b[me],Te=Ce-b[_e],Be=[$r,Hr].indexOf(w)!==-1,rt=(ie=L==null?void 0:L[S])!=null?ie:0,$e=Be?Pe:Ce-N[je]-T[je]-rt+z.altAxis,Ye=Be?Ce+N[je]+T[je]-rt-z.altAxis:Te,qe=v&&Be?$Y($e,Ce,Ye):Ks(v?$e:Pe,Ce,v?Ye:Te);I[S]=qe,K[S]=qe-Ce}t.modifiersData[n]=K}}const yX={name:"preventOverflow",enabled:!0,phase:"main",fn:bX,requiresIfExists:["offset"]};function xX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function wX(e){return e===nn(e)||!wn(e)?l_(e):xX(e)}function _X(e){var t=e.getBoundingClientRect(),r=Ea(t.width)/e.offsetWidth||1,n=Ea(t.height)/e.offsetHeight||1;return r!==1||n!==1}function SX(e,t,r){r===void 0&&(r=!1);var n=wn(t),i=wn(t)&&_X(t),o=Ji(t),a=Oa(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((oi(t)!=="body"||u_(o))&&(s=wX(t)),wn(t)?(c=Oa(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=c_(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function EX(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function OX(e){var t=EX(e);return jY.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function CX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function IX(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var VC={placement:"bottom",modifiers:[],strategy:"absolute"};function WC(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function RX(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?VC:i;return function(s,c,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},VC,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},h=[],p=!1,v={state:d,setOptions:function(w){var y=typeof w=="function"?w(d.options):w;g(),d.options=Object.assign({},o,d.options,y),d.scrollParents={reference:Io(s)?Ys(s):s.contextElement?Ys(s.contextElement):[],popper:Ys(c)};var _=OX(IX([].concat(n,d.options.modifiers)));return d.orderedModifiers=_.filter(function(E){return E.enabled}),x(),v.update()},forceUpdate:function(){if(!p){var w=d.elements,y=w.reference,_=w.popper;if(WC(y,_)){d.rects={reference:SX(y,wl(_),d.options.strategy==="fixed"),popper:a_(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(z){return d.modifiersData[z.name]=Object.assign({},z.data)});for(var E=0;E<d.orderedModifiers.length;E++){if(d.reset===!0){d.reset=!1,E=-1;continue}var S=d.orderedModifiers[E],I=S.fn,N=S.options,T=N===void 0?{}:N,k=S.name;typeof I=="function"&&(d=I({state:d,options:T,name:k,instance:v})||d)}}}},update:CX(function(){return new Promise(function(b){v.forceUpdate(),b(d)})}),destroy:function(){g(),p=!0}};if(!WC(s,c))return v;v.setOptions(u).then(function(b){!p&&u.onFirstUpdate&&u.onFirstUpdate(b)});function x(){d.orderedModifiers.forEach(function(b){var w=b.name,y=b.options,_=y===void 0?{}:y,E=b.effect;if(typeof E=="function"){var S=E({state:d,name:w,instance:v,options:_}),I=function(){};h.push(S||I)}})}function g(){h.forEach(function(b){return b()}),h=[]}return v}}var NX=[JY,gX,XY,zY,pX,cX,yX,UY,dX],TX=RX({defaultModifiers:NX}),Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $h,UC;function PX(){if(UC)return $h;UC=1;var e=typeof Element<"u",t=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function i(o,a){if(o===a)return!0;if(o&&a&&typeof o=="object"&&typeof a=="object"){if(o.constructor!==a.constructor)return!1;var s,c,u;if(Array.isArray(o)){if(s=o.length,s!=a.length)return!1;for(c=s;c--!==0;)if(!i(o[c],a[c]))return!1;return!0}var d;if(t&&o instanceof Map&&a instanceof Map){if(o.size!==a.size)return!1;for(d=o.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;for(d=o.entries();!(c=d.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&o instanceof Set&&a instanceof Set){if(o.size!==a.size)return!1;for(d=o.entries();!(c=d.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(a)){if(s=o.length,s!=a.length)return!1;for(c=s;c--!==0;)if(o[c]!==a[c])return!1;return!0}if(o.constructor===RegExp)return o.source===a.source&&o.flags===a.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof a.valueOf=="function")return o.valueOf()===a.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof a.toString=="function")return o.toString()===a.toString();if(u=Object.keys(o),s=u.length,s!==Object.keys(a).length)return!1;for(c=s;c--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[c]))return!1;if(e&&o instanceof Element)return!1;for(c=s;c--!==0;)if(!((u[c]==="_owner"||u[c]==="__v"||u[c]==="__o")&&o.$$typeof)&&!i(o[u[c]],a[u[c]]))return!1;return!0}return o!==o&&a!==a}return $h=function(a,s){try{return i(a,s)}catch(c){if((c.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw c}},$h}var kX=PX();const MX=Qi(kX);var AX=[],md=function(t,r,n){n===void 0&&(n={});var i=vt.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||AX},a=vt.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=vt.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var x=v.state,g=Object.keys(x.elements);J$.flushSync(function(){c({styles:DC(g.map(function(b){return[b,x.styles[b]||{}]})),attributes:DC(g.map(function(b){return[b,x.attributes[b]]}))})})},requires:["computeStyles"]}},[]),d=vt.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[u,{name:"applyStyles",enabled:!1}])};return MX(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,u]),h=vt.useRef();return jC(function(){h.current&&h.current.setOptions(d)},[d]),jC(function(){if(!(t==null||r==null)){var p=n.createPopper||TX,v=p(t,r,d);return h.current=v,function(){v.destroy(),h.current=null}}},[t,r,n.createPopper]),{state:h.current?h.current.state:null,styles:s.styles,attributes:s.attributes,update:h.current?h.current.update:null,forceUpdate:h.current?h.current.forceUpdate:null}};const T4=({tab:e})=>O.jsx(mr,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(tn,{className:"h-10 w-10"}),O.jsxs("div",{className:"font-semibold",children:["No ",e," Selected"]}),O.jsxs("div",{className:"text-sm",children:["Click on a ",e," in the Sidebar to select it."]})]})});function d_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Hh,GC;function DX(){if(GC)return Hh;GC=1;function e(){this.__data__=[],this.size=0}return Hh=e,Hh}var Vh,KC;function ja(){if(KC)return Vh;KC=1;function e(t,r){return t===r||t!==t&&r!==r}return Vh=e,Vh}var Wh,YC;function bd(){if(YC)return Wh;YC=1;var e=ja();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Wh=t,Wh}var Uh,XC;function jX(){if(XC)return Uh;XC=1;var e=bd(),t=Array.prototype,r=t.splice;function n(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():r.call(o,a,1),--this.size,!0}return Uh=n,Uh}var Gh,ZC;function qX(){if(ZC)return Gh;ZC=1;var e=bd();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Gh=t,Gh}var Kh,JC;function LX(){if(JC)return Kh;JC=1;var e=bd();function t(r){return e(this.__data__,r)>-1}return Kh=t,Kh}var Yh,QC;function zX(){if(QC)return Yh;QC=1;var e=bd();function t(r,n){var i=this.__data__,o=e(i,r);return o<0?(++this.size,i.push([r,n])):i[o][1]=n,this}return Yh=t,Yh}var Xh,e2;function yd(){if(e2)return Xh;e2=1;var e=DX(),t=jX(),r=qX(),n=LX(),i=zX();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Xh=o,Xh}var Zh,t2;function BX(){if(t2)return Zh;t2=1;var e=yd();function t(){this.__data__=new e,this.size=0}return Zh=t,Zh}var Jh,r2;function FX(){if(r2)return Jh;r2=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Jh=e,Jh}var Qh,n2;function $X(){if(n2)return Qh;n2=1;function e(t){return this.__data__.get(t)}return Qh=e,Qh}var ep,i2;function HX(){if(i2)return ep;i2=1;function e(t){return this.__data__.has(t)}return ep=e,ep}var tp,o2;function P4(){if(o2)return tp;o2=1;var e=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt;return tp=e,tp}var rp,a2;function $n(){if(a2)return rp;a2=1;var e=P4(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return rp=r,rp}var np,s2;function qa(){if(s2)return np;s2=1;var e=$n(),t=e.Symbol;return np=t,np}var ip,l2;function VX(){if(l2)return ip;l2=1;var e=qa(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=r.call(a,i),c=a[i];try{a[i]=void 0;var u=!0}catch{}var d=n.call(a);return u&&(s?a[i]=c:delete a[i]),d}return ip=o,ip}var op,c2;function WX(){if(c2)return op;c2=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return op=r,op}var ap,u2;function To(){if(u2)return ap;u2=1;var e=qa(),t=VX(),r=WX(),n="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:n:o&&o in Object(s)?t(s):r(s)}return ap=a,ap}var sp,d2;function En(){if(d2)return sp;d2=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return sp=e,sp}var lp,f2;function _l(){if(f2)return lp;f2=1;var e=To(),t=En(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var c=e(s);return c==n||c==i||c==r||c==o}return lp=a,lp}var cp,h2;function UX(){if(h2)return cp;h2=1;var e=$n(),t=e["__core-js_shared__"];return cp=t,cp}var up,p2;function GX(){if(p2)return up;p2=1;var e=UX(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return up=r,up}var dp,v2;function k4(){if(v2)return dp;v2=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return dp=r,dp}var fp,g2;function KX(){if(g2)return fp;g2=1;var e=_l(),t=GX(),r=En(),n=k4(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,d=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(p){if(!r(p)||t(p))return!1;var v=e(p)?d:o;return v.test(n(p))}return fp=h,fp}var hp,m2;function YX(){if(m2)return hp;m2=1;function e(t,r){return t==null?void 0:t[r]}return hp=e,hp}var pp,b2;function Po(){if(b2)return pp;b2=1;var e=KX(),t=YX();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return pp=r,pp}var vp,y2;function f_(){if(y2)return vp;y2=1;var e=Po(),t=$n(),r=e(t,"Map");return vp=r,vp}var gp,x2;function xd(){if(x2)return gp;x2=1;var e=Po(),t=e(Object,"create");return gp=t,gp}var mp,w2;function XX(){if(w2)return mp;w2=1;var e=xd();function t(){this.__data__=e?e(null):{},this.size=0}return mp=t,mp}var bp,_2;function ZX(){if(_2)return bp;_2=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return bp=e,bp}var yp,S2;function JX(){if(S2)return yp;S2=1;var e=xd(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return n.call(a,o)?a[o]:void 0}return yp=i,yp}var xp,E2;function QX(){if(E2)return xp;E2=1;var e=xd(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return xp=n,xp}var wp,O2;function eZ(){if(O2)return wp;O2=1;var e=xd(),t="__lodash_hash_undefined__";function r(n,i){var o=this.__data__;return this.size+=this.has(n)?0:1,o[n]=e&&i===void 0?t:i,this}return wp=r,wp}var _p,C2;function tZ(){if(C2)return _p;C2=1;var e=XX(),t=ZX(),r=JX(),n=QX(),i=eZ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,_p=o,_p}var Sp,I2;function rZ(){if(I2)return Sp;I2=1;var e=tZ(),t=yd(),r=f_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Sp=n,Sp}var Ep,R2;function nZ(){if(R2)return Ep;R2=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Ep=e,Ep}var Op,N2;function wd(){if(N2)return Op;N2=1;var e=nZ();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Op=t,Op}var Cp,T2;function iZ(){if(T2)return Cp;T2=1;var e=wd();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Cp=t,Cp}var Ip,P2;function oZ(){if(P2)return Ip;P2=1;var e=wd();function t(r){return e(this,r).get(r)}return Ip=t,Ip}var Rp,k2;function aZ(){if(k2)return Rp;k2=1;var e=wd();function t(r){return e(this,r).has(r)}return Rp=t,Rp}var Np,M2;function sZ(){if(M2)return Np;M2=1;var e=wd();function t(r,n){var i=e(this,r),o=i.size;return i.set(r,n),this.size+=i.size==o?0:1,this}return Np=t,Np}var Tp,A2;function h_(){if(A2)return Tp;A2=1;var e=rZ(),t=iZ(),r=oZ(),n=aZ(),i=sZ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=r,o.prototype.has=n,o.prototype.set=i,Tp=o,Tp}var Pp,D2;function lZ(){if(D2)return Pp;D2=1;var e=yd(),t=f_(),r=h_(),n=200;function i(o,a){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<n-1)return c.push([o,a]),this.size=++s.size,this;s=this.__data__=new r(c)}return s.set(o,a),this.size=s.size,this}return Pp=i,Pp}var kp,j2;function _d(){if(j2)return kp;j2=1;var e=yd(),t=BX(),r=FX(),n=$X(),i=HX(),o=lZ();function a(s){var c=this.__data__=new e(s);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=o,kp=a,kp}var Mp,q2;function p_(){if(q2)return Mp;q2=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i&&r(t[n],n,t)!==!1;);return t}return Mp=e,Mp}var Ap,L2;function M4(){if(L2)return Ap;L2=1;var e=Po(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Ap=t,Ap}var Dp,z2;function Sd(){if(z2)return Dp;z2=1;var e=M4();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Dp=t,Dp}var jp,B2;function Ed(){if(B2)return jp;B2=1;var e=Sd(),t=ja(),r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s){var c=o[a];(!(n.call(o,a)&&t(c,s))||s===void 0&&!(a in o))&&e(o,a,s)}return jp=i,jp}var qp,F2;function Sl(){if(F2)return qp;F2=1;var e=Ed(),t=Sd();function r(n,i,o,a){var s=!o;o||(o={});for(var c=-1,u=i.length;++c<u;){var d=i[c],h=a?a(o[d],n[d],d,o,n):void 0;h===void 0&&(h=n[d]),s?t(o,d,h):e(o,d,h)}return o}return qp=r,qp}var Lp,$2;function cZ(){if($2)return Lp;$2=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Lp=e,Lp}var zp,H2;function ai(){if(H2)return zp;H2=1;function e(t){return t!=null&&typeof t=="object"}return zp=e,zp}var Bp,V2;function uZ(){if(V2)return Bp;V2=1;var e=To(),t=ai(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Bp=n,Bp}var Fp,W2;function El(){if(W2)return Fp;W2=1;var e=uZ(),t=ai(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Fp=o,Fp}var $p,U2;function Vt(){if(U2)return $p;U2=1;var e=Array.isArray;return $p=e,$p}var qs={exports:{}},Hp,G2;function dZ(){if(G2)return Hp;G2=1;function e(){return!1}return Hp=e,Hp}qs.exports;var K2;function La(){return K2||(K2=1,(function(e,t){var r=$n(),n=dZ(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(qs,qs.exports)),qs.exports}var Vp,Y2;function Od(){if(Y2)return Vp;Y2=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var o=typeof n;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Vp=r,Vp}var Wp,X2;function v_(){if(X2)return Wp;X2=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Wp=t,Wp}var Up,Z2;function fZ(){if(Z2)return Up;Z2=1;var e=To(),t=v_(),r=ai(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",x="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",E="[object Int8Array]",S="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",T="[object Uint8ClampedArray]",k="[object Uint16Array]",z="[object Uint32Array]",L={};L[y]=L[_]=L[E]=L[S]=L[I]=L[N]=L[T]=L[k]=L[z]=!0,L[n]=L[i]=L[b]=L[o]=L[w]=L[a]=L[s]=L[c]=L[u]=L[d]=L[h]=L[p]=L[v]=L[x]=L[g]=!1;function K(G){return r(G)&&t(G.length)&&!!L[e(G)]}return Up=K,Up}var Gp,J2;function Cd(){if(J2)return Gp;J2=1;function e(t){return function(r){return t(r)}}return Gp=e,Gp}var Ls={exports:{}};Ls.exports;var Q2;function g_(){return Q2||(Q2=1,(function(e,t){var r=P4(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,s=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}})();e.exports=s})(Ls,Ls.exports)),Ls.exports}var Kp,eI;function Ol(){if(eI)return Kp;eI=1;var e=fZ(),t=Cd(),r=g_(),n=r&&r.isTypedArray,i=n?t(n):e;return Kp=i,Kp}var Yp,tI;function A4(){if(tI)return Yp;tI=1;var e=cZ(),t=El(),r=Vt(),n=La(),i=Od(),o=Ol(),a=Object.prototype,s=a.hasOwnProperty;function c(u,d){var h=r(u),p=!h&&t(u),v=!h&&!p&&n(u),x=!h&&!p&&!v&&o(u),g=h||p||v||x,b=g?e(u.length,String):[],w=b.length;for(var y in u)(d||s.call(u,y))&&!(g&&(y=="length"||v&&(y=="offset"||y=="parent")||x&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,w)))&&b.push(y);return b}return Yp=c,Yp}var Xp,rI;function Id(){if(rI)return Xp;rI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Xp=t,Xp}var Zp,nI;function D4(){if(nI)return Zp;nI=1;function e(t,r){return function(n){return t(r(n))}}return Zp=e,Zp}var Jp,iI;function hZ(){if(iI)return Jp;iI=1;var e=D4(),t=e(Object.keys,Object);return Jp=t,Jp}var Qp,oI;function m_(){if(oI)return Qp;oI=1;var e=Id(),t=hZ(),r=Object.prototype,n=r.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))n.call(o,s)&&s!="constructor"&&a.push(s);return a}return Qp=i,Qp}var ev,aI;function Ei(){if(aI)return ev;aI=1;var e=_l(),t=v_();function r(n){return n!=null&&t(n.length)&&!e(n)}return ev=r,ev}var tv,sI;function eo(){if(sI)return tv;sI=1;var e=A4(),t=m_(),r=Ei();function n(i){return r(i)?e(i):t(i)}return tv=n,tv}var rv,lI;function pZ(){if(lI)return rv;lI=1;var e=Sl(),t=eo();function r(n,i){return n&&e(i,t(i),n)}return rv=r,rv}var nv,cI;function vZ(){if(cI)return nv;cI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return nv=e,nv}var iv,uI;function gZ(){if(uI)return iv;uI=1;var e=En(),t=Id(),r=vZ(),n=Object.prototype,i=n.hasOwnProperty;function o(a){if(!e(a))return r(a);var s=t(a),c=[];for(var u in a)u=="constructor"&&(s||!i.call(a,u))||c.push(u);return c}return iv=o,iv}var ov,dI;function ko(){if(dI)return ov;dI=1;var e=A4(),t=gZ(),r=Ei();function n(i){return r(i)?e(i,!0):t(i)}return ov=n,ov}var av,fI;function mZ(){if(fI)return av;fI=1;var e=Sl(),t=ko();function r(n,i){return n&&e(i,t(i),n)}return av=r,av}var zs={exports:{}};zs.exports;var hI;function j4(){return hI||(hI=1,(function(e,t){var r=$n(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var h=u.length,p=s?s(h):new u.constructor(h);return u.copy(p),p}e.exports=c})(zs,zs.exports)),zs.exports}var sv,pI;function q4(){if(pI)return sv;pI=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return sv=e,sv}var lv,vI;function L4(){if(vI)return lv;vI=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=0,a=[];++n<i;){var s=t[n];r(s,n,t)&&(a[o++]=s)}return a}return lv=e,lv}var cv,gI;function z4(){if(gI)return cv;gI=1;function e(){return[]}return cv=e,cv}var uv,mI;function b_(){if(mI)return uv;mI=1;var e=L4(),t=z4(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return n.call(a,s)}))}:t;return uv=o,uv}var dv,bI;function bZ(){if(bI)return dv;bI=1;var e=Sl(),t=b_();function r(n,i){return e(n,t(n),i)}return dv=r,dv}var fv,yI;function y_(){if(yI)return fv;yI=1;function e(t,r){for(var n=-1,i=r.length,o=t.length;++n<i;)t[o+n]=r[n];return t}return fv=e,fv}var hv,xI;function Rd(){if(xI)return hv;xI=1;var e=D4(),t=e(Object.getPrototypeOf,Object);return hv=t,hv}var pv,wI;function B4(){if(wI)return pv;wI=1;var e=y_(),t=Rd(),r=b_(),n=z4(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return pv=o,pv}var vv,_I;function yZ(){if(_I)return vv;_I=1;var e=Sl(),t=B4();function r(n,i){return e(n,t(n),i)}return vv=r,vv}var gv,SI;function F4(){if(SI)return gv;SI=1;var e=y_(),t=Vt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return gv=r,gv}var mv,EI;function $4(){if(EI)return mv;EI=1;var e=F4(),t=b_(),r=eo();function n(i){return e(i,r,t)}return mv=n,mv}var bv,OI;function xZ(){if(OI)return bv;OI=1;var e=F4(),t=B4(),r=ko();function n(i){return e(i,r,t)}return bv=n,bv}var yv,CI;function wZ(){if(CI)return yv;CI=1;var e=Po(),t=$n(),r=e(t,"DataView");return yv=r,yv}var xv,II;function _Z(){if(II)return xv;II=1;var e=Po(),t=$n(),r=e(t,"Promise");return xv=r,xv}var wv,RI;function H4(){if(RI)return wv;RI=1;var e=Po(),t=$n(),r=e(t,"Set");return wv=r,wv}var _v,NI;function SZ(){if(NI)return _v;NI=1;var e=Po(),t=$n(),r=e(t,"WeakMap");return _v=r,_v}var Sv,TI;function za(){if(TI)return Sv;TI=1;var e=wZ(),t=f_(),r=_Z(),n=H4(),i=SZ(),o=To(),a=k4(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),x=a(t),g=a(r),b=a(n),w=a(i),y=o;return(e&&y(new e(new ArrayBuffer(1)))!=p||t&&y(new t)!=s||r&&y(r.resolve())!=u||n&&y(new n)!=d||i&&y(new i)!=h)&&(y=function(_){var E=o(_),S=E==c?_.constructor:void 0,I=S?a(S):"";if(I)switch(I){case v:return p;case x:return s;case g:return u;case b:return d;case w:return h}return E}),Sv=y,Sv}var Ev,PI;function EZ(){if(PI)return Ev;PI=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n){var i=n.length,o=new n.constructor(i);return i&&typeof n[0]=="string"&&t.call(n,"index")&&(o.index=n.index,o.input=n.input),o}return Ev=r,Ev}var Ov,kI;function V4(){if(kI)return Ov;kI=1;var e=$n(),t=e.Uint8Array;return Ov=t,Ov}var Cv,MI;function x_(){if(MI)return Cv;MI=1;var e=V4();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Cv=t,Cv}var Iv,AI;function OZ(){if(AI)return Iv;AI=1;var e=x_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Iv=t,Iv}var Rv,DI;function CZ(){if(DI)return Rv;DI=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Rv=t,Rv}var Nv,jI;function IZ(){if(jI)return Nv;jI=1;var e=qa(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return Nv=n,Nv}var Tv,qI;function W4(){if(qI)return Tv;qI=1;var e=x_();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Tv=t,Tv}var Pv,LI;function RZ(){if(LI)return Pv;LI=1;var e=x_(),t=OZ(),r=CZ(),n=IZ(),i=W4(),o="[object Boolean]",a="[object Date]",s="[object Map]",c="[object Number]",u="[object RegExp]",d="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",x="[object DataView]",g="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",y="[object Int16Array]",_="[object Int32Array]",E="[object Uint8Array]",S="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(k,z,L){var K=k.constructor;switch(z){case v:return e(k);case o:case a:return new K(+k);case x:return t(k,L);case g:case b:case w:case y:case _:case E:case S:case I:case N:return i(k,L);case s:return new K;case c:case h:return new K(k);case u:return r(k);case d:return new K;case p:return n(k)}}return Pv=T,Pv}var kv,zI;function U4(){if(zI)return kv;zI=1;var e=En(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var o=new n;return n.prototype=void 0,o}})();return kv=r,kv}var Mv,BI;function G4(){if(BI)return Mv;BI=1;var e=U4(),t=Rd(),r=Id();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Mv=n,Mv}var Av,FI;function NZ(){if(FI)return Av;FI=1;var e=za(),t=ai(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Av=n,Av}var Dv,$I;function TZ(){if($I)return Dv;$I=1;var e=NZ(),t=Cd(),r=g_(),n=r&&r.isMap,i=n?t(n):e;return Dv=i,Dv}var jv,HI;function PZ(){if(HI)return jv;HI=1;var e=za(),t=ai(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return jv=n,jv}var qv,VI;function kZ(){if(VI)return qv;VI=1;var e=PZ(),t=Cd(),r=g_(),n=r&&r.isSet,i=n?t(n):e;return qv=i,qv}var Lv,WI;function K4(){if(WI)return Lv;WI=1;var e=_d(),t=p_(),r=Ed(),n=pZ(),i=mZ(),o=j4(),a=q4(),s=bZ(),c=yZ(),u=$4(),d=xZ(),h=za(),p=EZ(),v=RZ(),x=G4(),g=Vt(),b=La(),w=TZ(),y=En(),_=kZ(),E=eo(),S=ko(),I=1,N=2,T=4,k="[object Arguments]",z="[object Array]",L="[object Boolean]",K="[object Date]",G="[object Error]",A="[object Function]",Y="[object GeneratorFunction]",B="[object Map]",X="[object Number]",U="[object Object]",re="[object RegExp]",j="[object Set]",W="[object String]",Z="[object Symbol]",J="[object WeakMap]",M="[object ArrayBuffer]",H="[object DataView]",q="[object Float32Array]",D="[object Float64Array]",V="[object Int8Array]",Q="[object Int16Array]",ne="[object Int32Array]",ce="[object Uint8Array]",ee="[object Uint8ClampedArray]",pe="[object Uint16Array]",ue="[object Uint32Array]",xe={};xe[k]=xe[z]=xe[M]=xe[H]=xe[L]=xe[K]=xe[q]=xe[D]=xe[V]=xe[Q]=xe[ne]=xe[B]=xe[X]=xe[U]=xe[re]=xe[j]=xe[W]=xe[Z]=xe[ce]=xe[ee]=xe[pe]=xe[ue]=!0,xe[G]=xe[A]=xe[J]=!1;function le(ie,me,_e,Ce,je,Pe){var Te,Be=me&I,rt=me&N,$e=me&T;if(_e&&(Te=je?_e(ie,Ce,je,Pe):_e(ie)),Te!==void 0)return Te;if(!y(ie))return ie;var Ye=g(ie);if(Ye){if(Te=p(ie),!Be)return a(ie,Te)}else{var qe=h(ie),Xe=qe==A||qe==Y;if(b(ie))return o(ie,Be);if(qe==U||qe==k||Xe&&!je){if(Te=rt||Xe?{}:x(ie),!Be)return rt?c(ie,i(Te,ie)):s(ie,n(Te,ie))}else{if(!xe[qe])return je?ie:{};Te=v(ie,qe,Be)}}Pe||(Pe=new e);var Ue=Pe.get(ie);if(Ue)return Ue;Pe.set(ie,Te),_(ie)?ie.forEach(function(nt){Te.add(le(nt,me,_e,nt,ie,Pe))}):w(ie)&&ie.forEach(function(nt,Ct){Te.set(Ct,le(nt,me,_e,Ct,ie,Pe))});var sr=$e?rt?d:u:rt?S:E,Ut=Ye?void 0:sr(ie);return t(Ut||ie,function(nt,Ct){Ut&&(Ct=nt,nt=ie[Ct]),r(Te,Ct,le(nt,me,_e,Ct,ie,Pe))}),Te}return Lv=le,Lv}var zv,UI;function MZ(){if(UI)return zv;UI=1;var e=K4(),t=4;function r(n){return e(n,t)}return zv=r,zv}var Bv,GI;function w_(){if(GI)return Bv;GI=1;function e(t){return function(){return t}}return Bv=e,Bv}var Fv,KI;function AZ(){if(KI)return Fv;KI=1;function e(t){return function(r,n,i){for(var o=-1,a=Object(r),s=i(r),c=s.length;c--;){var u=s[t?c:++o];if(n(a[u],u,a)===!1)break}return r}}return Fv=e,Fv}var $v,YI;function __(){if(YI)return $v;YI=1;var e=AZ(),t=e();return $v=t,$v}var Hv,XI;function S_(){if(XI)return Hv;XI=1;var e=__(),t=eo();function r(n,i){return n&&e(n,i,t)}return Hv=r,Hv}var Vv,ZI;function DZ(){if(ZI)return Vv;ZI=1;var e=Ei();function t(r,n){return function(i,o){if(i==null)return i;if(!e(i))return r(i,o);for(var a=i.length,s=n?a:-1,c=Object(i);(n?s--:++s<a)&&o(c[s],s,c)!==!1;);return i}}return Vv=t,Vv}var Wv,JI;function Nd(){if(JI)return Wv;JI=1;var e=S_(),t=DZ(),r=t(e);return Wv=r,Wv}var Uv,QI;function Mo(){if(QI)return Uv;QI=1;function e(t){return t}return Uv=e,Uv}var Gv,eR;function Y4(){if(eR)return Gv;eR=1;var e=Mo();function t(r){return typeof r=="function"?r:e}return Gv=t,Gv}var Kv,tR;function X4(){if(tR)return Kv;tR=1;var e=p_(),t=Nd(),r=Y4(),n=Vt();function i(o,a){var s=n(o)?e:t;return s(o,r(a))}return Kv=i,Kv}var Yv,rR;function Z4(){return rR||(rR=1,Yv=X4()),Yv}var Xv,nR;function jZ(){if(nR)return Xv;nR=1;var e=Nd();function t(r,n){var i=[];return e(r,function(o,a,s){n(o,a,s)&&i.push(o)}),i}return Xv=t,Xv}var Zv,iR;function qZ(){if(iR)return Zv;iR=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return Zv=t,Zv}var Jv,oR;function LZ(){if(oR)return Jv;oR=1;function e(t){return this.__data__.has(t)}return Jv=e,Jv}var Qv,aR;function J4(){if(aR)return Qv;aR=1;var e=h_(),t=qZ(),r=LZ();function n(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Qv=n,Qv}var eg,sR;function zZ(){if(sR)return eg;sR=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return eg=e,eg}var tg,lR;function Q4(){if(lR)return tg;lR=1;function e(t,r){return t.has(r)}return tg=e,tg}var rg,cR;function e6(){if(cR)return rg;cR=1;var e=J4(),t=zZ(),r=Q4(),n=1,i=2;function o(a,s,c,u,d,h){var p=c&n,v=a.length,x=s.length;if(v!=x&&!(p&&x>v))return!1;var g=h.get(a),b=h.get(s);if(g&&b)return g==s&&b==a;var w=-1,y=!0,_=c&i?new e:void 0;for(h.set(a,s),h.set(s,a);++w<v;){var E=a[w],S=s[w];if(u)var I=p?u(S,E,w,s,a,h):u(E,S,w,a,s,h);if(I!==void 0){if(I)continue;y=!1;break}if(_){if(!t(s,function(N,T){if(!r(_,T)&&(E===N||d(E,N,c,u,h)))return _.push(T)})){y=!1;break}}else if(!(E===S||d(E,S,c,u,h))){y=!1;break}}return h.delete(a),h.delete(s),y}return rg=o,rg}var ng,uR;function BZ(){if(uR)return ng;uR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return ng=e,ng}var ig,dR;function E_(){if(dR)return ig;dR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return ig=e,ig}var og,fR;function FZ(){if(fR)return og;fR=1;var e=qa(),t=V4(),r=ja(),n=e6(),i=BZ(),o=E_(),a=1,s=2,c="[object Boolean]",u="[object Date]",d="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",x="[object Set]",g="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",y="[object DataView]",_=e?e.prototype:void 0,E=_?_.valueOf:void 0;function S(I,N,T,k,z,L,K){switch(T){case y:if(I.byteLength!=N.byteLength||I.byteOffset!=N.byteOffset)return!1;I=I.buffer,N=N.buffer;case w:return!(I.byteLength!=N.byteLength||!L(new t(I),new t(N)));case c:case u:case p:return r(+I,+N);case d:return I.name==N.name&&I.message==N.message;case v:case g:return I==N+"";case h:var G=i;case x:var A=k&a;if(G||(G=o),I.size!=N.size&&!A)return!1;var Y=K.get(I);if(Y)return Y==N;k|=s,K.set(I,N);var B=n(G(I),G(N),k,z,L,K);return K.delete(I),B;case b:if(E)return E.call(I)==E.call(N)}return!1}return og=S,og}var ag,hR;function $Z(){if(hR)return ag;hR=1;var e=$4(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,s,c,u,d){var h=s&t,p=e(o),v=p.length,x=e(a),g=x.length;if(v!=g&&!h)return!1;for(var b=v;b--;){var w=p[b];if(!(h?w in a:n.call(a,w)))return!1}var y=d.get(o),_=d.get(a);if(y&&_)return y==a&&_==o;var E=!0;d.set(o,a),d.set(a,o);for(var S=h;++b<v;){w=p[b];var I=o[w],N=a[w];if(c)var T=h?c(N,I,w,a,o,d):c(I,N,w,o,a,d);if(!(T===void 0?I===N||u(I,N,s,c,d):T)){E=!1;break}S||(S=w=="constructor")}if(E&&!S){var k=o.constructor,z=a.constructor;k!=z&&"constructor"in o&&"constructor"in a&&!(typeof k=="function"&&k instanceof k&&typeof z=="function"&&z instanceof z)&&(E=!1)}return d.delete(o),d.delete(a),E}return ag=i,ag}var sg,pR;function HZ(){if(pR)return sg;pR=1;var e=_d(),t=e6(),r=FZ(),n=$Z(),i=za(),o=Vt(),a=La(),s=Ol(),c=1,u="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function x(g,b,w,y,_,E){var S=o(g),I=o(b),N=S?d:i(g),T=I?d:i(b);N=N==u?h:N,T=T==u?h:T;var k=N==h,z=T==h,L=N==T;if(L&&a(g)){if(!a(b))return!1;S=!0,k=!1}if(L&&!k)return E||(E=new e),S||s(g)?t(g,b,w,y,_,E):r(g,b,N,w,y,_,E);if(!(w&c)){var K=k&&v.call(g,"__wrapped__"),G=z&&v.call(b,"__wrapped__");if(K||G){var A=K?g.value():g,Y=G?b.value():b;return E||(E=new e),_(A,Y,w,y,E)}}return L?(E||(E=new e),n(g,b,w,y,_,E)):!1}return sg=x,sg}var lg,vR;function t6(){if(vR)return lg;vR=1;var e=HZ(),t=ai();function r(n,i,o,a,s){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,o,a,r,s)}return lg=r,lg}var cg,gR;function VZ(){if(gR)return cg;gR=1;var e=_d(),t=t6(),r=1,n=2;function i(o,a,s,c){var u=s.length,d=u,h=!c;if(o==null)return!d;for(o=Object(o);u--;){var p=s[u];if(h&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++u<d;){p=s[u];var v=p[0],x=o[v],g=p[1];if(h&&p[2]){if(x===void 0&&!(v in o))return!1}else{var b=new e;if(c)var w=c(x,g,v,o,a,b);if(!(w===void 0?t(g,x,r|n,c,b):w))return!1}}return!0}return cg=i,cg}var ug,mR;function r6(){if(mR)return ug;mR=1;var e=En();function t(r){return r===r&&!e(r)}return ug=t,ug}var dg,bR;function WZ(){if(bR)return dg;bR=1;var e=r6(),t=eo();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],s=n[a];i[o]=[a,s,e(s)]}return i}return dg=r,dg}var fg,yR;function n6(){if(yR)return fg;yR=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return fg=e,fg}var hg,xR;function UZ(){if(xR)return hg;xR=1;var e=VZ(),t=WZ(),r=n6();function n(i){var o=t(i);return o.length==1&&o[0][2]?r(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return hg=n,hg}var pg,wR;function Ba(){if(wR)return pg;wR=1;var e=To(),t=ai(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return pg=n,pg}var vg,_R;function O_(){if(_R)return vg;_R=1;var e=Vt(),t=Ba(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:n.test(o)||!r.test(o)||a!=null&&o in Object(a)}return vg=i,vg}var gg,SR;function GZ(){if(SR)return gg;SR=1;var e=h_(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],c=o.cache;if(c.has(s))return c.get(s);var u=n.apply(this,a);return o.cache=c.set(s,u)||c,u};return o.cache=new(r.Cache||e),o}return r.Cache=e,gg=r,gg}var mg,ER;function KZ(){if(ER)return mg;ER=1;var e=GZ(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return mg=r,mg}var bg,OR;function YZ(){if(OR)return bg;OR=1;var e=KZ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,c,u){o.push(c?u.replace(r,"$1"):s||a)}),o});return bg=n,bg}var yg,CR;function Td(){if(CR)return yg;CR=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n<i;)o[n]=r(t[n],n,t);return o}return yg=e,yg}var xg,IR;function XZ(){if(IR)return xg;IR=1;var e=qa(),t=Td(),r=Vt(),n=Ba(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(r(s))return t(s,a)+"";if(n(s))return o?o.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return xg=a,xg}var wg,RR;function i6(){if(RR)return wg;RR=1;var e=XZ();function t(r){return r==null?"":e(r)}return wg=t,wg}var _g,NR;function Pd(){if(NR)return _g;NR=1;var e=Vt(),t=O_(),r=YZ(),n=i6();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return _g=i,_g}var Sg,TR;function Cl(){if(TR)return Sg;TR=1;var e=Ba();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Sg=t,Sg}var Eg,PR;function kd(){if(PR)return Eg;PR=1;var e=Pd(),t=Cl();function r(n,i){i=e(i,n);for(var o=0,a=i.length;n!=null&&o<a;)n=n[t(i[o++])];return o&&o==a?n:void 0}return Eg=r,Eg}var Og,kR;function ZZ(){if(kR)return Og;kR=1;var e=kd();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Og=t,Og}var Cg,MR;function JZ(){if(MR)return Cg;MR=1;function e(t,r){return t!=null&&r in Object(t)}return Cg=e,Cg}var Ig,AR;function o6(){if(AR)return Ig;AR=1;var e=Pd(),t=El(),r=Vt(),n=Od(),i=v_(),o=Cl();function a(s,c,u){c=e(c,s);for(var d=-1,h=c.length,p=!1;++d<h;){var v=o(c[d]);if(!(p=s!=null&&u(s,v)))break;s=s[v]}return p||++d!=h?p:(h=s==null?0:s.length,!!h&&i(h)&&n(v,h)&&(r(s)||t(s)))}return Ig=a,Ig}var Rg,DR;function a6(){if(DR)return Rg;DR=1;var e=JZ(),t=o6();function r(n,i){return n!=null&&t(n,i,e)}return Rg=r,Rg}var Ng,jR;function QZ(){if(jR)return Ng;jR=1;var e=t6(),t=ZZ(),r=a6(),n=O_(),i=r6(),o=n6(),a=Cl(),s=1,c=2;function u(d,h){return n(d)&&i(h)?o(a(d),h):function(p){var v=t(p,d);return v===void 0&&v===h?r(p,d):e(h,v,s|c)}}return Ng=u,Ng}var Tg,qR;function s6(){if(qR)return Tg;qR=1;function e(t){return function(r){return r==null?void 0:r[t]}}return Tg=e,Tg}var Pg,LR;function eJ(){if(LR)return Pg;LR=1;var e=kd();function t(r){return function(n){return e(n,r)}}return Pg=t,Pg}var kg,zR;function tJ(){if(zR)return kg;zR=1;var e=s6(),t=eJ(),r=O_(),n=Cl();function i(o){return r(o)?e(n(o)):t(o)}return kg=i,kg}var Mg,BR;function Oi(){if(BR)return Mg;BR=1;var e=UZ(),t=QZ(),r=Mo(),n=Vt(),i=tJ();function o(a){return typeof a=="function"?a:a==null?r:typeof a=="object"?n(a)?t(a[0],a[1]):e(a):i(a)}return Mg=o,Mg}var Ag,FR;function l6(){if(FR)return Ag;FR=1;var e=L4(),t=jZ(),r=Oi(),n=Vt();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Ag=i,Ag}var Dg,$R;function rJ(){if($R)return Dg;$R=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Dg=r,Dg}var jg,HR;function c6(){if(HR)return jg;HR=1;var e=rJ(),t=o6();function r(n,i){return n!=null&&t(n,i,e)}return jg=r,jg}var qg,VR;function nJ(){if(VR)return qg;VR=1;var e=m_(),t=za(),r=El(),n=Vt(),i=Ei(),o=La(),a=Id(),s=Ol(),c="[object Map]",u="[object Set]",d=Object.prototype,h=d.hasOwnProperty;function p(v){if(v==null)return!0;if(i(v)&&(n(v)||typeof v=="string"||typeof v.splice=="function"||o(v)||s(v)||r(v)))return!v.length;var x=t(v);if(x==c||x==u)return!v.size;if(a(v))return!e(v).length;for(var g in v)if(h.call(v,g))return!1;return!0}return qg=p,qg}var Lg,WR;function u6(){if(WR)return Lg;WR=1;function e(t){return t===void 0}return Lg=e,Lg}var zg,UR;function d6(){if(UR)return zg;UR=1;var e=Nd(),t=Ei();function r(n,i){var o=-1,a=t(n)?Array(n.length):[];return e(n,function(s,c,u){a[++o]=i(s,c,u)}),a}return zg=r,zg}var Bg,GR;function f6(){if(GR)return Bg;GR=1;var e=Td(),t=Oi(),r=d6(),n=Vt();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return Bg=i,Bg}var Fg,KR;function iJ(){if(KR)return Fg;KR=1;function e(t,r,n,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(n=t[++o]);++o<a;)n=r(n,t[o],o,t);return n}return Fg=e,Fg}var $g,YR;function oJ(){if(YR)return $g;YR=1;function e(t,r,n,i,o){return o(t,function(a,s,c){n=i?(i=!1,a):r(n,a,s,c)}),n}return $g=e,$g}var Hg,XR;function h6(){if(XR)return Hg;XR=1;var e=iJ(),t=Nd(),r=Oi(),n=oJ(),i=Vt();function o(a,s,c){var u=i(a)?e:n,d=arguments.length<3;return u(a,r(s,4),c,d,t)}return Hg=o,Hg}var Vg,ZR;function aJ(){if(ZR)return Vg;ZR=1;var e=To(),t=Vt(),r=ai(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Vg=i,Vg}var Wg,JR;function sJ(){if(JR)return Wg;JR=1;var e=s6(),t=e("length");return Wg=t,Wg}var Ug,QR;function lJ(){if(QR)return Ug;QR=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function c(u){return s.test(u)}return Ug=c,Ug}var Gg,eN;function cJ(){if(eN)return Gg;eN=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+c+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",x=u+"?",g="["+o+"]?",b="(?:"+v+"(?:"+[d,h,p].join("|")+")"+g+x+")*",w=g+x+b,y="(?:"+[d+s+"?",s,h,p,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+y+w,"g");function E(S){for(var I=_.lastIndex=0;_.test(S);)++I;return I}return Gg=E,Gg}var Kg,tN;function uJ(){if(tN)return Kg;tN=1;var e=sJ(),t=lJ(),r=cJ();function n(i){return t(i)?r(i):e(i)}return Kg=n,Kg}var Yg,rN;function dJ(){if(rN)return Yg;rN=1;var e=m_(),t=za(),r=Ei(),n=aJ(),i=uJ(),o="[object Map]",a="[object Set]";function s(c){if(c==null)return 0;if(r(c))return n(c)?i(c):c.length;var u=t(c);return u==o||u==a?c.size:e(c).length}return Yg=s,Yg}var Xg,nN;function fJ(){if(nN)return Xg;nN=1;var e=p_(),t=U4(),r=S_(),n=Oi(),i=Rd(),o=Vt(),a=La(),s=_l(),c=En(),u=Ol();function d(h,p,v){var x=o(h),g=x||a(h)||u(h);if(p=n(p,4),v==null){var b=h&&h.constructor;g?v=x?new b:[]:c(h)?v=s(b)?t(i(h)):{}:v={}}return(g?e:r)(h,function(w,y,_){return p(v,w,y,_)}),v}return Xg=d,Xg}var Zg,iN;function hJ(){if(iN)return Zg;iN=1;var e=qa(),t=El(),r=Vt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return Zg=i,Zg}var Jg,oN;function C_(){if(oN)return Jg;oN=1;var e=y_(),t=hJ();function r(n,i,o,a,s){var c=-1,u=n.length;for(o||(o=t),s||(s=[]);++c<u;){var d=n[c];i>0&&o(d)?i>1?r(d,i-1,o,a,s):e(s,d):a||(s[s.length]=d)}return s}return Jg=r,Jg}var Qg,aN;function pJ(){if(aN)return Qg;aN=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Qg=e,Qg}var em,sN;function p6(){if(sN)return em;sN=1;var e=pJ(),t=Math.max;function r(n,i,o){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,s=-1,c=t(a.length-i,0),u=Array(c);++s<c;)u[s]=a[i+s];s=-1;for(var d=Array(i+1);++s<i;)d[s]=a[s];return d[i]=o(u),e(n,this,d)}}return em=r,em}var tm,lN;function vJ(){if(lN)return tm;lN=1;var e=w_(),t=M4(),r=Mo(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return tm=n,tm}var rm,cN;function gJ(){if(cN)return rm;cN=1;var e=800,t=16,r=Date.now;function n(i){var o=0,a=0;return function(){var s=r(),c=t-(s-a);if(a=s,c>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return rm=n,rm}var nm,uN;function v6(){if(uN)return nm;uN=1;var e=vJ(),t=gJ(),r=t(e);return nm=r,nm}var im,dN;function Md(){if(dN)return im;dN=1;var e=Mo(),t=p6(),r=v6();function n(i,o){return r(t(i,o,e),i+"")}return im=n,im}var om,fN;function g6(){if(fN)return om;fN=1;function e(t,r,n,i){for(var o=t.length,a=n+(i?1:-1);i?a--:++a<o;)if(r(t[a],a,t))return a;return-1}return om=e,om}var am,hN;function mJ(){if(hN)return am;hN=1;function e(t){return t!==t}return am=e,am}var sm,pN;function bJ(){if(pN)return sm;pN=1;function e(t,r,n){for(var i=n-1,o=t.length;++i<o;)if(t[i]===r)return i;return-1}return sm=e,sm}var lm,vN;function yJ(){if(vN)return lm;vN=1;var e=g6(),t=mJ(),r=bJ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return lm=n,lm}var cm,gN;function xJ(){if(gN)return cm;gN=1;var e=yJ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return cm=t,cm}var um,mN;function wJ(){if(mN)return um;mN=1;function e(t,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(r,t[i]))return!0;return!1}return um=e,um}var dm,bN;function _J(){if(bN)return dm;bN=1;function e(){}return dm=e,dm}var fm,yN;function SJ(){if(yN)return fm;yN=1;var e=H4(),t=_J(),r=E_(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return fm=i,fm}var hm,xN;function EJ(){if(xN)return hm;xN=1;var e=J4(),t=xJ(),r=wJ(),n=Q4(),i=SJ(),o=E_(),a=200;function s(c,u,d){var h=-1,p=t,v=c.length,x=!0,g=[],b=g;if(d)x=!1,p=r;else if(v>=a){var w=u?null:i(c);if(w)return o(w);x=!1,p=n,b=new e}else b=u?[]:g;e:for(;++h<v;){var y=c[h],_=u?u(y):y;if(y=d||y!==0?y:0,x&&_===_){for(var E=b.length;E--;)if(b[E]===_)continue e;u&&b.push(_),g.push(y)}else p(b,_,d)||(b!==g&&b.push(_),g.push(y))}return g}return hm=s,hm}var pm,wN;function m6(){if(wN)return pm;wN=1;var e=Ei(),t=ai();function r(n){return t(n)&&e(n)}return pm=r,pm}var vm,_N;function OJ(){if(_N)return vm;_N=1;var e=C_(),t=Md(),r=EJ(),n=m6(),i=t(function(o){return r(e(o,1,n,!0))});return vm=i,vm}var gm,SN;function CJ(){if(SN)return gm;SN=1;var e=Td();function t(r,n){return e(n,function(i){return r[i]})}return gm=t,gm}var mm,EN;function b6(){if(EN)return mm;EN=1;var e=CJ(),t=eo();function r(n){return n==null?[]:e(n,t(n))}return mm=r,mm}var bm,ON;function On(){if(ON)return bm;ON=1;var e;if(typeof d_=="function")try{e={clone:MZ(),constant:w_(),each:Z4(),filter:l6(),has:c6(),isArray:Vt(),isEmpty:nJ(),isFunction:_l(),isUndefined:u6(),keys:eo(),map:f6(),reduce:h6(),size:dJ(),transform:fJ(),union:OJ(),values:b6()}}catch{}return e||(e=window._),bm=e,bm}var ym,CN;function I_(){if(CN)return ym;CN=1;var e=On();ym=i;var t="\0",r="\0",n="";function i(d){this._isDirected=e.has(d,"directed")?d.directed:!0,this._isMultigraph=e.has(d,"multigraph")?d.multigraph:!1,this._isCompound=e.has(d,"compound")?d.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(d){return this._label=d,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._in[h])})},i.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._out[h])})},i.prototype.setNodes=function(d,h){var p=arguments,v=this;return e.each(d,function(x){p.length>1?v.setNode(x,h):v.setNode(x)}),this},i.prototype.setNode=function(d,h){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=r,this._children[d]={},this._children[r][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},i.prototype.node=function(d){return this._nodes[d]},i.prototype.hasNode=function(d){return e.has(this._nodes,d)},i.prototype.removeNode=function(d){var h=this;if(e.has(this._nodes,d)){var p=function(v){h.removeEdge(h._edgeObjs[v])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(v){h.setParent(v)}),delete this._children[d]),e.each(e.keys(this._in[d]),p),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),p),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},i.prototype.setParent=function(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=r;else{h+="";for(var p=h;!e.isUndefined(p);p=this.parent(p))if(p===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=!0,this},i.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},i.prototype.parent=function(d){if(this._isCompound){var h=this._parent[d];if(h!==r)return h}},i.prototype.children=function(d){if(e.isUndefined(d)&&(d=r),this._isCompound){var h=this._children[d];if(h)return e.keys(h)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},i.prototype.predecessors=function(d){var h=this._preds[d];if(h)return e.keys(h)},i.prototype.successors=function(d){var h=this._sucs[d];if(h)return e.keys(h)},i.prototype.neighbors=function(d){var h=this.predecessors(d);if(h)return e.union(h,this.successors(d))},i.prototype.isLeaf=function(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0},i.prototype.filterNodes=function(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var p=this;e.each(this._nodes,function(g,b){d(b)&&h.setNode(b,g)}),e.each(this._edgeObjs,function(g){h.hasNode(g.v)&&h.hasNode(g.w)&&h.setEdge(g,p.edge(g))});var v={};function x(g){var b=p.parent(g);return b===void 0||h.hasNode(b)?(v[g]=b,b):b in v?v[b]:x(b)}return this._isCompound&&e.each(h.nodes(),function(g){h.setParent(g,x(g))}),h},i.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(d,h){var p=this,v=arguments;return e.reduce(d,function(x,g){return v.length>1?p.setEdge(x,g,h):p.setEdge(x,g),g}),this},i.prototype.setEdge=function(){var d,h,p,v,x=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(d=g.v,h=g.w,p=g.name,arguments.length===2&&(v=arguments[1],x=!0)):(d=g,h=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],x=!0)),d=""+d,h=""+h,e.isUndefined(p)||(p=""+p);var b=s(this._isDirected,d,h,p);if(e.has(this._edgeLabels,b))return x&&(this._edgeLabels[b]=v),this;if(!e.isUndefined(p)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[b]=x?v:this._defaultEdgeLabelFn(d,h,p);var w=c(this._isDirected,d,h,p);return d=w.v,h=w.w,Object.freeze(w),this._edgeObjs[b]=w,o(this._preds[h],d),o(this._sucs[d],h),this._in[h][b]=w,this._out[d][b]=w,this._edgeCount++,this},i.prototype.edge=function(d,h,p){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,p);return this._edgeLabels[v]},i.prototype.hasEdge=function(d,h,p){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,p);return e.has(this._edgeLabels,v)},i.prototype.removeEdge=function(d,h,p){var v=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,h,p),x=this._edgeObjs[v];return x&&(d=x.v,h=x.w,delete this._edgeLabels[v],delete this._edgeObjs[v],a(this._preds[h],d),a(this._sucs[d],h),delete this._in[h][v],delete this._out[d][v],this._edgeCount--),this},i.prototype.inEdges=function(d,h){var p=this._in[d];if(p){var v=e.values(p);return h?e.filter(v,function(x){return x.v===h}):v}},i.prototype.outEdges=function(d,h){var p=this._out[d];if(p){var v=e.values(p);return h?e.filter(v,function(x){return x.w===h}):v}},i.prototype.nodeEdges=function(d,h){var p=this.inEdges(d,h);if(p)return p.concat(this.outEdges(d,h))};function o(d,h){d[h]?d[h]++:d[h]=1}function a(d,h){--d[h]||delete d[h]}function s(d,h,p,v){var x=""+h,g=""+p;if(!d&&x>g){var b=x;x=g,g=b}return x+n+g+n+(e.isUndefined(v)?t:v)}function c(d,h,p,v){var x=""+h,g=""+p;if(!d&&x>g){var b=x;x=g,g=b}var w={v:x,w:g};return v&&(w.name=v),w}function u(d,h){return s(d,h.v,h.w,h.name)}return ym}var xm,IN;function IJ(){return IN||(IN=1,xm="2.1.8"),xm}var wm,RN;function RJ(){return RN||(RN=1,wm={Graph:I_(),version:IJ()}),wm}var _m,NN;function NJ(){if(NN)return _m;NN=1;var e=On(),t=I_();_m={write:r,read:o};function r(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:i(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function n(a){return e.map(a.nodes(),function(s){var c=a.node(s),u=a.parent(s),d={v:s};return e.isUndefined(c)||(d.value=c),e.isUndefined(u)||(d.parent=u),d})}function i(a){return e.map(a.edges(),function(s){var c=a.edge(s),u={v:s.v,w:s.w};return e.isUndefined(s.name)||(u.name=s.name),e.isUndefined(c)||(u.value=c),u})}function o(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(a.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return _m}var Sm,TN;function TJ(){if(TN)return Sm;TN=1;var e=On();Sm=t;function t(r){var n={},i=[],o;function a(s){e.has(n,s)||(n[s]=!0,o.push(s),e.each(r.successors(s),a),e.each(r.predecessors(s),a))}return e.each(r.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return Sm}var Em,PN;function y6(){if(PN)return Em;PN=1;var e=On();Em=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var i=this._keyIndices;if(r=String(r),!e.has(i,r)){var o=this._arr,a=o.length;return i[r]=a,o.push({key:r,priority:n}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var i=this._keyIndices[r];if(n>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[i].priority+" New: "+n);this._arr[i].priority=n,this._decrease(i)},t.prototype._heapify=function(r){var n=this._arr,i=2*r,o=i+1,a=r;i<n.length&&(a=n[i].priority<n[a].priority?i:a,o<n.length&&(a=n[o].priority<n[a].priority?o:a),a!==r&&(this._swap(r,a),this._heapify(a)))},t.prototype._decrease=function(r){for(var n=this._arr,i=n[r].priority,o;r!==0&&(o=r>>1,!(n[o].priority<i));)this._swap(r,o),r=o},t.prototype._swap=function(r,n){var i=this._arr,o=this._keyIndices,a=i[r],s=i[n];i[r]=s,i[n]=a,o[s.key]=r,o[a.key]=n},Em}var Om,kN;function x6(){if(kN)return Om;kN=1;var e=On(),t=y6();Om=n;var r=e.constant(1);function n(o,a,s,c){return i(o,String(a),s||r,c||function(u){return o.outEdges(u)})}function i(o,a,s,c){var u={},d=new t,h,p,v=function(x){var g=x.v!==h?x.v:x.w,b=u[g],w=s(x),y=p.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+w);y<b.distance&&(b.distance=y,b.predecessor=h,d.decrease(g,y))};for(o.nodes().forEach(function(x){var g=x===a?0:Number.POSITIVE_INFINITY;u[x]={distance:g},d.add(x,g)});d.size()>0&&(h=d.removeMin(),p=u[h],p.distance!==Number.POSITIVE_INFINITY);)c(h).forEach(v);return u}return Om}var Cm,MN;function PJ(){if(MN)return Cm;MN=1;var e=x6(),t=On();Cm=r;function r(n,i,o){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,i,o)},{})}return Cm}var Im,AN;function w6(){if(AN)return Im;AN=1;var e=On();Im=t;function t(r){var n=0,i=[],o={},a=[];function s(c){var u=o[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),r.successors(c).forEach(function(p){e.has(o,p)?o[p].onStack&&(u.lowlink=Math.min(u.lowlink,o[p].index)):(s(p),u.lowlink=Math.min(u.lowlink,o[p].lowlink))}),u.lowlink===u.index){var d=[],h;do h=i.pop(),o[h].onStack=!1,d.push(h);while(c!==h);a.push(d)}}return r.nodes().forEach(function(c){e.has(o,c)||s(c)}),a}return Im}var Rm,DN;function kJ(){if(DN)return Rm;DN=1;var e=On(),t=w6();Rm=r;function r(n){return e.filter(t(n),function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return Rm}var Nm,jN;function MJ(){if(jN)return Nm;jN=1;var e=On();Nm=r;var t=e.constant(1);function r(i,o,a){return n(i,o||t,a||function(s){return i.outEdges(s)})}function n(i,o,a){var s={},c=i.nodes();return c.forEach(function(u){s[u]={},s[u][u]={distance:0},c.forEach(function(d){u!==d&&(s[u][d]={distance:Number.POSITIVE_INFINITY})}),a(u).forEach(function(d){var h=d.v===u?d.w:d.v,p=o(d);s[u][h]={distance:p,predecessor:u}})}),c.forEach(function(u){var d=s[u];c.forEach(function(h){var p=s[h];c.forEach(function(v){var x=p[u],g=d[v],b=p[v],w=x.distance+g.distance;w<b.distance&&(b.distance=w,b.predecessor=g.predecessor)})})}),s}return Nm}var Tm,qN;function _6(){if(qN)return Tm;qN=1;var e=On();Tm=t,t.CycleException=r;function t(n){var i={},o={},a=[];function s(c){if(e.has(o,c))throw new r;e.has(i,c)||(o[c]=!0,i[c]=!0,e.each(n.predecessors(c),s),delete o[c],a.push(c))}if(e.each(n.sinks(),s),e.size(i)!==n.nodeCount())throw new r;return a}function r(){}return r.prototype=new Error,Tm}var Pm,LN;function AJ(){if(LN)return Pm;LN=1;var e=_6();Pm=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Pm}var km,zN;function S6(){if(zN)return km;zN=1;var e=On();km=t;function t(n,i,o){e.isArray(i)||(i=[i]);var a=(n.isDirected()?n.successors:n.neighbors).bind(n),s=[],c={};return e.each(i,function(u){if(!n.hasNode(u))throw new Error("Graph does not have node: "+u);r(n,u,o==="post",c,a,s)}),s}function r(n,i,o,a,s,c){e.has(a,i)||(a[i]=!0,o||c.push(i),e.each(s(i),function(u){r(n,u,o,a,s,c)}),o&&c.push(i))}return km}var Mm,BN;function DJ(){if(BN)return Mm;BN=1;var e=S6();Mm=t;function t(r,n){return e(r,n,"post")}return Mm}var Am,FN;function jJ(){if(FN)return Am;FN=1;var e=S6();Am=t;function t(r,n){return e(r,n,"pre")}return Am}var Dm,$N;function qJ(){if($N)return Dm;$N=1;var e=On(),t=I_(),r=y6();Dm=n;function n(i,o){var a=new t,s={},c=new r,u;function d(p){var v=p.v===u?p.w:p.v,x=c.priority(v);if(x!==void 0){var g=o(p);g<x&&(s[v]=u,c.decrease(v,g))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(p){c.add(p,Number.POSITIVE_INFINITY),a.setNode(p)}),c.decrease(i.nodes()[0],0);for(var h=!1;c.size()>0;){if(u=c.removeMin(),e.has(s,u))a.setEdge(u,s[u]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(u).forEach(d)}return a}return Dm}var jm,HN;function LJ(){return HN||(HN=1,jm={components:TJ(),dijkstra:x6(),dijkstraAll:PJ(),findCycles:kJ(),floydWarshall:MJ(),isAcyclic:AJ(),postorder:DJ(),preorder:jJ(),prim:qJ(),tarjan:w6(),topsort:_6()}),jm}var qm,VN;function zJ(){if(VN)return qm;VN=1;var e=RJ();return qm={Graph:e.Graph,json:NJ(),alg:LJ(),version:e.version},qm}var Lm,WN;function Fn(){if(WN)return Lm;WN=1;var e;if(typeof d_=="function")try{e=zJ()}catch{}return e||(e=window.graphlib),Lm=e,Lm}var zm,UN;function BJ(){if(UN)return zm;UN=1;var e=K4(),t=1,r=4;function n(i){return e(i,t|r)}return zm=n,zm}var Bm,GN;function Ad(){if(GN)return Bm;GN=1;var e=ja(),t=Ei(),r=Od(),n=En();function i(o,a,s){if(!n(s))return!1;var c=typeof a;return(c=="number"?t(s)&&r(a,s.length):c=="string"&&a in s)?e(s[a],o):!1}return Bm=i,Bm}var Fm,KN;function FJ(){if(KN)return Fm;KN=1;var e=Md(),t=ja(),r=Ad(),n=ko(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,c){s=Object(s);var u=-1,d=c.length,h=d>2?c[2]:void 0;for(h&&r(c[0],c[1],h)&&(d=1);++u<d;)for(var p=c[u],v=n(p),x=-1,g=v.length;++x<g;){var b=v[x],w=s[b];(w===void 0||t(w,i[b])&&!o.call(s,b))&&(s[b]=p[b])}return s});return Fm=a,Fm}var $m,YN;function $J(){if(YN)return $m;YN=1;var e=Oi(),t=Ei(),r=eo();function n(i){return function(o,a,s){var c=Object(o);if(!t(o)){var u=e(a,3);o=r(o),a=function(h){return u(c[h],h,c)}}var d=i(o,a,s);return d>-1?c[u?o[d]:d]:void 0}}return $m=n,$m}var Hm,XN;function HJ(){if(XN)return Hm;XN=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Hm=t,Hm}var Vm,ZN;function VJ(){if(ZN)return Vm;ZN=1;var e=HJ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Vm=r,Vm}var Wm,JN;function WJ(){if(JN)return Wm;JN=1;var e=VJ(),t=En(),r=Ba(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function c(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var h=o.test(u);return h||a.test(u)?s(u.slice(2),h?2:8):i.test(u)?n:+u}return Wm=c,Wm}var Um,QN;function E6(){if(QN)return Um;QN=1;var e=WJ(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*r}return i===i?i:0}return Um=n,Um}var Gm,eT;function UJ(){if(eT)return Gm;eT=1;var e=E6();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Gm=t,Gm}var Km,tT;function GJ(){if(tT)return Km;tT=1;var e=g6(),t=Oi(),r=UJ(),n=Math.max;function i(o,a,s){var c=o==null?0:o.length;if(!c)return-1;var u=s==null?0:r(s);return u<0&&(u=n(c+u,0)),e(o,t(a,3),u)}return Km=i,Km}var Ym,rT;function KJ(){if(rT)return Ym;rT=1;var e=$J(),t=GJ(),r=e(t);return Ym=r,Ym}var Xm,nT;function O6(){if(nT)return Xm;nT=1;var e=C_();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return Xm=t,Xm}var Zm,iT;function YJ(){if(iT)return Zm;iT=1;var e=__(),t=Y4(),r=ko();function n(i,o){return i==null?i:e(i,t(o),r)}return Zm=n,Zm}var Jm,oT;function XJ(){if(oT)return Jm;oT=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return Jm=e,Jm}var Qm,aT;function ZJ(){if(aT)return Qm;aT=1;var e=Sd(),t=S_(),r=Oi();function n(i,o){var a={};return o=r(o,3),t(i,function(s,c,u){e(a,c,o(s,c,u))}),a}return Qm=n,Qm}var eb,sT;function R_(){if(sT)return eb;sT=1;var e=Ba();function t(r,n,i){for(var o=-1,a=r.length;++o<a;){var s=r[o],c=n(s);if(c!=null&&(u===void 0?c===c&&!e(c):i(c,u)))var u=c,d=s}return d}return eb=t,eb}var tb,lT;function JJ(){if(lT)return tb;lT=1;function e(t,r){return t>r}return tb=e,tb}var rb,cT;function QJ(){if(cT)return rb;cT=1;var e=R_(),t=JJ(),r=Mo();function n(i){return i&&i.length?e(i,r,t):void 0}return rb=n,rb}var nb,uT;function C6(){if(uT)return nb;uT=1;var e=Sd(),t=ja();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return nb=r,nb}var ib,dT;function eQ(){if(dT)return ib;dT=1;var e=To(),t=Rd(),r=ai(),n="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,c=a.call(Object);function u(d){if(!r(d)||e(d)!=n)return!1;var h=t(d);if(h===null)return!0;var p=s.call(h,"constructor")&&h.constructor;return typeof p=="function"&&p instanceof p&&a.call(p)==c}return ib=u,ib}var ob,fT;function I6(){if(fT)return ob;fT=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return ob=e,ob}var ab,hT;function tQ(){if(hT)return ab;hT=1;var e=Sl(),t=ko();function r(n){return e(n,t(n))}return ab=r,ab}var sb,pT;function rQ(){if(pT)return sb;pT=1;var e=C6(),t=j4(),r=W4(),n=q4(),i=G4(),o=El(),a=Vt(),s=m6(),c=La(),u=_l(),d=En(),h=eQ(),p=Ol(),v=I6(),x=tQ();function g(b,w,y,_,E,S,I){var N=v(b,y),T=v(w,y),k=I.get(T);if(k){e(b,y,k);return}var z=S?S(N,T,y+"",b,w,I):void 0,L=z===void 0;if(L){var K=a(T),G=!K&&c(T),A=!K&&!G&&p(T);z=T,K||G||A?a(N)?z=N:s(N)?z=n(N):G?(L=!1,z=t(T,!0)):A?(L=!1,z=r(T,!0)):z=[]:h(T)||o(T)?(z=N,o(N)?z=x(N):(!d(N)||u(N))&&(z=i(T))):L=!1}L&&(I.set(T,z),E(z,T,_,S,I),I.delete(T)),e(b,y,z)}return sb=g,sb}var lb,vT;function nQ(){if(vT)return lb;vT=1;var e=_d(),t=C6(),r=__(),n=rQ(),i=En(),o=ko(),a=I6();function s(c,u,d,h,p){c!==u&&r(u,function(v,x){if(p||(p=new e),i(v))n(c,u,x,d,s,h,p);else{var g=h?h(a(c,x),v,x+"",c,u,p):void 0;g===void 0&&(g=v),t(c,x,g)}},o)}return lb=s,lb}var cb,gT;function iQ(){if(gT)return cb;gT=1;var e=Md(),t=Ad();function r(n){return e(function(i,o){var a=-1,s=o.length,c=s>1?o[s-1]:void 0,u=s>2?o[2]:void 0;for(c=n.length>3&&typeof c=="function"?(s--,c):void 0,u&&t(o[0],o[1],u)&&(c=s<3?void 0:c,s=1),i=Object(i);++a<s;){var d=o[a];d&&n(i,d,a,c)}return i})}return cb=r,cb}var ub,mT;function oQ(){if(mT)return ub;mT=1;var e=nQ(),t=iQ(),r=t(function(n,i,o){e(n,i,o)});return ub=r,ub}var db,bT;function R6(){if(bT)return db;bT=1;function e(t,r){return t<r}return db=e,db}var fb,yT;function aQ(){if(yT)return fb;yT=1;var e=R_(),t=R6(),r=Mo();function n(i){return i&&i.length?e(i,r,t):void 0}return fb=n,fb}var hb,xT;function sQ(){if(xT)return hb;xT=1;var e=R_(),t=Oi(),r=R6();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return hb=n,hb}var pb,wT;function lQ(){if(wT)return pb;wT=1;var e=$n(),t=function(){return e.Date.now()};return pb=t,pb}var vb,_T;function cQ(){if(_T)return vb;_T=1;var e=Ed(),t=Pd(),r=Od(),n=En(),i=Cl();function o(a,s,c,u){if(!n(a))return a;s=t(s,a);for(var d=-1,h=s.length,p=h-1,v=a;v!=null&&++d<h;){var x=i(s[d]),g=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return a;if(d!=p){var b=v[x];g=u?u(b,x,v):void 0,g===void 0&&(g=n(b)?b:r(s[d+1])?[]:{})}e(v,x,g),v=v[x]}return a}return vb=o,vb}var gb,ST;function uQ(){if(ST)return gb;ST=1;var e=kd(),t=cQ(),r=Pd();function n(i,o,a){for(var s=-1,c=o.length,u={};++s<c;){var d=o[s],h=e(i,d);a(h,d)&&t(u,r(d,i),h)}return u}return gb=n,gb}var mb,ET;function dQ(){if(ET)return mb;ET=1;var e=uQ(),t=a6();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return mb=r,mb}var bb,OT;function fQ(){if(OT)return bb;OT=1;var e=O6(),t=p6(),r=v6();function n(i){return r(t(i,void 0,e),i+"")}return bb=n,bb}var yb,CT;function hQ(){if(CT)return yb;CT=1;var e=dQ(),t=fQ(),r=t(function(n,i){return n==null?{}:e(n,i)});return yb=r,yb}var xb,IT;function pQ(){if(IT)return xb;IT=1;var e=Math.ceil,t=Math.max;function r(n,i,o,a){for(var s=-1,c=t(e((i-n)/(o||1)),0),u=Array(c);c--;)u[a?c:++s]=n,n+=o;return u}return xb=r,xb}var wb,RT;function vQ(){if(RT)return wb;RT=1;var e=pQ(),t=Ad(),r=E6();function n(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=r(o),a===void 0?(a=o,o=0):a=r(a),s=s===void 0?o<a?1:-1:r(s),e(o,a,s,i)}}return wb=n,wb}var _b,NT;function gQ(){if(NT)return _b;NT=1;var e=vQ(),t=e();return _b=t,_b}var Sb,TT;function mQ(){if(TT)return Sb;TT=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Sb=e,Sb}var Eb,PT;function bQ(){if(PT)return Eb;PT=1;var e=Ba();function t(r,n){if(r!==n){var i=r!==void 0,o=r===null,a=r===r,s=e(r),c=n!==void 0,u=n===null,d=n===n,h=e(n);if(!u&&!h&&!s&&r>n||s&&c&&d&&!u&&!h||o&&c&&d||!i&&d||!a)return 1;if(!o&&!s&&!h&&r<n||h&&i&&a&&!o&&!s||u&&i&&a||!c&&a||!d)return-1}return 0}return Eb=t,Eb}var Ob,kT;function yQ(){if(kT)return Ob;kT=1;var e=bQ();function t(r,n,i){for(var o=-1,a=r.criteria,s=n.criteria,c=a.length,u=i.length;++o<c;){var d=e(a[o],s[o]);if(d){if(o>=u)return d;var h=i[o];return d*(h=="desc"?-1:1)}}return r.index-n.index}return Ob=t,Ob}var Cb,MT;function xQ(){if(MT)return Cb;MT=1;var e=Td(),t=kd(),r=Oi(),n=d6(),i=mQ(),o=Cd(),a=yQ(),s=Mo(),c=Vt();function u(d,h,p){h.length?h=e(h,function(g){return c(g)?function(b){return t(b,g.length===1?g[0]:g)}:g}):h=[s];var v=-1;h=e(h,o(r));var x=n(d,function(g,b,w){var y=e(h,function(_){return _(g)});return{criteria:y,index:++v,value:g}});return i(x,function(g,b){return a(g,b,p)})}return Cb=u,Cb}var Ib,AT;function wQ(){if(AT)return Ib;AT=1;var e=C_(),t=xQ(),r=Md(),n=Ad(),i=r(function(o,a){if(o==null)return[];var s=a.length;return s>1&&n(o,a[0],a[1])?a=[]:s>2&&n(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return Ib=i,Ib}var Rb,DT;function _Q(){if(DT)return Rb;DT=1;var e=i6(),t=0;function r(n){var i=++t;return e(n)+i}return Rb=r,Rb}var Nb,jT;function SQ(){if(jT)return Nb;jT=1;function e(t,r,n){for(var i=-1,o=t.length,a=r.length,s={};++i<o;){var c=i<a?r[i]:void 0;n(s,t[i],c)}return s}return Nb=e,Nb}var Tb,qT;function EQ(){if(qT)return Tb;qT=1;var e=Ed(),t=SQ();function r(n,i){return t(n||[],i||[],e)}return Tb=r,Tb}var Pb,LT;function Ot(){if(LT)return Pb;LT=1;var e;if(typeof d_=="function")try{e={cloneDeep:BJ(),constant:w_(),defaults:FJ(),each:Z4(),filter:l6(),find:KJ(),flatten:O6(),forEach:X4(),forIn:YJ(),has:c6(),isUndefined:u6(),last:XJ(),map:f6(),mapValues:ZJ(),max:QJ(),merge:oQ(),min:aQ(),minBy:sQ(),now:lQ(),pick:hQ(),range:gQ(),reduce:h6(),sortBy:wQ(),uniqueId:_Q(),values:b6(),zipObject:EQ()}}catch{}return e||(e=window._),Pb=e,Pb}var kb,zT;function OQ(){if(zT)return kb;zT=1,kb=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return t(i),i},e.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&t(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},e.prototype.toString=function(){for(var n=[],i=this._sentinel,o=i._prev;o!==i;)n.push(JSON.stringify(o,r)),o=o._prev;return"["+n.join(", ")+"]"};function t(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,i){if(n!=="_next"&&n!=="_prev")return i}return kb}var Mb,BT;function CQ(){if(BT)return Mb;BT=1;var e=Ot(),t=Fn().Graph,r=OQ();Mb=i;var n=e.constant(1);function i(u,d){if(u.nodeCount()<=1)return[];var h=s(u,d||n),p=o(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(p,function(v){return u.outEdges(v.v,v.w)}),!0)}function o(u,d,h){for(var p=[],v=d[d.length-1],x=d[0],g;u.nodeCount();){for(;g=x.dequeue();)a(u,d,h,g);for(;g=v.dequeue();)a(u,d,h,g);if(u.nodeCount()){for(var b=d.length-2;b>0;--b)if(g=d[b].dequeue(),g){p=p.concat(a(u,d,h,g,!0));break}}}return p}function a(u,d,h,p,v){var x=v?[]:void 0;return e.forEach(u.inEdges(p.v),function(g){var b=u.edge(g),w=u.node(g.v);v&&x.push({v:g.v,w:g.w}),w.out-=b,c(d,h,w)}),e.forEach(u.outEdges(p.v),function(g){var b=u.edge(g),w=g.w,y=u.node(w);y.in-=b,c(d,h,y)}),u.removeNode(p.v),x}function s(u,d){var h=new t,p=0,v=0;e.forEach(u.nodes(),function(b){h.setNode(b,{v:b,in:0,out:0})}),e.forEach(u.edges(),function(b){var w=h.edge(b.v,b.w)||0,y=d(b),_=w+y;h.setEdge(b.v,b.w,_),v=Math.max(v,h.node(b.v).out+=y),p=Math.max(p,h.node(b.w).in+=y)});var x=e.range(v+p+3).map(function(){return new r}),g=p+1;return e.forEach(h.nodes(),function(b){c(x,g,h.node(b))}),{graph:h,buckets:x,zeroIdx:g}}function c(u,d,h){h.out?h.in?u[h.out-h.in+d].enqueue(h):u[u.length-1].enqueue(h):u[0].enqueue(h)}return Mb}var Ab,FT;function IQ(){if(FT)return Ab;FT=1;var e=Ot(),t=CQ();Ab={run:r,undo:i};function r(o){var a=o.graph().acyclicer==="greedy"?t(o,s(o)):n(o);e.forEach(a,function(c){var u=o.edge(c);o.removeEdge(c),u.forwardName=c.name,u.reversed=!0,o.setEdge(c.w,c.v,u,e.uniqueId("rev"))});function s(c){return function(u){return c.edge(u).weight}}}function n(o){var a=[],s={},c={};function u(d){e.has(c,d)||(c[d]=!0,s[d]=!0,e.forEach(o.outEdges(d),function(h){e.has(s,h.w)?a.push(h):u(h.w)}),delete s[d])}return e.forEach(o.nodes(),u),a}function i(o){e.forEach(o.edges(),function(a){var s=o.edge(a);if(s.reversed){o.removeEdge(a);var c=s.forwardName;delete s.reversed,delete s.forwardName,o.setEdge(a.w,a.v,s,c)}})}return Ab}var Db,$T;function Vr(){if($T)return Db;$T=1;var e=Ot(),t=Fn().Graph;Db={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:s,buildLayerMatrix:c,normalizeRanks:u,removeEmptyRanks:d,addBorderNode:h,maxRank:p,partition:v,time:x,notime:g};function r(b,w,y,_){var E;do E=e.uniqueId(_);while(b.hasNode(E));return y.dummy=w,b.setNode(E,y),E}function n(b){var w=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(y){w.setNode(y,b.node(y))}),e.forEach(b.edges(),function(y){var _=w.edge(y.v,y.w)||{weight:0,minlen:1},E=b.edge(y);w.setEdge(y.v,y.w,{weight:_.weight+E.weight,minlen:Math.max(_.minlen,E.minlen)})}),w}function i(b){var w=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(y){b.children(y).length||w.setNode(y,b.node(y))}),e.forEach(b.edges(),function(y){w.setEdge(y,b.edge(y))}),w}function o(b){var w=e.map(b.nodes(),function(y){var _={};return e.forEach(b.outEdges(y),function(E){_[E.w]=(_[E.w]||0)+b.edge(E).weight}),_});return e.zipObject(b.nodes(),w)}function a(b){var w=e.map(b.nodes(),function(y){var _={};return e.forEach(b.inEdges(y),function(E){_[E.v]=(_[E.v]||0)+b.edge(E).weight}),_});return e.zipObject(b.nodes(),w)}function s(b,w){var y=b.x,_=b.y,E=w.x-y,S=w.y-_,I=b.width/2,N=b.height/2;if(!E&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var T,k;return Math.abs(S)*I>Math.abs(E)*N?(S<0&&(N=-N),T=N*E/S,k=N):(E<0&&(I=-I),T=I,k=I*S/E),{x:y+T,y:_+k}}function c(b){var w=e.map(e.range(p(b)+1),function(){return[]});return e.forEach(b.nodes(),function(y){var _=b.node(y),E=_.rank;e.isUndefined(E)||(w[E][_.order]=y)}),w}function u(b){var w=e.min(e.map(b.nodes(),function(y){return b.node(y).rank}));e.forEach(b.nodes(),function(y){var _=b.node(y);e.has(_,"rank")&&(_.rank-=w)})}function d(b){var w=e.min(e.map(b.nodes(),function(S){return b.node(S).rank})),y=[];e.forEach(b.nodes(),function(S){var I=b.node(S).rank-w;y[I]||(y[I]=[]),y[I].push(S)});var _=0,E=b.graph().nodeRankFactor;e.forEach(y,function(S,I){e.isUndefined(S)&&I%E!==0?--_:_&&e.forEach(S,function(N){b.node(N).rank+=_})})}function h(b,w,y,_){var E={width:0,height:0};return arguments.length>=4&&(E.rank=y,E.order=_),r(b,"border",E,w)}function p(b){return e.max(e.map(b.nodes(),function(w){var y=b.node(w).rank;if(!e.isUndefined(y))return y}))}function v(b,w){var y={lhs:[],rhs:[]};return e.forEach(b,function(_){w(_)?y.lhs.push(_):y.rhs.push(_)}),y}function x(b,w){var y=e.now();try{return w()}finally{console.log(b+" time: "+(e.now()-y)+"ms")}}function g(b,w){return w()}return Db}var jb,HT;function RQ(){if(HT)return jb;HT=1;var e=Ot(),t=Vr();jb={run:r,undo:i};function r(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){n(o,a)})}function n(o,a){var s=a.v,c=o.node(s).rank,u=a.w,d=o.node(u).rank,h=a.name,p=o.edge(a),v=p.labelRank;if(d!==c+1){o.removeEdge(a);var x,g,b;for(b=0,++c;c<d;++b,++c)p.points=[],g={width:0,height:0,edgeLabel:p,edgeObj:a,rank:c},x=t.addDummyNode(o,"edge",g,"_d"),c===v&&(g.width=p.width,g.height=p.height,g.dummy="edge-label",g.labelpos=p.labelpos),o.setEdge(s,x,{weight:p.weight},h),b===0&&o.graph().dummyChains.push(x),s=x;o.setEdge(s,u,{weight:p.weight},h)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var s=o.node(a),c=s.edgeLabel,u;for(o.setEdge(s.edgeObj,c);s.dummy;)u=o.successors(a)[0],o.removeNode(a),c.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(c.x=s.x,c.y=s.y,c.width=s.width,c.height=s.height),a=u,s=o.node(a)})}return jb}var qb,VT;function Hu(){if(VT)return qb;VT=1;var e=Ot();qb={longestPath:t,slack:r};function t(n){var i={};function o(a){var s=n.node(a);if(e.has(i,a))return s.rank;i[a]=!0;var c=e.min(e.map(n.outEdges(a),function(u){return o(u.w)-n.edge(u).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),s.rank=c}e.forEach(n.sources(),o)}function r(n,i){return n.node(i.w).rank-n.node(i.v).rank-n.edge(i).minlen}return qb}var Lb,WT;function N6(){if(WT)return Lb;WT=1;var e=Ot(),t=Fn().Graph,r=Hu().slack;Lb=n;function n(s){var c=new t({directed:!1}),u=s.nodes()[0],d=s.nodeCount();c.setNode(u,{});for(var h,p;i(c,s)<d;)h=o(c,s),p=c.hasNode(h.v)?r(s,h):-r(s,h),a(c,s,p);return c}function i(s,c){function u(d){e.forEach(c.nodeEdges(d),function(h){var p=h.v,v=d===p?h.w:p;!s.hasNode(v)&&!r(c,h)&&(s.setNode(v,{}),s.setEdge(d,v,{}),u(v))})}return e.forEach(s.nodes(),u),s.nodeCount()}function o(s,c){return e.minBy(c.edges(),function(u){if(s.hasNode(u.v)!==s.hasNode(u.w))return r(c,u)})}function a(s,c,u){e.forEach(s.nodes(),function(d){c.node(d).rank+=u})}return Lb}var zb,UT;function NQ(){if(UT)return zb;UT=1;var e=Ot(),t=N6(),r=Hu().slack,n=Hu().longestPath,i=Fn().alg.preorder,o=Fn().alg.postorder,a=Vr().simplify;zb=s,s.initLowLimValues=h,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=x,s.exchangeEdges=g;function s(_){_=a(_),n(_);var E=t(_);h(E),c(E,_);for(var S,I;S=v(E);)I=x(E,_,S),g(E,_,S,I)}function c(_,E){var S=o(_,_.nodes());S=S.slice(0,S.length-1),e.forEach(S,function(I){u(_,E,I)})}function u(_,E,S){var I=_.node(S),N=I.parent;_.edge(S,N).cutvalue=d(_,E,S)}function d(_,E,S){var I=_.node(S),N=I.parent,T=!0,k=E.edge(S,N),z=0;return k||(T=!1,k=E.edge(N,S)),z=k.weight,e.forEach(E.nodeEdges(S),function(L){var K=L.v===S,G=K?L.w:L.v;if(G!==N){var A=K===T,Y=E.edge(L).weight;if(z+=A?Y:-Y,w(_,S,G)){var B=_.edge(S,G).cutvalue;z+=A?-B:B}}}),z}function h(_,E){arguments.length<2&&(E=_.nodes()[0]),p(_,{},1,E)}function p(_,E,S,I,N){var T=S,k=_.node(I);return E[I]=!0,e.forEach(_.neighbors(I),function(z){e.has(E,z)||(S=p(_,E,S,z,I))}),k.low=T,k.lim=S++,N?k.parent=N:delete k.parent,S}function v(_){return e.find(_.edges(),function(E){return _.edge(E).cutvalue<0})}function x(_,E,S){var I=S.v,N=S.w;E.hasEdge(I,N)||(I=S.w,N=S.v);var T=_.node(I),k=_.node(N),z=T,L=!1;T.lim>k.lim&&(z=k,L=!0);var K=e.filter(E.edges(),function(G){return L===y(_,_.node(G.v),z)&&L!==y(_,_.node(G.w),z)});return e.minBy(K,function(G){return r(E,G)})}function g(_,E,S,I){var N=S.v,T=S.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),h(_),c(_,E),b(_,E)}function b(_,E){var S=e.find(_.nodes(),function(N){return!E.node(N).parent}),I=i(_,S);I=I.slice(1),e.forEach(I,function(N){var T=_.node(N).parent,k=E.edge(N,T),z=!1;k||(k=E.edge(T,N),z=!0),E.node(N).rank=E.node(T).rank+(z?k.minlen:-k.minlen)})}function w(_,E,S){return _.hasEdge(E,S)}function y(_,E,S){return S.low<=E.lim&&E.lim<=S.lim}return zb}var Bb,GT;function TQ(){if(GT)return Bb;GT=1;var e=Hu(),t=e.longestPath,r=N6(),n=NQ();Bb=i;function i(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":a(c);break;case"longest-path":o(c);break;default:s(c)}}var o=t;function a(c){t(c),r(c)}function s(c){n(c)}return Bb}var Fb,KT;function PQ(){if(KT)return Fb;KT=1;var e=Ot();Fb=t;function t(i){var o=n(i);e.forEach(i.graph().dummyChains,function(a){for(var s=i.node(a),c=s.edgeObj,u=r(i,o,c.v,c.w),d=u.path,h=u.lca,p=0,v=d[p],x=!0;a!==c.w;){if(s=i.node(a),x){for(;(v=d[p])!==h&&i.node(v).maxRank<s.rank;)p++;v===h&&(x=!1)}if(!x){for(;p<d.length-1&&i.node(v=d[p+1]).minRank<=s.rank;)p++;v=d[p]}i.setParent(a,v),a=i.successors(a)[0]}})}function r(i,o,a,s){var c=[],u=[],d=Math.min(o[a].low,o[s].low),h=Math.max(o[a].lim,o[s].lim),p,v;p=a;do p=i.parent(p),c.push(p);while(p&&(o[p].low>d||h>o[p].lim));for(v=p,p=s;(p=i.parent(p))!==v;)u.push(p);return{path:c.concat(u.reverse()),lca:v}}function n(i){var o={},a=0;function s(c){var u=a;e.forEach(i.children(c),s),o[c]={low:u,lim:a++}}return e.forEach(i.children(),s),o}return Fb}var $b,YT;function kQ(){if(YT)return $b;YT=1;var e=Ot(),t=Vr();$b={run:r,cleanup:a};function r(s){var c=t.addDummyNode(s,"root",{},"_root"),u=i(s),d=e.max(e.values(u))-1,h=2*d+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(v){s.edge(v).minlen*=h});var p=o(s)+1;e.forEach(s.children(),function(v){n(s,c,h,p,d,u,v)}),s.graph().nodeRankFactor=h}function n(s,c,u,d,h,p,v){var x=s.children(v);if(!x.length){v!==c&&s.setEdge(c,v,{weight:0,minlen:u});return}var g=t.addBorderNode(s,"_bt"),b=t.addBorderNode(s,"_bb"),w=s.node(v);s.setParent(g,v),w.borderTop=g,s.setParent(b,v),w.borderBottom=b,e.forEach(x,function(y){n(s,c,u,d,h,p,y);var _=s.node(y),E=_.borderTop?_.borderTop:y,S=_.borderBottom?_.borderBottom:y,I=_.borderTop?d:2*d,N=E!==S?1:h-p[v]+1;s.setEdge(g,E,{weight:I,minlen:N,nestingEdge:!0}),s.setEdge(S,b,{weight:I,minlen:N,nestingEdge:!0})}),s.parent(v)||s.setEdge(c,g,{weight:0,minlen:h+p[v]})}function i(s){var c={};function u(d,h){var p=s.children(d);p&&p.length&&e.forEach(p,function(v){u(v,h+1)}),c[d]=h}return e.forEach(s.children(),function(d){u(d,1)}),c}function o(s){return e.reduce(s.edges(),function(c,u){return c+s.edge(u).weight},0)}function a(s){var c=s.graph();s.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(s.edges(),function(u){var d=s.edge(u);d.nestingEdge&&s.removeEdge(u)})}return $b}var Hb,XT;function MQ(){if(XT)return Hb;XT=1;var e=Ot(),t=Vr();Hb=r;function r(i){function o(a){var s=i.children(a),c=i.node(a);if(s.length&&e.forEach(s,o),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var u=c.minRank,d=c.maxRank+1;u<d;++u)n(i,"borderLeft","_bl",a,c,u),n(i,"borderRight","_br",a,c,u)}}e.forEach(i.children(),o)}function n(i,o,a,s,c,u){var d={width:0,height:0,rank:u,borderType:o},h=c[o][u-1],p=t.addDummyNode(i,"border",d,a);c[o][u]=p,i.setParent(p,s),h&&i.setEdge(h,p,{weight:1})}return Hb}var Vb,ZT;function AQ(){if(ZT)return Vb;ZT=1;var e=Ot();Vb={adjust:t,undo:r};function t(u){var d=u.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&n(u)}function r(u){var d=u.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&o(u),(d==="lr"||d==="rl")&&(s(u),n(u))}function n(u){e.forEach(u.nodes(),function(d){i(u.node(d))}),e.forEach(u.edges(),function(d){i(u.edge(d))})}function i(u){var d=u.width;u.width=u.height,u.height=d}function o(u){e.forEach(u.nodes(),function(d){a(u.node(d))}),e.forEach(u.edges(),function(d){var h=u.edge(d);e.forEach(h.points,a),e.has(h,"y")&&a(h)})}function a(u){u.y=-u.y}function s(u){e.forEach(u.nodes(),function(d){c(u.node(d))}),e.forEach(u.edges(),function(d){var h=u.edge(d);e.forEach(h.points,c),e.has(h,"x")&&c(h)})}function c(u){var d=u.x;u.x=u.y,u.y=d}return Vb}var Wb,JT;function DQ(){if(JT)return Wb;JT=1;var e=Ot();Wb=t;function t(r){var n={},i=e.filter(r.nodes(),function(u){return!r.children(u).length}),o=e.max(e.map(i,function(u){return r.node(u).rank})),a=e.map(e.range(o+1),function(){return[]});function s(u){if(!e.has(n,u)){n[u]=!0;var d=r.node(u);a[d.rank].push(u),e.forEach(r.successors(u),s)}}var c=e.sortBy(i,function(u){return r.node(u).rank});return e.forEach(c,s),a}return Wb}var Ub,QT;function jQ(){if(QT)return Ub;QT=1;var e=Ot();Ub=t;function t(n,i){for(var o=0,a=1;a<i.length;++a)o+=r(n,i[a-1],i[a]);return o}function r(n,i,o){for(var a=e.zipObject(o,e.map(o,function(p,v){return v})),s=e.flatten(e.map(i,function(p){return e.sortBy(e.map(n.outEdges(p),function(v){return{pos:a[v.w],weight:n.edge(v).weight}}),"pos")}),!0),c=1;c<o.length;)c<<=1;var u=2*c-1;c-=1;var d=e.map(new Array(u),function(){return 0}),h=0;return e.forEach(s.forEach(function(p){var v=p.pos+c;d[v]+=p.weight;for(var x=0;v>0;)v%2&&(x+=d[v+1]),v=v-1>>1,d[v]+=p.weight;h+=p.weight*x})),h}return Ub}var Gb,e5;function qQ(){if(e5)return Gb;e5=1;var e=Ot();Gb=t;function t(r,n){return e.map(n,function(i){var o=r.inEdges(i);if(o.length){var a=e.reduce(o,function(s,c){var u=r.edge(c),d=r.node(c.v);return{sum:s.sum+u.weight*d.order,weight:s.weight+u.weight}},{sum:0,weight:0});return{v:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return Gb}var Kb,t5;function LQ(){if(t5)return Kb;t5=1;var e=Ot();Kb=t;function t(i,o){var a={};e.forEach(i,function(c,u){var d=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:u};e.isUndefined(c.barycenter)||(d.barycenter=c.barycenter,d.weight=c.weight)}),e.forEach(o.edges(),function(c){var u=a[c.v],d=a[c.w];!e.isUndefined(u)&&!e.isUndefined(d)&&(d.indegree++,u.out.push(a[c.w]))});var s=e.filter(a,function(c){return!c.indegree});return r(s)}function r(i){var o=[];function a(u){return function(d){d.merged||(e.isUndefined(d.barycenter)||e.isUndefined(u.barycenter)||d.barycenter>=u.barycenter)&&n(u,d)}}function s(u){return function(d){d.in.push(u),--d.indegree===0&&i.push(d)}}for(;i.length;){var c=i.pop();o.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,s(c))}return e.map(e.filter(o,function(u){return!u.merged}),function(u){return e.pick(u,["vs","i","barycenter","weight"])})}function n(i,o){var a=0,s=0;i.weight&&(a+=i.barycenter*i.weight,s+=i.weight),o.weight&&(a+=o.barycenter*o.weight,s+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/s,i.weight=s,i.i=Math.min(o.i,i.i),o.merged=!0}return Kb}var Yb,r5;function zQ(){if(r5)return Yb;r5=1;var e=Ot(),t=Vr();Yb=r;function r(o,a){var s=t.partition(o,function(g){return e.has(g,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(g){return-g.i}),d=[],h=0,p=0,v=0;c.sort(i(!!a)),v=n(d,u,v),e.forEach(c,function(g){v+=g.vs.length,d.push(g.vs),h+=g.barycenter*g.weight,p+=g.weight,v=n(d,u,v)});var x={vs:e.flatten(d,!0)};return p&&(x.barycenter=h/p,x.weight=p),x}function n(o,a,s){for(var c;a.length&&(c=e.last(a)).i<=s;)a.pop(),o.push(c.vs),s++;return s}function i(o){return function(a,s){return a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:o?s.i-a.i:a.i-s.i}}return Yb}var Xb,n5;function BQ(){if(n5)return Xb;n5=1;var e=Ot(),t=qQ(),r=LQ(),n=zQ();Xb=i;function i(s,c,u,d){var h=s.children(c),p=s.node(c),v=p?p.borderLeft:void 0,x=p?p.borderRight:void 0,g={};v&&(h=e.filter(h,function(S){return S!==v&&S!==x}));var b=t(s,h);e.forEach(b,function(S){if(s.children(S.v).length){var I=i(s,S.v,u,d);g[S.v]=I,e.has(I,"barycenter")&&a(S,I)}});var w=r(b,u);o(w,g);var y=n(w,d);if(v&&(y.vs=e.flatten([v,y.vs,x],!0),s.predecessors(v).length)){var _=s.node(s.predecessors(v)[0]),E=s.node(s.predecessors(x)[0]);e.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+_.order+E.order)/(y.weight+2),y.weight+=2}return y}function o(s,c){e.forEach(s,function(u){u.vs=e.flatten(u.vs.map(function(d){return c[d]?c[d].vs:d}),!0)})}function a(s,c){e.isUndefined(s.barycenter)?(s.barycenter=c.barycenter,s.weight=c.weight):(s.barycenter=(s.barycenter*s.weight+c.barycenter*c.weight)/(s.weight+c.weight),s.weight+=c.weight)}return Xb}var Zb,i5;function FQ(){if(i5)return Zb;i5=1;var e=Ot(),t=Fn().Graph;Zb=r;function r(i,o,a){var s=n(i),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(u){return i.node(u)});return e.forEach(i.nodes(),function(u){var d=i.node(u),h=i.parent(u);(d.rank===o||d.minRank<=o&&o<=d.maxRank)&&(c.setNode(u),c.setParent(u,h||s),e.forEach(i[a](u),function(p){var v=p.v===u?p.w:p.v,x=c.edge(v,u),g=e.isUndefined(x)?0:x.weight;c.setEdge(v,u,{weight:i.edge(p).weight+g})}),e.has(d,"minRank")&&c.setNode(u,{borderLeft:d.borderLeft[o],borderRight:d.borderRight[o]}))}),c}function n(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return Zb}var Jb,o5;function $Q(){if(o5)return Jb;o5=1;var e=Ot();Jb=t;function t(r,n,i){var o={},a;e.forEach(i,function(s){for(var c=r.parent(s),u,d;c;){if(u=r.parent(c),u?(d=o[u],o[u]=c):(d=a,a=c),d&&d!==c){n.setEdge(d,c);return}c=u}})}return Jb}var Qb,a5;function HQ(){if(a5)return Qb;a5=1;var e=Ot(),t=DQ(),r=jQ(),n=BQ(),i=FQ(),o=$Q(),a=Fn().Graph,s=Vr();Qb=c;function c(p){var v=s.maxRank(p),x=u(p,e.range(1,v+1),"inEdges"),g=u(p,e.range(v-1,-1,-1),"outEdges"),b=t(p);h(p,b);for(var w=Number.POSITIVE_INFINITY,y,_=0,E=0;E<4;++_,++E){d(_%2?x:g,_%4>=2),b=s.buildLayerMatrix(p);var S=r(p,b);S<w&&(E=0,y=e.cloneDeep(b),w=S)}h(p,y)}function u(p,v,x){return e.map(v,function(g){return i(p,g,x)})}function d(p,v){var x=new a;e.forEach(p,function(g){var b=g.graph().root,w=n(g,b,x,v);e.forEach(w.vs,function(y,_){g.node(y).order=_}),o(g,x,w.vs)})}function h(p,v){e.forEach(v,function(x){e.forEach(x,function(g,b){p.node(g).order=b})})}return Qb}var e0,s5;function VQ(){if(s5)return e0;s5=1;var e=Ot(),t=Fn().Graph,r=Vr();e0={positionX:x,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(w,y){var _={};function E(S,I){var N=0,T=0,k=S.length,z=e.last(I);return e.forEach(I,function(L,K){var G=o(w,L),A=G?w.node(G).order:k;(G||L===z)&&(e.forEach(I.slice(T,K+1),function(Y){e.forEach(w.predecessors(Y),function(B){var X=w.node(B),U=X.order;(U<N||A<U)&&!(X.dummy&&w.node(Y).dummy)&&a(_,B,Y)})}),T=K+1,N=A)}),I}return e.reduce(y,E),_}function i(w,y){var _={};function E(I,N,T,k,z){var L;e.forEach(e.range(N,T),function(K){L=I[K],w.node(L).dummy&&e.forEach(w.predecessors(L),function(G){var A=w.node(G);A.dummy&&(A.order<k||A.order>z)&&a(_,G,L)})})}function S(I,N){var T=-1,k,z=0;return e.forEach(N,function(L,K){if(w.node(L).dummy==="border"){var G=w.predecessors(L);G.length&&(k=w.node(G[0]).order,E(N,z,K,T,k),z=K,T=k)}E(N,z,N.length,k,I.length)}),N}return e.reduce(y,S),_}function o(w,y){if(w.node(y).dummy)return e.find(w.predecessors(y),function(_){return w.node(_).dummy})}function a(w,y,_){if(y>_){var E=y;y=_,_=E}var S=w[y];S||(w[y]=S={}),S[_]=!0}function s(w,y,_){if(y>_){var E=y;y=_,_=E}return e.has(w[y],_)}function c(w,y,_,E){var S={},I={},N={};return e.forEach(y,function(T){e.forEach(T,function(k,z){S[k]=k,I[k]=k,N[k]=z})}),e.forEach(y,function(T){var k=-1;e.forEach(T,function(z){var L=E(z);if(L.length){L=e.sortBy(L,function(B){return N[B]});for(var K=(L.length-1)/2,G=Math.floor(K),A=Math.ceil(K);G<=A;++G){var Y=L[G];I[z]===z&&k<N[Y]&&!s(_,z,Y)&&(I[Y]=z,I[z]=S[z]=S[Y],k=N[Y])}}})}),{root:S,align:I}}function u(w,y,_,E,S){var I={},N=d(w,y,_,S),T=S?"borderLeft":"borderRight";function k(K,G){for(var A=N.nodes(),Y=A.pop(),B={};Y;)B[Y]?K(Y):(B[Y]=!0,A.push(Y),A=A.concat(G(Y))),Y=A.pop()}function z(K){I[K]=N.inEdges(K).reduce(function(G,A){return Math.max(G,I[A.v]+N.edge(A))},0)}function L(K){var G=N.outEdges(K).reduce(function(Y,B){return Math.min(Y,I[B.w]-N.edge(B))},Number.POSITIVE_INFINITY),A=w.node(K);G!==Number.POSITIVE_INFINITY&&A.borderType!==T&&(I[K]=Math.max(I[K],G))}return k(z,N.predecessors.bind(N)),k(L,N.successors.bind(N)),e.forEach(E,function(K){I[K]=I[_[K]]}),I}function d(w,y,_,E){var S=new t,I=w.graph(),N=g(I.nodesep,I.edgesep,E);return e.forEach(y,function(T){var k;e.forEach(T,function(z){var L=_[z];if(S.setNode(L),k){var K=_[k],G=S.edge(K,L);S.setEdge(K,L,Math.max(N(w,z,k),G||0))}k=z})}),S}function h(w,y){return e.minBy(e.values(y),function(_){var E=Number.NEGATIVE_INFINITY,S=Number.POSITIVE_INFINITY;return e.forIn(_,function(I,N){var T=b(w,N)/2;E=Math.max(I+T,E),S=Math.min(I-T,S)}),E-S})}function p(w,y){var _=e.values(y),E=e.min(_),S=e.max(_);e.forEach(["u","d"],function(I){e.forEach(["l","r"],function(N){var T=I+N,k=w[T],z;if(k!==y){var L=e.values(k);z=N==="l"?E-e.min(L):S-e.max(L),z&&(w[T]=e.mapValues(k,function(K){return K+z}))}})})}function v(w,y){return e.mapValues(w.ul,function(_,E){if(y)return w[y.toLowerCase()][E];var S=e.sortBy(e.map(w,E));return(S[1]+S[2])/2})}function x(w){var y=r.buildLayerMatrix(w),_=e.merge(n(w,y),i(w,y)),E={},S;e.forEach(["u","d"],function(N){S=N==="u"?y:e.values(y).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(S=e.map(S,function(K){return e.values(K).reverse()}));var k=(N==="u"?w.predecessors:w.successors).bind(w),z=c(w,S,_,k),L=u(w,S,z.root,z.align,T==="r");T==="r"&&(L=e.mapValues(L,function(K){return-K})),E[N+T]=L})});var I=h(w,E);return p(E,I),v(E,w.graph().align)}function g(w,y,_){return function(E,S,I){var N=E.node(S),T=E.node(I),k=0,z;if(k+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":z=-N.width/2;break;case"r":z=N.width/2;break}if(z&&(k+=_?z:-z),z=0,k+=(N.dummy?y:w)/2,k+=(T.dummy?y:w)/2,k+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":z=T.width/2;break;case"r":z=-T.width/2;break}return z&&(k+=_?z:-z),z=0,k}}function b(w,y){return w.node(y).width}return e0}var t0,l5;function WQ(){if(l5)return t0;l5=1;var e=Ot(),t=Vr(),r=VQ().positionX;t0=n;function n(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(r(o),function(a,s){o.node(s).x=a})}function i(o){var a=t.buildLayerMatrix(o),s=o.graph().ranksep,c=0;e.forEach(a,function(u){var d=e.max(e.map(u,function(h){return o.node(h).height}));e.forEach(u,function(h){o.node(h).y=c+d/2}),c+=d+s})}return t0}var r0,c5;function UQ(){if(c5)return r0;c5=1;var e=Ot(),t=IQ(),r=RQ(),n=TQ(),i=Vr().normalizeRanks,o=PQ(),a=Vr().removeEmptyRanks,s=kQ(),c=MQ(),u=AQ(),d=HQ(),h=WQ(),p=Vr(),v=Fn().Graph;r0=x;function x(M,H){var q=H&&H.debugTiming?p.time:p.notime;q("layout",function(){var D=q(" buildLayoutGraph",function(){return k(M)});q(" runLayout",function(){g(D,q)}),q(" updateInputGraph",function(){b(M,D)})})}function g(M,H){H(" makeSpaceForEdgeLabels",function(){z(M)}),H(" removeSelfEdges",function(){re(M)}),H(" acyclic",function(){t.run(M)}),H(" nestingGraph.run",function(){s.run(M)}),H(" rank",function(){n(p.asNonCompoundGraph(M))}),H(" injectEdgeLabelProxies",function(){L(M)}),H(" removeEmptyRanks",function(){a(M)}),H(" nestingGraph.cleanup",function(){s.cleanup(M)}),H(" normalizeRanks",function(){i(M)}),H(" assignRankMinMax",function(){K(M)}),H(" removeEdgeLabelProxies",function(){G(M)}),H(" normalize.run",function(){r.run(M)}),H(" parentDummyChains",function(){o(M)}),H(" addBorderSegments",function(){c(M)}),H(" order",function(){d(M)}),H(" insertSelfEdges",function(){j(M)}),H(" adjustCoordinateSystem",function(){u.adjust(M)}),H(" position",function(){h(M)}),H(" positionSelfEdges",function(){W(M)}),H(" removeBorderNodes",function(){U(M)}),H(" normalize.undo",function(){r.undo(M)}),H(" fixupEdgeLabelCoords",function(){B(M)}),H(" undoCoordinateSystem",function(){u.undo(M)}),H(" translateGraph",function(){A(M)}),H(" assignNodeIntersects",function(){Y(M)}),H(" reversePoints",function(){X(M)}),H(" acyclic.undo",function(){t.undo(M)})}function b(M,H){e.forEach(M.nodes(),function(q){var D=M.node(q),V=H.node(q);D&&(D.x=V.x,D.y=V.y,H.children(q).length&&(D.width=V.width,D.height=V.height))}),e.forEach(M.edges(),function(q){var D=M.edge(q),V=H.edge(q);D.points=V.points,e.has(V,"x")&&(D.x=V.x,D.y=V.y)}),M.graph().width=H.graph().width,M.graph().height=H.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],E=["width","height"],S={width:0,height:0},I=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function k(M){var H=new v({multigraph:!0,compound:!0}),q=J(M.graph());return H.setGraph(e.merge({},y,Z(q,w),e.pick(q,_))),e.forEach(M.nodes(),function(D){var V=J(M.node(D));H.setNode(D,e.defaults(Z(V,E),S)),H.setParent(D,M.parent(D))}),e.forEach(M.edges(),function(D){var V=J(M.edge(D));H.setEdge(D,e.merge({},N,Z(V,I),e.pick(V,T)))}),H}function z(M){var H=M.graph();H.ranksep/=2,e.forEach(M.edges(),function(q){var D=M.edge(q);D.minlen*=2,D.labelpos.toLowerCase()!=="c"&&(H.rankdir==="TB"||H.rankdir==="BT"?D.width+=D.labeloffset:D.height+=D.labeloffset)})}function L(M){e.forEach(M.edges(),function(H){var q=M.edge(H);if(q.width&&q.height){var D=M.node(H.v),V=M.node(H.w),Q={rank:(V.rank-D.rank)/2+D.rank,e:H};p.addDummyNode(M,"edge-proxy",Q,"_ep")}})}function K(M){var H=0;e.forEach(M.nodes(),function(q){var D=M.node(q);D.borderTop&&(D.minRank=M.node(D.borderTop).rank,D.maxRank=M.node(D.borderBottom).rank,H=e.max(H,D.maxRank))}),M.graph().maxRank=H}function G(M){e.forEach(M.nodes(),function(H){var q=M.node(H);q.dummy==="edge-proxy"&&(M.edge(q.e).labelRank=q.rank,M.removeNode(H))})}function A(M){var H=Number.POSITIVE_INFINITY,q=0,D=Number.POSITIVE_INFINITY,V=0,Q=M.graph(),ne=Q.marginx||0,ce=Q.marginy||0;function ee(pe){var ue=pe.x,xe=pe.y,le=pe.width,ie=pe.height;H=Math.min(H,ue-le/2),q=Math.max(q,ue+le/2),D=Math.min(D,xe-ie/2),V=Math.max(V,xe+ie/2)}e.forEach(M.nodes(),function(pe){ee(M.node(pe))}),e.forEach(M.edges(),function(pe){var ue=M.edge(pe);e.has(ue,"x")&&ee(ue)}),H-=ne,D-=ce,e.forEach(M.nodes(),function(pe){var ue=M.node(pe);ue.x-=H,ue.y-=D}),e.forEach(M.edges(),function(pe){var ue=M.edge(pe);e.forEach(ue.points,function(xe){xe.x-=H,xe.y-=D}),e.has(ue,"x")&&(ue.x-=H),e.has(ue,"y")&&(ue.y-=D)}),Q.width=q-H+ne,Q.height=V-D+ce}function Y(M){e.forEach(M.edges(),function(H){var q=M.edge(H),D=M.node(H.v),V=M.node(H.w),Q,ne;q.points?(Q=q.points[0],ne=q.points[q.points.length-1]):(q.points=[],Q=V,ne=D),q.points.unshift(p.intersectRect(D,Q)),q.points.push(p.intersectRect(V,ne))})}function B(M){e.forEach(M.edges(),function(H){var q=M.edge(H);if(e.has(q,"x"))switch((q.labelpos==="l"||q.labelpos==="r")&&(q.width-=q.labeloffset),q.labelpos){case"l":q.x-=q.width/2+q.labeloffset;break;case"r":q.x+=q.width/2+q.labeloffset;break}})}function X(M){e.forEach(M.edges(),function(H){var q=M.edge(H);q.reversed&&q.points.reverse()})}function U(M){e.forEach(M.nodes(),function(H){if(M.children(H).length){var q=M.node(H),D=M.node(q.borderTop),V=M.node(q.borderBottom),Q=M.node(e.last(q.borderLeft)),ne=M.node(e.last(q.borderRight));q.width=Math.abs(ne.x-Q.x),q.height=Math.abs(V.y-D.y),q.x=Q.x+q.width/2,q.y=D.y+q.height/2}}),e.forEach(M.nodes(),function(H){M.node(H).dummy==="border"&&M.removeNode(H)})}function re(M){e.forEach(M.edges(),function(H){if(H.v===H.w){var q=M.node(H.v);q.selfEdges||(q.selfEdges=[]),q.selfEdges.push({e:H,label:M.edge(H)}),M.removeEdge(H)}})}function j(M){var H=p.buildLayerMatrix(M);e.forEach(H,function(q){var D=0;e.forEach(q,function(V,Q){var ne=M.node(V);ne.order=Q+D,e.forEach(ne.selfEdges,function(ce){p.addDummyNode(M,"selfedge",{width:ce.label.width,height:ce.label.height,rank:ne.rank,order:Q+ ++D,e:ce.e,label:ce.label},"_se")}),delete ne.selfEdges})})}function W(M){e.forEach(M.nodes(),function(H){var q=M.node(H);if(q.dummy==="selfedge"){var D=M.node(q.e.v),V=D.x+D.width/2,Q=D.y,ne=q.x-V,ce=D.height/2;M.setEdge(q.e,q.label),M.removeNode(H),q.label.points=[{x:V+2*ne/3,y:Q-ce},{x:V+5*ne/6,y:Q-ce},{x:V+ne,y:Q},{x:V+5*ne/6,y:Q+ce},{x:V+2*ne/3,y:Q+ce}],q.label.x=q.x,q.label.y=q.y}})}function Z(M,H){return e.mapValues(e.pick(M,H),Number)}function J(M){var H={};return e.forEach(M,function(q,D){H[D.toLowerCase()]=q}),H}return r0}var n0,u5;function GQ(){if(u5)return n0;u5=1;var e=Ot(),t=Vr(),r=Fn().Graph;n0={debugOrdering:n};function n(i){var o=t.buildLayerMatrix(i),a=new r({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(s){a.setNode(s,{label:s}),a.setParent(s,"layer"+i.node(s).rank)}),e.forEach(i.edges(),function(s){a.setEdge(s.v,s.w,{},s.name)}),e.forEach(o,function(s,c){var u="layer"+c;a.setNode(u,{rank:"same"}),e.reduce(s,function(d,h){return a.setEdge(d,h,{style:"invis"}),h})}),a}return n0}var i0,d5;function KQ(){return d5||(d5=1,i0="0.8.5"),i0}var o0,f5;function YQ(){return f5||(f5=1,o0={graphlib:Fn(),layout:UQ(),debug:GQ(),util:{time:Vr().time,notime:Vr().notime},version:KQ()}),o0}var XQ=YQ();const h5=Qi(XQ);function ZQ(e){let t;const r=new Set,n=(u,d)=>{const h=typeof u=="function"?u(t):u;if(h!==t){const p=t;t=d?h:Object.assign({},t,h),r.forEach(v=>v(t,p))}},i=()=>t,o=(u,d=i,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=d(t);function v(){const x=d(t);if(!h(p,x)){const g=p;u(p=x,g)}}return r.add(v),()=>r.delete(v)},c={setState:n,getState:i,subscribe:(u,d,h)=>d||h?o(u,d,h):(r.add(u),()=>r.delete(u)),destroy:()=>r.clear()};return t=e(n,i,c),c}const JQ=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),p5=JQ?C.useEffect:C.useLayoutEffect;function QQ(e){const t=typeof e=="function"?ZQ(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=C.useReducer(b=>b+1,0),a=t.getState(),s=C.useRef(a),c=C.useRef(n),u=C.useRef(i),d=C.useRef(!1),h=C.useRef();h.current===void 0&&(h.current=n(a));let p,v=!1;(s.current!==a||c.current!==n||u.current!==i||d.current)&&(p=n(a),v=!i(h.current,p)),p5(()=>{v&&(h.current=p),s.current=a,c.current=n,u.current=i,d.current=!1});const x=C.useRef(a);p5(()=>{const b=()=>{try{const y=t.getState(),_=c.current(y);u.current(h.current,_)||(s.current=y,h.current=_,o())}catch{d.current=!0,o()}},w=t.subscribe(b);return t.getState()!==x.current&&b(),w},[]);const g=v?p:h.current;return C.useDebugValue(g),g};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const i=n.length<=0;return{value:n.shift(),done:i}}}},r}function eee(){const e=C.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const s=C.useRef();return s.current||(i&&(console.warn("Provider initialStore is deprecated and will be removed in the next version."),o||(o=()=>i)),s.current=o()),C.createElement(e.Provider,{value:s.current},a)},useStore:(i,o=Object.is)=>{const a=C.useContext(e);if(!a)throw new Error("Seems like you have not used zustand provider as an ancestor.");return a(i,o)},useStoreApi:()=>{const i=C.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return C.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var tee={value:()=>{}};function Dd(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new mu(r)}function mu(e){this._=e}function ree(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}mu.prototype=Dd.prototype={constructor:mu,on:function(e,t){var r=this._,n=ree(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=nee(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=v5(r[i],e.name,t);else if(t==null)for(i in r)r[i]=v5(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new mu(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};function nee(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function v5(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=tee,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Rw="http://www.w3.org/1999/xhtml";const g5={svg:"http://www.w3.org/2000/svg",xhtml:Rw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),g5.hasOwnProperty(t)?{space:g5[t],local:e}:e}function iee(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Rw&&t.documentElement.namespaceURI===Rw?t.createElement(e):t.createElementNS(r,e)}}function oee(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function T6(e){var t=jd(e);return(t.local?oee:iee)(t)}function aee(){}function N_(e){return e==null?aee:function(){return this.querySelector(e)}}function see(e){typeof e!="function"&&(e=N_(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),c,u,d=0;d<a;++d)(c=o[d])&&(u=e.call(c,c.__data__,d,o))&&("__data__"in c&&(u.__data__=c.__data__),s[d]=u);return new on(n,this._parents)}function lee(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function cee(){return[]}function P6(e){return e==null?cee:function(){return this.querySelectorAll(e)}}function uee(e){return function(){return lee(e.apply(this,arguments))}}function dee(e){typeof e=="function"?e=uee(e):e=P6(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&(n.push(e.call(c,c.__data__,u,a)),i.push(c));return new on(n,i)}function k6(e){return function(){return this.matches(e)}}function M6(e){return function(t){return t.matches(e)}}var fee=Array.prototype.find;function hee(e){return function(){return fee.call(this.children,e)}}function pee(){return this.firstElementChild}function vee(e){return this.select(e==null?pee:hee(typeof e=="function"?e:M6(e)))}var gee=Array.prototype.filter;function mee(){return Array.from(this.children)}function bee(e){return function(){return gee.call(this.children,e)}}function yee(e){return this.selectAll(e==null?mee:bee(typeof e=="function"?e:M6(e)))}function xee(e){typeof e!="function"&&(e=k6(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],c,u=0;u<a;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&s.push(c);return new on(n,this._parents)}function A6(e){return new Array(e.length)}function wee(){return new on(this._enter||this._groups.map(A6),this._parents)}function Vu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Vu.prototype={constructor:Vu,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function _ee(e){return function(){return e}}function See(e,t,r,n,i,o){for(var a=0,s,c=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new Vu(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function Eee(e,t,r,n,i,o,a){var s,c,u=new Map,d=t.length,h=o.length,p=new Array(d),v;for(s=0;s<d;++s)(c=t[s])&&(p[s]=v=a.call(c,c.__data__,s,t)+"",u.has(v)?i[s]=c:u.set(v,c));for(s=0;s<h;++s)v=a.call(e,o[s],s,o)+"",(c=u.get(v))?(n[s]=c,c.__data__=o[s],u.delete(v)):r[s]=new Vu(e,o[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(p[s])===c&&(i[s]=c)}function Oee(e){return e.__data__}function Cee(e,t){if(!arguments.length)return Array.from(this,Oee);var r=t?Eee:See,n=this._parents,i=this._groups;typeof e!="function"&&(e=_ee(e));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),u=0;u<o;++u){var d=n[u],h=i[u],p=h.length,v=Iee(e.call(d,d&&d.__data__,u,n)),x=v.length,g=s[u]=new Array(x),b=a[u]=new Array(x),w=c[u]=new Array(p);r(d,h,g,b,w,v,t);for(var y=0,_=0,E,S;y<x;++y)if(E=g[y]){for(y>=_&&(_=y+1);!(S=b[_])&&++_<x;);E._next=S||null}}return a=new on(a,n),a._enter=s,a._exit=c,a}function Iee(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ree(){return new on(this._exit||this._groups.map(A6),this._parents)}function Nee(e,t,r){var n=this.enter(),i=this,o=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function Tee(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var u=r[c],d=n[c],h=u.length,p=s[c]=new Array(h),v,x=0;x<h;++x)(v=u[x]||d[x])&&(p[x]=v);for(;c<i;++c)s[c]=r[c];return new on(s,this._parents)}function Pee(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function kee(e){e||(e=Mee);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,c=i[o]=new Array(s),u,d=0;d<s;++d)(u=a[d])&&(c[d]=u);c.sort(t)}return new on(i,this._parents).order()}function Mee(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Aee(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Dee(){return Array.from(this)}function jee(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function qee(){let e=0;for(const t of this)++e;return e}function Lee(){return!this.node()}function zee(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function Bee(e){return function(){this.removeAttribute(e)}}function Fee(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $ee(e,t){return function(){this.setAttribute(e,t)}}function Hee(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Vee(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Wee(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Uee(e,t){var r=jd(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?Fee:Bee:typeof t=="function"?r.local?Wee:Vee:r.local?Hee:$ee)(r,t))}function D6(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Gee(e){return function(){this.style.removeProperty(e)}}function Kee(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Yee(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function Xee(e,t,r){return arguments.length>1?this.each((t==null?Gee:typeof t=="function"?Yee:Kee)(e,t,r??"")):Ia(this.node(),e)}function Ia(e,t){return e.style.getPropertyValue(t)||D6(e).getComputedStyle(e,null).getPropertyValue(t)}function Zee(e){return function(){delete this[e]}}function Jee(e,t){return function(){this[e]=t}}function Qee(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ete(e,t){return arguments.length>1?this.each((t==null?Zee:typeof t=="function"?Qee:Jee)(e,t)):this.node()[e]}function j6(e){return e.trim().split(/^|\s+/)}function T_(e){return e.classList||new q6(e)}function q6(e){this._node=e,this._names=j6(e.getAttribute("class")||"")}q6.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function L6(e,t){for(var r=T_(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function z6(e,t){for(var r=T_(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function tte(e){return function(){L6(this,e)}}function rte(e){return function(){z6(this,e)}}function nte(e,t){return function(){(t.apply(this,arguments)?L6:z6)(this,e)}}function ite(e,t){var r=j6(e+"");if(arguments.length<2){for(var n=T_(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?nte:t?tte:rte)(r,t))}function ote(){this.textContent=""}function ate(e){return function(){this.textContent=e}}function ste(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function lte(e){return arguments.length?this.each(e==null?ote:(typeof e=="function"?ste:ate)(e)):this.node().textContent}function cte(){this.innerHTML=""}function ute(e){return function(){this.innerHTML=e}}function dte(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function fte(e){return arguments.length?this.each(e==null?cte:(typeof e=="function"?dte:ute)(e)):this.node().innerHTML}function hte(){this.nextSibling&&this.parentNode.appendChild(this)}function pte(){return this.each(hte)}function vte(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gte(){return this.each(vte)}function mte(e){var t=typeof e=="function"?e:T6(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function bte(){return null}function yte(e,t){var r=typeof e=="function"?e:T6(e),n=t==null?bte:typeof t=="function"?t:N_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function xte(){var e=this.parentNode;e&&e.removeChild(this)}function wte(){return this.each(xte)}function _te(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ste(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ete(e){return this.select(e?Ste:_te)}function Ote(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Cte(e){return function(t){e.call(this,t,this.__data__)}}function Ite(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function Rte(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++n]=o;++n?t.length=n:delete this.__on}}}function Nte(e,t,r){return function(){var n=this.__on,i,o=Cte(t);if(n){for(var a=0,s=n.length;a<s;++a)if((i=n[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),i.value=t;return}}this.addEventListener(e.type,o,r),i={type:e.type,name:e.name,value:t,listener:o,options:r},n?n.push(i):this.__on=[i]}}function Tte(e,t,r){var n=Ite(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,u=s.length,d;c<u;++c)for(i=0,d=s[c];i<o;++i)if((a=n[i]).type===d.type&&a.name===d.name)return d.value}return}for(s=t?Nte:Rte,i=0;i<o;++i)this.each(s(n[i],t,r));return this}function B6(e,t,r){var n=D6(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Pte(e,t){return function(){return B6(this,e,t)}}function kte(e,t){return function(){return B6(this,e,t.apply(this,arguments))}}function Mte(e,t){return this.each((typeof t=="function"?kte:Pte)(e,t))}function*Ate(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length,a;i<o;++i)(a=n[i])&&(yield a)}var F6=[null];function on(e,t){this._groups=e,this._parents=t}function Il(){return new on([[document.documentElement]],F6)}function Dte(){return this}on.prototype=Il.prototype={constructor:on,select:see,selectAll:dee,selectChild:vee,selectChildren:yee,filter:xee,data:Cee,enter:wee,exit:Ree,join:Nee,merge:Tee,selection:Dte,order:Pee,sort:kee,call:Aee,nodes:Dee,node:jee,size:qee,empty:Lee,each:zee,attr:Uee,style:Xee,property:ete,classed:ite,text:lte,html:fte,raise:pte,lower:gte,append:mte,insert:yte,remove:wte,clone:Ete,datum:Ote,on:Tte,dispatch:Mte,[Symbol.iterator]:Ate};function Dn(e){return typeof e=="string"?new on([[document.querySelector(e)]],[document.documentElement]):new on([[e]],F6)}function jte(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Qn(e,t){if(e=jte(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const qte={passive:!1},al={capture:!0,passive:!1};function a0(e){e.stopImmediatePropagation()}function va(e){e.preventDefault(),e.stopImmediatePropagation()}function $6(e){var t=e.document.documentElement,r=Dn(e).on("dragstart.drag",va,al);"onselectstart"in t?r.on("selectstart.drag",va,al):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function H6(e,t){var r=e.document.documentElement,n=Dn(e).on("dragstart.drag",null);t&&(n.on("click.drag",va,al),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Fc=e=>()=>e;function Nw(e,{sourceEvent:t,subject:r,target:n,identifier:i,active:o,x:a,y:s,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Nw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Lte(e){return!e.ctrlKey&&!e.button}function zte(){return this.parentNode}function Bte(e,t){return t??{x:e.x,y:e.y}}function Fte(){return navigator.maxTouchPoints||"ontouchstart"in this}function $te(){var e=Lte,t=zte,r=Bte,n=Fte,i={},o=Dd("start","drag","end"),a=0,s,c,u,d,h=0;function p(E){E.on("mousedown.drag",v).filter(n).on("touchstart.drag",b).on("touchmove.drag",w,qte).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(E,S){if(!(d||!e.call(this,E,S))){var I=_(this,t.call(this,E,S),E,S,"mouse");I&&(Dn(E.view).on("mousemove.drag",x,al).on("mouseup.drag",g,al),$6(E.view),a0(E),u=!1,s=E.clientX,c=E.clientY,I("start",E))}}function x(E){if(va(E),!u){var S=E.clientX-s,I=E.clientY-c;u=S*S+I*I>h}i.mouse("drag",E)}function g(E){Dn(E.view).on("mousemove.drag mouseup.drag",null),H6(E.view,u),va(E),i.mouse("end",E)}function b(E,S){if(e.call(this,E,S)){var I=E.changedTouches,N=t.call(this,E,S),T=I.length,k,z;for(k=0;k<T;++k)(z=_(this,N,E,S,I[k].identifier,I[k]))&&(a0(E),z("start",E,I[k]))}}function w(E){var S=E.changedTouches,I=S.length,N,T;for(N=0;N<I;++N)(T=i[S[N].identifier])&&(va(E),T("drag",E,S[N]))}function y(E){var S=E.changedTouches,I=S.length,N,T;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<I;++N)(T=i[S[N].identifier])&&(a0(E),T("end",E,S[N]))}function _(E,S,I,N,T,k){var z=o.copy(),L=Qn(k||I,S),K,G,A;if((A=r.call(E,new Nw("beforestart",{sourceEvent:I,target:p,identifier:T,active:a,x:L[0],y:L[1],dx:0,dy:0,dispatch:z}),N))!=null)return K=A.x-L[0]||0,G=A.y-L[1]||0,function Y(B,X,U){var re=L,j;switch(B){case"start":i[T]=Y,j=a++;break;case"end":delete i[T],--a;case"drag":L=Qn(U||X,S),j=a;break}z.call(B,E,new Nw(B,{sourceEvent:X,subject:A,target:p,identifier:T,active:j,x:L[0]+K,y:L[1]+G,dx:L[0]-re[0],dy:L[1]-re[1],dispatch:z}),N)}}return p.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Fc(!!E),p):e},p.container=function(E){return arguments.length?(t=typeof E=="function"?E:Fc(E),p):t},p.subject=function(E){return arguments.length?(r=typeof E=="function"?E:Fc(E),p):r},p.touchable=function(E){return arguments.length?(n=typeof E=="function"?E:Fc(!!E),p):n},p.on=function(){var E=o.on.apply(o,arguments);return E===o?p:E},p.clickDistance=function(E){return arguments.length?(h=(E=+E)*E,p):Math.sqrt(h)},p}function P_(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function V6(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Rl(){}var sl=.7,Wu=1/sl,ga="\\s*([+-]?\\d+)\\s*",ll="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Hte=/^#([0-9a-f]{3,8})$/,Vte=new RegExp(`^rgb\\(${ga},${ga},${ga}\\)$`),Wte=new RegExp(`^rgb\\(${ni},${ni},${ni}\\)$`),Ute=new RegExp(`^rgba\\(${ga},${ga},${ga},${ll}\\)$`),Gte=new RegExp(`^rgba\\(${ni},${ni},${ni},${ll}\\)$`),Kte=new RegExp(`^hsl\\(${ll},${ni},${ni}\\)$`),Yte=new RegExp(`^hsla\\(${ll},${ni},${ni},${ll}\\)$`),m5={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};P_(Rl,cl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:b5,formatHex:b5,formatHex8:Xte,formatHsl:Zte,formatRgb:y5,toString:y5});function b5(){return this.rgb().formatHex()}function Xte(){return this.rgb().formatHex8()}function Zte(){return W6(this).formatHsl()}function y5(){return this.rgb().formatRgb()}function cl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Hte.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?x5(t):r===3?new Fr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?$c(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?$c(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Vte.exec(e))?new Fr(t[1],t[2],t[3],1):(t=Wte.exec(e))?new Fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ute.exec(e))?$c(t[1],t[2],t[3],t[4]):(t=Gte.exec(e))?$c(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Kte.exec(e))?S5(t[1],t[2]/100,t[3]/100,1):(t=Yte.exec(e))?S5(t[1],t[2]/100,t[3]/100,t[4]):m5.hasOwnProperty(e)?x5(m5[e]):e==="transparent"?new Fr(NaN,NaN,NaN,0):null}function x5(e){return new Fr(e>>16&255,e>>8&255,e&255,1)}function $c(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fr(e,t,r,n)}function Jte(e){return e instanceof Rl||(e=cl(e)),e?(e=e.rgb(),new Fr(e.r,e.g,e.b,e.opacity)):new Fr}function Tw(e,t,r,n){return arguments.length===1?Jte(e):new Fr(e,t,r,n??1)}function Fr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}P_(Fr,Tw,V6(Rl,{brighter(e){return e=e==null?Wu:Math.pow(Wu,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sl:Math.pow(sl,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fr(wo(this.r),wo(this.g),wo(this.b),Uu(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:w5,formatHex:w5,formatHex8:Qte,formatRgb:_5,toString:_5}));function w5(){return`#${go(this.r)}${go(this.g)}${go(this.b)}`}function Qte(){return`#${go(this.r)}${go(this.g)}${go(this.b)}${go((isNaN(this.opacity)?1:this.opacity)*255)}`}function _5(){const e=Uu(this.opacity);return`${e===1?"rgb(":"rgba("}${wo(this.r)}, ${wo(this.g)}, ${wo(this.b)}${e===1?")":`, ${e})`}`}function Uu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function go(e){return e=wo(e),(e<16?"0":"")+e.toString(16)}function S5(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new jn(e,t,r,n)}function W6(e){if(e instanceof jn)return new jn(e.h,e.s,e.l,e.opacity);if(e instanceof Rl||(e=cl(e)),!e)return new jn;if(e instanceof jn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,c=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new jn(a,s,c,e.opacity)}function ere(e,t,r,n){return arguments.length===1?W6(e):new jn(e,t,r,n??1)}function jn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}P_(jn,ere,V6(Rl,{brighter(e){return e=e==null?Wu:Math.pow(Wu,e),new jn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sl:Math.pow(sl,e),new jn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Fr(s0(e>=240?e-240:e+120,i,n),s0(e,i,n),s0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new jn(E5(this.h),Hc(this.s),Hc(this.l),Uu(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 e=Uu(this.opacity);return`${e===1?"hsl(":"hsla("}${E5(this.h)}, ${Hc(this.s)*100}%, ${Hc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function E5(e){return e=(e||0)%360,e<0?e+360:e}function Hc(e){return Math.max(0,Math.min(1,e||0))}function s0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const U6=e=>()=>e;function tre(e,t){return function(r){return e+r*t}}function rre(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function nre(e){return(e=+e)==1?G6:function(t,r){return r-t?rre(t,r,e):U6(isNaN(t)?r:t)}}function G6(e,t){var r=t-e;return r?tre(e,r):U6(isNaN(e)?t:e)}const O5=(function e(t){var r=nre(t);function n(i,o){var a=r((i=Tw(i)).r,(o=Tw(o)).r),s=r(i.g,o.g),c=r(i.b,o.b),u=G6(i.opacity,o.opacity);return function(d){return i.r=a(d),i.g=s(d),i.b=c(d),i.opacity=u(d),i+""}}return n.gamma=e,n})(1);function Ui(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Pw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,l0=new RegExp(Pw.source,"g");function ire(e){return function(){return e}}function ore(e){return function(t){return e(t)+""}}function are(e,t){var r=Pw.lastIndex=l0.lastIndex=0,n,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=Pw.exec(e))&&(i=l0.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:Ui(n,i)})),r=l0.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?ore(c[0].x):ire(t):(t=c.length,function(u){for(var d=0,h;d<t;++d)s[(h=c[d]).i]=h.x(u);return s.join("")})}var C5=180/Math.PI,kw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function K6(e,t,r,n,i,o){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*n)&&(r-=e*c,n-=t*c),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,c/=s),e*n<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*C5,skewX:Math.atan(c)*C5,scaleX:a,scaleY:s}}var Vc;function sre(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?kw:K6(t.a,t.b,t.c,t.d,t.e,t.f)}function lre(e){return e==null||(Vc||(Vc=document.createElementNS("http://www.w3.org/2000/svg","g")),Vc.setAttribute("transform",e),!(e=Vc.transform.baseVal.consolidate()))?kw:(e=e.matrix,K6(e.a,e.b,e.c,e.d,e.e,e.f))}function Y6(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function o(u,d,h,p,v,x){if(u!==h||d!==p){var g=v.push("translate(",null,t,null,r);x.push({i:g-4,x:Ui(u,h)},{i:g-2,x:Ui(d,p)})}else(h||p)&&v.push("translate("+h+t+p+r)}function a(u,d,h,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Ui(u,d)})):d&&h.push(i(h)+"rotate("+d+n)}function s(u,d,h,p){u!==d?p.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Ui(u,d)}):d&&h.push(i(h)+"skewX("+d+n)}function c(u,d,h,p,v,x){if(u!==h||d!==p){var g=v.push(i(v)+"scale(",null,",",null,")");x.push({i:g-4,x:Ui(u,h)},{i:g-2,x:Ui(d,p)})}else(h!==1||p!==1)&&v.push(i(v)+"scale("+h+","+p+")")}return function(u,d){var h=[],p=[];return u=e(u),d=e(d),o(u.translateX,u.translateY,d.translateX,d.translateY,h,p),a(u.rotate,d.rotate,h,p),s(u.skewX,d.skewX,h,p),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,h,p),u=d=null,function(v){for(var x=-1,g=p.length,b;++x<g;)h[(b=p[x]).i]=b.x(v);return h.join("")}}}var cre=Y6(sre,"px, ","px)","deg)"),ure=Y6(lre,", ",")",")"),dre=1e-12;function I5(e){return((e=Math.exp(e))+1/e)/2}function fre(e){return((e=Math.exp(e))-1/e)/2}function hre(e){return((e=Math.exp(2*e))-1)/(e+1)}const pre=(function e(t,r,n){function i(o,a){var s=o[0],c=o[1],u=o[2],d=a[0],h=a[1],p=a[2],v=d-s,x=h-c,g=v*v+x*x,b,w;if(g<dre)w=Math.log(p/u)/t,b=function(N){return[s+N*v,c+N*x,u*Math.exp(t*N*w)]};else{var y=Math.sqrt(g),_=(p*p-u*u+n*g)/(2*u*r*y),E=(p*p-u*u-n*g)/(2*p*r*y),S=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(E*E+1)-E);w=(I-S)/t,b=function(N){var T=N*w,k=I5(S),z=u/(r*y)*(k*hre(t*T+S)-fre(S));return[s+z*v,c+z*x,u*k/I5(t*T+S)]}}return b.duration=w*1e3*t/Math.SQRT2,b}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return e(a,s,c)},i})(Math.SQRT2,2,4);var Ra=0,Bs=0,ms=0,X6=1e3,Gu,Fs,Ku=0,Ro=0,qd=0,ul=typeof performance=="object"&&performance.now?performance:Date,Z6=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function k_(){return Ro||(Z6(vre),Ro=ul.now()+qd)}function vre(){Ro=0}function Yu(){this._call=this._time=this._next=null}Yu.prototype=J6.prototype={constructor:Yu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?k_():+r)+(t==null?0:+t),!this._next&&Fs!==this&&(Fs?Fs._next=this:Gu=this,Fs=this),this._call=e,this._time=r,Mw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Mw())}};function J6(e,t,r){var n=new Yu;return n.restart(e,t,r),n}function gre(){k_(),++Ra;for(var e=Gu,t;e;)(t=Ro-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ra}function R5(){Ro=(Ku=ul.now())+qd,Ra=Bs=0;try{gre()}finally{Ra=0,bre(),Ro=0}}function mre(){var e=ul.now(),t=e-Ku;t>X6&&(qd-=t,Ku=e)}function bre(){for(var e,t=Gu,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Gu=r);Fs=e,Mw(n)}function Mw(e){if(!Ra){Bs&&(Bs=clearTimeout(Bs));var t=e-Ro;t>24?(e<1/0&&(Bs=setTimeout(R5,e-ul.now()-qd)),ms&&(ms=clearInterval(ms))):(ms||(Ku=ul.now(),ms=setInterval(mre,X6)),Ra=1,Z6(R5))}}function N5(e,t,r){var n=new Yu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var yre=Dd("start","end","cancel","interrupt"),xre=[],Q6=0,T5=1,Aw=2,bu=3,P5=4,Dw=5,yu=6;function Ld(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;wre(e,r,{name:t,index:n,group:i,on:yre,tween:xre,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Q6})}function M_(e,t){var r=Hn(e,t);if(r.state>Q6)throw new Error("too late; already scheduled");return r}function si(e,t){var r=Hn(e,t);if(r.state>bu)throw new Error("too late; already running");return r}function Hn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function wre(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=J6(o,0,r.time);function o(u){r.state=T5,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,h,p,v;if(r.state!==T5)return c();for(d in n)if(v=n[d],v.name===r.name){if(v.state===bu)return N5(a);v.state===P5?(v.state=yu,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[d]):+d<t&&(v.state=yu,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[d])}if(N5(function(){r.state===bu&&(r.state=P5,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=Aw,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Aw){for(r.state=bu,i=new Array(p=r.tween.length),d=0,h=-1;d<p;++d)(v=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=v);i.length=h+1}}function s(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=Dw,1),h=-1,p=i.length;++h<p;)i[h].call(e,d);r.state===Dw&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=yu,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function xu(e,t){var r=e.__transition,n,i,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>Aw&&n.state<Dw,n.state=yu,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function _re(e){return this.each(function(){xu(this,e)})}function Sre(e,t){var r,n;return function(){var i=si(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function Ere(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=si(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===t){i[c]=s;break}c===u&&i.push(s)}o.tween=i}}function Ore(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Hn(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?Sre:Ere)(r,e,t))}function A_(e,t,r){var n=e._id;return e.each(function(){var i=si(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Hn(i,n).value[t]}}function eq(e,t){var r;return(typeof t=="number"?Ui:t instanceof cl?O5:(r=cl(t))?(t=r,O5):are)(e,t)}function Cre(e){return function(){this.removeAttribute(e)}}function Ire(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rre(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function Nre(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function Tre(e,t,r){var n,i,o;return function(){var a,s=r(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s)))}}function Pre(e,t,r){var n,i,o;return function(){var a,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s)))}}function kre(e,t){var r=jd(e),n=r==="transform"?ure:eq;return this.attrTween(e,typeof t=="function"?(r.local?Pre:Tre)(r,n,A_(this,"attr."+e,t)):t==null?(r.local?Ire:Cre)(r):(r.local?Nre:Rre)(r,n,t))}function Mre(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Are(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Dre(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Are(e,o)),r}return i._value=t,i}function jre(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Mre(e,o)),r}return i._value=t,i}function qre(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=jd(e);return this.tween(r,(n.local?Dre:jre)(n,t))}function Lre(e,t){return function(){M_(this,e).delay=+t.apply(this,arguments)}}function zre(e,t){return t=+t,function(){M_(this,e).delay=t}}function Bre(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Lre:zre)(t,e)):Hn(this.node(),t).delay}function Fre(e,t){return function(){si(this,e).duration=+t.apply(this,arguments)}}function $re(e,t){return t=+t,function(){si(this,e).duration=t}}function Hre(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fre:$re)(t,e)):Hn(this.node(),t).duration}function Vre(e,t){if(typeof t!="function")throw new Error;return function(){si(this,e).ease=t}}function Wre(e){var t=this._id;return arguments.length?this.each(Vre(t,e)):Hn(this.node(),t).ease}function Ure(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;si(this,e).ease=r}}function Gre(e){if(typeof e!="function")throw new Error;return this.each(Ure(this._id,e))}function Kre(e){typeof e!="function"&&(e=k6(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],c,u=0;u<a;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&s.push(c);return new Si(n,this._parents,this._name,this._id)}function Yre(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var c=t[s],u=r[s],d=c.length,h=a[s]=new Array(d),p,v=0;v<d;++v)(p=c[v]||u[v])&&(h[v]=p);for(;s<n;++s)a[s]=t[s];return new Si(a,this._parents,this._name,this._id)}function Xre(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Zre(e,t,r){var n,i,o=Xre(t)?M_:si;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function Jre(e,t){var r=this._id;return arguments.length<2?Hn(this.node(),r).on.on(e):this.each(Zre(r,e,t))}function Qre(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function ene(){return this.on("end.remove",Qre(this._id))}function tne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=N_(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],c=s.length,u=o[a]=new Array(c),d,h,p=0;p<c;++p)(d=s[p])&&(h=e.call(d,d.__data__,p,s))&&("__data__"in d&&(h.__data__=d.__data__),u[p]=h,Ld(u[p],t,r,p,u,Hn(d,r)));return new Si(o,this._parents,t,r)}function rne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=P6(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var c=n[s],u=c.length,d,h=0;h<u;++h)if(d=c[h]){for(var p=e.call(d,d.__data__,h,c),v,x=Hn(d,r),g=0,b=p.length;g<b;++g)(v=p[g])&&Ld(v,t,r,g,p,x);o.push(p),a.push(d)}return new Si(o,a,t,r)}var nne=Il.prototype.constructor;function ine(){return new nne(this._groups,this._parents)}function one(e,t){var r,n,i;return function(){var o=Ia(this,e),a=(this.style.removeProperty(e),Ia(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function tq(e){return function(){this.style.removeProperty(e)}}function ane(e,t,r){var n,i=r+"",o;return function(){var a=Ia(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function sne(e,t,r){var n,i,o;return function(){var a=Ia(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Ia(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s))}}function lne(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var c=si(this,e),u=c.on,d=c.value[o]==null?s||(s=tq(t)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),c.on=n}}function cne(e,t,r){var n=(e+="")=="transform"?cre:eq;return t==null?this.styleTween(e,one(e,n)).on("end.style."+e,tq(e)):typeof t=="function"?this.styleTween(e,sne(e,n,A_(this,"style."+e,t))).each(lne(this._id,e)):this.styleTween(e,ane(e,n,t),r).on("end.style."+e,null)}function une(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function dne(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&une(e,a,r)),n}return o._value=t,o}function fne(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,dne(e,t,r??""))}function hne(e){return function(){this.textContent=e}}function pne(e){return function(){var t=e(this);this.textContent=t??""}}function vne(e){return this.tween("text",typeof e=="function"?pne(A_(this,"text",e)):hne(e==null?"":e+""))}function gne(e){return function(t){this.textContent=e.call(this,t)}}function mne(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&gne(i)),t}return n._value=e,n}function bne(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,mne(e))}function yne(){for(var e=this._name,t=this._id,r=rq(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var d=Hn(c,t);Ld(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Si(n,this._parents,e,r)}function xne(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};r.each(function(){var u=si(this,n),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),u.on=t}),i===0&&o()})}var wne=0;function Si(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function rq(){return++wne}var bi=Il.prototype;Si.prototype={constructor:Si,select:tne,selectAll:rne,selectChild:bi.selectChild,selectChildren:bi.selectChildren,filter:Kre,merge:Yre,selection:ine,transition:yne,call:bi.call,nodes:bi.nodes,node:bi.node,size:bi.size,empty:bi.empty,each:bi.each,on:Jre,attr:kre,attrTween:qre,style:cne,styleTween:fne,text:vne,textTween:bne,remove:ene,tween:Ore,delay:Bre,duration:Hre,ease:Wre,easeVarying:Gre,end:xne,[Symbol.iterator]:bi[Symbol.iterator]};function _ne(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Sne={time:null,delay:0,duration:250,ease:_ne};function Ene(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function One(e){var t,r;e instanceof Si?(t=e._id,e=e._name):(t=rq(),(r=Sne).time=k_(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,u=0;u<s;++u)(c=a[u])&&Ld(c,e,t,u,a,r||Ene(c,t));return new Si(n,this._parents,e,t)}Il.prototype.interrupt=_re;Il.prototype.transition=One;const Wc=e=>()=>e;function Cne(e,{sourceEvent:t,target:r,transform:n,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:i}})}function wi(e,t,r){this.k=e,this.x=t,this.y=r}wi.prototype={constructor:wi,scale:function(e){return e===1?this:new wi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var _o=new wi(1,0,0);wi.prototype;function c0(e){e.stopImmediatePropagation()}function bs(e){e.preventDefault(),e.stopImmediatePropagation()}function Ine(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Rne(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function k5(){return this.__zoom||_o}function Nne(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Tne(){return navigator.maxTouchPoints||"ontouchstart"in this}function Pne(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function kne(){var e=Ine,t=Rne,r=Pne,n=Nne,i=Tne,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=pre,u=Dd("start","zoom","end"),d,h,p,v=500,x=150,g=0,b=10;function w(A){A.property("__zoom",k5).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",z).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",K).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(A,Y,B,X){var U=A.selection?A.selection():A;U.property("__zoom",k5),A!==U?S(A,Y,B,X):U.interrupt().each(function(){I(this,arguments).event(X).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},w.scaleBy=function(A,Y,B,X){w.scaleTo(A,function(){var U=this.__zoom.k,re=typeof Y=="function"?Y.apply(this,arguments):Y;return U*re},B,X)},w.scaleTo=function(A,Y,B,X){w.transform(A,function(){var U=t.apply(this,arguments),re=this.__zoom,j=B==null?E(U):typeof B=="function"?B.apply(this,arguments):B,W=re.invert(j),Z=typeof Y=="function"?Y.apply(this,arguments):Y;return r(_(y(re,Z),j,W),U,a)},B,X)},w.translateBy=function(A,Y,B,X){w.transform(A,function(){return r(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof B=="function"?B.apply(this,arguments):B),t.apply(this,arguments),a)},null,X)},w.translateTo=function(A,Y,B,X,U){w.transform(A,function(){var re=t.apply(this,arguments),j=this.__zoom,W=X==null?E(re):typeof X=="function"?X.apply(this,arguments):X;return r(_o.translate(W[0],W[1]).scale(j.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof B=="function"?-B.apply(this,arguments):-B),re,a)},X,U)};function y(A,Y){return Y=Math.max(o[0],Math.min(o[1],Y)),Y===A.k?A:new wi(Y,A.x,A.y)}function _(A,Y,B){var X=Y[0]-B[0]*A.k,U=Y[1]-B[1]*A.k;return X===A.x&&U===A.y?A:new wi(A.k,X,U)}function E(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function S(A,Y,B,X){A.on("start.zoom",function(){I(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(X).end()}).tween("zoom",function(){var U=this,re=arguments,j=I(U,re).event(X),W=t.apply(U,re),Z=B==null?E(W):typeof B=="function"?B.apply(U,re):B,J=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),M=U.__zoom,H=typeof Y=="function"?Y.apply(U,re):Y,q=c(M.invert(Z).concat(J/M.k),H.invert(Z).concat(J/H.k));return function(D){if(D===1)D=H;else{var V=q(D),Q=J/V[2];D=new wi(Q,Z[0]-V[0]*Q,Z[1]-V[1]*Q)}j.zoom(null,D)}})}function I(A,Y,B){return!B&&A.__zooming||new N(A,Y)}function N(A,Y){this.that=A,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,Y),this.taps=0}N.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,Y){return this.mouse&&A!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var Y=Dn(this.that).datum();u.call(A,this.that,new Cne(A,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:u}),Y)}};function T(A,...Y){if(!e.apply(this,arguments))return;var B=I(this,Y).event(A),X=this.__zoom,U=Math.max(o[0],Math.min(o[1],X.k*Math.pow(2,n.apply(this,arguments)))),re=Qn(A);if(B.wheel)(B.mouse[0][0]!==re[0]||B.mouse[0][1]!==re[1])&&(B.mouse[1]=X.invert(B.mouse[0]=re)),clearTimeout(B.wheel);else{if(X.k===U)return;B.mouse=[re,X.invert(re)],xu(this),B.start()}bs(A),B.wheel=setTimeout(j,x),B.zoom("mouse",r(_(y(X,U),B.mouse[0],B.mouse[1]),B.extent,a));function j(){B.wheel=null,B.end()}}function k(A,...Y){if(p||!e.apply(this,arguments))return;var B=A.currentTarget,X=I(this,Y,!0).event(A),U=Dn(A.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",J,!0),re=Qn(A,B),j=A.clientX,W=A.clientY;$6(A.view),c0(A),X.mouse=[re,this.__zoom.invert(re)],xu(this),X.start();function Z(M){if(bs(M),!X.moved){var H=M.clientX-j,q=M.clientY-W;X.moved=H*H+q*q>g}X.event(M).zoom("mouse",r(_(X.that.__zoom,X.mouse[0]=Qn(M,B),X.mouse[1]),X.extent,a))}function J(M){U.on("mousemove.zoom mouseup.zoom",null),H6(M.view,X.moved),bs(M),X.event(M).end()}}function z(A,...Y){if(e.apply(this,arguments)){var B=this.__zoom,X=Qn(A.changedTouches?A.changedTouches[0]:A,this),U=B.invert(X),re=B.k*(A.shiftKey?.5:2),j=r(_(y(B,re),X,U),t.apply(this,Y),a);bs(A),s>0?Dn(this).transition().duration(s).call(S,j,X,A):Dn(this).call(w.transform,j,X,A)}}function L(A,...Y){if(e.apply(this,arguments)){var B=A.touches,X=B.length,U=I(this,Y,A.changedTouches.length===X).event(A),re,j,W,Z;for(c0(A),j=0;j<X;++j)W=B[j],Z=Qn(W,this),Z=[Z,this.__zoom.invert(Z),W.identifier],U.touch0?!U.touch1&&U.touch0[2]!==Z[2]&&(U.touch1=Z,U.taps=0):(U.touch0=Z,re=!0,U.taps=1+!!d);d&&(d=clearTimeout(d)),re&&(U.taps<2&&(h=Z[0],d=setTimeout(function(){d=null},v)),xu(this),U.start())}}function K(A,...Y){if(this.__zooming){var B=I(this,Y).event(A),X=A.changedTouches,U=X.length,re,j,W,Z;for(bs(A),re=0;re<U;++re)j=X[re],W=Qn(j,this),B.touch0&&B.touch0[2]===j.identifier?B.touch0[0]=W:B.touch1&&B.touch1[2]===j.identifier&&(B.touch1[0]=W);if(j=B.that.__zoom,B.touch1){var J=B.touch0[0],M=B.touch0[1],H=B.touch1[0],q=B.touch1[1],D=(D=H[0]-J[0])*D+(D=H[1]-J[1])*D,V=(V=q[0]-M[0])*V+(V=q[1]-M[1])*V;j=y(j,Math.sqrt(D/V)),W=[(J[0]+H[0])/2,(J[1]+H[1])/2],Z=[(M[0]+q[0])/2,(M[1]+q[1])/2]}else if(B.touch0)W=B.touch0[0],Z=B.touch0[1];else return;B.zoom("touch",r(_(j,W,Z),B.extent,a))}}function G(A,...Y){if(this.__zooming){var B=I(this,Y).event(A),X=A.changedTouches,U=X.length,re,j;for(c0(A),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),re=0;re<U;++re)j=X[re],B.touch0&&B.touch0[2]===j.identifier?delete B.touch0:B.touch1&&B.touch1[2]===j.identifier&&delete B.touch1;if(B.touch1&&!B.touch0&&(B.touch0=B.touch1,delete B.touch1),B.touch0)B.touch0[1]=this.__zoom.invert(B.touch0[0]);else if(B.end(),B.taps===2&&(j=Qn(j,this),Math.hypot(h[0]-j[0],h[1]-j[1])<b)){var W=Dn(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return w.wheelDelta=function(A){return arguments.length?(n=typeof A=="function"?A:Wc(+A),w):n},w.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Wc(!!A),w):e},w.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Wc(!!A),w):i},w.extent=function(A){return arguments.length?(t=typeof A=="function"?A:Wc([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),w):t},w.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],w):[o[0],o[1]]},w.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],w):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},w.constrain=function(A){return arguments.length?(r=A,w):r},w.duration=function(A){return arguments.length?(s=+A,w):s},w.interpolate=function(A){return arguments.length?(c=A,w):c},w.on=function(){var A=u.on.apply(u,arguments);return A===u?w:A},w.clickDistance=function(A){return arguments.length?(g=(A=+A)*A,w):Math.sqrt(g)},w.tapDistance=function(A){return arguments.length?(b=+A,w):b},w}function tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nq(e,t){if(e){if(typeof e=="string")return jw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jw(e,t)}}function Mne(e){if(Array.isArray(e))return e}function Ane(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));i=!0);}catch(c){o=!0,s=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function Dne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
58
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ke(e,t){return Mne(e)||Ane(e,t)||nq(e,t)||Dne()}var Na;(function(e){e.Strict="strict",e.Loose="loose"})(Na||(Na={}));var No;(function(e){e.Lines="lines",e.Dots="dots"})(No||(No={}));var ma;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ma||(ma={}));var Ki;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ki||(Ki={}));var Xu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Xu||(Xu={}));var Ee;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ee||(Ee={}));var D_=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},ba=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(t,r),n)},iq=function(t,r){return{x:ba(t.x,r[0][0],r[1][0]),y:ba(t.y,r[0][1],r[1][1])}},oq=function(t){var r,n;return((r=t.getRootNode)===null||r===void 0?void 0:r.call(t))||((n=window)===null||n===void 0?void 0:n.document)},jne=function(t,r){return{x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}},Zu=function(t){var r=t.x,n=t.y,i=t.width,o=t.height;return{x:r,y:n,x2:r+i,y2:n+o}},qne=function(t){var r=t.x,n=t.y,i=t.x2,o=t.y2;return{x:r,y:n,width:i-r,height:o-n}},aq=function(t){return!isNaN(t)&&isFinite(t)},fr=Symbol("internals");function M5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A5(e,t){var r=e.find(function(u){return u.id===t.parentNode});if(r){var n=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(n>0||i>0||t.position.x<0||t.position.y<0){var o,a;if(r.style=$s({},r.style)||{},r.style.width=(o=r.style.width)!==null&&o!==void 0?o:r.width,r.style.height=(a=r.style.height)!==null&&a!==void 0?a:r.height,n>0&&(r.style.width+=n),i>0&&(r.style.height+=i),t.position.x<0){var s=Math.abs(t.position.x);r.position.x=r.position.x-s,r.style.width+=s,t.position.x=0}if(t.position.y<0){var c=Math.abs(t.position.y);r.position.y=r.position.y-c,r.style.height+=c,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function sq(e,t){if(e.some(function(n){return n.type==="reset"}))return e.filter(function(n){return n.type==="reset"}).map(function(n){return n.item});var r=e.filter(function(n){return n.type==="add"}).map(function(n){return n.item});return t.reduce(function(n,i){var o=e.find(function(c){return c.id===i.id});if(o)switch(o.type){case"select":return n.push($s($s({},i),{},{selected:o.selected})),n;case"position":{var a=$s({},i);return typeof o.position<"u"&&(a.position=o.position),typeof o.positionAbsolute<"u"&&(a.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(a.dragging=o.dragging),a.expandParent&&A5(n,a),n.push(a),n}case"dimensions":{var s=$s({},i);return typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),s.expandParent&&A5(n,s),n.push(s),n}case"remove":return n}return n.push(i),n},r)}function lq(e,t){return sq(e,t)}function Lne(e,t){return sq(e,t)}var Gi=function(t,r){return{id:t,type:"select",selected:r}};function fa(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Gi(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Gi(n.id,!1))),r},[])}function D5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var j5=function(t,r,n){var i=r.querySelectorAll(t);if(!i||!i.length)return null;var o=Array.from(i),a=r.getBoundingClientRect();return o.map(function(s){var c=s.getBoundingClientRect();return cq({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},D_(s))})};function ys(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,cq({},i))}}function uq(e){var t=e.id,r=e.store,n=r.getState(),i=n.addSelectedNodes,o=n.unselectNodesAndEdges,a=n.multiSelectionActive,s=n.nodeInternals,c=s.get(t);r.setState({nodesSelectionActive:!1}),c.selected?c.selected&&a&&o({nodes:[c]}):i([t])}function q5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?q5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):q5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zne=function(t){return"id"in t&&"source"in t&&"target"in t},Bne=function(t){var r=t.source,n=t.sourceHandle,i=t.target,o=t.targetHandle;return"reactflow__edge-".concat(r).concat(n||"","-").concat(i).concat(o||"")},qw=function(t,r){if(typeof t>"u")return"";if(typeof t=="string")return t;var n=r?"".concat(r,"__"):"";return"".concat(n).concat(Object.keys(t).sort().map(function(i){return"".concat(i,"=").concat(t[i])}).join("&"))},Fne=function(t,r){return r.some(function(n){return n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)})},$ne=function(t,r){if(!t.source||!t.target)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Can't create edge. An edge needs a source and a target. Help: https://reactflow.dev/error#600"),r;var n;return zne(t)?n=Xs({},t):n=Xs(Xs({},t),{},{id:Bne(t)}),Fne(n,r)?r:r.concat(n)},dq=function(t,r,n,i){var o=t.x,a=t.y,s=Ke(r,3),c=s[0],u=s[1],d=s[2],h=Ke(i,2),p=h[0],v=h[1],x={x:(o-c)/d,y:(a-u)/d};return n?{x:p*Math.round(x.x/p),y:v*Math.round(x.y/v)}:x},j_=function(t){if(t.length===0)return{x:0,y:0,width:0,height:0};var r=t.reduce(function(n,i){var o=i.positionAbsolute,a=i.position,s=i.width,c=i.height;return jne(n,Zu({x:o?o.x:a.x,y:o?o.y:a.y,width:s||0,height:c||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return qne(r)},fq=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Ke(n,3),o=i[0],a=i[1],s=i[2],c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,d=Zu({x:(r.x-o)/s,y:(r.y-a)/s,width:r.width/s,height:r.height/s}),h=[];return t.forEach(function(p){var v=p.positionAbsolute,x=p.width,g=p.height,b=p.selectable,w=b===void 0?!0:b;if(u&&!w)return!1;var y=Zu(Xs(Xs({},v),{},{width:x||0,height:g||0})),_=Math.max(0,Math.min(d.x2,y.x2)-Math.max(d.x,y.x)),E=Math.max(0,Math.min(d.y2,y.y2)-Math.max(d.y,y.y)),S=Math.ceil(_*E),I=typeof x>"u"||typeof g>"u"||x===null||g===null,N=c&&S>0,T=(x||0)*(g||0),k=I||N||S>=T;k&&h.push(p)}),h},hq=function(t,r){var n=t.map(function(i){return i.id});return r.filter(function(i){return n.includes(i.source)||n.includes(i.target)})},pq=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,s=r/(t.width*(1+a)),c=n/(t.height*(1+a)),u=Math.min(s,c),d=ba(u,i,o),h=t.x+t.width/2,p=t.y+t.height/2,v=r/2-h*d,x=n/2-p*d;return[v,x,d]},vo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};function L5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ha(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vq(e,t,r,n){var i,o,a,s,c,u,d,h,p,v,x,g;if(!e.parentNode)return n;var b=t.get(e.parentNode);return vq(b,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=b.position)===null||a===void 0?void 0:a.x)!==null&&o!==void 0?o:0),y:((s=n.y)!==null&&s!==void 0?s:0)+((c=(u=b.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(h=b[fr])===null||h===void 0?void 0:h.z)!==null&&d!==void 0?d:0)>((p=n.z)!==null&&p!==void 0?p:0)?(v=(x=b[fr])===null||x===void 0?void 0:x.z)!==null&&v!==void 0?v:0:(g=n.z)!==null&&g!==void 0?g:0})}function u0(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=aq(i.zIndex)?i.zIndex:i.selected?1e3:0,s=t.get(i.id),c=ha(ha({width:s==null?void 0:s.width,height:s==null?void 0:s.height},i),{},{positionAbsolute:{x:i.position.x,y:i.position.y}});i.parentNode&&(c.parentNode=i.parentNode,n[i.parentNode]=!0),Object.defineProperty(c,fr,{enumerable:!1,value:{handleBounds:s==null||(o=s[fr])===null||o===void 0?void 0:o.handleBounds,z:a}}),r.set(i.id,c)}),r.forEach(function(i){if(i.parentNode&&!r.has(i.parentNode))throw new Error("Parent node ".concat(i.parentNode," not found"));if(i.parentNode||n[i.id]){var o,a,s=vq(i,r,n,ha(ha({},i.position),{},{z:(o=(a=i[fr])===null||a===void 0?void 0:a.z)!==null&&o!==void 0?o:0})),c=s.x,u=s.y,d=s.z;i.positionAbsolute={x:c,y:u},i[fr].z=d,n[i.id]&&(i[fr].isParent=!0)}}),r}function gq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,i=r.width,o=r.height,a=r.minZoom,s=r.maxZoom,c=r.d3Zoom,u=r.d3Selection,d=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!d&&h||!t.initial)&&c&&u){var p=Array.from(n.values()).filter(function(T){return t.includeHiddenNodes?T.width&&T.height:!T.hidden}),v=p.every(function(T){return T.width&&T.height});if(p.length>0&&v){var x,g,b,w=j_(p),y=pq(w,i,o,(x=t.minZoom)!==null&&x!==void 0?x:a,(g=t.maxZoom)!==null&&g!==void 0?g:s,(b=t.padding)!==null&&b!==void 0?b:.1),_=Ke(y,3),E=_[0],S=_[1],I=_[2],N=_o.translate(E,S).scale(I);return typeof t.duration=="number"&&t.duration>0?c.transform(vo(u,t.duration),N):c.transform(u,N),!0}}return!1}function Hne(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,ha(ha({},n),{},(i={},tt(i,fr,n[fr]),tt(i,"selected",r.selected),i)))}}),new Map(t)}function Vne(e,t){return t.map(function(r){var n=e.find(function(i){return i.id===r.id});return n&&(r.selected=n.selected),r})}function Uc(e){var t=e.changedNodes,r=e.changedEdges,n=e.get,i=e.set,o=n(),a=o.nodeInternals,s=o.edges,c=o.onNodesChange,u=o.onEdgesChange,d=o.hasDefaultNodes,h=o.hasDefaultEdges;t!=null&&t.length&&(d&&i({nodeInternals:Hne(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:Vne(r,s)}),u==null||u(r))}var Lw=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],z5={width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Lw,nodeExtent:Lw,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:Na.Strict,domNode:null,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,elementsSelectable:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,reactFlowVersion:"10.3.17",connectionStartHandle:null,connectOnClick:!0};function B5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?B5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var q_=eee(),Wne=q_.Provider,zt=q_.useStore,Rr=q_.useStoreApi,Une=function(){return QQ(function(t,r){return Xn(Xn({},z5),{},{setNodes:function(i){t({nodeInternals:u0(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,s=a===void 0?{}:a;t({edges:i.map(function(c){return Xn(Xn({},s),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",s=typeof o<"u",c=a?u0(i,new Map):new Map,u=s?o:[];t({nodeInternals:c,edges:u,hasDefaultNodes:a,hasDefaultEdges:s})},updateNodeDimensions:function(i){var o=r(),a=o.onNodesChange,s=o.nodeInternals,c=o.fitViewOnInit,u=o.fitViewOnInitDone,d=o.fitViewOnInitOptions,h=o.domNode,p=h==null?void 0:h.querySelector(".react-flow__viewport");if(p){var v=window.getComputedStyle(p),x=new window.DOMMatrixReadOnly(v.transform),g=x.m22,b=i.reduce(function(y,_){var E=s.get(_.id);if(E){var S=D_(_.nodeElement),I=!!(S.width&&S.height&&(E.width!==S.width||E.height!==S.height||_.forceUpdate));I&&(s.set(E.id,Xn(Xn({},E),{},tt({},fr,Xn(Xn({},E[fr]),{},{handleBounds:{source:j5(".source",_.nodeElement,g),target:j5(".target",_.nodeElement,g)}})),S)),y.push({id:E.id,type:"dimensions",dimensions:S}))}return y},[]),w=u||c&&!u&&gq(r,Xn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:w}),(b==null?void 0:b.length)>0&&(a==null||a(b))}},updateNodePositions:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=r(),c=s.onNodesChange,u=s.nodeInternals,d=s.hasDefaultNodes;if(d||c){var h=i.map(function(x){var g={id:x.id,type:"position",dragging:a};return o&&(g.positionAbsolute=x.positionAbsolute,g.position=x.position),g});if(h!=null&&h.length){if(d){var p=lq(h,Array.from(u.values())),v=u0(p,u);t({nodeInternals:v})}c==null||c(h)}}},addSelectedNodes:function(i){var o=r(),a=o.multiSelectionActive,s=o.nodeInternals,c=o.edges,u,d=null;a?u=i.map(function(h){return Gi(h,!0)}):(u=fa(Array.from(s.values()),i),d=fa(c,[])),Uc({changedNodes:u,changedEdges:d,get:r,set:t})},addSelectedEdges:function(i){var o=r(),a=o.multiSelectionActive,s=o.edges,c=o.nodeInternals,u,d=null;a?u=i.map(function(h){return Gi(h,!0)}):(u=fa(s,i),d=fa(Array.from(c.values()),[])),Uc({changedNodes:d,changedEdges:u,get:r,set:t})},unselectNodesAndEdges:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.nodes,a=i.edges,s=r(),c=s.nodeInternals,u=s.edges,d=o||Array.from(c.values()),h=a||u,p=d.map(function(x){return x.selected=!1,Gi(x.id,!1)}),v=h.map(function(x){return Gi(x.id,!1)});Uc({changedNodes:p,changedEdges:v,get:r,set:t})},setMinZoom:function(i){var o=r(),a=o.d3Zoom,s=o.maxZoom;a==null||a.scaleExtent([i,s]),t({minZoom:i})},setMaxZoom:function(i){var o=r(),a=o.d3Zoom,s=o.minZoom;a==null||a.scaleExtent([s,i]),t({maxZoom:i})},setTranslateExtent:function(i){var o=r(),a=o.d3Zoom;a==null||a.translateExtent(i),t({translateExtent:i})},resetSelectedElements:function(){var i=r(),o=i.nodeInternals,a=i.edges,s=Array.from(o.values()),c=s.filter(function(d){return d.selected}).map(function(d){return Gi(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return Gi(d.id,!1)});Uc({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(s){s.positionAbsolute=iq(s.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Xn({},z5))}})})};function an(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=an(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Wr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function Gne(e){if(Array.isArray(e))return jw(e)}function Kne(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
59
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function So(e){return Gne(e)||Kne(e)||nq(e)||Yne()}var Xne={zoomIn:function(){},zoomOut:function(){},zoomTo:function(t){},getZoom:function(){return 1},setViewport:function(t){},getViewport:function(){return{x:0,y:0,zoom:1}},fitView:function(){},setCenter:function(t,r){},fitBounds:function(t){},project:function(t){return t},viewportInitialized:!1},Zne=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},Jne=function(){var t=Rr(),r=zt(Zne,Wr),n=r.d3Zoom,i=r.d3Selection,o=C.useMemo(function(){return i&&n?{zoomIn:function(s){return n.scaleBy(vo(i,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(vo(i,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(vo(i,c==null?void 0:c.duration),s)},getZoom:function(){return t.getState().transform[2]},setViewport:function(s,c){var u,d,h,p=Ke(t.getState().transform,3),v=p[0],x=p[1],g=p[2],b=_o.translate((u=s.x)!==null&&u!==void 0?u:v,(d=s.y)!==null&&d!==void 0?d:x).scale((h=s.zoom)!==null&&h!==void 0?h:g);n.transform(vo(i,c==null?void 0:c.duration),b)},getViewport:function(){var s=Ke(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return gq(t.getState,s)},setCenter:function(s,c,u){var d=t.getState(),h=d.width,p=d.height,v=d.maxZoom,x=typeof(u==null?void 0:u.zoom)<"u"?u.zoom:v,g=h/2-s*x,b=p/2-c*x,w=_o.translate(g,b).scale(x);n.transform(vo(i,u==null?void 0:u.duration),w)},fitBounds:function(s,c){var u,d=t.getState(),h=d.width,p=d.height,v=d.minZoom,x=d.maxZoom,g=pq(s,h,p,v,x,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),b=Ke(g,3),w=b[0],y=b[1],_=b[2],E=_o.translate(w,y).scale(_);n.transform(vo(i,c==null?void 0:c.duration),E)},project:function(s){var c=t.getState(),u=c.transform,d=c.snapToGrid,h=c.snapGrid;return dq(s,u,d,h)},viewportInitialized:!0}:Xne},[n,i]);return o};function F5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ia(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mq(){var e=Jne(),t=Rr(),r=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(x){return ia({},x)})},[]),n=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=C.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(x){return ia({},x)})},[]),o=C.useCallback(function(h){var p=t.getState(),v=p.edges,x=v===void 0?[]:v;return x.find(function(g){return g.id===h})},[]),a=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,x=p.setNodes,g=p.hasDefaultNodes,b=p.onNodesChange,w=Array.from(v.values()),y=typeof h=="function"?h(w):h;if(g)x(y);else if(b){var _=y.length===0?w.map(function(E){return{type:"remove",id:E.id}}):y.map(function(E){return{item:E,type:"reset"}});b(_)}},[]),s=C.useCallback(function(h){var p=t.getState(),v=p.edges,x=v===void 0?[]:v,g=p.setEdges,b=p.hasDefaultEdges,w=p.onEdgesChange,y=typeof h=="function"?h(x):h;if(b)g(y);else if(w){var _=y.length===0?x.map(function(E){return{type:"remove",id:E.id}}):y.map(function(E){return{item:E,type:"reset"}});w(_)}},[]),c=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),x=v.nodeInternals,g=v.setNodes,b=v.hasDefaultNodes,w=v.onNodesChange;if(b){var y=Array.from(x.values()),_=[].concat(y,So(p));g(_)}else if(w){var E=p.map(function(S){return{item:S,type:"add"}});w(E)}},[]),u=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),x=v.edges,g=x===void 0?[]:x,b=v.setEdges,w=v.hasDefaultEdges,y=v.onEdgesChange;if(w)b([].concat(So(g),So(p)));else if(y){var _=p.map(function(E){return{item:E,type:"add"}});y(_)}},[]),d=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,x=v===void 0?[]:v,g=h.transform,b=Array.from(p.values()),w=Ke(g,3),y=w[0],_=w[1],E=w[2];return{nodes:b.map(function(S){return ia({},S)}),edges:x.map(function(S){return ia({},S)}),viewport:{x:y,y:_,zoom:E}}},[]);return C.useMemo(function(){return ia(ia({},e),{},{getNodes:r,getNode:n,getEdges:i,getEdge:o,setNodes:a,setEdges:s,addNodes:c,addEdges:u,toObject:d})},[e,r,n,i,o,a,s,c,u,d])}function Qne(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function zd(e,t){if(e==null)return{};var r=Qne(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},C.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function tie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C.createElement("path",{d:"M0 0h32v4.2H0z"}))}function rie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},C.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function nie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function iie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},C.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}var oie=["children","className"];function $5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Gc=function(t){var r=t.children,n=t.className,i=zd(t,oie);return C.createElement("button",aie({type:"button",className:an(["react-flow__controls-button",n])},i),r)},sie=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},lie=function(t){var r=t.style,n=t.showZoom,i=n===void 0?!0:n,o=t.showFitView,a=o===void 0?!0:o,s=t.showInteractive,c=s===void 0?!0:s,u=t.fitViewOptions,d=t.onZoomIn,h=t.onZoomOut,p=t.onFitView,v=t.onInteractiveChange,x=t.className,g=t.children,b=Rr(),w=C.useState(!1),y=Ke(w,2),_=y[0],E=y[1],S=zt(sie),I=mq(),N=I.zoomIn,T=I.zoomOut,k=I.fitView;if(C.useEffect(function(){E(!0)},[]),!_)return null;var z=function(){N==null||N(),d==null||d()},L=function(){T==null||T(),h==null||h()},K=function(){k==null||k(u),p==null||p()},G=function(){b.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),v==null||v(!S)};return C.createElement("div",{className:an(["react-flow__controls",x]),style:r},i&&C.createElement(C.Fragment,null,C.createElement(Gc,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},C.createElement(eie,null)),C.createElement(Gc,{onClick:L,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},C.createElement(tie,null))),a&&C.createElement(Gc,{className:"react-flow__controls-fitview",onClick:K,title:"fit view","aria-label":"fit view"},C.createElement(rie,null)),c&&C.createElement(Gc,{className:"react-flow__controls-interactive",onClick:G,title:"toggle interactivity","aria-label":"toggle interactivity"},S?C.createElement(iie,null):C.createElement(nie,null)),g)};lie.displayName="Controls";var cie=function(t,r,n){return C.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},uie=function(t,r){return C.createElement("circle",{cx:t,cy:t,r:t,fill:r})},Kc;function H5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function V5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var die=(Kc={},tt(Kc,No.Dots,"#81818a"),tt(Kc,No.Lines,"#eee"),Kc),fie=function(t){return t.transform},bq=function(t){var r=t.variant,n=r===void 0?No.Dots:r,i=t.gap,o=i===void 0?15:i,a=t.size,s=a===void 0?.4:a,c=t.color,u=t.style,d=t.className,h=C.useRef(null),p=C.useState(null),v=Ke(p,2),x=v[0],g=v[1],b=zt(fie),w=Ke(b,3),y=w[0],_=w[1],E=w[2];C.useEffect(function(){var L=document.querySelectorAll(".react-flow__background"),K=Array.from(L).findIndex(function(G){return G===h.current});g("pattern-".concat(K))},[]);var S=o*E||1,I=y%S,N=_%S,T=n===No.Lines,k=c||die[n],z=T?cie(S,s,k):uie(s*E,k);return C.createElement("svg",{className:an(["react-flow__background","react-flow__container",d]),style:V5(V5({},u),{},{width:"100%",height:"100%"}),ref:h},x&&C.createElement(C.Fragment,null,C.createElement("pattern",{id:x,x:I,y:N,width:S,height:S,patternUnits:"userSpaceOnUse"},z),C.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(x,")")})))};bq.displayName="Background";var hie=C.memo(bq),pie=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function vie(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&pie.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return C.createElement("div",{className:an(["react-flow__attribution"].concat(So(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},C.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var gie=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function W5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?W5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var bie=function(t){var r=t.x,n=t.y,i=t.label,o=t.labelStyle,a=o===void 0?{}:o,s=t.labelShowBg,c=s===void 0?!0:s,u=t.labelBgStyle,d=u===void 0?{}:u,h=t.labelBgPadding,p=h===void 0?[2,4]:h,v=t.labelBgBorderRadius,x=v===void 0?2:v,g=t.children,b=t.className,w=zd(t,gie),y=C.useRef(null),_=C.useState({x:0,y:0,width:0,height:0}),E=Ke(_,2),S=E[0],I=E[1],N=an(["react-flow__edge-textwrapper",b]);return C.useEffect(function(){if(y.current){var T=y.current.getBBox();I({x:T.x,y:T.y,width:T.width,height:T.height})}},[i]),typeof i>"u"||!i?null:C.createElement("g",mie({transform:"translate(".concat(r-S.width/2," ").concat(n-S.height/2,")"),className:N},w),c&&C.createElement("rect",{width:S.width+2*p[0],x:-p[0],y:-p[1],height:S.height+2*p[1],className:"react-flow__edge-textbg",style:d,rx:x,ry:x}),C.createElement("text",{className:"react-flow__edge-text",y:S.height/2,dy:"0.3em",ref:y,style:a},i),g)},yie=C.memo(bie),Bd=(function(e){var t=e.path,r=e.centerX,n=e.centerY,i=e.label,o=e.labelStyle,a=e.labelShowBg,s=e.labelBgStyle,c=e.labelBgPadding,u=e.labelBgBorderRadius,d=e.style,h=e.markerEnd,p=e.markerStart,v=i?C.createElement(yie,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null;return C.createElement(C.Fragment,null,C.createElement("path",{style:d,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function Ju(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,s;switch(t){case Ee.Left:case Ee.Right:a=.5*(r+i),s=n;break;case Ee.Top:case Ee.Bottom:a=r,s=.5*(n+o);break}return[a,s]}function yq(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Ee.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Ee.Top:s,u=Ju({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),h=d[0],p=d[1],v=Ju({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(v,2),g=x[0],b=x[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(g,",").concat(b," ").concat(o,",").concat(a)}function xie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Ee.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Ee.Top:s,u=Ju({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),h=d[0],p=d[1],v=Ju({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(v,2),g=x[0],b=x[1],w=t*.125+h*.375+g*.375+o*.125,y=r*.125+p*.375+b*.375+a*.125,_=Math.abs(w-t),E=Math.abs(y-r);return[w,y,_,E]}var xq=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Ee.Bottom:o,s=e.targetPosition,c=s===void 0?Ee.Top:s,u=e.label,d=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,x=e.labelBgBorderRadius,g=e.style,b=e.markerEnd,w=e.markerStart,y={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=yq(y),E=xie(y),S=Ke(E,2),I=S[0],N=S[1];return C.createElement(Bd,{path:_,centerX:I,centerY:N,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:g,markerEnd:b,markerStart:w})});function U5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var G5=[Ee.Left,Ee.Right],wq=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,s=a===void 0?Ee.Bottom:a,c=t.targetPosition,u=c===void 0?Ee.Top:c,d=G5.includes(s),h=G5.includes(u),p=d&&!h||h&&!d;if(p){var v=d?Math.abs(i-r):0,x=r>i?r-v:r+v,g=d?0:Math.abs(o-n),b=n<o?n+g:n-g;return[x,b,v,g]}var w=Math.abs(i-r)/2,y=i<r?i+w:i-w,_=Math.abs(o-n)/2,E=o<n?o+_:o-_;return[y,E,w,_]};function xs(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,wie({},i))}}var d0=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},f0=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},h0=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},p0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},v0=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},g0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},m0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},b0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function zw(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Ee.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Ee.Top:s,u=e.borderRadius,d=u===void 0?5:u,h=e.centerX,p=e.centerY,v=wq({sourceX:t,sourceY:r,targetX:o,targetY:a}),x=Ke(v,4),g=x[0],b=x[1],w=x[2],y=x[3],_=Math.min(d,Math.abs(o-t)),E=Math.min(d,Math.abs(a-r)),S=Math.min(_,E,w,y),I=[Ee.Left,Ee.Right],N=typeof h<"u"?h:g,T=typeof p<"u"?p:b,k=null,z=null;return t<=o?(k=r<=a?d0(t,T,S):g0(t,T,S),z=r<=a?b0(o,T,S):p0(o,T,S)):(k=r<a?h0(t,T,S):m0(t,T,S),z=r<a?v0(o,T,S):f0(o,T,S)),I.includes(i)&&I.includes(c)?t<=o?(k=r<=a?b0(N,r,S):p0(N,r,S),z=r<=a?d0(N,a,S):g0(N,a,S)):(i===Ee.Right&&c===Ee.Left||i===Ee.Left&&c===Ee.Right||i===Ee.Left&&c===Ee.Left)&&(k=r<=a?v0(N,r,S):f0(N,r,S),z=r<=a?h0(N,a,S):m0(N,a,S)):I.includes(i)&&!I.includes(c)?(t<=o?k=r<=a?b0(o,r,S):p0(o,r,S):k=r<=a?v0(o,r,S):f0(o,r,S),z=""):!I.includes(i)&&I.includes(c)&&(t<=o?k=r<=a?d0(t,a,S):g0(t,a,S):k=r<=a?h0(t,a,S):m0(t,a,S),z=""),"M ".concat(t,",").concat(r).concat(k).concat(z,"L ").concat(o,",").concat(a)}var L_=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,h=e.style,p=e.sourcePosition,v=p===void 0?Ee.Bottom:p,x=e.targetPosition,g=x===void 0?Ee.Top:x,b=e.markerEnd,w=e.markerStart,y=e.borderRadius,_=y===void 0?5:y,E=wq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:g}),S=Ke(E,2),I=S[0],N=S[1],T=zw({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:g,borderRadius:_});return C.createElement(Bd,{path:T,centerX:I,centerY:N,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:h,markerEnd:b,markerStart:w})});function K5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Y5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?K5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _q=C.memo(function(e){return C.createElement(L_,Y5(Y5({},e),{},{borderRadius:0}))}),Sq=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.label,a=e.labelStyle,s=e.labelShowBg,c=e.labelBgStyle,u=e.labelBgPadding,d=e.labelBgBorderRadius,h=e.style,p=e.markerEnd,v=e.markerStart,x=Math.abs(i-r)/2,g=i<r?i+x:i-x,b=Math.abs(n-t)/2,w=n<t?n+b:n-b,y="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return C.createElement(Bd,{path:y,centerX:w,centerY:g,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:v})});function Yc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Qu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a=e.c,s,c;switch(t){case Ee.Left:s=r-Yc(r-i,a),c=n;break;case Ee.Right:s=r+Yc(i-r,a),c=n;break;case Ee.Top:s=r,c=n-Yc(n-o,a);break;case Ee.Bottom:s=r,c=n+Yc(o-n,a);break}return[s,c]}function Fd(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Ee.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Ee.Top:s,u=e.curvature,d=u===void 0?.25:u,h=Qu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Ke(h,2),v=p[0],x=p[1],g=Qu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(g,2),w=b[0],y=b[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(x," ").concat(w,",").concat(y," ").concat(o,",").concat(a)}function _ie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Ee.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Ee.Top:s,u=e.curvature,d=u===void 0?.25:u,h=Qu({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Ke(h,2),v=p[0],x=p[1],g=Qu({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(g,2),w=b[0],y=b[1],_=t*.125+v*.375+w*.375+o*.125,E=r*.125+x*.375+y*.375+a*.125,S=Math.abs(_-t),I=Math.abs(E-r);return[_,E,S,I]}var Bw=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Ee.Bottom:o,s=e.targetPosition,c=s===void 0?Ee.Top:s,u=e.label,d=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,x=e.labelBgBorderRadius,g=e.style,b=e.markerEnd,w=e.markerStart,y=e.curvature,_={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:y},E=Fd(_),S=_ie(_),I=Ke(S,2),N=I[0],T=I[1];return C.createElement(Bd,{path:E,centerX:N,centerY:T,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:g,markerEnd:b,markerStart:w})}),z_=C.createContext(null),Sie=z_.Provider;z_.Consumer;function Fw(e,t,r,n,i,o,a){var s=a.elementFromPoint(e.clientX,e.clientY),c=(s==null?void 0:s.classList.contains("target"))||!1,u=(s==null?void 0:s.classList.contains("source"))||!1,d={elementBelow:s,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(s&&(c||u)){d.isHoveringHandle=!0;var h=s.getAttribute("data-nodeid"),p=s.getAttribute("data-handleid"),v=r?{source:h,sourceHandle:p,target:n,targetHandle:i}:{source:n,sourceHandle:i,target:h,targetHandle:p};d.connection=v;var x=t===Na.Strict?r&&u||!r&&c:!0;x&&(d.isValid=o(v))}return d}function y0(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function Eq(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,s=e.setState,c=e.isValidConnection,u=e.elementEdgeUpdaterType,d=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=oq(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),x=v==null?void 0:v.classList.contains("target"),g=v==null?void 0:v.classList.contains("source");if(!h||!x&&!g&&!u)return;var b=a(),w=b.onConnectStart,y=b.connectionMode,_=u||(x?"target":"source"),E=h.getBoundingClientRect(),S;s({connectionPosition:{x:t.clientX-E.left,y:t.clientY-E.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:_}),w==null||w(t,{nodeId:n,handleId:r,handleType:_});function I(T){s({connectionPosition:{x:T.clientX-E.left,y:T.clientY-E.top}});var k=Fw(T,y,o,n,r,c,p),z=k.connection,L=k.elementBelow,K=k.isValid,G=k.isHoveringHandle;if(!G)return y0(S);z.source!==z.target&&L&&(y0(S),S=L,L.classList.add("react-flow__handle-connecting"),L.classList.toggle("react-flow__handle-valid",K))}function N(T){var k=a(),z=k.onConnectStop,L=k.onConnectEnd,K=Fw(T,y,o,n,r,c,p),G=K.connection,A=K.isValid;z==null||z(T),A&&(i==null||i(G)),L==null||L(T),u&&d&&d(T),y0(S),s({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",I),p.removeEventListener("mouseup",N)}p.addEventListener("mousemove",I),p.addEventListener("mouseup",N)}var Eie=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];function X5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function x0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?X5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Oie=function(){return!0},Cie=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},Oq=C.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?Ee.Top:i,a=e.isValidConnection,s=a===void 0?Oie:a,c=e.isConnectable,u=c===void 0?!0:c,d=e.id,h=e.onConnect,p=e.children,v=e.className,x=e.onMouseDown,g=zd(e,Eie),b=Rr(),w=C.useContext(z_),y=zt(Cie,Wr),_=y.connectionStartHandle,E=y.connectOnClick,S=d||null,I=n==="target",N=function(L){var K=b.getState(),G=K.defaultEdgeOptions,A=K.onConnect,Y=K.hasDefaultEdges,B=x0(x0({},G),L);if(Y){var X=b.getState(),U=X.edges;b.setState({edges:$ne(B,U)})}A==null||A(B),h==null||h(B)},T=function(L){L.button===0&&Eq({event:L,handleId:S,nodeId:w,onConnect:N,isTarget:I,getState:b.getState,setState:b.setState,isValidConnection:s}),x==null||x(L)},k=function(L){var K=b.getState(),G=K.onClickConnectStart,A=K.onClickConnectStop,Y=K.onClickConnectEnd,B=K.connectionMode;if(!_){G==null||G(L,{nodeId:w,handleId:S,handleType:n}),b.setState({connectionStartHandle:{nodeId:w,type:n,handleId:S}});return}var X=oq(L.target),U=Fw(L,B,_.type==="target",_.nodeId,_.handleId||null,s,X),re=U.connection,j=U.isValid;A==null||A(L),j&&N(re),Y==null||Y(L),b.setState({connectionStartHandle:null})};return C.createElement("div",x0({"data-handleid":S,"data-nodeid":w,"data-handlepos":o,className:an(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!I,target:I,connectable:u,connecting:(_==null?void 0:_.nodeId)===w&&(_==null?void 0:_.handleId)===S&&(_==null?void 0:_.type)===n}]),onMouseDown:T,onClick:E?k:void 0,ref:t},g),p)});Oq.displayName="Handle";var ed=C.memo(Oq),Cq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Ee.Top:i,a=t.sourcePosition,s=a===void 0?Ee.Bottom:a;return C.createElement(C.Fragment,null,C.createElement(ed,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,C.createElement(ed,{type:"source",position:s,isConnectable:n}))};Cq.displayName="DefaultNode";var $w=C.memo(Cq),Iq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Ee.Bottom:i;return C.createElement(C.Fragment,null,r==null?void 0:r.label,C.createElement(ed,{type:"source",position:o,isConnectable:n}))};Iq.displayName="InputNode";var Rq=C.memo(Iq),Nq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Ee.Top:i;return C.createElement(C.Fragment,null,C.createElement(ed,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};Nq.displayName="OutputNode";var Tq=C.memo(Nq),Iie=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Rie=function(t,r){var n=t.selectedNodes.map(function(s){return s.id}),i=r.selectedNodes.map(function(s){return s.id}),o=t.selectedEdges.map(function(s){return s.id}),a=r.selectedEdges.map(function(s){return s.id});return Wr(n,i)&&Wr(o,a)};function Nie(e){var t=e.onSelectionChange,r=zt(Iie,Rie),n=r.selectedNodes,i=r.selectedEdges;return C.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var Tie=C.memo(Nie),Pie=function(t){return{setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset}};function $i(e,t){C.useEffect(function(){typeof e<"u"&&t(e)},[e])}function mt(e,t,r){C.useEffect(function(){typeof t<"u"&&r(tt({},e,t))},[t])}var kie=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,s=t.onConnectStart,c=t.onConnectStop,u=t.onConnectEnd,d=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,x=t.nodesConnectable,g=t.minZoom,b=t.maxZoom,w=t.nodeExtent,y=t.onNodesChange,_=t.onEdgesChange,E=t.elementsSelectable,S=t.connectionMode,I=t.snapGrid,N=t.snapToGrid,T=t.translateExtent,k=t.connectOnClick,z=t.defaultEdgeOptions,L=t.fitView,K=t.fitViewOptions,G=t.onNodesDelete,A=t.onEdgesDelete,Y=t.onNodeDrag,B=t.onNodeDragStart,X=t.onNodeDragStop,U=t.onSelectionDrag,re=t.onSelectionDragStart,j=t.onSelectionDragStop,W=zt(Pie,Wr),Z=W.setNodes,J=W.setEdges,M=W.setDefaultNodesAndEdges,H=W.setMinZoom,q=W.setMaxZoom,D=W.setTranslateExtent,V=W.setNodeExtent,Q=W.reset,ne=Rr();return C.useEffect(function(){return M(i,o),function(){Q()}},[]),mt("defaultEdgeOptions",z,ne.setState),mt("connectionMode",S,ne.setState),mt("onConnect",a,ne.setState),mt("onConnectStart",s,ne.setState),mt("onConnectStop",c,ne.setState),mt("onConnectEnd",u,ne.setState),mt("onClickConnectStart",d,ne.setState),mt("onClickConnectStop",h,ne.setState),mt("onClickConnectEnd",p,ne.setState),mt("nodesDraggable",v,ne.setState),mt("nodesConnectable",x,ne.setState),mt("elementsSelectable",E,ne.setState),mt("snapToGrid",N,ne.setState),mt("snapGrid",I,ne.setState),mt("onNodesChange",y,ne.setState),mt("onEdgesChange",_,ne.setState),mt("connectOnClick",k,ne.setState),mt("fitViewOnInit",L,ne.setState),mt("fitViewOnInitOptions",K,ne.setState),mt("onNodesDelete",G,ne.setState),mt("onEdgesDelete",A,ne.setState),mt("onNodeDrag",Y,ne.setState),mt("onNodeDragStart",B,ne.setState),mt("onNodeDragStop",X,ne.setState),mt("onSelectionDrag",U,ne.setState),mt("onSelectionDragStart",re,ne.setState),mt("onSelectionDragStop",j,ne.setState),$i(r,Z),$i(n,J),$i(i,Z),$i(o,J),$i(g,H),$i(b,q),$i(T,D),$i(w,V),null},Mie=".react-flow{height:100%;overflow:hidden;position:relative;width:100%}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{z-index:1}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selectionpane{z-index:5}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow .react-flow__connectionline{z-index:1001}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.inactive{pointer-events:none}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edge-path{fill:none}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connection-path{fill:none}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:-webkit-grab;cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{pointer-events:none;position:absolute}.react-flow__handle.connectable{pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__controls{bottom:20px;left:15px;position:absolute;z-index:5}.react-flow__controls-button{border:none;height:24px;width:24px}.react-flow__controls-button svg{width:100%}.react-flow__minimap{bottom:20px;position:absolute;right:15px;z-index:5}.react-flow__attribution{background:hsla(0,0%,100%,.5);color:#999;font-size:10px;padding:2px 3px;position:absolute;z-index:1000}.react-flow__attribution a{color:#555;text-decoration:none}.react-flow__attribution.top{top:0}.react-flow__attribution.bottom{bottom:0}.react-flow__attribution.left{left:0}.react-flow__attribution.right{right:0}.react-flow__attribution.center{left:50%;transform:translateX(-50%)}",Aie=Mie,Die=".react-flow__edge.selected .react-flow__edge-path{stroke:#555}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1}.react-flow__edge-text{font-size:10px}.react-flow__edge-textbg{fill:#fff}.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1}.react-flow__node{cursor:-webkit-grab;cursor:grab}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selected,.react-flow__node-group.selected,.react-flow__node-input.selected,.react-flow__node-output.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-default .react-flow__handle,.react-flow__node-group .react-flow__handle,.react-flow__node-input .react-flow__handle,.react-flow__node-output .react-flow__handle{background:#1a192b}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px rgba(0,0,0,.08)}.react-flow__node-default.selectable.selected,.react-flow__node-group.selectable.selected,.react-flow__node-input.selectable.selected,.react-flow__node-output.selectable.selected{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background:hsla(0,0%,94%,.25);border-color:#1a192b}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__handle{background:#555;border:1px solid #fff;border-radius:100%;height:6px;width:6px}.react-flow__handle.connectable{cursor:crosshair}.react-flow__minimap{background-color:#fff}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0,0,0,.08)}.react-flow__controls-button{align-items:center;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:16px}.react-flow__controls-button svg{max-height:12px;max-width:12px}.react-flow__controls-button:hover{background:#f4f4f4}",jie=Die,qie=function(t,r,n){return n===Ee.Left?t-r:n===Ee.Right?t+r:t},Lie=function(t,r,n){return n===Ee.Top?t-r:n===Ee.Bottom?t+r:t},Z5=function(t){var r=t.className,n=t.position,i=t.centerX,o=t.centerY,a=t.radius,s=a===void 0?10:a;return C.createElement("circle",{className:an(["react-flow__edgeupdater",r]),cx:qie(i,s,n),cy:Lie(o,s,n),r:s,stroke:"transparent",fill:"transparent"})},oa=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,s=n.data,c=n.onClick,u=n.onEdgeDoubleClick,d=n.selected,h=n.animated,p=n.label,v=n.labelStyle,x=n.labelShowBg,g=n.labelBgStyle,b=n.labelBgPadding,w=n.labelBgBorderRadius,y=n.style,_=n.source,E=n.target,S=n.sourceX,I=n.sourceY,N=n.targetX,T=n.targetY,k=n.sourcePosition,z=n.targetPosition,L=n.elementsSelectable,K=n.hidden,G=n.sourceHandleId,A=n.targetHandleId,Y=n.onContextMenu,B=n.onMouseEnter,X=n.onMouseMove,U=n.onMouseLeave,re=n.edgeUpdaterRadius,j=n.onEdgeUpdate,W=n.onEdgeUpdateStart,Z=n.onEdgeUpdateEnd,J=n.markerEnd,M=n.markerStart,H=n.rfId,q=C.useState(!1),D=Ke(q,2),V=D[0],Q=D[1],ne=Rr(),ce=function(qe){var Xe=ne.getState(),Ue=Xe.edges,sr=Xe.addSelectedEdges,Ut=Ue.find(function(nt){return nt.id===i});L&&(ne.setState({nodesSelectionActive:!1}),sr([i])),c==null||c(qe,Ut)},ee=xs(i,ne.getState,u),pe=xs(i,ne.getState,Y),ue=xs(i,ne.getState,B),xe=xs(i,ne.getState,X),le=xs(i,ne.getState,U),ie=function(qe,Xe){var Ue=Xe?E:_,sr=(Xe?A:G)||null,Ut=Xe?"target":"source",nt=function(){return!0},Ct=Xe,yr=ne.getState().edges.find(function(pr){return pr.id===i});W==null||W(qe,yr,Ut);var sn=Z?function(pr){return Z(pr,yr,Ut)}:void 0,Tr=function(Rn){return j==null?void 0:j(yr,Rn)};Eq({event:qe,handleId:sr,nodeId:Ue,onConnect:Tr,isTarget:Ct,getState:ne.getState,setState:ne.setState,isValidConnection:nt,elementEdgeUpdaterType:Ut,onEdgeUpdateEnd:sn})},me=function(qe){return ie(qe,!0)},_e=function(qe){return ie(qe,!1)},Ce=function(){return Q(!0)},je=function(){return Q(!1)},Pe=C.useMemo(function(){return"url(#".concat(qw(M,H),")")},[M,H]),Te=C.useMemo(function(){return"url(#".concat(qw(J,H),")")},[J,H]);if(K)return null;var Be=!L&&!c,rt=typeof j<"u",$e=an(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:d,animated:h,inactive:Be,updating:V}]);return C.createElement("g",{className:$e,onClick:ce,onDoubleClick:ee,onContextMenu:pe,onMouseEnter:ue,onMouseMove:xe,onMouseLeave:le},C.createElement(e,{id:i,source:_,target:E,selected:d,animated:h,label:p,labelStyle:v,labelShowBg:x,labelBgStyle:g,labelBgPadding:b,labelBgBorderRadius:w,data:s,style:y,sourceX:S,sourceY:I,targetX:N,targetY:T,sourcePosition:k,targetPosition:z,sourceHandleId:G,targetHandleId:A,markerStart:Pe,markerEnd:Te,"data-testid":"rf__edge-".concat(i)}),rt&&C.createElement("g",{onMouseDown:me,onMouseEnter:Ce,onMouseOut:je},C.createElement(Z5,{position:k,centerX:S,centerY:I,radius:re})),rt&&C.createElement("g",{onMouseDown:_e,onMouseEnter:Ce,onMouseOut:je},C.createElement(Z5,{position:z,centerX:N,centerY:T,radius:re})))};return t.displayName="EdgeWrapper",C.memo(t)});function J5(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Q5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J5(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zie(e){var t={default:oa(e.default||Bw),straight:oa(e.bezier||Sq),step:oa(e.step||_q),smoothstep:oa(e.step||L_),simplebezier:oa(e.simplebezier||xq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=oa(e[o]||Bw),i},r);return Q5(Q5({},t),n)}function eP(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=((r==null?void 0:r.x)||0)+t.x,i=((r==null?void 0:r.y)||0)+t.y,o=(r==null?void 0:r.width)||t.width,a=(r==null?void 0:r.height)||t.height;switch(e){case Ee.Top:return{x:n+o/2,y:i};case Ee.Right:return{x:n+o,y:i+a/2};case Ee.Bottom:return{x:n+o/2,y:i+a};case Ee.Left:return{x:n,y:i+a/2}}}function tP(e,t){if(!e)return null;var r=null;return e.length===1||!t?r=e[0]:t&&(r=e.find(function(n){return n.id===t})),typeof r>"u"?null:r}var Bie=function(t,r,n,i,o,a){var s=eP(n,t,r),c=eP(a,i,o);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function Fie(e){var t=e.sourcePos,r=e.targetPos,n=e.sourceWidth,i=e.sourceHeight,o=e.targetWidth,a=e.targetHeight,s=e.width,c=e.height,u=e.transform,d={x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x+n,r.x+o),y2:Math.max(t.y+i,r.y+a)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);var h=Zu({x:(0-u[0])/u[2],y:(0-u[1])/u[2],width:s/u[2],height:c/u[2]}),p=Math.max(0,Math.min(h.x2,d.x2)-Math.max(h.x,d.x)),v=Math.max(0,Math.min(h.y2,d.y2)-Math.max(h.y,d.y)),x=Math.ceil(p*v);return x>0}function rP(e,t){var r,n,i,o,a,s=e.get(t),c=(s==null||(r=s[fr])===null||r===void 0?void 0:r.handleBounds)||null,u=!s||!c||!s.width||!s.height||typeof((n=s.positionAbsolute)===null||n===void 0?void 0:n.x)>"u"||typeof((i=s.positionAbsolute)===null||i===void 0?void 0:i.y)>"u";return[{x:(s==null||(o=s.positionAbsolute)===null||o===void 0?void 0:o.x)||0,y:(s==null||(a=s.positionAbsolute)===null||a===void 0?void 0:a.y)||0,width:(s==null?void 0:s.width)||0,height:(s==null?void 0:s.height)||0},c,!u]}var $ie=typeof document<"u"?document:null,td=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:$ie},r=C.useState(!1),n=Ke(r,2),i=n[0],o=n[1],a=C.useRef(new Set([])),s=C.useMemo(function(){if(e!==null){var h=Array.isArray(e)?e:[e],p=h.filter(function(x){return typeof x=="string"}).map(function(x){return x.split("+")}),v=p.reduce(function(x,g){return x.concat.apply(x,So(g))},[]);return[p,v]}return[[],[]]},[e]),c=Ke(s,2),u=c[0],d=c[1];return C.useEffect(function(){if(e!==null){var h,p,v=function(w){if(oP(w))return!1;var y=iP(w.code,d);a.current.add(w[y]),nP(u,a.current,!1)&&(w.preventDefault(),o(!0))},x=function(w){if(oP(w))return!1;var y=iP(w.code,d);nP(u,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(w[y])},g=function(){a.current.clear(),o(!1)};return t==null||(h=t.target)===null||h===void 0||h.addEventListener("keydown",v),t==null||(p=t.target)===null||p===void 0||p.addEventListener("keyup",x),window.addEventListener("blur",g),function(){var b,w;t==null||(b=t.target)===null||b===void 0||b.removeEventListener("keydown",v),t==null||(w=t.target)===null||w===void 0||w.removeEventListener("keyup",x),window.removeEventListener("blur",g)}}},[e,o]),i});function nP(e,t,r){return e.filter(function(n){return r||n.length===t.size}).some(function(n){return n.every(function(i){return t.has(i)})})}function iP(e,t){return t.includes(e)?"code":"key"}function oP(e){var t,r=((t=e.composedPath)===null||t===void 0?void 0:t.call(e)[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))}var Hie=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},Vie=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Rr(),i=zt(Hie,Wr),o=i.onNodesChange,a=i.onEdgesChange,s=td(t),c=td(r);C.useEffect(function(){var u=n.getState(),d=u.nodeInternals,h=u.edges,p=u.hasDefaultNodes,v=u.hasDefaultEdges,x=u.onNodesDelete,g=u.onEdgesDelete,b=Array.from(d.values()),w=b.reduce(function(T,k){return(!k.selected&&k.parentNode&&T.find(function(z){return z.id===k.parentNode})||k.selected)&&T.push(k),T},[]),y=h.filter(function(T){return T.selected});if(s&&(w||y)){var _=hq(w,h),E=[].concat(So(y),So(_)),S=E.reduce(function(T,k){return T.includes(k.id)||T.push(k.id),T},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(T){return!S.includes(T.id)})}),p&&(w.forEach(function(T){d.delete(T.id)}),n.setState({nodeInternals:new Map(d)}))),S.length>0&&(g==null||g(E),a)){var I=S.map(function(T){return{id:T,type:"remove"}});a(I)}if(w.length>0&&(x==null||x(w),o)){var N=w.map(function(T){return{id:T.id,type:"remove"}});o(N)}n.setState({nodesSelectionActive:!1})}},[s,o,a]),C.useEffect(function(){n.setState({multiSelectionActive:c})},[c])});function Wie(e){var t=Rr();C.useEffect(function(){var r,n=function(){if(e.current){var o=D_(e.current);process.env.NODE_ENV==="development"&&(o.height===0||o.width===0)&&console.warn("[React Flow]: The React Flow parent container needs a width and a height to render the graph. Help: https://reactflow.dev/error#400"),t.setState({width:o.width||500,height:o.height||500})}};return n(),window.onresize=n,e.current&&(r=new ResizeObserver(function(){return n()}),r.observe(e.current)),function(){window.onresize=null,r&&e.current&&r.unobserve(e.current)}},[])}var Uie=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},w0=function(t){return{x:t.x,y:t.y,zoom:t.k}},Xc=function(t,r){return t.target.closest(".".concat(r))},Gie=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},Kie=function(t){var r=t.onMove,n=t.onMoveStart,i=t.onMoveEnd,o=t.zoomOnScroll,a=o===void 0?!0:o,s=t.zoomOnPinch,c=s===void 0?!0:s,u=t.panOnScroll,d=u===void 0?!1:u,h=t.panOnScrollSpeed,p=h===void 0?.5:h,v=t.panOnScrollMode,x=v===void 0?ma.Free:v,g=t.zoomOnDoubleClick,b=g===void 0?!0:g,w=t.selectionKeyPressed,y=t.elementsSelectable,_=t.panOnDrag,E=_===void 0?!0:_,S=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,k=T===void 0?1:T,z=t.defaultPosition,L=z===void 0?[0,0]:z,K=t.zoomActivationKeyCode,G=t.preventScrolling,A=G===void 0?!0:G,Y=t.children,B=t.noWheelClassName,X=t.noPanClassName,U=Rr(),re=C.useRef(!1),j=C.useRef(null),W=C.useRef({x:0,y:0,zoom:0}),Z=zt(Gie,Wr),J=Z.d3Zoom,M=Z.d3Selection,H=Z.d3ZoomHandler,q=td(K);return Wie(j),C.useEffect(function(){if(j.current){var D,V=kne().scaleExtent([I,N]).translateExtent(S),Q=Dn(j.current).call(V),ne=ba(L[0],S[0][0],S[1][0]),ce=ba(L[1],S[0][1],S[1][1]),ee=ba(k,I,N),pe=_o.translate(ne,ce).scale(ee);V.transform(Q,pe),U.setState({d3Zoom:V,d3Selection:Q,d3ZoomHandler:Q.on("wheel.zoom"),transform:[ne,ce,ee],domNode:(D=Q.node())===null||D===void 0?void 0:D.closest(".react-flow")})}},[]),C.useEffect(function(){M&&J&&(d&&!q?M.on("wheel",function(D){if(Xc(D,B))return!1;D.preventDefault(),D.stopImmediatePropagation();var V=M.property("__zoom").k||1;if(D.ctrlKey&&c){var Q=Qn(D),ne=-D.deltaY*(D.deltaMode===1?.05:D.deltaMode?1:.002)*10,ce=V*Math.pow(2,ne);J.scaleTo(M,ce,Q);return}var ee=D.deltaMode===1?20:1,pe=x===ma.Vertical?0:D.deltaX*ee,ue=x===ma.Horizontal?0:D.deltaY*ee;J.translateBy(M,-(pe/V)*p,-(ue/V)*p)}).on("wheel.zoom",null):typeof H<"u"&&M.on("wheel",function(D){if(!A||Xc(D,B))return null;D.preventDefault()}).on("wheel.zoom",H))},[d,x,M,J,H,q,c,A,B]),C.useEffect(function(){J&&(w&&!re.current?J.on("zoom",null):w||J.on("zoom",function(D){if(U.setState({transform:[D.transform.x,D.transform.y,D.transform.k]}),r){var V=w0(D.transform);r(D.sourceEvent,V)}}))},[w,J,r]),C.useEffect(function(){J&&J.on("start",function(D){if(re.current=!0,n){var V=w0(D.transform);W.current=V,n(D.sourceEvent,V)}})},[J,n]),C.useEffect(function(){J&&J.on("end",function(D){if(re.current=!1,i&&Uie(W.current,D.transform)){var V=w0(D.transform);W.current=V,i(D.sourceEvent,V)}})},[J,i]),C.useEffect(function(){J&&J.filter(function(D){var V=q||a,Q=c&&D.ctrlKey;return!E&&!V&&!d&&!b&&!c||w||!b&&D.type==="dblclick"||Xc(D,B)&&D.type==="wheel"||Xc(D,X)&&D.type!=="wheel"||!c&&D.ctrlKey&&D.type==="wheel"||!V&&!d&&!Q&&D.type==="wheel"||!E&&(D.type==="mousedown"||D.type==="touchstart")?!1:(!D.ctrlKey||D.type==="wheel")&&!D.button})},[J,a,c,d,b,E,w,y,q]),C.createElement("div",{className:"react-flow__renderer react-flow__container",ref:j},Y)};function aP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lP(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var Yie=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},cP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},Xie=C.memo(function(e){var t=e.selectionKeyPressed,r=Rr(),n=C.useRef(0),i=C.useRef(0),o=C.useRef(),a=C.useState(cP),s=Ke(a,2),c=s[0],u=s[1],d=zt(Yie,Wr),h=d.userSelectionActive,p=d.elementsSelectable,v=h||t;if(!p||!v)return null;var x=function(){u(cP),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},g=function(E){var S=E.target.closest(".react-flow");o.current=S.getBoundingClientRect();var I=lP(E,o.current);u({width:0,height:0,startX:I.x,startY:I.y,x:I.x,y:I.y,draw:!0}),r.setState({userSelectionActive:!0,nodesSelectionActive:!1})},b=function(E){var S,I;if(!(!t||!c.draw||!o.current)){var N=lP(E,o.current),T=(S=c.startX)!==null&&S!==void 0?S:0,k=(I=c.startY)!==null&&I!==void 0?I:0,z=sP(sP({},c),{},{x:N.x<T?N.x:T,y:N.y<k?N.y:k,width:Math.abs(N.x-T),height:Math.abs(N.y-k)}),L=r.getState(),K=L.nodeInternals,G=L.edges,A=L.transform,Y=L.onNodesChange,B=L.onEdgesChange,X=Array.from(K.values()),U=fq(K,z,A,!1,!0),re=hq(U,G).map(function(J){return J.id}),j=U.map(function(J){return J.id});if(n.current!==j.length){n.current=j.length;var W=fa(X,j);W.length&&(Y==null||Y(W))}if(i.current!==re.length){i.current=re.length;var Z=fa(G,re);Z.length&&(B==null||B(Z))}u(z)}},w=function(){r.setState({nodesSelectionActive:n.current>0}),x()},y=function(){r.setState({nodesSelectionActive:!1}),x()};return C.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:g,onMouseMove:b,onMouseUp:w,onMouseLeave:y},c.draw&&C.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:c.width,height:c.height,transform:"translate(".concat(c.x,"px, ").concat(c.y,"px)")}}))});function uP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:Pq(r,t):!1}function fP(e,t,r){var n=e;do{var i;if((i=n)!==null&&i!==void 0&&i.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function Zie(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!Pq(n,e))}).map(function(n){var i,o,a,s;return{id:n.id,position:n.position||{x:0,y:0},positionAbsolute:n.positionAbsolute||{x:0,y:0},distance:{x:t.x-((i=(o=n.positionAbsolute)===null||o===void 0?void 0:o.x)!==null&&i!==void 0?i:0),y:t.y-((a=(s=n.positionAbsolute)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)},delta:{x:0,y:0},extent:n.extent,parentNode:n.parentNode,width:n.width,height:n.height}})}function Jie(e,t,r,n,i,o){var a=Ke(n,2),s=a[0],c=a[1],u=e.extent||o,d={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(d.x=s*Math.round(d.x/s),d.y=c*Math.round(d.y/c)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var h=i.get(e.parentNode);u=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.height-e.height]]:u}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),u=o;else if(e.extent&&e.parentNode){var p,v,x,g,b=i.get(e.parentNode),w=(p=b==null||(v=b.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,y=(x=b==null||(g=b.positionAbsolute)===null||g===void 0?void 0:g.y)!==null&&x!==void 0?x:0;u=[[e.extent[0][0]+w,e.extent[0][1]+y],[e.extent[1][0]+w,e.extent[1][1]+y]]}var _={x:0,y:0};if(e.parentNode){var E,S,I,N,T=i.get(e.parentNode);_={x:(E=T==null||(S=T.positionAbsolute)===null||S===void 0?void 0:S.x)!==null&&E!==void 0?E:0,y:(I=T==null||(N=T.positionAbsolute)===null||N===void 0?void 0:N.y)!==null&&I!==void 0?I:0}}return e.positionAbsolute=u?iq(d,u):d,e.position={x:e.positionAbsolute.x-_.x,y:e.positionAbsolute.y-_.y},e}function _0(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return dP(dP({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function S0(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function kq(e){var t=e.nodeRef,r=e.disabled,n=r===void 0?!1:r,i=e.noDragClassName,o=e.handleSelector,a=e.nodeId,s=e.isSelectable,c=e.selectNodesOnDrag,u=C.useState(!1),d=Ke(u,2),h=d[0],p=d[1],v=Rr(),x=C.useRef(),g=C.useRef({x:null,y:null}),b=C.useCallback(function(w){var y=w.sourceEvent,_=v.getState(),E=_.transform,S=_.snapGrid,I=_.snapToGrid,N=y.touches?y.touches[0].clientX:y.clientX,T=y.touches?y.touches[0].clientY:y.clientY,k=dq({x:N,y:T},E,I,S);return k},[]);return C.useEffect(function(){if(t!=null&&t.current){var w=Dn(t.current);if(n)w.on(".drag",null);else{var y=$te().on("start",function(_){var E=v.getState(),S=E.nodeInternals,I=E.multiSelectionActive,N=E.unselectNodesAndEdges,T=E.onNodeDragStart,k=E.onSelectionDragStart,z=a?T:S0(k);if(!c&&!I&&a){var L;(L=S.get(a))!==null&&L!==void 0&&L.selected||N()}a&&s&&c&&uq({id:a,store:v});var K=b(_);if(g.current=K,x.current=Zie(S,K,a),z&&x.current){var G=_0({nodeId:a,dragItems:x.current,nodeInternals:S}),A=Ke(G,2),Y=A[0],B=A[1];z(_.sourceEvent,Y,B)}}).on("drag",function(_){var E=v.getState(),S=E.updateNodePositions,I=E.snapToGrid,N=E.snapGrid,T=E.nodeInternals,k=E.nodeExtent,z=E.onNodeDrag,L=E.onSelectionDrag,K=b(_);if((g.current.x!==K.x||g.current.y!==K.y)&&x.current){g.current=K,x.current=x.current.map(function(U){return Jie(U,K,I,N,T,k)});var G=a?z:S0(L);if(S(x.current,!0,!0),p(!0),G){var A=_0({nodeId:a,dragItems:x.current,nodeInternals:T}),Y=Ke(A,2),B=Y[0],X=Y[1];G(_.sourceEvent,B,X)}}_.on("end",function(U){if(p(!1),x.current){var re=v.getState(),j=re.updateNodePositions,W=re.nodeInternals,Z=re.onNodeDragStop,J=re.onSelectionDragStop,M=a?Z:S0(J);if(j(x.current,!1,!1),M){var H=_0({nodeId:a,dragItems:x.current,nodeInternals:W}),q=Ke(H,2),D=q[0],V=q[1];M(U.sourceEvent,D,V)}}})}).filter(function(_){var E=_.target,S=!_.button&&(!i||!fP(E,".".concat(i),t))&&(!o||fP(E,o,t));return S});return w.call(y),function(){w.on(".drag",null)}}}},[t,n,i,o,s,v,a,c,b]),h}function hP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var eoe=function(t){return Qie({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},j_(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},toe=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return j_(r)};function roe(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Rr(),i=zt(eoe,Wr),o=i.transformString,a=i.userSelectionActive,s=zt(toe,Wr),c=s.width,u=s.height,d=s.x,h=s.y,p=C.useRef(null);if(kq({nodeRef:p}),a||!c||!u)return null;var v=t?function(x){var g=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(x,g)}:void 0;return C.createElement("div",{className:an(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},C.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:c,height:u,top:h,left:d}}))}var noe=C.memo(roe),ioe=function(t){return t.nodesSelectionActive},Mq=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,s=t.onMove,c=t.onMoveStart,u=t.onMoveEnd,d=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,x=t.zoomOnScroll,g=t.zoomOnPinch,b=t.panOnScroll,w=t.panOnScrollSpeed,y=t.panOnScrollMode,_=t.zoomOnDoubleClick,E=t.panOnDrag,S=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,k=t.defaultPosition,z=t.preventScrolling,L=t.onSelectionContextMenu,K=t.noWheelClassName,G=t.noPanClassName,A=Rr(),Y=zt(ioe),B=td(d);Vie({deleteKeyCode:a,multiSelectionKeyCode:h});var X=function(W){n==null||n(W),A.getState().resetSelectedElements(),A.setState({nodesSelectionActive:!1})},U=i?function(j){return i(j)}:void 0,re=o?function(j){return o(j)}:void 0;return C.createElement(Kie,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:B,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:g,panOnScroll:b,panOnScrollSpeed:w,panOnScrollMode:y,zoomOnDoubleClick:_,panOnDrag:E,translateExtent:S,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:k,zoomActivationKeyCode:p,preventScrolling:z,noWheelClassName:K,noPanClassName:G},r,C.createElement(Xie,{selectionKeyPressed:B}),Y&&C.createElement(noe,{onSelectionContextMenu:L,noPanClassName:G}),C.createElement("div",{className:"react-flow__pane react-flow__container",onClick:X,onContextMenu:U,onWheel:re}))};Mq.displayName="FlowRenderer";var ooe=C.memo(Mq);function aoe(e){var t=zt(C.useCallback(function(r){return e?fq(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var soe=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},Aq=function(t){var r=zt(soe,Wr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=aoe(t.onlyRenderVisibleElements),c=C.useRef(),u=C.useMemo(function(){if(typeof ResizeObserver>"u")return null;var d=new ResizeObserver(function(h){var p=h.map(function(v){return{id:v.target.getAttribute("data-id"),nodeElement:v.target,forceUpdate:!0}});a(p)});return c.current=d,d},[]);return C.useEffect(function(){return function(){var d;c==null||(d=c.current)===null||d===void 0||d.disconnect()}},[]),C.createElement("div",{className:"react-flow__nodes react-flow__container"},s.map(function(d){var h,p,v,x,g,b,w,y=d.type||"default";t.nodeTypes[y]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(y,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),y="default");var _=t.nodeTypes[y]||t.nodeTypes.default,E=!!(d.draggable||n&&typeof d.draggable>"u"),S=!!(d.selectable||o&&typeof d.selectable>"u"),I=!!(d.connectable||i&&typeof d.connectable>"u");return C.createElement(_,{key:d.id,id:d.id,className:d.className,style:d.style,type:y,data:d.data,sourcePosition:d.sourcePosition||Ee.Bottom,targetPosition:d.targetPosition||Ee.Top,hidden:d.hidden,xPos:(h=(p=d.positionAbsolute)===null||p===void 0?void 0:p.x)!==null&&h!==void 0?h:0,yPos:(v=(x=d.positionAbsolute)===null||x===void 0?void 0:x.y)!==null&&v!==void 0?v:0,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!d.selected,isDraggable:E,isSelectable:S,isConnectable:I,resizeObserver:u,dragHandle:d.dragHandle,zIndex:(g=(b=d[fr])===null||b===void 0?void 0:b.z)!==null&&g!==void 0?g:0,isParent:!!((w=d[fr])!==null&&w!==void 0&&w.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};Aq.displayName="NodeRenderer";var loe=C.memo(Aq),aa;function pP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var coe=(aa={},tt(aa,Ee.Left,Ee.Right),tt(aa,Ee.Right,Ee.Left),tt(aa,Ee.Top,Ee.Bottom),tt(aa,Ee.Bottom,Ee.Top),aa),uoe=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?Ki.Bezier:u,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=zt(C.useCallback(function(re){return{fromNode:re.nodeInternals.get(a),handleId:re.connectionHandleId,toX:(re.connectionPosition.x-re.transform[0])/re.transform[2],toY:(re.connectionPosition.y-re.transform[1])/re.transform[2]}},[a]),Wr),x=v.fromNode,g=v.handleId,b=v.toX,w=v.toY,y=x==null||(t=x[fr])===null||t===void 0?void 0:t.handleBounds;if(!x||!h||!(y!=null&&y[s]))return null;var _=y[s],E=g?_.find(function(re){return re.id===g}):_[0],S=E?E.x+E.width/2:((r=x==null?void 0:x.width)!==null&&r!==void 0?r:0)/2,I=E?E.y+E.height/2:(n=x==null?void 0:x.height)!==null&&n!==void 0?n:0,N=((x==null||(i=x.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+S,T=((x==null||(o=x.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+I,k=E==null?void 0:E.position;if(!k)return null;var z=coe[k],L,K,G,A,Y,B;switch(s){case"source":L=N,K=T,G=k,A=b,Y=w,B=z;break;case"target":L=b,K=w,G=z,A=N,Y=T,B=k;break}if(p)return C.createElement("g",{className:"react-flow__connection"},C.createElement(p,{connectionLineType:d,connectionLineStyle:c,fromNode:x,fromHandle:E,fromX:N,fromY:T,toX:b,toY:w,fromPosition:k,toPosition:z,sourcePosition:G,targetPosition:B,sourceNode:x,sourceHandle:E,targetX:A,targetY:Y,sourceX:L,sourceY:K}));var X="",U={sourceX:L,sourceY:K,sourcePosition:G,targetX:A,targetY:Y,targetPosition:B};return d===Ki.Bezier?X=Fd(U):d===Ki.Step?X=zw(vP(vP({},U),{},{borderRadius:0})):d===Ki.SmoothStep?X=zw(U):d===Ki.SimpleBezier?X=yq(U):X="M".concat(L,",").concat(K," ").concat(A,",").concat(Y),C.createElement("g",{className:"react-flow__connection"},C.createElement("path",{d:X,className:"react-flow__connection-path",style:c}))});function Hw(e){"@babel/helpers - typeof";return Hw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hw(e)}var Zc,doe=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},foe=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return C.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},gP=(Zc={},tt(Zc,Xu.Arrow,doe),tt(Zc,Xu.ArrowClosed,foe),Zc);function hoe(e){var t=C.useMemo(function(){var r=gP.hasOwnProperty(e);return r?gP[e]:(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Marker type "'.concat(e,`" doesn't exist. Help: https://reactflow.dev/error#900`)),function(){return null})},[e]);return t}function mP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function poe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var voe=function(t){var r=t.id,n=t.type,i=t.color,o=t.width,a=o===void 0?12.5:o,s=t.height,c=s===void 0?12.5:s,u=t.markerUnits,d=u===void 0?"strokeWidth":u,h=t.strokeWidth,p=t.orient,v=p===void 0?"auto":p,x=hoe(n);return C.createElement("marker",{className:"react-flow__arrowhead",id:r,markerWidth:"".concat(a),markerHeight:"".concat(c),viewBox:"-10 -10 20 20",markerUnits:d,orient:v,refX:"0",refY:"0"},C.createElement(x,{color:i,strokeWidth:h}))},goe=function(t){var r=t.defaultColor,n=t.rfId;return function(i){var o=[];return i.edges.reduce(function(a,s){return[s.markerStart,s.markerEnd].forEach(function(c){if(c&&Hw(c)==="object"){var u=qw(c,n);o.includes(u)||(a.push(poe({id:u,color:c.color||r},c)),o.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},Dq=function(t){var r=t.defaultColor,n=t.rfId,i=zt(C.useCallback(goe({defaultColor:r,rfId:n}),[r,n]),function(o,a){return!(o.length!==a.length||o.some(function(s,c){return s.id!==a[c].id}))});return C.createElement("defs",null,i.map(function(o){return C.createElement(voe,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})}))};Dq.displayName="MarkerDefinitions";var moe=C.memo(Dq),boe=[{level:0,isMaxLevel:!0,edges:[]}];function yoe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,s){var c=aq(s.zIndex),u=c?s.zIndex:0;if(r){var d,h,p,v;u=c?s.zIndex:Math.max(((d=t.get(s.source))===null||d===void 0||(h=d[fr])===null||h===void 0?void 0:h.z)||0,((p=t.get(s.target))===null||p===void 0||(v=p[fr])===null||v===void 0?void 0:v.z)||0)}return a[u]?a[u].push(s):a[u]=[s],n=u>n?u:n,a},{}),o=Object.entries(i).map(function(a){var s=Ke(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return o.length===0?boe:o}function xoe(e,t,r){var n=zt(C.useCallback(function(i){return e?i.edges.filter(function(o){var a=t.get(o.source),s=t.get(o.target);return(a==null?void 0:a.width)&&(a==null?void 0:a.height)&&(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&Fie({sourcePos:a.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:a.width,sourceHeight:a.height,targetWidth:s.width,targetHeight:s.height,width:i.width,height:i.height,transform:i.transform})}):i.edges},[e,t]));return yoe(n,t,r)}var woe=function(t){return{connectionNodeId:t.connectionNodeId,connectionHandleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals}},jq=function(t){var r=zt(woe,Wr),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,s=r.width,c=r.height,u=r.connectionMode,d=r.nodeInternals,h=xoe(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,x=t.connectionLineStyle,g=t.connectionLineComponent,b=t.connectionLineContainerStyle,w=n&&i;return C.createElement(C.Fragment,null,h.map(function(y){var _=y.level,E=y.edges,S=y.isMaxLevel;return C.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},S&&C.createElement(moe,{defaultColor:v,rfId:t.rfId}),C.createElement("g",null,E.map(function(I){var N=rP(d,I.source),T=Ke(N,3),k=T[0],z=T[1],L=T[2],K=rP(d,I.target),G=Ke(K,3),A=G[0],Y=G[1],B=G[2];if(!L||!B)return null;var X=I.type||"default";t.edgeTypes[X]||(console.warn('[React Flow]: Edge type "'.concat(X,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),X="default");var U=t.edgeTypes[X]||t.edgeTypes.default,re=u===Na.Strict?Y.target:Y.target||Y.source,j=tP(z.source,I.sourceHandle||null),W=tP(re,I.targetHandle||null),Z=(j==null?void 0:j.position)||Ee.Bottom,J=(W==null?void 0:W.position)||Ee.Top;if(!j)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for source handle id: ".concat(I.sourceHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;if(!W)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(I.targetHandle,"; edge id: ").concat(I.id,". Help: https://reactflow.dev/error#800")),null;var M=Bie(k,j,Z,A,W,J),H=M.sourceX,q=M.sourceY,D=M.targetX,V=M.targetY;return C.createElement(U,{key:I.id,id:I.id,className:an([I.className,t.noPanClassName]),type:X,data:I.data,selected:!!I.selected,animated:!!I.animated,hidden:!!I.hidden,label:I.label,labelStyle:I.labelStyle,labelShowBg:I.labelShowBg,labelBgStyle:I.labelBgStyle,labelBgPadding:I.labelBgPadding,labelBgBorderRadius:I.labelBgBorderRadius,style:I.style,source:I.source,target:I.target,sourceHandleId:I.sourceHandle,targetHandleId:I.targetHandle,markerEnd:I.markerEnd,markerStart:I.markerStart,sourceX:H,sourceY:q,targetX:D,targetY:V,sourcePosition:Z,targetPosition:J,elementsSelectable:a,onEdgeUpdate:t.onEdgeUpdate,onContextMenu:t.onEdgeContextMenu,onMouseEnter:t.onEdgeMouseEnter,onMouseMove:t.onEdgeMouseMove,onMouseLeave:t.onEdgeMouseLeave,onClick:t.onEdgeClick,edgeUpdaterRadius:t.edgeUpdaterRadius,onEdgeDoubleClick:t.onEdgeDoubleClick,onEdgeUpdateStart:t.onEdgeUpdateStart,onEdgeUpdateEnd:t.onEdgeUpdateEnd,rfId:t.rfId})})))}),w&&C.createElement("svg",{style:b,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},C.createElement(uoe,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:x,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:g})))};jq.displayName="EdgeRenderer";var _oe=C.memo(jq),Soe=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function Eoe(e){var t=e.children,r=zt(Soe);return C.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Ooe(e){var t=mq(),r=C.useRef(!1);C.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var qq=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,s=t.onInit,c=t.onNodeClick,u=t.onEdgeClick,d=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,x=t.onNodeMouseLeave,g=t.onNodeContextMenu,b=t.onSelectionContextMenu,w=t.connectionLineType,y=t.connectionLineStyle,_=t.connectionLineComponent,E=t.connectionLineContainerStyle,S=t.selectionKeyCode,I=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,T=t.deleteKeyCode,k=t.onlyRenderVisibleElements,z=t.elementsSelectable,L=t.selectNodesOnDrag,K=t.translateExtent,G=t.minZoom,A=t.maxZoom,Y=t.defaultZoom,B=t.defaultPosition,X=t.preventScrolling,U=t.defaultMarkerColor,re=t.zoomOnScroll,j=t.zoomOnPinch,W=t.panOnScroll,Z=t.panOnScrollSpeed,J=t.panOnScrollMode,M=t.zoomOnDoubleClick,H=t.panOnDrag,q=t.onPaneClick,D=t.onPaneScroll,V=t.onPaneContextMenu,Q=t.onEdgeUpdate,ne=t.onEdgeContextMenu,ce=t.onEdgeMouseEnter,ee=t.onEdgeMouseMove,pe=t.onEdgeMouseLeave,ue=t.edgeUpdaterRadius,xe=t.onEdgeUpdateStart,le=t.onEdgeUpdateEnd,ie=t.noDragClassName,me=t.noWheelClassName,_e=t.noPanClassName,Ce=t.elevateEdgesOnSelect,je=t.id;return Ooe(s),C.createElement(ooe,{onPaneClick:q,onPaneContextMenu:V,onPaneScroll:D,deleteKeyCode:T,selectionKeyCode:S,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:z,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:re,zoomOnPinch:j,zoomOnDoubleClick:M,panOnScroll:W,panOnScrollSpeed:Z,panOnScrollMode:J,panOnDrag:H,translateExtent:K,minZoom:G,maxZoom:A,defaultZoom:Y,defaultPosition:B,onSelectionContextMenu:b,preventScrolling:X,noDragClassName:ie,noWheelClassName:me,noPanClassName:_e},C.createElement(Eoe,null,C.createElement(_oe,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:h,connectionLineType:w,connectionLineStyle:y,connectionLineComponent:_,connectionLineContainerStyle:E,onEdgeUpdate:Q,onlyRenderVisibleElements:k,onEdgeContextMenu:ne,onEdgeMouseEnter:ce,onEdgeMouseMove:ee,onEdgeMouseLeave:pe,onEdgeUpdateStart:xe,onEdgeUpdateEnd:le,edgeUpdaterRadius:ue,defaultMarkerColor:U,noPanClassName:_e,elevateEdgesOnSelect:!!Ce,rfId:je}),C.createElement(loe,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:g,selectNodesOnDrag:L,onlyRenderVisibleElements:k,noPanClassName:_e,noDragClassName:ie})))};qq.displayName="GraphView";var Coe=C.memo(qq),Lq=function(){return null};Lq.displayName="GroupNode";function bP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ws=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,s=n.xPos,c=n.yPos,u=n.selected,d=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,x=n.onContextMenu,g=n.onDoubleClick,b=n.style,w=n.className,y=n.isDraggable,_=n.isSelectable,E=n.isConnectable,S=n.selectNodesOnDrag,I=n.sourcePosition,N=n.targetPosition,T=n.hidden,k=n.resizeObserver,z=n.dragHandle,L=n.zIndex,K=n.isParent,G=n.noPanClassName,A=n.noDragClassName,Y=n.initialized,B=Rr(),X=C.useRef(null),U=C.useRef(I),re=C.useRef(N),j=C.useRef(o),W=_||y||d||h||p||v,Z=ys(i,B.getState,h),J=ys(i,B.getState,p),M=ys(i,B.getState,v),H=ys(i,B.getState,x),q=ys(i,B.getState,g),D=function(ne){if(_&&(!S||!y)&&uq({id:i,store:B}),d){var ce=B.getState().nodeInternals.get(i);d(ne,yP({},ce))}};C.useEffect(function(){if(X.current&&!T){var Q=X.current;return k==null||k.observe(Q),function(){return k==null?void 0:k.unobserve(Q)}}},[T]),C.useEffect(function(){var Q=j.current!==o,ne=U.current!==I,ce=re.current!==N;X.current&&(Q||ne||ce)&&(Q&&(j.current=o),ne&&(U.current=I),ce&&(re.current=N),B.getState().updateNodeDimensions([{id:i,nodeElement:X.current,forceUpdate:!0}]))},[i,o,I,N]);var V=kq({nodeRef:X,disabled:T||!y,noDragClassName:A,handleSelector:z,nodeId:i,isSelectable:_,selectNodesOnDrag:S});return T?null:C.createElement("div",{className:an(["react-flow__node","react-flow__node-".concat(o),G,w,{selected:u,selectable:_,parent:K}]),ref:X,style:yP({zIndex:L,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:W?"all":"none",visibility:Y?"visible":"hidden"},b),onMouseEnter:Z,onMouseMove:J,onMouseLeave:M,onContextMenu:H,onClick:D,onDoubleClick:q,"data-testid":"rf__node-".concat(i),"data-id":i},C.createElement(Sie,{value:i},C.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:u,isConnectable:E,sourcePosition:I,targetPosition:N,dragging:V,dragHandle:z,zIndex:L})))};return t.displayName="NodeWrapper",C.memo(t)});function xP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ioe(e){var t={input:ws(e.input||Rq),default:ws(e.default||$w),output:ws(e.output||Tq),group:ws(e.group||Lq)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ws(e[o]||$w),i},r);return wP(wP({},t),n)}function _P(e,t){var r=C.useRef(null),n=C.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Wr(r.current,i)&&console.warn("[React Flow]: It looks like you have created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them. Help: https://reactflow.dev/error#200"),r.current=i}return t(e)},[e]);return n}function SP(e){if(!(!e||typeof document>"u")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");t.appendChild(r),r.appendChild(document.createTextNode(e))}}var zq=function(t){var r=t.children,n=!0;try{Rr()}catch{n=!1}return n?C.createElement(C.Fragment,null,r):C.createElement(Wne,{createStore:Une},r)};zq.displayName="ReactFlowWrapper";var Roe=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectStop","onConnectEnd","onClickConnectStart","onClickConnectStop","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","elementsSelectable","minZoom","maxZoom","defaultZoom","defaultPosition","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateEdgesOnSelect"];function EP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EP(Object(r),!0).forEach(function(n){tt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}SP(Aie),SP(jie);var Noe={input:Rq,default:$w,output:Tq},Toe={default:Bw,straight:Sq,step:_q,smoothstep:L_,simplebezier:xq},Poe=[15,15],koe=[0,0],Bq=C.forwardRef(function(e,t){var r=e.nodes,n=e.edges,i=e.defaultNodes,o=e.defaultEdges,a=e.className,s=e.nodeTypes,c=s===void 0?Noe:s,u=e.edgeTypes,d=u===void 0?Toe:u,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,x=e.onMove,g=e.onMoveStart,b=e.onMoveEnd,w=e.onConnect,y=e.onConnectStart,_=e.onConnectStop,E=e.onConnectEnd,S=e.onClickConnectStart,I=e.onClickConnectStop,N=e.onClickConnectEnd,T=e.onNodeMouseEnter,k=e.onNodeMouseMove,z=e.onNodeMouseLeave,L=e.onNodeContextMenu,K=e.onNodeDoubleClick,G=e.onNodeDragStart,A=e.onNodeDrag,Y=e.onNodeDragStop,B=e.onNodesDelete,X=e.onEdgesDelete,U=e.onSelectionChange,re=e.onSelectionDragStart,j=e.onSelectionDrag,W=e.onSelectionDragStop,Z=e.onSelectionContextMenu,J=e.connectionMode,M=J===void 0?Na.Strict:J,H=e.connectionLineType,q=H===void 0?Ki.Bezier:H,D=e.connectionLineStyle,V=e.connectionLineComponent,Q=e.connectionLineContainerStyle,ne=e.deleteKeyCode,ce=ne===void 0?"Backspace":ne,ee=e.selectionKeyCode,pe=ee===void 0?"Shift":ee,ue=e.multiSelectionKeyCode,xe=ue===void 0?"Meta":ue,le=e.zoomActivationKeyCode,ie=le===void 0?"Meta":le,me=e.snapToGrid,_e=me===void 0?!1:me,Ce=e.snapGrid,je=Ce===void 0?Poe:Ce,Pe=e.onlyRenderVisibleElements,Te=Pe===void 0?!1:Pe,Be=e.selectNodesOnDrag,rt=Be===void 0?!0:Be,$e=e.nodesDraggable,Ye=e.nodesConnectable,qe=e.elementsSelectable,Xe=e.minZoom,Ue=Xe===void 0?.5:Xe,sr=e.maxZoom,Ut=sr===void 0?2:sr,nt=e.defaultZoom,Ct=nt===void 0?1:nt,yr=e.defaultPosition,sn=yr===void 0?koe:yr,Tr=e.translateExtent,pr=Tr===void 0?Lw:Tr,Rn=e.preventScrolling,Ii=Rn===void 0?!0:Rn,At=e.nodeExtent,Tt=e.defaultMarkerColor,St=Tt===void 0?"#b1b1b7":Tt,lr=e.zoomOnScroll,tr=lr===void 0?!0:lr,Dt=e.zoomOnPinch,rr=Dt===void 0?!0:Dt,xr=e.panOnScroll,It=xr===void 0?!1:xr,Bt=e.panOnScrollSpeed,wr=Bt===void 0?.5:Bt,Ft=e.panOnScrollMode,Pr=Ft===void 0?ma.Free:Ft,jt=e.zoomOnDoubleClick,kr=jt===void 0?!0:jt,Wn=e.panOnDrag,Va=Wn===void 0?!0:Wn,et=e.onPaneClick,Pt=e.onPaneScroll,qo=e.onPaneContextMenu,$t=e.children,Gt=e.onEdgeUpdate,Nn=e.onEdgeContextMenu,cr=e.onEdgeDoubleClick,ln=e.onEdgeMouseEnter,cn=e.onEdgeMouseMove,un=e.onEdgeMouseLeave,Un=e.onEdgeUpdateStart,Ri=e.onEdgeUpdateEnd,li=e.edgeUpdaterRadius,Wa=li===void 0?10:li,Lo=e.onNodesChange,of=e.onEdgesChange,Dl=e.noDragClassName,af=Dl===void 0?"nodrag":Dl,Ua=e.noWheelClassName,jl=Ua===void 0?"nowheel":Ua,Ga=e.noPanClassName,sf=Ga===void 0?"nopan":Ga,ql=e.fitView,lf=ql===void 0?!1:ql,cf=e.fitViewOptions,Ka=e.connectOnClick,Ll=Ka===void 0?!0:Ka,zl=e.attributionPosition,Ya=e.proOptions,uf=e.defaultEdgeOptions,Xa=e.elevateEdgesOnSelect,zo=Xa===void 0?!1:Xa,no=zd(e,Roe),df=_P(c,Ioe),Bl=_P(d,zie);return C.createElement("div",OP(OP({},no),{},{ref:t,className:an(["react-flow",a])}),C.createElement(zq,null,C.createElement(Coe,{onInit:v,onMove:x,onMoveStart:g,onMoveEnd:b,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:T,onNodeMouseMove:k,onNodeMouseLeave:z,onNodeContextMenu:L,onNodeDoubleClick:K,nodeTypes:df,edgeTypes:Bl,connectionLineType:q,connectionLineStyle:D,connectionLineComponent:V,connectionLineContainerStyle:Q,selectionKeyCode:pe,deleteKeyCode:ce,multiSelectionKeyCode:xe,zoomActivationKeyCode:ie,onlyRenderVisibleElements:Te,selectNodesOnDrag:rt,translateExtent:pr,minZoom:Ue,maxZoom:Ut,defaultZoom:Ct,defaultPosition:sn,preventScrolling:Ii,zoomOnScroll:tr,zoomOnPinch:rr,zoomOnDoubleClick:kr,panOnScroll:It,panOnScrollSpeed:wr,panOnScrollMode:Pr,panOnDrag:Va,onPaneClick:et,onPaneScroll:Pt,onPaneContextMenu:qo,onSelectionContextMenu:Z,onEdgeUpdate:Gt,onEdgeContextMenu:Nn,onEdgeDoubleClick:cr,onEdgeMouseEnter:ln,onEdgeMouseMove:cn,onEdgeMouseLeave:un,onEdgeUpdateStart:Un,onEdgeUpdateEnd:Ri,edgeUpdaterRadius:Wa,defaultMarkerColor:St,noDragClassName:af,noWheelClassName:jl,noPanClassName:sf,elevateEdgesOnSelect:zo,id:no==null?void 0:no.id}),C.createElement(kie,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:y,onConnectStop:_,onConnectEnd:E,onClickConnectStart:S,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:$e,nodesConnectable:Ye,elementsSelectable:qe,minZoom:Ue,maxZoom:Ut,nodeExtent:At,onNodesChange:Lo,onEdgesChange:of,snapToGrid:_e,snapGrid:je,connectionMode:M,translateExtent:pr,connectOnClick:Ll,defaultEdgeOptions:uf,fitView:lf,fitViewOptions:cf,onNodesDelete:B,onEdgesDelete:X,onNodeDragStart:G,onNodeDrag:A,onNodeDragStop:Y,onSelectionDrag:j,onSelectionDragStart:re,onSelectionDragStop:W}),U&&C.createElement(Tie,{onSelectionChange:U}),$t,C.createElement(vie,{proOptions:Ya,position:zl})))});Bq.displayName="ReactFlow";function Fq(e){return function(t){var r=C.useState(t),n=Ke(r,2),i=n[0],o=n[1],a=C.useCallback(function(s){return o(function(c){return e(s,c)})},[]);return[i,o,a]}}var Moe=Fq(lq),Aoe=Fq(Lne);function CP(e,t){const{width:r,height:n,positionAbsolute:i}=e,o=t.positionAbsolute,a=r/2,s=n/2,c=i.x+a,u=i.y+s,d=o.x+a,h=o.y+s,p=(d-c)/(2*a)-(h-u)/(2*s),v=(d-c)/(2*a)+(h-u)/(2*s),x=1/(Math.abs(p)+Math.abs(v)),g=x*p,b=x*v,w=a*(g+b)+c,y=s*(-g+b)+u;return{x:w,y}}function IP(e,t){const r={...e.positionAbsolute,...e},n=Math.round(r.x),i=Math.round(r.y),o=Math.round(t.x),a=Math.round(t.y);return o<=n+1?Ee.Left:o>=n+r.width-1?Ee.Right:a<=i+1?Ee.Top:a>=r.y+r.height-1?Ee.Bottom:Ee.Top}function $q(e,t){const r=CP(e,t),n=CP(t,e),i=IP(e,r),o=IP(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const Doe=({targetX:e,targetY:t,sourcePosition:r,targetPosition:n,sourceNode:i})=>{if(!i)return null;const o={id:"connection-target",width:1,height:1,position:{x:e,y:t}},{sx:a,sy:s}=$q(i,o),c=Fd({sourceX:a,sourceY:s,sourcePosition:r,targetPosition:n,targetX:e,targetY:t});return O.jsxs("g",{children:[O.jsx("path",{fill:"none",stroke:"#222",strokeWidth:1.5,className:"animated",d:c}),O.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},joe=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=zt(C.useCallback(x=>x.nodeInternals.get(t),[t])),a=zt(C.useCallback(x=>x.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:s,sy:c,tx:u,ty:d,sourcePos:h,targetPos:p}=$q(o,a),v=Fd({sourceX:s,sourceY:c,sourcePosition:h,targetPosition:p,targetX:u,targetY:d});return O.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:i})},RP=172,NP=36,qoe={custom:joe},Loe=(e,t,r="LR")=>{const n=new h5.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:RP,height:NP})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),h5.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?Ee.Left:Ee.Top,o.sourcePosition=i?Ee.Right:Ee.Bottom,o.position={x:a.x-RP/2,y:a.y-NP/2},o}),{nodes:e,edges:t}},zoe=()=>{},Boe=({data:e,dict:t,onSelect:r=zoe})=>{const{nodes:n,edges:i}=Loe(Object.values(t).filter(h=>h.id===e.selected||e.parents.flat().includes(h.id)||e.children.flat().includes(h.id)).map(h=>({id:h.id,type:h.parents.length===0?"input":h.includes.length===0?"output":"default",sourcePosition:Ee.Right,targetPosition:Ee.Left,data:{label:h.privilege},position:{x:0,y:0},className:h.id===e.selected?"highlighted":"",selected:h.id===e.selected})),e.links.map(({source:h,target:p})=>({id:`e${h}-${p}`,source:h,target:p}))),[o,a,s]=Moe(n),[c,u,d]=Aoe(i);return C.useEffect(()=>{a([...n]),u([...i])},[e]),O.jsx(Bq,{nodes:o,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:qoe,connectionLineComponent:Doe,children:O.jsx(hie,{variant:No.Dots,color:"#81818140",gap:18,size:1})})};var Hq=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(Hq||{});const Vq=e=>{switch(e){case"entityCollection":return fe.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return fe.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return fe.ESubPermissionType.DS_METHOD;case"entity":return fe.ESubPermissionType.ENTITY_METHOD;default:return fe.EPermissionType.METHOD}},TP=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[Hq[r]])==null||i.forEach(a=>{if(`${o.name.toLowerCase()}.${a.name.toLowerCase()}`.includes(t)||!t){const c={applyTo:`${o.name}.${a.name}`,type:r};r===fe.EPermissionType.METHOD&&(c.subType=Vq(a.applyTo)),n.push(c)}});return n},Foe=(e=[],t)=>{var n;const r=[];for(const i of e)(n=i.methods)==null||n.forEach(o=>{(`${i.name.toLowerCase()}.${o.name.toLowerCase()}`.includes(t)||!t)&&r.push({applyTo:`${i.name}.${o.name}`,type:fe.EPermissionType.SINGLETON_METHOD})});return r};function B_(e,t=[],r=[],n=[]){const i=TP(r,e,fe.EPermissionType.ATTRIBUTE),o=TP(r,e,fe.EPermissionType.METHOD),a=Foe(n,e),s=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:fe.ESubPermissionType.DS_METHOD})),c=[],u=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{c.push({applyTo:h.name,type:fe.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{u.push({applyTo:h.name,type:fe.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:fe.EPermissionType.DATASTORE}].filter(h=>!e||`ds.${h.applyTo.toLowerCase()}`.includes(e)),...s,...c,...i,...o,...u,...a].reduce((h,p)=>{const v=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],[x,g]=p.applyTo.split("."),b=h.find(w=>w.prefix===x);return b?(b.resources=[...b.resources,p].sort((w,y)=>{const _=v.indexOf(w.type),E=v.indexOf(y.type);return _>E?1:-1}),b.type=g?b.type:p.type,[...h].sort((w,y)=>{const _=v.indexOf(w.type),E=v.indexOf(y.type);return _>E?1:-1})):[...h,{prefix:x,type:g?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const $oe=(e=[],t=[],r=[])=>{const n=B_("",e,t,r),i={ds:{applyTo:"ds",type:fe.EPermissionType.DATASTORE,methods:[],dataClasses:[],singletons:[]}},o=(s,c)=>s.applyTo.localeCompare(c.applyTo);n.forEach(s=>{const[c,u]=s.applyTo.split(".");if(u||(s.type===fe.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:fe.EPermissionType.DATACLASS,methods:[],attributes:[]}):s.type===fe.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:fe.EPermissionType.SINGLETON,methods:[],attributes:[]})),u){const d=(h,p,v)=>{h.forEach(x=>{x.applyTo===c&&x[p].push(v)})};[fe.ESubPermissionType.DS_METHOD,fe.ESubPermissionType.DATACLASS_METHOD,fe.ESubPermissionType.ENTITY_METHOD,fe.ESubPermissionType.ENTITY_SEL_METHOD].includes(s.type)?c==="ds"?i.ds.methods.push(s):d(i.ds.dataClasses,"methods",s):s.type===fe.EPermissionType.ATTRIBUTE?(d(i.ds.dataClasses,"attributes",s),d(i.ds.singletons,"attributes",s)):s.type===fe.EPermissionType.SINGLETON_METHOD&&d(i.ds.singletons,"methods",s)}});const a=s=>{s.forEach(c=>{c.methods&&c.methods.sort(o),c.attributes&&c.attributes.sort(o)})};return i.ds.methods.sort(o),i.ds.dataClasses.sort(o),i.ds.singletons.sort(o),a(i.ds.dataClasses),a(i.ds.singletons),i},Wq=(e,t=[])=>{const r={};return Object.entries(e).forEach(([n,i])=>{r[n]={...i,resources:i.resources.map(o=>{var a,s,c;if(o.type===fe.EPermissionType.METHOD&&t.length){const[u,d]=o.resource.split("."),h=u==="ds"?"dataStore":((c=(s=(a=t.find(p=>p.name===u))==null?void 0:a.methods)==null?void 0:s.find(p=>p.name===d))==null?void 0:c.applyTo)||"dataClass";return{...o,type:o.type,subType:Vq(h)}}return o})}}),r},Uq=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var u,d,h,p,v,x,g,b;const[a,s]=o.resource.split(".");let c=!0;switch(o.type){case fe.EPermissionType.DATASTORE:c=!!t;break;case fe.EPermissionType.METHOD:a==="ds"?c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore"):c=!!((d=(u=t.dataClasses[a])==null?void 0:u.methods)!=null&&d.find(w=>w.name===s));break;case fe.ESubPermissionType.DS_METHOD:c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore");break;case fe.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case fe.EPermissionType.ATTRIBUTE:c=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(w=>w.name===s));break;case fe.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(w=>w.name===s&&w.applyTo==="entityCollection"));break;case fe.ESubPermissionType.DATACLASS_METHOD:c=!!((x=t.dataClasses[a])!=null&&x.methods.find(w=>w.name===s&&w.applyTo==="dataClass"));break;case fe.ESubPermissionType.ENTITY_METHOD:c=!!((g=t.dataClasses[a])!=null&&g.methods.find(w=>w.name===s&&w.applyTo==="entity"));break;case fe.EPermissionType.SINGLETON_METHOD:c=!!((b=t.singletons[a])!=null&&b.methods.find(w=>w.name===s));break;case fe.EPermissionType.SINGLETON:c=!!t.singletons[a];break;default:c=!0}return{...o,exists:c}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{});var E0={exports:{}};/*!
60
+ Copyright (c) 2018 Jed Watson.
61
+ Licensed under the MIT License (MIT), see
62
+ http://jedwatson.github.io/classnames
63
+ */var PP;function Hoe(){return PP||(PP=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)t.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(E0)),E0.exports}var Voe=Hoe();const rn=Qi(Voe);var Hs={exports:{}};/**
41
64
  * @license
42
65
  * Lodash <https://lodash.com/>
43
66
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
44
67
  * Released under MIT license <https://lodash.com/license>
45
68
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
46
69
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
47
- */var oZ=Ia.exports,EN;function aZ(){return EN||(EN=1,(function(e,t){(function(){var r,n="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,v=2,m=4,y=1,x=2,b=1,w=2,E=4,_=8,S=16,R=32,I=64,N=128,A=256,L=512,B=30,U="...",j=800,D=16,G=1,F=2,X=3,Z=1/0,Q=9007199254740991,W=17976931348623157e292,ee=NaN,oe=4294967295,ae=oe-1,H=oe>>>1,K=[["ary",N],["bind",b],["bindKey",w],["curry",_],["curryRight",S],["flip",L],["partial",R],["partialRight",I],["rearg",A]],$="[object Arguments]",k="[object Array]",z="[object AsyncFunction]",re="[object Boolean]",ie="[object Date]",se="[object DOMException]",ce="[object Error]",be="[object Function]",Ce="[object GeneratorFunction]",_e="[object Map]",he="[object Number]",fe="[object Null]",Ee="[object Object]",Pe="[object Promise]",Ze="[object Proxy]",ze="[object RegExp]",Fe="[object Set]",Ue="[object String]",ct="[object Symbol]",lt="[object Undefined]",mt="[object WeakMap]",yt="[object WeakSet]",rt="[object ArrayBuffer]",bt="[object DataView]",Jt="[object Float32Array]",fr="[object Float64Array]",Dt="[object Int8Array]",_t="[object Int16Array]",jt="[object Int32Array]",Vr="[object Uint8Array]",Yn="[object Uint8ClampedArray]",Cn="[object Uint16Array]",dr="[object Uint32Array]",Ti=/\b__p \+= '';/g,cl=/\b(__p \+=) '' \+/g,ll=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mo=/&(?:amp|lt|gt|quot|#39);/g,is=/[&<>"']/g,os=RegExp(Mo.source),fl=RegExp(is.source),as=/<%-([\s\S]+?)%>/g,dl=/<%([\s\S]+?)%>/g,Do=/<%=([\s\S]+?)%>/g,hl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ss=/^\w*$/,pl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ai=/[\\^$.*+?()[\]{}|]/g,vl=RegExp(Ai.source),Mi=/^\s+/,gl=/\s/,us=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ml=/\{\n\/\* \[wrapped with (.+)\] \*/,yl=/,? & /,bl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,cs=/[()=,{}\[\]\/\s]/,xl=/\\(\\)?/g,wl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ls=/\w*$/,_l=/^[-+]0x[0-9a-f]+$/i,El=/^0b[01]+$/i,Sl=/^\[object .+?Constructor\]$/,Ol=/^0o[0-7]+$/i,Cl=/^(?:0|[1-9]\d*)$/,Rl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xn=/($^)/,Il=/['\n\r\u2028\u2029\\]/g,Di="\\ud800-\\udfff",Pl="\\u0300-\\u036f",fs="\\ufe20-\\ufe2f",Nl="\\u20d0-\\u20ff",jo=Pl+fs+Nl,ds="\\u2700-\\u27bf",qo="a-z\\xdf-\\xf6\\xf8-\\xff",Tl="\\xac\\xb1\\xd7\\xf7",hs="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Al="\\u2000-\\u206f",Ml=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ko="A-Z\\xc0-\\xd6\\xd8-\\xde",ps="\\ufe0e\\ufe0f",vs=Tl+hs+Al+Ml,Lo="['’]",Dl="["+Di+"]",Bo="["+vs+"]",ji="["+jo+"]",Zn="\\d+",jl="["+ds+"]",gs="["+qo+"]",Ow="[^"+Di+vs+Zn+ds+qo+ko+"]",ql="\\ud83c[\\udffb-\\udfff]",rL="(?:"+ji+"|"+ql+")",Cw="[^"+Di+"]",kl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ll="[\\ud800-\\udbff][\\udc00-\\udfff]",qi="["+ko+"]",Rw="\\u200d",Iw="(?:"+gs+"|"+Ow+")",nL="(?:"+qi+"|"+Ow+")",Pw="(?:"+Lo+"(?:d|ll|m|re|s|t|ve))?",Nw="(?:"+Lo+"(?:D|LL|M|RE|S|T|VE))?",Tw=rL+"?",Aw="["+ps+"]?",iL="(?:"+Rw+"(?:"+[Cw,kl,Ll].join("|")+")"+Aw+Tw+")*",oL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",aL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Mw=Aw+Tw+iL,sL="(?:"+[jl,kl,Ll].join("|")+")"+Mw,uL="(?:"+[Cw+ji+"?",ji,kl,Ll,Dl].join("|")+")",cL=RegExp(Lo,"g"),lL=RegExp(ji,"g"),Bl=RegExp(ql+"(?="+ql+")|"+uL+Mw,"g"),fL=RegExp([qi+"?"+gs+"+"+Pw+"(?="+[Bo,qi,"$"].join("|")+")",nL+"+"+Nw+"(?="+[Bo,qi+Iw,"$"].join("|")+")",qi+"?"+Iw+"+"+Pw,qi+"+"+Nw,aL,oL,Zn,sL].join("|"),"g"),dL=RegExp("["+Rw+Di+jo+ps+"]"),hL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pL=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vL=-1,at={};at[Jt]=at[fr]=at[Dt]=at[_t]=at[jt]=at[Vr]=at[Yn]=at[Cn]=at[dr]=!0,at[$]=at[k]=at[rt]=at[re]=at[bt]=at[ie]=at[ce]=at[be]=at[_e]=at[he]=at[Ee]=at[ze]=at[Fe]=at[Ue]=at[mt]=!1;var nt={};nt[$]=nt[k]=nt[rt]=nt[bt]=nt[re]=nt[ie]=nt[Jt]=nt[fr]=nt[Dt]=nt[_t]=nt[jt]=nt[_e]=nt[he]=nt[Ee]=nt[ze]=nt[Fe]=nt[Ue]=nt[ct]=nt[Vr]=nt[Yn]=nt[Cn]=nt[dr]=!0,nt[ce]=nt[be]=nt[mt]=!1;var gL={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yL={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},bL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xL=parseFloat,wL=parseInt,Dw=typeof ht=="object"&&ht&&ht.Object===Object&&ht,_L=typeof self=="object"&&self&&self.Object===Object&&self,It=Dw||_L||Function("return this")(),Fl=t&&!t.nodeType&&t,Jn=Fl&&!0&&e&&!e.nodeType&&e,jw=Jn&&Jn.exports===Fl,$l=jw&&Dw.process,hr=(function(){try{var te=Jn&&Jn.require&&Jn.require("util").types;return te||$l&&$l.binding&&$l.binding("util")}catch{}})(),qw=hr&&hr.isArrayBuffer,kw=hr&&hr.isDate,Lw=hr&&hr.isMap,Bw=hr&&hr.isRegExp,Fw=hr&&hr.isSet,$w=hr&&hr.isTypedArray;function Qt(te,de,ue){switch(ue.length){case 0:return te.call(de);case 1:return te.call(de,ue[0]);case 2:return te.call(de,ue[0],ue[1]);case 3:return te.call(de,ue[0],ue[1],ue[2])}return te.apply(de,ue)}function EL(te,de,ue,Se){for(var Ae=-1,Ve=te==null?0:te.length;++Ae<Ve;){var Et=te[Ae];de(Se,Et,ue(Et),te)}return Se}function er(te,de){for(var ue=-1,Se=te==null?0:te.length;++ue<Se&&de(te[ue],ue,te)!==!1;);return te}function SL(te,de){for(var ue=te==null?0:te.length;ue--&&de(te[ue],ue,te)!==!1;);return te}function zw(te,de){for(var ue=-1,Se=te==null?0:te.length;++ue<Se;)if(!de(te[ue],ue,te))return!1;return!0}function Rn(te,de){for(var ue=-1,Se=te==null?0:te.length,Ae=0,Ve=[];++ue<Se;){var Et=te[ue];de(Et,ue,te)&&(Ve[Ae++]=Et)}return Ve}function ms(te,de){var ue=te==null?0:te.length;return!!ue&&ki(te,de,0)>-1}function zl(te,de,ue){for(var Se=-1,Ae=te==null?0:te.length;++Se<Ae;)if(ue(de,te[Se]))return!0;return!1}function st(te,de){for(var ue=-1,Se=te==null?0:te.length,Ae=Array(Se);++ue<Se;)Ae[ue]=de(te[ue],ue,te);return Ae}function In(te,de){for(var ue=-1,Se=de.length,Ae=te.length;++ue<Se;)te[Ae+ue]=de[ue];return te}function Hl(te,de,ue,Se){var Ae=-1,Ve=te==null?0:te.length;for(Se&&Ve&&(ue=te[++Ae]);++Ae<Ve;)ue=de(ue,te[Ae],Ae,te);return ue}function OL(te,de,ue,Se){var Ae=te==null?0:te.length;for(Se&&Ae&&(ue=te[--Ae]);Ae--;)ue=de(ue,te[Ae],Ae,te);return ue}function Ul(te,de){for(var ue=-1,Se=te==null?0:te.length;++ue<Se;)if(de(te[ue],ue,te))return!0;return!1}var CL=Vl("length");function RL(te){return te.split("")}function IL(te){return te.match(bl)||[]}function Hw(te,de,ue){var Se;return ue(te,function(Ae,Ve,Et){if(de(Ae,Ve,Et))return Se=Ve,!1}),Se}function ys(te,de,ue,Se){for(var Ae=te.length,Ve=ue+(Se?1:-1);Se?Ve--:++Ve<Ae;)if(de(te[Ve],Ve,te))return Ve;return-1}function ki(te,de,ue){return de===de?FL(te,de,ue):ys(te,Uw,ue)}function PL(te,de,ue,Se){for(var Ae=ue-1,Ve=te.length;++Ae<Ve;)if(Se(te[Ae],de))return Ae;return-1}function Uw(te){return te!==te}function Vw(te,de){var ue=te==null?0:te.length;return ue?Gl(te,de)/ue:ee}function Vl(te){return function(de){return de==null?r:de[te]}}function Wl(te){return function(de){return te==null?r:te[de]}}function Ww(te,de,ue,Se,Ae){return Ae(te,function(Ve,Et,et){ue=Se?(Se=!1,Ve):de(ue,Ve,Et,et)}),ue}function NL(te,de){var ue=te.length;for(te.sort(de);ue--;)te[ue]=te[ue].value;return te}function Gl(te,de){for(var ue,Se=-1,Ae=te.length;++Se<Ae;){var Ve=de(te[Se]);Ve!==r&&(ue=ue===r?Ve:ue+Ve)}return ue}function Kl(te,de){for(var ue=-1,Se=Array(te);++ue<te;)Se[ue]=de(ue);return Se}function TL(te,de){return st(de,function(ue){return[ue,te[ue]]})}function Gw(te){return te&&te.slice(0,Zw(te)+1).replace(Mi,"")}function tr(te){return function(de){return te(de)}}function Yl(te,de){return st(de,function(ue){return te[ue]})}function Fo(te,de){return te.has(de)}function Kw(te,de){for(var ue=-1,Se=te.length;++ue<Se&&ki(de,te[ue],0)>-1;);return ue}function Yw(te,de){for(var ue=te.length;ue--&&ki(de,te[ue],0)>-1;);return ue}function AL(te,de){for(var ue=te.length,Se=0;ue--;)te[ue]===de&&++Se;return Se}var ML=Wl(gL),DL=Wl(mL);function jL(te){return"\\"+bL[te]}function qL(te,de){return te==null?r:te[de]}function Li(te){return dL.test(te)}function kL(te){return hL.test(te)}function LL(te){for(var de,ue=[];!(de=te.next()).done;)ue.push(de.value);return ue}function Xl(te){var de=-1,ue=Array(te.size);return te.forEach(function(Se,Ae){ue[++de]=[Ae,Se]}),ue}function Xw(te,de){return function(ue){return te(de(ue))}}function Pn(te,de){for(var ue=-1,Se=te.length,Ae=0,Ve=[];++ue<Se;){var Et=te[ue];(Et===de||Et===h)&&(te[ue]=h,Ve[Ae++]=ue)}return Ve}function bs(te){var de=-1,ue=Array(te.size);return te.forEach(function(Se){ue[++de]=Se}),ue}function BL(te){var de=-1,ue=Array(te.size);return te.forEach(function(Se){ue[++de]=[Se,Se]}),ue}function FL(te,de,ue){for(var Se=ue-1,Ae=te.length;++Se<Ae;)if(te[Se]===de)return Se;return-1}function $L(te,de,ue){for(var Se=ue+1;Se--;)if(te[Se]===de)return Se;return Se}function Bi(te){return Li(te)?HL(te):CL(te)}function Tr(te){return Li(te)?UL(te):RL(te)}function Zw(te){for(var de=te.length;de--&&gl.test(te.charAt(de)););return de}var zL=Wl(yL);function HL(te){for(var de=Bl.lastIndex=0;Bl.test(te);)++de;return de}function UL(te){return te.match(Bl)||[]}function VL(te){return te.match(fL)||[]}var WL=(function te(de){de=de==null?It:Fi.defaults(It.Object(),de,Fi.pick(It,pL));var ue=de.Array,Se=de.Date,Ae=de.Error,Ve=de.Function,Et=de.Math,et=de.Object,Zl=de.RegExp,GL=de.String,pr=de.TypeError,xs=ue.prototype,KL=Ve.prototype,$i=et.prototype,ws=de["__core-js_shared__"],_s=KL.toString,Ge=$i.hasOwnProperty,YL=0,Jw=(function(){var s=/[^.]+$/.exec(ws&&ws.keys&&ws.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Es=$i.toString,XL=_s.call(et),ZL=It._,JL=Zl("^"+_s.call(Ge).replace(Ai,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ss=jw?de.Buffer:r,Nn=de.Symbol,Os=de.Uint8Array,Qw=Ss?Ss.allocUnsafe:r,Cs=Xw(et.getPrototypeOf,et),e_=et.create,t_=$i.propertyIsEnumerable,Rs=xs.splice,r_=Nn?Nn.isConcatSpreadable:r,$o=Nn?Nn.iterator:r,Qn=Nn?Nn.toStringTag:r,Is=(function(){try{var s=ii(et,"defineProperty");return s({},"",{}),s}catch{}})(),QL=de.clearTimeout!==It.clearTimeout&&de.clearTimeout,eB=Se&&Se.now!==It.Date.now&&Se.now,tB=de.setTimeout!==It.setTimeout&&de.setTimeout,Ps=Et.ceil,Ns=Et.floor,Jl=et.getOwnPropertySymbols,rB=Ss?Ss.isBuffer:r,n_=de.isFinite,nB=xs.join,iB=Xw(et.keys,et),St=Et.max,At=Et.min,oB=Se.now,aB=de.parseInt,i_=Et.random,sB=xs.reverse,Ql=ii(de,"DataView"),zo=ii(de,"Map"),ef=ii(de,"Promise"),zi=ii(de,"Set"),Ho=ii(de,"WeakMap"),Uo=ii(et,"create"),Ts=Ho&&new Ho,Hi={},uB=oi(Ql),cB=oi(zo),lB=oi(ef),fB=oi(zi),dB=oi(Ho),As=Nn?Nn.prototype:r,Vo=As?As.valueOf:r,o_=As?As.toString:r;function M(s){if(dt(s)&&!Me(s)&&!(s instanceof Be)){if(s instanceof vr)return s;if(Ge.call(s,"__wrapped__"))return a1(s)}return new vr(s)}var Ui=(function(){function s(){}return function(c){if(!ft(c))return{};if(e_)return e_(c);s.prototype=c;var g=new s;return s.prototype=r,g}})();function Ms(){}function vr(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}M.templateSettings={escape:as,evaluate:dl,interpolate:Do,variable:"",imports:{_:M}},M.prototype=Ms.prototype,M.prototype.constructor=M,vr.prototype=Ui(Ms.prototype),vr.prototype.constructor=vr;function Be(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=oe,this.__views__=[]}function hB(){var s=new Be(this.__wrapped__);return s.__actions__=zt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=zt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=zt(this.__views__),s}function pB(){if(this.__filtered__){var s=new Be(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function vB(){var s=this.__wrapped__.value(),c=this.__dir__,g=Me(s),O=c<0,P=g?s.length:0,q=RF(0,P,this.__views__),V=q.start,Y=q.end,ne=Y-V,pe=O?Y:V-1,ge=this.__iteratees__,me=ge.length,xe=0,Oe=At(ne,this.__takeCount__);if(!g||!O&&P==ne&&Oe==ne)return P_(s,this.__actions__);var Ne=[];e:for(;ne--&&xe<Oe;){pe+=c;for(var je=-1,Re=s[pe];++je<me;){var ke=ge[je],$e=ke.iteratee,ir=ke.type,Lt=$e(Re);if(ir==F)Re=Lt;else if(!Lt){if(ir==G)continue e;break e}}Ne[xe++]=Re}return Ne}Be.prototype=Ui(Ms.prototype),Be.prototype.constructor=Be;function ei(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var O=s[c];this.set(O[0],O[1])}}function gB(){this.__data__=Uo?Uo(null):{},this.size=0}function mB(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}function yB(s){var c=this.__data__;if(Uo){var g=c[s];return g===d?r:g}return Ge.call(c,s)?c[s]:r}function bB(s){var c=this.__data__;return Uo?c[s]!==r:Ge.call(c,s)}function xB(s,c){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Uo&&c===r?d:c,this}ei.prototype.clear=gB,ei.prototype.delete=mB,ei.prototype.get=yB,ei.prototype.has=bB,ei.prototype.set=xB;function cn(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var O=s[c];this.set(O[0],O[1])}}function wB(){this.__data__=[],this.size=0}function _B(s){var c=this.__data__,g=Ds(c,s);if(g<0)return!1;var O=c.length-1;return g==O?c.pop():Rs.call(c,g,1),--this.size,!0}function EB(s){var c=this.__data__,g=Ds(c,s);return g<0?r:c[g][1]}function SB(s){return Ds(this.__data__,s)>-1}function OB(s,c){var g=this.__data__,O=Ds(g,s);return O<0?(++this.size,g.push([s,c])):g[O][1]=c,this}cn.prototype.clear=wB,cn.prototype.delete=_B,cn.prototype.get=EB,cn.prototype.has=SB,cn.prototype.set=OB;function ln(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var O=s[c];this.set(O[0],O[1])}}function CB(){this.size=0,this.__data__={hash:new ei,map:new(zo||cn),string:new ei}}function RB(s){var c=Ws(this,s).delete(s);return this.size-=c?1:0,c}function IB(s){return Ws(this,s).get(s)}function PB(s){return Ws(this,s).has(s)}function NB(s,c){var g=Ws(this,s),O=g.size;return g.set(s,c),this.size+=g.size==O?0:1,this}ln.prototype.clear=CB,ln.prototype.delete=RB,ln.prototype.get=IB,ln.prototype.has=PB,ln.prototype.set=NB;function ti(s){var c=-1,g=s==null?0:s.length;for(this.__data__=new ln;++c<g;)this.add(s[c])}function TB(s){return this.__data__.set(s,d),this}function AB(s){return this.__data__.has(s)}ti.prototype.add=ti.prototype.push=TB,ti.prototype.has=AB;function Ar(s){var c=this.__data__=new cn(s);this.size=c.size}function MB(){this.__data__=new cn,this.size=0}function DB(s){var c=this.__data__,g=c.delete(s);return this.size=c.size,g}function jB(s){return this.__data__.get(s)}function qB(s){return this.__data__.has(s)}function kB(s,c){var g=this.__data__;if(g instanceof cn){var O=g.__data__;if(!zo||O.length<i-1)return O.push([s,c]),this.size=++g.size,this;g=this.__data__=new ln(O)}return g.set(s,c),this.size=g.size,this}Ar.prototype.clear=MB,Ar.prototype.delete=DB,Ar.prototype.get=jB,Ar.prototype.has=qB,Ar.prototype.set=kB;function a_(s,c){var g=Me(s),O=!g&&ai(s),P=!g&&!O&&jn(s),q=!g&&!O&&!P&&Ki(s),V=g||O||P||q,Y=V?Kl(s.length,GL):[],ne=Y.length;for(var pe in s)(c||Ge.call(s,pe))&&!(V&&(pe=="length"||P&&(pe=="offset"||pe=="parent")||q&&(pe=="buffer"||pe=="byteLength"||pe=="byteOffset")||hn(pe,ne)))&&Y.push(pe);return Y}function s_(s){var c=s.length;return c?s[df(0,c-1)]:r}function LB(s,c){return Gs(zt(s),ri(c,0,s.length))}function BB(s){return Gs(zt(s))}function tf(s,c,g){(g!==r&&!Dr(s[c],g)||g===r&&!(c in s))&&Wr(s,c,g)}function Wo(s,c,g){var O=s[c];(!(Ge.call(s,c)&&Dr(O,g))||g===r&&!(c in s))&&Wr(s,c,g)}function Ds(s,c){for(var g=s.length;g--;)if(Dr(s[g][0],c))return g;return-1}function FB(s,c,g,O){return Tn(s,function(P,q,V){c(O,P,g(P),V)}),O}function u_(s,c){return s&&Kr(c,Ct(c),s)}function $B(s,c){return s&&Kr(c,Ut(c),s)}function Wr(s,c,g){c=="__proto__"&&Is?Is(s,c,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[c]=g}function rf(s,c){for(var g=-1,O=c.length,P=ue(O),q=s==null;++g<O;)P[g]=q?r:Lf(s,c[g]);return P}function ri(s,c,g){return s===s&&(g!==r&&(s=s<=g?s:g),c!==r&&(s=s>=c?s:c)),s}function gr(s,c,g,O,P,q){var V,Y=c&p,ne=c&v,pe=c&m;if(g&&(V=P?g(s,O,P,q):g(s)),V!==r)return V;if(!ft(s))return s;var ge=Me(s);if(ge){if(V=PF(s),!Y)return zt(s,V)}else{var me=Mt(s),xe=me==be||me==Ce;if(jn(s))return A_(s,Y);if(me==Ee||me==$||xe&&!P){if(V=ne||xe?{}:Z_(s),!Y)return ne?yF(s,$B(V,s)):mF(s,u_(V,s))}else{if(!nt[me])return P?s:{};V=NF(s,me,Y)}}q||(q=new Ar);var Oe=q.get(s);if(Oe)return Oe;q.set(s,V),C1(s)?s.forEach(function(Re){V.add(gr(Re,c,g,Re,s,q))}):S1(s)&&s.forEach(function(Re,ke){V.set(ke,gr(Re,c,g,ke,s,q))});var Ne=pe?ne?Ef:_f:ne?Ut:Ct,je=ge?r:Ne(s);return er(je||s,function(Re,ke){je&&(ke=Re,Re=s[ke]),Wo(V,ke,gr(Re,c,g,ke,s,q))}),V}function zB(s){var c=Ct(s);return function(g){return c_(g,s,c)}}function c_(s,c,g){var O=g.length;if(s==null)return!O;for(s=et(s);O--;){var P=g[O],q=c[P],V=s[P];if(V===r&&!(P in s)||!q(V))return!1}return!0}function l_(s,c,g){if(typeof s!="function")throw new pr(a);return Qo(function(){s.apply(r,g)},c)}function Go(s,c,g,O){var P=-1,q=ms,V=!0,Y=s.length,ne=[],pe=c.length;if(!Y)return ne;g&&(c=st(c,tr(g))),O?(q=zl,V=!1):c.length>=i&&(q=Fo,V=!1,c=new ti(c));e:for(;++P<Y;){var ge=s[P],me=g==null?ge:g(ge);if(ge=O||ge!==0?ge:0,V&&me===me){for(var xe=pe;xe--;)if(c[xe]===me)continue e;ne.push(ge)}else q(c,me,O)||ne.push(ge)}return ne}var Tn=k_(Gr),f_=k_(of,!0);function HB(s,c){var g=!0;return Tn(s,function(O,P,q){return g=!!c(O,P,q),g}),g}function js(s,c,g){for(var O=-1,P=s.length;++O<P;){var q=s[O],V=c(q);if(V!=null&&(Y===r?V===V&&!nr(V):g(V,Y)))var Y=V,ne=q}return ne}function UB(s,c,g,O){var P=s.length;for(g=De(g),g<0&&(g=-g>P?0:P+g),O=O===r||O>P?P:De(O),O<0&&(O+=P),O=g>O?0:I1(O);g<O;)s[g++]=c;return s}function d_(s,c){var g=[];return Tn(s,function(O,P,q){c(O,P,q)&&g.push(O)}),g}function Pt(s,c,g,O,P){var q=-1,V=s.length;for(g||(g=AF),P||(P=[]);++q<V;){var Y=s[q];c>0&&g(Y)?c>1?Pt(Y,c-1,g,O,P):In(P,Y):O||(P[P.length]=Y)}return P}var nf=L_(),h_=L_(!0);function Gr(s,c){return s&&nf(s,c,Ct)}function of(s,c){return s&&h_(s,c,Ct)}function qs(s,c){return Rn(c,function(g){return pn(s[g])})}function ni(s,c){c=Mn(c,s);for(var g=0,O=c.length;s!=null&&g<O;)s=s[Mr(c[g++])];return g&&g==O?s:r}function p_(s,c,g){var O=c(s);return Me(s)?O:In(O,g(s))}function qt(s){return s==null?s===r?lt:fe:Qn&&Qn in et(s)?CF(s):BF(s)}function af(s,c){return s>c}function VB(s,c){return s!=null&&Ge.call(s,c)}function WB(s,c){return s!=null&&c in et(s)}function GB(s,c,g){return s>=At(c,g)&&s<St(c,g)}function sf(s,c,g){for(var O=g?zl:ms,P=s[0].length,q=s.length,V=q,Y=ue(q),ne=1/0,pe=[];V--;){var ge=s[V];V&&c&&(ge=st(ge,tr(c))),ne=At(ge.length,ne),Y[V]=!g&&(c||P>=120&&ge.length>=120)?new ti(V&&ge):r}ge=s[0];var me=-1,xe=Y[0];e:for(;++me<P&&pe.length<ne;){var Oe=ge[me],Ne=c?c(Oe):Oe;if(Oe=g||Oe!==0?Oe:0,!(xe?Fo(xe,Ne):O(pe,Ne,g))){for(V=q;--V;){var je=Y[V];if(!(je?Fo(je,Ne):O(s[V],Ne,g)))continue e}xe&&xe.push(Ne),pe.push(Oe)}}return pe}function KB(s,c,g,O){return Gr(s,function(P,q,V){c(O,g(P),q,V)}),O}function Ko(s,c,g){c=Mn(c,s),s=t1(s,c);var O=s==null?s:s[Mr(yr(c))];return O==null?r:Qt(O,s,g)}function v_(s){return dt(s)&&qt(s)==$}function YB(s){return dt(s)&&qt(s)==rt}function XB(s){return dt(s)&&qt(s)==ie}function Yo(s,c,g,O,P){return s===c?!0:s==null||c==null||!dt(s)&&!dt(c)?s!==s&&c!==c:ZB(s,c,g,O,Yo,P)}function ZB(s,c,g,O,P,q){var V=Me(s),Y=Me(c),ne=V?k:Mt(s),pe=Y?k:Mt(c);ne=ne==$?Ee:ne,pe=pe==$?Ee:pe;var ge=ne==Ee,me=pe==Ee,xe=ne==pe;if(xe&&jn(s)){if(!jn(c))return!1;V=!0,ge=!1}if(xe&&!ge)return q||(q=new Ar),V||Ki(s)?K_(s,c,g,O,P,q):SF(s,c,ne,g,O,P,q);if(!(g&y)){var Oe=ge&&Ge.call(s,"__wrapped__"),Ne=me&&Ge.call(c,"__wrapped__");if(Oe||Ne){var je=Oe?s.value():s,Re=Ne?c.value():c;return q||(q=new Ar),P(je,Re,g,O,q)}}return xe?(q||(q=new Ar),OF(s,c,g,O,P,q)):!1}function JB(s){return dt(s)&&Mt(s)==_e}function uf(s,c,g,O){var P=g.length,q=P,V=!O;if(s==null)return!q;for(s=et(s);P--;){var Y=g[P];if(V&&Y[2]?Y[1]!==s[Y[0]]:!(Y[0]in s))return!1}for(;++P<q;){Y=g[P];var ne=Y[0],pe=s[ne],ge=Y[1];if(V&&Y[2]){if(pe===r&&!(ne in s))return!1}else{var me=new Ar;if(O)var xe=O(pe,ge,ne,s,c,me);if(!(xe===r?Yo(ge,pe,y|x,O,me):xe))return!1}}return!0}function g_(s){if(!ft(s)||DF(s))return!1;var c=pn(s)?JL:Sl;return c.test(oi(s))}function QB(s){return dt(s)&&qt(s)==ze}function eF(s){return dt(s)&&Mt(s)==Fe}function tF(s){return dt(s)&&Qs(s.length)&&!!at[qt(s)]}function m_(s){return typeof s=="function"?s:s==null?Vt:typeof s=="object"?Me(s)?x_(s[0],s[1]):b_(s):F1(s)}function cf(s){if(!Jo(s))return iB(s);var c=[];for(var g in et(s))Ge.call(s,g)&&g!="constructor"&&c.push(g);return c}function rF(s){if(!ft(s))return LF(s);var c=Jo(s),g=[];for(var O in s)O=="constructor"&&(c||!Ge.call(s,O))||g.push(O);return g}function lf(s,c){return s<c}function y_(s,c){var g=-1,O=Ht(s)?ue(s.length):[];return Tn(s,function(P,q,V){O[++g]=c(P,q,V)}),O}function b_(s){var c=Of(s);return c.length==1&&c[0][2]?Q_(c[0][0],c[0][1]):function(g){return g===s||uf(g,s,c)}}function x_(s,c){return Rf(s)&&J_(c)?Q_(Mr(s),c):function(g){var O=Lf(g,s);return O===r&&O===c?Bf(g,s):Yo(c,O,y|x)}}function ks(s,c,g,O,P){s!==c&&nf(c,function(q,V){if(P||(P=new Ar),ft(q))nF(s,c,V,g,ks,O,P);else{var Y=O?O(Pf(s,V),q,V+"",s,c,P):r;Y===r&&(Y=q),tf(s,V,Y)}},Ut)}function nF(s,c,g,O,P,q,V){var Y=Pf(s,g),ne=Pf(c,g),pe=V.get(ne);if(pe){tf(s,g,pe);return}var ge=q?q(Y,ne,g+"",s,c,V):r,me=ge===r;if(me){var xe=Me(ne),Oe=!xe&&jn(ne),Ne=!xe&&!Oe&&Ki(ne);ge=ne,xe||Oe||Ne?Me(Y)?ge=Y:pt(Y)?ge=zt(Y):Oe?(me=!1,ge=A_(ne,!0)):Ne?(me=!1,ge=M_(ne,!0)):ge=[]:ea(ne)||ai(ne)?(ge=Y,ai(Y)?ge=P1(Y):(!ft(Y)||pn(Y))&&(ge=Z_(ne))):me=!1}me&&(V.set(ne,ge),P(ge,ne,O,q,V),V.delete(ne)),tf(s,g,ge)}function w_(s,c){var g=s.length;if(g)return c+=c<0?g:0,hn(c,g)?s[c]:r}function __(s,c,g){c.length?c=st(c,function(q){return Me(q)?function(V){return ni(V,q.length===1?q[0]:q)}:q}):c=[Vt];var O=-1;c=st(c,tr(Ie()));var P=y_(s,function(q,V,Y){var ne=st(c,function(pe){return pe(q)});return{criteria:ne,index:++O,value:q}});return NL(P,function(q,V){return gF(q,V,g)})}function iF(s,c){return E_(s,c,function(g,O){return Bf(s,O)})}function E_(s,c,g){for(var O=-1,P=c.length,q={};++O<P;){var V=c[O],Y=ni(s,V);g(Y,V)&&Xo(q,Mn(V,s),Y)}return q}function oF(s){return function(c){return ni(c,s)}}function ff(s,c,g,O){var P=O?PL:ki,q=-1,V=c.length,Y=s;for(s===c&&(c=zt(c)),g&&(Y=st(s,tr(g)));++q<V;)for(var ne=0,pe=c[q],ge=g?g(pe):pe;(ne=P(Y,ge,ne,O))>-1;)Y!==s&&Rs.call(Y,ne,1),Rs.call(s,ne,1);return s}function S_(s,c){for(var g=s?c.length:0,O=g-1;g--;){var P=c[g];if(g==O||P!==q){var q=P;hn(P)?Rs.call(s,P,1):vf(s,P)}}return s}function df(s,c){return s+Ns(i_()*(c-s+1))}function aF(s,c,g,O){for(var P=-1,q=St(Ps((c-s)/(g||1)),0),V=ue(q);q--;)V[O?q:++P]=s,s+=g;return V}function hf(s,c){var g="";if(!s||c<1||c>Q)return g;do c%2&&(g+=s),c=Ns(c/2),c&&(s+=s);while(c);return g}function qe(s,c){return Nf(e1(s,c,Vt),s+"")}function sF(s){return s_(Yi(s))}function uF(s,c){var g=Yi(s);return Gs(g,ri(c,0,g.length))}function Xo(s,c,g,O){if(!ft(s))return s;c=Mn(c,s);for(var P=-1,q=c.length,V=q-1,Y=s;Y!=null&&++P<q;){var ne=Mr(c[P]),pe=g;if(ne==="__proto__"||ne==="constructor"||ne==="prototype")return s;if(P!=V){var ge=Y[ne];pe=O?O(ge,ne,Y):r,pe===r&&(pe=ft(ge)?ge:hn(c[P+1])?[]:{})}Wo(Y,ne,pe),Y=Y[ne]}return s}var O_=Ts?function(s,c){return Ts.set(s,c),s}:Vt,cF=Is?function(s,c){return Is(s,"toString",{configurable:!0,enumerable:!1,value:$f(c),writable:!0})}:Vt;function lF(s){return Gs(Yi(s))}function mr(s,c,g){var O=-1,P=s.length;c<0&&(c=-c>P?0:P+c),g=g>P?P:g,g<0&&(g+=P),P=c>g?0:g-c>>>0,c>>>=0;for(var q=ue(P);++O<P;)q[O]=s[O+c];return q}function fF(s,c){var g;return Tn(s,function(O,P,q){return g=c(O,P,q),!g}),!!g}function Ls(s,c,g){var O=0,P=s==null?O:s.length;if(typeof c=="number"&&c===c&&P<=H){for(;O<P;){var q=O+P>>>1,V=s[q];V!==null&&!nr(V)&&(g?V<=c:V<c)?O=q+1:P=q}return P}return pf(s,c,Vt,g)}function pf(s,c,g,O){var P=0,q=s==null?0:s.length;if(q===0)return 0;c=g(c);for(var V=c!==c,Y=c===null,ne=nr(c),pe=c===r;P<q;){var ge=Ns((P+q)/2),me=g(s[ge]),xe=me!==r,Oe=me===null,Ne=me===me,je=nr(me);if(V)var Re=O||Ne;else pe?Re=Ne&&(O||xe):Y?Re=Ne&&xe&&(O||!Oe):ne?Re=Ne&&xe&&!Oe&&(O||!je):Oe||je?Re=!1:Re=O?me<=c:me<c;Re?P=ge+1:q=ge}return At(q,ae)}function C_(s,c){for(var g=-1,O=s.length,P=0,q=[];++g<O;){var V=s[g],Y=c?c(V):V;if(!g||!Dr(Y,ne)){var ne=Y;q[P++]=V===0?0:V}}return q}function R_(s){return typeof s=="number"?s:nr(s)?ee:+s}function rr(s){if(typeof s=="string")return s;if(Me(s))return st(s,rr)+"";if(nr(s))return o_?o_.call(s):"";var c=s+"";return c=="0"&&1/s==-Z?"-0":c}function An(s,c,g){var O=-1,P=ms,q=s.length,V=!0,Y=[],ne=Y;if(g)V=!1,P=zl;else if(q>=i){var pe=c?null:_F(s);if(pe)return bs(pe);V=!1,P=Fo,ne=new ti}else ne=c?[]:Y;e:for(;++O<q;){var ge=s[O],me=c?c(ge):ge;if(ge=g||ge!==0?ge:0,V&&me===me){for(var xe=ne.length;xe--;)if(ne[xe]===me)continue e;c&&ne.push(me),Y.push(ge)}else P(ne,me,g)||(ne!==Y&&ne.push(me),Y.push(ge))}return Y}function vf(s,c){c=Mn(c,s);var g=-1,O=c.length;if(!O)return!0;for(;++g<O;){var P=Mr(c[g]);if(P==="__proto__"&&!Ge.call(s,"__proto__")||(P==="constructor"||P==="prototype")&&g<O-1)return!1}var q=t1(s,c);return q==null||delete q[Mr(yr(c))]}function I_(s,c,g,O){return Xo(s,c,g(ni(s,c)),O)}function Bs(s,c,g,O){for(var P=s.length,q=O?P:-1;(O?q--:++q<P)&&c(s[q],q,s););return g?mr(s,O?0:q,O?q+1:P):mr(s,O?q+1:0,O?P:q)}function P_(s,c){var g=s;return g instanceof Be&&(g=g.value()),Hl(c,function(O,P){return P.func.apply(P.thisArg,In([O],P.args))},g)}function gf(s,c,g){var O=s.length;if(O<2)return O?An(s[0]):[];for(var P=-1,q=ue(O);++P<O;)for(var V=s[P],Y=-1;++Y<O;)Y!=P&&(q[P]=Go(q[P]||V,s[Y],c,g));return An(Pt(q,1),c,g)}function N_(s,c,g){for(var O=-1,P=s.length,q=c.length,V={};++O<P;){var Y=O<q?c[O]:r;g(V,s[O],Y)}return V}function mf(s){return pt(s)?s:[]}function yf(s){return typeof s=="function"?s:Vt}function Mn(s,c){return Me(s)?s:Rf(s,c)?[s]:o1(Ke(s))}var dF=qe;function Dn(s,c,g){var O=s.length;return g=g===r?O:g,!c&&g>=O?s:mr(s,c,g)}var T_=QL||function(s){return It.clearTimeout(s)};function A_(s,c){if(c)return s.slice();var g=s.length,O=Qw?Qw(g):new s.constructor(g);return s.copy(O),O}function bf(s){var c=new s.constructor(s.byteLength);return new Os(c).set(new Os(s)),c}function hF(s,c){var g=c?bf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function pF(s){var c=new s.constructor(s.source,ls.exec(s));return c.lastIndex=s.lastIndex,c}function vF(s){return Vo?et(Vo.call(s)):{}}function M_(s,c){var g=c?bf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function D_(s,c){if(s!==c){var g=s!==r,O=s===null,P=s===s,q=nr(s),V=c!==r,Y=c===null,ne=c===c,pe=nr(c);if(!Y&&!pe&&!q&&s>c||q&&V&&ne&&!Y&&!pe||O&&V&&ne||!g&&ne||!P)return 1;if(!O&&!q&&!pe&&s<c||pe&&g&&P&&!O&&!q||Y&&g&&P||!V&&P||!ne)return-1}return 0}function gF(s,c,g){for(var O=-1,P=s.criteria,q=c.criteria,V=P.length,Y=g.length;++O<V;){var ne=D_(P[O],q[O]);if(ne){if(O>=Y)return ne;var pe=g[O];return ne*(pe=="desc"?-1:1)}}return s.index-c.index}function j_(s,c,g,O){for(var P=-1,q=s.length,V=g.length,Y=-1,ne=c.length,pe=St(q-V,0),ge=ue(ne+pe),me=!O;++Y<ne;)ge[Y]=c[Y];for(;++P<V;)(me||P<q)&&(ge[g[P]]=s[P]);for(;pe--;)ge[Y++]=s[P++];return ge}function q_(s,c,g,O){for(var P=-1,q=s.length,V=-1,Y=g.length,ne=-1,pe=c.length,ge=St(q-Y,0),me=ue(ge+pe),xe=!O;++P<ge;)me[P]=s[P];for(var Oe=P;++ne<pe;)me[Oe+ne]=c[ne];for(;++V<Y;)(xe||P<q)&&(me[Oe+g[V]]=s[P++]);return me}function zt(s,c){var g=-1,O=s.length;for(c||(c=ue(O));++g<O;)c[g]=s[g];return c}function Kr(s,c,g,O){var P=!g;g||(g={});for(var q=-1,V=c.length;++q<V;){var Y=c[q],ne=O?O(g[Y],s[Y],Y,g,s):r;ne===r&&(ne=s[Y]),P?Wr(g,Y,ne):Wo(g,Y,ne)}return g}function mF(s,c){return Kr(s,Cf(s),c)}function yF(s,c){return Kr(s,Y_(s),c)}function Fs(s,c){return function(g,O){var P=Me(g)?EL:FB,q=c?c():{};return P(g,s,Ie(O,2),q)}}function Vi(s){return qe(function(c,g){var O=-1,P=g.length,q=P>1?g[P-1]:r,V=P>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(P--,q):r,V&&kt(g[0],g[1],V)&&(q=P<3?r:q,P=1),c=et(c);++O<P;){var Y=g[O];Y&&s(c,Y,O,q)}return c})}function k_(s,c){return function(g,O){if(g==null)return g;if(!Ht(g))return s(g,O);for(var P=g.length,q=c?P:-1,V=et(g);(c?q--:++q<P)&&O(V[q],q,V)!==!1;);return g}}function L_(s){return function(c,g,O){for(var P=-1,q=et(c),V=O(c),Y=V.length;Y--;){var ne=V[s?Y:++P];if(g(q[ne],ne,q)===!1)break}return c}}function bF(s,c,g){var O=c&b,P=Zo(s);function q(){var V=this&&this!==It&&this instanceof q?P:s;return V.apply(O?g:this,arguments)}return q}function B_(s){return function(c){c=Ke(c);var g=Li(c)?Tr(c):r,O=g?g[0]:c.charAt(0),P=g?Dn(g,1).join(""):c.slice(1);return O[s]()+P}}function Wi(s){return function(c){return Hl(L1(k1(c).replace(cL,"")),s,"")}}function Zo(s){return function(){var c=arguments;switch(c.length){case 0:return new s;case 1:return new s(c[0]);case 2:return new s(c[0],c[1]);case 3:return new s(c[0],c[1],c[2]);case 4:return new s(c[0],c[1],c[2],c[3]);case 5:return new s(c[0],c[1],c[2],c[3],c[4]);case 6:return new s(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new s(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var g=Ui(s.prototype),O=s.apply(g,c);return ft(O)?O:g}}function xF(s,c,g){var O=Zo(s);function P(){for(var q=arguments.length,V=ue(q),Y=q,ne=Gi(P);Y--;)V[Y]=arguments[Y];var pe=q<3&&V[0]!==ne&&V[q-1]!==ne?[]:Pn(V,ne);if(q-=pe.length,q<g)return U_(s,c,$s,P.placeholder,r,V,pe,r,r,g-q);var ge=this&&this!==It&&this instanceof P?O:s;return Qt(ge,this,V)}return P}function F_(s){return function(c,g,O){var P=et(c);if(!Ht(c)){var q=Ie(g,3);c=Ct(c),g=function(Y){return q(P[Y],Y,P)}}var V=s(c,g,O);return V>-1?P[q?c[V]:V]:r}}function $_(s){return dn(function(c){var g=c.length,O=g,P=vr.prototype.thru;for(s&&c.reverse();O--;){var q=c[O];if(typeof q!="function")throw new pr(a);if(P&&!V&&Vs(q)=="wrapper")var V=new vr([],!0)}for(O=V?O:g;++O<g;){q=c[O];var Y=Vs(q),ne=Y=="wrapper"?Sf(q):r;ne&&If(ne[0])&&ne[1]==(N|_|R|A)&&!ne[4].length&&ne[9]==1?V=V[Vs(ne[0])].apply(V,ne[3]):V=q.length==1&&If(q)?V[Y]():V.thru(q)}return function(){var pe=arguments,ge=pe[0];if(V&&pe.length==1&&Me(ge))return V.plant(ge).value();for(var me=0,xe=g?c[me].apply(this,pe):ge;++me<g;)xe=c[me].call(this,xe);return xe}})}function $s(s,c,g,O,P,q,V,Y,ne,pe){var ge=c&N,me=c&b,xe=c&w,Oe=c&(_|S),Ne=c&L,je=xe?r:Zo(s);function Re(){for(var ke=arguments.length,$e=ue(ke),ir=ke;ir--;)$e[ir]=arguments[ir];if(Oe)var Lt=Gi(Re),or=AL($e,Lt);if(O&&($e=j_($e,O,P,Oe)),q&&($e=q_($e,q,V,Oe)),ke-=or,Oe&&ke<pe){var vt=Pn($e,Lt);return U_(s,c,$s,Re.placeholder,g,$e,vt,Y,ne,pe-ke)}var jr=me?g:this,gn=xe?jr[s]:s;return ke=$e.length,Y?$e=FF($e,Y):Ne&&ke>1&&$e.reverse(),ge&&ne<ke&&($e.length=ne),this&&this!==It&&this instanceof Re&&(gn=je||Zo(gn)),gn.apply(jr,$e)}return Re}function z_(s,c){return function(g,O){return KB(g,s,c(O),{})}}function zs(s,c){return function(g,O){var P;if(g===r&&O===r)return c;if(g!==r&&(P=g),O!==r){if(P===r)return O;typeof g=="string"||typeof O=="string"?(g=rr(g),O=rr(O)):(g=R_(g),O=R_(O)),P=s(g,O)}return P}}function xf(s){return dn(function(c){return c=st(c,tr(Ie())),qe(function(g){var O=this;return s(c,function(P){return Qt(P,O,g)})})})}function Hs(s,c){c=c===r?" ":rr(c);var g=c.length;if(g<2)return g?hf(c,s):c;var O=hf(c,Ps(s/Bi(c)));return Li(c)?Dn(Tr(O),0,s).join(""):O.slice(0,s)}function wF(s,c,g,O){var P=c&b,q=Zo(s);function V(){for(var Y=-1,ne=arguments.length,pe=-1,ge=O.length,me=ue(ge+ne),xe=this&&this!==It&&this instanceof V?q:s;++pe<ge;)me[pe]=O[pe];for(;ne--;)me[pe++]=arguments[++Y];return Qt(xe,P?g:this,me)}return V}function H_(s){return function(c,g,O){return O&&typeof O!="number"&&kt(c,g,O)&&(g=O=r),c=vn(c),g===r?(g=c,c=0):g=vn(g),O=O===r?c<g?1:-1:vn(O),aF(c,g,O,s)}}function Us(s){return function(c,g){return typeof c=="string"&&typeof g=="string"||(c=br(c),g=br(g)),s(c,g)}}function U_(s,c,g,O,P,q,V,Y,ne,pe){var ge=c&_,me=ge?V:r,xe=ge?r:V,Oe=ge?q:r,Ne=ge?r:q;c|=ge?R:I,c&=~(ge?I:R),c&E||(c&=-4);var je=[s,c,P,Oe,me,Ne,xe,Y,ne,pe],Re=g.apply(r,je);return If(s)&&r1(Re,je),Re.placeholder=O,n1(Re,s,c)}function wf(s){var c=Et[s];return function(g,O){if(g=br(g),O=O==null?0:At(De(O),292),O&&n_(g)){var P=(Ke(g)+"e").split("e"),q=c(P[0]+"e"+(+P[1]+O));return P=(Ke(q)+"e").split("e"),+(P[0]+"e"+(+P[1]-O))}return c(g)}}var _F=zi&&1/bs(new zi([,-0]))[1]==Z?function(s){return new zi(s)}:Uf;function V_(s){return function(c){var g=Mt(c);return g==_e?Xl(c):g==Fe?BL(c):TL(c,s(c))}}function fn(s,c,g,O,P,q,V,Y){var ne=c&w;if(!ne&&typeof s!="function")throw new pr(a);var pe=O?O.length:0;if(pe||(c&=-97,O=P=r),V=V===r?V:St(De(V),0),Y=Y===r?Y:De(Y),pe-=P?P.length:0,c&I){var ge=O,me=P;O=P=r}var xe=ne?r:Sf(s),Oe=[s,c,g,O,P,ge,me,q,V,Y];if(xe&&kF(Oe,xe),s=Oe[0],c=Oe[1],g=Oe[2],O=Oe[3],P=Oe[4],Y=Oe[9]=Oe[9]===r?ne?0:s.length:St(Oe[9]-pe,0),!Y&&c&(_|S)&&(c&=-25),!c||c==b)var Ne=bF(s,c,g);else c==_||c==S?Ne=xF(s,c,Y):(c==R||c==(b|R))&&!P.length?Ne=wF(s,c,g,O):Ne=$s.apply(r,Oe);var je=xe?O_:r1;return n1(je(Ne,Oe),s,c)}function W_(s,c,g,O){return s===r||Dr(s,$i[g])&&!Ge.call(O,g)?c:s}function G_(s,c,g,O,P,q){return ft(s)&&ft(c)&&(q.set(c,s),ks(s,c,r,G_,q),q.delete(c)),s}function EF(s){return ea(s)?r:s}function K_(s,c,g,O,P,q){var V=g&y,Y=s.length,ne=c.length;if(Y!=ne&&!(V&&ne>Y))return!1;var pe=q.get(s),ge=q.get(c);if(pe&&ge)return pe==c&&ge==s;var me=-1,xe=!0,Oe=g&x?new ti:r;for(q.set(s,c),q.set(c,s);++me<Y;){var Ne=s[me],je=c[me];if(O)var Re=V?O(je,Ne,me,c,s,q):O(Ne,je,me,s,c,q);if(Re!==r){if(Re)continue;xe=!1;break}if(Oe){if(!Ul(c,function(ke,$e){if(!Fo(Oe,$e)&&(Ne===ke||P(Ne,ke,g,O,q)))return Oe.push($e)})){xe=!1;break}}else if(!(Ne===je||P(Ne,je,g,O,q))){xe=!1;break}}return q.delete(s),q.delete(c),xe}function SF(s,c,g,O,P,q,V){switch(g){case bt:if(s.byteLength!=c.byteLength||s.byteOffset!=c.byteOffset)return!1;s=s.buffer,c=c.buffer;case rt:return!(s.byteLength!=c.byteLength||!q(new Os(s),new Os(c)));case re:case ie:case he:return Dr(+s,+c);case ce:return s.name==c.name&&s.message==c.message;case ze:case Ue:return s==c+"";case _e:var Y=Xl;case Fe:var ne=O&y;if(Y||(Y=bs),s.size!=c.size&&!ne)return!1;var pe=V.get(s);if(pe)return pe==c;O|=x,V.set(s,c);var ge=K_(Y(s),Y(c),O,P,q,V);return V.delete(s),ge;case ct:if(Vo)return Vo.call(s)==Vo.call(c)}return!1}function OF(s,c,g,O,P,q){var V=g&y,Y=_f(s),ne=Y.length,pe=_f(c),ge=pe.length;if(ne!=ge&&!V)return!1;for(var me=ne;me--;){var xe=Y[me];if(!(V?xe in c:Ge.call(c,xe)))return!1}var Oe=q.get(s),Ne=q.get(c);if(Oe&&Ne)return Oe==c&&Ne==s;var je=!0;q.set(s,c),q.set(c,s);for(var Re=V;++me<ne;){xe=Y[me];var ke=s[xe],$e=c[xe];if(O)var ir=V?O($e,ke,xe,c,s,q):O(ke,$e,xe,s,c,q);if(!(ir===r?ke===$e||P(ke,$e,g,O,q):ir)){je=!1;break}Re||(Re=xe=="constructor")}if(je&&!Re){var Lt=s.constructor,or=c.constructor;Lt!=or&&"constructor"in s&&"constructor"in c&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof or=="function"&&or instanceof or)&&(je=!1)}return q.delete(s),q.delete(c),je}function dn(s){return Nf(e1(s,r,c1),s+"")}function _f(s){return p_(s,Ct,Cf)}function Ef(s){return p_(s,Ut,Y_)}var Sf=Ts?function(s){return Ts.get(s)}:Uf;function Vs(s){for(var c=s.name+"",g=Hi[c],O=Ge.call(Hi,c)?g.length:0;O--;){var P=g[O],q=P.func;if(q==null||q==s)return P.name}return c}function Gi(s){var c=Ge.call(M,"placeholder")?M:s;return c.placeholder}function Ie(){var s=M.iteratee||zf;return s=s===zf?m_:s,arguments.length?s(arguments[0],arguments[1]):s}function Ws(s,c){var g=s.__data__;return MF(c)?g[typeof c=="string"?"string":"hash"]:g.map}function Of(s){for(var c=Ct(s),g=c.length;g--;){var O=c[g],P=s[O];c[g]=[O,P,J_(P)]}return c}function ii(s,c){var g=qL(s,c);return g_(g)?g:r}function CF(s){var c=Ge.call(s,Qn),g=s[Qn];try{s[Qn]=r;var O=!0}catch{}var P=Es.call(s);return O&&(c?s[Qn]=g:delete s[Qn]),P}var Cf=Jl?function(s){return s==null?[]:(s=et(s),Rn(Jl(s),function(c){return t_.call(s,c)}))}:Vf,Y_=Jl?function(s){for(var c=[];s;)In(c,Cf(s)),s=Cs(s);return c}:Vf,Mt=qt;(Ql&&Mt(new Ql(new ArrayBuffer(1)))!=bt||zo&&Mt(new zo)!=_e||ef&&Mt(ef.resolve())!=Pe||zi&&Mt(new zi)!=Fe||Ho&&Mt(new Ho)!=mt)&&(Mt=function(s){var c=qt(s),g=c==Ee?s.constructor:r,O=g?oi(g):"";if(O)switch(O){case uB:return bt;case cB:return _e;case lB:return Pe;case fB:return Fe;case dB:return mt}return c});function RF(s,c,g){for(var O=-1,P=g.length;++O<P;){var q=g[O],V=q.size;switch(q.type){case"drop":s+=V;break;case"dropRight":c-=V;break;case"take":c=At(c,s+V);break;case"takeRight":s=St(s,c-V);break}}return{start:s,end:c}}function IF(s){var c=s.match(ml);return c?c[1].split(yl):[]}function X_(s,c,g){c=Mn(c,s);for(var O=-1,P=c.length,q=!1;++O<P;){var V=Mr(c[O]);if(!(q=s!=null&&g(s,V)))break;s=s[V]}return q||++O!=P?q:(P=s==null?0:s.length,!!P&&Qs(P)&&hn(V,P)&&(Me(s)||ai(s)))}function PF(s){var c=s.length,g=new s.constructor(c);return c&&typeof s[0]=="string"&&Ge.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function Z_(s){return typeof s.constructor=="function"&&!Jo(s)?Ui(Cs(s)):{}}function NF(s,c,g){var O=s.constructor;switch(c){case rt:return bf(s);case re:case ie:return new O(+s);case bt:return hF(s,g);case Jt:case fr:case Dt:case _t:case jt:case Vr:case Yn:case Cn:case dr:return M_(s,g);case _e:return new O;case he:case Ue:return new O(s);case ze:return pF(s);case Fe:return new O;case ct:return vF(s)}}function TF(s,c){var g=c.length;if(!g)return s;var O=g-1;return c[O]=(g>1?"& ":"")+c[O],c=c.join(g>2?", ":" "),s.replace(us,`{
48
- /* [wrapped with `+c+`] */
49
- `)}function AF(s){return Me(s)||ai(s)||!!(r_&&s&&s[r_])}function hn(s,c){var g=typeof s;return c=c??Q,!!c&&(g=="number"||g!="symbol"&&Cl.test(s))&&s>-1&&s%1==0&&s<c}function kt(s,c,g){if(!ft(g))return!1;var O=typeof c;return(O=="number"?Ht(g)&&hn(c,g.length):O=="string"&&c in g)?Dr(g[c],s):!1}function Rf(s,c){if(Me(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||nr(s)?!0:ss.test(s)||!hl.test(s)||c!=null&&s in et(c)}function MF(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}function If(s){var c=Vs(s),g=M[c];if(typeof g!="function"||!(c in Be.prototype))return!1;if(s===g)return!0;var O=Sf(g);return!!O&&s===O[0]}function DF(s){return!!Jw&&Jw in s}var jF=ws?pn:Wf;function Jo(s){var c=s&&s.constructor,g=typeof c=="function"&&c.prototype||$i;return s===g}function J_(s){return s===s&&!ft(s)}function Q_(s,c){return function(g){return g==null?!1:g[s]===c&&(c!==r||s in et(g))}}function qF(s){var c=Zs(s,function(O){return g.size===f&&g.clear(),O}),g=c.cache;return c}function kF(s,c){var g=s[1],O=c[1],P=g|O,q=P<(b|w|N),V=O==N&&g==_||O==N&&g==A&&s[7].length<=c[8]||O==(N|A)&&c[7].length<=c[8]&&g==_;if(!(q||V))return s;O&b&&(s[2]=c[2],P|=g&b?0:E);var Y=c[3];if(Y){var ne=s[3];s[3]=ne?j_(ne,Y,c[4]):Y,s[4]=ne?Pn(s[3],h):c[4]}return Y=c[5],Y&&(ne=s[5],s[5]=ne?q_(ne,Y,c[6]):Y,s[6]=ne?Pn(s[5],h):c[6]),Y=c[7],Y&&(s[7]=Y),O&N&&(s[8]=s[8]==null?c[8]:At(s[8],c[8])),s[9]==null&&(s[9]=c[9]),s[0]=c[0],s[1]=P,s}function LF(s){var c=[];if(s!=null)for(var g in et(s))c.push(g);return c}function BF(s){return Es.call(s)}function e1(s,c,g){return c=St(c===r?s.length-1:c,0),function(){for(var O=arguments,P=-1,q=St(O.length-c,0),V=ue(q);++P<q;)V[P]=O[c+P];P=-1;for(var Y=ue(c+1);++P<c;)Y[P]=O[P];return Y[c]=g(V),Qt(s,this,Y)}}function t1(s,c){return c.length<2?s:ni(s,mr(c,0,-1))}function FF(s,c){for(var g=s.length,O=At(c.length,g),P=zt(s);O--;){var q=c[O];s[O]=hn(q,g)?P[q]:r}return s}function Pf(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}var r1=i1(O_),Qo=tB||function(s,c){return It.setTimeout(s,c)},Nf=i1(cF);function n1(s,c,g){var O=c+"";return Nf(s,TF(O,$F(IF(O),g)))}function i1(s){var c=0,g=0;return function(){var O=oB(),P=D-(O-g);if(g=O,P>0){if(++c>=j)return arguments[0]}else c=0;return s.apply(r,arguments)}}function Gs(s,c){var g=-1,O=s.length,P=O-1;for(c=c===r?O:c;++g<c;){var q=df(g,P),V=s[q];s[q]=s[g],s[g]=V}return s.length=c,s}var o1=qF(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(pl,function(g,O,P,q){c.push(P?q.replace(xl,"$1"):O||g)}),c});function Mr(s){if(typeof s=="string"||nr(s))return s;var c=s+"";return c=="0"&&1/s==-Z?"-0":c}function oi(s){if(s!=null){try{return _s.call(s)}catch{}try{return s+""}catch{}}return""}function $F(s,c){return er(K,function(g){var O="_."+g[0];c&g[1]&&!ms(s,O)&&s.push(O)}),s.sort()}function a1(s){if(s instanceof Be)return s.clone();var c=new vr(s.__wrapped__,s.__chain__);return c.__actions__=zt(s.__actions__),c.__index__=s.__index__,c.__values__=s.__values__,c}function zF(s,c,g){(g?kt(s,c,g):c===r)?c=1:c=St(De(c),0);var O=s==null?0:s.length;if(!O||c<1)return[];for(var P=0,q=0,V=ue(Ps(O/c));P<O;)V[q++]=mr(s,P,P+=c);return V}function HF(s){for(var c=-1,g=s==null?0:s.length,O=0,P=[];++c<g;){var q=s[c];q&&(P[O++]=q)}return P}function UF(){var s=arguments.length;if(!s)return[];for(var c=ue(s-1),g=arguments[0],O=s;O--;)c[O-1]=arguments[O];return In(Me(g)?zt(g):[g],Pt(c,1))}var VF=qe(function(s,c){return pt(s)?Go(s,Pt(c,1,pt,!0)):[]}),WF=qe(function(s,c){var g=yr(c);return pt(g)&&(g=r),pt(s)?Go(s,Pt(c,1,pt,!0),Ie(g,2)):[]}),GF=qe(function(s,c){var g=yr(c);return pt(g)&&(g=r),pt(s)?Go(s,Pt(c,1,pt,!0),r,g):[]});function KF(s,c,g){var O=s==null?0:s.length;return O?(c=g||c===r?1:De(c),mr(s,c<0?0:c,O)):[]}function YF(s,c,g){var O=s==null?0:s.length;return O?(c=g||c===r?1:De(c),c=O-c,mr(s,0,c<0?0:c)):[]}function XF(s,c){return s&&s.length?Bs(s,Ie(c,3),!0,!0):[]}function ZF(s,c){return s&&s.length?Bs(s,Ie(c,3),!0):[]}function JF(s,c,g,O){var P=s==null?0:s.length;return P?(g&&typeof g!="number"&&kt(s,c,g)&&(g=0,O=P),UB(s,c,g,O)):[]}function s1(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var P=g==null?0:De(g);return P<0&&(P=St(O+P,0)),ys(s,Ie(c,3),P)}function u1(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var P=O-1;return g!==r&&(P=De(g),P=g<0?St(O+P,0):At(P,O-1)),ys(s,Ie(c,3),P,!0)}function c1(s){var c=s==null?0:s.length;return c?Pt(s,1):[]}function QF(s){var c=s==null?0:s.length;return c?Pt(s,Z):[]}function e$(s,c){var g=s==null?0:s.length;return g?(c=c===r?1:De(c),Pt(s,c)):[]}function t$(s){for(var c=-1,g=s==null?0:s.length,O={};++c<g;){var P=s[c];Wr(O,P[0],P[1])}return O}function l1(s){return s&&s.length?s[0]:r}function r$(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var P=g==null?0:De(g);return P<0&&(P=St(O+P,0)),ki(s,c,P)}function n$(s){var c=s==null?0:s.length;return c?mr(s,0,-1):[]}var i$=qe(function(s){var c=st(s,mf);return c.length&&c[0]===s[0]?sf(c):[]}),o$=qe(function(s){var c=yr(s),g=st(s,mf);return c===yr(g)?c=r:g.pop(),g.length&&g[0]===s[0]?sf(g,Ie(c,2)):[]}),a$=qe(function(s){var c=yr(s),g=st(s,mf);return c=typeof c=="function"?c:r,c&&g.pop(),g.length&&g[0]===s[0]?sf(g,r,c):[]});function s$(s,c){return s==null?"":nB.call(s,c)}function yr(s){var c=s==null?0:s.length;return c?s[c-1]:r}function u$(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var P=O;return g!==r&&(P=De(g),P=P<0?St(O+P,0):At(P,O-1)),c===c?$L(s,c,P):ys(s,Uw,P,!0)}function c$(s,c){return s&&s.length?w_(s,De(c)):r}var l$=qe(f1);function f1(s,c){return s&&s.length&&c&&c.length?ff(s,c):s}function f$(s,c,g){return s&&s.length&&c&&c.length?ff(s,c,Ie(g,2)):s}function d$(s,c,g){return s&&s.length&&c&&c.length?ff(s,c,r,g):s}var h$=dn(function(s,c){var g=s==null?0:s.length,O=rf(s,c);return S_(s,st(c,function(P){return hn(P,g)?+P:P}).sort(D_)),O});function p$(s,c){var g=[];if(!(s&&s.length))return g;var O=-1,P=[],q=s.length;for(c=Ie(c,3);++O<q;){var V=s[O];c(V,O,s)&&(g.push(V),P.push(O))}return S_(s,P),g}function Tf(s){return s==null?s:sB.call(s)}function v$(s,c,g){var O=s==null?0:s.length;return O?(g&&typeof g!="number"&&kt(s,c,g)?(c=0,g=O):(c=c==null?0:De(c),g=g===r?O:De(g)),mr(s,c,g)):[]}function g$(s,c){return Ls(s,c)}function m$(s,c,g){return pf(s,c,Ie(g,2))}function y$(s,c){var g=s==null?0:s.length;if(g){var O=Ls(s,c);if(O<g&&Dr(s[O],c))return O}return-1}function b$(s,c){return Ls(s,c,!0)}function x$(s,c,g){return pf(s,c,Ie(g,2),!0)}function w$(s,c){var g=s==null?0:s.length;if(g){var O=Ls(s,c,!0)-1;if(Dr(s[O],c))return O}return-1}function _$(s){return s&&s.length?C_(s):[]}function E$(s,c){return s&&s.length?C_(s,Ie(c,2)):[]}function S$(s){var c=s==null?0:s.length;return c?mr(s,1,c):[]}function O$(s,c,g){return s&&s.length?(c=g||c===r?1:De(c),mr(s,0,c<0?0:c)):[]}function C$(s,c,g){var O=s==null?0:s.length;return O?(c=g||c===r?1:De(c),c=O-c,mr(s,c<0?0:c,O)):[]}function R$(s,c){return s&&s.length?Bs(s,Ie(c,3),!1,!0):[]}function I$(s,c){return s&&s.length?Bs(s,Ie(c,3)):[]}var P$=qe(function(s){return An(Pt(s,1,pt,!0))}),N$=qe(function(s){var c=yr(s);return pt(c)&&(c=r),An(Pt(s,1,pt,!0),Ie(c,2))}),T$=qe(function(s){var c=yr(s);return c=typeof c=="function"?c:r,An(Pt(s,1,pt,!0),r,c)});function A$(s){return s&&s.length?An(s):[]}function M$(s,c){return s&&s.length?An(s,Ie(c,2)):[]}function D$(s,c){return c=typeof c=="function"?c:r,s&&s.length?An(s,r,c):[]}function Af(s){if(!(s&&s.length))return[];var c=0;return s=Rn(s,function(g){if(pt(g))return c=St(g.length,c),!0}),Kl(c,function(g){return st(s,Vl(g))})}function d1(s,c){if(!(s&&s.length))return[];var g=Af(s);return c==null?g:st(g,function(O){return Qt(c,r,O)})}var j$=qe(function(s,c){return pt(s)?Go(s,c):[]}),q$=qe(function(s){return gf(Rn(s,pt))}),k$=qe(function(s){var c=yr(s);return pt(c)&&(c=r),gf(Rn(s,pt),Ie(c,2))}),L$=qe(function(s){var c=yr(s);return c=typeof c=="function"?c:r,gf(Rn(s,pt),r,c)}),B$=qe(Af);function F$(s,c){return N_(s||[],c||[],Wo)}function $$(s,c){return N_(s||[],c||[],Xo)}var z$=qe(function(s){var c=s.length,g=c>1?s[c-1]:r;return g=typeof g=="function"?(s.pop(),g):r,d1(s,g)});function h1(s){var c=M(s);return c.__chain__=!0,c}function H$(s,c){return c(s),s}function Ks(s,c){return c(s)}var U$=dn(function(s){var c=s.length,g=c?s[0]:0,O=this.__wrapped__,P=function(q){return rf(q,s)};return c>1||this.__actions__.length||!(O instanceof Be)||!hn(g)?this.thru(P):(O=O.slice(g,+g+(c?1:0)),O.__actions__.push({func:Ks,args:[P],thisArg:r}),new vr(O,this.__chain__).thru(function(q){return c&&!q.length&&q.push(r),q}))});function V$(){return h1(this)}function W$(){return new vr(this.value(),this.__chain__)}function G$(){this.__values__===r&&(this.__values__=R1(this.value()));var s=this.__index__>=this.__values__.length,c=s?r:this.__values__[this.__index__++];return{done:s,value:c}}function K$(){return this}function Y$(s){for(var c,g=this;g instanceof Ms;){var O=a1(g);O.__index__=0,O.__values__=r,c?P.__wrapped__=O:c=O;var P=O;g=g.__wrapped__}return P.__wrapped__=s,c}function X$(){var s=this.__wrapped__;if(s instanceof Be){var c=s;return this.__actions__.length&&(c=new Be(this)),c=c.reverse(),c.__actions__.push({func:Ks,args:[Tf],thisArg:r}),new vr(c,this.__chain__)}return this.thru(Tf)}function Z$(){return P_(this.__wrapped__,this.__actions__)}var J$=Fs(function(s,c,g){Ge.call(s,g)?++s[g]:Wr(s,g,1)});function Q$(s,c,g){var O=Me(s)?zw:HB;return g&&kt(s,c,g)&&(c=r),O(s,Ie(c,3))}function e3(s,c){var g=Me(s)?Rn:d_;return g(s,Ie(c,3))}var t3=F_(s1),r3=F_(u1);function n3(s,c){return Pt(Ys(s,c),1)}function i3(s,c){return Pt(Ys(s,c),Z)}function o3(s,c,g){return g=g===r?1:De(g),Pt(Ys(s,c),g)}function p1(s,c){var g=Me(s)?er:Tn;return g(s,Ie(c,3))}function v1(s,c){var g=Me(s)?SL:f_;return g(s,Ie(c,3))}var a3=Fs(function(s,c,g){Ge.call(s,g)?s[g].push(c):Wr(s,g,[c])});function s3(s,c,g,O){s=Ht(s)?s:Yi(s),g=g&&!O?De(g):0;var P=s.length;return g<0&&(g=St(P+g,0)),eu(s)?g<=P&&s.indexOf(c,g)>-1:!!P&&ki(s,c,g)>-1}var u3=qe(function(s,c,g){var O=-1,P=typeof c=="function",q=Ht(s)?ue(s.length):[];return Tn(s,function(V){q[++O]=P?Qt(c,V,g):Ko(V,c,g)}),q}),c3=Fs(function(s,c,g){Wr(s,g,c)});function Ys(s,c){var g=Me(s)?st:y_;return g(s,Ie(c,3))}function l3(s,c,g,O){return s==null?[]:(Me(c)||(c=c==null?[]:[c]),g=O?r:g,Me(g)||(g=g==null?[]:[g]),__(s,c,g))}var f3=Fs(function(s,c,g){s[g?0:1].push(c)},function(){return[[],[]]});function d3(s,c,g){var O=Me(s)?Hl:Ww,P=arguments.length<3;return O(s,Ie(c,4),g,P,Tn)}function h3(s,c,g){var O=Me(s)?OL:Ww,P=arguments.length<3;return O(s,Ie(c,4),g,P,f_)}function p3(s,c){var g=Me(s)?Rn:d_;return g(s,Js(Ie(c,3)))}function v3(s){var c=Me(s)?s_:sF;return c(s)}function g3(s,c,g){(g?kt(s,c,g):c===r)?c=1:c=De(c);var O=Me(s)?LB:uF;return O(s,c)}function m3(s){var c=Me(s)?BB:lF;return c(s)}function y3(s){if(s==null)return 0;if(Ht(s))return eu(s)?Bi(s):s.length;var c=Mt(s);return c==_e||c==Fe?s.size:cf(s).length}function b3(s,c,g){var O=Me(s)?Ul:fF;return g&&kt(s,c,g)&&(c=r),O(s,Ie(c,3))}var x3=qe(function(s,c){if(s==null)return[];var g=c.length;return g>1&&kt(s,c[0],c[1])?c=[]:g>2&&kt(c[0],c[1],c[2])&&(c=[c[0]]),__(s,Pt(c,1),[])}),Xs=eB||function(){return It.Date.now()};function w3(s,c){if(typeof c!="function")throw new pr(a);return s=De(s),function(){if(--s<1)return c.apply(this,arguments)}}function g1(s,c,g){return c=g?r:c,c=s&&c==null?s.length:c,fn(s,N,r,r,r,r,c)}function m1(s,c){var g;if(typeof c!="function")throw new pr(a);return s=De(s),function(){return--s>0&&(g=c.apply(this,arguments)),s<=1&&(c=r),g}}var Mf=qe(function(s,c,g){var O=b;if(g.length){var P=Pn(g,Gi(Mf));O|=R}return fn(s,O,c,g,P)}),y1=qe(function(s,c,g){var O=b|w;if(g.length){var P=Pn(g,Gi(y1));O|=R}return fn(c,O,s,g,P)});function b1(s,c,g){c=g?r:c;var O=fn(s,_,r,r,r,r,r,c);return O.placeholder=b1.placeholder,O}function x1(s,c,g){c=g?r:c;var O=fn(s,S,r,r,r,r,r,c);return O.placeholder=x1.placeholder,O}function w1(s,c,g){var O,P,q,V,Y,ne,pe=0,ge=!1,me=!1,xe=!0;if(typeof s!="function")throw new pr(a);c=br(c)||0,ft(g)&&(ge=!!g.leading,me="maxWait"in g,q=me?St(br(g.maxWait)||0,c):q,xe="trailing"in g?!!g.trailing:xe);function Oe(vt){var jr=O,gn=P;return O=P=r,pe=vt,V=s.apply(gn,jr),V}function Ne(vt){return pe=vt,Y=Qo(ke,c),ge?Oe(vt):V}function je(vt){var jr=vt-ne,gn=vt-pe,$1=c-jr;return me?At($1,q-gn):$1}function Re(vt){var jr=vt-ne,gn=vt-pe;return ne===r||jr>=c||jr<0||me&&gn>=q}function ke(){var vt=Xs();if(Re(vt))return $e(vt);Y=Qo(ke,je(vt))}function $e(vt){return Y=r,xe&&O?Oe(vt):(O=P=r,V)}function ir(){Y!==r&&T_(Y),pe=0,O=ne=P=Y=r}function Lt(){return Y===r?V:$e(Xs())}function or(){var vt=Xs(),jr=Re(vt);if(O=arguments,P=this,ne=vt,jr){if(Y===r)return Ne(ne);if(me)return T_(Y),Y=Qo(ke,c),Oe(ne)}return Y===r&&(Y=Qo(ke,c)),V}return or.cancel=ir,or.flush=Lt,or}var _3=qe(function(s,c){return l_(s,1,c)}),E3=qe(function(s,c,g){return l_(s,br(c)||0,g)});function S3(s){return fn(s,L)}function Zs(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new pr(a);var g=function(){var O=arguments,P=c?c.apply(this,O):O[0],q=g.cache;if(q.has(P))return q.get(P);var V=s.apply(this,O);return g.cache=q.set(P,V)||q,V};return g.cache=new(Zs.Cache||ln),g}Zs.Cache=ln;function Js(s){if(typeof s!="function")throw new pr(a);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}function O3(s){return m1(2,s)}var C3=dF(function(s,c){c=c.length==1&&Me(c[0])?st(c[0],tr(Ie())):st(Pt(c,1),tr(Ie()));var g=c.length;return qe(function(O){for(var P=-1,q=At(O.length,g);++P<q;)O[P]=c[P].call(this,O[P]);return Qt(s,this,O)})}),Df=qe(function(s,c){var g=Pn(c,Gi(Df));return fn(s,R,r,c,g)}),_1=qe(function(s,c){var g=Pn(c,Gi(_1));return fn(s,I,r,c,g)}),R3=dn(function(s,c){return fn(s,A,r,r,r,c)});function I3(s,c){if(typeof s!="function")throw new pr(a);return c=c===r?c:De(c),qe(s,c)}function P3(s,c){if(typeof s!="function")throw new pr(a);return c=c==null?0:St(De(c),0),qe(function(g){var O=g[c],P=Dn(g,0,c);return O&&In(P,O),Qt(s,this,P)})}function N3(s,c,g){var O=!0,P=!0;if(typeof s!="function")throw new pr(a);return ft(g)&&(O="leading"in g?!!g.leading:O,P="trailing"in g?!!g.trailing:P),w1(s,c,{leading:O,maxWait:c,trailing:P})}function T3(s){return g1(s,1)}function A3(s,c){return Df(yf(c),s)}function M3(){if(!arguments.length)return[];var s=arguments[0];return Me(s)?s:[s]}function D3(s){return gr(s,m)}function j3(s,c){return c=typeof c=="function"?c:r,gr(s,m,c)}function q3(s){return gr(s,p|m)}function k3(s,c){return c=typeof c=="function"?c:r,gr(s,p|m,c)}function L3(s,c){return c==null||c_(s,c,Ct(c))}function Dr(s,c){return s===c||s!==s&&c!==c}var B3=Us(af),F3=Us(function(s,c){return s>=c}),ai=v_((function(){return arguments})())?v_:function(s){return dt(s)&&Ge.call(s,"callee")&&!t_.call(s,"callee")},Me=ue.isArray,$3=qw?tr(qw):YB;function Ht(s){return s!=null&&Qs(s.length)&&!pn(s)}function pt(s){return dt(s)&&Ht(s)}function z3(s){return s===!0||s===!1||dt(s)&&qt(s)==re}var jn=rB||Wf,H3=kw?tr(kw):XB;function U3(s){return dt(s)&&s.nodeType===1&&!ea(s)}function V3(s){if(s==null)return!0;if(Ht(s)&&(Me(s)||typeof s=="string"||typeof s.splice=="function"||jn(s)||Ki(s)||ai(s)))return!s.length;var c=Mt(s);if(c==_e||c==Fe)return!s.size;if(Jo(s))return!cf(s).length;for(var g in s)if(Ge.call(s,g))return!1;return!0}function W3(s,c){return Yo(s,c)}function G3(s,c,g){g=typeof g=="function"?g:r;var O=g?g(s,c):r;return O===r?Yo(s,c,r,g):!!O}function jf(s){if(!dt(s))return!1;var c=qt(s);return c==ce||c==se||typeof s.message=="string"&&typeof s.name=="string"&&!ea(s)}function K3(s){return typeof s=="number"&&n_(s)}function pn(s){if(!ft(s))return!1;var c=qt(s);return c==be||c==Ce||c==z||c==Ze}function E1(s){return typeof s=="number"&&s==De(s)}function Qs(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Q}function ft(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function dt(s){return s!=null&&typeof s=="object"}var S1=Lw?tr(Lw):JB;function Y3(s,c){return s===c||uf(s,c,Of(c))}function X3(s,c,g){return g=typeof g=="function"?g:r,uf(s,c,Of(c),g)}function Z3(s){return O1(s)&&s!=+s}function J3(s){if(jF(s))throw new Ae(o);return g_(s)}function Q3(s){return s===null}function e5(s){return s==null}function O1(s){return typeof s=="number"||dt(s)&&qt(s)==he}function ea(s){if(!dt(s)||qt(s)!=Ee)return!1;var c=Cs(s);if(c===null)return!0;var g=Ge.call(c,"constructor")&&c.constructor;return typeof g=="function"&&g instanceof g&&_s.call(g)==XL}var qf=Bw?tr(Bw):QB;function t5(s){return E1(s)&&s>=-Q&&s<=Q}var C1=Fw?tr(Fw):eF;function eu(s){return typeof s=="string"||!Me(s)&&dt(s)&&qt(s)==Ue}function nr(s){return typeof s=="symbol"||dt(s)&&qt(s)==ct}var Ki=$w?tr($w):tF;function r5(s){return s===r}function n5(s){return dt(s)&&Mt(s)==mt}function i5(s){return dt(s)&&qt(s)==yt}var o5=Us(lf),a5=Us(function(s,c){return s<=c});function R1(s){if(!s)return[];if(Ht(s))return eu(s)?Tr(s):zt(s);if($o&&s[$o])return LL(s[$o]());var c=Mt(s),g=c==_e?Xl:c==Fe?bs:Yi;return g(s)}function vn(s){if(!s)return s===0?s:0;if(s=br(s),s===Z||s===-Z){var c=s<0?-1:1;return c*W}return s===s?s:0}function De(s){var c=vn(s),g=c%1;return c===c?g?c-g:c:0}function I1(s){return s?ri(De(s),0,oe):0}function br(s){if(typeof s=="number")return s;if(nr(s))return ee;if(ft(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=ft(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=Gw(s);var g=El.test(s);return g||Ol.test(s)?wL(s.slice(2),g?2:8):_l.test(s)?ee:+s}function P1(s){return Kr(s,Ut(s))}function s5(s){return s?ri(De(s),-Q,Q):s===0?s:0}function Ke(s){return s==null?"":rr(s)}var u5=Vi(function(s,c){if(Jo(c)||Ht(c)){Kr(c,Ct(c),s);return}for(var g in c)Ge.call(c,g)&&Wo(s,g,c[g])}),N1=Vi(function(s,c){Kr(c,Ut(c),s)}),T1=Vi(function(s,c,g,O){Kr(c,Ut(c),s,O)}),kf=Vi(function(s,c,g,O){Kr(c,Ct(c),s,O)}),c5=dn(rf);function l5(s,c){var g=Ui(s);return c==null?g:u_(g,c)}var f5=qe(function(s,c){s=et(s);var g=-1,O=c.length,P=O>2?c[2]:r;for(P&&kt(c[0],c[1],P)&&(O=1);++g<O;)for(var q=c[g],V=Ut(q),Y=-1,ne=V.length;++Y<ne;){var pe=V[Y],ge=s[pe];(ge===r||Dr(ge,$i[pe])&&!Ge.call(s,pe))&&(s[pe]=q[pe])}return s}),d5=qe(function(s){return s.push(r,G_),Qt(A1,r,s)});function h5(s,c){return Hw(s,Ie(c,3),Gr)}function p5(s,c){return Hw(s,Ie(c,3),of)}function v5(s,c){return s==null?s:nf(s,Ie(c,3),Ut)}function g5(s,c){return s==null?s:h_(s,Ie(c,3),Ut)}function m5(s,c){return s&&Gr(s,Ie(c,3))}function y5(s,c){return s&&of(s,Ie(c,3))}function b5(s){return s==null?[]:qs(s,Ct(s))}function x5(s){return s==null?[]:qs(s,Ut(s))}function Lf(s,c,g){var O=s==null?r:ni(s,c);return O===r?g:O}function w5(s,c){return s!=null&&X_(s,c,VB)}function Bf(s,c){return s!=null&&X_(s,c,WB)}var _5=z_(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Es.call(c)),s[c]=g},$f(Vt)),E5=z_(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Es.call(c)),Ge.call(s,c)?s[c].push(g):s[c]=[g]},Ie),S5=qe(Ko);function Ct(s){return Ht(s)?a_(s):cf(s)}function Ut(s){return Ht(s)?a_(s,!0):rF(s)}function O5(s,c){var g={};return c=Ie(c,3),Gr(s,function(O,P,q){Wr(g,c(O,P,q),O)}),g}function C5(s,c){var g={};return c=Ie(c,3),Gr(s,function(O,P,q){Wr(g,P,c(O,P,q))}),g}var R5=Vi(function(s,c,g){ks(s,c,g)}),A1=Vi(function(s,c,g,O){ks(s,c,g,O)}),I5=dn(function(s,c){var g={};if(s==null)return g;var O=!1;c=st(c,function(q){return q=Mn(q,s),O||(O=q.length>1),q}),Kr(s,Ef(s),g),O&&(g=gr(g,p|v|m,EF));for(var P=c.length;P--;)vf(g,c[P]);return g});function P5(s,c){return M1(s,Js(Ie(c)))}var N5=dn(function(s,c){return s==null?{}:iF(s,c)});function M1(s,c){if(s==null)return{};var g=st(Ef(s),function(O){return[O]});return c=Ie(c),E_(s,g,function(O,P){return c(O,P[0])})}function T5(s,c,g){c=Mn(c,s);var O=-1,P=c.length;for(P||(P=1,s=r);++O<P;){var q=s==null?r:s[Mr(c[O])];q===r&&(O=P,q=g),s=pn(q)?q.call(s):q}return s}function A5(s,c,g){return s==null?s:Xo(s,c,g)}function M5(s,c,g,O){return O=typeof O=="function"?O:r,s==null?s:Xo(s,c,g,O)}var D1=V_(Ct),j1=V_(Ut);function D5(s,c,g){var O=Me(s),P=O||jn(s)||Ki(s);if(c=Ie(c,4),g==null){var q=s&&s.constructor;P?g=O?new q:[]:ft(s)?g=pn(q)?Ui(Cs(s)):{}:g={}}return(P?er:Gr)(s,function(V,Y,ne){return c(g,V,Y,ne)}),g}function j5(s,c){return s==null?!0:vf(s,c)}function q5(s,c,g){return s==null?s:I_(s,c,yf(g))}function k5(s,c,g,O){return O=typeof O=="function"?O:r,s==null?s:I_(s,c,yf(g),O)}function Yi(s){return s==null?[]:Yl(s,Ct(s))}function L5(s){return s==null?[]:Yl(s,Ut(s))}function B5(s,c,g){return g===r&&(g=c,c=r),g!==r&&(g=br(g),g=g===g?g:0),c!==r&&(c=br(c),c=c===c?c:0),ri(br(s),c,g)}function F5(s,c,g){return c=vn(c),g===r?(g=c,c=0):g=vn(g),s=br(s),GB(s,c,g)}function $5(s,c,g){if(g&&typeof g!="boolean"&&kt(s,c,g)&&(c=g=r),g===r&&(typeof c=="boolean"?(g=c,c=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&c===r?(s=0,c=1):(s=vn(s),c===r?(c=s,s=0):c=vn(c)),s>c){var O=s;s=c,c=O}if(g||s%1||c%1){var P=i_();return At(s+P*(c-s+xL("1e-"+((P+"").length-1))),c)}return df(s,c)}var z5=Wi(function(s,c,g){return c=c.toLowerCase(),s+(g?q1(c):c)});function q1(s){return Ff(Ke(s).toLowerCase())}function k1(s){return s=Ke(s),s&&s.replace(Rl,ML).replace(lL,"")}function H5(s,c,g){s=Ke(s),c=rr(c);var O=s.length;g=g===r?O:ri(De(g),0,O);var P=g;return g-=c.length,g>=0&&s.slice(g,P)==c}function U5(s){return s=Ke(s),s&&fl.test(s)?s.replace(is,DL):s}function V5(s){return s=Ke(s),s&&vl.test(s)?s.replace(Ai,"\\$&"):s}var W5=Wi(function(s,c,g){return s+(g?"-":"")+c.toLowerCase()}),G5=Wi(function(s,c,g){return s+(g?" ":"")+c.toLowerCase()}),K5=B_("toLowerCase");function Y5(s,c,g){s=Ke(s),c=De(c);var O=c?Bi(s):0;if(!c||O>=c)return s;var P=(c-O)/2;return Hs(Ns(P),g)+s+Hs(Ps(P),g)}function X5(s,c,g){s=Ke(s),c=De(c);var O=c?Bi(s):0;return c&&O<c?s+Hs(c-O,g):s}function Z5(s,c,g){s=Ke(s),c=De(c);var O=c?Bi(s):0;return c&&O<c?Hs(c-O,g)+s:s}function J5(s,c,g){return g||c==null?c=0:c&&(c=+c),aB(Ke(s).replace(Mi,""),c||0)}function Q5(s,c,g){return(g?kt(s,c,g):c===r)?c=1:c=De(c),hf(Ke(s),c)}function ez(){var s=arguments,c=Ke(s[0]);return s.length<3?c:c.replace(s[1],s[2])}var tz=Wi(function(s,c,g){return s+(g?"_":"")+c.toLowerCase()});function rz(s,c,g){return g&&typeof g!="number"&&kt(s,c,g)&&(c=g=r),g=g===r?oe:g>>>0,g?(s=Ke(s),s&&(typeof c=="string"||c!=null&&!qf(c))&&(c=rr(c),!c&&Li(s))?Dn(Tr(s),0,g):s.split(c,g)):[]}var nz=Wi(function(s,c,g){return s+(g?" ":"")+Ff(c)});function iz(s,c,g){return s=Ke(s),g=g==null?0:ri(De(g),0,s.length),c=rr(c),s.slice(g,g+c.length)==c}function oz(s,c,g){var O=M.templateSettings;g&&kt(s,c,g)&&(c=r),s=Ke(s),c=kf({},c,O,W_);var P=kf({},c.imports,O.imports,W_),q=Ct(P),V=Yl(P,q);er(q,function(Re){if(cs.test(Re))throw new Ae(l)});var Y,ne,pe=0,ge=c.interpolate||Xn,me="__p += '",xe=Zl((c.escape||Xn).source+"|"+ge.source+"|"+(ge===Do?wl:Xn).source+"|"+(c.evaluate||Xn).source+"|$","g"),Oe="//# sourceURL="+(Ge.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vL+"]")+`
50
- `;s.replace(xe,function(Re,ke,$e,ir,Lt,or){return $e||($e=ir),me+=s.slice(pe,or).replace(Il,jL),ke&&(Y=!0,me+=`' +
51
- __e(`+ke+`) +
52
- '`),Lt&&(ne=!0,me+=`';
53
- `+Lt+`;
54
- __p += '`),$e&&(me+=`' +
55
- ((__t = (`+$e+`)) == null ? '' : __t) +
56
- '`),pe=or+Re.length,Re}),me+=`';
57
- `;var Ne=Ge.call(c,"variable")&&c.variable;if(!Ne)me=`with (obj) {
58
- `+me+`
70
+ */var Woe=Hs.exports,kP;function Uoe(){return kP||(kP=1,(function(e,t){(function(){var r,n="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",p=1,v=2,x=4,g=1,b=2,w=1,y=2,_=4,E=8,S=16,I=32,N=64,T=128,k=256,z=512,L=30,K="...",G=800,A=16,Y=1,B=2,X=3,U=1/0,re=9007199254740991,j=17976931348623157e292,W=NaN,Z=4294967295,J=Z-1,M=Z>>>1,H=[["ary",T],["bind",w],["bindKey",y],["curry",E],["curryRight",S],["flip",z],["partial",I],["partialRight",N],["rearg",k]],q="[object Arguments]",D="[object Array]",V="[object AsyncFunction]",Q="[object Boolean]",ne="[object Date]",ce="[object DOMException]",ee="[object Error]",pe="[object Function]",ue="[object GeneratorFunction]",xe="[object Map]",le="[object Number]",ie="[object Null]",me="[object Object]",_e="[object Promise]",Ce="[object Proxy]",je="[object RegExp]",Pe="[object Set]",Te="[object String]",Be="[object Symbol]",rt="[object Undefined]",$e="[object WeakMap]",Ye="[object WeakSet]",qe="[object ArrayBuffer]",Xe="[object DataView]",Ue="[object Float32Array]",sr="[object Float64Array]",Ut="[object Int8Array]",nt="[object Int16Array]",Ct="[object Int32Array]",yr="[object Uint8Array]",sn="[object Uint8ClampedArray]",Tr="[object Uint16Array]",pr="[object Uint32Array]",Rn=/\b__p \+= '';/g,Ii=/\b(__p \+=) '' \+/g,At=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Tt=/&(?:amp|lt|gt|quot|#39);/g,St=/[&<>"']/g,lr=RegExp(Tt.source),tr=RegExp(St.source),Dt=/<%-([\s\S]+?)%>/g,rr=/<%([\s\S]+?)%>/g,xr=/<%=([\s\S]+?)%>/g,It=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/,wr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ft=/[\\^$.*+?()[\]{}|]/g,Pr=RegExp(Ft.source),jt=/^\s+/,kr=/\s/,Wn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Va=/\{\n\/\* \[wrapped with (.+)\] \*/,et=/,? & /,Pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,qo=/[()=,{}\[\]\/\s]/,$t=/\\(\\)?/g,Gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nn=/\w*$/,cr=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,cn=/^\[object .+?Constructor\]$/,un=/^0o[0-7]+$/i,Un=/^(?:0|[1-9]\d*)$/,Ri=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,li=/($^)/,Wa=/['\n\r\u2028\u2029\\]/g,Lo="\\ud800-\\udfff",of="\\u0300-\\u036f",Dl="\\ufe20-\\ufe2f",af="\\u20d0-\\u20ff",Ua=of+Dl+af,jl="\\u2700-\\u27bf",Ga="a-z\\xdf-\\xf6\\xf8-\\xff",sf="\\xac\\xb1\\xd7\\xf7",ql="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lf="\\u2000-\\u206f",cf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ka="A-Z\\xc0-\\xd6\\xd8-\\xde",Ll="\\ufe0e\\ufe0f",zl=sf+ql+lf+cf,Ya="['’]",uf="["+Lo+"]",Xa="["+zl+"]",zo="["+Ua+"]",no="\\d+",df="["+jl+"]",Bl="["+Ga+"]",sS="[^"+Lo+zl+no+jl+Ga+Ka+"]",ff="\\ud83c[\\udffb-\\udfff]",tz="(?:"+zo+"|"+ff+")",lS="[^"+Lo+"]",hf="(?:\\ud83c[\\udde6-\\uddff]){2}",pf="[\\ud800-\\udbff][\\udc00-\\udfff]",Bo="["+Ka+"]",cS="\\u200d",uS="(?:"+Bl+"|"+sS+")",rz="(?:"+Bo+"|"+sS+")",dS="(?:"+Ya+"(?:d|ll|m|re|s|t|ve))?",fS="(?:"+Ya+"(?:D|LL|M|RE|S|T|VE))?",hS=tz+"?",pS="["+Ll+"]?",nz="(?:"+cS+"(?:"+[lS,hf,pf].join("|")+")"+pS+hS+")*",iz="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oz="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vS=pS+hS+nz,az="(?:"+[df,hf,pf].join("|")+")"+vS,sz="(?:"+[lS+zo+"?",zo,hf,pf,uf].join("|")+")",lz=RegExp(Ya,"g"),cz=RegExp(zo,"g"),vf=RegExp(ff+"(?="+ff+")|"+sz+vS,"g"),uz=RegExp([Bo+"?"+Bl+"+"+dS+"(?="+[Xa,Bo,"$"].join("|")+")",rz+"+"+fS+"(?="+[Xa,Bo+uS,"$"].join("|")+")",Bo+"?"+uS+"+"+dS,Bo+"+"+fS,oz,iz,no,az].join("|"),"g"),dz=RegExp("["+cS+Lo+Ua+Ll+"]"),fz=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hz=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pz=-1,_t={};_t[Ue]=_t[sr]=_t[Ut]=_t[nt]=_t[Ct]=_t[yr]=_t[sn]=_t[Tr]=_t[pr]=!0,_t[q]=_t[D]=_t[qe]=_t[Q]=_t[Xe]=_t[ne]=_t[ee]=_t[pe]=_t[xe]=_t[le]=_t[me]=_t[je]=_t[Pe]=_t[Te]=_t[$e]=!1;var yt={};yt[q]=yt[D]=yt[qe]=yt[Xe]=yt[Q]=yt[ne]=yt[Ue]=yt[sr]=yt[Ut]=yt[nt]=yt[Ct]=yt[xe]=yt[le]=yt[me]=yt[je]=yt[Pe]=yt[Te]=yt[Be]=yt[yr]=yt[sn]=yt[Tr]=yt[pr]=!0,yt[ee]=yt[pe]=yt[$e]=!1;var vz={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},gz={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mz={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},bz={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yz=parseFloat,xz=parseInt,gS=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,wz=typeof self=="object"&&self&&self.Object===Object&&self,ur=gS||wz||Function("return this")(),gf=t&&!t.nodeType&&t,io=gf&&!0&&e&&!e.nodeType&&e,mS=io&&io.exports===gf,mf=mS&&gS.process,dn=(function(){try{var ae=io&&io.require&&io.require("util").types;return ae||mf&&mf.binding&&mf.binding("util")}catch{}})(),bS=dn&&dn.isArrayBuffer,yS=dn&&dn.isDate,xS=dn&&dn.isMap,wS=dn&&dn.isRegExp,_S=dn&&dn.isSet,SS=dn&&dn.isTypedArray;function Gr(ae,he,de){switch(de.length){case 0:return ae.call(he);case 1:return ae.call(he,de[0]);case 2:return ae.call(he,de[0],de[1]);case 3:return ae.call(he,de[0],de[1],de[2])}return ae.apply(he,de)}function _z(ae,he,de,Oe){for(var Le=-1,it=ae==null?0:ae.length;++Le<it;){var Kt=ae[Le];he(Oe,Kt,de(Kt),ae)}return Oe}function Kr(ae,he){for(var de=-1,Oe=ae==null?0:ae.length;++de<Oe&&he(ae[de],de,ae)!==!1;);return ae}function Sz(ae,he){for(var de=ae==null?0:ae.length;de--&&he(ae[de],de,ae)!==!1;);return ae}function ES(ae,he){for(var de=-1,Oe=ae==null?0:ae.length;++de<Oe;)if(!he(ae[de],de,ae))return!1;return!0}function Ni(ae,he){for(var de=-1,Oe=ae==null?0:ae.length,Le=0,it=[];++de<Oe;){var Kt=ae[de];he(Kt,de,ae)&&(it[Le++]=Kt)}return it}function Fl(ae,he){var de=ae==null?0:ae.length;return!!de&&Fo(ae,he,0)>-1}function bf(ae,he,de){for(var Oe=-1,Le=ae==null?0:ae.length;++Oe<Le;)if(de(he,ae[Oe]))return!0;return!1}function Et(ae,he){for(var de=-1,Oe=ae==null?0:ae.length,Le=Array(Oe);++de<Oe;)Le[de]=he(ae[de],de,ae);return Le}function Ti(ae,he){for(var de=-1,Oe=he.length,Le=ae.length;++de<Oe;)ae[Le+de]=he[de];return ae}function yf(ae,he,de,Oe){var Le=-1,it=ae==null?0:ae.length;for(Oe&&it&&(de=ae[++Le]);++Le<it;)de=he(de,ae[Le],Le,ae);return de}function Ez(ae,he,de,Oe){var Le=ae==null?0:ae.length;for(Oe&&Le&&(de=ae[--Le]);Le--;)de=he(de,ae[Le],Le,ae);return de}function xf(ae,he){for(var de=-1,Oe=ae==null?0:ae.length;++de<Oe;)if(he(ae[de],de,ae))return!0;return!1}var Oz=wf("length");function Cz(ae){return ae.split("")}function Iz(ae){return ae.match(Pt)||[]}function OS(ae,he,de){var Oe;return de(ae,function(Le,it,Kt){if(he(Le,it,Kt))return Oe=it,!1}),Oe}function $l(ae,he,de,Oe){for(var Le=ae.length,it=de+(Oe?1:-1);Oe?it--:++it<Le;)if(he(ae[it],it,ae))return it;return-1}function Fo(ae,he,de){return he===he?zz(ae,he,de):$l(ae,CS,de)}function Rz(ae,he,de,Oe){for(var Le=de-1,it=ae.length;++Le<it;)if(Oe(ae[Le],he))return Le;return-1}function CS(ae){return ae!==ae}function IS(ae,he){var de=ae==null?0:ae.length;return de?Sf(ae,he)/de:W}function wf(ae){return function(he){return he==null?r:he[ae]}}function _f(ae){return function(he){return ae==null?r:ae[he]}}function RS(ae,he,de,Oe,Le){return Le(ae,function(it,Kt,gt){de=Oe?(Oe=!1,it):he(de,it,Kt,gt)}),de}function Nz(ae,he){var de=ae.length;for(ae.sort(he);de--;)ae[de]=ae[de].value;return ae}function Sf(ae,he){for(var de,Oe=-1,Le=ae.length;++Oe<Le;){var it=he(ae[Oe]);it!==r&&(de=de===r?it:de+it)}return de}function Ef(ae,he){for(var de=-1,Oe=Array(ae);++de<ae;)Oe[de]=he(de);return Oe}function Tz(ae,he){return Et(he,function(de){return[de,ae[de]]})}function NS(ae){return ae&&ae.slice(0,MS(ae)+1).replace(jt,"")}function Yr(ae){return function(he){return ae(he)}}function Of(ae,he){return Et(he,function(de){return ae[de]})}function Za(ae,he){return ae.has(he)}function TS(ae,he){for(var de=-1,Oe=ae.length;++de<Oe&&Fo(he,ae[de],0)>-1;);return de}function PS(ae,he){for(var de=ae.length;de--&&Fo(he,ae[de],0)>-1;);return de}function Pz(ae,he){for(var de=ae.length,Oe=0;de--;)ae[de]===he&&++Oe;return Oe}var kz=_f(vz),Mz=_f(gz);function Az(ae){return"\\"+bz[ae]}function Dz(ae,he){return ae==null?r:ae[he]}function $o(ae){return dz.test(ae)}function jz(ae){return fz.test(ae)}function qz(ae){for(var he,de=[];!(he=ae.next()).done;)de.push(he.value);return de}function Cf(ae){var he=-1,de=Array(ae.size);return ae.forEach(function(Oe,Le){de[++he]=[Le,Oe]}),de}function kS(ae,he){return function(de){return ae(he(de))}}function Pi(ae,he){for(var de=-1,Oe=ae.length,Le=0,it=[];++de<Oe;){var Kt=ae[de];(Kt===he||Kt===h)&&(ae[de]=h,it[Le++]=de)}return it}function Hl(ae){var he=-1,de=Array(ae.size);return ae.forEach(function(Oe){de[++he]=Oe}),de}function Lz(ae){var he=-1,de=Array(ae.size);return ae.forEach(function(Oe){de[++he]=[Oe,Oe]}),de}function zz(ae,he,de){for(var Oe=de-1,Le=ae.length;++Oe<Le;)if(ae[Oe]===he)return Oe;return-1}function Bz(ae,he,de){for(var Oe=de+1;Oe--;)if(ae[Oe]===he)return Oe;return Oe}function Ho(ae){return $o(ae)?$z(ae):Oz(ae)}function Tn(ae){return $o(ae)?Hz(ae):Cz(ae)}function MS(ae){for(var he=ae.length;he--&&kr.test(ae.charAt(he)););return he}var Fz=_f(mz);function $z(ae){for(var he=vf.lastIndex=0;vf.test(ae);)++he;return he}function Hz(ae){return ae.match(vf)||[]}function Vz(ae){return ae.match(uz)||[]}var Wz=(function ae(he){he=he==null?ur:Vo.defaults(ur.Object(),he,Vo.pick(ur,hz));var de=he.Array,Oe=he.Date,Le=he.Error,it=he.Function,Kt=he.Math,gt=he.Object,If=he.RegExp,Uz=he.String,fn=he.TypeError,Vl=de.prototype,Gz=it.prototype,Wo=gt.prototype,Wl=he["__core-js_shared__"],Ul=Gz.toString,st=Wo.hasOwnProperty,Kz=0,AS=(function(){var l=/[^.]+$/.exec(Wl&&Wl.keys&&Wl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Gl=Wo.toString,Yz=Ul.call(gt),Xz=ur._,Zz=If("^"+Ul.call(st).replace(Ft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kl=mS?he.Buffer:r,ki=he.Symbol,Yl=he.Uint8Array,DS=Kl?Kl.allocUnsafe:r,Xl=kS(gt.getPrototypeOf,gt),jS=gt.create,qS=Wo.propertyIsEnumerable,Zl=Vl.splice,LS=ki?ki.isConcatSpreadable:r,Ja=ki?ki.iterator:r,oo=ki?ki.toStringTag:r,Jl=(function(){try{var l=uo(gt,"defineProperty");return l({},"",{}),l}catch{}})(),Jz=he.clearTimeout!==ur.clearTimeout&&he.clearTimeout,Qz=Oe&&Oe.now!==ur.Date.now&&Oe.now,e7=he.setTimeout!==ur.setTimeout&&he.setTimeout,Ql=Kt.ceil,ec=Kt.floor,Rf=gt.getOwnPropertySymbols,t7=Kl?Kl.isBuffer:r,zS=he.isFinite,r7=Vl.join,n7=kS(gt.keys,gt),Yt=Kt.max,vr=Kt.min,i7=Oe.now,o7=he.parseInt,BS=Kt.random,a7=Vl.reverse,Nf=uo(he,"DataView"),Qa=uo(he,"Map"),Tf=uo(he,"Promise"),Uo=uo(he,"Set"),es=uo(he,"WeakMap"),ts=uo(gt,"create"),tc=es&&new es,Go={},s7=fo(Nf),l7=fo(Qa),c7=fo(Tf),u7=fo(Uo),d7=fo(es),rc=ki?ki.prototype:r,rs=rc?rc.valueOf:r,FS=rc?rc.toString:r;function F(l){if(kt(l)&&!ze(l)&&!(l instanceof Ze)){if(l instanceof hn)return l;if(st.call(l,"__wrapped__"))return $E(l)}return new hn(l)}var Ko=(function(){function l(){}return function(f){if(!Rt(f))return{};if(jS)return jS(f);l.prototype=f;var m=new l;return l.prototype=r,m}})();function nc(){}function hn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}F.templateSettings={escape:Dt,evaluate:rr,interpolate:xr,variable:"",imports:{_:F}},F.prototype=nc.prototype,F.prototype.constructor=F,hn.prototype=Ko(nc.prototype),hn.prototype.constructor=hn;function Ze(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function f7(){var l=new Ze(this.__wrapped__);return l.__actions__=Mr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=Mr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=Mr(this.__views__),l}function h7(){if(this.__filtered__){var l=new Ze(this);l.__dir__=-1,l.__filtered__=!0}else l=this.clone(),l.__dir__*=-1;return l}function p7(){var l=this.__wrapped__.value(),f=this.__dir__,m=ze(l),R=f<0,P=m?l.length:0,$=C8(0,P,this.__views__),te=$.start,oe=$.end,se=oe-te,ve=R?oe:te-1,ge=this.__iteratees__,ye=ge.length,Se=0,Ne=vr(se,this.__takeCount__);if(!m||!R&&P==se&&Ne==se)return dE(l,this.__actions__);var De=[];e:for(;se--&&Se<Ne;){ve+=f;for(var He=-1,ke=l[ve];++He<ye;){var Ge=ge[He],Je=Ge.iteratee,Jr=Ge.type,Er=Je(ke);if(Jr==B)ke=Er;else if(!Er){if(Jr==Y)continue e;break e}}De[Se++]=ke}return De}Ze.prototype=Ko(nc.prototype),Ze.prototype.constructor=Ze;function ao(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var R=l[f];this.set(R[0],R[1])}}function v7(){this.__data__=ts?ts(null):{},this.size=0}function g7(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function m7(l){var f=this.__data__;if(ts){var m=f[l];return m===u?r:m}return st.call(f,l)?f[l]:r}function b7(l){var f=this.__data__;return ts?f[l]!==r:st.call(f,l)}function y7(l,f){var m=this.__data__;return this.size+=this.has(l)?0:1,m[l]=ts&&f===r?u:f,this}ao.prototype.clear=v7,ao.prototype.delete=g7,ao.prototype.get=m7,ao.prototype.has=b7,ao.prototype.set=y7;function ci(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var R=l[f];this.set(R[0],R[1])}}function x7(){this.__data__=[],this.size=0}function w7(l){var f=this.__data__,m=ic(f,l);if(m<0)return!1;var R=f.length-1;return m==R?f.pop():Zl.call(f,m,1),--this.size,!0}function _7(l){var f=this.__data__,m=ic(f,l);return m<0?r:f[m][1]}function S7(l){return ic(this.__data__,l)>-1}function E7(l,f){var m=this.__data__,R=ic(m,l);return R<0?(++this.size,m.push([l,f])):m[R][1]=f,this}ci.prototype.clear=x7,ci.prototype.delete=w7,ci.prototype.get=_7,ci.prototype.has=S7,ci.prototype.set=E7;function ui(l){var f=-1,m=l==null?0:l.length;for(this.clear();++f<m;){var R=l[f];this.set(R[0],R[1])}}function O7(){this.size=0,this.__data__={hash:new ao,map:new(Qa||ci),string:new ao}}function C7(l){var f=gc(this,l).delete(l);return this.size-=f?1:0,f}function I7(l){return gc(this,l).get(l)}function R7(l){return gc(this,l).has(l)}function N7(l,f){var m=gc(this,l),R=m.size;return m.set(l,f),this.size+=m.size==R?0:1,this}ui.prototype.clear=O7,ui.prototype.delete=C7,ui.prototype.get=I7,ui.prototype.has=R7,ui.prototype.set=N7;function so(l){var f=-1,m=l==null?0:l.length;for(this.__data__=new ui;++f<m;)this.add(l[f])}function T7(l){return this.__data__.set(l,u),this}function P7(l){return this.__data__.has(l)}so.prototype.add=so.prototype.push=T7,so.prototype.has=P7;function Pn(l){var f=this.__data__=new ci(l);this.size=f.size}function k7(){this.__data__=new ci,this.size=0}function M7(l){var f=this.__data__,m=f.delete(l);return this.size=f.size,m}function A7(l){return this.__data__.get(l)}function D7(l){return this.__data__.has(l)}function j7(l,f){var m=this.__data__;if(m instanceof ci){var R=m.__data__;if(!Qa||R.length<i-1)return R.push([l,f]),this.size=++m.size,this;m=this.__data__=new ui(R)}return m.set(l,f),this.size=m.size,this}Pn.prototype.clear=k7,Pn.prototype.delete=M7,Pn.prototype.get=A7,Pn.prototype.has=D7,Pn.prototype.set=j7;function $S(l,f){var m=ze(l),R=!m&&ho(l),P=!m&&!R&&qi(l),$=!m&&!R&&!P&&Jo(l),te=m||R||P||$,oe=te?Ef(l.length,Uz):[],se=oe.length;for(var ve in l)(f||st.call(l,ve))&&!(te&&(ve=="length"||P&&(ve=="offset"||ve=="parent")||$&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||hi(ve,se)))&&oe.push(ve);return oe}function HS(l){var f=l.length;return f?l[Ff(0,f-1)]:r}function q7(l,f){return mc(Mr(l),lo(f,0,l.length))}function L7(l){return mc(Mr(l))}function Pf(l,f,m){(m!==r&&!Mn(l[f],m)||m===r&&!(f in l))&&Gn(l,f,m)}function ns(l,f,m){var R=l[f];(!(st.call(l,f)&&Mn(R,m))||m===r&&!(f in l))&&Gn(l,f,m)}function ic(l,f){for(var m=l.length;m--;)if(Mn(l[m][0],f))return m;return-1}function z7(l,f,m,R){return Mi(l,function(P,$,te){f(R,P,m(P),te)}),R}function VS(l,f){return l&&Yn(f,nr(f),l)}function B7(l,f){return l&&Yn(f,Dr(f),l)}function Gn(l,f,m){f=="__proto__"&&Jl?Jl(l,f,{configurable:!0,enumerable:!0,value:m,writable:!0}):l[f]=m}function kf(l,f){for(var m=-1,R=f.length,P=de(R),$=l==null;++m<R;)P[m]=$?r:hh(l,f[m]);return P}function lo(l,f,m){return l===l&&(m!==r&&(l=l<=m?l:m),f!==r&&(l=l>=f?l:f)),l}function pn(l,f,m,R,P,$){var te,oe=f&p,se=f&v,ve=f&x;if(m&&(te=P?m(l,R,P,$):m(l)),te!==r)return te;if(!Rt(l))return l;var ge=ze(l);if(ge){if(te=R8(l),!oe)return Mr(l,te)}else{var ye=gr(l),Se=ye==pe||ye==ue;if(qi(l))return pE(l,oe);if(ye==me||ye==q||Se&&!P){if(te=se||Se?{}:ME(l),!oe)return se?m8(l,B7(te,l)):g8(l,VS(te,l))}else{if(!yt[ye])return P?l:{};te=N8(l,ye,oe)}}$||($=new Pn);var Ne=$.get(l);if(Ne)return Ne;$.set(l,te),lO(l)?l.forEach(function(ke){te.add(pn(ke,f,m,ke,l,$))}):aO(l)&&l.forEach(function(ke,Ge){te.set(Ge,pn(ke,f,m,Ge,l,$))});var De=ve?se?Jf:Zf:se?Dr:nr,He=ge?r:De(l);return Kr(He||l,function(ke,Ge){He&&(Ge=ke,ke=l[Ge]),ns(te,Ge,pn(ke,f,m,Ge,l,$))}),te}function F7(l){var f=nr(l);return function(m){return WS(m,l,f)}}function WS(l,f,m){var R=m.length;if(l==null)return!R;for(l=gt(l);R--;){var P=m[R],$=f[P],te=l[P];if(te===r&&!(P in l)||!$(te))return!1}return!0}function US(l,f,m){if(typeof l!="function")throw new fn(a);return us(function(){l.apply(r,m)},f)}function is(l,f,m,R){var P=-1,$=Fl,te=!0,oe=l.length,se=[],ve=f.length;if(!oe)return se;m&&(f=Et(f,Yr(m))),R?($=bf,te=!1):f.length>=i&&($=Za,te=!1,f=new so(f));e:for(;++P<oe;){var ge=l[P],ye=m==null?ge:m(ge);if(ge=R||ge!==0?ge:0,te&&ye===ye){for(var Se=ve;Se--;)if(f[Se]===ye)continue e;se.push(ge)}else $(f,ye,R)||se.push(ge)}return se}var Mi=yE(Kn),GS=yE(Af,!0);function $7(l,f){var m=!0;return Mi(l,function(R,P,$){return m=!!f(R,P,$),m}),m}function oc(l,f,m){for(var R=-1,P=l.length;++R<P;){var $=l[R],te=f($);if(te!=null&&(oe===r?te===te&&!Zr(te):m(te,oe)))var oe=te,se=$}return se}function H7(l,f,m,R){var P=l.length;for(m=Fe(m),m<0&&(m=-m>P?0:P+m),R=R===r||R>P?P:Fe(R),R<0&&(R+=P),R=m>R?0:uO(R);m<R;)l[m++]=f;return l}function KS(l,f){var m=[];return Mi(l,function(R,P,$){f(R,P,$)&&m.push(R)}),m}function dr(l,f,m,R,P){var $=-1,te=l.length;for(m||(m=P8),P||(P=[]);++$<te;){var oe=l[$];f>0&&m(oe)?f>1?dr(oe,f-1,m,R,P):Ti(P,oe):R||(P[P.length]=oe)}return P}var Mf=xE(),YS=xE(!0);function Kn(l,f){return l&&Mf(l,f,nr)}function Af(l,f){return l&&YS(l,f,nr)}function ac(l,f){return Ni(f,function(m){return pi(l[m])})}function co(l,f){f=Di(f,l);for(var m=0,R=f.length;l!=null&&m<R;)l=l[kn(f[m++])];return m&&m==R?l:r}function XS(l,f,m){var R=f(l);return ze(l)?R:Ti(R,m(l))}function _r(l){return l==null?l===r?rt:ie:oo&&oo in gt(l)?O8(l):L8(l)}function Df(l,f){return l>f}function V7(l,f){return l!=null&&st.call(l,f)}function W7(l,f){return l!=null&&f in gt(l)}function U7(l,f,m){return l>=vr(f,m)&&l<Yt(f,m)}function jf(l,f,m){for(var R=m?bf:Fl,P=l[0].length,$=l.length,te=$,oe=de($),se=1/0,ve=[];te--;){var ge=l[te];te&&f&&(ge=Et(ge,Yr(f))),se=vr(ge.length,se),oe[te]=!m&&(f||P>=120&&ge.length>=120)?new so(te&&ge):r}ge=l[0];var ye=-1,Se=oe[0];e:for(;++ye<P&&ve.length<se;){var Ne=ge[ye],De=f?f(Ne):Ne;if(Ne=m||Ne!==0?Ne:0,!(Se?Za(Se,De):R(ve,De,m))){for(te=$;--te;){var He=oe[te];if(!(He?Za(He,De):R(l[te],De,m)))continue e}Se&&Se.push(De),ve.push(Ne)}}return ve}function G7(l,f,m,R){return Kn(l,function(P,$,te){f(R,m(P),$,te)}),R}function os(l,f,m){f=Di(f,l),l=qE(l,f);var R=l==null?l:l[kn(gn(f))];return R==null?r:Gr(R,l,m)}function ZS(l){return kt(l)&&_r(l)==q}function K7(l){return kt(l)&&_r(l)==qe}function Y7(l){return kt(l)&&_r(l)==ne}function as(l,f,m,R,P){return l===f?!0:l==null||f==null||!kt(l)&&!kt(f)?l!==l&&f!==f:X7(l,f,m,R,as,P)}function X7(l,f,m,R,P,$){var te=ze(l),oe=ze(f),se=te?D:gr(l),ve=oe?D:gr(f);se=se==q?me:se,ve=ve==q?me:ve;var ge=se==me,ye=ve==me,Se=se==ve;if(Se&&qi(l)){if(!qi(f))return!1;te=!0,ge=!1}if(Se&&!ge)return $||($=new Pn),te||Jo(l)?TE(l,f,m,R,P,$):S8(l,f,se,m,R,P,$);if(!(m&g)){var Ne=ge&&st.call(l,"__wrapped__"),De=ye&&st.call(f,"__wrapped__");if(Ne||De){var He=Ne?l.value():l,ke=De?f.value():f;return $||($=new Pn),P(He,ke,m,R,$)}}return Se?($||($=new Pn),E8(l,f,m,R,P,$)):!1}function Z7(l){return kt(l)&&gr(l)==xe}function qf(l,f,m,R){var P=m.length,$=P,te=!R;if(l==null)return!$;for(l=gt(l);P--;){var oe=m[P];if(te&&oe[2]?oe[1]!==l[oe[0]]:!(oe[0]in l))return!1}for(;++P<$;){oe=m[P];var se=oe[0],ve=l[se],ge=oe[1];if(te&&oe[2]){if(ve===r&&!(se in l))return!1}else{var ye=new Pn;if(R)var Se=R(ve,ge,se,l,f,ye);if(!(Se===r?as(ge,ve,g|b,R,ye):Se))return!1}}return!0}function JS(l){if(!Rt(l)||M8(l))return!1;var f=pi(l)?Zz:cn;return f.test(fo(l))}function J7(l){return kt(l)&&_r(l)==je}function Q7(l){return kt(l)&&gr(l)==Pe}function e8(l){return kt(l)&&Sc(l.length)&&!!_t[_r(l)]}function QS(l){return typeof l=="function"?l:l==null?jr:typeof l=="object"?ze(l)?rE(l[0],l[1]):tE(l):_O(l)}function Lf(l){if(!cs(l))return n7(l);var f=[];for(var m in gt(l))st.call(l,m)&&m!="constructor"&&f.push(m);return f}function t8(l){if(!Rt(l))return q8(l);var f=cs(l),m=[];for(var R in l)R=="constructor"&&(f||!st.call(l,R))||m.push(R);return m}function zf(l,f){return l<f}function eE(l,f){var m=-1,R=Ar(l)?de(l.length):[];return Mi(l,function(P,$,te){R[++m]=f(P,$,te)}),R}function tE(l){var f=eh(l);return f.length==1&&f[0][2]?DE(f[0][0],f[0][1]):function(m){return m===l||qf(m,l,f)}}function rE(l,f){return rh(l)&&AE(f)?DE(kn(l),f):function(m){var R=hh(m,l);return R===r&&R===f?ph(m,l):as(f,R,g|b)}}function sc(l,f,m,R,P){l!==f&&Mf(f,function($,te){if(P||(P=new Pn),Rt($))r8(l,f,te,m,sc,R,P);else{var oe=R?R(ih(l,te),$,te+"",l,f,P):r;oe===r&&(oe=$),Pf(l,te,oe)}},Dr)}function r8(l,f,m,R,P,$,te){var oe=ih(l,m),se=ih(f,m),ve=te.get(se);if(ve){Pf(l,m,ve);return}var ge=$?$(oe,se,m+"",l,f,te):r,ye=ge===r;if(ye){var Se=ze(se),Ne=!Se&&qi(se),De=!Se&&!Ne&&Jo(se);ge=se,Se||Ne||De?ze(oe)?ge=oe:qt(oe)?ge=Mr(oe):Ne?(ye=!1,ge=pE(se,!0)):De?(ye=!1,ge=vE(se,!0)):ge=[]:ds(se)||ho(se)?(ge=oe,ho(oe)?ge=dO(oe):(!Rt(oe)||pi(oe))&&(ge=ME(se))):ye=!1}ye&&(te.set(se,ge),P(ge,se,R,$,te),te.delete(se)),Pf(l,m,ge)}function nE(l,f){var m=l.length;if(m)return f+=f<0?m:0,hi(f,m)?l[f]:r}function iE(l,f,m){f.length?f=Et(f,function($){return ze($)?function(te){return co(te,$.length===1?$[0]:$)}:$}):f=[jr];var R=-1;f=Et(f,Yr(Me()));var P=eE(l,function($,te,oe){var se=Et(f,function(ve){return ve($)});return{criteria:se,index:++R,value:$}});return Nz(P,function($,te){return v8($,te,m)})}function n8(l,f){return oE(l,f,function(m,R){return ph(l,R)})}function oE(l,f,m){for(var R=-1,P=f.length,$={};++R<P;){var te=f[R],oe=co(l,te);m(oe,te)&&ss($,Di(te,l),oe)}return $}function i8(l){return function(f){return co(f,l)}}function Bf(l,f,m,R){var P=R?Rz:Fo,$=-1,te=f.length,oe=l;for(l===f&&(f=Mr(f)),m&&(oe=Et(l,Yr(m)));++$<te;)for(var se=0,ve=f[$],ge=m?m(ve):ve;(se=P(oe,ge,se,R))>-1;)oe!==l&&Zl.call(oe,se,1),Zl.call(l,se,1);return l}function aE(l,f){for(var m=l?f.length:0,R=m-1;m--;){var P=f[m];if(m==R||P!==$){var $=P;hi(P)?Zl.call(l,P,1):Vf(l,P)}}return l}function Ff(l,f){return l+ec(BS()*(f-l+1))}function o8(l,f,m,R){for(var P=-1,$=Yt(Ql((f-l)/(m||1)),0),te=de($);$--;)te[R?$:++P]=l,l+=m;return te}function $f(l,f){var m="";if(!l||f<1||f>re)return m;do f%2&&(m+=l),f=ec(f/2),f&&(l+=l);while(f);return m}function Ve(l,f){return oh(jE(l,f,jr),l+"")}function a8(l){return HS(Qo(l))}function s8(l,f){var m=Qo(l);return mc(m,lo(f,0,m.length))}function ss(l,f,m,R){if(!Rt(l))return l;f=Di(f,l);for(var P=-1,$=f.length,te=$-1,oe=l;oe!=null&&++P<$;){var se=kn(f[P]),ve=m;if(se==="__proto__"||se==="constructor"||se==="prototype")return l;if(P!=te){var ge=oe[se];ve=R?R(ge,se,oe):r,ve===r&&(ve=Rt(ge)?ge:hi(f[P+1])?[]:{})}ns(oe,se,ve),oe=oe[se]}return l}var sE=tc?function(l,f){return tc.set(l,f),l}:jr,l8=Jl?function(l,f){return Jl(l,"toString",{configurable:!0,enumerable:!1,value:gh(f),writable:!0})}:jr;function c8(l){return mc(Qo(l))}function vn(l,f,m){var R=-1,P=l.length;f<0&&(f=-f>P?0:P+f),m=m>P?P:m,m<0&&(m+=P),P=f>m?0:m-f>>>0,f>>>=0;for(var $=de(P);++R<P;)$[R]=l[R+f];return $}function u8(l,f){var m;return Mi(l,function(R,P,$){return m=f(R,P,$),!m}),!!m}function lc(l,f,m){var R=0,P=l==null?R:l.length;if(typeof f=="number"&&f===f&&P<=M){for(;R<P;){var $=R+P>>>1,te=l[$];te!==null&&!Zr(te)&&(m?te<=f:te<f)?R=$+1:P=$}return P}return Hf(l,f,jr,m)}function Hf(l,f,m,R){var P=0,$=l==null?0:l.length;if($===0)return 0;f=m(f);for(var te=f!==f,oe=f===null,se=Zr(f),ve=f===r;P<$;){var ge=ec((P+$)/2),ye=m(l[ge]),Se=ye!==r,Ne=ye===null,De=ye===ye,He=Zr(ye);if(te)var ke=R||De;else ve?ke=De&&(R||Se):oe?ke=De&&Se&&(R||!Ne):se?ke=De&&Se&&!Ne&&(R||!He):Ne||He?ke=!1:ke=R?ye<=f:ye<f;ke?P=ge+1:$=ge}return vr($,J)}function lE(l,f){for(var m=-1,R=l.length,P=0,$=[];++m<R;){var te=l[m],oe=f?f(te):te;if(!m||!Mn(oe,se)){var se=oe;$[P++]=te===0?0:te}}return $}function cE(l){return typeof l=="number"?l:Zr(l)?W:+l}function Xr(l){if(typeof l=="string")return l;if(ze(l))return Et(l,Xr)+"";if(Zr(l))return FS?FS.call(l):"";var f=l+"";return f=="0"&&1/l==-U?"-0":f}function Ai(l,f,m){var R=-1,P=Fl,$=l.length,te=!0,oe=[],se=oe;if(m)te=!1,P=bf;else if($>=i){var ve=f?null:w8(l);if(ve)return Hl(ve);te=!1,P=Za,se=new so}else se=f?[]:oe;e:for(;++R<$;){var ge=l[R],ye=f?f(ge):ge;if(ge=m||ge!==0?ge:0,te&&ye===ye){for(var Se=se.length;Se--;)if(se[Se]===ye)continue e;f&&se.push(ye),oe.push(ge)}else P(se,ye,m)||(se!==oe&&se.push(ye),oe.push(ge))}return oe}function Vf(l,f){f=Di(f,l);var m=-1,R=f.length;if(!R)return!0;for(;++m<R;){var P=kn(f[m]);if(P==="__proto__"&&!st.call(l,"__proto__")||(P==="constructor"||P==="prototype")&&m<R-1)return!1}var $=qE(l,f);return $==null||delete $[kn(gn(f))]}function uE(l,f,m,R){return ss(l,f,m(co(l,f)),R)}function cc(l,f,m,R){for(var P=l.length,$=R?P:-1;(R?$--:++$<P)&&f(l[$],$,l););return m?vn(l,R?0:$,R?$+1:P):vn(l,R?$+1:0,R?P:$)}function dE(l,f){var m=l;return m instanceof Ze&&(m=m.value()),yf(f,function(R,P){return P.func.apply(P.thisArg,Ti([R],P.args))},m)}function Wf(l,f,m){var R=l.length;if(R<2)return R?Ai(l[0]):[];for(var P=-1,$=de(R);++P<R;)for(var te=l[P],oe=-1;++oe<R;)oe!=P&&($[P]=is($[P]||te,l[oe],f,m));return Ai(dr($,1),f,m)}function fE(l,f,m){for(var R=-1,P=l.length,$=f.length,te={};++R<P;){var oe=R<$?f[R]:r;m(te,l[R],oe)}return te}function Uf(l){return qt(l)?l:[]}function Gf(l){return typeof l=="function"?l:jr}function Di(l,f){return ze(l)?l:rh(l,f)?[l]:FE(lt(l))}var d8=Ve;function ji(l,f,m){var R=l.length;return m=m===r?R:m,!f&&m>=R?l:vn(l,f,m)}var hE=Jz||function(l){return ur.clearTimeout(l)};function pE(l,f){if(f)return l.slice();var m=l.length,R=DS?DS(m):new l.constructor(m);return l.copy(R),R}function Kf(l){var f=new l.constructor(l.byteLength);return new Yl(f).set(new Yl(l)),f}function f8(l,f){var m=f?Kf(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.byteLength)}function h8(l){var f=new l.constructor(l.source,Nn.exec(l));return f.lastIndex=l.lastIndex,f}function p8(l){return rs?gt(rs.call(l)):{}}function vE(l,f){var m=f?Kf(l.buffer):l.buffer;return new l.constructor(m,l.byteOffset,l.length)}function gE(l,f){if(l!==f){var m=l!==r,R=l===null,P=l===l,$=Zr(l),te=f!==r,oe=f===null,se=f===f,ve=Zr(f);if(!oe&&!ve&&!$&&l>f||$&&te&&se&&!oe&&!ve||R&&te&&se||!m&&se||!P)return 1;if(!R&&!$&&!ve&&l<f||ve&&m&&P&&!R&&!$||oe&&m&&P||!te&&P||!se)return-1}return 0}function v8(l,f,m){for(var R=-1,P=l.criteria,$=f.criteria,te=P.length,oe=m.length;++R<te;){var se=gE(P[R],$[R]);if(se){if(R>=oe)return se;var ve=m[R];return se*(ve=="desc"?-1:1)}}return l.index-f.index}function mE(l,f,m,R){for(var P=-1,$=l.length,te=m.length,oe=-1,se=f.length,ve=Yt($-te,0),ge=de(se+ve),ye=!R;++oe<se;)ge[oe]=f[oe];for(;++P<te;)(ye||P<$)&&(ge[m[P]]=l[P]);for(;ve--;)ge[oe++]=l[P++];return ge}function bE(l,f,m,R){for(var P=-1,$=l.length,te=-1,oe=m.length,se=-1,ve=f.length,ge=Yt($-oe,0),ye=de(ge+ve),Se=!R;++P<ge;)ye[P]=l[P];for(var Ne=P;++se<ve;)ye[Ne+se]=f[se];for(;++te<oe;)(Se||P<$)&&(ye[Ne+m[te]]=l[P++]);return ye}function Mr(l,f){var m=-1,R=l.length;for(f||(f=de(R));++m<R;)f[m]=l[m];return f}function Yn(l,f,m,R){var P=!m;m||(m={});for(var $=-1,te=f.length;++$<te;){var oe=f[$],se=R?R(m[oe],l[oe],oe,m,l):r;se===r&&(se=l[oe]),P?Gn(m,oe,se):ns(m,oe,se)}return m}function g8(l,f){return Yn(l,th(l),f)}function m8(l,f){return Yn(l,PE(l),f)}function uc(l,f){return function(m,R){var P=ze(m)?_z:z7,$=f?f():{};return P(m,l,Me(R,2),$)}}function Yo(l){return Ve(function(f,m){var R=-1,P=m.length,$=P>1?m[P-1]:r,te=P>2?m[2]:r;for($=l.length>3&&typeof $=="function"?(P--,$):r,te&&Sr(m[0],m[1],te)&&($=P<3?r:$,P=1),f=gt(f);++R<P;){var oe=m[R];oe&&l(f,oe,R,$)}return f})}function yE(l,f){return function(m,R){if(m==null)return m;if(!Ar(m))return l(m,R);for(var P=m.length,$=f?P:-1,te=gt(m);(f?$--:++$<P)&&R(te[$],$,te)!==!1;);return m}}function xE(l){return function(f,m,R){for(var P=-1,$=gt(f),te=R(f),oe=te.length;oe--;){var se=te[l?oe:++P];if(m($[se],se,$)===!1)break}return f}}function b8(l,f,m){var R=f&w,P=ls(l);function $(){var te=this&&this!==ur&&this instanceof $?P:l;return te.apply(R?m:this,arguments)}return $}function wE(l){return function(f){f=lt(f);var m=$o(f)?Tn(f):r,R=m?m[0]:f.charAt(0),P=m?ji(m,1).join(""):f.slice(1);return R[l]()+P}}function Xo(l){return function(f){return yf(xO(yO(f).replace(lz,"")),l,"")}}function ls(l){return function(){var f=arguments;switch(f.length){case 0:return new l;case 1:return new l(f[0]);case 2:return new l(f[0],f[1]);case 3:return new l(f[0],f[1],f[2]);case 4:return new l(f[0],f[1],f[2],f[3]);case 5:return new l(f[0],f[1],f[2],f[3],f[4]);case 6:return new l(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new l(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var m=Ko(l.prototype),R=l.apply(m,f);return Rt(R)?R:m}}function y8(l,f,m){var R=ls(l);function P(){for(var $=arguments.length,te=de($),oe=$,se=Zo(P);oe--;)te[oe]=arguments[oe];var ve=$<3&&te[0]!==se&&te[$-1]!==se?[]:Pi(te,se);if($-=ve.length,$<m)return CE(l,f,dc,P.placeholder,r,te,ve,r,r,m-$);var ge=this&&this!==ur&&this instanceof P?R:l;return Gr(ge,this,te)}return P}function _E(l){return function(f,m,R){var P=gt(f);if(!Ar(f)){var $=Me(m,3);f=nr(f),m=function(oe){return $(P[oe],oe,P)}}var te=l(f,m,R);return te>-1?P[$?f[te]:te]:r}}function SE(l){return fi(function(f){var m=f.length,R=m,P=hn.prototype.thru;for(l&&f.reverse();R--;){var $=f[R];if(typeof $!="function")throw new fn(a);if(P&&!te&&vc($)=="wrapper")var te=new hn([],!0)}for(R=te?R:m;++R<m;){$=f[R];var oe=vc($),se=oe=="wrapper"?Qf($):r;se&&nh(se[0])&&se[1]==(T|E|I|k)&&!se[4].length&&se[9]==1?te=te[vc(se[0])].apply(te,se[3]):te=$.length==1&&nh($)?te[oe]():te.thru($)}return function(){var ve=arguments,ge=ve[0];if(te&&ve.length==1&&ze(ge))return te.plant(ge).value();for(var ye=0,Se=m?f[ye].apply(this,ve):ge;++ye<m;)Se=f[ye].call(this,Se);return Se}})}function dc(l,f,m,R,P,$,te,oe,se,ve){var ge=f&T,ye=f&w,Se=f&y,Ne=f&(E|S),De=f&z,He=Se?r:ls(l);function ke(){for(var Ge=arguments.length,Je=de(Ge),Jr=Ge;Jr--;)Je[Jr]=arguments[Jr];if(Ne)var Er=Zo(ke),Qr=Pz(Je,Er);if(R&&(Je=mE(Je,R,P,Ne)),$&&(Je=bE(Je,$,te,Ne)),Ge-=Qr,Ne&&Ge<ve){var Lt=Pi(Je,Er);return CE(l,f,dc,ke.placeholder,m,Je,Lt,oe,se,ve-Ge)}var An=ye?m:this,gi=Se?An[l]:l;return Ge=Je.length,oe?Je=z8(Je,oe):De&&Ge>1&&Je.reverse(),ge&&se<Ge&&(Je.length=se),this&&this!==ur&&this instanceof ke&&(gi=He||ls(gi)),gi.apply(An,Je)}return ke}function EE(l,f){return function(m,R){return G7(m,l,f(R),{})}}function fc(l,f){return function(m,R){var P;if(m===r&&R===r)return f;if(m!==r&&(P=m),R!==r){if(P===r)return R;typeof m=="string"||typeof R=="string"?(m=Xr(m),R=Xr(R)):(m=cE(m),R=cE(R)),P=l(m,R)}return P}}function Yf(l){return fi(function(f){return f=Et(f,Yr(Me())),Ve(function(m){var R=this;return l(f,function(P){return Gr(P,R,m)})})})}function hc(l,f){f=f===r?" ":Xr(f);var m=f.length;if(m<2)return m?$f(f,l):f;var R=$f(f,Ql(l/Ho(f)));return $o(f)?ji(Tn(R),0,l).join(""):R.slice(0,l)}function x8(l,f,m,R){var P=f&w,$=ls(l);function te(){for(var oe=-1,se=arguments.length,ve=-1,ge=R.length,ye=de(ge+se),Se=this&&this!==ur&&this instanceof te?$:l;++ve<ge;)ye[ve]=R[ve];for(;se--;)ye[ve++]=arguments[++oe];return Gr(Se,P?m:this,ye)}return te}function OE(l){return function(f,m,R){return R&&typeof R!="number"&&Sr(f,m,R)&&(m=R=r),f=vi(f),m===r?(m=f,f=0):m=vi(m),R=R===r?f<m?1:-1:vi(R),o8(f,m,R,l)}}function pc(l){return function(f,m){return typeof f=="string"&&typeof m=="string"||(f=mn(f),m=mn(m)),l(f,m)}}function CE(l,f,m,R,P,$,te,oe,se,ve){var ge=f&E,ye=ge?te:r,Se=ge?r:te,Ne=ge?$:r,De=ge?r:$;f|=ge?I:N,f&=~(ge?N:I),f&_||(f&=-4);var He=[l,f,P,Ne,ye,De,Se,oe,se,ve],ke=m.apply(r,He);return nh(l)&&LE(ke,He),ke.placeholder=R,zE(ke,l,f)}function Xf(l){var f=Kt[l];return function(m,R){if(m=mn(m),R=R==null?0:vr(Fe(R),292),R&&zS(m)){var P=(lt(m)+"e").split("e"),$=f(P[0]+"e"+(+P[1]+R));return P=(lt($)+"e").split("e"),+(P[0]+"e"+(+P[1]-R))}return f(m)}}var w8=Uo&&1/Hl(new Uo([,-0]))[1]==U?function(l){return new Uo(l)}:yh;function IE(l){return function(f){var m=gr(f);return m==xe?Cf(f):m==Pe?Lz(f):Tz(f,l(f))}}function di(l,f,m,R,P,$,te,oe){var se=f&y;if(!se&&typeof l!="function")throw new fn(a);var ve=R?R.length:0;if(ve||(f&=-97,R=P=r),te=te===r?te:Yt(Fe(te),0),oe=oe===r?oe:Fe(oe),ve-=P?P.length:0,f&N){var ge=R,ye=P;R=P=r}var Se=se?r:Qf(l),Ne=[l,f,m,R,P,ge,ye,$,te,oe];if(Se&&j8(Ne,Se),l=Ne[0],f=Ne[1],m=Ne[2],R=Ne[3],P=Ne[4],oe=Ne[9]=Ne[9]===r?se?0:l.length:Yt(Ne[9]-ve,0),!oe&&f&(E|S)&&(f&=-25),!f||f==w)var De=b8(l,f,m);else f==E||f==S?De=y8(l,f,oe):(f==I||f==(w|I))&&!P.length?De=x8(l,f,m,R):De=dc.apply(r,Ne);var He=Se?sE:LE;return zE(He(De,Ne),l,f)}function RE(l,f,m,R){return l===r||Mn(l,Wo[m])&&!st.call(R,m)?f:l}function NE(l,f,m,R,P,$){return Rt(l)&&Rt(f)&&($.set(f,l),sc(l,f,r,NE,$),$.delete(f)),l}function _8(l){return ds(l)?r:l}function TE(l,f,m,R,P,$){var te=m&g,oe=l.length,se=f.length;if(oe!=se&&!(te&&se>oe))return!1;var ve=$.get(l),ge=$.get(f);if(ve&&ge)return ve==f&&ge==l;var ye=-1,Se=!0,Ne=m&b?new so:r;for($.set(l,f),$.set(f,l);++ye<oe;){var De=l[ye],He=f[ye];if(R)var ke=te?R(He,De,ye,f,l,$):R(De,He,ye,l,f,$);if(ke!==r){if(ke)continue;Se=!1;break}if(Ne){if(!xf(f,function(Ge,Je){if(!Za(Ne,Je)&&(De===Ge||P(De,Ge,m,R,$)))return Ne.push(Je)})){Se=!1;break}}else if(!(De===He||P(De,He,m,R,$))){Se=!1;break}}return $.delete(l),$.delete(f),Se}function S8(l,f,m,R,P,$,te){switch(m){case Xe:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case qe:return!(l.byteLength!=f.byteLength||!$(new Yl(l),new Yl(f)));case Q:case ne:case le:return Mn(+l,+f);case ee:return l.name==f.name&&l.message==f.message;case je:case Te:return l==f+"";case xe:var oe=Cf;case Pe:var se=R&g;if(oe||(oe=Hl),l.size!=f.size&&!se)return!1;var ve=te.get(l);if(ve)return ve==f;R|=b,te.set(l,f);var ge=TE(oe(l),oe(f),R,P,$,te);return te.delete(l),ge;case Be:if(rs)return rs.call(l)==rs.call(f)}return!1}function E8(l,f,m,R,P,$){var te=m&g,oe=Zf(l),se=oe.length,ve=Zf(f),ge=ve.length;if(se!=ge&&!te)return!1;for(var ye=se;ye--;){var Se=oe[ye];if(!(te?Se in f:st.call(f,Se)))return!1}var Ne=$.get(l),De=$.get(f);if(Ne&&De)return Ne==f&&De==l;var He=!0;$.set(l,f),$.set(f,l);for(var ke=te;++ye<se;){Se=oe[ye];var Ge=l[Se],Je=f[Se];if(R)var Jr=te?R(Je,Ge,Se,f,l,$):R(Ge,Je,Se,l,f,$);if(!(Jr===r?Ge===Je||P(Ge,Je,m,R,$):Jr)){He=!1;break}ke||(ke=Se=="constructor")}if(He&&!ke){var Er=l.constructor,Qr=f.constructor;Er!=Qr&&"constructor"in l&&"constructor"in f&&!(typeof Er=="function"&&Er instanceof Er&&typeof Qr=="function"&&Qr instanceof Qr)&&(He=!1)}return $.delete(l),$.delete(f),He}function fi(l){return oh(jE(l,r,WE),l+"")}function Zf(l){return XS(l,nr,th)}function Jf(l){return XS(l,Dr,PE)}var Qf=tc?function(l){return tc.get(l)}:yh;function vc(l){for(var f=l.name+"",m=Go[f],R=st.call(Go,f)?m.length:0;R--;){var P=m[R],$=P.func;if($==null||$==l)return P.name}return f}function Zo(l){var f=st.call(F,"placeholder")?F:l;return f.placeholder}function Me(){var l=F.iteratee||mh;return l=l===mh?QS:l,arguments.length?l(arguments[0],arguments[1]):l}function gc(l,f){var m=l.__data__;return k8(f)?m[typeof f=="string"?"string":"hash"]:m.map}function eh(l){for(var f=nr(l),m=f.length;m--;){var R=f[m],P=l[R];f[m]=[R,P,AE(P)]}return f}function uo(l,f){var m=Dz(l,f);return JS(m)?m:r}function O8(l){var f=st.call(l,oo),m=l[oo];try{l[oo]=r;var R=!0}catch{}var P=Gl.call(l);return R&&(f?l[oo]=m:delete l[oo]),P}var th=Rf?function(l){return l==null?[]:(l=gt(l),Ni(Rf(l),function(f){return qS.call(l,f)}))}:xh,PE=Rf?function(l){for(var f=[];l;)Ti(f,th(l)),l=Xl(l);return f}:xh,gr=_r;(Nf&&gr(new Nf(new ArrayBuffer(1)))!=Xe||Qa&&gr(new Qa)!=xe||Tf&&gr(Tf.resolve())!=_e||Uo&&gr(new Uo)!=Pe||es&&gr(new es)!=$e)&&(gr=function(l){var f=_r(l),m=f==me?l.constructor:r,R=m?fo(m):"";if(R)switch(R){case s7:return Xe;case l7:return xe;case c7:return _e;case u7:return Pe;case d7:return $e}return f});function C8(l,f,m){for(var R=-1,P=m.length;++R<P;){var $=m[R],te=$.size;switch($.type){case"drop":l+=te;break;case"dropRight":f-=te;break;case"take":f=vr(f,l+te);break;case"takeRight":l=Yt(l,f-te);break}}return{start:l,end:f}}function I8(l){var f=l.match(Va);return f?f[1].split(et):[]}function kE(l,f,m){f=Di(f,l);for(var R=-1,P=f.length,$=!1;++R<P;){var te=kn(f[R]);if(!($=l!=null&&m(l,te)))break;l=l[te]}return $||++R!=P?$:(P=l==null?0:l.length,!!P&&Sc(P)&&hi(te,P)&&(ze(l)||ho(l)))}function R8(l){var f=l.length,m=new l.constructor(f);return f&&typeof l[0]=="string"&&st.call(l,"index")&&(m.index=l.index,m.input=l.input),m}function ME(l){return typeof l.constructor=="function"&&!cs(l)?Ko(Xl(l)):{}}function N8(l,f,m){var R=l.constructor;switch(f){case qe:return Kf(l);case Q:case ne:return new R(+l);case Xe:return f8(l,m);case Ue:case sr:case Ut:case nt:case Ct:case yr:case sn:case Tr:case pr:return vE(l,m);case xe:return new R;case le:case Te:return new R(l);case je:return h8(l);case Pe:return new R;case Be:return p8(l)}}function T8(l,f){var m=f.length;if(!m)return l;var R=m-1;return f[R]=(m>1?"& ":"")+f[R],f=f.join(m>2?", ":" "),l.replace(Wn,`{
71
+ /* [wrapped with `+f+`] */
72
+ `)}function P8(l){return ze(l)||ho(l)||!!(LS&&l&&l[LS])}function hi(l,f){var m=typeof l;return f=f??re,!!f&&(m=="number"||m!="symbol"&&Un.test(l))&&l>-1&&l%1==0&&l<f}function Sr(l,f,m){if(!Rt(m))return!1;var R=typeof f;return(R=="number"?Ar(m)&&hi(f,m.length):R=="string"&&f in m)?Mn(m[f],l):!1}function rh(l,f){if(ze(l))return!1;var m=typeof l;return m=="number"||m=="symbol"||m=="boolean"||l==null||Zr(l)?!0:Bt.test(l)||!It.test(l)||f!=null&&l in gt(f)}function k8(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function nh(l){var f=vc(l),m=F[f];if(typeof m!="function"||!(f in Ze.prototype))return!1;if(l===m)return!0;var R=Qf(m);return!!R&&l===R[0]}function M8(l){return!!AS&&AS in l}var A8=Wl?pi:wh;function cs(l){var f=l&&l.constructor,m=typeof f=="function"&&f.prototype||Wo;return l===m}function AE(l){return l===l&&!Rt(l)}function DE(l,f){return function(m){return m==null?!1:m[l]===f&&(f!==r||l in gt(m))}}function D8(l){var f=wc(l,function(R){return m.size===d&&m.clear(),R}),m=f.cache;return f}function j8(l,f){var m=l[1],R=f[1],P=m|R,$=P<(w|y|T),te=R==T&&m==E||R==T&&m==k&&l[7].length<=f[8]||R==(T|k)&&f[7].length<=f[8]&&m==E;if(!($||te))return l;R&w&&(l[2]=f[2],P|=m&w?0:_);var oe=f[3];if(oe){var se=l[3];l[3]=se?mE(se,oe,f[4]):oe,l[4]=se?Pi(l[3],h):f[4]}return oe=f[5],oe&&(se=l[5],l[5]=se?bE(se,oe,f[6]):oe,l[6]=se?Pi(l[5],h):f[6]),oe=f[7],oe&&(l[7]=oe),R&T&&(l[8]=l[8]==null?f[8]:vr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=P,l}function q8(l){var f=[];if(l!=null)for(var m in gt(l))f.push(m);return f}function L8(l){return Gl.call(l)}function jE(l,f,m){return f=Yt(f===r?l.length-1:f,0),function(){for(var R=arguments,P=-1,$=Yt(R.length-f,0),te=de($);++P<$;)te[P]=R[f+P];P=-1;for(var oe=de(f+1);++P<f;)oe[P]=R[P];return oe[f]=m(te),Gr(l,this,oe)}}function qE(l,f){return f.length<2?l:co(l,vn(f,0,-1))}function z8(l,f){for(var m=l.length,R=vr(f.length,m),P=Mr(l);R--;){var $=f[R];l[R]=hi($,m)?P[$]:r}return l}function ih(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var LE=BE(sE),us=e7||function(l,f){return ur.setTimeout(l,f)},oh=BE(l8);function zE(l,f,m){var R=f+"";return oh(l,T8(R,B8(I8(R),m)))}function BE(l){var f=0,m=0;return function(){var R=i7(),P=A-(R-m);if(m=R,P>0){if(++f>=G)return arguments[0]}else f=0;return l.apply(r,arguments)}}function mc(l,f){var m=-1,R=l.length,P=R-1;for(f=f===r?R:f;++m<f;){var $=Ff(m,P),te=l[$];l[$]=l[m],l[m]=te}return l.length=f,l}var FE=D8(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(wr,function(m,R,P,$){f.push(P?$.replace($t,"$1"):R||m)}),f});function kn(l){if(typeof l=="string"||Zr(l))return l;var f=l+"";return f=="0"&&1/l==-U?"-0":f}function fo(l){if(l!=null){try{return Ul.call(l)}catch{}try{return l+""}catch{}}return""}function B8(l,f){return Kr(H,function(m){var R="_."+m[0];f&m[1]&&!Fl(l,R)&&l.push(R)}),l.sort()}function $E(l){if(l instanceof Ze)return l.clone();var f=new hn(l.__wrapped__,l.__chain__);return f.__actions__=Mr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function F8(l,f,m){(m?Sr(l,f,m):f===r)?f=1:f=Yt(Fe(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var P=0,$=0,te=de(Ql(R/f));P<R;)te[$++]=vn(l,P,P+=f);return te}function $8(l){for(var f=-1,m=l==null?0:l.length,R=0,P=[];++f<m;){var $=l[f];$&&(P[R++]=$)}return P}function H8(){var l=arguments.length;if(!l)return[];for(var f=de(l-1),m=arguments[0],R=l;R--;)f[R-1]=arguments[R];return Ti(ze(m)?Mr(m):[m],dr(f,1))}var V8=Ve(function(l,f){return qt(l)?is(l,dr(f,1,qt,!0)):[]}),W8=Ve(function(l,f){var m=gn(f);return qt(m)&&(m=r),qt(l)?is(l,dr(f,1,qt,!0),Me(m,2)):[]}),U8=Ve(function(l,f){var m=gn(f);return qt(m)&&(m=r),qt(l)?is(l,dr(f,1,qt,!0),r,m):[]});function G8(l,f,m){var R=l==null?0:l.length;return R?(f=m||f===r?1:Fe(f),vn(l,f<0?0:f,R)):[]}function K8(l,f,m){var R=l==null?0:l.length;return R?(f=m||f===r?1:Fe(f),f=R-f,vn(l,0,f<0?0:f)):[]}function Y8(l,f){return l&&l.length?cc(l,Me(f,3),!0,!0):[]}function X8(l,f){return l&&l.length?cc(l,Me(f,3),!0):[]}function Z8(l,f,m,R){var P=l==null?0:l.length;return P?(m&&typeof m!="number"&&Sr(l,f,m)&&(m=0,R=P),H7(l,f,m,R)):[]}function HE(l,f,m){var R=l==null?0:l.length;if(!R)return-1;var P=m==null?0:Fe(m);return P<0&&(P=Yt(R+P,0)),$l(l,Me(f,3),P)}function VE(l,f,m){var R=l==null?0:l.length;if(!R)return-1;var P=R-1;return m!==r&&(P=Fe(m),P=m<0?Yt(R+P,0):vr(P,R-1)),$l(l,Me(f,3),P,!0)}function WE(l){var f=l==null?0:l.length;return f?dr(l,1):[]}function J8(l){var f=l==null?0:l.length;return f?dr(l,U):[]}function Q8(l,f){var m=l==null?0:l.length;return m?(f=f===r?1:Fe(f),dr(l,f)):[]}function eB(l){for(var f=-1,m=l==null?0:l.length,R={};++f<m;){var P=l[f];Gn(R,P[0],P[1])}return R}function UE(l){return l&&l.length?l[0]:r}function tB(l,f,m){var R=l==null?0:l.length;if(!R)return-1;var P=m==null?0:Fe(m);return P<0&&(P=Yt(R+P,0)),Fo(l,f,P)}function rB(l){var f=l==null?0:l.length;return f?vn(l,0,-1):[]}var nB=Ve(function(l){var f=Et(l,Uf);return f.length&&f[0]===l[0]?jf(f):[]}),iB=Ve(function(l){var f=gn(l),m=Et(l,Uf);return f===gn(m)?f=r:m.pop(),m.length&&m[0]===l[0]?jf(m,Me(f,2)):[]}),oB=Ve(function(l){var f=gn(l),m=Et(l,Uf);return f=typeof f=="function"?f:r,f&&m.pop(),m.length&&m[0]===l[0]?jf(m,r,f):[]});function aB(l,f){return l==null?"":r7.call(l,f)}function gn(l){var f=l==null?0:l.length;return f?l[f-1]:r}function sB(l,f,m){var R=l==null?0:l.length;if(!R)return-1;var P=R;return m!==r&&(P=Fe(m),P=P<0?Yt(R+P,0):vr(P,R-1)),f===f?Bz(l,f,P):$l(l,CS,P,!0)}function lB(l,f){return l&&l.length?nE(l,Fe(f)):r}var cB=Ve(GE);function GE(l,f){return l&&l.length&&f&&f.length?Bf(l,f):l}function uB(l,f,m){return l&&l.length&&f&&f.length?Bf(l,f,Me(m,2)):l}function dB(l,f,m){return l&&l.length&&f&&f.length?Bf(l,f,r,m):l}var fB=fi(function(l,f){var m=l==null?0:l.length,R=kf(l,f);return aE(l,Et(f,function(P){return hi(P,m)?+P:P}).sort(gE)),R});function hB(l,f){var m=[];if(!(l&&l.length))return m;var R=-1,P=[],$=l.length;for(f=Me(f,3);++R<$;){var te=l[R];f(te,R,l)&&(m.push(te),P.push(R))}return aE(l,P),m}function ah(l){return l==null?l:a7.call(l)}function pB(l,f,m){var R=l==null?0:l.length;return R?(m&&typeof m!="number"&&Sr(l,f,m)?(f=0,m=R):(f=f==null?0:Fe(f),m=m===r?R:Fe(m)),vn(l,f,m)):[]}function vB(l,f){return lc(l,f)}function gB(l,f,m){return Hf(l,f,Me(m,2))}function mB(l,f){var m=l==null?0:l.length;if(m){var R=lc(l,f);if(R<m&&Mn(l[R],f))return R}return-1}function bB(l,f){return lc(l,f,!0)}function yB(l,f,m){return Hf(l,f,Me(m,2),!0)}function xB(l,f){var m=l==null?0:l.length;if(m){var R=lc(l,f,!0)-1;if(Mn(l[R],f))return R}return-1}function wB(l){return l&&l.length?lE(l):[]}function _B(l,f){return l&&l.length?lE(l,Me(f,2)):[]}function SB(l){var f=l==null?0:l.length;return f?vn(l,1,f):[]}function EB(l,f,m){return l&&l.length?(f=m||f===r?1:Fe(f),vn(l,0,f<0?0:f)):[]}function OB(l,f,m){var R=l==null?0:l.length;return R?(f=m||f===r?1:Fe(f),f=R-f,vn(l,f<0?0:f,R)):[]}function CB(l,f){return l&&l.length?cc(l,Me(f,3),!1,!0):[]}function IB(l,f){return l&&l.length?cc(l,Me(f,3)):[]}var RB=Ve(function(l){return Ai(dr(l,1,qt,!0))}),NB=Ve(function(l){var f=gn(l);return qt(f)&&(f=r),Ai(dr(l,1,qt,!0),Me(f,2))}),TB=Ve(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Ai(dr(l,1,qt,!0),r,f)});function PB(l){return l&&l.length?Ai(l):[]}function kB(l,f){return l&&l.length?Ai(l,Me(f,2)):[]}function MB(l,f){return f=typeof f=="function"?f:r,l&&l.length?Ai(l,r,f):[]}function sh(l){if(!(l&&l.length))return[];var f=0;return l=Ni(l,function(m){if(qt(m))return f=Yt(m.length,f),!0}),Ef(f,function(m){return Et(l,wf(m))})}function KE(l,f){if(!(l&&l.length))return[];var m=sh(l);return f==null?m:Et(m,function(R){return Gr(f,r,R)})}var AB=Ve(function(l,f){return qt(l)?is(l,f):[]}),DB=Ve(function(l){return Wf(Ni(l,qt))}),jB=Ve(function(l){var f=gn(l);return qt(f)&&(f=r),Wf(Ni(l,qt),Me(f,2))}),qB=Ve(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Wf(Ni(l,qt),r,f)}),LB=Ve(sh);function zB(l,f){return fE(l||[],f||[],ns)}function BB(l,f){return fE(l||[],f||[],ss)}var FB=Ve(function(l){var f=l.length,m=f>1?l[f-1]:r;return m=typeof m=="function"?(l.pop(),m):r,KE(l,m)});function YE(l){var f=F(l);return f.__chain__=!0,f}function $B(l,f){return f(l),l}function bc(l,f){return f(l)}var HB=fi(function(l){var f=l.length,m=f?l[0]:0,R=this.__wrapped__,P=function($){return kf($,l)};return f>1||this.__actions__.length||!(R instanceof Ze)||!hi(m)?this.thru(P):(R=R.slice(m,+m+(f?1:0)),R.__actions__.push({func:bc,args:[P],thisArg:r}),new hn(R,this.__chain__).thru(function($){return f&&!$.length&&$.push(r),$}))});function VB(){return YE(this)}function WB(){return new hn(this.value(),this.__chain__)}function UB(){this.__values__===r&&(this.__values__=cO(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function GB(){return this}function KB(l){for(var f,m=this;m instanceof nc;){var R=$E(m);R.__index__=0,R.__values__=r,f?P.__wrapped__=R:f=R;var P=R;m=m.__wrapped__}return P.__wrapped__=l,f}function YB(){var l=this.__wrapped__;if(l instanceof Ze){var f=l;return this.__actions__.length&&(f=new Ze(this)),f=f.reverse(),f.__actions__.push({func:bc,args:[ah],thisArg:r}),new hn(f,this.__chain__)}return this.thru(ah)}function XB(){return dE(this.__wrapped__,this.__actions__)}var ZB=uc(function(l,f,m){st.call(l,m)?++l[m]:Gn(l,m,1)});function JB(l,f,m){var R=ze(l)?ES:$7;return m&&Sr(l,f,m)&&(f=r),R(l,Me(f,3))}function QB(l,f){var m=ze(l)?Ni:KS;return m(l,Me(f,3))}var e9=_E(HE),t9=_E(VE);function r9(l,f){return dr(yc(l,f),1)}function n9(l,f){return dr(yc(l,f),U)}function i9(l,f,m){return m=m===r?1:Fe(m),dr(yc(l,f),m)}function XE(l,f){var m=ze(l)?Kr:Mi;return m(l,Me(f,3))}function ZE(l,f){var m=ze(l)?Sz:GS;return m(l,Me(f,3))}var o9=uc(function(l,f,m){st.call(l,m)?l[m].push(f):Gn(l,m,[f])});function a9(l,f,m,R){l=Ar(l)?l:Qo(l),m=m&&!R?Fe(m):0;var P=l.length;return m<0&&(m=Yt(P+m,0)),Ec(l)?m<=P&&l.indexOf(f,m)>-1:!!P&&Fo(l,f,m)>-1}var s9=Ve(function(l,f,m){var R=-1,P=typeof f=="function",$=Ar(l)?de(l.length):[];return Mi(l,function(te){$[++R]=P?Gr(f,te,m):os(te,f,m)}),$}),l9=uc(function(l,f,m){Gn(l,m,f)});function yc(l,f){var m=ze(l)?Et:eE;return m(l,Me(f,3))}function c9(l,f,m,R){return l==null?[]:(ze(f)||(f=f==null?[]:[f]),m=R?r:m,ze(m)||(m=m==null?[]:[m]),iE(l,f,m))}var u9=uc(function(l,f,m){l[m?0:1].push(f)},function(){return[[],[]]});function d9(l,f,m){var R=ze(l)?yf:RS,P=arguments.length<3;return R(l,Me(f,4),m,P,Mi)}function f9(l,f,m){var R=ze(l)?Ez:RS,P=arguments.length<3;return R(l,Me(f,4),m,P,GS)}function h9(l,f){var m=ze(l)?Ni:KS;return m(l,_c(Me(f,3)))}function p9(l){var f=ze(l)?HS:a8;return f(l)}function v9(l,f,m){(m?Sr(l,f,m):f===r)?f=1:f=Fe(f);var R=ze(l)?q7:s8;return R(l,f)}function g9(l){var f=ze(l)?L7:c8;return f(l)}function m9(l){if(l==null)return 0;if(Ar(l))return Ec(l)?Ho(l):l.length;var f=gr(l);return f==xe||f==Pe?l.size:Lf(l).length}function b9(l,f,m){var R=ze(l)?xf:u8;return m&&Sr(l,f,m)&&(f=r),R(l,Me(f,3))}var y9=Ve(function(l,f){if(l==null)return[];var m=f.length;return m>1&&Sr(l,f[0],f[1])?f=[]:m>2&&Sr(f[0],f[1],f[2])&&(f=[f[0]]),iE(l,dr(f,1),[])}),xc=Qz||function(){return ur.Date.now()};function x9(l,f){if(typeof f!="function")throw new fn(a);return l=Fe(l),function(){if(--l<1)return f.apply(this,arguments)}}function JE(l,f,m){return f=m?r:f,f=l&&f==null?l.length:f,di(l,T,r,r,r,r,f)}function QE(l,f){var m;if(typeof f!="function")throw new fn(a);return l=Fe(l),function(){return--l>0&&(m=f.apply(this,arguments)),l<=1&&(f=r),m}}var lh=Ve(function(l,f,m){var R=w;if(m.length){var P=Pi(m,Zo(lh));R|=I}return di(l,R,f,m,P)}),eO=Ve(function(l,f,m){var R=w|y;if(m.length){var P=Pi(m,Zo(eO));R|=I}return di(f,R,l,m,P)});function tO(l,f,m){f=m?r:f;var R=di(l,E,r,r,r,r,r,f);return R.placeholder=tO.placeholder,R}function rO(l,f,m){f=m?r:f;var R=di(l,S,r,r,r,r,r,f);return R.placeholder=rO.placeholder,R}function nO(l,f,m){var R,P,$,te,oe,se,ve=0,ge=!1,ye=!1,Se=!0;if(typeof l!="function")throw new fn(a);f=mn(f)||0,Rt(m)&&(ge=!!m.leading,ye="maxWait"in m,$=ye?Yt(mn(m.maxWait)||0,f):$,Se="trailing"in m?!!m.trailing:Se);function Ne(Lt){var An=R,gi=P;return R=P=r,ve=Lt,te=l.apply(gi,An),te}function De(Lt){return ve=Lt,oe=us(Ge,f),ge?Ne(Lt):te}function He(Lt){var An=Lt-se,gi=Lt-ve,SO=f-An;return ye?vr(SO,$-gi):SO}function ke(Lt){var An=Lt-se,gi=Lt-ve;return se===r||An>=f||An<0||ye&&gi>=$}function Ge(){var Lt=xc();if(ke(Lt))return Je(Lt);oe=us(Ge,He(Lt))}function Je(Lt){return oe=r,Se&&R?Ne(Lt):(R=P=r,te)}function Jr(){oe!==r&&hE(oe),ve=0,R=se=P=oe=r}function Er(){return oe===r?te:Je(xc())}function Qr(){var Lt=xc(),An=ke(Lt);if(R=arguments,P=this,se=Lt,An){if(oe===r)return De(se);if(ye)return hE(oe),oe=us(Ge,f),Ne(se)}return oe===r&&(oe=us(Ge,f)),te}return Qr.cancel=Jr,Qr.flush=Er,Qr}var w9=Ve(function(l,f){return US(l,1,f)}),_9=Ve(function(l,f,m){return US(l,mn(f)||0,m)});function S9(l){return di(l,z)}function wc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new fn(a);var m=function(){var R=arguments,P=f?f.apply(this,R):R[0],$=m.cache;if($.has(P))return $.get(P);var te=l.apply(this,R);return m.cache=$.set(P,te)||$,te};return m.cache=new(wc.Cache||ui),m}wc.Cache=ui;function _c(l){if(typeof l!="function")throw new fn(a);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function E9(l){return QE(2,l)}var O9=d8(function(l,f){f=f.length==1&&ze(f[0])?Et(f[0],Yr(Me())):Et(dr(f,1),Yr(Me()));var m=f.length;return Ve(function(R){for(var P=-1,$=vr(R.length,m);++P<$;)R[P]=f[P].call(this,R[P]);return Gr(l,this,R)})}),ch=Ve(function(l,f){var m=Pi(f,Zo(ch));return di(l,I,r,f,m)}),iO=Ve(function(l,f){var m=Pi(f,Zo(iO));return di(l,N,r,f,m)}),C9=fi(function(l,f){return di(l,k,r,r,r,f)});function I9(l,f){if(typeof l!="function")throw new fn(a);return f=f===r?f:Fe(f),Ve(l,f)}function R9(l,f){if(typeof l!="function")throw new fn(a);return f=f==null?0:Yt(Fe(f),0),Ve(function(m){var R=m[f],P=ji(m,0,f);return R&&Ti(P,R),Gr(l,this,P)})}function N9(l,f,m){var R=!0,P=!0;if(typeof l!="function")throw new fn(a);return Rt(m)&&(R="leading"in m?!!m.leading:R,P="trailing"in m?!!m.trailing:P),nO(l,f,{leading:R,maxWait:f,trailing:P})}function T9(l){return JE(l,1)}function P9(l,f){return ch(Gf(f),l)}function k9(){if(!arguments.length)return[];var l=arguments[0];return ze(l)?l:[l]}function M9(l){return pn(l,x)}function A9(l,f){return f=typeof f=="function"?f:r,pn(l,x,f)}function D9(l){return pn(l,p|x)}function j9(l,f){return f=typeof f=="function"?f:r,pn(l,p|x,f)}function q9(l,f){return f==null||WS(l,f,nr(f))}function Mn(l,f){return l===f||l!==l&&f!==f}var L9=pc(Df),z9=pc(function(l,f){return l>=f}),ho=ZS((function(){return arguments})())?ZS:function(l){return kt(l)&&st.call(l,"callee")&&!qS.call(l,"callee")},ze=de.isArray,B9=bS?Yr(bS):K7;function Ar(l){return l!=null&&Sc(l.length)&&!pi(l)}function qt(l){return kt(l)&&Ar(l)}function F9(l){return l===!0||l===!1||kt(l)&&_r(l)==Q}var qi=t7||wh,$9=yS?Yr(yS):Y7;function H9(l){return kt(l)&&l.nodeType===1&&!ds(l)}function V9(l){if(l==null)return!0;if(Ar(l)&&(ze(l)||typeof l=="string"||typeof l.splice=="function"||qi(l)||Jo(l)||ho(l)))return!l.length;var f=gr(l);if(f==xe||f==Pe)return!l.size;if(cs(l))return!Lf(l).length;for(var m in l)if(st.call(l,m))return!1;return!0}function W9(l,f){return as(l,f)}function U9(l,f,m){m=typeof m=="function"?m:r;var R=m?m(l,f):r;return R===r?as(l,f,r,m):!!R}function uh(l){if(!kt(l))return!1;var f=_r(l);return f==ee||f==ce||typeof l.message=="string"&&typeof l.name=="string"&&!ds(l)}function G9(l){return typeof l=="number"&&zS(l)}function pi(l){if(!Rt(l))return!1;var f=_r(l);return f==pe||f==ue||f==V||f==Ce}function oO(l){return typeof l=="number"&&l==Fe(l)}function Sc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=re}function Rt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function kt(l){return l!=null&&typeof l=="object"}var aO=xS?Yr(xS):Z7;function K9(l,f){return l===f||qf(l,f,eh(f))}function Y9(l,f,m){return m=typeof m=="function"?m:r,qf(l,f,eh(f),m)}function X9(l){return sO(l)&&l!=+l}function Z9(l){if(A8(l))throw new Le(o);return JS(l)}function J9(l){return l===null}function Q9(l){return l==null}function sO(l){return typeof l=="number"||kt(l)&&_r(l)==le}function ds(l){if(!kt(l)||_r(l)!=me)return!1;var f=Xl(l);if(f===null)return!0;var m=st.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&Ul.call(m)==Yz}var dh=wS?Yr(wS):J7;function eF(l){return oO(l)&&l>=-re&&l<=re}var lO=_S?Yr(_S):Q7;function Ec(l){return typeof l=="string"||!ze(l)&&kt(l)&&_r(l)==Te}function Zr(l){return typeof l=="symbol"||kt(l)&&_r(l)==Be}var Jo=SS?Yr(SS):e8;function tF(l){return l===r}function rF(l){return kt(l)&&gr(l)==$e}function nF(l){return kt(l)&&_r(l)==Ye}var iF=pc(zf),oF=pc(function(l,f){return l<=f});function cO(l){if(!l)return[];if(Ar(l))return Ec(l)?Tn(l):Mr(l);if(Ja&&l[Ja])return qz(l[Ja]());var f=gr(l),m=f==xe?Cf:f==Pe?Hl:Qo;return m(l)}function vi(l){if(!l)return l===0?l:0;if(l=mn(l),l===U||l===-U){var f=l<0?-1:1;return f*j}return l===l?l:0}function Fe(l){var f=vi(l),m=f%1;return f===f?m?f-m:f:0}function uO(l){return l?lo(Fe(l),0,Z):0}function mn(l){if(typeof l=="number")return l;if(Zr(l))return W;if(Rt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Rt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=NS(l);var m=ln.test(l);return m||un.test(l)?xz(l.slice(2),m?2:8):cr.test(l)?W:+l}function dO(l){return Yn(l,Dr(l))}function aF(l){return l?lo(Fe(l),-re,re):l===0?l:0}function lt(l){return l==null?"":Xr(l)}var sF=Yo(function(l,f){if(cs(f)||Ar(f)){Yn(f,nr(f),l);return}for(var m in f)st.call(f,m)&&ns(l,m,f[m])}),fO=Yo(function(l,f){Yn(f,Dr(f),l)}),hO=Yo(function(l,f,m,R){Yn(f,Dr(f),l,R)}),fh=Yo(function(l,f,m,R){Yn(f,nr(f),l,R)}),lF=fi(kf);function cF(l,f){var m=Ko(l);return f==null?m:VS(m,f)}var uF=Ve(function(l,f){l=gt(l);var m=-1,R=f.length,P=R>2?f[2]:r;for(P&&Sr(f[0],f[1],P)&&(R=1);++m<R;)for(var $=f[m],te=Dr($),oe=-1,se=te.length;++oe<se;){var ve=te[oe],ge=l[ve];(ge===r||Mn(ge,Wo[ve])&&!st.call(l,ve))&&(l[ve]=$[ve])}return l}),dF=Ve(function(l){return l.push(r,NE),Gr(pO,r,l)});function fF(l,f){return OS(l,Me(f,3),Kn)}function hF(l,f){return OS(l,Me(f,3),Af)}function pF(l,f){return l==null?l:Mf(l,Me(f,3),Dr)}function vF(l,f){return l==null?l:YS(l,Me(f,3),Dr)}function gF(l,f){return l&&Kn(l,Me(f,3))}function mF(l,f){return l&&Af(l,Me(f,3))}function bF(l){return l==null?[]:ac(l,nr(l))}function yF(l){return l==null?[]:ac(l,Dr(l))}function hh(l,f,m){var R=l==null?r:co(l,f);return R===r?m:R}function xF(l,f){return l!=null&&kE(l,f,V7)}function ph(l,f){return l!=null&&kE(l,f,W7)}var wF=EE(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Gl.call(f)),l[f]=m},gh(jr)),_F=EE(function(l,f,m){f!=null&&typeof f.toString!="function"&&(f=Gl.call(f)),st.call(l,f)?l[f].push(m):l[f]=[m]},Me),SF=Ve(os);function nr(l){return Ar(l)?$S(l):Lf(l)}function Dr(l){return Ar(l)?$S(l,!0):t8(l)}function EF(l,f){var m={};return f=Me(f,3),Kn(l,function(R,P,$){Gn(m,f(R,P,$),R)}),m}function OF(l,f){var m={};return f=Me(f,3),Kn(l,function(R,P,$){Gn(m,P,f(R,P,$))}),m}var CF=Yo(function(l,f,m){sc(l,f,m)}),pO=Yo(function(l,f,m,R){sc(l,f,m,R)}),IF=fi(function(l,f){var m={};if(l==null)return m;var R=!1;f=Et(f,function($){return $=Di($,l),R||(R=$.length>1),$}),Yn(l,Jf(l),m),R&&(m=pn(m,p|v|x,_8));for(var P=f.length;P--;)Vf(m,f[P]);return m});function RF(l,f){return vO(l,_c(Me(f)))}var NF=fi(function(l,f){return l==null?{}:n8(l,f)});function vO(l,f){if(l==null)return{};var m=Et(Jf(l),function(R){return[R]});return f=Me(f),oE(l,m,function(R,P){return f(R,P[0])})}function TF(l,f,m){f=Di(f,l);var R=-1,P=f.length;for(P||(P=1,l=r);++R<P;){var $=l==null?r:l[kn(f[R])];$===r&&(R=P,$=m),l=pi($)?$.call(l):$}return l}function PF(l,f,m){return l==null?l:ss(l,f,m)}function kF(l,f,m,R){return R=typeof R=="function"?R:r,l==null?l:ss(l,f,m,R)}var gO=IE(nr),mO=IE(Dr);function MF(l,f,m){var R=ze(l),P=R||qi(l)||Jo(l);if(f=Me(f,4),m==null){var $=l&&l.constructor;P?m=R?new $:[]:Rt(l)?m=pi($)?Ko(Xl(l)):{}:m={}}return(P?Kr:Kn)(l,function(te,oe,se){return f(m,te,oe,se)}),m}function AF(l,f){return l==null?!0:Vf(l,f)}function DF(l,f,m){return l==null?l:uE(l,f,Gf(m))}function jF(l,f,m,R){return R=typeof R=="function"?R:r,l==null?l:uE(l,f,Gf(m),R)}function Qo(l){return l==null?[]:Of(l,nr(l))}function qF(l){return l==null?[]:Of(l,Dr(l))}function LF(l,f,m){return m===r&&(m=f,f=r),m!==r&&(m=mn(m),m=m===m?m:0),f!==r&&(f=mn(f),f=f===f?f:0),lo(mn(l),f,m)}function zF(l,f,m){return f=vi(f),m===r?(m=f,f=0):m=vi(m),l=mn(l),U7(l,f,m)}function BF(l,f,m){if(m&&typeof m!="boolean"&&Sr(l,f,m)&&(f=m=r),m===r&&(typeof f=="boolean"?(m=f,f=r):typeof l=="boolean"&&(m=l,l=r)),l===r&&f===r?(l=0,f=1):(l=vi(l),f===r?(f=l,l=0):f=vi(f)),l>f){var R=l;l=f,f=R}if(m||l%1||f%1){var P=BS();return vr(l+P*(f-l+yz("1e-"+((P+"").length-1))),f)}return Ff(l,f)}var FF=Xo(function(l,f,m){return f=f.toLowerCase(),l+(m?bO(f):f)});function bO(l){return vh(lt(l).toLowerCase())}function yO(l){return l=lt(l),l&&l.replace(Ri,kz).replace(cz,"")}function $F(l,f,m){l=lt(l),f=Xr(f);var R=l.length;m=m===r?R:lo(Fe(m),0,R);var P=m;return m-=f.length,m>=0&&l.slice(m,P)==f}function HF(l){return l=lt(l),l&&tr.test(l)?l.replace(St,Mz):l}function VF(l){return l=lt(l),l&&Pr.test(l)?l.replace(Ft,"\\$&"):l}var WF=Xo(function(l,f,m){return l+(m?"-":"")+f.toLowerCase()}),UF=Xo(function(l,f,m){return l+(m?" ":"")+f.toLowerCase()}),GF=wE("toLowerCase");function KF(l,f,m){l=lt(l),f=Fe(f);var R=f?Ho(l):0;if(!f||R>=f)return l;var P=(f-R)/2;return hc(ec(P),m)+l+hc(Ql(P),m)}function YF(l,f,m){l=lt(l),f=Fe(f);var R=f?Ho(l):0;return f&&R<f?l+hc(f-R,m):l}function XF(l,f,m){l=lt(l),f=Fe(f);var R=f?Ho(l):0;return f&&R<f?hc(f-R,m)+l:l}function ZF(l,f,m){return m||f==null?f=0:f&&(f=+f),o7(lt(l).replace(jt,""),f||0)}function JF(l,f,m){return(m?Sr(l,f,m):f===r)?f=1:f=Fe(f),$f(lt(l),f)}function QF(){var l=arguments,f=lt(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var e$=Xo(function(l,f,m){return l+(m?"_":"")+f.toLowerCase()});function t$(l,f,m){return m&&typeof m!="number"&&Sr(l,f,m)&&(f=m=r),m=m===r?Z:m>>>0,m?(l=lt(l),l&&(typeof f=="string"||f!=null&&!dh(f))&&(f=Xr(f),!f&&$o(l))?ji(Tn(l),0,m):l.split(f,m)):[]}var r$=Xo(function(l,f,m){return l+(m?" ":"")+vh(f)});function n$(l,f,m){return l=lt(l),m=m==null?0:lo(Fe(m),0,l.length),f=Xr(f),l.slice(m,m+f.length)==f}function i$(l,f,m){var R=F.templateSettings;m&&Sr(l,f,m)&&(f=r),l=lt(l),f=fh({},f,R,RE);var P=fh({},f.imports,R.imports,RE),$=nr(P),te=Of(P,$);Kr($,function(ke){if(qo.test(ke))throw new Le(c)});var oe,se,ve=0,ge=f.interpolate||li,ye="__p += '",Se=If((f.escape||li).source+"|"+ge.source+"|"+(ge===xr?Gt:li).source+"|"+(f.evaluate||li).source+"|$","g"),Ne="//# sourceURL="+(st.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pz+"]")+`
73
+ `;l.replace(Se,function(ke,Ge,Je,Jr,Er,Qr){return Je||(Je=Jr),ye+=l.slice(ve,Qr).replace(Wa,Az),Ge&&(oe=!0,ye+=`' +
74
+ __e(`+Ge+`) +
75
+ '`),Er&&(se=!0,ye+=`';
76
+ `+Er+`;
77
+ __p += '`),Je&&(ye+=`' +
78
+ ((__t = (`+Je+`)) == null ? '' : __t) +
79
+ '`),ve=Qr+ke.length,ke}),ye+=`';
80
+ `;var De=st.call(f,"variable")&&f.variable;if(!De)ye=`with (obj) {
81
+ `+ye+`
59
82
  }
60
- `;else if(cs.test(Ne))throw new Ae(u);me=(ne?me.replace(Ti,""):me).replace(cl,"$1").replace(ll,"$1;"),me="function("+(Ne||"obj")+`) {
61
- `+(Ne?"":`obj || (obj = {});
62
- `)+"var __t, __p = ''"+(Y?", __e = _.escape":"")+(ne?`, __j = Array.prototype.join;
83
+ `;else if(qo.test(De))throw new Le(s);ye=(se?ye.replace(Rn,""):ye).replace(Ii,"$1").replace(At,"$1;"),ye="function("+(De||"obj")+`) {
84
+ `+(De?"":`obj || (obj = {});
85
+ `)+"var __t, __p = ''"+(oe?", __e = _.escape":"")+(se?`, __j = Array.prototype.join;
63
86
  function print() { __p += __j.call(arguments, '') }
64
87
  `:`;
65
- `)+me+`return __p
66
- }`;var je=B1(function(){return Ve(q,Oe+"return "+me).apply(r,V)});if(je.source=me,jf(je))throw je;return je}function az(s){return Ke(s).toLowerCase()}function sz(s){return Ke(s).toUpperCase()}function uz(s,c,g){if(s=Ke(s),s&&(g||c===r))return Gw(s);if(!s||!(c=rr(c)))return s;var O=Tr(s),P=Tr(c),q=Kw(O,P),V=Yw(O,P)+1;return Dn(O,q,V).join("")}function cz(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.slice(0,Zw(s)+1);if(!s||!(c=rr(c)))return s;var O=Tr(s),P=Yw(O,Tr(c))+1;return Dn(O,0,P).join("")}function lz(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.replace(Mi,"");if(!s||!(c=rr(c)))return s;var O=Tr(s),P=Kw(O,Tr(c));return Dn(O,P).join("")}function fz(s,c){var g=B,O=U;if(ft(c)){var P="separator"in c?c.separator:P;g="length"in c?De(c.length):g,O="omission"in c?rr(c.omission):O}s=Ke(s);var q=s.length;if(Li(s)){var V=Tr(s);q=V.length}if(g>=q)return s;var Y=g-Bi(O);if(Y<1)return O;var ne=V?Dn(V,0,Y).join(""):s.slice(0,Y);if(P===r)return ne+O;if(V&&(Y+=ne.length-Y),qf(P)){if(s.slice(Y).search(P)){var pe,ge=ne;for(P.global||(P=Zl(P.source,Ke(ls.exec(P))+"g")),P.lastIndex=0;pe=P.exec(ge);)var me=pe.index;ne=ne.slice(0,me===r?Y:me)}}else if(s.indexOf(rr(P),Y)!=Y){var xe=ne.lastIndexOf(P);xe>-1&&(ne=ne.slice(0,xe))}return ne+O}function dz(s){return s=Ke(s),s&&os.test(s)?s.replace(Mo,zL):s}var hz=Wi(function(s,c,g){return s+(g?" ":"")+c.toUpperCase()}),Ff=B_("toUpperCase");function L1(s,c,g){return s=Ke(s),c=g?r:c,c===r?kL(s)?VL(s):IL(s):s.match(c)||[]}var B1=qe(function(s,c){try{return Qt(s,r,c)}catch(g){return jf(g)?g:new Ae(g)}}),pz=dn(function(s,c){return er(c,function(g){g=Mr(g),Wr(s,g,Mf(s[g],s))}),s});function vz(s){var c=s==null?0:s.length,g=Ie();return s=c?st(s,function(O){if(typeof O[1]!="function")throw new pr(a);return[g(O[0]),O[1]]}):[],qe(function(O){for(var P=-1;++P<c;){var q=s[P];if(Qt(q[0],this,O))return Qt(q[1],this,O)}})}function gz(s){return zB(gr(s,p))}function $f(s){return function(){return s}}function mz(s,c){return s==null||s!==s?c:s}var yz=$_(),bz=$_(!0);function Vt(s){return s}function zf(s){return m_(typeof s=="function"?s:gr(s,p))}function xz(s){return b_(gr(s,p))}function wz(s,c){return x_(s,gr(c,p))}var _z=qe(function(s,c){return function(g){return Ko(g,s,c)}}),Ez=qe(function(s,c){return function(g){return Ko(s,g,c)}});function Hf(s,c,g){var O=Ct(c),P=qs(c,O);g==null&&!(ft(c)&&(P.length||!O.length))&&(g=c,c=s,s=this,P=qs(c,Ct(c)));var q=!(ft(g)&&"chain"in g)||!!g.chain,V=pn(s);return er(P,function(Y){var ne=c[Y];s[Y]=ne,V&&(s.prototype[Y]=function(){var pe=this.__chain__;if(q||pe){var ge=s(this.__wrapped__),me=ge.__actions__=zt(this.__actions__);return me.push({func:ne,args:arguments,thisArg:s}),ge.__chain__=pe,ge}return ne.apply(s,In([this.value()],arguments))})}),s}function Sz(){return It._===this&&(It._=ZL),this}function Uf(){}function Oz(s){return s=De(s),qe(function(c){return w_(c,s)})}var Cz=xf(st),Rz=xf(zw),Iz=xf(Ul);function F1(s){return Rf(s)?Vl(Mr(s)):oF(s)}function Pz(s){return function(c){return s==null?r:ni(s,c)}}var Nz=H_(),Tz=H_(!0);function Vf(){return[]}function Wf(){return!1}function Az(){return{}}function Mz(){return""}function Dz(){return!0}function jz(s,c){if(s=De(s),s<1||s>Q)return[];var g=oe,O=At(s,oe);c=Ie(c),s-=oe;for(var P=Kl(O,c);++g<s;)c(g);return P}function qz(s){return Me(s)?st(s,Mr):nr(s)?[s]:zt(o1(Ke(s)))}function kz(s){var c=++YL;return Ke(s)+c}var Lz=zs(function(s,c){return s+c},0),Bz=wf("ceil"),Fz=zs(function(s,c){return s/c},1),$z=wf("floor");function zz(s){return s&&s.length?js(s,Vt,af):r}function Hz(s,c){return s&&s.length?js(s,Ie(c,2),af):r}function Uz(s){return Vw(s,Vt)}function Vz(s,c){return Vw(s,Ie(c,2))}function Wz(s){return s&&s.length?js(s,Vt,lf):r}function Gz(s,c){return s&&s.length?js(s,Ie(c,2),lf):r}var Kz=zs(function(s,c){return s*c},1),Yz=wf("round"),Xz=zs(function(s,c){return s-c},0);function Zz(s){return s&&s.length?Gl(s,Vt):0}function Jz(s,c){return s&&s.length?Gl(s,Ie(c,2)):0}return M.after=w3,M.ary=g1,M.assign=u5,M.assignIn=N1,M.assignInWith=T1,M.assignWith=kf,M.at=c5,M.before=m1,M.bind=Mf,M.bindAll=pz,M.bindKey=y1,M.castArray=M3,M.chain=h1,M.chunk=zF,M.compact=HF,M.concat=UF,M.cond=vz,M.conforms=gz,M.constant=$f,M.countBy=J$,M.create=l5,M.curry=b1,M.curryRight=x1,M.debounce=w1,M.defaults=f5,M.defaultsDeep=d5,M.defer=_3,M.delay=E3,M.difference=VF,M.differenceBy=WF,M.differenceWith=GF,M.drop=KF,M.dropRight=YF,M.dropRightWhile=XF,M.dropWhile=ZF,M.fill=JF,M.filter=e3,M.flatMap=n3,M.flatMapDeep=i3,M.flatMapDepth=o3,M.flatten=c1,M.flattenDeep=QF,M.flattenDepth=e$,M.flip=S3,M.flow=yz,M.flowRight=bz,M.fromPairs=t$,M.functions=b5,M.functionsIn=x5,M.groupBy=a3,M.initial=n$,M.intersection=i$,M.intersectionBy=o$,M.intersectionWith=a$,M.invert=_5,M.invertBy=E5,M.invokeMap=u3,M.iteratee=zf,M.keyBy=c3,M.keys=Ct,M.keysIn=Ut,M.map=Ys,M.mapKeys=O5,M.mapValues=C5,M.matches=xz,M.matchesProperty=wz,M.memoize=Zs,M.merge=R5,M.mergeWith=A1,M.method=_z,M.methodOf=Ez,M.mixin=Hf,M.negate=Js,M.nthArg=Oz,M.omit=I5,M.omitBy=P5,M.once=O3,M.orderBy=l3,M.over=Cz,M.overArgs=C3,M.overEvery=Rz,M.overSome=Iz,M.partial=Df,M.partialRight=_1,M.partition=f3,M.pick=N5,M.pickBy=M1,M.property=F1,M.propertyOf=Pz,M.pull=l$,M.pullAll=f1,M.pullAllBy=f$,M.pullAllWith=d$,M.pullAt=h$,M.range=Nz,M.rangeRight=Tz,M.rearg=R3,M.reject=p3,M.remove=p$,M.rest=I3,M.reverse=Tf,M.sampleSize=g3,M.set=A5,M.setWith=M5,M.shuffle=m3,M.slice=v$,M.sortBy=x3,M.sortedUniq=_$,M.sortedUniqBy=E$,M.split=rz,M.spread=P3,M.tail=S$,M.take=O$,M.takeRight=C$,M.takeRightWhile=R$,M.takeWhile=I$,M.tap=H$,M.throttle=N3,M.thru=Ks,M.toArray=R1,M.toPairs=D1,M.toPairsIn=j1,M.toPath=qz,M.toPlainObject=P1,M.transform=D5,M.unary=T3,M.union=P$,M.unionBy=N$,M.unionWith=T$,M.uniq=A$,M.uniqBy=M$,M.uniqWith=D$,M.unset=j5,M.unzip=Af,M.unzipWith=d1,M.update=q5,M.updateWith=k5,M.values=Yi,M.valuesIn=L5,M.without=j$,M.words=L1,M.wrap=A3,M.xor=q$,M.xorBy=k$,M.xorWith=L$,M.zip=B$,M.zipObject=F$,M.zipObjectDeep=$$,M.zipWith=z$,M.entries=D1,M.entriesIn=j1,M.extend=N1,M.extendWith=T1,Hf(M,M),M.add=Lz,M.attempt=B1,M.camelCase=z5,M.capitalize=q1,M.ceil=Bz,M.clamp=B5,M.clone=D3,M.cloneDeep=q3,M.cloneDeepWith=k3,M.cloneWith=j3,M.conformsTo=L3,M.deburr=k1,M.defaultTo=mz,M.divide=Fz,M.endsWith=H5,M.eq=Dr,M.escape=U5,M.escapeRegExp=V5,M.every=Q$,M.find=t3,M.findIndex=s1,M.findKey=h5,M.findLast=r3,M.findLastIndex=u1,M.findLastKey=p5,M.floor=$z,M.forEach=p1,M.forEachRight=v1,M.forIn=v5,M.forInRight=g5,M.forOwn=m5,M.forOwnRight=y5,M.get=Lf,M.gt=B3,M.gte=F3,M.has=w5,M.hasIn=Bf,M.head=l1,M.identity=Vt,M.includes=s3,M.indexOf=r$,M.inRange=F5,M.invoke=S5,M.isArguments=ai,M.isArray=Me,M.isArrayBuffer=$3,M.isArrayLike=Ht,M.isArrayLikeObject=pt,M.isBoolean=z3,M.isBuffer=jn,M.isDate=H3,M.isElement=U3,M.isEmpty=V3,M.isEqual=W3,M.isEqualWith=G3,M.isError=jf,M.isFinite=K3,M.isFunction=pn,M.isInteger=E1,M.isLength=Qs,M.isMap=S1,M.isMatch=Y3,M.isMatchWith=X3,M.isNaN=Z3,M.isNative=J3,M.isNil=e5,M.isNull=Q3,M.isNumber=O1,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=ea,M.isRegExp=qf,M.isSafeInteger=t5,M.isSet=C1,M.isString=eu,M.isSymbol=nr,M.isTypedArray=Ki,M.isUndefined=r5,M.isWeakMap=n5,M.isWeakSet=i5,M.join=s$,M.kebabCase=W5,M.last=yr,M.lastIndexOf=u$,M.lowerCase=G5,M.lowerFirst=K5,M.lt=o5,M.lte=a5,M.max=zz,M.maxBy=Hz,M.mean=Uz,M.meanBy=Vz,M.min=Wz,M.minBy=Gz,M.stubArray=Vf,M.stubFalse=Wf,M.stubObject=Az,M.stubString=Mz,M.stubTrue=Dz,M.multiply=Kz,M.nth=c$,M.noConflict=Sz,M.noop=Uf,M.now=Xs,M.pad=Y5,M.padEnd=X5,M.padStart=Z5,M.parseInt=J5,M.random=$5,M.reduce=d3,M.reduceRight=h3,M.repeat=Q5,M.replace=ez,M.result=T5,M.round=Yz,M.runInContext=te,M.sample=v3,M.size=y3,M.snakeCase=tz,M.some=b3,M.sortedIndex=g$,M.sortedIndexBy=m$,M.sortedIndexOf=y$,M.sortedLastIndex=b$,M.sortedLastIndexBy=x$,M.sortedLastIndexOf=w$,M.startCase=nz,M.startsWith=iz,M.subtract=Xz,M.sum=Zz,M.sumBy=Jz,M.template=oz,M.times=jz,M.toFinite=vn,M.toInteger=De,M.toLength=I1,M.toLower=az,M.toNumber=br,M.toSafeInteger=s5,M.toString=Ke,M.toUpper=sz,M.trim=uz,M.trimEnd=cz,M.trimStart=lz,M.truncate=fz,M.unescape=dz,M.uniqueId=kz,M.upperCase=hz,M.upperFirst=Ff,M.each=p1,M.eachRight=v1,M.first=l1,Hf(M,(function(){var s={};return Gr(M,function(c,g){Ge.call(M.prototype,g)||(s[g]=c)}),s})(),{chain:!1}),M.VERSION=n,er(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){M[s].placeholder=M}),er(["drop","take"],function(s,c){Be.prototype[s]=function(g){g=g===r?1:St(De(g),0);var O=this.__filtered__&&!c?new Be(this):this.clone();return O.__filtered__?O.__takeCount__=At(g,O.__takeCount__):O.__views__.push({size:At(g,oe),type:s+(O.__dir__<0?"Right":"")}),O},Be.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),er(["filter","map","takeWhile"],function(s,c){var g=c+1,O=g==G||g==X;Be.prototype[s]=function(P){var q=this.clone();return q.__iteratees__.push({iteratee:Ie(P,3),type:g}),q.__filtered__=q.__filtered__||O,q}}),er(["head","last"],function(s,c){var g="take"+(c?"Right":"");Be.prototype[s]=function(){return this[g](1).value()[0]}}),er(["initial","tail"],function(s,c){var g="drop"+(c?"":"Right");Be.prototype[s]=function(){return this.__filtered__?new Be(this):this[g](1)}}),Be.prototype.compact=function(){return this.filter(Vt)},Be.prototype.find=function(s){return this.filter(s).head()},Be.prototype.findLast=function(s){return this.reverse().find(s)},Be.prototype.invokeMap=qe(function(s,c){return typeof s=="function"?new Be(this):this.map(function(g){return Ko(g,s,c)})}),Be.prototype.reject=function(s){return this.filter(Js(Ie(s)))},Be.prototype.slice=function(s,c){s=De(s);var g=this;return g.__filtered__&&(s>0||c<0)?new Be(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),c!==r&&(c=De(c),g=c<0?g.dropRight(-c):g.take(c-s)),g)},Be.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Be.prototype.toArray=function(){return this.take(oe)},Gr(Be.prototype,function(s,c){var g=/^(?:filter|find|map|reject)|While$/.test(c),O=/^(?:head|last)$/.test(c),P=M[O?"take"+(c=="last"?"Right":""):c],q=O||/^find/.test(c);P&&(M.prototype[c]=function(){var V=this.__wrapped__,Y=O?[1]:arguments,ne=V instanceof Be,pe=Y[0],ge=ne||Me(V),me=function(ke){var $e=P.apply(M,In([ke],Y));return O&&xe?$e[0]:$e};ge&&g&&typeof pe=="function"&&pe.length!=1&&(ne=ge=!1);var xe=this.__chain__,Oe=!!this.__actions__.length,Ne=q&&!xe,je=ne&&!Oe;if(!q&&ge){V=je?V:new Be(this);var Re=s.apply(V,Y);return Re.__actions__.push({func:Ks,args:[me],thisArg:r}),new vr(Re,xe)}return Ne&&je?s.apply(this,Y):(Re=this.thru(me),Ne?O?Re.value()[0]:Re.value():Re)})}),er(["pop","push","shift","sort","splice","unshift"],function(s){var c=xs[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",O=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var P=arguments;if(O&&!this.__chain__){var q=this.value();return c.apply(Me(q)?q:[],P)}return this[g](function(V){return c.apply(Me(V)?V:[],P)})}}),Gr(Be.prototype,function(s,c){var g=M[c];if(g){var O=g.name+"";Ge.call(Hi,O)||(Hi[O]=[]),Hi[O].push({name:c,func:g})}}),Hi[$s(r,w).name]=[{name:"wrapper",func:r}],Be.prototype.clone=hB,Be.prototype.reverse=pB,Be.prototype.value=vB,M.prototype.at=U$,M.prototype.chain=V$,M.prototype.commit=W$,M.prototype.next=G$,M.prototype.plant=Y$,M.prototype.reverse=X$,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=Z$,M.prototype.first=M.prototype.head,$o&&(M.prototype[$o]=K$),M}),Fi=WL();Jn?((Jn.exports=Fi)._=Fi,Fl._=Fi):It._=Fi}).call(oZ)})(Ia,Ia.exports)),Ia.exports}var uc=aZ(),SN={},sa,ON;function wt(){if(ON)return sa;ON=1;var e=function(t){return t&&t.Math===Math&&t};return sa=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof sa=="object"&&sa)||(function(){return this})()||Function("return this")(),sa}var zm={},Hm,CN;function it(){return CN||(CN=1,Hm=function(e){try{return!!e()}catch{return!0}}),Hm}var Um,RN;function Ir(){if(RN)return Um;RN=1;var e=it();return Um=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Um}var Vm,IN;function Kc(){if(IN)return Vm;IN=1;var e=it();return Vm=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Vm}var Wm,PN;function Zt(){if(PN)return Wm;PN=1;var e=Kc(),t=Function.prototype.call;return Wm=e?t.bind(t):function(){return t.apply(t,arguments)},Wm}var Gm={},NN;function ak(){if(NN)return Gm;NN=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Gm.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Gm}var Km,TN;function Yc(){return TN||(TN=1,Km=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Km}var Ym,AN;function ot(){if(AN)return Ym;AN=1;var e=Kc(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Ym=e?n:function(i){return function(){return r.apply(i,arguments)}},Ym}var Xm,MN;function Gn(){if(MN)return Xm;MN=1;var e=ot(),t=e({}.toString),r=e("".slice);return Xm=function(n){return r(t(n),8,-1)},Xm}var Zm,DN;function Xc(){if(DN)return Zm;DN=1;var e=ot(),t=it(),r=Gn(),n=Object,i=e("".split);return Zm=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,Zm}var Jm,jN;function Qa(){return jN||(jN=1,Jm=function(e){return e==null}),Jm}var Qm,qN;function Ii(){if(qN)return Qm;qN=1;var e=Qa(),t=TypeError;return Qm=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Qm}var ey,kN;function No(){if(kN)return ey;kN=1;var e=Xc(),t=Ii();return ey=function(r){return e(t(r))},ey}var ty,LN;function Ot(){if(LN)return ty;LN=1;var e=typeof document=="object"&&document.all;return ty=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},ty}var ry,BN;function Tt(){if(BN)return ry;BN=1;var e=Ot();return ry=function(t){return typeof t=="object"?t!==null:e(t)},ry}var ny,FN;function Zc(){if(FN)return ny;FN=1;var e=wt(),t=Ot(),r=function(n){return t(n)?n:void 0};return ny=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},ny}var iy,$N;function Jc(){if($N)return iy;$N=1;var e=ot();return iy=e({}.isPrototypeOf),iy}var oy,zN;function sk(){if(zN)return oy;zN=1;var e=wt(),t=e.navigator,r=t&&t.userAgent;return oy=r?String(r):"",oy}var ay,HN;function cw(){if(HN)return ay;HN=1;var e=wt(),t=sk(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,o=i&&i.v8,a,u;return o&&(a=o.split("."),u=a[0]>0&&a[0]<4?1:+(a[0]+a[1])),!u&&t&&(a=t.match(/Edge\/(\d+)/),(!a||a[1]>=74)&&(a=t.match(/Chrome\/(\d+)/),a&&(u=+a[1]))),ay=u,ay}var sy,UN;function uk(){if(UN)return sy;UN=1;var e=cw(),t=it(),r=wt(),n=r.String;return sy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),sy}var uy,VN;function ck(){if(VN)return uy;VN=1;var e=uk();return uy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",uy}var cy,WN;function lk(){if(WN)return cy;WN=1;var e=Zc(),t=Ot(),r=Jc(),n=ck(),i=Object;return cy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},cy}var ly,GN;function lw(){if(GN)return ly;GN=1;var e=String;return ly=function(t){try{return e(t)}catch{return"Object"}},ly}var fy,KN;function es(){if(KN)return fy;KN=1;var e=Ot(),t=lw(),r=TypeError;return fy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},fy}var dy,YN;function ts(){if(YN)return dy;YN=1;var e=es(),t=Qa();return dy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},dy}var hy,XN;function sZ(){if(XN)return hy;XN=1;var e=Zt(),t=Ot(),r=Tt(),n=TypeError;return hy=function(i,o){var a,u;if(o==="string"&&t(a=i.toString)&&!r(u=e(a,i))||t(a=i.valueOf)&&!r(u=e(a,i))||o!=="string"&&t(a=i.toString)&&!r(u=e(a,i)))return u;throw new n("Can't convert object to primitive value")},hy}var py={exports:{}},vy,ZN;function Qc(){return ZN||(ZN=1,vy=!1),vy}var gy,JN;function fw(){if(JN)return gy;JN=1;var e=wt(),t=Object.defineProperty;return gy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},gy}var QN;function dw(){if(QN)return py.exports;QN=1;var e=Qc(),t=wt(),r=fw(),n="__core-js_shared__",i=py.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),py.exports}var my,eT;function hw(){if(eT)return my;eT=1;var e=dw();return my=function(t,r){return e[t]||(e[t]=r||{})},my}var yy,tT;function To(){if(tT)return yy;tT=1;var e=Ii(),t=Object;return yy=function(r){return t(e(r))},yy}var by,rT;function Pr(){if(rT)return by;rT=1;var e=ot(),t=To(),r=e({}.hasOwnProperty);return by=Object.hasOwn||function(i,o){return r(t(i),o)},by}var xy,nT;function pw(){if(nT)return xy;nT=1;var e=ot(),t=0,r=Math.random(),n=e(1.1.toString);return xy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},xy}var wy,iT;function $t(){if(iT)return wy;iT=1;var e=wt(),t=hw(),r=Pr(),n=pw(),i=uk(),o=ck(),a=e.Symbol,u=t("wks"),l=o?a.for||a:a&&a.withoutSetter||n;return wy=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:l("Symbol."+d)),u[d]},wy}var _y,oT;function uZ(){if(oT)return _y;oT=1;var e=Zt(),t=Tt(),r=lk(),n=ts(),i=sZ(),o=$t(),a=TypeError,u=o("toPrimitive");return _y=function(l,d){if(!t(l)||r(l))return l;var f=n(l,u),h;if(f){if(d===void 0&&(d="default"),h=e(f,l,d),!t(h)||r(h))return h;throw new a("Can't convert object to primitive value")}return d===void 0&&(d="number"),i(l,d)},_y}var Ey,aT;function fk(){if(aT)return Ey;aT=1;var e=uZ(),t=lk();return Ey=function(r){var n=e(r,"string");return t(n)?n:n+""},Ey}var Sy,sT;function vw(){if(sT)return Sy;sT=1;var e=wt(),t=Tt(),r=e.document,n=t(r)&&t(r.createElement);return Sy=function(i){return n?r.createElement(i):{}},Sy}var Oy,uT;function dk(){if(uT)return Oy;uT=1;var e=Ir(),t=it(),r=vw();return Oy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Oy}var cT;function hk(){if(cT)return zm;cT=1;var e=Ir(),t=Zt(),r=ak(),n=Yc(),i=No(),o=fk(),a=Pr(),u=dk(),l=Object.getOwnPropertyDescriptor;return zm.f=e?l:function(f,h){if(f=i(f),h=o(h),u)try{return l(f,h)}catch{}if(a(f,h))return n(!t(r.f,f,h),f[h])},zm}var Cy={},Ry,lT;function pk(){if(lT)return Ry;lT=1;var e=Ir(),t=it();return Ry=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ry}var Iy,fT;function Nr(){if(fT)return Iy;fT=1;var e=Tt(),t=String,r=TypeError;return Iy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Iy}var dT;function un(){if(dT)return Cy;dT=1;var e=Ir(),t=dk(),r=pk(),n=Nr(),i=fk(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,l="enumerable",d="configurable",f="writable";return Cy.f=e?r?function(p,v,m){if(n(p),v=i(v),n(m),typeof p=="function"&&v==="prototype"&&"value"in m&&f in m&&!m[f]){var y=u(p,v);y&&y[f]&&(p[v]=m.value,m={configurable:d in m?m[d]:y[d],enumerable:l in m?m[l]:y[l],writable:!1})}return a(p,v,m)}:a:function(p,v,m){if(n(p),v=i(v),n(m),t)try{return a(p,v,m)}catch{}if("get"in m||"set"in m)throw new o("Accessors not supported");return"value"in m&&(p[v]=m.value),p},Cy}var Py,hT;function rs(){if(hT)return Py;hT=1;var e=Ir(),t=un(),r=Yc();return Py=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Py}var Ny={exports:{}},Ty,pT;function gw(){if(pT)return Ty;pT=1;var e=Ir(),t=Pr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&(function(){}).name==="something",a=i&&(!e||e&&n(r,"name").configurable);return Ty={EXISTS:i,PROPER:o,CONFIGURABLE:a},Ty}var Ay,vT;function vk(){if(vT)return Ay;vT=1;var e=ot(),t=Ot(),r=dw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Ay=r.inspectSource,Ay}var My,gT;function gk(){if(gT)return My;gT=1;var e=wt(),t=Ot(),r=e.WeakMap;return My=t(r)&&/native code/.test(String(r)),My}var Dy,mT;function mw(){if(mT)return Dy;mT=1;var e=hw(),t=pw(),r=e("keys");return Dy=function(n){return r[n]||(r[n]=t(n))},Dy}var jy,yT;function el(){return yT||(yT=1,jy={}),jy}var qy,bT;function Ao(){if(bT)return qy;bT=1;var e=gk(),t=wt(),r=Tt(),n=rs(),i=Pr(),o=dw(),a=mw(),u=el(),l="Object already initialized",d=t.TypeError,f=t.WeakMap,h,p,v,m=function(w){return v(w)?p(w):h(w,{})},y=function(w){return function(E){var _;if(!r(E)||(_=p(E)).type!==w)throw new d("Incompatible receiver, "+w+" required");return _}};if(e||o.state){var x=o.state||(o.state=new f);x.get=x.get,x.has=x.has,x.set=x.set,h=function(w,E){if(x.has(w))throw new d(l);return E.facade=w,x.set(w,E),E},p=function(w){return x.get(w)||{}},v=function(w){return x.has(w)}}else{var b=a("state");u[b]=!0,h=function(w,E){if(i(w,b))throw new d(l);return E.facade=w,n(w,b,E),E},p=function(w){return i(w,b)?w[b]:{}},v=function(w){return i(w,b)}}return qy={set:h,get:p,has:v,enforce:m,getterFor:y},qy}var xT;function mk(){if(xT)return Ny.exports;xT=1;var e=ot(),t=it(),r=Ot(),n=Pr(),i=Ir(),o=gw().CONFIGURABLE,a=vk(),u=Ao(),l=u.enforce,d=u.get,f=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),m=e([].join),y=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),x=String(String).split("String"),b=Ny.exports=function(w,E,_){p(f(E),0,7)==="Symbol("&&(E="["+v(f(E),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),_&&_.getter&&(E="get "+E),_&&_.setter&&(E="set "+E),(!n(w,"name")||o&&w.name!==E)&&(i?h(w,"name",{value:E,configurable:!0}):w.name=E),y&&_&&n(_,"arity")&&w.length!==_.arity&&h(w,"length",{value:_.arity});try{_&&n(_,"constructor")&&_.constructor?i&&h(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var S=l(w);return n(S,"source")||(S.source=m(x,typeof E=="string"?E:"")),w};return Function.prototype.toString=b(function(){return r(this)&&d(this).source||a(this)},"toString"),Ny.exports}var ky,wT;function Pi(){if(wT)return ky;wT=1;var e=Ot(),t=un(),r=mk(),n=fw();return ky=function(i,o,a,u){u||(u={});var l=u.enumerable,d=u.name!==void 0?u.name:o;if(e(a)&&r(a,d,u),u.global)l?i[o]=a:n(o,a);else{try{u.unsafe?i[o]&&(l=!0):delete i[o]}catch{}l?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!u.nonConfigurable,writable:!u.nonWritable})}return i},ky}var Ly={},By,_T;function cZ(){if(_T)return By;_T=1;var e=Math.ceil,t=Math.floor;return By=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},By}var Fy,ET;function tl(){if(ET)return Fy;ET=1;var e=cZ();return Fy=function(t){var r=+t;return r!==r||r===0?0:e(r)},Fy}var $y,ST;function lZ(){if(ST)return $y;ST=1;var e=tl(),t=Math.max,r=Math.min;return $y=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},$y}var zy,OT;function yw(){if(OT)return zy;OT=1;var e=tl(),t=Math.min;return zy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},zy}var Hy,CT;function rl(){if(CT)return Hy;CT=1;var e=yw();return Hy=function(t){return e(t.length)},Hy}var Uy,RT;function fZ(){if(RT)return Uy;RT=1;var e=No(),t=lZ(),r=rl(),n=function(i){return function(o,a,u){var l=e(o),d=r(l);if(d===0)return!i&&-1;var f=t(u,d),h;if(i&&a!==a){for(;d>f;)if(h=l[f++],h!==h)return!0}else for(;d>f;f++)if((i||f in l)&&l[f]===a)return i||f||0;return!i&&-1}};return Uy={includes:n(!0),indexOf:n(!1)},Uy}var Vy,IT;function yk(){if(IT)return Vy;IT=1;var e=ot(),t=Pr(),r=No(),n=fZ().indexOf,i=el(),o=e([].push);return Vy=function(a,u){var l=r(a),d=0,f=[],h;for(h in l)!t(i,h)&&t(l,h)&&o(f,h);for(;u.length>d;)t(l,h=u[d++])&&(~n(f,h)||o(f,h));return f},Vy}var Wy,PT;function bw(){return PT||(PT=1,Wy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Wy}var NT;function xw(){if(NT)return Ly;NT=1;var e=yk(),t=bw(),r=t.concat("length","prototype");return Ly.f=Object.getOwnPropertyNames||function(i){return e(i,r)},Ly}var Gy={},TT;function bk(){return TT||(TT=1,Gy.f=Object.getOwnPropertySymbols),Gy}var Ky,AT;function dZ(){if(AT)return Ky;AT=1;var e=Zc(),t=ot(),r=xw(),n=bk(),i=Nr(),o=t([].concat);return Ky=e("Reflect","ownKeys")||function(u){var l=r.f(i(u)),d=n.f;return d?o(l,d(u)):l},Ky}var Yy,MT;function hZ(){if(MT)return Yy;MT=1;var e=Pr(),t=dZ(),r=hk(),n=un();return Yy=function(i,o,a){for(var u=t(o),l=n.f,d=r.f,f=0;f<u.length;f++){var h=u[f];!e(i,h)&&!(a&&e(a,h))&&l(i,h,d(o,h))}},Yy}var Xy,DT;function xk(){if(DT)return Xy;DT=1;var e=it(),t=Ot(),r=/#|\.prototype\./,n=function(l,d){var f=o[i(l)];return f===u?!0:f===a?!1:t(d)?e(d):!!d},i=n.normalize=function(l){return String(l).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",u=n.POLYFILL="P";return Xy=n,Xy}var Zy,jT;function Kn(){if(jT)return Zy;jT=1;var e=wt(),t=hk().f,r=rs(),n=Pi(),i=fw(),o=hZ(),a=xk();return Zy=function(u,l){var d=u.target,f=u.global,h=u.stat,p,v,m,y,x,b;if(f?v=e:h?v=e[d]||i(d,{}):v=e[d]&&e[d].prototype,v)for(m in l){if(x=l[m],u.dontCallGetSet?(b=t(v,m),y=b&&b.value):y=v[m],p=a(f?m:d+(h?".":"#")+m,u.forced),!p&&y!==void 0){if(typeof x==typeof y)continue;o(x,y)}(u.sham||y&&y.sham)&&r(x,"sham",!0),n(v,m,x,u)}},Zy}var Jy,qT;function ww(){if(qT)return Jy;qT=1;var e=$t(),t=e("toStringTag"),r={};return r[t]="z",Jy=String(r)==="[object z]",Jy}var Qy,kT;function nl(){if(kT)return Qy;kT=1;var e=ww(),t=Ot(),r=Gn(),n=$t(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",u=function(l,d){try{return l[d]}catch{}};return Qy=e?r:function(l){var d,f,h;return l===void 0?"Undefined":l===null?"Null":typeof(f=u(d=o(l),i))=="string"?f:a?r(d):(h=r(d))==="Object"&&t(d.callee)?"Arguments":h},Qy}var e0,LT;function Ni(){if(LT)return e0;LT=1;var e=nl(),t=String;return e0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},e0}var t0,BT;function wk(){return BT||(BT=1,t0=`
67
- \v\f\r                 \u2028\u2029\uFEFF`),t0}var r0,FT;function pZ(){if(FT)return r0;FT=1;var e=ot(),t=Ii(),r=Ni(),n=wk(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),u=function(l){return function(d){var f=r(t(d));return l&1&&(f=i(f,o,"")),l&2&&(f=i(f,a,"$1")),f}};return r0={start:u(1),end:u(2),trim:u(3)},r0}var n0,$T;function vZ(){if($T)return n0;$T=1;var e=wt(),t=it(),r=ot(),n=Ni(),i=pZ().trim,o=wk(),a=e.parseInt,u=e.Symbol,l=u&&u.iterator,d=/^[+-]?0x/i,f=r(d.exec),h=a(o+"08")!==8||a(o+"0x16")!==22||l&&!t(function(){a(Object(l))});return n0=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,n0}var zT;function gZ(){if(zT)return SN;zT=1;var e=Kn(),t=vZ();return e({global:!0,forced:parseInt!==t},{parseInt:t}),SN}gZ();var HT={},i0,UT;function _k(){if(UT)return i0;UT=1;var e=yk(),t=bw();return i0=Object.keys||function(n){return e(n,t)},i0}var o0,VT;function mZ(){if(VT)return o0;VT=1;var e=Ir(),t=ot(),r=Zt(),n=it(),i=_k(),o=bk(),a=ak(),u=To(),l=Xc(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return o0=!d||n(function(){if(e&&d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},v={},m=Symbol("assign detection"),y="abcdefghijklmnopqrst";return p[m]=7,y.split("").forEach(function(x){v[x]=x}),d({},p)[m]!==7||i(d({},v)).join("")!==y})?function(v,m){for(var y=u(v),x=arguments.length,b=1,w=o.f,E=a.f;x>b;)for(var _=l(arguments[b++]),S=w?h(i(_),w(_)):i(_),R=S.length,I=0,N;R>I;)N=S[I++],(!e||r(E,_,N))&&(y[N]=_[N]);return y}:d,o0}var WT;function yZ(){if(WT)return HT;WT=1;var e=Kn(),t=mZ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),HT}yZ();var GT={},a0,KT;function bZ(){if(KT)return a0;KT=1;var e=Gn(),t=ot();return a0=function(r){if(e(r)==="Function")return t(r)},a0}var s0,YT;function Ek(){if(YT)return s0;YT=1;var e=bZ(),t=es(),r=Kc(),n=e(e.bind);return s0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},s0}var u0,XT;function xZ(){if(XT)return u0;XT=1;var e=Gn();return u0=Array.isArray||function(r){return e(r)==="Array"},u0}var c0,ZT;function wZ(){if(ZT)return c0;ZT=1;var e=ot(),t=it(),r=Ot(),n=nl(),i=Zc(),o=vk(),a=function(){},u=i("Reflect","construct"),l=/^\s*(?:class|function)\b/,d=e(l.exec),f=!l.test(a),h=function(m){if(!r(m))return!1;try{return u(a,[],m),!0}catch{return!1}},p=function(m){if(!r(m))return!1;switch(n(m)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!d(l,o(m))}catch{return!0}};return p.sham=!0,c0=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,c0}var l0,JT;function _Z(){if(JT)return l0;JT=1;var e=xZ(),t=wZ(),r=Tt(),n=$t(),i=n("species"),o=Array;return l0=function(a){var u;return e(a)&&(u=a.constructor,t(u)&&(u===o||e(u.prototype))?u=void 0:r(u)&&(u=u[i],u===null&&(u=void 0))),u===void 0?o:u},l0}var f0,QT;function EZ(){if(QT)return f0;QT=1;var e=_Z();return f0=function(t,r){return new(e(t))(r===0?0:r)},f0}var d0,eA;function SZ(){if(eA)return d0;eA=1;var e=Ir(),t=un(),r=Yc();return d0=function(n,i,o){e?t.f(n,i,r(0,o)):n[i]=o},d0}var h0,tA;function Sk(){if(tA)return h0;tA=1;var e=Ek(),t=Xc(),r=To(),n=rl(),i=EZ(),o=SZ(),a=function(u){var l=u===1,d=u===2,f=u===3,h=u===4,p=u===6,v=u===7,m=u===5||p;return function(y,x,b){for(var w=r(y),E=t(w),_=n(E),S=e(x,b),R=0,I=0,N=l?i(y,_):d||v?i(y,0):void 0,A,L;_>R;R++)if((m||R in E)&&(A=E[R],L=S(A,R,w),u))if(l)o(N,R,L);else if(L)switch(u){case 3:return!0;case 5:return A;case 6:return R;case 2:o(N,I++,A)}else switch(u){case 4:return!1;case 7:o(N,I++,A)}return p?-1:f||h?h:N}};return h0={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},h0}var p0,rA;function OZ(){if(rA)return p0;rA=1;var e=it(),t=$t(),r=cw(),n=t("species");return p0=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},p0}var nA;function CZ(){if(nA)return GT;nA=1;var e=Kn(),t=Sk().filter,r=OZ(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),GT}CZ();var iA={},v0,oA;function RZ(){if(oA)return v0;oA=1;var e=ww(),t=nl();return v0=e?{}.toString:function(){return"[object "+t(this)+"]"},v0}var aA;function IZ(){if(aA)return iA;aA=1;var e=ww(),t=Pi(),r=RZ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),iA}IZ();var g0={},sA;function PZ(){if(sA)return g0;sA=1;var e=Ir(),t=pk(),r=un(),n=Nr(),i=No(),o=_k();return g0.f=e&&!t?Object.defineProperties:function(u,l){n(u);for(var d=i(l),f=o(l),h=f.length,p=0,v;h>p;)r.f(u,v=f[p++],d[v]);return u},g0}var m0,uA;function NZ(){if(uA)return m0;uA=1;var e=Zc();return m0=e("document","documentElement"),m0}var y0,cA;function il(){if(cA)return y0;cA=1;var e=Nr(),t=PZ(),r=bw(),n=el(),i=NZ(),o=vw(),a=mw(),u=">",l="<",d="prototype",f="script",h=a("IE_PROTO"),p=function(){},v=function(w){return l+f+u+w+l+"/"+f+u},m=function(w){w.write(v("")),w.close();var E=w.parentWindow.Object;return w=null,E},y=function(){var w=o("iframe"),E="java"+f+":",_;return w.style.display="none",i.appendChild(w),w.src=String(E),_=w.contentWindow.document,_.open(),_.write(v("document.F=Object")),_.close(),_.F},x,b=function(){try{x=new ActiveXObject("htmlfile")}catch{}b=typeof document<"u"?document.domain&&x?m(x):y():m(x);for(var w=r.length;w--;)delete b[d][r[w]];return b()};return n[h]=!0,y0=Object.create||function(E,_){var S;return E!==null?(p[d]=e(E),S=new p,p[d]=null,S[h]=E):S=b(),_===void 0?S:t.f(S,_)},y0}var b0,lA;function TZ(){if(lA)return b0;lA=1;var e=$t(),t=il(),r=un().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),b0=function(o){i[n][o]=!0},b0}var x0,fA;function ns(){return fA||(fA=1,x0={}),x0}var w0,dA;function AZ(){if(dA)return w0;dA=1;var e=it();return w0=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),w0}var _0,hA;function Ok(){if(hA)return _0;hA=1;var e=Pr(),t=Ot(),r=To(),n=mw(),i=AZ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return _0=i?a.getPrototypeOf:function(l){var d=r(l);if(e(d,o))return d[o];var f=d.constructor;return t(f)&&d instanceof f?f.prototype:d instanceof a?u:null},_0}var E0,pA;function Ck(){if(pA)return E0;pA=1;var e=it(),t=Ot(),r=Tt(),n=il(),i=Ok(),o=Pi(),a=$t(),u=Qc(),l=a("iterator"),d=!1,f,h,p;[].keys&&(p=[].keys(),"next"in p?(h=i(i(p)),h!==Object.prototype&&(f=h)):d=!0);var v=!r(f)||e(function(){var m={};return f[l].call(m)!==m});return v?f={}:u&&(f=n(f)),t(f[l])||o(f,l,function(){return this}),E0={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},E0}var S0,vA;function ol(){if(vA)return S0;vA=1;var e=un().f,t=Pr(),r=$t(),n=r("toStringTag");return S0=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},S0}var O0,gA;function MZ(){if(gA)return O0;gA=1;var e=Ck().IteratorPrototype,t=il(),r=Yc(),n=ol(),i=ns(),o=function(){return this};return O0=function(a,u,l,d){var f=u+" Iterator";return a.prototype=t(e,{next:r(+!d,l)}),n(a,f,!1,!0),i[f]=o,a},O0}var C0,mA;function DZ(){if(mA)return C0;mA=1;var e=ot(),t=es();return C0=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},C0}var R0,yA;function jZ(){if(yA)return R0;yA=1;var e=Tt();return R0=function(t){return e(t)||t===null},R0}var I0,bA;function qZ(){if(bA)return I0;bA=1;var e=jZ(),t=String,r=TypeError;return I0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},I0}var P0,xA;function Rk(){if(xA)return P0;xA=1;var e=DZ(),t=Tt(),r=Ii(),n=qZ();return P0=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},a;try{a=e(Object.prototype,"__proto__","set"),a(o,[]),i=o instanceof Array}catch{}return function(l,d){return r(l),n(d),t(l)&&(i?a(l,d):l.__proto__=d),l}})():void 0),P0}var N0,wA;function Ik(){if(wA)return N0;wA=1;var e=Kn(),t=Zt(),r=Qc(),n=gw(),i=Ot(),o=MZ(),a=Ok(),u=Rk(),l=ol(),d=rs(),f=Pi(),h=$t(),p=ns(),v=Ck(),m=n.PROPER,y=n.CONFIGURABLE,x=v.IteratorPrototype,b=v.BUGGY_SAFARI_ITERATORS,w=h("iterator"),E="keys",_="values",S="entries",R=function(){return this};return N0=function(I,N,A,L,B,U,j){o(A,N,L);var D=function(H){if(H===B&&Q)return Q;if(!b&&H&&H in X)return X[H];switch(H){case E:return function(){return new A(this,H)};case _:return function(){return new A(this,H)};case S:return function(){return new A(this,H)}}return function(){return new A(this)}},G=N+" Iterator",F=!1,X=I.prototype,Z=X[w]||X["@@iterator"]||B&&X[B],Q=!b&&Z||D(B),W=N==="Array"&&X.entries||Z,ee,oe,ae;if(W&&(ee=a(W.call(new I)),ee!==Object.prototype&&ee.next&&(!r&&a(ee)!==x&&(u?u(ee,x):i(ee[w])||f(ee,w,R)),l(ee,G,!0,!0),r&&(p[G]=R))),m&&B===_&&Z&&Z.name!==_&&(!r&&y?d(X,"name",_):(F=!0,Q=function(){return t(Z,this)})),B)if(oe={values:D(_),keys:U?Q:D(E),entries:D(S)},j)for(ae in oe)(b||F||!(ae in X))&&f(X,ae,oe[ae]);else e({target:N,proto:!0,forced:b||F},oe);return(!r||j)&&X[w]!==Q&&f(X,w,Q,{name:B}),p[N]=Q,oe},N0}var T0,_A;function Pk(){return _A||(_A=1,T0=function(e,t){return{value:e,done:t}}),T0}var A0,EA;function Nk(){if(EA)return A0;EA=1;var e=No(),t=TZ(),r=ns(),n=Ao(),i=un().f,o=Ik(),a=Pk(),u=Qc(),l=Ir(),d="Array Iterator",f=n.set,h=n.getterFor(d);A0=o(Array,"Array",function(v,m){f(this,{type:d,target:e(v),index:0,kind:m})},function(){var v=h(this),m=v.target,y=v.index++;if(!m||y>=m.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(y,!1);case"values":return a(m[y],!1)}return a([y,m[y]],!1)},"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!u&&l&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return A0}Nk();var SA={},M0,OA;function Tk(){if(OA)return M0;OA=1;var e=ot(),t=tl(),r=Ni(),n=Ii(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),u=function(l){return function(d,f){var h=r(n(d)),p=t(f),v=h.length,m,y;return p<0||p>=v?l?"":void 0:(m=o(h,p),m<55296||m>56319||p+1===v||(y=o(h,p+1))<56320||y>57343?l?i(h,p):m:l?a(h,p,p+2):(m-55296<<10)+(y-56320)+65536)}};return M0={codeAt:u(!1),charAt:u(!0)},M0}var CA;function kZ(){if(CA)return SA;CA=1;var e=Tk().charAt,t=Ni(),r=Ao(),n=Ik(),i=Pk(),o="String Iterator",a=r.set,u=r.getterFor(o);return n(String,"String",function(l){a(this,{type:o,string:t(l),index:0})},function(){var d=u(this),f=d.string,h=d.index,p;return h>=f.length?i(void 0,!0):(p=e(f,h),d.index+=p.length,i(p,!1))}),SA}kZ();var RA={},IA={},D0,PA;function Ak(){if(PA)return D0;PA=1;var e=it();return D0=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),D0}var j0,NA;function Mk(){if(NA)return j0;NA=1;var e=Pi();return j0=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},j0}var q0={exports:{}},k0={},L0,TA;function LZ(){if(TA)return L0;TA=1;var e=ot();return L0=e([].slice),L0}var AA;function BZ(){if(AA)return k0;AA=1;var e=Gn(),t=No(),r=xw().f,n=LZ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return k0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},k0}var B0,MA;function FZ(){if(MA)return B0;MA=1;var e=it();return B0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),B0}var F0,DA;function $Z(){if(DA)return F0;DA=1;var e=it(),t=Tt(),r=Gn(),n=FZ(),i=Object.isExtensible,o=e(function(){});return F0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,F0}var jA;function _w(){if(jA)return q0.exports;jA=1;var e=Kn(),t=ot(),r=el(),n=Tt(),i=Pr(),o=un().f,a=xw(),u=BZ(),l=$Z(),d=pw(),f=Ak(),h=!1,p=d("meta"),v=0,m=function(_){o(_,p,{value:{objectID:"O"+v++,weakData:{}}})},y=function(_,S){if(!n(_))return typeof _=="symbol"?_:(typeof _=="string"?"S":"P")+_;if(!i(_,p)){if(!l(_))return"F";if(!S)return"E";m(_)}return _[p].objectID},x=function(_,S){if(!i(_,p)){if(!l(_))return!0;if(!S)return!1;m(_)}return _[p].weakData},b=function(_){return f&&h&&l(_)&&!i(_,p)&&m(_),_},w=function(){E.enable=function(){},h=!0;var _=a.f,S=t([].splice),R={};R[p]=1,_(R).length&&(a.f=function(I){for(var N=_(I),A=0,L=N.length;A<L;A++)if(N[A]===p){S(N,A,1);break}return N},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},E=q0.exports={enable:w,fastKey:y,getWeakData:x,onFreeze:b};return r[p]=!0,q0.exports}var $0,qA;function zZ(){if(qA)return $0;qA=1;var e=$t(),t=ns(),r=e("iterator"),n=Array.prototype;return $0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},$0}var z0,kA;function Dk(){if(kA)return z0;kA=1;var e=nl(),t=ts(),r=Qa(),n=ns(),i=$t(),o=i("iterator");return z0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},z0}var H0,LA;function HZ(){if(LA)return H0;LA=1;var e=Zt(),t=es(),r=Nr(),n=lw(),i=Dk(),o=TypeError;return H0=function(a,u){var l=arguments.length<2?i(a):u;if(t(l))return r(e(l,a));throw new o(n(a)+" is not iterable")},H0}var U0,BA;function UZ(){if(BA)return U0;BA=1;var e=Zt(),t=Nr(),r=ts();return U0=function(n,i,o){var a,u;t(n);try{if(a=r(n,"return"),!a){if(i==="throw")throw o;return o}a=e(a,n)}catch(l){u=!0,a=l}if(i==="throw")throw o;if(u)throw a;return t(a),o},U0}var V0,FA;function jk(){if(FA)return V0;FA=1;var e=Ek(),t=Zt(),r=Nr(),n=lw(),i=zZ(),o=rl(),a=Jc(),u=HZ(),l=Dk(),d=UZ(),f=TypeError,h=function(v,m){this.stopped=v,this.result=m},p=h.prototype;return V0=function(v,m,y){var x=y&&y.that,b=!!(y&&y.AS_ENTRIES),w=!!(y&&y.IS_RECORD),E=!!(y&&y.IS_ITERATOR),_=!!(y&&y.INTERRUPTED),S=e(m,x),R,I,N,A,L,B,U,j=function(F){var X=R;return R=void 0,X&&d(X,"normal"),new h(!0,F)},D=function(F){return b?(r(F),_?S(F[0],F[1],j):S(F[0],F[1])):_?S(F,j):S(F)};if(w)R=v.iterator;else if(E)R=v;else{if(I=l(v),!I)throw new f(n(v)+" is not iterable");if(i(I)){for(N=0,A=o(v);A>N;N++)if(L=D(v[N]),L&&a(p,L))return L;return new h(!1)}R=u(v,I)}for(B=w?v.next:R.next;!(U=t(B,R)).done;){var G=U.value;try{L=D(G)}catch(F){if(R)d(R,"throw",F);else throw F}if(typeof L=="object"&&L&&a(p,L))return L}return new h(!1)},V0}var W0,$A;function qk(){if($A)return W0;$A=1;var e=Jc(),t=TypeError;return W0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},W0}var G0,zA;function VZ(){if(zA)return G0;zA=1;var e=$t(),t=e("iterator"),r=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){r=!0}};i[t]=function(){return this},Array.from(i,function(){throw 2})}catch{}return G0=function(o,a){try{if(!a&&!r)return!1}catch{return!1}var u=!1;try{var l={};l[t]=function(){return{next:function(){return{done:u=!0}}}},o(l)}catch{}return u},G0}var K0,HA;function WZ(){if(HA)return K0;HA=1;var e=Ot(),t=Tt(),r=Rk();return K0=function(n,i,o){var a,u;return r&&e(a=i.constructor)&&a!==o&&t(u=a.prototype)&&u!==o.prototype&&r(n,u),n},K0}var Y0,UA;function GZ(){if(UA)return Y0;UA=1;var e=Kn(),t=wt(),r=ot(),n=xk(),i=Pi(),o=_w(),a=jk(),u=qk(),l=Ot(),d=Qa(),f=Tt(),h=it(),p=VZ(),v=ol(),m=WZ();return Y0=function(y,x,b){var w=y.indexOf("Map")!==-1,E=y.indexOf("Weak")!==-1,_=w?"set":"add",S=t[y],R=S&&S.prototype,I=S,N={},A=function(F){var X=r(R[F]);i(R,F,F==="add"?function(Q){return X(this,Q===0?0:Q),this}:F==="delete"?function(Z){return E&&!f(Z)?!1:X(this,Z===0?0:Z)}:F==="get"?function(Q){return E&&!f(Q)?void 0:X(this,Q===0?0:Q)}:F==="has"?function(Q){return E&&!f(Q)?!1:X(this,Q===0?0:Q)}:function(Q,W){return X(this,Q===0?0:Q,W),this})},L=n(y,!l(S)||!(E||R.forEach&&!h(function(){new S().entries().next()})));if(L)I=b.getConstructor(x,y,w,_),o.enable();else if(n(y,!0)){var B=new I,U=B[_](E?{}:-0,1)!==B,j=h(function(){B.has(1)}),D=p(function(F){new S(F)}),G=!E&&h(function(){for(var F=new S,X=5;X--;)F[_](X,X);return!F.has(-0)});D||(I=x(function(F,X){u(F,R);var Z=m(new S,F,I);return d(X)||a(X,Z[_],{that:Z,AS_ENTRIES:w}),Z}),I.prototype=R,R.constructor=I),(j||G)&&(A("delete"),A("has"),w&&A("get")),(G||U)&&A(_),E&&R.clear&&delete R.clear}return N[y]=I,e({global:!0,constructor:!0,forced:I!==S},N),v(I,y),E||b.setStrong(I,y,w),I},Y0}var X0,VA;function KZ(){if(VA)return X0;VA=1;var e=ot(),t=Mk(),r=_w().getWeakData,n=qk(),i=Nr(),o=Qa(),a=Tt(),u=jk(),l=Sk(),d=Pr(),f=Ao(),h=f.set,p=f.getterFor,v=l.find,m=l.findIndex,y=e([].splice),x=0,b=function(_){return _.frozen||(_.frozen=new w)},w=function(){this.entries=[]},E=function(_,S){return v(_.entries,function(R){return R[0]===S})};return w.prototype={get:function(_){var S=E(this,_);if(S)return S[1]},has:function(_){return!!E(this,_)},set:function(_,S){var R=E(this,_);R?R[1]=S:this.entries.push([_,S])},delete:function(_){var S=m(this.entries,function(R){return R[0]===_});return~S&&y(this.entries,S,1),!!~S}},X0={getConstructor:function(_,S,R,I){var N=_(function(U,j){n(U,A),h(U,{type:S,id:x++,frozen:null}),o(j)||u(j,U[I],{that:U,AS_ENTRIES:R})}),A=N.prototype,L=p(S),B=function(U,j,D){var G=L(U),F=r(i(j),!0);return F===!0?b(G).set(j,D):F[G.id]=D,U};return t(A,{delete:function(U){var j=L(this);if(!a(U))return!1;var D=r(U);return D===!0?b(j).delete(U):D&&d(D,j.id)&&delete D[j.id]},has:function(j){var D=L(this);if(!a(j))return!1;var G=r(j);return G===!0?b(D).has(j):G&&d(G,D.id)}}),t(A,R?{get:function(j){var D=L(this);if(a(j)){var G=r(j);if(G===!0)return b(D).get(j);if(G)return G[D.id]}},set:function(j,D){return B(this,j,D)}}:{add:function(j){return B(this,j,!0)}}),N}},X0}var WA;function YZ(){if(WA)return IA;WA=1;var e=Ak(),t=wt(),r=ot(),n=Mk(),i=_w(),o=GZ(),a=KZ(),u=Tt(),l=Ao().enforce,d=it(),f=gk(),h=Object,p=Array.isArray,v=h.isExtensible,m=h.isFrozen,y=h.isSealed,x=h.freeze,b=h.seal,w=!t.ActiveXObject&&"ActiveXObject"in t,E,_=function(U){return function(){return U(this,arguments.length?arguments[0]:void 0)}},S=o("WeakMap",_,a),R=S.prototype,I=r(R.set),N=function(){return e&&d(function(){var U=x([]);return I(new S,U,1),!m(U)})};if(f)if(w){E=a.getConstructor(_,"WeakMap",!0),i.enable();var A=r(R.delete),L=r(R.has),B=r(R.get);n(R,{delete:function(U){if(u(U)&&!v(U)){var j=l(this);return j.frozen||(j.frozen=new E),A(this,U)||j.frozen.delete(U)}return A(this,U)},has:function(j){if(u(j)&&!v(j)){var D=l(this);return D.frozen||(D.frozen=new E),L(this,j)||D.frozen.has(j)}return L(this,j)},get:function(j){if(u(j)&&!v(j)){var D=l(this);return D.frozen||(D.frozen=new E),L(this,j)?B(this,j):D.frozen.get(j)}return B(this,j)},set:function(j,D){if(u(j)&&!v(j)){var G=l(this);G.frozen||(G.frozen=new E),L(this,j)?I(this,j,D):G.frozen.set(j,D)}else I(this,j,D);return this}})}else N()&&n(R,{set:function(j,D){var G;return p(j)&&(m(j)?G=x:y(j)&&(G=b)),I(this,j,D),G&&G(j),this}});return IA}var GA;function XZ(){return GA||(GA=1,YZ()),RA}XZ();var KA={},Z0,YA;function ZZ(){return YA||(YA=1,Z0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Z0}var J0,XA;function JZ(){if(XA)return J0;XA=1;var e=vw(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return J0=r===Object.prototype?void 0:r,J0}var ZA;function QZ(){if(ZA)return KA;ZA=1;var e=wt(),t=ZZ(),r=JZ(),n=Nk(),i=rs(),o=ol(),a=$t(),u=a("iterator"),l=n.values,d=function(h,p){if(h){if(h[u]!==l)try{i(h,u,l)}catch{h[u]=l}if(o(h,p,!0),t[p]){for(var v in n)if(h[v]!==n[v])try{i(h,v,n[v])}catch{h[v]=n[v]}}}};for(var f in t)d(e[f]&&e[f].prototype,f);return d(r,"DOMTokenList"),KA}QZ();var Q0,JA;function eJ(){if(JA)return Q0;JA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=l||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function x(R,I,N){var A,L,B,U,j,D,G=0,F=!1,X=!1,Z=!0;if(typeof R!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(F=!!N.leading,X="maxWait"in N,B=X?v(S(N.maxWait)||0,I):B,Z="trailing"in N?!!N.trailing:Z);function Q(z){var re=A,ie=L;return A=L=void 0,G=z,U=R.apply(ie,re),U}function W(z){return G=z,j=setTimeout(ae,I),F?Q(z):U}function ee(z){var re=z-D,ie=z-G,se=I-re;return X?m(se,B-ie):se}function oe(z){var re=z-D,ie=z-G;return D===void 0||re>=I||re<0||X&&ie>=B}function ae(){var z=y();if(oe(z))return H(z);j=setTimeout(ae,ee(z))}function H(z){return j=void 0,Z&&A?Q(z):(A=L=void 0,U)}function K(){j!==void 0&&clearTimeout(j),G=0,A=D=L=j=void 0}function $(){return j===void 0?U:H(y())}function k(){var z=y(),re=oe(z);if(A=arguments,L=this,D=z,re){if(j===void 0)return W(D);if(X)return j=setTimeout(ae,I),Q(D)}return j===void 0&&(j=setTimeout(ae,I)),U}return k.cancel=K,k.flush=$,k}function b(R,I,N){var A=!0,L=!0;if(typeof R!="function")throw new TypeError(e);return w(N)&&(A="leading"in N?!!N.leading:A,L="trailing"in N?!!N.trailing:L),x(R,I,{leading:A,maxWait:I,trailing:L})}function w(R){var I=typeof R;return!!R&&(I=="object"||I=="function")}function E(R){return!!R&&typeof R=="object"}function _(R){return typeof R=="symbol"||E(R)&&p.call(R)==r}function S(R){if(typeof R=="number")return R;if(_(R))return t;if(w(R)){var I=typeof R.valueOf=="function"?R.valueOf():R;R=w(I)?I+"":I}if(typeof R!="string")return R===0?R:+R;R=R.replace(n,"");var N=o.test(R);return N||a.test(R)?u(R.slice(2),N?2:8):i.test(R)?t:+R}return Q0=b,Q0}var tJ=eJ();const QA=Un(tJ);var eb,eM;function rJ(){if(eM)return eb;eM=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=l||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function x(S,R,I){var N,A,L,B,U,j,D=0,G=!1,F=!1,X=!0;if(typeof S!="function")throw new TypeError(e);R=_(R)||0,b(I)&&(G=!!I.leading,F="maxWait"in I,L=F?v(_(I.maxWait)||0,R):L,X="trailing"in I?!!I.trailing:X);function Z(k){var z=N,re=A;return N=A=void 0,D=k,B=S.apply(re,z),B}function Q(k){return D=k,U=setTimeout(oe,R),G?Z(k):B}function W(k){var z=k-j,re=k-D,ie=R-z;return F?m(ie,L-re):ie}function ee(k){var z=k-j,re=k-D;return j===void 0||z>=R||z<0||F&&re>=L}function oe(){var k=y();if(ee(k))return ae(k);U=setTimeout(oe,W(k))}function ae(k){return U=void 0,X&&N?Z(k):(N=A=void 0,B)}function H(){U!==void 0&&clearTimeout(U),D=0,N=j=A=U=void 0}function K(){return U===void 0?B:ae(y())}function $(){var k=y(),z=ee(k);if(N=arguments,A=this,j=k,z){if(U===void 0)return Q(j);if(F)return U=setTimeout(oe,R),Z(j)}return U===void 0&&(U=setTimeout(oe,R)),B}return $.cancel=H,$.flush=K,$}function b(S){var R=typeof S;return!!S&&(R=="object"||R=="function")}function w(S){return!!S&&typeof S=="object"}function E(S){return typeof S=="symbol"||w(S)&&p.call(S)==r}function _(S){if(typeof S=="number")return S;if(E(S))return t;if(b(S)){var R=typeof S.valueOf=="function"?S.valueOf():S;S=b(R)?R+"":R}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var I=o.test(S);return I||a.test(S)?u(S.slice(2),I?2:8):i.test(S)?t:+S}return eb=x,eb}var nJ=rJ();const tM=Un(nJ);var tb,rM;function iJ(){if(rM)return tb;rM=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof ht=="object"&&ht&&ht.Object===Object&&ht,u=typeof self=="object"&&self&&self.Object===Object&&self,l=a||u||Function("return this")();function d(he,fe){return he==null?void 0:he[fe]}function f(he){var fe=!1;if(he!=null&&typeof he.toString!="function")try{fe=!!(he+"")}catch{}return fe}var h=Array.prototype,p=Function.prototype,v=Object.prototype,m=l["__core-js_shared__"],y=(function(){var he=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return he?"Symbol(src)_1."+he:""})(),x=p.toString,b=v.hasOwnProperty,w=v.toString,E=RegExp("^"+x.call(b).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=h.splice,S=z(l,"Map"),R=z(Object,"create");function I(he){var fe=-1,Ee=he?he.length:0;for(this.clear();++fe<Ee;){var Pe=he[fe];this.set(Pe[0],Pe[1])}}function N(){this.__data__=R?R(null):{}}function A(he){return this.has(he)&&delete this.__data__[he]}function L(he){var fe=this.__data__;if(R){var Ee=fe[he];return Ee===t?void 0:Ee}return b.call(fe,he)?fe[he]:void 0}function B(he){var fe=this.__data__;return R?fe[he]!==void 0:b.call(fe,he)}function U(he,fe){var Ee=this.__data__;return Ee[he]=R&&fe===void 0?t:fe,this}I.prototype.clear=N,I.prototype.delete=A,I.prototype.get=L,I.prototype.has=B,I.prototype.set=U;function j(he){var fe=-1,Ee=he?he.length:0;for(this.clear();++fe<Ee;){var Pe=he[fe];this.set(Pe[0],Pe[1])}}function D(){this.__data__=[]}function G(he){var fe=this.__data__,Ee=K(fe,he);if(Ee<0)return!1;var Pe=fe.length-1;return Ee==Pe?fe.pop():_.call(fe,Ee,1),!0}function F(he){var fe=this.__data__,Ee=K(fe,he);return Ee<0?void 0:fe[Ee][1]}function X(he){return K(this.__data__,he)>-1}function Z(he,fe){var Ee=this.__data__,Pe=K(Ee,he);return Pe<0?Ee.push([he,fe]):Ee[Pe][1]=fe,this}j.prototype.clear=D,j.prototype.delete=G,j.prototype.get=F,j.prototype.has=X,j.prototype.set=Z;function Q(he){var fe=-1,Ee=he?he.length:0;for(this.clear();++fe<Ee;){var Pe=he[fe];this.set(Pe[0],Pe[1])}}function W(){this.__data__={hash:new I,map:new(S||j),string:new I}}function ee(he){return k(this,he).delete(he)}function oe(he){return k(this,he).get(he)}function ae(he){return k(this,he).has(he)}function H(he,fe){return k(this,he).set(he,fe),this}Q.prototype.clear=W,Q.prototype.delete=ee,Q.prototype.get=oe,Q.prototype.has=ae,Q.prototype.set=H;function K(he,fe){for(var Ee=he.length;Ee--;)if(be(he[Ee][0],fe))return Ee;return-1}function $(he){if(!_e(he)||ie(he))return!1;var fe=Ce(he)||f(he)?E:o;return fe.test(se(he))}function k(he,fe){var Ee=he.__data__;return re(fe)?Ee[typeof fe=="string"?"string":"hash"]:Ee.map}function z(he,fe){var Ee=d(he,fe);return $(Ee)?Ee:void 0}function re(he){var fe=typeof he;return fe=="string"||fe=="number"||fe=="symbol"||fe=="boolean"?he!=="__proto__":he===null}function ie(he){return!!y&&y in he}function se(he){if(he!=null){try{return x.call(he)}catch{}try{return he+""}catch{}}return""}function ce(he,fe){if(typeof he!="function"||fe&&typeof fe!="function")throw new TypeError(e);var Ee=function(){var Pe=arguments,Ze=fe?fe.apply(this,Pe):Pe[0],ze=Ee.cache;if(ze.has(Ze))return ze.get(Ze);var Fe=he.apply(this,Pe);return Ee.cache=ze.set(Ze,Fe),Fe};return Ee.cache=new(ce.Cache||Q),Ee}ce.Cache=Q;function be(he,fe){return he===fe||he!==he&&fe!==fe}function Ce(he){var fe=_e(he)?w.call(he):"";return fe==r||fe==n}function _e(he){var fe=typeof he;return!!he&&(fe=="object"||fe=="function")}return tb=ce,tb}var oJ=iJ();const aJ=Un(oJ);var vi=[],sJ=function(){return vi.some(function(e){return e.activeTargets.length>0})},uJ=function(){return vi.some(function(e){return e.skippedTargets.length>0})},nM="ResizeObserver loop completed with undelivered notifications.",cJ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:nM}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=nM),window.dispatchEvent(e)},za;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(za||(za={}));var gi=function(e){return Object.freeze(e)},lJ=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,gi(this)}return e})(),kk=(function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,gi(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,u=t.left,l=t.width,d=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:u,width:l,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Ew=function(e){return e instanceof SVGElement&&"getBBox"in e},Lk=function(e){if(Ew(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},iM=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},fJ=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ma=typeof window<"u"?window:{},wu=new WeakMap,oM=/auto|scroll/,dJ=/^tb|vertical/,hJ=/msie|trident/i.test(Ma.navigator&&Ma.navigator.userAgent),Xr=function(e){return parseFloat(e||"0")},fo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new lJ((r?t:e)||0,(r?e:t)||0)},aM=gi({devicePixelContentBoxSize:fo(),borderBoxSize:fo(),contentBoxSize:fo(),contentRect:new kk(0,0,0,0)}),Bk=function(e,t){if(t===void 0&&(t=!1),wu.has(e)&&!t)return wu.get(e);if(Lk(e))return wu.set(e,aM),aM;var r=getComputedStyle(e),n=Ew(e)&&e.ownerSVGElement&&e.getBBox(),i=!hJ&&r.boxSizing==="border-box",o=dJ.test(r.writingMode||""),a=!n&&oM.test(r.overflowY||""),u=!n&&oM.test(r.overflowX||""),l=n?0:Xr(r.paddingTop),d=n?0:Xr(r.paddingRight),f=n?0:Xr(r.paddingBottom),h=n?0:Xr(r.paddingLeft),p=n?0:Xr(r.borderTopWidth),v=n?0:Xr(r.borderRightWidth),m=n?0:Xr(r.borderBottomWidth),y=n?0:Xr(r.borderLeftWidth),x=h+d,b=l+f,w=y+v,E=p+m,_=u?e.offsetHeight-E-e.clientHeight:0,S=a?e.offsetWidth-w-e.clientWidth:0,R=i?x+w:0,I=i?b+E:0,N=n?n.width:Xr(r.width)-R-S,A=n?n.height:Xr(r.height)-I-_,L=N+x+S+w,B=A+b+_+E,U=gi({devicePixelContentBoxSize:fo(Math.round(N*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:fo(L,B,o),contentBoxSize:fo(N,A,o),contentRect:new kk(h,l,N,A)});return wu.set(e,U),U},Fk=function(e,t,r){var n=Bk(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case za.DEVICE_PIXEL_CONTENT_BOX:return a;case za.BORDER_BOX:return i;default:return o}},pJ=(function(){function e(t){var r=Bk(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=gi([r.borderBoxSize]),this.contentBoxSize=gi([r.contentBoxSize]),this.devicePixelContentBoxSize=gi([r.devicePixelContentBoxSize])}return e})(),$k=function(e){if(Lk(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},vJ=function(){var e=1/0,t=[];vi.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new pJ(d.target),h=$k(d.target);u.push(f),d.lastReportedSize=Fk(d.target,d.observedBox),h<e&&(e=h)}),t.push(function(){a.callback.call(a.observer,u,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},sM=function(e){vi.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&($k(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},gJ=function(){var e=0;for(sM(e);sJ();)e=vJ(),sM(e);return uJ()&&cJ(),e>0},rb,zk=[],mJ=function(){return zk.splice(0).forEach(function(e){return e()})},yJ=function(e){if(!rb){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return mJ()}).observe(r,n),rb=function(){r.textContent="".concat(t?t--:t++)}}zk.push(e),rb()},bJ=function(e){yJ(function(){requestAnimationFrame(e)})},Du=0,xJ=function(){return!!Du},wJ=250,_J={attributes:!0,characterData:!0,childList:!0,subtree:!0},uM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],cM=function(e){return e===void 0&&(e=0),Date.now()+e},nb=!1,EJ=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=wJ),!nb){nb=!0;var n=cM(t);bJ(function(){var i=!1;try{i=gJ()}finally{if(nb=!1,t=n-cM(),!xJ())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,_J)};document.body?r():Ma.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),uM.forEach(function(r){return Ma.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),uM.forEach(function(r){return Ma.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Xb=new EJ,lM=function(e){!Du&&e>0&&Xb.start(),Du+=e,!Du&&Xb.stop()},SJ=function(e){return!Ew(e)&&!fJ(e)&&getComputedStyle(e).display==="inline"},OJ=(function(){function e(t,r){this.target=t,this.observedBox=r||za.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Fk(this.target,this.observedBox,!0);return SJ(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),CJ=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),_u=new WeakMap,fM=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Eu=(function(){function e(){}return e.connect=function(t,r){var n=new CJ(t,r);_u.set(t,n)},e.observe=function(t,r,n){var i=_u.get(t),o=i.observationTargets.length===0;fM(i.observationTargets,r)<0&&(o&&vi.push(i),i.observationTargets.push(new OJ(r,n&&n.box)),lM(1),Xb.schedule())},e.unobserve=function(t,r){var n=_u.get(t),i=fM(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&vi.splice(vi.indexOf(n),1),n.observationTargets.splice(i,1),lM(-1))},e.disconnect=function(t){var r=this,n=_u.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),RJ=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Eu.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!iM(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Eu.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!iM(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Eu.unobserve(this,t)},e.prototype.disconnect=function(){Eu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),ib,dM;function IJ(){if(dM)return ib;dM=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return ib=e,ib}var PJ=IJ();const Hk=Un(PJ);var hM={},ob,pM;function NJ(){if(pM)return ob;pM=1;var e=es(),t=To(),r=Xc(),n=rl(),i=TypeError,o="Reduce of empty array with no initial value",a=function(u){return function(l,d,f,h){var p=t(l),v=r(p),m=n(p);if(e(d),m===0&&f<2)throw new i(o);var y=u?m-1:0,x=u?-1:1;if(f<2)for(;;){if(y in v){h=v[y],y+=x;break}if(y+=x,u?y<0:m<=y)throw new i(o)}for(;u?y>=0:m>y;y+=x)y in v&&(h=d(h,v[y],y,p));return h}};return ob={left:a(!1),right:a(!0)},ob}var ab,vM;function TJ(){if(vM)return ab;vM=1;var e=it();return ab=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},ab}var sb,gM;function AJ(){if(gM)return sb;gM=1;var e=wt(),t=sk(),r=Gn(),n=function(i){return t.slice(0,i.length)===i};return sb=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":r(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),sb}var ub,mM;function MJ(){if(mM)return ub;mM=1;var e=AJ();return ub=e==="NODE",ub}var yM;function DJ(){if(yM)return hM;yM=1;var e=Kn(),t=NJ().left,r=TJ(),n=cw(),i=MJ(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(l){var d=arguments.length;return t(this,l,d,d>1?arguments[1]:void 0)}}),hM}DJ();var bM={},cb,xM;function Uk(){if(xM)return cb;xM=1;var e=Nr();return cb=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},cb}var lb,wM;function jJ(){if(wM)return lb;wM=1;var e=it(),t=wt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return lb={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},lb}var fb,_M;function qJ(){if(_M)return fb;_M=1;var e=it(),t=wt(),r=t.RegExp;return fb=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
68
- `)&&n.flags==="s")}),fb}var db,EM;function kJ(){if(EM)return db;EM=1;var e=it(),t=wt(),r=t.RegExp;return db=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),db}var hb,SM;function Sw(){if(SM)return hb;SM=1;var e=Zt(),t=ot(),r=Ni(),n=Uk(),i=jJ(),o=hw(),a=il(),u=Ao().get,l=qJ(),d=kJ(),f=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),m=t("".indexOf),y=t("".replace),x=t("".slice),b=(function(){var R=/a/,I=/b*/g;return e(h,R,"a"),e(h,I,"a"),R.lastIndex!==0||I.lastIndex!==0})(),w=i.BROKEN_CARET,E=/()??/.exec("")[1]!==void 0,_=b||E||w||l||d,S=function(R,I){for(var N=R.groups=a(null),A=0;A<I.length;A++){var L=I[A];N[L[0]]=R[L[1]]}};return _&&(p=function(I){var N=this,A=u(N),L=r(I),B=A.raw,U,j,D;if(B)return B.lastIndex=N.lastIndex,U=e(p,B,L),N.lastIndex=B.lastIndex,U&&A.groups&&S(U,A.groups),U;var G=A.groups,F=w&&N.sticky,X=e(n,N),Z=N.source,Q=0,W=L;if(F){X=y(X,"y",""),m(X,"g")===-1&&(X+="g"),W=x(L,N.lastIndex);var ee=N.lastIndex>0&&v(L,N.lastIndex-1);N.lastIndex>0&&(!N.multiline||N.multiline&&ee!==`
69
- `&&ee!=="\r"&&ee!=="\u2028"&&ee!=="\u2029")&&(Z="(?: (?:"+Z+"))",W=" "+W,Q++),j=new RegExp("^(?:"+Z+")",X)}E&&(j=new RegExp("^"+Z+"$(?!\\s)",X)),b&&(D=N.lastIndex);var oe=e(h,F?j:N,W);return F?oe?(oe.input=L,oe[0]=x(oe[0],Q),oe.index=N.lastIndex,N.lastIndex+=oe[0].length):N.lastIndex=0:b&&oe&&(N.lastIndex=N.global?oe.index+oe[0].length:D),E&&oe&&oe.length>1&&e(f,oe[0],j,function(){for(var ae=1;ae<arguments.length-2;ae++)arguments[ae]===void 0&&(oe[ae]=void 0)}),oe&&G&&S(oe,G),oe}),hb=p,hb}var OM;function Vk(){if(OM)return bM;OM=1;var e=Kn(),t=Sw();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),bM}Vk();var CM={},pb,RM;function Wk(){if(RM)return pb;RM=1,Vk();var e=Zt(),t=Pi(),r=Sw(),n=it(),i=$t(),o=rs(),a=i("species"),u=RegExp.prototype;return pb=function(l,d,f,h){var p=i(l),v=!n(function(){var b={};return b[p]=function(){return 7},""[l](b)!==7}),m=v&&!n(function(){var b=!1,w=/a/;if(l==="split"){var E={};E[a]=function(){return w},w={constructor:E,flags:""},w[p]=/./[p]}return w.exec=function(){return b=!0,null},w[p](""),!b});if(!v||!m||f){var y=/./[p],x=d(p,""[l],function(b,w,E,_,S){var R=w.exec;return R===r||R===u.exec?v&&!S?{done:!0,value:e(y,w,E,_)}:{done:!0,value:e(b,E,w,_)}:{done:!1}});t(String.prototype,l,x[0]),t(u,p,x[1])}h&&o(u[p],"sham",!0)},pb}var vb,IM;function Gk(){if(IM)return vb;IM=1;var e=Tk().charAt;return vb=function(t,r,n){return r+(n&&e(t,r).length||1)},vb}var gb,PM;function LJ(){if(PM)return gb;PM=1;var e=wt(),t=it(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",u=i?"dgimsy":"gimsy",l=function(p,v){Object.defineProperty(o,p,{get:function(){return a+=v,!0}})},d={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(d.hasIndices="d");for(var f in d)l(f,d[f]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==u||a!==u});return gb={correct:n},gb}var mb,NM;function Kk(){if(NM)return mb;NM=1;var e=Zt(),t=Pr(),r=Jc(),n=LJ(),i=Uk(),o=RegExp.prototype;return mb=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},mb}var yb,TM;function Yk(){if(TM)return yb;TM=1;var e=Zt(),t=Nr(),r=Ot(),n=Gn(),i=Sw(),o=TypeError;return yb=function(a,u){var l=a.exec;if(r(l)){var d=e(l,a,u);return d!==null&&t(d),d}if(n(a)==="RegExp")return e(i,a,u);throw new o("RegExp#exec called on incompatible receiver")},yb}var AM;function BJ(){if(AM)return CM;AM=1;var e=Zt(),t=ot(),r=Wk(),n=Nr(),i=Tt(),o=yw(),a=Ni(),u=Ii(),l=ts(),d=Gk(),f=Kk(),h=Yk(),p=t("".indexOf);return r("match",function(v,m,y){return[function(b){var w=u(this),E=i(b)?l(b,v):void 0;return E?e(E,b,w):new RegExp(b)[v](a(w))},function(x){var b=n(this),w=a(x),E=y(m,b,w);if(E.done)return E.value;var _=a(f(b));if(!~p(_,"g"))return h(b,w);var S=!!~p(_,"u")||!!~p(_,"v");b.lastIndex=0;for(var R=[],I=0,N;(N=h(b,w))!==null;){var A=a(N[0]);R[I]=A,A===""&&(b.lastIndex=d(w,o(b.lastIndex),S)),I++}return I===0?null:R}]}),CM}BJ();var MM={},bb,DM;function FJ(){if(DM)return bb;DM=1;var e=mk(),t=un();return bb=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)},bb}var jM;function $J(){if(jM)return MM;jM=1;var e=Ir(),t=gw().EXISTS,r=ot(),n=FJ(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=r(a.exec),l="name";return e&&!t&&n(i,l,{configurable:!0,get:function(){try{return u(a,o(this))[1]}catch{return""}}}),MM}$J();var qM={},xb,kM;function zJ(){if(kM)return xb;kM=1;var e=Kc(),t=Function.prototype,r=t.apply,n=t.call;return xb=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),xb}var wb,LM;function HJ(){if(LM)return wb;LM=1;var e=ot(),t=To(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return wb=function(l,d,f,h,p,v){var m=f+l.length,y=h.length,x=u;return p!==void 0&&(p=t(p),x=a),i(v,x,function(b,w){var E;switch(n(w,0)){case"$":return"$";case"&":return l;case"`":return o(d,0,f);case"'":return o(d,m);case"<":E=p[o(w,1,-1)];break;default:var _=+w;if(_===0)return b;if(_>y){var S=r(_/10);return S===0?b:S<=y?h[S-1]===void 0?n(w,1):h[S-1]+n(w,1):b}E=h[_-1]}return E===void 0?"":E})},wb}var BM;function UJ(){if(BM)return qM;BM=1;var e=zJ(),t=Zt(),r=ot(),n=Wk(),i=it(),o=Nr(),a=Ot(),u=Tt(),l=tl(),d=yw(),f=Ni(),h=Ii(),p=Gk(),v=ts(),m=HJ(),y=Kk(),x=Yk(),b=$t(),w=b("replace"),E=Math.max,_=Math.min,S=r([].concat),R=r([].push),I=r("".indexOf),N=r("".slice),A=function(j){return j===void 0?j:String(j)},L=(function(){return"a".replace(/./,"$0")==="$0"})(),B=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),U=!i(function(){var j=/./;return j.exec=function(){var D=[];return D.groups={a:"7"},D},"".replace(j,"$<a>")!=="7"});return n("replace",function(j,D,G){var F=B?"$":"$0";return[function(Z,Q){var W=h(this),ee=u(Z)?v(Z,w):void 0;return ee?t(ee,Z,W,Q):t(D,f(W),Z,Q)},function(X,Z){var Q=o(this),W=f(X),ee=a(Z);ee||(Z=f(Z));var oe=f(y(Q));if(typeof Z=="string"&&!~I(Z,F)&&!~I(Z,"$<")&&!~I(oe,"y")){var ae=G(D,Q,W,Z);if(ae.done)return ae.value}var H=!!~I(oe,"g"),K;H&&(K=!!~I(oe,"u")||!!~I(oe,"v"),Q.lastIndex=0);for(var $=[],k;k=x(Q,W),!(k===null||(R($,k),!H));){var z=f(k[0]);z===""&&(Q.lastIndex=p(W,d(Q.lastIndex),K))}for(var re="",ie=0,se=0;se<$.length;se++){k=$[se];for(var ce=f(k[0]),be=E(_(l(k.index),W.length),0),Ce=[],_e,he=1;he<k.length;he++)R(Ce,A(k[he]));var fe=k.groups;if(ee){var Ee=S([ce],Ce,be,W);fe!==void 0&&R(Ee,fe),_e=f(e(Z,void 0,Ee))}else _e=m(ce,W,be,Ce,fe,Z);be>=ie&&(re+=N(W,ie,be)+_e,ie=be+ce.length)}return re+N(W,ie)}]},!U||!L||B),qM}UJ();function kn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function ju(e){return!e||!e.ownerDocument?document:e.ownerDocument}var to=null,FM=null;Hk&&window.addEventListener("resize",function(){FM!==window.devicePixelRatio&&(FM=window.devicePixelRatio,to=null)});function $M(e){if(to===null){var t=ju(e);if(typeof t>"u")return to=0,to;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var i=n.getBoundingClientRect().right;r.removeChild(n),to=i}return to}var cc=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=kn(i.el);i.scrollXTicking||(o.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(o.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(o){i.mouseX=o.clientX,i.mouseY=o.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(o){var a,u;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(a=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(u=i.isWithinBounds(i.axis.y.track.rect)),(a||u)&&(o.preventDefault(),o.stopPropagation(),o.type==="mousedown"&&(a&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(o,"x"):i.onTrackClick(o,"x")),u&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(o,"y"):i.onTrackClick(o,"y"))))},this.drag=function(o){var a,u=i.axis[i.draggedAxis].track,l=u.rect[i.axis[i.draggedAxis].sizeAttr],d=i.axis[i.draggedAxis].scrollbar,f=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],h=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);o.preventDefault(),o.stopPropagation(),i.draggedAxis==="y"?a=o.pageY:a=o.pageX;var p=a-u.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset,v=p/(l-d.size),m=v*(f-h);i.draggedAxis==="x"&&(m=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?m-(l+d.size):m,m=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-m:m),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=m},this.onEndDrag=function(o){var a=ju(i.el),u=kn(i.el);o.preventDefault(),o.stopPropagation(),i.el.classList.remove(i.classNames.dragging),a.removeEventListener("mousemove",i.drag,!0),a.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=u.setTimeout(function(){a.removeEventListener("click",i.preventClick,!0),a.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=r,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,n),this.classNames=Object.assign({},e.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!e.instances.has(this.el)&&(this.recalculate=QA(this.recalculate.bind(this),64),this.onMouseMove=QA(this.onMouseMove.bind(this),64),this.hideScrollbars=tM(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=tM(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=aJ(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var n=document.createElement("div");n.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var i=n.firstElementChild;document.body.appendChild(i);var o=i.firstElementChild;i.scrollLeft=0;var a=e.getOffset(i),u=e.getOffset(o);i.scrollLeft=999;var l=e.getOffset(o);return{isRtlScrollingInverted:a.left!==u.left&&u.left-l.left!==0,isRtlScrollbarInverted:a.left!==u.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=ju(n),a=kn(n);return{top:i.top+(a.pageYOffset||o.documentElement.scrollTop),left:i.left+(a.pageXOffset||o.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),Hk&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var n=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(n.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var i=document.createElement("div"),o=document.createElement("div");i.classList.add(this.classNames.track),o.classList.add(this.classNames.scrollbar),i.appendChild(o),this.axis.x.track.el=i.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=i.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.setAccessibilityAttributes=function(){var n=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",n)},t.initListeners=function(){var n=this,i=kn(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(l){n.el.addEventListener(l,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(l){n.el.addEventListener(l,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize);var o=!1,a=null,u=i.ResizeObserver||RJ;this.resizeObserver=new u(function(){!o||a!==null||(a=i.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){o=!0}),this.mutationObserver=new i.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=kn(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var i=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,u=this.contentWrapperEl.offsetWidth,l=this.elStyles.overflowX,d=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var f=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=o?a+"px":"auto",this.placeholderEl.style.height=f+"px";var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=h>a,this.axis.y.isOverflowing=f>p,this.axis.x.isOverflowing=l==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=d==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var v=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>u-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&f>p-v,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var i=this.contentEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,u=o/i;return a=Math.max(~~(u*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.positionScrollbar=function(n){if(n===void 0&&(n="y"),!!this.axis[n].isOverflowing){var i=this.contentWrapperEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[n].sizeAttr],10),u=this.axis[n].scrollbar,l=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];l=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-l:l;var d=l/(i-a),f=~~((o-u.size)*d);f=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?f+(o-u.size):f,u.el.style.transform=n==="x"?"translate3d("+f+"px, 0, 0)":"translate3d(0, "+f+"px, 0)"}},t.toggleTrackVisibility=function(n){n===void 0&&(n="y");var i=this.axis[n].track.el,o=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(i.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(i.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?o.style.display="block":o.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect(),this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var i=this.isWithinBounds(this.axis[n].scrollbar.rect);i?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.el.classList.remove(this.classNames.hover),this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(n){n===void 0&&(n="y");var i=this.axis[n].scrollbar.el;this.axis[n].isVisible||(i.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,i){i===void 0&&(i="y");var o=ju(this.el),a=kn(this.el),u=this.axis[i].scrollbar,l=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=l-u.rect[this.axis[i].offsetAttr],this.draggedAxis=i,this.el.classList.add(this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,i){var o=this;if(i===void 0&&(i="y"),!!this.options.clickOnTrack){var a=kn(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var u=this.axis[i].scrollbar,l=u.rect[this.axis[i].offsetAttr],d=parseInt(this.elStyles[this.axis[i].sizeAttr],10),f=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],h=i==="y"?this.mouseY-l:this.mouseX-l,p=h<0?-1:1,v=p===-1?f-d:f+d,m=function y(){if(p===-1){if(f>v){var x;f-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((x={},x[o.axis[i].offsetAttr]=f,x)),a.requestAnimationFrame(y)}}else if(f<v){var b;f+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=f,b)),a.requestAnimationFrame(y)}};m()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:$M(this.el)}catch{return $M(this.el)}},t.removeListeners=function(){var n=this,i=kn(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),i.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},t.findChild=function(n,i){var o=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return o.call(a,i)})[0]},e})();cc.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};cc.instances=new WeakMap;function zM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Su(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zM(Object(r),!0).forEach(function(n){VJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VJ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lc(){return lc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lc.apply(this,arguments)}function WJ(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function GJ(e,t){if(e==null)return{};var r=WJ(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var KJ=["children","scrollableNodeProps","tag"],YJ=function(t){var r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(u,l){return l.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},{});return r},al=T.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=e.tag,a=o===void 0?"div":o,u=GJ(e,KJ),l=a,d,f=T.useRef(),h=T.useRef(),p=T.useRef(),v={},m={},y=[];return Object.keys(u).forEach(function(x){Object.prototype.hasOwnProperty.call(cc.defaultOptions,x)?v[x]=u[x]:x.match(/data-simplebar-(.+)/)&&x!=="data-simplebar-direction"?y.push({name:x,value:u[x]}):m[x]=u[x]}),y.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
88
+ `)+ye+`return __p
89
+ }`;var He=wO(function(){return it($,Ne+"return "+ye).apply(r,te)});if(He.source=ye,uh(He))throw He;return He}function o$(l){return lt(l).toLowerCase()}function a$(l){return lt(l).toUpperCase()}function s$(l,f,m){if(l=lt(l),l&&(m||f===r))return NS(l);if(!l||!(f=Xr(f)))return l;var R=Tn(l),P=Tn(f),$=TS(R,P),te=PS(R,P)+1;return ji(R,$,te).join("")}function l$(l,f,m){if(l=lt(l),l&&(m||f===r))return l.slice(0,MS(l)+1);if(!l||!(f=Xr(f)))return l;var R=Tn(l),P=PS(R,Tn(f))+1;return ji(R,0,P).join("")}function c$(l,f,m){if(l=lt(l),l&&(m||f===r))return l.replace(jt,"");if(!l||!(f=Xr(f)))return l;var R=Tn(l),P=TS(R,Tn(f));return ji(R,P).join("")}function u$(l,f){var m=L,R=K;if(Rt(f)){var P="separator"in f?f.separator:P;m="length"in f?Fe(f.length):m,R="omission"in f?Xr(f.omission):R}l=lt(l);var $=l.length;if($o(l)){var te=Tn(l);$=te.length}if(m>=$)return l;var oe=m-Ho(R);if(oe<1)return R;var se=te?ji(te,0,oe).join(""):l.slice(0,oe);if(P===r)return se+R;if(te&&(oe+=se.length-oe),dh(P)){if(l.slice(oe).search(P)){var ve,ge=se;for(P.global||(P=If(P.source,lt(Nn.exec(P))+"g")),P.lastIndex=0;ve=P.exec(ge);)var ye=ve.index;se=se.slice(0,ye===r?oe:ye)}}else if(l.indexOf(Xr(P),oe)!=oe){var Se=se.lastIndexOf(P);Se>-1&&(se=se.slice(0,Se))}return se+R}function d$(l){return l=lt(l),l&&lr.test(l)?l.replace(Tt,Fz):l}var f$=Xo(function(l,f,m){return l+(m?" ":"")+f.toUpperCase()}),vh=wE("toUpperCase");function xO(l,f,m){return l=lt(l),f=m?r:f,f===r?jz(l)?Vz(l):Iz(l):l.match(f)||[]}var wO=Ve(function(l,f){try{return Gr(l,r,f)}catch(m){return uh(m)?m:new Le(m)}}),h$=fi(function(l,f){return Kr(f,function(m){m=kn(m),Gn(l,m,lh(l[m],l))}),l});function p$(l){var f=l==null?0:l.length,m=Me();return l=f?Et(l,function(R){if(typeof R[1]!="function")throw new fn(a);return[m(R[0]),R[1]]}):[],Ve(function(R){for(var P=-1;++P<f;){var $=l[P];if(Gr($[0],this,R))return Gr($[1],this,R)}})}function v$(l){return F7(pn(l,p))}function gh(l){return function(){return l}}function g$(l,f){return l==null||l!==l?f:l}var m$=SE(),b$=SE(!0);function jr(l){return l}function mh(l){return QS(typeof l=="function"?l:pn(l,p))}function y$(l){return tE(pn(l,p))}function x$(l,f){return rE(l,pn(f,p))}var w$=Ve(function(l,f){return function(m){return os(m,l,f)}}),_$=Ve(function(l,f){return function(m){return os(l,m,f)}});function bh(l,f,m){var R=nr(f),P=ac(f,R);m==null&&!(Rt(f)&&(P.length||!R.length))&&(m=f,f=l,l=this,P=ac(f,nr(f)));var $=!(Rt(m)&&"chain"in m)||!!m.chain,te=pi(l);return Kr(P,function(oe){var se=f[oe];l[oe]=se,te&&(l.prototype[oe]=function(){var ve=this.__chain__;if($||ve){var ge=l(this.__wrapped__),ye=ge.__actions__=Mr(this.__actions__);return ye.push({func:se,args:arguments,thisArg:l}),ge.__chain__=ve,ge}return se.apply(l,Ti([this.value()],arguments))})}),l}function S$(){return ur._===this&&(ur._=Xz),this}function yh(){}function E$(l){return l=Fe(l),Ve(function(f){return nE(f,l)})}var O$=Yf(Et),C$=Yf(ES),I$=Yf(xf);function _O(l){return rh(l)?wf(kn(l)):i8(l)}function R$(l){return function(f){return l==null?r:co(l,f)}}var N$=OE(),T$=OE(!0);function xh(){return[]}function wh(){return!1}function P$(){return{}}function k$(){return""}function M$(){return!0}function A$(l,f){if(l=Fe(l),l<1||l>re)return[];var m=Z,R=vr(l,Z);f=Me(f),l-=Z;for(var P=Ef(R,f);++m<l;)f(m);return P}function D$(l){return ze(l)?Et(l,kn):Zr(l)?[l]:Mr(FE(lt(l)))}function j$(l){var f=++Kz;return lt(l)+f}var q$=fc(function(l,f){return l+f},0),L$=Xf("ceil"),z$=fc(function(l,f){return l/f},1),B$=Xf("floor");function F$(l){return l&&l.length?oc(l,jr,Df):r}function $$(l,f){return l&&l.length?oc(l,Me(f,2),Df):r}function H$(l){return IS(l,jr)}function V$(l,f){return IS(l,Me(f,2))}function W$(l){return l&&l.length?oc(l,jr,zf):r}function U$(l,f){return l&&l.length?oc(l,Me(f,2),zf):r}var G$=fc(function(l,f){return l*f},1),K$=Xf("round"),Y$=fc(function(l,f){return l-f},0);function X$(l){return l&&l.length?Sf(l,jr):0}function Z$(l,f){return l&&l.length?Sf(l,Me(f,2)):0}return F.after=x9,F.ary=JE,F.assign=sF,F.assignIn=fO,F.assignInWith=hO,F.assignWith=fh,F.at=lF,F.before=QE,F.bind=lh,F.bindAll=h$,F.bindKey=eO,F.castArray=k9,F.chain=YE,F.chunk=F8,F.compact=$8,F.concat=H8,F.cond=p$,F.conforms=v$,F.constant=gh,F.countBy=ZB,F.create=cF,F.curry=tO,F.curryRight=rO,F.debounce=nO,F.defaults=uF,F.defaultsDeep=dF,F.defer=w9,F.delay=_9,F.difference=V8,F.differenceBy=W8,F.differenceWith=U8,F.drop=G8,F.dropRight=K8,F.dropRightWhile=Y8,F.dropWhile=X8,F.fill=Z8,F.filter=QB,F.flatMap=r9,F.flatMapDeep=n9,F.flatMapDepth=i9,F.flatten=WE,F.flattenDeep=J8,F.flattenDepth=Q8,F.flip=S9,F.flow=m$,F.flowRight=b$,F.fromPairs=eB,F.functions=bF,F.functionsIn=yF,F.groupBy=o9,F.initial=rB,F.intersection=nB,F.intersectionBy=iB,F.intersectionWith=oB,F.invert=wF,F.invertBy=_F,F.invokeMap=s9,F.iteratee=mh,F.keyBy=l9,F.keys=nr,F.keysIn=Dr,F.map=yc,F.mapKeys=EF,F.mapValues=OF,F.matches=y$,F.matchesProperty=x$,F.memoize=wc,F.merge=CF,F.mergeWith=pO,F.method=w$,F.methodOf=_$,F.mixin=bh,F.negate=_c,F.nthArg=E$,F.omit=IF,F.omitBy=RF,F.once=E9,F.orderBy=c9,F.over=O$,F.overArgs=O9,F.overEvery=C$,F.overSome=I$,F.partial=ch,F.partialRight=iO,F.partition=u9,F.pick=NF,F.pickBy=vO,F.property=_O,F.propertyOf=R$,F.pull=cB,F.pullAll=GE,F.pullAllBy=uB,F.pullAllWith=dB,F.pullAt=fB,F.range=N$,F.rangeRight=T$,F.rearg=C9,F.reject=h9,F.remove=hB,F.rest=I9,F.reverse=ah,F.sampleSize=v9,F.set=PF,F.setWith=kF,F.shuffle=g9,F.slice=pB,F.sortBy=y9,F.sortedUniq=wB,F.sortedUniqBy=_B,F.split=t$,F.spread=R9,F.tail=SB,F.take=EB,F.takeRight=OB,F.takeRightWhile=CB,F.takeWhile=IB,F.tap=$B,F.throttle=N9,F.thru=bc,F.toArray=cO,F.toPairs=gO,F.toPairsIn=mO,F.toPath=D$,F.toPlainObject=dO,F.transform=MF,F.unary=T9,F.union=RB,F.unionBy=NB,F.unionWith=TB,F.uniq=PB,F.uniqBy=kB,F.uniqWith=MB,F.unset=AF,F.unzip=sh,F.unzipWith=KE,F.update=DF,F.updateWith=jF,F.values=Qo,F.valuesIn=qF,F.without=AB,F.words=xO,F.wrap=P9,F.xor=DB,F.xorBy=jB,F.xorWith=qB,F.zip=LB,F.zipObject=zB,F.zipObjectDeep=BB,F.zipWith=FB,F.entries=gO,F.entriesIn=mO,F.extend=fO,F.extendWith=hO,bh(F,F),F.add=q$,F.attempt=wO,F.camelCase=FF,F.capitalize=bO,F.ceil=L$,F.clamp=LF,F.clone=M9,F.cloneDeep=D9,F.cloneDeepWith=j9,F.cloneWith=A9,F.conformsTo=q9,F.deburr=yO,F.defaultTo=g$,F.divide=z$,F.endsWith=$F,F.eq=Mn,F.escape=HF,F.escapeRegExp=VF,F.every=JB,F.find=e9,F.findIndex=HE,F.findKey=fF,F.findLast=t9,F.findLastIndex=VE,F.findLastKey=hF,F.floor=B$,F.forEach=XE,F.forEachRight=ZE,F.forIn=pF,F.forInRight=vF,F.forOwn=gF,F.forOwnRight=mF,F.get=hh,F.gt=L9,F.gte=z9,F.has=xF,F.hasIn=ph,F.head=UE,F.identity=jr,F.includes=a9,F.indexOf=tB,F.inRange=zF,F.invoke=SF,F.isArguments=ho,F.isArray=ze,F.isArrayBuffer=B9,F.isArrayLike=Ar,F.isArrayLikeObject=qt,F.isBoolean=F9,F.isBuffer=qi,F.isDate=$9,F.isElement=H9,F.isEmpty=V9,F.isEqual=W9,F.isEqualWith=U9,F.isError=uh,F.isFinite=G9,F.isFunction=pi,F.isInteger=oO,F.isLength=Sc,F.isMap=aO,F.isMatch=K9,F.isMatchWith=Y9,F.isNaN=X9,F.isNative=Z9,F.isNil=Q9,F.isNull=J9,F.isNumber=sO,F.isObject=Rt,F.isObjectLike=kt,F.isPlainObject=ds,F.isRegExp=dh,F.isSafeInteger=eF,F.isSet=lO,F.isString=Ec,F.isSymbol=Zr,F.isTypedArray=Jo,F.isUndefined=tF,F.isWeakMap=rF,F.isWeakSet=nF,F.join=aB,F.kebabCase=WF,F.last=gn,F.lastIndexOf=sB,F.lowerCase=UF,F.lowerFirst=GF,F.lt=iF,F.lte=oF,F.max=F$,F.maxBy=$$,F.mean=H$,F.meanBy=V$,F.min=W$,F.minBy=U$,F.stubArray=xh,F.stubFalse=wh,F.stubObject=P$,F.stubString=k$,F.stubTrue=M$,F.multiply=G$,F.nth=lB,F.noConflict=S$,F.noop=yh,F.now=xc,F.pad=KF,F.padEnd=YF,F.padStart=XF,F.parseInt=ZF,F.random=BF,F.reduce=d9,F.reduceRight=f9,F.repeat=JF,F.replace=QF,F.result=TF,F.round=K$,F.runInContext=ae,F.sample=p9,F.size=m9,F.snakeCase=e$,F.some=b9,F.sortedIndex=vB,F.sortedIndexBy=gB,F.sortedIndexOf=mB,F.sortedLastIndex=bB,F.sortedLastIndexBy=yB,F.sortedLastIndexOf=xB,F.startCase=r$,F.startsWith=n$,F.subtract=Y$,F.sum=X$,F.sumBy=Z$,F.template=i$,F.times=A$,F.toFinite=vi,F.toInteger=Fe,F.toLength=uO,F.toLower=o$,F.toNumber=mn,F.toSafeInteger=aF,F.toString=lt,F.toUpper=a$,F.trim=s$,F.trimEnd=l$,F.trimStart=c$,F.truncate=u$,F.unescape=d$,F.uniqueId=j$,F.upperCase=f$,F.upperFirst=vh,F.each=XE,F.eachRight=ZE,F.first=UE,bh(F,(function(){var l={};return Kn(F,function(f,m){st.call(F.prototype,m)||(l[m]=f)}),l})(),{chain:!1}),F.VERSION=n,Kr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){F[l].placeholder=F}),Kr(["drop","take"],function(l,f){Ze.prototype[l]=function(m){m=m===r?1:Yt(Fe(m),0);var R=this.__filtered__&&!f?new Ze(this):this.clone();return R.__filtered__?R.__takeCount__=vr(m,R.__takeCount__):R.__views__.push({size:vr(m,Z),type:l+(R.__dir__<0?"Right":"")}),R},Ze.prototype[l+"Right"]=function(m){return this.reverse()[l](m).reverse()}}),Kr(["filter","map","takeWhile"],function(l,f){var m=f+1,R=m==Y||m==X;Ze.prototype[l]=function(P){var $=this.clone();return $.__iteratees__.push({iteratee:Me(P,3),type:m}),$.__filtered__=$.__filtered__||R,$}}),Kr(["head","last"],function(l,f){var m="take"+(f?"Right":"");Ze.prototype[l]=function(){return this[m](1).value()[0]}}),Kr(["initial","tail"],function(l,f){var m="drop"+(f?"":"Right");Ze.prototype[l]=function(){return this.__filtered__?new Ze(this):this[m](1)}}),Ze.prototype.compact=function(){return this.filter(jr)},Ze.prototype.find=function(l){return this.filter(l).head()},Ze.prototype.findLast=function(l){return this.reverse().find(l)},Ze.prototype.invokeMap=Ve(function(l,f){return typeof l=="function"?new Ze(this):this.map(function(m){return os(m,l,f)})}),Ze.prototype.reject=function(l){return this.filter(_c(Me(l)))},Ze.prototype.slice=function(l,f){l=Fe(l);var m=this;return m.__filtered__&&(l>0||f<0)?new Ze(m):(l<0?m=m.takeRight(-l):l&&(m=m.drop(l)),f!==r&&(f=Fe(f),m=f<0?m.dropRight(-f):m.take(f-l)),m)},Ze.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ze.prototype.toArray=function(){return this.take(Z)},Kn(Ze.prototype,function(l,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),P=F[R?"take"+(f=="last"?"Right":""):f],$=R||/^find/.test(f);P&&(F.prototype[f]=function(){var te=this.__wrapped__,oe=R?[1]:arguments,se=te instanceof Ze,ve=oe[0],ge=se||ze(te),ye=function(Ge){var Je=P.apply(F,Ti([Ge],oe));return R&&Se?Je[0]:Je};ge&&m&&typeof ve=="function"&&ve.length!=1&&(se=ge=!1);var Se=this.__chain__,Ne=!!this.__actions__.length,De=$&&!Se,He=se&&!Ne;if(!$&&ge){te=He?te:new Ze(this);var ke=l.apply(te,oe);return ke.__actions__.push({func:bc,args:[ye],thisArg:r}),new hn(ke,Se)}return De&&He?l.apply(this,oe):(ke=this.thru(ye),De?R?ke.value()[0]:ke.value():ke)})}),Kr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Vl[l],m=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",R=/^(?:pop|shift)$/.test(l);F.prototype[l]=function(){var P=arguments;if(R&&!this.__chain__){var $=this.value();return f.apply(ze($)?$:[],P)}return this[m](function(te){return f.apply(ze(te)?te:[],P)})}}),Kn(Ze.prototype,function(l,f){var m=F[f];if(m){var R=m.name+"";st.call(Go,R)||(Go[R]=[]),Go[R].push({name:f,func:m})}}),Go[dc(r,y).name]=[{name:"wrapper",func:r}],Ze.prototype.clone=f7,Ze.prototype.reverse=h7,Ze.prototype.value=p7,F.prototype.at=HB,F.prototype.chain=VB,F.prototype.commit=WB,F.prototype.next=UB,F.prototype.plant=KB,F.prototype.reverse=YB,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=XB,F.prototype.first=F.prototype.head,Ja&&(F.prototype[Ja]=GB),F}),Vo=Wz();io?((io.exports=Vo)._=Vo,gf._=Vo):ur._=Vo}).call(Woe)})(Hs,Hs.exports)),Hs.exports}var Eo=Uoe();function Goe(){const e=Qe.useAppDispatch(),t=Qe.useAppSelector(Qe.selectRoles),r=Qe.useAppSelector(Qe.selectPrivileges),n=Qe.useAppSelector(Qe.selectRolesFlags),i=Qe.useAppSelector(Qe.selectRolesAndPrivileges,(x,g)=>Eo.isEqual(x,g)),o=Qe.useAppSelector(Qe.selectCatalog),a=Qe.useAppSelector(Qe.selectQodly),s=Qe.useAppSelector(Qe.selectSelectedTab),c=Qe.useAppSelector(Qe.selectForceLogin),u=Qe.useAppSelector(Qe.selectRestrictedByDefault),d=Qe.useAppSelector(Qe.selectGuestPrivilege),h=Qe.useAppSelector(Qe.selectCatalogMethods),p=Qe.useAppSelector(Qe.selectDataclasses),v=Qe.useAppSelector(Qe.selectSingletons);return{getRoles:()=>t,getPrivileges:()=>r,getRolesFlags:()=>n,getRolesAndPrivileges:()=>i,getCatalog:()=>o,getQodly:()=>a,getSelectedTab:()=>s,getForceLogin:()=>c??!1,getRestrictedByDefault:()=>u??!1,getGuestPrivilege:()=>d??null,getCatalogMethods:()=>h,getDataclasses:()=>p,getSingletons:()=>v,actions:{updateRoles:x=>{e(Qe.updateRoles(x))},updatePrivileges:x=>{e(Qe.updatePrivileges(x))},setRolesContent:x=>{e(Qe.setRolesContent(x))},toggleTab:x=>{e(Qe.toggleTab(x))},toggleForceLogin:x=>{e(Qe.toggleForceLogin(x))},toggleRestrictedByDefault:x=>{e(Qe.toggleRestrictedByDefault(x))},setTabFlags:(x,g)=>{e(Qe.setTabFlags({path:x,flags:g}))},openModal:async x=>await e(Qe.openModal(x)).unwrap()}}}const Gq=C.createContext(null),Kq=({children:e,adapter:t})=>O.jsx(Gq.Provider,{value:t,children:e}),br=()=>{const e=C.useContext(Gq);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e};var Vw=function(e,t){return Vw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Vw(e,t)};function Nl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Vw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Ww(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Uw(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Gw(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function ii(e){return typeof e=="function"}function Yq(e){var t=function(n){Error.call(n),n.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var O0=Yq(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
90
+ `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
91
+ `):"",this.name="UnsubscriptionError",this.errors=r}});function Kw(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var $d=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=Ww(a),c=s.next();!c.done;c=s.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}else a.remove(this);var d=this.initialTeardown;if(ii(d))try{d()}catch(g){o=g instanceof O0?g.errors:[g]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=Ww(h),v=p.next();!v.done;v=p.next()){var x=v.value;try{MP(x)}catch(g){o=o??[],g instanceof O0?o=Gw(Gw([],Uw(o)),Uw(g.errors)):o.push(g)}}}catch(g){n={error:g}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new O0(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)MP(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Kw(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Kw(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Xq=$d.EMPTY;function Zq(e){return e instanceof $d||e&&"closed"in e&&ii(e.remove)&&ii(e.add)&&ii(e.unsubscribe)}function MP(e){ii(e)?e():e.unsubscribe()}var Koe={Promise:void 0},Yoe={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Gw([e,t],Uw(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Xoe(e){Yoe.setTimeout(function(){throw e})}function AP(){}function wu(e){e()}var F_=(function(e){Nl(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Zq(r)&&r.add(n)):n.destination=Qoe,n}return t.create=function(r,n,i){return new Yw(r,n,i)},t.prototype.next=function(r){this.isStopped||this._next(r)},t.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})($d),Zoe=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(n){Jc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Jc(n)}else Jc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Jc(r)}},e})(),Yw=(function(e){Nl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return ii(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new Zoe(a),o}return t})(F_);function Jc(e){Xoe(e)}function Joe(e){throw e}var Qoe={closed:!0,next:AP,error:Joe,complete:AP},eae=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function tae(e){return e}function rae(e){return e.length===0?tae:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var DP=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,n){var i=this,o=iae(t)?t:new Yw(t,r,n);return wu(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var n=this;return r=jP(r),new r(function(i,o){var a=new Yw({next:function(s){try{t(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[eae]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return rae(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=jP(t),new t(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},e.create=function(t){return new e(t)},e})();function jP(e){var t;return(t=e??Koe.Promise)!==null&&t!==void 0?t:Promise}function nae(e){return e&&ii(e.next)&&ii(e.error)&&ii(e.complete)}function iae(e){return e&&e instanceof F_||nae(e)&&Zq(e)}function oae(e){return ii(e==null?void 0:e.lift)}function aae(e){return function(t){if(oae(t))return t.lift(function(r){try{return e(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function sae(e,t,r,n,i){return new lae(e,t,r,n,i)}var lae=(function(e){Nl(t,e);function t(r,n,i,o,a,s){var c=e.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(u){try{n(u)}catch(d){r.error(d)}}:e.prototype._next,c._error=o?function(u){try{o(u)}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(u){r.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(F_),cae=Yq(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Jq=(function(e){Nl(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var n=new qP(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new cae},t.prototype.next=function(r){var n=this;wu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=Ww(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(u){i={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;wu(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},t.prototype.complete=function(){var r=this;wu(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?Xq:(this.currentObservers=null,s.push(r),new $d(function(){n.currentObservers=null,Kw(s,r)}))},t.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},t.prototype.asObservable=function(){var r=new DP;return r.source=this,r},t.create=function(r,n){return new qP(r,n)},t})(DP),qP=(function(e){Nl(t,e);function t(r,n){var i=e.call(this)||this;return i.destination=r,i.source=n,i}return t.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},t.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},t.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},t.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:Xq},t})(Jq);function uae(e,t){return aae(function(r,n){var i=0;r.subscribe(sae(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var C0={},_s={},Qc={},LP;function Qq(){if(LP)return Qc;LP=1,Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return Qc}var sa={},Ss={},Es={},zP;function dae(){if(zP)return Es;zP=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=void 0;var e=/^(?:[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;return Es.default=e,Es}var BP;function Hd(){if(BP)return Ss;BP=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=void 0;var e=t(dae());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){return typeof i=="string"&&e.default.test(i)}var n=r;return Ss.default=n,Ss}var FP;function Vd(){if(FP)return sa;FP=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=void 0,sa.unsafeStringify=n;var e=t(Hd());function t(a){return a&&a.__esModule?a:{default:a}}const r=[];for(let a=0;a<256;++a)r.push((a+256).toString(16).slice(1));function n(a,s=0){return r[a[s+0]]+r[a[s+1]]+r[a[s+2]]+r[a[s+3]]+"-"+r[a[s+4]]+r[a[s+5]]+"-"+r[a[s+6]]+r[a[s+7]]+"-"+r[a[s+8]]+r[a[s+9]]+"-"+r[a[s+10]]+r[a[s+11]]+r[a[s+12]]+r[a[s+13]]+r[a[s+14]]+r[a[s+15]]}function i(a,s=0){const c=n(a,s);if(!(0,e.default)(c))throw TypeError("Stringified UUID is invalid");return c}var o=i;return sa.default=o,sa}var $P;function fae(){if($P)return _s;$P=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.default=void 0;var e=r(Qq()),t=Vd();function r(u){return u&&u.__esModule?u:{default:u}}let n,i,o=0,a=0;function s(u,d,h){let p=d&&h||0;const v=d||new Array(16);u=u||{};let x=u.node||n,g=u.clockseq!==void 0?u.clockseq:i;if(x==null||g==null){const S=u.random||(u.rng||e.default)();x==null&&(x=n=[S[0]|1,S[1],S[2],S[3],S[4],S[5]]),g==null&&(g=i=(S[6]<<8|S[7])&16383)}let b=u.msecs!==void 0?u.msecs:Date.now(),w=u.nsecs!==void 0?u.nsecs:a+1;const y=b-o+(w-a)/1e4;if(y<0&&u.clockseq===void 0&&(g=g+1&16383),(y<0||b>o)&&u.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=b,a=w,i=g,b+=122192928e5;const _=((b&268435455)*1e4+w)%4294967296;v[p++]=_>>>24&255,v[p++]=_>>>16&255,v[p++]=_>>>8&255,v[p++]=_&255;const E=b/4294967296*1e4&268435455;v[p++]=E>>>8&255,v[p++]=E&255,v[p++]=E>>>24&15|16,v[p++]=E>>>16&255,v[p++]=g>>>8|128,v[p++]=g&255;for(let S=0;S<6;++S)v[p+S]=x[S];return d||(0,t.unsafeStringify)(v)}var c=s;return _s.default=c,_s}var Os={},Hi={},Cs={},HP;function eL(){if(HP)return Cs;HP=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=void 0;var e=t(Hd());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");let o;const a=new Uint8Array(16);return a[0]=(o=parseInt(i.slice(0,8),16))>>>24,a[1]=o>>>16&255,a[2]=o>>>8&255,a[3]=o&255,a[4]=(o=parseInt(i.slice(9,13),16))>>>8,a[5]=o&255,a[6]=(o=parseInt(i.slice(14,18),16))>>>8,a[7]=o&255,a[8]=(o=parseInt(i.slice(19,23),16))>>>8,a[9]=o&255,a[10]=(o=parseInt(i.slice(24,36),16))/1099511627776&255,a[11]=o/4294967296&255,a[12]=o>>>24&255,a[13]=o>>>16&255,a[14]=o>>>8&255,a[15]=o&255,a}var n=r;return Cs.default=n,Cs}var VP;function tL(){if(VP)return Hi;VP=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.URL=Hi.DNS=void 0,Hi.default=a;var e=Vd(),t=r(eL());function r(s){return s&&s.__esModule?s:{default:s}}function n(s){s=unescape(encodeURIComponent(s));const c=[];for(let u=0;u<s.length;++u)c.push(s.charCodeAt(u));return c}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Hi.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Hi.URL=o;function a(s,c,u){function d(h,p,v,x){var g;if(typeof h=="string"&&(h=n(h)),typeof p=="string"&&(p=(0,t.default)(p)),((g=p)===null||g===void 0?void 0:g.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let b=new Uint8Array(16+h.length);if(b.set(p),b.set(h,p.length),b=u(b),b[6]=b[6]&15|c,b[8]=b[8]&63|128,v){x=x||0;for(let w=0;w<16;++w)v[x+w]=b[w];return v}return(0,e.unsafeStringify)(b)}try{d.name=s}catch{}return d.DNS=i,d.URL=o,d}return Hi}var Is={},WP;function hae(){if(WP)return Is;WP=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.default=void 0;function e(v){if(typeof v=="string"){const x=unescape(encodeURIComponent(v));v=new Uint8Array(x.length);for(let g=0;g<x.length;++g)v[g]=x.charCodeAt(g)}return t(n(i(v),v.length*8))}function t(v){const x=[],g=v.length*32,b="0123456789abcdef";for(let w=0;w<g;w+=8){const y=v[w>>5]>>>w%32&255,_=parseInt(b.charAt(y>>>4&15)+b.charAt(y&15),16);x.push(_)}return x}function r(v){return(v+64>>>9<<4)+14+1}function n(v,x){v[x>>5]|=128<<x%32,v[r(x)-1]=x;let g=1732584193,b=-271733879,w=-1732584194,y=271733878;for(let _=0;_<v.length;_+=16){const E=g,S=b,I=w,N=y;g=c(g,b,w,y,v[_],7,-680876936),y=c(y,g,b,w,v[_+1],12,-389564586),w=c(w,y,g,b,v[_+2],17,606105819),b=c(b,w,y,g,v[_+3],22,-1044525330),g=c(g,b,w,y,v[_+4],7,-176418897),y=c(y,g,b,w,v[_+5],12,1200080426),w=c(w,y,g,b,v[_+6],17,-1473231341),b=c(b,w,y,g,v[_+7],22,-45705983),g=c(g,b,w,y,v[_+8],7,1770035416),y=c(y,g,b,w,v[_+9],12,-1958414417),w=c(w,y,g,b,v[_+10],17,-42063),b=c(b,w,y,g,v[_+11],22,-1990404162),g=c(g,b,w,y,v[_+12],7,1804603682),y=c(y,g,b,w,v[_+13],12,-40341101),w=c(w,y,g,b,v[_+14],17,-1502002290),b=c(b,w,y,g,v[_+15],22,1236535329),g=u(g,b,w,y,v[_+1],5,-165796510),y=u(y,g,b,w,v[_+6],9,-1069501632),w=u(w,y,g,b,v[_+11],14,643717713),b=u(b,w,y,g,v[_],20,-373897302),g=u(g,b,w,y,v[_+5],5,-701558691),y=u(y,g,b,w,v[_+10],9,38016083),w=u(w,y,g,b,v[_+15],14,-660478335),b=u(b,w,y,g,v[_+4],20,-405537848),g=u(g,b,w,y,v[_+9],5,568446438),y=u(y,g,b,w,v[_+14],9,-1019803690),w=u(w,y,g,b,v[_+3],14,-187363961),b=u(b,w,y,g,v[_+8],20,1163531501),g=u(g,b,w,y,v[_+13],5,-1444681467),y=u(y,g,b,w,v[_+2],9,-51403784),w=u(w,y,g,b,v[_+7],14,1735328473),b=u(b,w,y,g,v[_+12],20,-1926607734),g=d(g,b,w,y,v[_+5],4,-378558),y=d(y,g,b,w,v[_+8],11,-2022574463),w=d(w,y,g,b,v[_+11],16,1839030562),b=d(b,w,y,g,v[_+14],23,-35309556),g=d(g,b,w,y,v[_+1],4,-1530992060),y=d(y,g,b,w,v[_+4],11,1272893353),w=d(w,y,g,b,v[_+7],16,-155497632),b=d(b,w,y,g,v[_+10],23,-1094730640),g=d(g,b,w,y,v[_+13],4,681279174),y=d(y,g,b,w,v[_],11,-358537222),w=d(w,y,g,b,v[_+3],16,-722521979),b=d(b,w,y,g,v[_+6],23,76029189),g=d(g,b,w,y,v[_+9],4,-640364487),y=d(y,g,b,w,v[_+12],11,-421815835),w=d(w,y,g,b,v[_+15],16,530742520),b=d(b,w,y,g,v[_+2],23,-995338651),g=h(g,b,w,y,v[_],6,-198630844),y=h(y,g,b,w,v[_+7],10,1126891415),w=h(w,y,g,b,v[_+14],15,-1416354905),b=h(b,w,y,g,v[_+5],21,-57434055),g=h(g,b,w,y,v[_+12],6,1700485571),y=h(y,g,b,w,v[_+3],10,-1894986606),w=h(w,y,g,b,v[_+10],15,-1051523),b=h(b,w,y,g,v[_+1],21,-2054922799),g=h(g,b,w,y,v[_+8],6,1873313359),y=h(y,g,b,w,v[_+15],10,-30611744),w=h(w,y,g,b,v[_+6],15,-1560198380),b=h(b,w,y,g,v[_+13],21,1309151649),g=h(g,b,w,y,v[_+4],6,-145523070),y=h(y,g,b,w,v[_+11],10,-1120210379),w=h(w,y,g,b,v[_+2],15,718787259),b=h(b,w,y,g,v[_+9],21,-343485551),g=o(g,E),b=o(b,S),w=o(w,I),y=o(y,N)}return[g,b,w,y]}function i(v){if(v.length===0)return[];const x=v.length*8,g=new Uint32Array(r(x));for(let b=0;b<x;b+=8)g[b>>5]|=(v[b/8]&255)<<b%32;return g}function o(v,x){const g=(v&65535)+(x&65535);return(v>>16)+(x>>16)+(g>>16)<<16|g&65535}function a(v,x){return v<<x|v>>>32-x}function s(v,x,g,b,w,y){return o(a(o(o(x,v),o(b,y)),w),g)}function c(v,x,g,b,w,y,_){return s(x&g|~x&b,v,x,w,y,_)}function u(v,x,g,b,w,y,_){return s(x&b|g&~b,v,x,w,y,_)}function d(v,x,g,b,w,y,_){return s(x^g^b,v,x,w,y,_)}function h(v,x,g,b,w,y,_){return s(g^(x|~b),v,x,w,y,_)}var p=e;return Is.default=p,Is}var UP;function pae(){if(UP)return Os;UP=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=void 0;var e=r(tL()),t=r(hae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return Os.default=i,Os}var Rs={},Ns={},GP;function vae(){if(GP)return Ns;GP=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return Ns.default=t,Ns}var KP;function gae(){if(KP)return Rs;KP=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=void 0;var e=n(vae()),t=n(Qq()),r=Vd();function n(a){return a&&a.__esModule?a:{default:a}}function i(a,s,c){if(e.default.randomUUID&&!s&&!a)return e.default.randomUUID();a=a||{};const u=a.random||(a.rng||t.default)();if(u[6]=u[6]&15|64,u[8]=u[8]&63|128,s){c=c||0;for(let d=0;d<16;++d)s[c+d]=u[d];return s}return(0,r.unsafeStringify)(u)}var o=i;return Rs.default=o,Rs}var Ts={},Ps={},YP;function mae(){if(YP)return Ps;YP=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.default=void 0;function e(i,o,a,s){switch(i){case 0:return o&a^~o&s;case 1:return o^a^s;case 2:return o&a^o&s^a&s;case 3:return o^a^s}}function t(i,o){return i<<o|i>>>32-o}function r(i){const o=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const d=unescape(encodeURIComponent(i));i=[];for(let h=0;h<d.length;++h)i.push(d.charCodeAt(h))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const s=i.length/4+2,c=Math.ceil(s/16),u=new Array(c);for(let d=0;d<c;++d){const h=new Uint32Array(16);for(let p=0;p<16;++p)h[p]=i[d*64+p*4]<<24|i[d*64+p*4+1]<<16|i[d*64+p*4+2]<<8|i[d*64+p*4+3];u[d]=h}u[c-1][14]=(i.length-1)*8/Math.pow(2,32),u[c-1][14]=Math.floor(u[c-1][14]),u[c-1][15]=(i.length-1)*8&4294967295;for(let d=0;d<c;++d){const h=new Uint32Array(80);for(let w=0;w<16;++w)h[w]=u[d][w];for(let w=16;w<80;++w)h[w]=t(h[w-3]^h[w-8]^h[w-14]^h[w-16],1);let p=a[0],v=a[1],x=a[2],g=a[3],b=a[4];for(let w=0;w<80;++w){const y=Math.floor(w/20),_=t(p,5)+e(y,v,x,g)+b+o[y]+h[w]>>>0;b=g,g=x,x=t(v,30)>>>0,v=p,p=_}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+x>>>0,a[3]=a[3]+g>>>0,a[4]=a[4]+b>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return Ps.default=n,Ps}var XP;function bae(){if(XP)return Ts;XP=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=void 0;var e=r(tL()),t=r(mae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return Ts.default=i,Ts}var ks={},ZP;function yae(){if(ZP)return ks;ZP=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=void 0;var e="00000000-0000-0000-0000-000000000000";return ks.default=e,ks}var Ms={},JP;function xae(){if(JP)return Ms;JP=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var e=t(Hd());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");return parseInt(i.slice(14,15),16)}var n=r;return Ms.default=n,Ms}var QP;function wae(){return QP||(QP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=d(fae()),r=d(pae()),n=d(gae()),i=d(bae()),o=d(yae()),a=d(xae()),s=d(Hd()),c=d(Vd()),u=d(eL());function d(h){return h&&h.__esModule?h:{default:h}}})(C0)),C0}var I0,ek;function _ae(){if(ek)return I0;ek=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,n,i,o={},a=this.srcAlphabet.length,s=this.dstAlphabet.length,c=t.length,u=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<c;r++)o[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,i=0,r=0;r<c;r++)n=n*a+o[r],n>=s?(o[i++]=parseInt(n/s,10),n=n%s):i>0&&(o[i++]=0);c=i,u=this.dstAlphabet.slice(n,n+1).concat(u)}while(i!==0);return u},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},I0=e,I0}var R0,tk;function Sae(){if(tk)return R0;tk=1;var e=_ae();function t(r,n){var i=new e(r,n);return function(o){return i.convert(o)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",R0=t,R0}var N0,rk;function Eae(){if(rk)return N0;rk=1;const{v4:e,validate:t}=wae(),r=Sae(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(u,d,h)=>{const p=d(u.toLowerCase().replace(/-/g,""));return!h||!h.consistentLength?p:p.padStart(h.shortIdLength,h.paddingChar)},s=(u,d)=>{const p=d(u).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},c=u=>Math.ceil(Math.log(2**128)/Math.log(u));return N0=(()=>{const u=(d,h)=>{const p=d||n.flickrBase58,v={...i,...h};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const x=c(p.length),g={shortIdLength:x,consistentLength:v.consistentLength,paddingChar:p[0]},b=r(r.HEX,p),w=r(p,r.HEX),y=()=>a(e(),b,g),E={alphabet:p,fromUUID:S=>a(S,b,g),maxLength:x,generate:y,new:y,toUUID:S=>s(S,w),uuid:e,validate:(S,I=!1)=>{if(!S||typeof S!="string")return!1;const N=v.consistentLength?S.length===x:S.length<=x,T=S.split("").every(k=>p.includes(k));return I===!1?N&&T:N&&T&&t(s(S,w))}};return Object.freeze(E),E};return u.constants=n,u.uuid=e,u.generate=()=>(o||(o=u(n.flickrBase58).generate),o()),u})(),N0}var rL=Eae();const nL=new Jq;function Oae(e,t){switch(t.type){case"UPDATE_ROLES":return{...e,roles:t.payload,flags:{...e.flags,touched:!0}};case"UPDATE_PRIVILEGES":return{...e,privileges:t.payload,flags:{...e.flags,touched:!0}};case"SET_ROLES_CONTENT":{const{content:r,flags:n={},...i}=t.payload,o=fe.sanitizeRoles(r),a={...e.flags,...n};return{...e,...o,...i,flags:a}}case"TOGGLE_TAB":return{...e,selectedTab:t.payload};case"TOGGLE_FORCE_LOGIN":return e.forceLogin===t.payload?e:{...e,forceLogin:t.payload,flags:{...e.flags,touched:!0}};case"TOGGLE_RESTRICTED_BY_DEFAULT":return e.restrictedByDefault===t.payload?e:{...e,restrictedByDefault:t.payload,flags:{...e.flags,touched:!0}};case"SET_FLAGS":return{...e,flags:{...e.flags,...t.payload}};case"CREATE_MODAL":return{...e,modals:{...e.modals,list:[...e.modals.list,t.payload]}};case"REMOVE_MODAL":return{...e,modals:{...e.modals,list:e.modals.list.filter(r=>r.id!==t.payload)}};case"CLOSE_MODAL":{const{id:r,reason:n}=t.payload;let i;if(n)if(e.modals.list.find(a=>a.id===r))i={...e,modals:{...e.modals,list:e.modals.list.map(a=>a.id===r?{...a,closeReason:n,isOpen:!1}:a)}};else return e;else i={...e,modals:{...e.modals,list:e.modals.list.filter(o=>o.id!==r)}};return nL.next(i.modals),i}case"EDIT_MODAL":{const{id:r,...n}=t.payload;return e.modals.list.find(o=>o.id===r)?{...e,modals:{...e.modals,list:e.modals.list.map(o=>o.id===r?{...o,...n}:o)}}:e}default:return e}}const $_=C.createContext(null),Cae=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Iae=({children:e,catalog:t=null,qodly:r=!1,onSetTabFlags:n,initialState:i})=>{const[o,a]=C.useReducer(Oae,{...Cae(),...i}),s=C.useMemo(()=>t?fe.parseCatalog(t):null,[t]),c=C.useMemo(()=>({catalog:s,qodly:r,onSetTabFlags:n}),[s,r,n]);return O.jsx($_.Provider,{value:{state:o,dispatch:a,external:c},children:e})};function Rae(){const e=C.useContext($_);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=C.useMemo(()=>fe.rolesToAPI({roles:t.roles,privileges:t.privileges,forceLogin:t.forceLogin,restrictedByDefault:t.restrictedByDefault}),[t.roles,t.privileges,t.forceLogin,t.restrictedByDefault]);return{getRoles:C.useCallback(()=>t.roles,[t.roles]),getPrivileges:C.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:C.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:C.useCallback(()=>i,[i]),getCatalog:C.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:C.useCallback(()=>n.qodly??!1,[n.qodly]),getSelectedTab:C.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:C.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:C.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:C.useCallback(()=>Object.values(t.privileges).find(({privilege:o})=>o==="guest")??null,[t.privileges]),getCatalogMethods:C.useCallback(()=>{var o;return((o=n.catalog)==null?void 0:o.methods)??[]},[n.catalog]),getDataclasses:C.useCallback(()=>{var o;return((o=n.catalog)==null?void 0:o.dataClasses)??{}},[n.catalog]),getSingletons:C.useCallback(()=>{var o;return((o=n.catalog)==null?void 0:o.singletons)??{}},[n.catalog]),actions:{updateRoles:C.useCallback(o=>{r({type:"UPDATE_ROLES",payload:o})},[]),updatePrivileges:C.useCallback(o=>{r({type:"UPDATE_PRIVILEGES",payload:o})},[]),setRolesContent:C.useCallback(o=>{r({type:"SET_ROLES_CONTENT",payload:o})},[]),toggleTab:C.useCallback(o=>{r({type:"TOGGLE_TAB",payload:o})},[]),toggleForceLogin:C.useCallback(o=>{r({type:"TOGGLE_FORCE_LOGIN",payload:o})},[]),toggleRestrictedByDefault:C.useCallback(o=>{r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:o})},[]),setTabFlags:C.useCallback((o,a)=>{n.onSetTabFlags&&n.onSetTabFlags(o,a)},[n.onSetTabFlags]),openModal:C.useCallback(async o=>{const{type:a=fe.ModalType.ALERT}=o,s=rL.generate();return r({type:"CREATE_MODAL",payload:{id:s,type:a,isOpen:!0,...o}}),a===fe.ModalType.CONFIRM?new Promise(c=>{const u=nL.pipe(uae(d=>{const h=d.list.find(p=>p.id===s);return h!==void 0&&!h.isOpen})).subscribe(d=>{var p;const h=d.list.find(v=>v.id===s);if(h){const v=h.closeReason===fe.ModalCloseReason.CONFIRMED,x=Eo.entries(((p=h.views)==null?void 0:p.toggles)||{}).reduce((g,b)=>({...g,[b[0]]:b[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:v,options:x})}})}):{confirmed:!1}},[r])}}}function Nae(){const e=C.useContext($_);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:r}=e;return{modals:t.modals.list,closeModal:C.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:C.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:C.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const T0=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=br(),a=o.getPrivileges();function s(){const u=fe.addPrivilegeIn(t.id,e.id,a);o.actions.updatePrivileges(u)}function c(){const u=fe.removePrivilegeFrom(t.id,e.id,a);o.actions.updatePrivileges(u)}return O.jsxs(cu,{color:r==="included"?"primary":"dark",onClick:r==="included"?c:s,disabled:r==="disabled",children:[e.privilege,O.jsx(Yi,{className:rn("transform transition-transform",{"rotate-45":r==="included"})})]})},Tae=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=fe.getPrivilegeById(e.id,t);let s=a?fe.populateShallow(a.includes,t):[],c=a?fe.populateShallow(fe.parents(a.id,t),t):[],u=a?fe.populateShallow(fe.allowed(a.id,t),t):[];return[s,c,u]=[s,c,u].map(d=>d.filter(h=>(h==null?void 0:h.privilege)!=="guest")),o.length<2&&s.length+c.length+u.length===0?null:O.jsxs(mr,{depth:1,className:"w-full border-b p-4",children:[O.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[" ",o.length>2?O.jsx("h4",{className:"text-[13px] font-semibold",children:"Include a privilege"}):O.jsx("div",{}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Au,{onChange:()=>n(!i),checked:i}),O.jsx("label",{className:"text-xs",children:" Show inherited permissions"})]})]}),O.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[s.map(d=>O.jsx(T0,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>O.jsx(T0,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>O.jsx(T0,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})},Pae=({item:e,depth:t})=>{const r=br(),[n,i]=C.useState(!1),o=r.getPrivileges(),a=fe.populateShallow(e.includes,o);return O.jsxs("div",{className:"py-1 text-xs text-white",children:[O.jsxs("div",{className:"flex items-center",children:[O.jsx("button",{className:"-ml-1",onClick:s=>{s.stopPropagation(),i(!n)},children:O.jsx(YD,{className:rn("h-4 w-4",{"tranform rotate-90":n})})})," ",O.jsx("div",{children:e.privilege})]}),O.jsx("div",{className:"border-l pl-2",style:{marginLeft:t?t*4:3},children:n&&O.jsx(iL,{depth:t+1,data:a})})]})},iL=({data:e,depth:t=0})=>e.map(r=>r.includes.length?O.jsx(Pae,{item:r,depth:t},r.id):O.jsx("div",{className:rn("py-1 text-xs",{}),children:r.privilege},r.id)),Br=()=>document.querySelector(`.${DD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Wd=({container:e,...t})=>O.jsx(fe.Portal,{...t,container:e||Br()}),nk=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=br(),o=i.getPrivileges(),a=fe.populateShallow(e.includes,o),[s,c]=C.useState(!1),[u,d]=C.useState(e.privilege),[h,p]=C.useState(null),v=fe.useOutsideClick(()=>{s&&b()});fe.useDidMountEffect(()=>{e.privilege!==u&&d(e.privilege)},[e.privilege]);function x(){c(!0),p(null)}function g(){c(!1),d(e.privilege)}function b(){p(null);try{fe.validateName(u);const _=fe.renamePrivilege(u,e.id,o);i.actions.updatePrivileges(_),c(!1)}catch(_){p(_.message)}}const w=async _=>{_.stopPropagation();const{confirmed:E}=await i.actions.openModal({title:"Delete Privilege",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(E){const S=fe.removePrivilege(e.id,o);if((t==null?void 0:t.id)!==e.id){i.actions.updatePrivileges(S);return}const I=Object.keys(S).filter(N=>S[N].privilege!=="guest");if(I.length===0)r(null);else{const N=Object.keys(o).filter(L=>o[L].privilege!=="guest"),T=N.indexOf(e.id),k=Math.max(0,T-1),z=N[k];T===0?r(S[I[0]]):S[z]?r(S[z]):r(S[I[0]])}i.actions.updatePrivileges(S)}},y=C.useMemo(()=>e.resources.some(_=>_.exists===!1),[e]);return O.jsxs(zr,{container:Br(),color:"negative",icon:O.jsx(xi,{}),label:"This privilege uses non-existing resources",isHidden:!y,children:[O.jsxs(mr,{depth:4,borderType:(t==null?void 0:t.id)===e.id?"primary":y?"negative":"light",className:rn("w-full rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{r(e)},ref:v,children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:n?O.jsx(nH,{className:"h-6 w-6"}):O.jsx(od,{className:"h-6 w-6"})}),s?O.jsxs(xt.Root,{color:h?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(xt.Group,{className:"border-input-focus-border",children:O.jsx(xt.Field,{autoFocus:!0,value:u,onChange:_=>d(_.target.value),onKeyDown:_=>{_.key==="Enter"&&b(),_.key==="Escape"&&g()},type:"text"})}),h&&O.jsx(xt.Message,{children:h})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:u})]}),n?O.jsx("div",{className:"flex items-center justify-center",children:O.jsx(zr,{icon:O.jsx(xi,{}),label:O.jsx("div",{className:"max-w-xs flex-1 min-w-0 wrap-break-word whitespace-normal py-1",children:"Guest privileges are used to indicate resources accessible without any permission required (e.g. an authenticate function)"}),children:O.jsx(tn,{className:"h-4 w-4"})})}):O.jsx("div",{className:"flex items-center gap-x-2",children:s?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:g,children:O.jsx("span",{children:O.jsx(zD,{className:"h-4 w-4"})})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:b,children:O.jsx("span",{children:O.jsx(Q$,{className:"h-4 w-4"})})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:x,children:O.jsx(KD,{className:"h-4 w-4"})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:w,children:O.jsx(QD,{className:"h-4 w-4"})})]})})]}),a.length?O.jsx("div",{className:"ml-10.75",children:O.jsx(iL,{data:a})}):null]})," "]})},kae=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=br(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=C.useMemo(()=>{if(o===null||!i)return i;const s=Wq({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return Uq(s,o).guest},[e,o]);return O.jsxs("div",{className:"flex flex-1 flex-col gap-y-4 overflow-auto p-4 pb-10 pt-1",children:[a?O.jsx(nk,{privilege:a,onSelect:t,selectedPrivilege:r,isGuest:!0}):null,Object.entries(e).length?Object.entries(e).filter(([,s])=>s.privilege!=="guest").sort(([,s],[,c])=>fe.localeCompare(s.privilege,c.privilege)).map(([s,c])=>O.jsx(nk,{privilege:c,onSelect:t,selectedPrivilege:r},s)):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(tn,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no privileges"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new Privilege by clicking on the"," ",O.jsx(Yi,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var eu={exports:{}},tu={exports:{}},dt={};/** @license React v16.13.1
92
+ * react-is.production.min.js
93
+ *
94
+ * Copyright (c) Facebook, Inc. and its affiliates.
95
+ *
96
+ * This source code is licensed under the MIT license found in the
97
+ * LICENSE file in the root directory of this source tree.
98
+ */var ik;function Mae(){if(ik)return dt;ik=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(S){if(typeof S=="object"&&S!==null){var I=S.$$typeof;switch(I){case t:switch(S=S.type,S){case c:case u:case n:case o:case i:case h:return S;default:switch(S=S&&S.$$typeof,S){case s:case d:case x:case v:case a:return S;default:return I}}case r:return I}}}function E(S){return _(S)===u}return dt.AsyncMode=c,dt.ConcurrentMode=u,dt.ContextConsumer=s,dt.ContextProvider=a,dt.Element=t,dt.ForwardRef=d,dt.Fragment=n,dt.Lazy=x,dt.Memo=v,dt.Portal=r,dt.Profiler=o,dt.StrictMode=i,dt.Suspense=h,dt.isAsyncMode=function(S){return E(S)||_(S)===c},dt.isConcurrentMode=E,dt.isContextConsumer=function(S){return _(S)===s},dt.isContextProvider=function(S){return _(S)===a},dt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},dt.isForwardRef=function(S){return _(S)===d},dt.isFragment=function(S){return _(S)===n},dt.isLazy=function(S){return _(S)===x},dt.isMemo=function(S){return _(S)===v},dt.isPortal=function(S){return _(S)===r},dt.isProfiler=function(S){return _(S)===o},dt.isStrictMode=function(S){return _(S)===i},dt.isSuspense=function(S){return _(S)===h},dt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===u||S===o||S===i||S===h||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===x||S.$$typeof===v||S.$$typeof===a||S.$$typeof===s||S.$$typeof===d||S.$$typeof===b||S.$$typeof===w||S.$$typeof===y||S.$$typeof===g)},dt.typeOf=_,dt}var ft={};/** @license React v16.13.1
99
+ * react-is.development.js
100
+ *
101
+ * Copyright (c) Facebook, Inc. and its affiliates.
102
+ *
103
+ * This source code is licensed under the MIT license found in the
104
+ * LICENSE file in the root directory of this source tree.
105
+ */var ok;function Aae(){return ok||(ok=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(ee){return typeof ee=="string"||typeof ee=="function"||ee===n||ee===u||ee===o||ee===i||ee===h||ee===p||typeof ee=="object"&&ee!==null&&(ee.$$typeof===x||ee.$$typeof===v||ee.$$typeof===a||ee.$$typeof===s||ee.$$typeof===d||ee.$$typeof===b||ee.$$typeof===w||ee.$$typeof===y||ee.$$typeof===g)}function E(ee){if(typeof ee=="object"&&ee!==null){var pe=ee.$$typeof;switch(pe){case t:var ue=ee.type;switch(ue){case c:case u:case n:case o:case i:case h:return ue;default:var xe=ue&&ue.$$typeof;switch(xe){case s:case d:case x:case v:case a:return xe;default:return pe}}case r:return pe}}}var S=c,I=u,N=s,T=a,k=t,z=d,L=n,K=x,G=v,A=r,Y=o,B=i,X=h,U=!1;function re(ee){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),j(ee)||E(ee)===c}function j(ee){return E(ee)===u}function W(ee){return E(ee)===s}function Z(ee){return E(ee)===a}function J(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===t}function M(ee){return E(ee)===d}function H(ee){return E(ee)===n}function q(ee){return E(ee)===x}function D(ee){return E(ee)===v}function V(ee){return E(ee)===r}function Q(ee){return E(ee)===o}function ne(ee){return E(ee)===i}function ce(ee){return E(ee)===h}ft.AsyncMode=S,ft.ConcurrentMode=I,ft.ContextConsumer=N,ft.ContextProvider=T,ft.Element=k,ft.ForwardRef=z,ft.Fragment=L,ft.Lazy=K,ft.Memo=G,ft.Portal=A,ft.Profiler=Y,ft.StrictMode=B,ft.Suspense=X,ft.isAsyncMode=re,ft.isConcurrentMode=j,ft.isContextConsumer=W,ft.isContextProvider=Z,ft.isElement=J,ft.isForwardRef=M,ft.isFragment=H,ft.isLazy=q,ft.isMemo=D,ft.isPortal=V,ft.isProfiler=Q,ft.isStrictMode=ne,ft.isSuspense=ce,ft.isValidElementType=_,ft.typeOf=E})()),ft}var ak;function oL(){return ak||(ak=1,process.env.NODE_ENV==="production"?tu.exports=Mae():tu.exports=Aae()),tu.exports}/*
106
+ object-assign
107
+ (c) Sindre Sorhus
108
+ @license MIT
109
+ */var P0,sk;function Dae(){if(sk)return P0;sk=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return P0=i()?Object.assign:function(o,a){for(var s,c=n(o),u,d=1;d<arguments.length;d++){s=Object(arguments[d]);for(var h in s)t.call(s,h)&&(c[h]=s[h]);if(e){u=e(s);for(var p=0;p<u.length;p++)r.call(s,u[p])&&(c[u[p]]=s[u[p]])}}return c},P0}var k0,lk;function H_(){if(lk)return k0;lk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return k0=e,k0}var M0,ck;function aL(){return ck||(ck=1,M0=Function.call.bind(Object.prototype.hasOwnProperty)),M0}var A0,uk;function jae(){if(uk)return A0;uk=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=H_(),r={},n=aL();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,c,u){if(process.env.NODE_ENV!=="production"){for(var d in o)if(n(o,d)){var h;try{if(typeof o[d]!="function"){var p=Error((c||"React class")+": "+s+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=o[d](a,d,c,s,null,t)}catch(x){h=x}if(h&&!(h instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var v=u?u():"";e("Failed "+s+" type: "+h.message+(v??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},A0=i,A0}var D0,dk;function qae(){if(dk)return D0;dk=1;var e=oL(),t=Dae(),r=H_(),n=aL(),i=jae(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return D0=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function h(j){var W=j&&(u&&j[u]||j[d]);if(typeof W=="function")return W}var p="<<anonymous>>",v={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:y(),arrayOf:_,element:E(),elementType:S(),instanceOf:I,node:z(),objectOf:T,oneOf:N,oneOfType:k,shape:K,exact:G};function x(j,W){return j===W?j!==0||1/j===1/W:j!==j&&W!==W}function g(j,W){this.message=j,this.data=W&&typeof W=="object"?W:{},this.stack=""}g.prototype=Error.prototype;function b(j){if(process.env.NODE_ENV!=="production")var W={},Z=0;function J(H,q,D,V,Q,ne,ce){if(V=V||p,ne=ne||D,ce!==r){if(c){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=V+":"+D;!W[pe]&&Z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[pe]=!0,Z++)}}return q[D]==null?H?q[D]===null?new g("The "+Q+" `"+ne+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new g("The "+Q+" `"+ne+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:j(q,D,V,Q,ne)}var M=J.bind(null,!1);return M.isRequired=J.bind(null,!0),M}function w(j){function W(Z,J,M,H,q,D){var V=Z[J],Q=B(V);if(Q!==j){var ne=X(V);return new g("Invalid "+H+" `"+q+"` of type "+("`"+ne+"` supplied to `"+M+"`, expected ")+("`"+j+"`."),{expectedType:j})}return null}return b(W)}function y(){return b(a)}function _(j){function W(Z,J,M,H,q){if(typeof j!="function")return new g("Property `"+q+"` of component `"+M+"` has invalid PropType notation inside arrayOf.");var D=Z[J];if(!Array.isArray(D)){var V=B(D);return new g("Invalid "+H+" `"+q+"` of type "+("`"+V+"` supplied to `"+M+"`, expected an array."))}for(var Q=0;Q<D.length;Q++){var ne=j(D,Q,M,H,q+"["+Q+"]",r);if(ne instanceof Error)return ne}return null}return b(W)}function E(){function j(W,Z,J,M,H){var q=W[Z];if(!s(q)){var D=B(q);return new g("Invalid "+M+" `"+H+"` of type "+("`"+D+"` supplied to `"+J+"`, expected a single ReactElement."))}return null}return b(j)}function S(){function j(W,Z,J,M,H){var q=W[Z];if(!e.isValidElementType(q)){var D=B(q);return new g("Invalid "+M+" `"+H+"` of type "+("`"+D+"` supplied to `"+J+"`, expected a single ReactElement type."))}return null}return b(j)}function I(j){function W(Z,J,M,H,q){if(!(Z[J]instanceof j)){var D=j.name||p,V=re(Z[J]);return new g("Invalid "+H+" `"+q+"` of type "+("`"+V+"` supplied to `"+M+"`, expected ")+("instance of `"+D+"`."))}return null}return b(W)}function N(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function W(Z,J,M,H,q){for(var D=Z[J],V=0;V<j.length;V++)if(x(D,j[V]))return null;var Q=JSON.stringify(j,function(ce,ee){var pe=X(ee);return pe==="symbol"?String(ee):ee});return new g("Invalid "+H+" `"+q+"` of value `"+String(D)+"` "+("supplied to `"+M+"`, expected one of "+Q+"."))}return b(W)}function T(j){function W(Z,J,M,H,q){if(typeof j!="function")return new g("Property `"+q+"` of component `"+M+"` has invalid PropType notation inside objectOf.");var D=Z[J],V=B(D);if(V!=="object")return new g("Invalid "+H+" `"+q+"` of type "+("`"+V+"` supplied to `"+M+"`, expected an object."));for(var Q in D)if(n(D,Q)){var ne=j(D,Q,M,H,q+"."+Q,r);if(ne instanceof Error)return ne}return null}return b(W)}function k(j){if(!Array.isArray(j))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<j.length;W++){var Z=j[W];if(typeof Z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(Z)+" at index "+W+"."),a}function J(M,H,q,D,V){for(var Q=[],ne=0;ne<j.length;ne++){var ce=j[ne],ee=ce(M,H,q,D,V,r);if(ee==null)return null;ee.data&&n(ee.data,"expectedType")&&Q.push(ee.data.expectedType)}var pe=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new g("Invalid "+D+" `"+V+"` supplied to "+("`"+q+"`"+pe+"."))}return b(J)}function z(){function j(W,Z,J,M,H){return A(W[Z])?null:new g("Invalid "+M+" `"+H+"` supplied to "+("`"+J+"`, expected a ReactNode."))}return b(j)}function L(j,W,Z,J,M){return new g((j||"React class")+": "+W+" type `"+Z+"."+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+M+"`.")}function K(j){function W(Z,J,M,H,q){var D=Z[J],V=B(D);if(V!=="object")return new g("Invalid "+H+" `"+q+"` of type `"+V+"` "+("supplied to `"+M+"`, expected `object`."));for(var Q in j){var ne=j[Q];if(typeof ne!="function")return L(M,H,q,Q,X(ne));var ce=ne(D,Q,M,H,q+"."+Q,r);if(ce)return ce}return null}return b(W)}function G(j){function W(Z,J,M,H,q){var D=Z[J],V=B(D);if(V!=="object")return new g("Invalid "+H+" `"+q+"` of type `"+V+"` "+("supplied to `"+M+"`, expected `object`."));var Q=t({},Z[J],j);for(var ne in Q){var ce=j[ne];if(n(j,ne)&&typeof ce!="function")return L(M,H,q,ne,X(ce));if(!ce)return new g("Invalid "+H+" `"+q+"` key `"+ne+"` supplied to `"+M+"`.\nBad object: "+JSON.stringify(Z[J],null," ")+`
110
+ Valid keys: `+JSON.stringify(Object.keys(j),null," "));var ee=ce(D,ne,M,H,q+"."+ne,r);if(ee)return ee}return null}return b(W)}function A(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(A);if(j===null||s(j))return!0;var W=h(j);if(W){var Z=W.call(j),J;if(W!==j.entries){for(;!(J=Z.next()).done;)if(!A(J.value))return!1}else for(;!(J=Z.next()).done;){var M=J.value;if(M&&!A(M[1]))return!1}}else return!1;return!0;default:return!1}}function Y(j,W){return j==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function B(j){var W=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":Y(W,j)?"symbol":W}function X(j){if(typeof j>"u"||j===null)return""+j;var W=B(j);if(W==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return W}function U(j){var W=X(j);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function re(j){return!j.constructor||!j.constructor.name?p:j.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},D0}var j0,fk;function Lae(){if(fk)return j0;fk=1;var e=H_();function t(){}function r(){}return r.resetWarningCache=t,j0=function(){function n(a,s,c,u,d,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},j0}var hk;function zae(){if(hk)return eu.exports;if(hk=1,process.env.NODE_ENV!=="production"){var e=oL(),t=!0;eu.exports=qae()(e.isElement,t)}else eu.exports=Lae()();return eu.exports}var Bae=zae();const As=Qi(Bae);var pk={},Ds,vk;function Wt(){if(vk)return Ds;vk=1;var e=function(t){return t&&t.Math===Math&&t};return Ds=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Mt=="object"&&Mt)||e(typeof Ds=="object"&&Ds)||(function(){return this})()||Function("return this")(),Ds}var q0={},L0,gk;function wt(){return gk||(gk=1,L0=function(e){try{return!!e()}catch{return!0}}),L0}var z0,mk;function Vn(){if(mk)return z0;mk=1;var e=wt();return z0=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),z0}var B0,bk;function Ud(){if(bk)return B0;bk=1;var e=wt();return B0=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),B0}var F0,yk;function Ur(){if(yk)return F0;yk=1;var e=Ud(),t=Function.prototype.call;return F0=e?t.bind(t):function(){return t.apply(t,arguments)},F0}var $0={},xk;function sL(){if(xk)return $0;xk=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return $0.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,$0}var H0,wk;function V_(){return wk||(wk=1,H0=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),H0}var V0,_k;function bt(){if(_k)return V0;_k=1;var e=Ud(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return V0=e?n:function(i){return function(){return r.apply(i,arguments)}},V0}var W0,Sk;function to(){if(Sk)return W0;Sk=1;var e=bt(),t=e({}.toString),r=e("".slice);return W0=function(n){return r(t(n),8,-1)},W0}var U0,Ek;function Gd(){if(Ek)return U0;Ek=1;var e=bt(),t=wt(),r=to(),n=Object,i=e("".split);return U0=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,U0}var G0,Ok;function Tl(){return Ok||(Ok=1,G0=function(e){return e==null}),G0}var K0,Ck;function Ao(){if(Ck)return K0;Ck=1;var e=Tl(),t=TypeError;return K0=function(r){if(e(r))throw new t("Can't call method on "+r);return r},K0}var Y0,Ik;function Fa(){if(Ik)return Y0;Ik=1;var e=Gd(),t=Ao();return Y0=function(r){return e(t(r))},Y0}var X0,Rk;function er(){if(Rk)return X0;Rk=1;var e=typeof document=="object"&&document.all;return X0=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},X0}var Z0,Nk;function hr(){if(Nk)return Z0;Nk=1;var e=er();return Z0=function(t){return typeof t=="object"?t!==null:e(t)},Z0}var J0,Tk;function Kd(){if(Tk)return J0;Tk=1;var e=Wt(),t=er(),r=function(n){return t(n)?n:void 0};return J0=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},J0}var Q0,Pk;function Yd(){if(Pk)return Q0;Pk=1;var e=bt();return Q0=e({}.isPrototypeOf),Q0}var ey,kk;function lL(){if(kk)return ey;kk=1;var e=Wt(),t=e.navigator,r=t&&t.userAgent;return ey=r?String(r):"",ey}var ty,Mk;function W_(){if(Mk)return ty;Mk=1;var e=Wt(),t=lL(),r=e.process,n=e.Deno,i=r&&r.versions||n&&n.version,o=i&&i.v8,a,s;return o&&(a=o.split("."),s=a[0]>0&&a[0]<4?1:+(a[0]+a[1])),!s&&t&&(a=t.match(/Edge\/(\d+)/),(!a||a[1]>=74)&&(a=t.match(/Chrome\/(\d+)/),a&&(s=+a[1]))),ty=s,ty}var ry,Ak;function cL(){if(Ak)return ry;Ak=1;var e=W_(),t=wt(),r=Wt(),n=r.String;return ry=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ry}var ny,Dk;function uL(){if(Dk)return ny;Dk=1;var e=cL();return ny=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ny}var iy,jk;function dL(){if(jk)return iy;jk=1;var e=Kd(),t=er(),r=Yd(),n=uL(),i=Object;return iy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},iy}var oy,qk;function U_(){if(qk)return oy;qk=1;var e=String;return oy=function(t){try{return e(t)}catch{return"Object"}},oy}var ay,Lk;function Pl(){if(Lk)return ay;Lk=1;var e=er(),t=U_(),r=TypeError;return ay=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},ay}var sy,zk;function kl(){if(zk)return sy;zk=1;var e=Pl(),t=Tl();return sy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},sy}var ly,Bk;function Fae(){if(Bk)return ly;Bk=1;var e=Ur(),t=er(),r=hr(),n=TypeError;return ly=function(i,o){var a,s;if(o==="string"&&t(a=i.toString)&&!r(s=e(a,i))||t(a=i.valueOf)&&!r(s=e(a,i))||o!=="string"&&t(a=i.toString)&&!r(s=e(a,i)))return s;throw new n("Can't convert object to primitive value")},ly}var cy={exports:{}},uy,Fk;function Xd(){return Fk||(Fk=1,uy=!1),uy}var dy,$k;function G_(){if($k)return dy;$k=1;var e=Wt(),t=Object.defineProperty;return dy=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},dy}var Hk;function K_(){if(Hk)return cy.exports;Hk=1;var e=Xd(),t=Wt(),r=G_(),n="__core-js_shared__",i=cy.exports=t[n]||r(n,{});return(i.versions||(i.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),cy.exports}var fy,Vk;function Y_(){if(Vk)return fy;Vk=1;var e=K_();return fy=function(t,r){return e[t]||(e[t]=r||{})},fy}var hy,Wk;function $a(){if(Wk)return hy;Wk=1;var e=Ao(),t=Object;return hy=function(r){return t(e(r))},hy}var py,Uk;function Cn(){if(Uk)return py;Uk=1;var e=bt(),t=$a(),r=e({}.hasOwnProperty);return py=Object.hasOwn||function(i,o){return r(t(i),o)},py}var vy,Gk;function X_(){if(Gk)return vy;Gk=1;var e=bt(),t=0,r=Math.random(),n=e(1.1.toString);return vy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},vy}var gy,Kk;function Nr(){if(Kk)return gy;Kk=1;var e=Wt(),t=Y_(),r=Cn(),n=X_(),i=cL(),o=uL(),a=e.Symbol,s=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return gy=function(u){return r(s,u)||(s[u]=i&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},gy}var my,Yk;function $ae(){if(Yk)return my;Yk=1;var e=Ur(),t=hr(),r=dL(),n=kl(),i=Fae(),o=Nr(),a=TypeError,s=o("toPrimitive");return my=function(c,u){if(!t(c)||r(c))return c;var d=n(c,s),h;if(d){if(u===void 0&&(u="default"),h=e(d,c,u),!t(h)||r(h))return h;throw new a("Can't convert object to primitive value")}return u===void 0&&(u="number"),i(c,u)},my}var by,Xk;function fL(){if(Xk)return by;Xk=1;var e=$ae(),t=dL();return by=function(r){var n=e(r,"string");return t(n)?n:n+""},by}var yy,Zk;function Z_(){if(Zk)return yy;Zk=1;var e=Wt(),t=hr(),r=e.document,n=t(r)&&t(r.createElement);return yy=function(i){return n?r.createElement(i):{}},yy}var xy,Jk;function hL(){if(Jk)return xy;Jk=1;var e=Vn(),t=wt(),r=Z_();return xy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),xy}var Qk;function pL(){if(Qk)return q0;Qk=1;var e=Vn(),t=Ur(),r=sL(),n=V_(),i=Fa(),o=fL(),a=Cn(),s=hL(),c=Object.getOwnPropertyDescriptor;return q0.f=e?c:function(d,h){if(d=i(d),h=o(h),s)try{return c(d,h)}catch{}if(a(d,h))return n(!t(r.f,d,h),d[h])},q0}var wy={},_y,eM;function vL(){if(eM)return _y;eM=1;var e=Vn(),t=wt();return _y=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_y}var Sy,tM;function In(){if(tM)return Sy;tM=1;var e=hr(),t=String,r=TypeError;return Sy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Sy}var rM;function Ci(){if(rM)return wy;rM=1;var e=Vn(),t=hL(),r=vL(),n=In(),i=fL(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return wy.f=e?r?function(p,v,x){if(n(p),v=i(v),n(x),typeof p=="function"&&v==="prototype"&&"value"in x&&d in x&&!x[d]){var g=s(p,v);g&&g[d]&&(p[v]=x.value,x={configurable:u in x?x[u]:g[u],enumerable:c in x?x[c]:g[c],writable:!1})}return a(p,v,x)}:a:function(p,v,x){if(n(p),v=i(v),n(x),t)try{return a(p,v,x)}catch{}if("get"in x||"set"in x)throw new o("Accessors not supported");return"value"in x&&(p[v]=x.value),p},wy}var Ey,nM;function Ml(){if(nM)return Ey;nM=1;var e=Vn(),t=Ci(),r=V_();return Ey=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Ey}var Oy={exports:{}},Cy,iM;function J_(){if(iM)return Cy;iM=1;var e=Vn(),t=Cn(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,i=t(r,"name"),o=i&&(function(){}).name==="something",a=i&&(!e||e&&n(r,"name").configurable);return Cy={EXISTS:i,PROPER:o,CONFIGURABLE:a},Cy}var Iy,oM;function gL(){if(oM)return Iy;oM=1;var e=bt(),t=er(),r=K_(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Iy=r.inspectSource,Iy}var Ry,aM;function mL(){if(aM)return Ry;aM=1;var e=Wt(),t=er(),r=e.WeakMap;return Ry=t(r)&&/native code/.test(String(r)),Ry}var Ny,sM;function Q_(){if(sM)return Ny;sM=1;var e=Y_(),t=X_(),r=e("keys");return Ny=function(n){return r[n]||(r[n]=t(n))},Ny}var Ty,lM;function Zd(){return lM||(lM=1,Ty={}),Ty}var Py,cM;function Ha(){if(cM)return Py;cM=1;var e=mL(),t=Wt(),r=hr(),n=Ml(),i=Cn(),o=K_(),a=Q_(),s=Zd(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,h,p,v,x=function(y){return v(y)?p(y):h(y,{})},g=function(y){return function(_){var E;if(!r(_)||(E=p(_)).type!==y)throw new u("Incompatible receiver, "+y+" required");return E}};if(e||o.state){var b=o.state||(o.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,h=function(y,_){if(b.has(y))throw new u(c);return _.facade=y,b.set(y,_),_},p=function(y){return b.get(y)||{}},v=function(y){return b.has(y)}}else{var w=a("state");s[w]=!0,h=function(y,_){if(i(y,w))throw new u(c);return _.facade=y,n(y,w,_),_},p=function(y){return i(y,w)?y[w]:{}},v=function(y){return i(y,w)}}return Py={set:h,get:p,has:v,enforce:x,getterFor:g},Py}var uM;function bL(){if(uM)return Oy.exports;uM=1;var e=bt(),t=wt(),r=er(),n=Cn(),i=Vn(),o=J_().CONFIGURABLE,a=gL(),s=Ha(),c=s.enforce,u=s.get,d=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),x=e([].join),g=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),w=Oy.exports=function(y,_,E){p(d(_),0,7)==="Symbol("&&(_="["+v(d(_),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),E&&E.getter&&(_="get "+_),E&&E.setter&&(_="set "+_),(!n(y,"name")||o&&y.name!==_)&&(i?h(y,"name",{value:_,configurable:!0}):y.name=_),g&&E&&n(E,"arity")&&y.length!==E.arity&&h(y,"length",{value:E.arity});try{E&&n(E,"constructor")&&E.constructor?i&&h(y,"prototype",{writable:!1}):y.prototype&&(y.prototype=void 0)}catch{}var S=c(y);return n(S,"source")||(S.source=x(b,typeof _=="string"?_:"")),y};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||a(this)},"toString"),Oy.exports}var ky,dM;function Do(){if(dM)return ky;dM=1;var e=er(),t=Ci(),r=bL(),n=G_();return ky=function(i,o,a,s){s||(s={});var c=s.enumerable,u=s.name!==void 0?s.name:o;if(e(a)&&r(a,u,s),s.global)c?i[o]=a:n(o,a);else{try{s.unsafe?i[o]&&(c=!0):delete i[o]}catch{}c?i[o]=a:t.f(i,o,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return i},ky}var My={},Ay,fM;function Hae(){if(fM)return Ay;fM=1;var e=Math.ceil,t=Math.floor;return Ay=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},Ay}var Dy,hM;function Jd(){if(hM)return Dy;hM=1;var e=Hae();return Dy=function(t){var r=+t;return r!==r||r===0?0:e(r)},Dy}var jy,pM;function Vae(){if(pM)return jy;pM=1;var e=Jd(),t=Math.max,r=Math.min;return jy=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},jy}var qy,vM;function eS(){if(vM)return qy;vM=1;var e=Jd(),t=Math.min;return qy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},qy}var Ly,gM;function Qd(){if(gM)return Ly;gM=1;var e=eS();return Ly=function(t){return e(t.length)},Ly}var zy,mM;function Wae(){if(mM)return zy;mM=1;var e=Fa(),t=Vae(),r=Qd(),n=function(i){return function(o,a,s){var c=e(o),u=r(c);if(u===0)return!i&&-1;var d=t(s,u),h;if(i&&a!==a){for(;u>d;)if(h=c[d++],h!==h)return!0}else for(;u>d;d++)if((i||d in c)&&c[d]===a)return i||d||0;return!i&&-1}};return zy={includes:n(!0),indexOf:n(!1)},zy}var By,bM;function yL(){if(bM)return By;bM=1;var e=bt(),t=Cn(),r=Fa(),n=Wae().indexOf,i=Zd(),o=e([].push);return By=function(a,s){var c=r(a),u=0,d=[],h;for(h in c)!t(i,h)&&t(c,h)&&o(d,h);for(;s.length>u;)t(c,h=s[u++])&&(~n(d,h)||o(d,h));return d},By}var Fy,yM;function tS(){return yM||(yM=1,Fy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Fy}var xM;function rS(){if(xM)return My;xM=1;var e=yL(),t=tS(),r=t.concat("length","prototype");return My.f=Object.getOwnPropertyNames||function(i){return e(i,r)},My}var $y={},wM;function xL(){return wM||(wM=1,$y.f=Object.getOwnPropertySymbols),$y}var Hy,_M;function Uae(){if(_M)return Hy;_M=1;var e=Kd(),t=bt(),r=rS(),n=xL(),i=In(),o=t([].concat);return Hy=e("Reflect","ownKeys")||function(s){var c=r.f(i(s)),u=n.f;return u?o(c,u(s)):c},Hy}var Vy,SM;function Gae(){if(SM)return Vy;SM=1;var e=Cn(),t=Uae(),r=pL(),n=Ci();return Vy=function(i,o,a){for(var s=t(o),c=n.f,u=r.f,d=0;d<s.length;d++){var h=s[d];!e(i,h)&&!(a&&e(a,h))&&c(i,h,u(o,h))}},Vy}var Wy,EM;function wL(){if(EM)return Wy;EM=1;var e=wt(),t=er(),r=/#|\.prototype\./,n=function(c,u){var d=o[i(c)];return d===s?!0:d===a?!1:t(u)?e(u):!!u},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return Wy=n,Wy}var Uy,OM;function ro(){if(OM)return Uy;OM=1;var e=Wt(),t=pL().f,r=Ml(),n=Do(),i=G_(),o=Gae(),a=wL();return Uy=function(s,c){var u=s.target,d=s.global,h=s.stat,p,v,x,g,b,w;if(d?v=e:h?v=e[u]||i(u,{}):v=e[u]&&e[u].prototype,v)for(x in c){if(b=c[x],s.dontCallGetSet?(w=t(v,x),g=w&&w.value):g=v[x],p=a(d?x:u+(h?".":"#")+x,s.forced),!p&&g!==void 0){if(typeof b==typeof g)continue;o(b,g)}(s.sham||g&&g.sham)&&r(b,"sham",!0),n(v,x,b,s)}},Uy}var Gy,CM;function nS(){if(CM)return Gy;CM=1;var e=Nr(),t=e("toStringTag"),r={};return r[t]="z",Gy=String(r)==="[object z]",Gy}var Ky,IM;function ef(){if(IM)return Ky;IM=1;var e=nS(),t=er(),r=to(),n=Nr(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return Ky=e?r:function(c){var u,d,h;return c===void 0?"Undefined":c===null?"Null":typeof(d=s(u=o(c),i))=="string"?d:a?r(u):(h=r(u))==="Object"&&t(u.callee)?"Arguments":h},Ky}var Yy,RM;function jo(){if(RM)return Yy;RM=1;var e=ef(),t=String;return Yy=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},Yy}var Xy,NM;function _L(){return NM||(NM=1,Xy=`
111
+ \v\f\r                 \u2028\u2029\uFEFF`),Xy}var Zy,TM;function Kae(){if(TM)return Zy;TM=1;var e=bt(),t=Ao(),r=jo(),n=_L(),i=e("".replace),o=RegExp("^["+n+"]+"),a=RegExp("(^|[^"+n+"])["+n+"]+$"),s=function(c){return function(u){var d=r(t(u));return c&1&&(d=i(d,o,"")),c&2&&(d=i(d,a,"$1")),d}};return Zy={start:s(1),end:s(2),trim:s(3)},Zy}var Jy,PM;function Yae(){if(PM)return Jy;PM=1;var e=Wt(),t=wt(),r=bt(),n=jo(),i=Kae().trim,o=_L(),a=e.parseInt,s=e.Symbol,c=s&&s.iterator,u=/^[+-]?0x/i,d=r(u.exec),h=a(o+"08")!==8||a(o+"0x16")!==22||c&&!t(function(){a(Object(c))});return Jy=h?function(v,x){var g=i(n(v));return a(g,x>>>0||(d(u,g)?16:10))}:a,Jy}var kM;function Xae(){if(kM)return pk;kM=1;var e=ro(),t=Yae();return e({global:!0,forced:parseInt!==t},{parseInt:t}),pk}Xae();var MM={},Qy,AM;function SL(){if(AM)return Qy;AM=1;var e=yL(),t=tS();return Qy=Object.keys||function(n){return e(n,t)},Qy}var ex,DM;function Zae(){if(DM)return ex;DM=1;var e=Vn(),t=bt(),r=Ur(),n=wt(),i=SL(),o=xL(),a=sL(),s=$a(),c=Gd(),u=Object.assign,d=Object.defineProperty,h=t([].concat);return ex=!u||n(function(){if(e&&u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},v={},x=Symbol("assign detection"),g="abcdefghijklmnopqrst";return p[x]=7,g.split("").forEach(function(b){v[b]=b}),u({},p)[x]!==7||i(u({},v)).join("")!==g})?function(v,x){for(var g=s(v),b=arguments.length,w=1,y=o.f,_=a.f;b>w;)for(var E=c(arguments[w++]),S=y?h(i(E),y(E)):i(E),I=S.length,N=0,T;I>N;)T=S[N++],(!e||r(_,E,T))&&(g[T]=E[T]);return g}:u,ex}var jM;function Jae(){if(jM)return MM;jM=1;var e=ro(),t=Zae();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),MM}Jae();var qM={},tx,LM;function Qae(){if(LM)return tx;LM=1;var e=to(),t=bt();return tx=function(r){if(e(r)==="Function")return t(r)},tx}var rx,zM;function EL(){if(zM)return rx;zM=1;var e=Qae(),t=Pl(),r=Ud(),n=e(e.bind);return rx=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},rx}var nx,BM;function ese(){if(BM)return nx;BM=1;var e=to();return nx=Array.isArray||function(r){return e(r)==="Array"},nx}var ix,FM;function tse(){if(FM)return ix;FM=1;var e=bt(),t=wt(),r=er(),n=ef(),i=Kd(),o=gL(),a=function(){},s=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(a),h=function(x){if(!r(x))return!1;try{return s(a,[],x),!0}catch{return!1}},p=function(x){if(!r(x))return!1;switch(n(x)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!u(c,o(x))}catch{return!0}};return p.sham=!0,ix=!s||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,ix}var ox,$M;function rse(){if($M)return ox;$M=1;var e=ese(),t=tse(),r=hr(),n=Nr(),i=n("species"),o=Array;return ox=function(a){var s;return e(a)&&(s=a.constructor,t(s)&&(s===o||e(s.prototype))?s=void 0:r(s)&&(s=s[i],s===null&&(s=void 0))),s===void 0?o:s},ox}var ax,HM;function nse(){if(HM)return ax;HM=1;var e=rse();return ax=function(t,r){return new(e(t))(r===0?0:r)},ax}var sx,VM;function OL(){if(VM)return sx;VM=1;var e=EL(),t=bt(),r=Gd(),n=$a(),i=Qd(),o=nse(),a=t([].push),s=function(c){var u=c===1,d=c===2,h=c===3,p=c===4,v=c===6,x=c===7,g=c===5||v;return function(b,w,y,_){for(var E=n(b),S=r(E),I=i(S),N=e(w,y),T=0,k=_||o,z=u?k(b,I):d||x?k(b,0):void 0,L,K;I>T;T++)if((g||T in S)&&(L=S[T],K=N(L,T,E),c))if(u)z[T]=K;else if(K)switch(c){case 3:return!0;case 5:return L;case 6:return T;case 2:a(z,L)}else switch(c){case 4:return!1;case 7:a(z,L)}return v?-1:h||p?p:z}};return sx={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},sx}var lx,WM;function ise(){if(WM)return lx;WM=1;var e=wt(),t=Nr(),r=W_(),n=t("species");return lx=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},lx}var UM;function ose(){if(UM)return qM;UM=1;var e=ro(),t=OL().filter,r=ise(),n=r("filter");return e({target:"Array",proto:!0,forced:!n},{filter:function(o){return t(this,o,arguments.length>1?arguments[1]:void 0)}}),qM}ose();var GM={},cx,KM;function ase(){if(KM)return cx;KM=1;var e=nS(),t=ef();return cx=e?{}.toString:function(){return"[object "+t(this)+"]"},cx}var YM;function sse(){if(YM)return GM;YM=1;var e=nS(),t=Do(),r=ase();return e||t(Object.prototype,"toString",r,{unsafe:!0}),GM}sse();var ux={},XM;function lse(){if(XM)return ux;XM=1;var e=Vn(),t=vL(),r=Ci(),n=In(),i=Fa(),o=SL();return ux.f=e&&!t?Object.defineProperties:function(s,c){n(s);for(var u=i(c),d=o(c),h=d.length,p=0,v;h>p;)r.f(s,v=d[p++],u[v]);return s},ux}var dx,ZM;function cse(){if(ZM)return dx;ZM=1;var e=Kd();return dx=e("document","documentElement"),dx}var fx,JM;function tf(){if(JM)return fx;JM=1;var e=In(),t=lse(),r=tS(),n=Zd(),i=cse(),o=Z_(),a=Q_(),s=">",c="<",u="prototype",d="script",h=a("IE_PROTO"),p=function(){},v=function(y){return c+d+s+y+c+"/"+d+s},x=function(y){y.write(v("")),y.close();var _=y.parentWindow.Object;return y=null,_},g=function(){var y=o("iframe"),_="java"+d+":",E;return y.style.display="none",i.appendChild(y),y.src=String(_),E=y.contentWindow.document,E.open(),E.write(v("document.F=Object")),E.close(),E.F},b,w=function(){try{b=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&b?x(b):g():x(b);for(var y=r.length;y--;)delete w[u][r[y]];return w()};return n[h]=!0,fx=Object.create||function(_,E){var S;return _!==null?(p[u]=e(_),S=new p,p[u]=null,S[h]=_):S=w(),E===void 0?S:t.f(S,E)},fx}var hx,QM;function use(){if(QM)return hx;QM=1;var e=Nr(),t=tf(),r=Ci().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),hx=function(o){i[n][o]=!0},hx}var px,eA;function Al(){return eA||(eA=1,px={}),px}var vx,tA;function dse(){if(tA)return vx;tA=1;var e=wt();return vx=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),vx}var gx,rA;function CL(){if(rA)return gx;rA=1;var e=Cn(),t=er(),r=$a(),n=Q_(),i=dse(),o=n("IE_PROTO"),a=Object,s=a.prototype;return gx=i?a.getPrototypeOf:function(c){var u=r(c);if(e(u,o))return u[o];var d=u.constructor;return t(d)&&u instanceof d?d.prototype:u instanceof a?s:null},gx}var mx,nA;function IL(){if(nA)return mx;nA=1;var e=wt(),t=er(),r=hr(),n=tf(),i=CL(),o=Do(),a=Nr(),s=Xd(),c=a("iterator"),u=!1,d,h,p;[].keys&&(p=[].keys(),"next"in p?(h=i(i(p)),h!==Object.prototype&&(d=h)):u=!0);var v=!r(d)||e(function(){var x={};return d[c].call(x)!==x});return v?d={}:s&&(d=n(d)),t(d[c])||o(d,c,function(){return this}),mx={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},mx}var bx,iA;function rf(){if(iA)return bx;iA=1;var e=Ci().f,t=Cn(),r=Nr(),n=r("toStringTag");return bx=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},bx}var yx,oA;function fse(){if(oA)return yx;oA=1;var e=IL().IteratorPrototype,t=tf(),r=V_(),n=rf(),i=Al(),o=function(){return this};return yx=function(a,s,c,u){var d=s+" Iterator";return a.prototype=t(e,{next:r(+!u,c)}),n(a,d,!1,!0),i[d]=o,a},yx}var xx,aA;function hse(){if(aA)return xx;aA=1;var e=bt(),t=Pl();return xx=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},xx}var wx,sA;function pse(){if(sA)return wx;sA=1;var e=hr();return wx=function(t){return e(t)||t===null},wx}var _x,lA;function vse(){if(lA)return _x;lA=1;var e=pse(),t=String,r=TypeError;return _x=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},_x}var Sx,cA;function RL(){if(cA)return Sx;cA=1;var e=hse(),t=hr(),r=Ao(),n=vse();return Sx=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,o={},a;try{a=e(Object.prototype,"__proto__","set"),a(o,[]),i=o instanceof Array}catch{}return function(c,u){return r(c),n(u),t(c)&&(i?a(c,u):c.__proto__=u),c}})():void 0),Sx}var Ex,uA;function NL(){if(uA)return Ex;uA=1;var e=ro(),t=Ur(),r=Xd(),n=J_(),i=er(),o=fse(),a=CL(),s=RL(),c=rf(),u=Ml(),d=Do(),h=Nr(),p=Al(),v=IL(),x=n.PROPER,g=n.CONFIGURABLE,b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,y=h("iterator"),_="keys",E="values",S="entries",I=function(){return this};return Ex=function(N,T,k,z,L,K,G){o(k,T,z);var A=function(M){if(M===L&&re)return re;if(!w&&M&&M in X)return X[M];switch(M){case _:return function(){return new k(this,M)};case E:return function(){return new k(this,M)};case S:return function(){return new k(this,M)}}return function(){return new k(this)}},Y=T+" Iterator",B=!1,X=N.prototype,U=X[y]||X["@@iterator"]||L&&X[L],re=!w&&U||A(L),j=T==="Array"&&X.entries||U,W,Z,J;if(j&&(W=a(j.call(new N)),W!==Object.prototype&&W.next&&(!r&&a(W)!==b&&(s?s(W,b):i(W[y])||d(W,y,I)),c(W,Y,!0,!0),r&&(p[Y]=I))),x&&L===E&&U&&U.name!==E&&(!r&&g?u(X,"name",E):(B=!0,re=function(){return t(U,this)})),L)if(Z={values:A(E),keys:K?re:A(_),entries:A(S)},G)for(J in Z)(w||B||!(J in X))&&d(X,J,Z[J]);else e({target:T,proto:!0,forced:w||B},Z);return(!r||G)&&X[y]!==re&&d(X,y,re,{name:L}),p[T]=re,Z},Ex}var Ox,dA;function TL(){return dA||(dA=1,Ox=function(e,t){return{value:e,done:t}}),Ox}var Cx,fA;function PL(){if(fA)return Cx;fA=1;var e=Fa(),t=use(),r=Al(),n=Ha(),i=Ci().f,o=NL(),a=TL(),s=Xd(),c=Vn(),u="Array Iterator",d=n.set,h=n.getterFor(u);Cx=o(Array,"Array",function(v,x){d(this,{type:u,target:e(v),index:0,kind:x})},function(){var v=h(this),x=v.target,g=v.index++;if(!x||g>=x.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(g,!1);case"values":return a(x[g],!1)}return a([g,x[g]],!1)},"values");var p=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&c&&p.name!=="values")try{i(p,"name",{value:"values"})}catch{}return Cx}PL();var hA={},Ix,pA;function kL(){if(pA)return Ix;pA=1;var e=bt(),t=Jd(),r=jo(),n=Ao(),i=e("".charAt),o=e("".charCodeAt),a=e("".slice),s=function(c){return function(u,d){var h=r(n(u)),p=t(d),v=h.length,x,g;return p<0||p>=v?c?"":void 0:(x=o(h,p),x<55296||x>56319||p+1===v||(g=o(h,p+1))<56320||g>57343?c?i(h,p):x:c?a(h,p,p+2):(x-55296<<10)+(g-56320)+65536)}};return Ix={codeAt:s(!1),charAt:s(!0)},Ix}var vA;function gse(){if(vA)return hA;vA=1;var e=kL().charAt,t=jo(),r=Ha(),n=NL(),i=TL(),o="String Iterator",a=r.set,s=r.getterFor(o);return n(String,"String",function(c){a(this,{type:o,string:t(c),index:0})},function(){var u=s(this),d=u.string,h=u.index,p;return h>=d.length?i(void 0,!0):(p=e(d,h),u.index+=p.length,i(p,!1))}),hA}gse();var gA={},mA={},Rx,bA;function ML(){if(bA)return Rx;bA=1;var e=wt();return Rx=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),Rx}var Nx,yA;function AL(){if(yA)return Nx;yA=1;var e=Do();return Nx=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},Nx}var Tx={exports:{}},Px={},kx,xA;function mse(){if(xA)return kx;xA=1;var e=bt();return kx=e([].slice),kx}var wA;function bse(){if(wA)return Px;wA=1;var e=to(),t=Fa(),r=rS().f,n=mse(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return Px.f=function(s){return i&&e(s)==="Window"?o(s):r(t(s))},Px}var Mx,_A;function yse(){if(_A)return Mx;_A=1;var e=wt();return Mx=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Mx}var Ax,SA;function xse(){if(SA)return Ax;SA=1;var e=wt(),t=hr(),r=to(),n=yse(),i=Object.isExtensible,o=e(function(){});return Ax=o||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,Ax}var EA;function iS(){if(EA)return Tx.exports;EA=1;var e=ro(),t=bt(),r=Zd(),n=hr(),i=Cn(),o=Ci().f,a=rS(),s=bse(),c=xse(),u=X_(),d=ML(),h=!1,p=u("meta"),v=0,x=function(E){o(E,p,{value:{objectID:"O"+v++,weakData:{}}})},g=function(E,S){if(!n(E))return typeof E=="symbol"?E:(typeof E=="string"?"S":"P")+E;if(!i(E,p)){if(!c(E))return"F";if(!S)return"E";x(E)}return E[p].objectID},b=function(E,S){if(!i(E,p)){if(!c(E))return!0;if(!S)return!1;x(E)}return E[p].weakData},w=function(E){return d&&h&&c(E)&&!i(E,p)&&x(E),E},y=function(){_.enable=function(){},h=!0;var E=a.f,S=t([].splice),I={};I[p]=1,E(I).length&&(a.f=function(N){for(var T=E(N),k=0,z=T.length;k<z;k++)if(T[k]===p){S(T,k,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=Tx.exports={enable:y,fastKey:g,getWeakData:b,onFreeze:w};return r[p]=!0,Tx.exports}var Dx,OA;function wse(){if(OA)return Dx;OA=1;var e=Nr(),t=Al(),r=e("iterator"),n=Array.prototype;return Dx=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},Dx}var jx,CA;function DL(){if(CA)return jx;CA=1;var e=ef(),t=kl(),r=Tl(),n=Al(),i=Nr(),o=i("iterator");return jx=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},jx}var qx,IA;function _se(){if(IA)return qx;IA=1;var e=Ur(),t=Pl(),r=In(),n=U_(),i=DL(),o=TypeError;return qx=function(a,s){var c=arguments.length<2?i(a):s;if(t(c))return r(e(c,a));throw new o(n(a)+" is not iterable")},qx}var Lx,RA;function Sse(){if(RA)return Lx;RA=1;var e=Ur(),t=In(),r=kl();return Lx=function(n,i,o){var a,s;t(n);try{if(a=r(n,"return"),!a){if(i==="throw")throw o;return o}a=e(a,n)}catch(c){s=!0,a=c}if(i==="throw")throw o;if(s)throw a;return t(a),o},Lx}var zx,NA;function jL(){if(NA)return zx;NA=1;var e=EL(),t=Ur(),r=In(),n=U_(),i=wse(),o=Qd(),a=Yd(),s=_se(),c=DL(),u=Sse(),d=TypeError,h=function(v,x){this.stopped=v,this.result=x},p=h.prototype;return zx=function(v,x,g){var b=g&&g.that,w=!!(g&&g.AS_ENTRIES),y=!!(g&&g.IS_RECORD),_=!!(g&&g.IS_ITERATOR),E=!!(g&&g.INTERRUPTED),S=e(x,b),I,N,T,k,z,L,K,G=function(Y){return I&&u(I,"normal"),new h(!0,Y)},A=function(Y){return w?(r(Y),E?S(Y[0],Y[1],G):S(Y[0],Y[1])):E?S(Y,G):S(Y)};if(y)I=v.iterator;else if(_)I=v;else{if(N=c(v),!N)throw new d(n(v)+" is not iterable");if(i(N)){for(T=0,k=o(v);k>T;T++)if(z=A(v[T]),z&&a(p,z))return z;return new h(!1)}I=s(v,N)}for(L=y?v.next:I.next;!(K=t(L,I)).done;){try{z=A(K.value)}catch(Y){u(I,"throw",Y)}if(typeof z=="object"&&z&&a(p,z))return z}return new h(!1)},zx}var Bx,TA;function qL(){if(TA)return Bx;TA=1;var e=Yd(),t=TypeError;return Bx=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Bx}var Fx,PA;function Ese(){if(PA)return Fx;PA=1;var e=Nr(),t=e("iterator"),r=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){r=!0}};i[t]=function(){return this},Array.from(i,function(){throw 2})}catch{}return Fx=function(o,a){try{if(!a&&!r)return!1}catch{return!1}var s=!1;try{var c={};c[t]=function(){return{next:function(){return{done:s=!0}}}},o(c)}catch{}return s},Fx}var $x,kA;function Ose(){if(kA)return $x;kA=1;var e=er(),t=hr(),r=RL();return $x=function(n,i,o){var a,s;return r&&e(a=i.constructor)&&a!==o&&t(s=a.prototype)&&s!==o.prototype&&r(n,s),n},$x}var Hx,MA;function Cse(){if(MA)return Hx;MA=1;var e=ro(),t=Wt(),r=bt(),n=wL(),i=Do(),o=iS(),a=jL(),s=qL(),c=er(),u=Tl(),d=hr(),h=wt(),p=Ese(),v=rf(),x=Ose();return Hx=function(g,b,w){var y=g.indexOf("Map")!==-1,_=g.indexOf("Weak")!==-1,E=y?"set":"add",S=t[g],I=S&&S.prototype,N=S,T={},k=function(B){var X=r(I[B]);i(I,B,B==="add"?function(re){return X(this,re===0?0:re),this}:B==="delete"?function(U){return _&&!d(U)?!1:X(this,U===0?0:U)}:B==="get"?function(re){return _&&!d(re)?void 0:X(this,re===0?0:re)}:B==="has"?function(re){return _&&!d(re)?!1:X(this,re===0?0:re)}:function(re,j){return X(this,re===0?0:re,j),this})},z=n(g,!c(S)||!(_||I.forEach&&!h(function(){new S().entries().next()})));if(z)N=w.getConstructor(b,g,y,E),o.enable();else if(n(g,!0)){var L=new N,K=L[E](_?{}:-0,1)!==L,G=h(function(){L.has(1)}),A=p(function(B){new S(B)}),Y=!_&&h(function(){for(var B=new S,X=5;X--;)B[E](X,X);return!B.has(-0)});A||(N=b(function(B,X){s(B,I);var U=x(new S,B,N);return u(X)||a(X,U[E],{that:U,AS_ENTRIES:y}),U}),N.prototype=I,I.constructor=N),(G||Y)&&(k("delete"),k("has"),y&&k("get")),(Y||K)&&k(E),_&&I.clear&&delete I.clear}return T[g]=N,e({global:!0,constructor:!0,forced:N!==S},T),v(N,g),_||w.setStrong(N,g,y),N},Hx}var Vx,AA;function Ise(){if(AA)return Vx;AA=1;var e=bt(),t=AL(),r=iS().getWeakData,n=qL(),i=In(),o=Tl(),a=hr(),s=jL(),c=OL(),u=Cn(),d=Ha(),h=d.set,p=d.getterFor,v=c.find,x=c.findIndex,g=e([].splice),b=0,w=function(E){return E.frozen||(E.frozen=new y)},y=function(){this.entries=[]},_=function(E,S){return v(E.entries,function(I){return I[0]===S})};return y.prototype={get:function(E){var S=_(this,E);if(S)return S[1]},has:function(E){return!!_(this,E)},set:function(E,S){var I=_(this,E);I?I[1]=S:this.entries.push([E,S])},delete:function(E){var S=x(this.entries,function(I){return I[0]===E});return~S&&g(this.entries,S,1),!!~S}},Vx={getConstructor:function(E,S,I,N){var T=E(function(K,G){n(K,k),h(K,{type:S,id:b++,frozen:null}),o(G)||s(G,K[N],{that:K,AS_ENTRIES:I})}),k=T.prototype,z=p(S),L=function(K,G,A){var Y=z(K),B=r(i(G),!0);return B===!0?w(Y).set(G,A):B[Y.id]=A,K};return t(k,{delete:function(K){var G=z(this);if(!a(K))return!1;var A=r(K);return A===!0?w(G).delete(K):A&&u(A,G.id)&&delete A[G.id]},has:function(G){var A=z(this);if(!a(G))return!1;var Y=r(G);return Y===!0?w(A).has(G):Y&&u(Y,A.id)}}),t(k,I?{get:function(G){var A=z(this);if(a(G)){var Y=r(G);if(Y===!0)return w(A).get(G);if(Y)return Y[A.id]}},set:function(G,A){return L(this,G,A)}}:{add:function(G){return L(this,G,!0)}}),T}},Vx}var DA;function Rse(){if(DA)return mA;DA=1;var e=ML(),t=Wt(),r=bt(),n=AL(),i=iS(),o=Cse(),a=Ise(),s=hr(),c=Ha().enforce,u=wt(),d=mL(),h=Object,p=Array.isArray,v=h.isExtensible,x=h.isFrozen,g=h.isSealed,b=h.freeze,w=h.seal,y=!t.ActiveXObject&&"ActiveXObject"in t,_,E=function(K){return function(){return K(this,arguments.length?arguments[0]:void 0)}},S=o("WeakMap",E,a),I=S.prototype,N=r(I.set),T=function(){return e&&u(function(){var K=b([]);return N(new S,K,1),!x(K)})};if(d)if(y){_=a.getConstructor(E,"WeakMap",!0),i.enable();var k=r(I.delete),z=r(I.has),L=r(I.get);n(I,{delete:function(K){if(s(K)&&!v(K)){var G=c(this);return G.frozen||(G.frozen=new _),k(this,K)||G.frozen.delete(K)}return k(this,K)},has:function(G){if(s(G)&&!v(G)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,G)||A.frozen.has(G)}return z(this,G)},get:function(G){if(s(G)&&!v(G)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,G)?L(this,G):A.frozen.get(G)}return L(this,G)},set:function(G,A){if(s(G)&&!v(G)){var Y=c(this);Y.frozen||(Y.frozen=new _),z(this,G)?N(this,G,A):Y.frozen.set(G,A)}else N(this,G,A);return this}})}else T()&&n(I,{set:function(G,A){var Y;return p(G)&&(x(G)?Y=b:g(G)&&(Y=w)),N(this,G,A),Y&&Y(G),this}});return mA}var jA;function Nse(){return jA||(jA=1,Rse()),gA}Nse();var qA={},Wx,LA;function Tse(){return LA||(LA=1,Wx={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Wx}var Ux,zA;function Pse(){if(zA)return Ux;zA=1;var e=Z_(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return Ux=r===Object.prototype?void 0:r,Ux}var BA;function kse(){if(BA)return qA;BA=1;var e=Wt(),t=Tse(),r=Pse(),n=PL(),i=Ml(),o=rf(),a=Nr(),s=a("iterator"),c=n.values,u=function(h,p){if(h){if(h[s]!==c)try{i(h,s,c)}catch{h[s]=c}if(o(h,p,!0),t[p]){for(var v in n)if(h[v]!==n[v])try{i(h,v,n[v])}catch{h[v]=n[v]}}}};for(var d in t)u(e[d]&&e[d].prototype,d);return u(r,"DOMTokenList"),qA}kse();var Gx,FA;function Mse(){if(FA)return Gx;FA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,x=Math.min,g=function(){return d.Date.now()};function b(I,N,T){var k,z,L,K,G,A,Y=0,B=!1,X=!1,U=!0;if(typeof I!="function")throw new TypeError(e);N=S(N)||0,y(T)&&(B=!!T.leading,X="maxWait"in T,L=X?v(S(T.maxWait)||0,N):L,U="trailing"in T?!!T.trailing:U);function re(V){var Q=k,ne=z;return k=z=void 0,Y=V,K=I.apply(ne,Q),K}function j(V){return Y=V,G=setTimeout(J,N),B?re(V):K}function W(V){var Q=V-A,ne=V-Y,ce=N-Q;return X?x(ce,L-ne):ce}function Z(V){var Q=V-A,ne=V-Y;return A===void 0||Q>=N||Q<0||X&&ne>=L}function J(){var V=g();if(Z(V))return M(V);G=setTimeout(J,W(V))}function M(V){return G=void 0,U&&k?re(V):(k=z=void 0,K)}function H(){G!==void 0&&clearTimeout(G),Y=0,k=A=z=G=void 0}function q(){return G===void 0?K:M(g())}function D(){var V=g(),Q=Z(V);if(k=arguments,z=this,A=V,Q){if(G===void 0)return j(A);if(X)return G=setTimeout(J,N),re(A)}return G===void 0&&(G=setTimeout(J,N)),K}return D.cancel=H,D.flush=q,D}function w(I,N,T){var k=!0,z=!0;if(typeof I!="function")throw new TypeError(e);return y(T)&&(k="leading"in T?!!T.leading:k,z="trailing"in T?!!T.trailing:z),b(I,N,{leading:k,maxWait:N,trailing:z})}function y(I){var N=typeof I;return!!I&&(N=="object"||N=="function")}function _(I){return!!I&&typeof I=="object"}function E(I){return typeof I=="symbol"||_(I)&&p.call(I)==r}function S(I){if(typeof I=="number")return I;if(E(I))return t;if(y(I)){var N=typeof I.valueOf=="function"?I.valueOf():I;I=y(N)?N+"":N}if(typeof I!="string")return I===0?I:+I;I=I.replace(n,"");var T=o.test(I);return T||a.test(I)?s(I.slice(2),T?2:8):i.test(I)?t:+I}return Gx=w,Gx}var Ase=Mse();const $A=Qi(Ase);var Kx,HA;function Dse(){if(HA)return Kx;HA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,x=Math.min,g=function(){return d.Date.now()};function b(S,I,N){var T,k,z,L,K,G,A=0,Y=!1,B=!1,X=!0;if(typeof S!="function")throw new TypeError(e);I=E(I)||0,w(N)&&(Y=!!N.leading,B="maxWait"in N,z=B?v(E(N.maxWait)||0,I):z,X="trailing"in N?!!N.trailing:X);function U(D){var V=T,Q=k;return T=k=void 0,A=D,L=S.apply(Q,V),L}function re(D){return A=D,K=setTimeout(Z,I),Y?U(D):L}function j(D){var V=D-G,Q=D-A,ne=I-V;return B?x(ne,z-Q):ne}function W(D){var V=D-G,Q=D-A;return G===void 0||V>=I||V<0||B&&Q>=z}function Z(){var D=g();if(W(D))return J(D);K=setTimeout(Z,j(D))}function J(D){return K=void 0,X&&T?U(D):(T=k=void 0,L)}function M(){K!==void 0&&clearTimeout(K),A=0,T=G=k=K=void 0}function H(){return K===void 0?L:J(g())}function q(){var D=g(),V=W(D);if(T=arguments,k=this,G=D,V){if(K===void 0)return re(G);if(B)return K=setTimeout(Z,I),U(G)}return K===void 0&&(K=setTimeout(Z,I)),L}return q.cancel=M,q.flush=H,q}function w(S){var I=typeof S;return!!S&&(I=="object"||I=="function")}function y(S){return!!S&&typeof S=="object"}function _(S){return typeof S=="symbol"||y(S)&&p.call(S)==r}function E(S){if(typeof S=="number")return S;if(_(S))return t;if(w(S)){var I=typeof S.valueOf=="function"?S.valueOf():S;S=w(I)?I+"":I}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var N=o.test(S);return N||a.test(S)?s(S.slice(2),N?2:8):i.test(S)?t:+S}return Kx=b,Kx}var jse=Dse();const VA=Qi(jse);var Yx,WA;function qse(){if(WA)return Yx;WA=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function u(le,ie){return le==null?void 0:le[ie]}function d(le){var ie=!1;if(le!=null&&typeof le.toString!="function")try{ie=!!(le+"")}catch{}return ie}var h=Array.prototype,p=Function.prototype,v=Object.prototype,x=c["__core-js_shared__"],g=(function(){var le=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||"");return le?"Symbol(src)_1."+le:""})(),b=p.toString,w=v.hasOwnProperty,y=v.toString,_=RegExp("^"+b.call(w).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=h.splice,S=V(c,"Map"),I=V(Object,"create");function N(le){var ie=-1,me=le?le.length:0;for(this.clear();++ie<me;){var _e=le[ie];this.set(_e[0],_e[1])}}function T(){this.__data__=I?I(null):{}}function k(le){return this.has(le)&&delete this.__data__[le]}function z(le){var ie=this.__data__;if(I){var me=ie[le];return me===t?void 0:me}return w.call(ie,le)?ie[le]:void 0}function L(le){var ie=this.__data__;return I?ie[le]!==void 0:w.call(ie,le)}function K(le,ie){var me=this.__data__;return me[le]=I&&ie===void 0?t:ie,this}N.prototype.clear=T,N.prototype.delete=k,N.prototype.get=z,N.prototype.has=L,N.prototype.set=K;function G(le){var ie=-1,me=le?le.length:0;for(this.clear();++ie<me;){var _e=le[ie];this.set(_e[0],_e[1])}}function A(){this.__data__=[]}function Y(le){var ie=this.__data__,me=H(ie,le);if(me<0)return!1;var _e=ie.length-1;return me==_e?ie.pop():E.call(ie,me,1),!0}function B(le){var ie=this.__data__,me=H(ie,le);return me<0?void 0:ie[me][1]}function X(le){return H(this.__data__,le)>-1}function U(le,ie){var me=this.__data__,_e=H(me,le);return _e<0?me.push([le,ie]):me[_e][1]=ie,this}G.prototype.clear=A,G.prototype.delete=Y,G.prototype.get=B,G.prototype.has=X,G.prototype.set=U;function re(le){var ie=-1,me=le?le.length:0;for(this.clear();++ie<me;){var _e=le[ie];this.set(_e[0],_e[1])}}function j(){this.__data__={hash:new N,map:new(S||G),string:new N}}function W(le){return D(this,le).delete(le)}function Z(le){return D(this,le).get(le)}function J(le){return D(this,le).has(le)}function M(le,ie){return D(this,le).set(le,ie),this}re.prototype.clear=j,re.prototype.delete=W,re.prototype.get=Z,re.prototype.has=J,re.prototype.set=M;function H(le,ie){for(var me=le.length;me--;)if(pe(le[me][0],ie))return me;return-1}function q(le){if(!xe(le)||ne(le))return!1;var ie=ue(le)||d(le)?_:o;return ie.test(ce(le))}function D(le,ie){var me=le.__data__;return Q(ie)?me[typeof ie=="string"?"string":"hash"]:me.map}function V(le,ie){var me=u(le,ie);return q(me)?me:void 0}function Q(le){var ie=typeof le;return ie=="string"||ie=="number"||ie=="symbol"||ie=="boolean"?le!=="__proto__":le===null}function ne(le){return!!g&&g in le}function ce(le){if(le!=null){try{return b.call(le)}catch{}try{return le+""}catch{}}return""}function ee(le,ie){if(typeof le!="function"||ie&&typeof ie!="function")throw new TypeError(e);var me=function(){var _e=arguments,Ce=ie?ie.apply(this,_e):_e[0],je=me.cache;if(je.has(Ce))return je.get(Ce);var Pe=le.apply(this,_e);return me.cache=je.set(Ce,Pe),Pe};return me.cache=new(ee.Cache||re),me}ee.Cache=re;function pe(le,ie){return le===ie||le!==le&&ie!==ie}function ue(le){var ie=xe(le)?y.call(le):"";return ie==r||ie==n}function xe(le){var ie=typeof le;return!!le&&(ie=="object"||ie=="function")}return Yx=ee,Yx}var Lse=qse();const zse=Qi(Lse);var Oo=[],Bse=function(){return Oo.some(function(e){return e.activeTargets.length>0})},Fse=function(){return Oo.some(function(e){return e.skippedTargets.length>0})},UA="ResizeObserver loop completed with undelivered notifications.",$se=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:UA}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=UA),window.dispatchEvent(e)},dl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(dl||(dl={}));var Co=function(e){return Object.freeze(e)},Hse=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Co(this)}return e})(),LL=(function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Co(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,o=t.right,a=t.bottom,s=t.left,c=t.width,u=t.height;return{x:r,y:n,top:i,right:o,bottom:a,left:s,width:c,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),oS=function(e){return e instanceof SVGElement&&"getBBox"in e},zL=function(e){if(oS(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,o=i.offsetWidth,a=i.offsetHeight;return!(o||a||e.getClientRects().length)},GA=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},Vse=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Zs=typeof window<"u"?window:{},ru=new WeakMap,KA=/auto|scroll/,Wse=/^tb|vertical/,Use=/msie|trident/i.test(Zs.navigator&&Zs.navigator.userAgent),Zn=function(e){return parseFloat(e||"0")},ya=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new Hse((r?t:e)||0,(r?e:t)||0)},YA=Co({devicePixelContentBoxSize:ya(),borderBoxSize:ya(),contentBoxSize:ya(),contentRect:new LL(0,0,0,0)}),BL=function(e,t){if(t===void 0&&(t=!1),ru.has(e)&&!t)return ru.get(e);if(zL(e))return ru.set(e,YA),YA;var r=getComputedStyle(e),n=oS(e)&&e.ownerSVGElement&&e.getBBox(),i=!Use&&r.boxSizing==="border-box",o=Wse.test(r.writingMode||""),a=!n&&KA.test(r.overflowY||""),s=!n&&KA.test(r.overflowX||""),c=n?0:Zn(r.paddingTop),u=n?0:Zn(r.paddingRight),d=n?0:Zn(r.paddingBottom),h=n?0:Zn(r.paddingLeft),p=n?0:Zn(r.borderTopWidth),v=n?0:Zn(r.borderRightWidth),x=n?0:Zn(r.borderBottomWidth),g=n?0:Zn(r.borderLeftWidth),b=h+u,w=c+d,y=g+v,_=p+x,E=s?e.offsetHeight-_-e.clientHeight:0,S=a?e.offsetWidth-y-e.clientWidth:0,I=i?b+y:0,N=i?w+_:0,T=n?n.width:Zn(r.width)-I-S,k=n?n.height:Zn(r.height)-N-E,z=T+b+S+y,L=k+w+E+_,K=Co({devicePixelContentBoxSize:ya(Math.round(T*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:ya(z,L,o),contentBoxSize:ya(T,k,o),contentRect:new LL(h,c,T,k)});return ru.set(e,K),K},FL=function(e,t,r){var n=BL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case dl.DEVICE_PIXEL_CONTENT_BOX:return a;case dl.BORDER_BOX:return i;default:return o}},Gse=(function(){function e(t){var r=BL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Co([r.borderBoxSize]),this.contentBoxSize=Co([r.contentBoxSize]),this.devicePixelContentBoxSize=Co([r.devicePixelContentBoxSize])}return e})(),$L=function(e){if(zL(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Kse=function(){var e=1/0,t=[];Oo.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new Gse(u.target),h=$L(u.target);s.push(d),u.lastReportedSize=FL(u.target,u.observedBox),h<e&&(e=h)}),t.push(function(){a.callback.call(a.observer,s,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},XA=function(e){Oo.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&($L(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},Yse=function(){var e=0;for(XA(e);Bse();)e=Kse(),XA(e);return Fse()&&$se(),e>0},Xx,HL=[],Xse=function(){return HL.splice(0).forEach(function(e){return e()})},Zse=function(e){if(!Xx){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Xse()}).observe(r,n),Xx=function(){r.textContent="".concat(t?t--:t++)}}HL.push(e),Xx()},Jse=function(e){Zse(function(){requestAnimationFrame(e)})},_u=0,Qse=function(){return!!_u},ele=250,tle={attributes:!0,characterData:!0,childList:!0,subtree:!0},ZA=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],JA=function(e){return e===void 0&&(e=0),Date.now()+e},Zx=!1,rle=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=ele),!Zx){Zx=!0;var n=JA(t);Jse(function(){var i=!1;try{i=Yse()}finally{if(Zx=!1,t=n-JA(),!Qse())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,tle)};document.body?r():Zs.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ZA.forEach(function(r){return Zs.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),ZA.forEach(function(r){return Zs.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Xw=new rle,QA=function(e){!_u&&e>0&&Xw.start(),_u+=e,!_u&&Xw.stop()},nle=function(e){return!oS(e)&&!Vse(e)&&getComputedStyle(e).display==="inline"},ile=(function(){function e(t,r){this.target=t,this.observedBox=r||dl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=FL(this.target,this.observedBox,!0);return nle(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),ole=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),nu=new WeakMap,eD=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},iu=(function(){function e(){}return e.connect=function(t,r){var n=new ole(t,r);nu.set(t,n)},e.observe=function(t,r,n){var i=nu.get(t),o=i.observationTargets.length===0;eD(i.observationTargets,r)<0&&(o&&Oo.push(i),i.observationTargets.push(new ile(r,n&&n.box)),QA(1),Xw.schedule())},e.unobserve=function(t,r){var n=nu.get(t),i=eD(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&Oo.splice(Oo.indexOf(n),1),n.observationTargets.splice(i,1),QA(-1))},e.disconnect=function(t){var r=this,n=nu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),ale=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");iu.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!GA(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");iu.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!GA(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");iu.unobserve(this,t)},e.prototype.disconnect=function(){iu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Jx,tD;function sle(){if(tD)return Jx;tD=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Jx=e,Jx}var lle=sle();const VL=Qi(lle);var rD={},Qx,nD;function cle(){if(nD)return Qx;nD=1;var e=Pl(),t=$a(),r=Gd(),n=Qd(),i=TypeError,o="Reduce of empty array with no initial value",a=function(s){return function(c,u,d,h){var p=t(c),v=r(p),x=n(p);if(e(u),x===0&&d<2)throw new i(o);var g=s?x-1:0,b=s?-1:1;if(d<2)for(;;){if(g in v){h=v[g],g+=b;break}if(g+=b,s?g<0:x<=g)throw new i(o)}for(;s?g>=0:x>g;g+=b)g in v&&(h=u(h,v[g],g,p));return h}};return Qx={left:a(!1),right:a(!0)},Qx}var ew,iD;function ule(){if(iD)return ew;iD=1;var e=wt();return ew=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},ew}var tw,oD;function dle(){if(oD)return tw;oD=1;var e=Wt(),t=lL(),r=to(),n=function(i){return t.slice(0,i.length)===i};return tw=(function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":r(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"})(),tw}var rw,aD;function fle(){if(aD)return rw;aD=1;var e=dle();return rw=e==="NODE",rw}var sD;function hle(){if(sD)return rD;sD=1;var e=ro(),t=cle().left,r=ule(),n=W_(),i=fle(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var u=arguments.length;return t(this,c,u,u>1?arguments[1]:void 0)}}),rD}hle();var lD={},nw,cD;function WL(){if(cD)return nw;cD=1;var e=In();return nw=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},nw}var iw,uD;function ple(){if(uD)return iw;uD=1;var e=wt(),t=Wt(),r=t.RegExp,n=e(function(){var a=r("a","y");return a.lastIndex=2,a.exec("abcd")!==null}),i=n||e(function(){return!r("a","y").sticky}),o=n||e(function(){var a=r("^r","gy");return a.lastIndex=2,a.exec("str")!==null});return iw={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},iw}var ow,dD;function vle(){if(dD)return ow;dD=1;var e=wt(),t=Wt(),r=t.RegExp;return ow=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
112
+ `)&&n.flags==="s")}),ow}var aw,fD;function gle(){if(fD)return aw;fD=1;var e=wt(),t=Wt(),r=t.RegExp;return aw=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),aw}var sw,hD;function aS(){if(hD)return sw;hD=1;var e=Ur(),t=bt(),r=jo(),n=WL(),i=ple(),o=Y_(),a=tf(),s=Ha().get,c=vle(),u=gle(),d=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),x=t("".indexOf),g=t("".replace),b=t("".slice),w=(function(){var S=/a/,I=/b*/g;return e(h,S,"a"),e(h,I,"a"),S.lastIndex!==0||I.lastIndex!==0})(),y=i.BROKEN_CARET,_=/()??/.exec("")[1]!==void 0,E=w||_||y||c||u;return E&&(p=function(I){var N=this,T=s(N),k=r(I),z=T.raw,L,K,G,A,Y,B,X;if(z)return z.lastIndex=N.lastIndex,L=e(p,z,k),N.lastIndex=z.lastIndex,L;var U=T.groups,re=y&&N.sticky,j=e(n,N),W=N.source,Z=0,J=k;if(re&&(j=g(j,"y",""),x(j,"g")===-1&&(j+="g"),J=b(k,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&v(k,N.lastIndex-1)!==`
113
+ `)&&(W="(?: "+W+")",J=" "+J,Z++),K=new RegExp("^(?:"+W+")",j)),_&&(K=new RegExp("^"+W+"$(?!\\s)",j)),w&&(G=N.lastIndex),A=e(h,re?K:N,J),re?A?(A.input=b(A.input,Z),A[0]=b(A[0],Z),A.index=N.lastIndex,N.lastIndex+=A[0].length):N.lastIndex=0:w&&A&&(N.lastIndex=N.global?A.index+A[0].length:G),_&&A&&A.length>1&&e(d,A[0],K,function(){for(Y=1;Y<arguments.length-2;Y++)arguments[Y]===void 0&&(A[Y]=void 0)}),A&&U)for(A.groups=B=a(null),Y=0;Y<U.length;Y++)X=U[Y],B[X[0]]=A[X[1]];return A}),sw=p,sw}var pD;function UL(){if(pD)return lD;pD=1;var e=ro(),t=aS();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),lD}UL();var vD={},lw,gD;function GL(){if(gD)return lw;gD=1,UL();var e=Ur(),t=Do(),r=aS(),n=wt(),i=Nr(),o=Ml(),a=i("species"),s=RegExp.prototype;return lw=function(c,u,d,h){var p=i(c),v=!n(function(){var w={};return w[p]=function(){return 7},""[c](w)!==7}),x=v&&!n(function(){var w=!1,y=/a/;return c==="split"&&(y={},y.constructor={},y.constructor[a]=function(){return y},y.flags="",y[p]=/./[p]),y.exec=function(){return w=!0,null},y[p](""),!w});if(!v||!x||d){var g=/./[p],b=u(p,""[c],function(w,y,_,E,S){var I=y.exec;return I===r||I===s.exec?v&&!S?{done:!0,value:e(g,y,_,E)}:{done:!0,value:e(w,_,y,E)}:{done:!1}});t(String.prototype,c,b[0]),t(s,p,b[1])}h&&o(s[p],"sham",!0)},lw}var cw,mD;function KL(){if(mD)return cw;mD=1;var e=kL().charAt;return cw=function(t,r,n){return r+(n?e(t,r).length:1)},cw}var uw,bD;function mle(){if(bD)return uw;bD=1;var e=Wt(),t=wt(),r=e.RegExp,n=!t(function(){var i=!0;try{r(".","d")}catch{i=!1}var o={},a="",s=i?"dgimsy":"gimsy",c=function(p,v){Object.defineProperty(o,p,{get:function(){return a+=v,!0}})},u={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(u.hasIndices="d");for(var d in u)c(d,u[d]);var h=Object.getOwnPropertyDescriptor(r.prototype,"flags").get.call(o);return h!==s||a!==s});return uw={correct:n},uw}var dw,yD;function YL(){if(yD)return dw;yD=1;var e=Ur(),t=Cn(),r=Yd(),n=mle(),i=WL(),o=RegExp.prototype;return dw=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},dw}var fw,xD;function XL(){if(xD)return fw;xD=1;var e=Ur(),t=In(),r=er(),n=to(),i=aS(),o=TypeError;return fw=function(a,s){var c=a.exec;if(r(c)){var u=e(c,a,s);return u!==null&&t(u),u}if(n(a)==="RegExp")return e(i,a,s);throw new o("RegExp#exec called on incompatible receiver")},fw}var wD;function ble(){if(wD)return vD;wD=1;var e=Ur(),t=bt(),r=GL(),n=In(),i=hr(),o=eS(),a=jo(),s=Ao(),c=kl(),u=KL(),d=YL(),h=XL(),p=t("".indexOf);return r("match",function(v,x,g){return[function(w){var y=s(this),_=i(w)?c(w,v):void 0;return _?e(_,w,y):new RegExp(w)[v](a(y))},function(b){var w=n(this),y=a(b),_=g(x,w,y);if(_.done)return _.value;var E=a(d(w));if(p(E,"g")===-1)return h(w,y);var S=p(E,"u")!==-1;w.lastIndex=0;for(var I=[],N=0,T;(T=h(w,y))!==null;){var k=a(T[0]);I[N]=k,k===""&&(w.lastIndex=u(y,o(w.lastIndex),S)),N++}return N===0?null:I}]}),vD}ble();var _D={},hw,SD;function yle(){if(SD)return hw;SD=1;var e=bL(),t=Ci();return hw=function(r,n,i){return i.get&&e(i.get,n,{getter:!0}),i.set&&e(i.set,n,{setter:!0}),t.f(r,n,i)},hw}var ED;function xle(){if(ED)return _D;ED=1;var e=Vn(),t=J_().EXISTS,r=bt(),n=yle(),i=Function.prototype,o=r(i.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=r(a.exec),c="name";return e&&!t&&n(i,c,{configurable:!0,get:function(){try{return s(a,o(this))[1]}catch{return""}}}),_D}xle();var OD={},pw,CD;function wle(){if(CD)return pw;CD=1;var e=Ud(),t=Function.prototype,r=t.apply,n=t.call;return pw=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),pw}var vw,ID;function _le(){if(ID)return vw;ID=1;var e=bt(),t=$a(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return vw=function(c,u,d,h,p,v){var x=d+c.length,g=h.length,b=s;return p!==void 0&&(p=t(p),b=a),i(v,b,function(w,y){var _;switch(n(y,0)){case"$":return"$";case"&":return c;case"`":return o(u,0,d);case"'":return o(u,x);case"<":_=p[o(y,1,-1)];break;default:var E=+y;if(E===0)return w;if(E>g){var S=r(E/10);return S===0?w:S<=g?h[S-1]===void 0?n(y,1):h[S-1]+n(y,1):w}_=h[E-1]}return _===void 0?"":_})},vw}var RD;function Sle(){if(RD)return OD;RD=1;var e=wle(),t=Ur(),r=bt(),n=GL(),i=wt(),o=In(),a=er(),s=hr(),c=Jd(),u=eS(),d=jo(),h=Ao(),p=KL(),v=kl(),x=_le(),g=YL(),b=XL(),w=Nr(),y=w("replace"),_=Math.max,E=Math.min,S=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),k=function(G){return G===void 0?G:String(G)},z=(function(){return"a".replace(/./,"$0")==="$0"})(),L=(function(){return/./[y]?/./[y]("a","$0")==="":!1})(),K=!i(function(){var G=/./;return G.exec=function(){var A=[];return A.groups={a:"7"},A},"".replace(G,"$<a>")!=="7"});return n("replace",function(G,A,Y){var B=L?"$":"$0";return[function(U,re){var j=h(this),W=s(U)?v(U,y):void 0;return W?t(W,U,j,re):t(A,d(j),U,re)},function(X,U){var re=o(this),j=d(X);if(typeof U=="string"&&N(U,B)===-1&&N(U,"$<")===-1){var W=Y(A,re,j,U);if(W.done)return W.value}var Z=a(U);Z||(U=d(U));var J=d(g(re)),M=N(J,"g")!==-1,H;M&&(H=N(J,"u")!==-1,re.lastIndex=0);for(var q=[],D;D=b(re,j),!(D===null||(I(q,D),!M));){var V=d(D[0]);V===""&&(re.lastIndex=p(j,u(re.lastIndex),H))}for(var Q="",ne=0,ce=0;ce<q.length;ce++){D=q[ce];for(var ee=d(D[0]),pe=_(E(c(D.index),j.length),0),ue=[],xe,le=1;le<D.length;le++)I(ue,k(D[le]));var ie=D.groups;if(Z){var me=S([ee],ue,pe,j);ie!==void 0&&I(me,ie),xe=d(e(U,void 0,me))}else xe=x(ee,j,pe,ue,ie,U);pe>=ne&&(Q+=T(j,ne,pe)+xe,ne=pe+ee.length)}return Q+T(j,ne)}]},!K||!z||L),OD}Sle();function Vi(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Su(e){return!e||!e.ownerDocument?document:e.ownerDocument}var ua=null,ND=null;VL&&window.addEventListener("resize",function(){ND!==window.devicePixelRatio&&(ND=window.devicePixelRatio,ua=null)});function TD(e){if(ua===null){var t=Su(e);if(typeof t>"u")return ua=0,ua;var r=t.body,n=t.createElement("div");n.classList.add("simplebar-hide-scrollbar"),r.appendChild(n);var i=n.getBoundingClientRect().right;r.removeChild(n),ua=i}return ua}var rd=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=Vi(i.el);i.scrollXTicking||(o.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(o.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(o){i.mouseX=o.clientX,i.mouseY=o.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(o){var a,s;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(a=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(s=i.isWithinBounds(i.axis.y.track.rect)),(a||s)&&(o.preventDefault(),o.stopPropagation(),o.type==="mousedown"&&(a&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(o,"x"):i.onTrackClick(o,"x")),s&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(o,"y"):i.onTrackClick(o,"y"))))},this.drag=function(o){var a,s=i.axis[i.draggedAxis].track,c=s.rect[i.axis[i.draggedAxis].sizeAttr],u=i.axis[i.draggedAxis].scrollbar,d=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],h=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);o.preventDefault(),o.stopPropagation(),i.draggedAxis==="y"?a=o.pageY:a=o.pageX;var p=a-s.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset,v=p/(c-u.size),x=v*(d-h);i.draggedAxis==="x"&&(x=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?x-(c+u.size):x,x=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-x:x),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=x},this.onEndDrag=function(o){var a=Su(i.el),s=Vi(i.el);o.preventDefault(),o.stopPropagation(),i.el.classList.remove(i.classNames.dragging),a.removeEventListener("mousemove",i.drag,!0),a.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=s.setTimeout(function(){a.removeEventListener("click",i.preventClick,!0),a.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=r,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,n),this.classNames=Object.assign({},e.defaultOptions.classNames,this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!e.instances.has(this.el)&&(this.recalculate=$A(this.recalculate.bind(this),64),this.onMouseMove=$A(this.onMouseMove.bind(this),64),this.hideScrollbars=VA(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=VA(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=zse(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var n=document.createElement("div");n.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var i=n.firstElementChild;document.body.appendChild(i);var o=i.firstElementChild;i.scrollLeft=0;var a=e.getOffset(i),s=e.getOffset(o);i.scrollLeft=999;var c=e.getOffset(o);return{isRtlScrollingInverted:a.left!==s.left&&s.left-c.left!==0,isRtlScrollbarInverted:a.left!==s.left}},e.getOffset=function(n){var i=n.getBoundingClientRect(),o=Su(n),a=Vi(n);return{top:i.top+(a.pageYOffset||o.documentElement.scrollTop),left:i.left+(a.pageXOffset||o.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),VL&&(this.initDOM(),this.setAccessibilityAttributes(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var n=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(n.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var i=document.createElement("div"),o=document.createElement("div");i.classList.add(this.classNames.track),o.classList.add(this.classNames.scrollbar),i.appendChild(o),this.axis.x.track.el=i.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=i.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.setAccessibilityAttributes=function(){var n=this.options.ariaLabel||"scrollable content";this.contentWrapperEl.setAttribute("tabindex","0"),this.contentWrapperEl.setAttribute("role","region"),this.contentWrapperEl.setAttribute("aria-label",n)},t.initListeners=function(){var n=this,i=Vi(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(c){n.el.addEventListener(c,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),i.addEventListener("resize",this.onWindowResize);var o=!1,a=null,s=i.ResizeObserver||ale;this.resizeObserver=new s(function(){!o||a!==null||(a=i.requestAnimationFrame(function(){n.recalculate(),a=null}))}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),i.requestAnimationFrame(function(){o=!0}),this.mutationObserver=new i.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var n=Vi(this.el);this.elStyles=n.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var i=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,s=this.contentWrapperEl.offsetWidth,c=this.elStyles.overflowX,u=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var d=this.contentEl.scrollHeight,h=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=o?a+"px":"auto",this.placeholderEl.style.height=d+"px";var p=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=h>a,this.axis.y.isOverflowing=d>p,this.axis.x.isOverflowing=c==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=u==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var v=this.axis.x.isOverflowing?this.scrollbarWidth:0,x=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>s-x,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&d>p-v,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(n){if(n===void 0&&(n="y"),!this.axis[n].isOverflowing)return 0;var i=this.contentEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a,s=o/i;return a=Math.max(~~(s*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.positionScrollbar=function(n){if(n===void 0&&(n="y"),!!this.axis[n].isOverflowing){var i=this.contentWrapperEl[this.axis[n].scrollSizeAttr],o=this.axis[n].track.el[this.axis[n].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[n].sizeAttr],10),s=this.axis[n].scrollbar,c=this.contentWrapperEl[this.axis[n].scrollOffsetAttr];c=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c;var u=c/(i-a),d=~~((o-s.size)*u);d=n==="x"&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?d+(o-s.size):d,s.el.style.transform=n==="x"?"translate3d("+d+"px, 0, 0)":"translate3d(0, "+d+"px, 0)"}},t.toggleTrackVisibility=function(n){n===void 0&&(n="y");var i=this.axis[n].track.el,o=this.axis[n].scrollbar.el;this.axis[n].isOverflowing||this.axis[n].forceVisible?(i.style.visibility="visible",this.contentWrapperEl.style[this.axis[n].overflowAttr]="scroll"):(i.style.visibility="hidden",this.contentWrapperEl.style[this.axis[n].overflowAttr]="hidden"),this.axis[n].isOverflowing?o.style.display="block":o.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.rect=this.axis[n].track.el.getBoundingClientRect(),this.axis[n].scrollbar.rect=this.axis[n].scrollbar.el.getBoundingClientRect();var i=this.isWithinBounds(this.axis[n].scrollbar.rect);i?this.axis[n].scrollbar.el.classList.add(this.classNames.hover):this.axis[n].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[n].track.rect)?(this.showScrollbar(n),this.axis[n].track.el.classList.add(this.classNames.hover)):this.axis[n].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(n){n===void 0&&(n="y"),this.axis[n].track.el.classList.remove(this.classNames.hover),this.axis[n].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(n){n===void 0&&(n="y");var i=this.axis[n].scrollbar.el;this.axis[n].isVisible||(i.classList.add(this.classNames.visible),this.axis[n].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(n,i){i===void 0&&(i="y");var o=Su(this.el),a=Vi(this.el),s=this.axis[i].scrollbar,c=i==="y"?n.pageY:n.pageX;this.axis[i].dragOffset=c-s.rect[this.axis[i].offsetAttr],this.draggedAxis=i,this.el.classList.add(this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(n,i){var o=this;if(i===void 0&&(i="y"),!!this.options.clickOnTrack){var a=Vi(this.el);this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var s=this.axis[i].scrollbar,c=s.rect[this.axis[i].offsetAttr],u=parseInt(this.elStyles[this.axis[i].sizeAttr],10),d=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],h=i==="y"?this.mouseY-c:this.mouseX-c,p=h<0?-1:1,v=p===-1?d-u:d+u,x=function g(){if(p===-1){if(d>v){var b;d-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((b={},b[o.axis[i].offsetAttr]=d,b)),a.requestAnimationFrame(g)}}else if(d<v){var w;d+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((w={},w[o.axis[i].offsetAttr]=d,w)),a.requestAnimationFrame(g)}};x()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:TD(this.el)}catch{return TD(this.el)}},t.removeListeners=function(){var n=this,i=Vi(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(o){n.el.removeEventListener(o,n.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),i.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(n){return this.mouseX>=n.left&&this.mouseX<=n.left+n.width&&this.mouseY>=n.top&&this.mouseY<=n.top+n.height},t.findChild=function(n,i){var o=n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;return Array.prototype.filter.call(n.children,function(a){return o.call(a,i)})[0]},e})();rd.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};rd.instances=new WeakMap;function PD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ou(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PD(Object(r),!0).forEach(function(n){Ele(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ele(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nd(){return nd=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nd.apply(this,arguments)}function Ole(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Cle(e,t){if(e==null)return{};var r=Ole(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ile=["children","scrollableNodeProps","tag"],Rle=function(t){var r=Array.prototype.reduce.call(t,function(n,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var a=o[1].replace(/\W+(.)/g,function(s,c){return c.toUpperCase()});switch(i.value){case"true":n[a]=!0;break;case"false":n[a]=!1;break;case void 0:n[a]=!0;break;default:n[a]=i.value}}return n},{});return r},nf=C.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=e.tag,a=o===void 0?"div":o,s=Cle(e,Ile),c=a,u,d=C.useRef(),h=C.useRef(),p=C.useRef(),v={},x={},g=[];return Object.keys(s).forEach(function(b){Object.prototype.hasOwnProperty.call(rd.defaultOptions,b)?v[b]=s[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?g.push({name:b,value:s[b]}):x[b]=s[b]}),g.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
70
114
  'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
71
- `),T.useEffect(function(){return f=i.ref||f,h.current&&(d=new cc(h.current,Su(Su(Su(Su({},YJ(y)),v),f&&{scrollableNode:f.current}),p.current&&{contentNode:p.current})),typeof t=="function"?t(d):t&&(t.current=d)),function(){d.unMount(),d=null,typeof t=="function"&&t(null)}},[]),T.createElement(l,lc({ref:h,"data-simplebar":!0},m),T.createElement("div",{className:"simplebar-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},T.createElement("div",{className:"simplebar-height-auto-observer"})),T.createElement("div",{className:"simplebar-mask"},T.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:f,contentNodeRef:p}):T.createElement("div",lc({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),T.createElement("div",{className:"simplebar-content"},r)))),T.createElement("div",{className:"simplebar-placeholder"})),T.createElement("div",{className:"simplebar-track simplebar-horizontal"},T.createElement("div",{className:"simplebar-scrollbar"})),T.createElement("div",{className:"simplebar-track simplebar-vertical"},T.createElement("div",{className:"simplebar-scrollbar"})))});al.displayName="SimpleBar";al.propTypes={children:le.oneOfType([le.node,le.func]),scrollableNodeProps:le.object,tag:le.string};const fc=Gx,dc=Kx,Xk=e=>{switch(e){case J.EPermissionType.DATACLASS:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case J.EPermissionType.SINGLETON:return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case J.EPermissionType.DATASTORE:return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case J.EPermissionType.ATTRIBUTE:return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case J.EPermissionType.METHOD:return C.jsx(ye.FdCode,{className:"h-6 w-6"});case J.EPermissionType.SINGLETON_METHOD:return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});case J.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case J.ESubPermissionType.ENTITY_METHOD:return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case J.ESubPermissionType.DS_METHOD:return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case J.ESubPermissionType.DATACLASS_METHOD:return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},HM=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})});function XJ(e){const{isIndeterminate:t,isChecked:r,...n}=e,i=t?"M22.5 12C22.5 17.799 17.799 22.5 12 22.5C6.20101 22.5 1.5 17.799 1.5 12C1.5 6.20101 6.20101 1.5 12 1.5C17.799 1.5 22.5 6.20101 22.5 12Z":"M0,12a1.5,1.5,0,0,0,1.5,1.5h8.75a.25.25,0,0,1,.25.25V22.5a1.5,1.5,0,0,0,3,0V13.75a.25.25,0,0,1,.25-.25H22.5a1.5,1.5,0,0,0,0-3H13.75a.25.25,0,0,1-.25-.25V1.5a1.5,1.5,0,0,0-3,0v8.75a.25.25,0,0,1-.25.25H1.5A1.5,1.5,0,0,0,0,12Z";return C.jsx(Te.BaseCheckboxIcon,{viewBox:"0 0 24 24",...n,children:C.jsx("path",{fill:t?"transparent":"currentColor",d:i,stroke:t?"currentColor":void 0,strokeWidth:t?3:void 0})})}function ZJ(e){return C.jsx(Te.Checkbox,{icon:C.jsx(XJ,{}),...e})}const Qi=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,showIncluded:o,privileges:a,exists:u})=>{const l=e.find(d=>d.name===t);return l?C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[l.checked||l.from.length===0||t==="promote"?C.jsx(Te.Checkbox,{isChecked:l.checked,onChange:()=>r&&r(l),isInvalid:u===!1}):C.jsx(ZJ,{isIndeterminate:o&&l.from.length>0,onChange:()=>r&&r(l),isInvalid:u===!1}),C.jsxs("div",{className:"absolute left-5 top-0 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(l.checked&&(l.info||l.from.length>0)||!l.checked&&l.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(fc,{openDelay:0,closeDelay:0,children:[C.jsx(dc,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsxs("div",{className:"space-y-1 px-2",children:[l.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:l.from.map(d=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[d].id),children:a[d].privilege},d))})]})]}):null,l.info&&C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",l.info]})]})})})]})}),(l.checked||l.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&C.jsxs(fc,{openDelay:0,closeDelay:0,children:[C.jsx(dc,{children:C.jsx(ye.FdCrown,{className:"h-3 w-3 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsxs("span",{className:"mr-1",children:["Function is promoted with:"," "]}),i==null?void 0:i.map(d=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[d].id),children:a[d].privilege},d))]})]})})})})]})]})]}):null},JJ=({privilegeId:e,privileges:t})=>{const r=J.useAppSelector(J.selectCatalogMethods),n=J.useAppSelector(J.selectDataclasses),i=J.useAppSelector(J.selectSingletons),o=J.useAppDispatch(),[a,u]=T.useState([]),[l,d]=T.useState("");T.useEffect(()=>{d("")},[e]);const{isOpen:f,getMenuProps:h,getInputProps:p,getComboboxProps:v,highlightedIndex:m,getItemProps:y,selectedItem:x,openMenu:b}=io({onInputValueChange(){u([])},items:[],itemToString(_){return _?_.applyTo:""},defaultHighlightedIndex:0,stateReducer:(_,S)=>{const{changes:R,type:I}=S;switch(I){case io.stateChangeTypes.InputKeyDownArrowDown:return{...R,isOpen:!0,highlightedIndex:_.highlightedIndex<=a.length?_.highlightedIndex+1:0};case io.stateChangeTypes.InputKeyDownArrowUp:return{...R,isOpen:!0,highlightedIndex:_.highlightedIndex>=0?_.highlightedIndex-1:a.length};case io.stateChangeTypes.InputKeyDownEnter:{const N=a[_.highlightedIndex];if(!N)return R;const A=J.addPermission(e,N,t);return o(J.updatePrivileges(A)),{...R,isOpen:!0,highlightedIndex:0}}}return R}});T.useEffect(()=>{const _=J.getInheritedResources(e,t).map(({resource:R,type:I,subType:N})=>({applyTo:R,type:I,subType:N})),S=qx(l.toLowerCase(),r,Object.values(n),Object.values(i));u(S.filter(({applyTo:R,type:I,subType:N})=>!uc.find(_,{applyTo:R,type:I,subType:N})))},[l,e,t,r,n,i]);const w=h({},{suppressRefError:!0}),E=T.useRef(null);return T.useEffect(()=>{f&&E.current&&E.current.focus()},[f]),C.jsxs("div",{className:"relative w-56 text-white group",...v(),children:[C.jsx("div",{...v(),children:C.jsx("input",{...p({},{suppressRefError:!0}),ref:E,type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-2 pr-5 text-xs border-grey-500 focus:outline-none focus:ring-1 focus:ring-white focus:rounded-b-none focus:ring-inset",placeholder:"Create a permission",value:l,onChange:({target:{value:_}})=>d(_),onFocus:()=>{b()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(ye.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:_=>_.preventDefault(),onClick:()=>b()})}),f&&C.jsx("ul",{...w,tabIndex:0,className:"absolute max-h-80 inset-x-0 top-full overflow-auto rounded-md border border-grey-50 bg-grey-900 p-0 text-grey-50 shadow-md group-focus-within:rounded-t-none group-focus-within:border-t-0",children:a.map((_,S)=>C.jsxs("li",{className:We(x===_&&"font-bold","flex min-w-fit cursor-pointer items-center space-x-2 px-3 py-2 text-xs shadow-sm",{"bg-primary-hover":m===S,"font-bold":x===_}),...y({item:_,index:S}),onClick:()=>{const R=J.addPermission(e,_,t);o(J.updatePrivileges(R))},children:[Xk(_.type),C.jsx("span",{children:_.applyTo})]},`${_.applyTo}-${S}`))})]})};function QJ(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,i)=>{const[o]=i.resource.split("."),a=n.find(u=>u.prefix===o.toLowerCase());return a?(a.resources.push(i),n):[...n,{prefix:o.toLowerCase(),type:i.type,resources:[i]}]},[]);return r.sort((n,i)=>n.prefix==="ds"?-1:i.prefix==="ds"||n.prefix>i.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((i,o)=>{const a=t.indexOf(i.type),u=t.indexOf(o.type);return a!==u?a-u:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const eQ=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=T.useState(null),[a,u]=T.useState(null),{styles:l,attributes:d}=pc(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),[f,h]=T.useState([]),[p,v]=T.useState(""),m=J.useAppDispatch(),{id:y}=e,x=T.useMemo(()=>J.getInheritedResources(y,n),[y,n[y].includes,n[y].resources]),b=T.useMemo(()=>J.getPromotions(y,n),[n[y]]),w={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},E=Object.values(w).flat(),_=($,k)=>k.length>0&&k.every(z=>$.includes(z)),S=($,k)=>k.some(z=>$.includes(z)),R=($,k)=>Array.from(new Set([...$,...k])),I=($,k)=>$.filter(z=>!k.includes(z)),N=$=>{h([...$])},A=$=>{h(k=>_(k,$)?I(k,$):R(k,$))},L=$=>{A(w[$])},B=_(f,E),U=f.length>0&&!B,j=_(f,w.functions),D=!j&&S(f,w.functions),G=()=>N(E),F=()=>N([]),X=async $=>{const{confirmed:k}=await m(J.openModal({title:"Delete Permission",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Permission?",icon:"FdWarningDanger"})).unwrap();if(k){const z=J.removePermission(e.id,$,n);m(J.updatePrivileges(z))}},Z=async()=>{const{confirmed:$}=await m(J.openModal({title:"Reset Permissions",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"})).unwrap();if($){const k=J.resetResources(e.id,n);m(J.updatePrivileges(k))}},W=(f.length>0?x.filter($=>f.includes($.type)):x).filter(({resource:$})=>p?new RegExp(uc.escapeRegExp(p),"i").test($):!0),ee=QJ(W),oe=ee.filter($=>{const k=$.permissions.every(z=>!z.checked)&&$.permissions.some(z=>z.from.length>0);return r||!k}),ae=($,k)=>{const z=J.togglePermission(e.id,$,k,n);m(J.updatePrivileges(z))},H=T.useMemo(()=>oe.some($=>$.exists===!1),[oe]),K=async()=>{const{confirmed:$}=await m(J.openModal({title:"Delete Privilege",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove these permissions?",views:{tips:[{type:"warning",message:"This action will remove all permissions that don't exist in the catalog for all privileges"}]},icon:"FdWarningDanger"})).unwrap(),k=Object.entries(n).map(([z,re])=>{const ie=re.resources.filter(se=>!se.exists);return{[z]:ie.map(se=>({applyTo:se.resource,type:se.type}))}}).reduce((z,re)=>({...z,...re}),{});if($){const z=J.removeMultiplePermissions(k,n);m(J.updatePrivileges(z))}};return C.jsxs(al,{className:"z-20 h-full flex-1 overflow-auto bg-grey-800 p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full border-collapse",children:[C.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(ye.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(_r.Popover,{className:"flex items-center",children:({open:$})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:o,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),$&&C.jsx(Gc,{children:C.jsxs(_r.Popover.Panel,{ref:u,style:l.popper,...d.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsxs("label",{className:"mb-2 flex cursor-pointer items-center",children:[C.jsx(Te.Checkbox,{isChecked:B,isIndeterminate:U,onChange:()=>B?F():G()}),C.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:_(f,w.dataclass),onChange:()=>L("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:_(f,w.singleton),onChange:()=>L("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:j,isIndeterminate:D,onChange:()=>L("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:_(f,w.attribute),onChange:()=>L("attribute"),label:"Attribute"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search available permissions",value:p,onChange:$=>v($.target.value)})]}),C.jsx(JJ,{privilegeId:y,privileges:n}),C.jsx("div",{children:C.jsxs(fc,{openDelay:0,closeDelay:0,children:[C.jsx(dc,{children:C.jsx("button",{className:"flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover",onClick:Z,children:C.jsx(ye.FdReload,{})})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Resetting the privilege will remove all configured ressources"})]})})]})}),C.jsxs(fc,{openDelay:0,closeDelay:0,children:[C.jsx(dc,{children:C.jsx("button",{className:We("flex h-6 items-center space-x-1 rounded-md px-2 text-sm text-grey-50 hover:bg-primary-hover disabled:opacity-50 disabled:hover:bg-primary-dark"),onClick:K,disabled:!H,children:C.jsx(ye.FdClean,{className:"h-4 w-4"})})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"mb-1 flex max-w-xs items-center gap-x-1 rounded bg-primary-light px-2 py-2 text-s font-semibold text-primary-darker",children:[C.jsx(ye.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"Delete all the non existing resources from privileges"})]})})]})]})}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Read"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Promote"})]})}),oe.length?C.jsx("tbody",{children:oe.map(($,k)=>{const z=$.permissions.some(re=>re.from.length>0);return C.jsxs("tr",{className:We("group even:bg-grey-600 hover:bg-grey-300",{"opacity-60":$.exists===!1}),children:[C.jsxs("td",{className:We("group flex items-center gap-3 py-2 text-xs",$.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[Xk($.type),$.resource,C.jsx(Te.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:z,container:Bt(),children:C.jsx("button",{onClick:()=>{z?Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:ye.FdInfoBold}):X({applyTo:$.resource,type:$.type})},className:We("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",z?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:C.jsx(ye.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Qi,{permissions:$.permissions,showIncluded:r,label:"read",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Qi,{permissions:$.permissions,showIncluded:r,label:"create",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Qi,{permissions:$.permissions,showIncluded:r,label:"update",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Qi,{permissions:$.permissions,showIncluded:r,label:"drop",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(Qi,{promoted:b[$.resource],permissions:$.permissions,showIncluded:r,label:"execute",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(Qi,{permissions:$.permissions,showIncluded:r,label:"promote",onToggle:re=>ae($,re),onSelect:t,privileges:n,exists:$.exists})})]},`${$.resource}-${k}`)})}):null]}),!ee.length&&p?C.jsx(HM,{children:"The Permission you're looking for can't be found "}):null,!ee.length&&!p?C.jsxs(HM,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},tQ=({onCreate:e})=>{const t=J.useAppSelector(J.selectPrivileges),r=J.useAppDispatch(),[n,i]=T.useState(null),[o,a]=T.useState(null),[u,l]=T.useState(""),[d,f]=T.useState(null),{styles:h,attributes:p}=pc(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});return T.useEffect(()=>{l(""),f(null)},[o]),C.jsx(_r.Popover,{children:({open:v,close:m})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:i,children:C.jsx("span",{children:C.jsx(ye.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Gc,{children:C.jsxs(_r.Popover.Panel,{ref:a,style:h.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:u,onChange:y=>l(y.target.value),onKeyDown:y=>{if(y.key==="Enter"){f(null);try{const x=J.create(u,t),b=r(J.updatePrivileges(x)),w=Object.values(b.payload).find(E=>E.privilege===u);w&&(e(w),m())}catch(x){f(x.message)}}},type:"text",className:We("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!d,"border-red-400":d})})]}),d&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:d})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{f(null);try{const y=J.create(u,t),x=r(J.updatePrivileges(y)),b=Object.values(x.payload).find(w=>w.privilege===u);b&&e(b),m()}catch(y){f(y.message)}},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>m(),children:"Cancel"})]})]})})]})})},rQ=()=>{const e=J.useAppSelector(J.selectCatalog),t=J.useAppSelector(J.selectPrivileges),r=T.useMemo(()=>{if(e===null)return t;const l=B2(t,Object.values((e==null?void 0:e.dataClasses)??{}));return F2(l,e)},[t,e]),[n,i]=T.useState(null),o=T.useMemo(()=>Object.keys(r),[r]);T.useEffect(()=>{n&&r[n.id]||!o.length||i(r[o[0]])},[r]),T.useEffect(()=>{o.length<2&&u(!0)},[o.length]);const[a,u]=T.useState(!0);return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(tQ,{onCreate:l=>{i(l)}})]}),C.jsx(yX,{privileges:r,selectedPrivilege:n,selectPrivilege:l=>{i(l)}})]}),n&&r[n.id]?C.jsxs("div",{className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px] border-grey-900 bg-grey-800",children:[C.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[n.privilege!=="guest"?C.jsx(w9,{privileges:r,selectedPrivilege:n,onSelect:l=>i(t[l]),setShowIncluded:u,showIncluded:a}):null,C.jsx(eQ,{privileges:r,selectedPrivilege:n,onSelect:l=>i(t[l]),showIncluded:a})]}),C.jsx(nQ,{privileges:r,selectedPrivilege:n,setSelectedPrivilege:i})]}):C.jsx(SD,{tab:"Privilege"})]})},nQ=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=T.useState(!1);return C.jsx(Te.Panel,{path:Te.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:C.jsx("div",{className:"h-full w-full px-3 pb-3",children:C.jsx("div",{className:"h-full w-full rounded bg-grey-900",children:C.jsx(y9,{dict:e,data:J.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})};var _b={},ua={},Ou={},UM;function Zk(){if(UM)return Ou;UM=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return Ou}var eo={},ca={},la={},VM;function iQ(){if(VM)return la;VM=1,Object.defineProperty(la,"__esModule",{value:!0}),la.default=void 0;var e=/^(?:[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;return la.default=e,la}var WM;function sl(){if(WM)return ca;WM=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.default=void 0;var e=t(iQ());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){return typeof i=="string"&&e.default.test(i)}var n=r;return ca.default=n,ca}var GM;function ul(){if(GM)return eo;GM=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.default=void 0,eo.unsafeStringify=n;var e=t(sl());function t(a){return a&&a.__esModule?a:{default:a}}const r=[];for(let a=0;a<256;++a)r.push((a+256).toString(16).slice(1));function n(a,u=0){return r[a[u+0]]+r[a[u+1]]+r[a[u+2]]+r[a[u+3]]+"-"+r[a[u+4]]+r[a[u+5]]+"-"+r[a[u+6]]+r[a[u+7]]+"-"+r[a[u+8]]+r[a[u+9]]+"-"+r[a[u+10]]+r[a[u+11]]+r[a[u+12]]+r[a[u+13]]+r[a[u+14]]+r[a[u+15]]}function i(a,u=0){const l=n(a,u);if(!(0,e.default)(l))throw TypeError("Stringified UUID is invalid");return l}var o=i;return eo.default=o,eo}var KM;function oQ(){if(KM)return ua;KM=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=void 0;var e=r(Zk()),t=ul();function r(d){return d&&d.__esModule?d:{default:d}}let n,i,o=0,a=0;function u(d,f,h){let p=f&&h||0;const v=f||new Array(16);d=d||{};let m=d.node||n,y=d.clockseq!==void 0?d.clockseq:i;if(m==null||y==null){const S=d.random||(d.rng||e.default)();m==null&&(m=n=[S[0]|1,S[1],S[2],S[3],S[4],S[5]]),y==null&&(y=i=(S[6]<<8|S[7])&16383)}let x=d.msecs!==void 0?d.msecs:Date.now(),b=d.nsecs!==void 0?d.nsecs:a+1;const w=x-o+(b-a)/1e4;if(w<0&&d.clockseq===void 0&&(y=y+1&16383),(w<0||x>o)&&d.nsecs===void 0&&(b=0),b>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=x,a=b,i=y,x+=122192928e5;const E=((x&268435455)*1e4+b)%4294967296;v[p++]=E>>>24&255,v[p++]=E>>>16&255,v[p++]=E>>>8&255,v[p++]=E&255;const _=x/4294967296*1e4&268435455;v[p++]=_>>>8&255,v[p++]=_&255,v[p++]=_>>>24&15|16,v[p++]=_>>>16&255,v[p++]=y>>>8|128,v[p++]=y&255;for(let S=0;S<6;++S)v[p+S]=m[S];return f||(0,t.unsafeStringify)(v)}var l=u;return ua.default=l,ua}var fa={},Ln={},da={},YM;function Jk(){if(YM)return da;YM=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;var e=t(sl());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");let o;const a=new Uint8Array(16);return a[0]=(o=parseInt(i.slice(0,8),16))>>>24,a[1]=o>>>16&255,a[2]=o>>>8&255,a[3]=o&255,a[4]=(o=parseInt(i.slice(9,13),16))>>>8,a[5]=o&255,a[6]=(o=parseInt(i.slice(14,18),16))>>>8,a[7]=o&255,a[8]=(o=parseInt(i.slice(19,23),16))>>>8,a[9]=o&255,a[10]=(o=parseInt(i.slice(24,36),16))/1099511627776&255,a[11]=o/4294967296&255,a[12]=o>>>24&255,a[13]=o>>>16&255,a[14]=o>>>8&255,a[15]=o&255,a}var n=r;return da.default=n,da}var XM;function Qk(){if(XM)return Ln;XM=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.URL=Ln.DNS=void 0,Ln.default=a;var e=ul(),t=r(Jk());function r(u){return u&&u.__esModule?u:{default:u}}function n(u){u=unescape(encodeURIComponent(u));const l=[];for(let d=0;d<u.length;++d)l.push(u.charCodeAt(d));return l}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Ln.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Ln.URL=o;function a(u,l,d){function f(h,p,v,m){var y;if(typeof h=="string"&&(h=n(h)),typeof p=="string"&&(p=(0,t.default)(p)),((y=p)===null||y===void 0?void 0:y.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let x=new Uint8Array(16+h.length);if(x.set(p),x.set(h,p.length),x=d(x),x[6]=x[6]&15|l,x[8]=x[8]&63|128,v){m=m||0;for(let b=0;b<16;++b)v[m+b]=x[b];return v}return(0,e.unsafeStringify)(x)}try{f.name=u}catch{}return f.DNS=i,f.URL=o,f}return Ln}var ha={},ZM;function aQ(){if(ZM)return ha;ZM=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.default=void 0;function e(v){if(typeof v=="string"){const m=unescape(encodeURIComponent(v));v=new Uint8Array(m.length);for(let y=0;y<m.length;++y)v[y]=m.charCodeAt(y)}return t(n(i(v),v.length*8))}function t(v){const m=[],y=v.length*32,x="0123456789abcdef";for(let b=0;b<y;b+=8){const w=v[b>>5]>>>b%32&255,E=parseInt(x.charAt(w>>>4&15)+x.charAt(w&15),16);m.push(E)}return m}function r(v){return(v+64>>>9<<4)+14+1}function n(v,m){v[m>>5]|=128<<m%32,v[r(m)-1]=m;let y=1732584193,x=-271733879,b=-1732584194,w=271733878;for(let E=0;E<v.length;E+=16){const _=y,S=x,R=b,I=w;y=l(y,x,b,w,v[E],7,-680876936),w=l(w,y,x,b,v[E+1],12,-389564586),b=l(b,w,y,x,v[E+2],17,606105819),x=l(x,b,w,y,v[E+3],22,-1044525330),y=l(y,x,b,w,v[E+4],7,-176418897),w=l(w,y,x,b,v[E+5],12,1200080426),b=l(b,w,y,x,v[E+6],17,-1473231341),x=l(x,b,w,y,v[E+7],22,-45705983),y=l(y,x,b,w,v[E+8],7,1770035416),w=l(w,y,x,b,v[E+9],12,-1958414417),b=l(b,w,y,x,v[E+10],17,-42063),x=l(x,b,w,y,v[E+11],22,-1990404162),y=l(y,x,b,w,v[E+12],7,1804603682),w=l(w,y,x,b,v[E+13],12,-40341101),b=l(b,w,y,x,v[E+14],17,-1502002290),x=l(x,b,w,y,v[E+15],22,1236535329),y=d(y,x,b,w,v[E+1],5,-165796510),w=d(w,y,x,b,v[E+6],9,-1069501632),b=d(b,w,y,x,v[E+11],14,643717713),x=d(x,b,w,y,v[E],20,-373897302),y=d(y,x,b,w,v[E+5],5,-701558691),w=d(w,y,x,b,v[E+10],9,38016083),b=d(b,w,y,x,v[E+15],14,-660478335),x=d(x,b,w,y,v[E+4],20,-405537848),y=d(y,x,b,w,v[E+9],5,568446438),w=d(w,y,x,b,v[E+14],9,-1019803690),b=d(b,w,y,x,v[E+3],14,-187363961),x=d(x,b,w,y,v[E+8],20,1163531501),y=d(y,x,b,w,v[E+13],5,-1444681467),w=d(w,y,x,b,v[E+2],9,-51403784),b=d(b,w,y,x,v[E+7],14,1735328473),x=d(x,b,w,y,v[E+12],20,-1926607734),y=f(y,x,b,w,v[E+5],4,-378558),w=f(w,y,x,b,v[E+8],11,-2022574463),b=f(b,w,y,x,v[E+11],16,1839030562),x=f(x,b,w,y,v[E+14],23,-35309556),y=f(y,x,b,w,v[E+1],4,-1530992060),w=f(w,y,x,b,v[E+4],11,1272893353),b=f(b,w,y,x,v[E+7],16,-155497632),x=f(x,b,w,y,v[E+10],23,-1094730640),y=f(y,x,b,w,v[E+13],4,681279174),w=f(w,y,x,b,v[E],11,-358537222),b=f(b,w,y,x,v[E+3],16,-722521979),x=f(x,b,w,y,v[E+6],23,76029189),y=f(y,x,b,w,v[E+9],4,-640364487),w=f(w,y,x,b,v[E+12],11,-421815835),b=f(b,w,y,x,v[E+15],16,530742520),x=f(x,b,w,y,v[E+2],23,-995338651),y=h(y,x,b,w,v[E],6,-198630844),w=h(w,y,x,b,v[E+7],10,1126891415),b=h(b,w,y,x,v[E+14],15,-1416354905),x=h(x,b,w,y,v[E+5],21,-57434055),y=h(y,x,b,w,v[E+12],6,1700485571),w=h(w,y,x,b,v[E+3],10,-1894986606),b=h(b,w,y,x,v[E+10],15,-1051523),x=h(x,b,w,y,v[E+1],21,-2054922799),y=h(y,x,b,w,v[E+8],6,1873313359),w=h(w,y,x,b,v[E+15],10,-30611744),b=h(b,w,y,x,v[E+6],15,-1560198380),x=h(x,b,w,y,v[E+13],21,1309151649),y=h(y,x,b,w,v[E+4],6,-145523070),w=h(w,y,x,b,v[E+11],10,-1120210379),b=h(b,w,y,x,v[E+2],15,718787259),x=h(x,b,w,y,v[E+9],21,-343485551),y=o(y,_),x=o(x,S),b=o(b,R),w=o(w,I)}return[y,x,b,w]}function i(v){if(v.length===0)return[];const m=v.length*8,y=new Uint32Array(r(m));for(let x=0;x<m;x+=8)y[x>>5]|=(v[x/8]&255)<<x%32;return y}function o(v,m){const y=(v&65535)+(m&65535);return(v>>16)+(m>>16)+(y>>16)<<16|y&65535}function a(v,m){return v<<m|v>>>32-m}function u(v,m,y,x,b,w){return o(a(o(o(m,v),o(x,w)),b),y)}function l(v,m,y,x,b,w,E){return u(m&y|~m&x,v,m,b,w,E)}function d(v,m,y,x,b,w,E){return u(m&x|y&~x,v,m,b,w,E)}function f(v,m,y,x,b,w,E){return u(m^y^x,v,m,b,w,E)}function h(v,m,y,x,b,w,E){return u(y^(m|~x),v,m,b,w,E)}var p=e;return ha.default=p,ha}var JM;function sQ(){if(JM)return fa;JM=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.default=void 0;var e=r(Qk()),t=r(aQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return fa.default=i,fa}var pa={},va={},QM;function uQ(){if(QM)return va;QM=1,Object.defineProperty(va,"__esModule",{value:!0}),va.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return va.default=t,va}var eD;function cQ(){if(eD)return pa;eD=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.default=void 0;var e=n(uQ()),t=n(Zk()),r=ul();function n(a){return a&&a.__esModule?a:{default:a}}function i(a,u,l){if(e.default.randomUUID&&!u&&!a)return e.default.randomUUID();a=a||{};const d=a.random||(a.rng||t.default)();if(d[6]=d[6]&15|64,d[8]=d[8]&63|128,u){l=l||0;for(let f=0;f<16;++f)u[l+f]=d[f];return u}return(0,r.unsafeStringify)(d)}var o=i;return pa.default=o,pa}var ga={},ma={},tD;function lQ(){if(tD)return ma;tD=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.default=void 0;function e(i,o,a,u){switch(i){case 0:return o&a^~o&u;case 1:return o^a^u;case 2:return o&a^o&u^a&u;case 3:return o^a^u}}function t(i,o){return i<<o|i>>>32-o}function r(i){const o=[1518500249,1859775393,2400959708,3395469782],a=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const f=unescape(encodeURIComponent(i));i=[];for(let h=0;h<f.length;++h)i.push(f.charCodeAt(h))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const u=i.length/4+2,l=Math.ceil(u/16),d=new Array(l);for(let f=0;f<l;++f){const h=new Uint32Array(16);for(let p=0;p<16;++p)h[p]=i[f*64+p*4]<<24|i[f*64+p*4+1]<<16|i[f*64+p*4+2]<<8|i[f*64+p*4+3];d[f]=h}d[l-1][14]=(i.length-1)*8/Math.pow(2,32),d[l-1][14]=Math.floor(d[l-1][14]),d[l-1][15]=(i.length-1)*8&4294967295;for(let f=0;f<l;++f){const h=new Uint32Array(80);for(let b=0;b<16;++b)h[b]=d[f][b];for(let b=16;b<80;++b)h[b]=t(h[b-3]^h[b-8]^h[b-14]^h[b-16],1);let p=a[0],v=a[1],m=a[2],y=a[3],x=a[4];for(let b=0;b<80;++b){const w=Math.floor(b/20),E=t(p,5)+e(w,v,m,y)+x+o[w]+h[b]>>>0;x=y,y=m,m=t(v,30)>>>0,v=p,p=E}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+m>>>0,a[3]=a[3]+y>>>0,a[4]=a[4]+x>>>0}return[a[0]>>24&255,a[0]>>16&255,a[0]>>8&255,a[0]&255,a[1]>>24&255,a[1]>>16&255,a[1]>>8&255,a[1]&255,a[2]>>24&255,a[2]>>16&255,a[2]>>8&255,a[2]&255,a[3]>>24&255,a[3]>>16&255,a[3]>>8&255,a[3]&255,a[4]>>24&255,a[4]>>16&255,a[4]>>8&255,a[4]&255]}var n=r;return ma.default=n,ma}var rD;function fQ(){if(rD)return ga;rD=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=void 0;var e=r(Qk()),t=r(lQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return ga.default=i,ga}var ya={},nD;function dQ(){if(nD)return ya;nD=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.default=void 0;var e="00000000-0000-0000-0000-000000000000";return ya.default=e,ya}var ba={},iD;function hQ(){if(iD)return ba;iD=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.default=void 0;var e=t(sl());function t(i){return i&&i.__esModule?i:{default:i}}function r(i){if(!(0,e.default)(i))throw TypeError("Invalid UUID");return parseInt(i.slice(14,15),16)}var n=r;return ba.default=n,ba}var oD;function pQ(){return oD||(oD=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.default}});var t=f(oQ()),r=f(sQ()),n=f(cQ()),i=f(fQ()),o=f(dQ()),a=f(hQ()),u=f(sl()),l=f(ul()),d=f(Jk());function f(h){return h&&h.__esModule?h:{default:h}}})(_b)),_b}var Eb,aD;function vQ(){if(aD)return Eb;aD=1;function e(t,r){if(!t||!r||!t.length||!r.length)throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=r}return e.prototype.convert=function(t){var r,n,i,o={},a=this.srcAlphabet.length,u=this.dstAlphabet.length,l=t.length,d=typeof t=="string"?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(r=0;r<l;r++)o[r]=this.srcAlphabet.indexOf(t[r]);do{for(n=0,i=0,r=0;r<l;r++)n=n*a+o[r],n>=u?(o[i++]=parseInt(n/u,10),n=n%u):i>0&&(o[i++]=0);l=i,d=this.dstAlphabet.slice(n,n+1).concat(d)}while(i!==0);return d},e.prototype.isValid=function(t){for(var r=0;r<t.length;++r)if(this.srcAlphabet.indexOf(t[r])===-1)return!1;return!0},Eb=e,Eb}var Sb,sD;function gQ(){if(sD)return Sb;sD=1;var e=vQ();function t(r,n){var i=new e(r,n);return function(o){return i.convert(o)}}return t.BIN="01",t.OCT="01234567",t.DEC="0123456789",t.HEX="0123456789abcdef",Sb=t,Sb}var Ob,uD;function mQ(){if(uD)return Ob;uD=1;const{v4:e,validate:t}=pQ(),r=gQ(),n={cookieBase90:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#$%&'()*+-./:<=>?@[]^_`{|}~",flickrBase58:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",uuid25Base36:"0123456789abcdefghijklmnopqrstuvwxyz"},i={consistentLength:!0};let o;const a=(d,f,h)=>{const p=f(d.toLowerCase().replace(/-/g,""));return!h||!h.consistentLength?p:p.padStart(h.shortIdLength,h.paddingChar)},u=(d,f)=>{const p=f(d).padStart(32,"0").match(/(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})/);return[p[1],p[2],p[3],p[4],p[5]].join("-")},l=d=>Math.ceil(Math.log(2**128)/Math.log(d));return Ob=(()=>{const d=(f,h)=>{const p=f||n.flickrBase58,v={...i,...h};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const m=l(p.length),y={shortIdLength:m,consistentLength:v.consistentLength,paddingChar:p[0]},x=r(r.HEX,p),b=r(p,r.HEX),w=()=>a(e(),x,y),_={alphabet:p,fromUUID:S=>a(S,x,y),maxLength:m,generate:w,new:w,toUUID:S=>u(S,b),uuid:e,validate:(S,R=!1)=>{if(!S||typeof S!="string")return!1;const I=v.consistentLength?S.length===m:S.length<=m,N=S.split("").every(A=>p.includes(A));return R===!1?I&&N:I&&N&&t(u(S,b))}};return Object.freeze(_),_};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),Ob}var yQ=mQ();const bQ=({role:e})=>{var R;const[t,r]=T.useState(e),[n,i]=T.useState(e.role),[o,a]=T.useState(null),u=J.useAppSelector(J.selectPrivileges),l=((R=t.privileges)==null?void 0:R.filter(I=>u[I]&&u[I].privilege!=="guest").length)||0,d=J.useAppSelector(J.selectRoles),f=J.useAppDispatch(),{selectedRole:h,selectRole:p}=Qb(),[v,m]=T.useState(!1),y=Te.useOutsideClick(()=>{v&&b()});Te.useDidMountEffect(()=>{n!==e.role&&i(e.role)},[e.role]),T.useEffect(()=>{e.role||m(!0)},[]),T.useEffect(()=>{r(e)},[e]);const x=()=>{a(null),m(!0)},b=()=>{a(null),e.role&&e.role===n&&m(!1);try{const I=J.saveRole({...t,role:n},d);f(J.updateRoles(I)),m(!1)}catch(I){a(I.message)}},w=J.useAppDispatch(),E=async I=>{I.stopPropagation();const{confirmed:N}=await w(J.openModal({title:"Delete Role",type:Te.ModalType.CONFIRM,color:Te.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"})).unwrap();N&&_()},_=()=>{const I=J.removeRole(t.id,d),N=Object.keys(I);if(h!==t.id){f(J.updateRoles(I));return}if(N.length===0)p(null);else{const A=Object.keys(d),L=A.indexOf(t.id),B=Math.max(0,L-1),U=A[B];L===0?p(N[0]):I[U]?p(U):p(N[0])}f(J.updateRoles(I))},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}m(!1),i(e.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:We("rounded border bg-grey-300 p-2",{"border-grey-100":h!==t.id,"border-primary-dark":h===t.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{p(t.id)},ref:y,children:[C.jsx("div",{className:"flex items-center justify-between",children:C.jsxs("div",{className:"flex flex-1 items-center text-white",children:[C.jsx("span",{className:"mr-4",children:C.jsx(ye.FdGroup,{className:"h-6 w-6"})}),v?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{type:"text",value:n,onChange:({target:{value:I}})=>{i(I)},onKeyDown:I=>{I.key==="Enter"&&b(),I.key==="Escape"&&S()},className:We("absolute inset-0 h-6 min-w-0 rounded border border-grey-200 bg-grey-300 p-1 text-xs focus:outline-none",{"border-b border-red-400 rounded-b-none":o,"focus:border-primary-dark":!o}),placeholder:"role",autoComplete:"off",autoFocus:!0}),o&&C.jsx("p",{className:"absolute top-5 mt-1 w-full rounded rounded-t-none bg-red-400 p-1 text-xs text-white shadow-md",children:o})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:n,children:t.role}),C.jsx("div",{className:We("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:v?C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:b,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdSave,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:S,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdClose,{className:"h-4 w-4 text-grey-50"})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:x,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdPen,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:I=>E(I),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(ye.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),C.jsxs("span",{className:We("ml-[43px] py-1 text-xs text-white"),children:[l," Privilege",l>1?"s":""]})]})})},eL=(e,t)=>e?t[e]:null,cD=(e,t,r)=>{const n=eL(e,r);return n?Object.values(r).reduce((i,o)=>o.id===e?n.privileges.includes(t)?{...i,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...i,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...i,[o.id]:o},{}):r},xQ=()=>{const e=J.useAppSelector(J.selectPrivileges),t=J.useAppSelector(J.selectRoles),r=J.useAppDispatch(),{selectedRole:n}=Qb(),i=eL(n,t),o=(a,u)=>u&&u.privileges.includes(a.id);return C.jsxs("div",{className:"w-full border-b border-grey-900 p-4 ",children:[C.jsx("div",{className:"mb-4 flex items-center gap-x-5 text-white",children:C.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),C.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[C.jsx("div",{"data-cy":"item=>Permisions",className:We("inline-flex items-center gap-1 space-x-1 rounded bg-primary-darker px-2 py-0.5 text-xs font-semibold italic text-white"),children:"guest"}),Object.values(e).filter(a=>o(a,i)&&a.privilege!=="guest").map((a,u)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:We("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(a,i),"bg-grey-300 text-grey-100":!o(a,i)}),onClick:()=>{const l=cD(i.id,a.id,t);r(J.updateRoles(l))},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"focus:outline-none",children:o(a,i)?C.jsx(ye.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(ye.FdPlus,{className:"h-[14px] w-[14px]"})})]},u)),Object.values(e).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,u)=>C.jsxs("div",{"data-cy":"item=>Permisions",className:We("inline-flex cursor-pointer items-center gap-1 space-x-1 rounded px-2 py-0.5",{"bg-primary-dark text-white":o(a,i),"bg-grey-300 text-grey-100":!o(a,i)}),onClick:()=>{const l=cD(i.id,a.id,t);r(J.updateRoles(l))},children:[C.jsx("span",{className:"text-xs",children:a.privilege}),C.jsx("button",{className:"text-white focus:outline-none",children:o(a,i)?C.jsx(ye.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(ye.FdPlus,{className:"h-[14px] w-[14px]"})})]},u))]})]})},wQ=({children:e})=>C.jsx("div",{className:"h-full w-full",children:C.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),Zb=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===J.EPermissionType.DATACLASS?"ds":i.split(".")[0],a={...t,...r},u=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),l={read:u(),create:u(),update:u(),drop:u(),execute:u(),promote:u()},d=h=>{h.forEach(p=>{a[p]&&(a[p].resources.forEach(v=>{if(v.resource===i||v.resource===o){const m=Zb(e,t,{[p]:a[p]},n);Object.values(v.permissions).forEach(y=>{l[y.name].explicitly||(!l[y.name].from.includes(a[p].privilege)&&y.checked&&l[y.name].from.push(a[p].privilege),l[y.name].inherited=l[y.name].inherited||m[y.name].value||m[y.name].inherited)})}}),a[p].includes.length>0&&d(a[p].includes))})};if(Object.values(r).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&Object.values(p.permissions).forEach(v=>{v.checked&&(l[v.name].explicitly=!0,n&&(l[v.name].value=!0))})}),(h.includes.length>0||h.privilege==="guest")&&d(h.includes)}),Object.values(t).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&(h.privilege==="guest"?Object.values(p.permissions).forEach(v=>{v.checked&&(l[v.name].explicitly=!0,n&&(l[v.name].value=!0))}):Object.values(p.permissions).forEach(v=>{!l[v.name].explicitly&&v.checked&&(n?l[v.name].value=!0:l[v.name].value=!1)}))})}),(n?Object.entries(l).some(([h,p])=>h!=="promote"&&!p.value&&!p.explicitly):Object.entries(l).some(([h,p])=>h!=="promote"&&p.value&&!p.explicitly))&&![J.EPermissionType.DATASTORE,J.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===J.EPermissionType.DATACLASS?J.EPermissionType.DATASTORE:e.type===J.EPermissionType.SINGLETON_METHOD?J.EPermissionType.SINGLETON:J.EPermissionType.DATACLASS},p=Zb(h,t,r,n),v=m=>{let y=l[m].value;return n?!l[m].value&&!l[m].explicitly&&(y=p[m].value):l[m].value&&!l[m].explicitly&&(y=p[m].value),{value:y,inherited:l[m].inherited||p[m].inherited,from:l[m].from.length>0?l[m].from:p[m].from,explicitly:l[m].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:l.read,create:l.create,update:l.update,drop:l.drop,execute:l.execute,promote:l.promote}},_Q=e=>{switch(e){case"dataclass":return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(ye.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(ye.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(ye.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(ye.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(ye.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(ye.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(ye.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(ye.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(ye.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(ye.FdTableHeader,{className:"h-6 w-6"})}},xa=Gx,wa=Kx,ho=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:u,collapsed:l,isRestrictedByDefault:d,toastMessageCallback:f})=>{const[h,p]=t.applyTo.split("."),v=T.useMemo(()=>Zb(t,e.otherPrivs,e.rolePrivs,d),[e,t,d]);return C.jsxs("tr",{className:We("group even:bg-grey-600 hover:bg-grey-300",o),children:[C.jsxs("td",{className:We("flex h-full w-full items-stretch p-0 text-xs group-hover:rounded-l",{"px-1":a}),children:[Array(n).fill("").map((m,y)=>C.jsx("div",{className:We("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},y)),C.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&C.jsx("button",{onClick:u,className:"w-3",children:l?C.jsx(ye.FdRight,{className:"inline h-4 w-4"}):C.jsx(ye.FdDown,{className:"inline h-4 w-4"})}),_Q(t.type),a?t.applyTo:p||h]})]}),C.jsx("td",{className:"py-2 text-center",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.read.value||v.read.inherited}),onClick:f,children:(v.read.value||v.read.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.read.value&&v.read.inherited?C.jsxs(xa,{openDelay:0,closeDelay:0,children:[C.jsx(wa,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.read.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.read.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.create.value||v.create.inherited}),onClick:f,children:(v.create.value||v.create.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.create.value&&v.create.inherited?C.jsxs(xa,{openDelay:0,closeDelay:0,children:[C.jsx(wa,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.create.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.create.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.update.value||v.update.inherited}),onClick:f,children:(v.update.value||v.update.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.update.value&&v.update.inherited?C.jsxs(xa,{openDelay:0,closeDelay:0,children:[C.jsx(wa,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.update.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.update.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[J.EPermissionType.ATTRIBUTE,J.EPermissionType.DATASTORE,J.EPermissionType.DATACLASS].includes(t.type)&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.drop.value||v.drop.inherited}),onClick:f,children:(v.drop.value||v.drop.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.drop.value&&v.drop.inherited?C.jsxs(xa,{openDelay:0,closeDelay:0,children:[C.jsx(wa,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.drop.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.drop.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:t.type!=="attribute"&&C.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[C.jsx("div",{className:We("h-4 w-4 rounded border-[2px] p-2",{"grid place-content-center border-grey-200 bg-grey-200":v.execute.value||v.execute.inherited}),onClick:f,children:(v.execute.value||v.execute.inherited)&&C.jsx(ye.FdCheckNaked,{className:"text-grey-50"})}),C.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.execute.value&&v.execute.inherited?C.jsxs(xa,{openDelay:0,closeDelay:0,children:[C.jsx(wa,{children:C.jsx(ye.FdInfoBold,{className:"h-4 w-4 text-white"})}),C.jsx(Lr,{container:Bt(),children:C.jsx(Br,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:C.jsx("div",{className:"space-y-1 px-2",children:v.execute.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(ye.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),C.jsxs("p",{children:[C.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),C.jsx("ul",{children:v.execute.from.map((m,y)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},y))})]})]}):null})})})]}):""})]})})]})},lD=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,u]=T.useState(n),l=J.useAppSelector(J.selectRestrictedByDefault),d=J.useAppSelector(J.selectPrivileges);return T.useEffect(()=>{n===!0&&u(!0)},[n]),C.jsxs(C.Fragment,{children:[C.jsx(ho,{privileges:r,permission:t,isChild:!0,depth:e,hasChild:!0,toggleCollapse:()=>{const f=!a;u(f),i==null||i(f)},isRestrictedByDefault:l,allPrivileges:d,collapsed:a,toastMessageCallback:o}),!a&&C.jsxs(C.Fragment,{children:[t.attributes.map((f,h)=>C.jsx(ho,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:l,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`)),t.methods.map((f,h)=>C.jsx(ho,{privileges:r,permission:f,depth:e+1,isRestrictedByDefault:l,allPrivileges:d,toastMessageCallback:o},`${f.type}-${h}`))]})]})},EQ=({selectedRole:e})=>{const[t,r]=T.useState(null),[n,i]=T.useState(null),{styles:o,attributes:a}=pc(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=J.useAppSelector(J.selectRestrictedByDefault),l=J.useAppSelector(J.selectPrivileges),[d,f]=T.useState([]),[h,p]=T.useState(""),v=J.useAppSelector(J.selectCatalogMethods),m=J.useAppSelector(J.selectDataclasses),y=J.useAppSelector(J.selectSingletons),[x,b]=T.useState({}),[w,E]=T.useState([]);T.useEffect(()=>{const k=x9(v,Object.values(m),Object.values(y));b(k)},[e,v,m,y]);function _(k){const z=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return k.sort((re,ie)=>{const se=z.indexOf(re.type),ce=z.indexOf(ie.type);return se!==ce?se-ce:re.applyTo.toLowerCase()>ie.applyTo.toLowerCase()?1:-1})}T.useEffect(()=>{E(_(qx(h,v,Object.values(m),Object.values(y)).filter(k=>d.length?d.includes(k.type):!0)))},[d,h,v,m,y]);const[S,R]=T.useState(!1),I={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},N=Object.values(I).flat(),A=(k,z)=>z.length>0&&z.every(re=>k.includes(re)),L=(k,z)=>Array.from(new Set([...k,...z])),B=(k,z)=>k.filter(re=>!z.includes(re)),U=k=>f([...k]),j=k=>{f(z=>A(z,k)?B(z,k):L(z,k))},D=k=>j(I[k]),G=N.every(k=>d.includes(k)),F=d.length>0&&!G,X=A(d,I.functions),Z=()=>U(N),Q=()=>U([]),W=J.useAppSelector(J.selectRoles),ee={toggleAllCollapsed:k=>{k.allCollapsed=!k.allCollapsed},toggleChildCollapsed:k=>{k.childCollapsed=!k.childCollapsed},setAllCollapsed:(k,z)=>{k.allCollapsed=z},setChildCollapsed:(k,z)=>{k.childCollapsed=z}},oe=T.useMemo(()=>{const k=Object.values(l).find(ce=>ce.privilege==="guest"),z=W[e],re=z?Object.fromEntries(z.privileges.map(ce=>[ce,l[ce]]).filter(([,ce])=>!!ce)):{};if(u)return{rolePrivs:re,otherPrivs:k?{[k.id]:k}:{}};const ie=k?{[k.id]:{...k,active:!0}}:{},se=Object.fromEntries(Object.entries(l).filter(([ce])=>ce!==(k==null?void 0:k.id)&&!(z!=null&&z.privileges.includes(ce))).map(([ce,be])=>[ce,{...be,active:!1}]));return{rolePrivs:re,otherPrivs:{...ie,...se}}},[l,W,e,u]),{state:{allCollapsed:ae,childCollapsed:H},dispatch:K}=Te.useEnhancedState({allCollapsed:!1,childCollapsed:!1},ee,"Table Collapse Store"),$=()=>{Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:ye.FdInfoCircle})};return C.jsxs(al,{className:"z-20 h-full flex-1 overflow-auto bg-grey-800 p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[C.jsxs("table",{className:"relative h-full w-full border-collapse",children:[C.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",children:C.jsxs("tr",{className:"border-b border-grey-100",children:[C.jsx("td",{className:"py-2",children:C.jsxs("div",{className:"flex items-center space-x-2",children:[C.jsx(Te.Tooltip,{label:"Collapse All",placement:"top",container:Bt(),children:C.jsx("button",{onClick:()=>{H?(K.setAllCollapsed(!0),R(!0)):K.setChildCollapsed(!0)},className:We("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":ae,"text-white":!ae}),children:C.jsx(ye.FdCollapseAll,{className:"h-4 w-4"})})}),C.jsxs("div",{className:"relative w-56 text-white",children:[C.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:C.jsx(ye.FdSearch,{className:"h-4 w-4 text-gray-400"})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:C.jsx(_r.Popover,{className:"flex items-center",children:({open:k})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:r,children:C.jsx(ye.FdAdjust,{className:"h-4 w-4"})}),k&&C.jsx(Gc,{children:C.jsxs(_r.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50 rounded-md border border-grey-50 bg-grey-900 px-4 py-2.5 text-xs text-grey-50",static:!0,children:[C.jsxs("label",{className:"mb-2 flex cursor-pointer items-center",children:[C.jsx(Te.Checkbox,{isChecked:G,isIndeterminate:F,onChange:()=>G?Q():Z()}),C.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),C.jsxs("div",{className:"space-y-2 text-s",children:[C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.datastore),onChange:()=>D("datastore"),label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.dataclass),onChange:()=>D("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.singleton),onChange:()=>D("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:X,onChange:()=>D("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:A(d,I.attribute),onChange:()=>D("attribute"),label:"Attribute"})})]})]})})]})})}),C.jsx("input",{type:"text",className:"block h-6 w-full rounded bg-grey-300 px-1 py-1.5 pl-6 text-xs focus:outline-none",placeholder:"Search",value:h,onChange:k=>{p(k.target.value)}})]})]})}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"read"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),C.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"})]})}),C.jsx("tbody",{className:"relative bg-grey-800 text-white",children:d.length||h?w.map((k,z)=>C.jsx(ho,{privileges:oe,permission:k,depth:0,inSearch:!0,isRestrictedByDefault:u,allPrivileges:l,toastMessageCallback:$},`${k.type}-${z}`)):Object.values(x).map((k,z)=>C.jsxs(T.Fragment,{children:[C.jsx(ho,{privileges:oe,permission:k,isRestrictedByDefault:u,allPrivileges:l,hasChild:!0,depth:0,toggleCollapse:()=>{const re=!S;R(re),K.setAllCollapsed(!re&&ae?!1:ae)},collapsed:S,toastMessageCallback:$}),k.type==="datastore"&&!S?C.jsxs(C.Fragment,{children:[k.methods.map((re,ie)=>C.jsx(ho,{privileges:oe,isRestrictedByDefault:u,allPrivileges:l,permission:re,depth:1,collapsed:ae||!1,toastMessageCallback:$},`${re.type}-${ie}`)),k.dataClasses.map((re,ie)=>C.jsx(lD,{depth:1,privileges:oe,permission:re,childCollapsed:H,didChildCollapsed:se=>{K.setChildCollapsed(se?H:!1)},toastMessageCallback:$},`${re.type}-${ie}`))]}):null,k.singletons.map((re,ie)=>C.jsx(lD,{depth:0,privileges:oe,permission:re,childCollapsed:ae,didChildCollapsed:se=>{K.setAllCollapsed(se?ae:!1)},toastMessageCallback:$},`${re.type}-${ie}`))]},`${k.type}-${z}`))})]}),(h||d.length)&&!w.length?C.jsx(wQ,{children:"The Permission you're looking for can't be found "}):null]})},SQ=()=>{const e=J.useAppSelector(J.selectRoles),t=J.useAppDispatch(),[r,n]=T.useState(null),[i,o]=T.useState(null),[a,u]=T.useState(""),[l,d]=T.useState(null),{styles:f,attributes:h}=pc(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});T.useEffect(()=>{u(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(e).find(x=>x.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const m=yQ.generate(),y=J.createRole(m,a,e);t(J.updateRoles(y))};return C.jsx(_r.Popover,{children:({open:v,close:m})=>{const y=()=>{d(null);try{Te.validateName(a),p(),m()}catch(x){d(x.message)}};return C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:n,children:C.jsx("span",{children:C.jsx(ye.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Gc,{children:C.jsxs(_r.Popover.Panel,{ref:o,style:f.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50 min-w-[256px] rounded border border-grey-50 bg-grey-900 px-4 py-2 text-xs text-grey-50 shadow-md",static:!0,children:[C.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),C.jsxs("div",{className:"mt-2",children:[C.jsxs("label",{className:"flex items-center space-x-4",children:[C.jsx("span",{className:"text-grey-100",children:"Name"}),C.jsx("input",{autoFocus:!0,value:a,onChange:x=>u(x.target.value),onKeyDown:x=>{x.key==="Enter"&&y()},type:"text",className:We("w-full rounded border bg-grey-300 p-1 focus:outline-none",{"border-grey-100":!l,"border-red-400":l})})]}),l&&C.jsx("p",{className:"mt-1 text-xs text-red-400",children:l})]}),C.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[C.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>{y()},children:"Create"}),C.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>m(),children:"Cancel"})]})]})})]})}})},OQ=()=>{const e=J.useAppSelector(J.selectRoles),{selectedRole:t}=Qb();return C.jsxs("div",{className:"flex flex-1 h-full",children:[C.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[C.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[C.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[C.jsx("span",{children:C.jsx(ye.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(SQ,{})]}),C.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(e).length>0?Object.values(e).sort((r,n)=>Te.localeCompare(r.role,n.role)).map((r,n)=>C.jsx(bQ,{role:r},n)):C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:C.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[C.jsx(ye.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"font-semibold",children:"There are no roles"}),C.jsxs("div",{className:"flex items-center text-sm",children:["Create a new role by clicking on the"," ",C.jsx(ye.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})})]}),C.jsx("div",{className:We("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto bg-grey-800",{"border-l-[0.5px] border-grey-900":t}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col bg-grey-800",children:t?C.jsxs(C.Fragment,{children:[C.jsx(xQ,{}),C.jsx(EQ,{selectedRole:t})]}):C.jsx(SD,{tab:"Role"})})})]})},tL=()=>{const e=J.useAppSelector(J.selectQodly),t=J.useAppSelector(J.selectSelectedTab),r=J.useAppSelector(J.selectForceLogin),n=J.useAppSelector(J.selectRestrictedByDefault),i=T.useRef(),o=J.useAppDispatch();return C.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:C.jsx("div",{className:"relative flex flex-1 overflow-x-auto bg-grey-900","data-cy":"Roles&Privileges-editor-cy",ref:a=>i.current=a,children:C.jsxs("div",{className:"flex w-full flex-col",children:[C.jsx(tH,{activeTab:t,forceLogin:r,restrictedByDefault:n,onTabChange:a=>{o(J.toggleTab(a))},onForceLoginChange:a=>{o(J.toggleForceLogin(a))},onRestrictedByDefaultChange:a=>{o(J.toggleRestrictedByDefault(a))},qodly:e}),t==="roles"?C.jsx(rH,{children:C.jsx(OQ,{})}):C.jsx(rQ,{})]})})})},CQ=()=>{const e=J.useAppSelector(J.selectModals),t=J.useAppDispatch();return C.jsx(C.Fragment,{children:e.map((r,n)=>C.jsx(Te.Modal,{hasOverlay:n===0,...r,onClose:i=>t(J.closeModal(i)),onEdit:i=>t(J.editModal(i)),container:Bt()},r.id))})},RQ=({initialValue:e,onChange:t,...r})=>{const n=J.useAppSelector(J.selectRolesFlags),i=J.useAppSelector(J.selectRolesAndPrivileges,(a,u)=>uc.isEqual(a,u)),o=J.useAppDispatch();return T.useEffect(()=>{if(e)try{const a=JSON.parse(e);if(uc.isEqual(a,i))return;o(J.setRolesContent({content:a,flags:{touched:!1}}))}catch(a){console.error("[Roles Editor Standalone] Error while parsing the initial value:",a)}},[e]),Te.useDidMountEffect(()=>{if(n.touched&&t)try{const a=JSON.stringify(i,null,2);t(a)}catch(a){console.error("[Roles Editor Standalone] Error on value stringify:",a)}},[i]),C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"relative z-10 overflow-hidden",style:{height:"100vh"},children:C.jsx(tL,{...r})}),C.jsx(CQ,{})]})},IQ=e=>C.jsx(J.ReduxProvider,{store:J.getStore(),children:C.jsx(Te.TipsProvider,{children:C.jsx(RQ,{...e})})});exports.ROLES_EDITOR_SCOPE_CLASS=dD.ROLES_EDITOR_SCOPE_CLASS;exports.Roles=tL;exports.Standalone=IQ;
115
+ `),C.useEffect(function(){return d=i.ref||d,h.current&&(u=new rd(h.current,ou(ou(ou(ou({},Rle(g)),v),d&&{scrollableNode:d.current}),p.current&&{contentNode:p.current})),typeof t=="function"?t(u):t&&(t.current=u)),function(){u.unMount(),u=null,typeof t=="function"&&t(null)}},[]),C.createElement(c,nd({ref:h,"data-simplebar":!0},x),C.createElement("div",{className:"simplebar-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},C.createElement("div",{className:"simplebar-height-auto-observer"})),C.createElement("div",{className:"simplebar-mask"},C.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:d,contentNodeRef:p}):C.createElement("div",nd({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),C.createElement("div",{className:"simplebar-content"},r)))),C.createElement("div",{className:"simplebar-placeholder"})),C.createElement("div",{className:"simplebar-track simplebar-horizontal"},C.createElement("div",{className:"simplebar-scrollbar"})),C.createElement("div",{className:"simplebar-track simplebar-vertical"},C.createElement("div",{className:"simplebar-scrollbar"})))});nf.displayName="SimpleBar";nf.propTypes={children:As.oneOfType([As.node,As.func]),scrollableNodeProps:As.object,tag:As.string};const ZL=e=>{switch(e){case fe.EPermissionType.DATACLASS:return O.jsx(Eu,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON:return O.jsx(ZD,{className:"h-6 w-6"});case fe.EPermissionType.DATASTORE:return O.jsx(GD,{className:"h-6 w-6"});case fe.EPermissionType.ATTRIBUTE:return O.jsx(JD,{className:"h-6 w-6"});case fe.EPermissionType.METHOD:return O.jsx(BD,{className:"h-6 w-6"});case fe.EPermissionType.SINGLETON_METHOD:return O.jsx(UD,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_SEL_METHOD:return O.jsx(WD,{className:"h-6 w-6"});case fe.ESubPermissionType.ENTITY_METHOD:return O.jsx(VD,{className:"h-6 w-6"});case fe.ESubPermissionType.DS_METHOD:return O.jsx(HD,{className:"h-6 w-6"});case fe.ESubPermissionType.DATACLASS_METHOD:return O.jsx($D,{className:"h-6 w-6"});default:return O.jsx(Eu,{className:"h-6 w-6"})}},kD=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(tn,{className:"h-10 w-10"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),la=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,showIncluded:o,privileges:a,exists:s})=>{const c=e.find(u=>u.name===t);return c?O.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[O.jsx(or,{value:c.checked||c.from.length===0||t==="promote"?c.checked:o&&c.from.length>0?null:!1,onChange:()=>r&&r(c),isInvalid:s===!1}),O.jsxs("div",{className:"absolute left-full translate-x-1/4 inset-y-0 flex cursor-pointer items-center gap-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&O.jsx(O.Fragment,{children:O.jsx(zr,{container:Br(),delay:100,label:O.jsxs("div",{className:"max-w-xs h-fit flex flex-col gap-y-3 p-1.5 text-sm font-semibold",children:[c.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(xi,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:c.from.map(u=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))})]})]}):null,c.info&&O.jsxs("div",{className:"flex items-start",children:[O.jsx(gw,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"})," ",O.jsx("span",{className:"flex-1 min-w-0 wrap-break-word whitespace-normal text-left",children:c.info})]})]}),children:O.jsx(tn,{className:"h-4 w-4 "})})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&O.jsx(zr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(gw,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Function is promoted with: "}),i==null?void 0:i.map(u=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[u].id),children:a[u].privilege}))]})]})}),children:O.jsx(rH,{className:"h-3 w-3 "})})]})]}):null},Nle=({privilegeId:e,privileges:t})=>{const r=br(),n=r.getCatalogMethods(),i=r.getDataclasses(),o=r.getSingletons(),[a,s]=C.useState([]),[c,u]=C.useState("");C.useEffect(()=>{u("")},[e]),C.useEffect(()=>{const p=fe.getInheritedResources(e,t).map(({resource:x,type:g,subType:b})=>({applyTo:x,type:g,subType:b})),v=B_(c.toLowerCase(),n,Object.values(i),Object.values(o));s(v.filter(({applyTo:x,type:g,subType:b})=>!Eo.find(p,{applyTo:x,type:g,subType:b})))},[c,e,t,n,i,o]);const[d,h]=C.useState(!1);return O.jsx(Fh.Root,{className:"w-56",onInputChange:p=>u(p||""),onOpenChange:h,isOpen:d,isSearchable:!0,options:a,getOptionLabel:p=>p?p.applyTo:"",getOptionValue:p=>p?p.applyTo:"",value:null,clearSearchOnSelect:!0,closeMenuOnSelect:!1,onChange:p=>{if(!p)return;const v=fe.addPermission(e,p,t);r.actions.updatePrivileges(v),u("")},children:O.jsx(Fh.Group,{children:O.jsx(Fh.Field,{controlShouldRenderValue:!0,renderOption:({data:p})=>O.jsxs("div",{className:"flex items-center gap-x-2",children:[ZL(p.type),O.jsx("span",{children:p.applyTo})]}),placeholder:"Create a permission",hideNoOptions:!0})})})};function Tle(e){const t=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],r=e.reduce((n,i)=>{const[o]=i.resource.split("."),a=n.find(s=>s.prefix===o.toLowerCase());return a?(a.resources.push(i),n):[...n,{prefix:o.toLowerCase(),type:i.type,resources:[i]}]},[]);return r.sort((n,i)=>n.prefix==="ds"?-1:i.prefix==="ds"||n.prefix>i.prefix?1:-1),r.map(n=>({...n,resources:n.resources.sort((i,o)=>{const a=t.indexOf(i.type),s=t.indexOf(o.type);return a!==s?a-s:i.resource.toLowerCase()>o.resource.toLowerCase()?1:-1})})).reduce((n,i)=>[...n,...i.resources],[])}const Ple=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=C.useState(null),[a,s]=C.useState(null),{styles:c,attributes:u}=md(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),d=br(),[h,p]=C.useState([]),[v,x]=C.useState(""),{id:g}=e,b=C.useMemo(()=>fe.getInheritedResources(g,n),[g,n[g].includes,n[g].resources]),w=C.useMemo(()=>fe.getPromotions(g,n),[n[g]]),y={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},_=Object.values(y).flat(),E=(q,D)=>D.length>0&&D.every(V=>q.includes(V)),S=(q,D)=>D.some(V=>q.includes(V)),I=(q,D)=>Array.from(new Set([...q,...D])),N=(q,D)=>q.filter(V=>!D.includes(V)),T=q=>{p([...q])},k=q=>{p(D=>E(D,q)?N(D,q):I(D,q))},z=q=>{k(y[q])},L=E(h,_),K=h.length>0&&!L,G=E(h,y.functions),A=!G&&S(h,y.functions),Y=()=>T(_),B=()=>T([]),X=async q=>{const{confirmed:D}=await d.actions.openModal({title:"Delete Privilege",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(D){const V=fe.removePermission(e.id,q,n);d.actions.updatePrivileges(V)}},U=async()=>{const{confirmed:q}=await d.actions.openModal({title:"Reset Permissions",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(q){const D=fe.resetResources(e.id,n);d.actions.updatePrivileges(D)}},j=(h.length>0?b.filter(q=>h.includes(q.type)):b).filter(({resource:q})=>v?new RegExp(Eo.escapeRegExp(v),"i").test(q):!0),W=Tle(j),Z=W.filter(q=>{const D=q.permissions.every(V=>!V.checked)&&q.permissions.some(V=>V.from.length>0);return r||!D}),J=(q,D)=>{const V=fe.togglePermission(e.id,q,D,n);d.actions.updatePrivileges(V)},M=C.useMemo(()=>Z.some(q=>q.exists===!1),[Z]),H=async()=>{const{confirmed:q}=await d.actions.openModal({title:"Delete Privilege",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to remove these permissions?",views:{tips:[{type:"warning",message:"This action will remove all permissions that don't exist in the catalog for all privileges"}]},icon:"FdWarningDanger"}),D=Object.entries(n).map(([V,Q])=>{const ne=Q.resources.filter(ce=>!ce.exists);return{[V]:ne.map(ce=>({applyTo:ce.resource,type:ce.type}))}}).reduce((V,Q)=>({...V,...Q}),{});if(q){const V=fe.removeMultiplePermissions(D,n);d.actions.updatePrivileges(V)}};return O.jsxs(nf,{className:"z-20 h-full flex-1 overflow-auto p-[15px] pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-grey-100",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx("div",{className:"relative w-56",children:O.jsx(xt.Root,{children:O.jsxs(xt.Group,{children:[O.jsx(xt.Icon,{children:O.jsx(XD,{})}),O.jsx(xt.Field,{type:"text",placeholder:"Search available permissions",value:v,onChange:q=>{x(q.target.value)}}),O.jsx(xn.Popover,{className:"flex items-center",children:({open:q})=>O.jsxs(O.Fragment,{children:[O.jsx(xn.Popover.Button,{ref:o,children:O.jsx(xt.Icon,{isAction:!0,children:O.jsx(qD,{})})}),q&&O.jsx(Wd,{children:O.jsx(xn.Popover.Panel,{ref:s,style:c.popper,...u.popper,className:"z-50",static:!0,children:O.jsxs(mr,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(or,{size:"sm",value:K?null:L,onChange:()=>L?B():Y()}),O.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:E(h,y.dataclass),onChange:()=>z("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:E(h,y.singleton),onChange:()=>z("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:A?null:G,onChange:()=>z("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:E(h,y.attribute),onChange:()=>z("attribute"),label:"Attribute"})})]})]})})})]})})]})})}),O.jsx(Nle,{privilegeId:g,privileges:n}),O.jsx("div",{children:O.jsx(zr,{label:`Resetting the privilege will remove all configured\r
116
+ ressources`,container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:U,children:O.jsx(iH,{})})})}),O.jsx(zr,{icon:O.jsx(xi,{}),label:"Delete all the non existing resources from privileges",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:H,disabled:!M,children:O.jsx(LD,{className:"h-4 w-4"})})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Promote"})]})}),Z.length?O.jsx("tbody",{children:Z.map((q,D)=>{const V=q.permissions.some(Q=>Q.from.length>0);return O.jsxs("tr",{className:rn("group even:bg-white/5 hover:bg-input-bg",{"opacity-60":q.exists===!1}),children:[O.jsxs("td",{className:rn("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-input-bg ",q.exists===!1?"text-negative-text":""),children:[ZL(q.type),q.resource,O.jsx(zr,{label:"Remove Permission",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:V,onClick:()=>{V?fe.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:tn}):X({applyTo:q.resource,type:q.type})},className:"opacity-0 group-hover:opacity-100",children:O.jsx(Yi,{className:"h-4 w-4 rotate-45 transform"})})})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(la,{permissions:q.permissions,showIncluded:r,label:"read",onToggle:Q=>J(q,Q),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(la,{permissions:q.permissions,showIncluded:r,label:"create",onToggle:Q=>J(q,Q),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(la,{permissions:q.permissions,showIncluded:r,label:"update",onToggle:Q=>J(q,Q),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(la,{permissions:q.permissions,showIncluded:r,label:"drop",onToggle:Q=>J(q,Q),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(la,{promoted:w[q.resource],permissions:q.permissions,showIncluded:r,label:"execute",onToggle:Q=>J(q,Q),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:O.jsx(la,{permissions:q.permissions,showIncluded:r,label:"promote",onToggle:Q=>J(q,Q),onSelect:t,privileges:n,exists:q.exists})})]},`${q.resource}-${D}`)})}):null]}),!W.length&&v?O.jsx(kD,{children:"The Permission you're looking for can't be found "}):null,!W.length&&!v?O.jsxs(kD,{children:["This Privilege has no Permissions configured yet ",O.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},kle=({onCreate:e})=>{const t=br(),r=t.getPrivileges(),[n,i]=C.useState(null),[o,a]=C.useState(null),[s,c]=C.useState(""),[u,d]=C.useState(null),{styles:h,attributes:p}=md(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{c(""),d(null)},[o]);const v=x=>{d(null);try{const g=fe.createPrivilege(s,r),b=Object.values(g).find(w=>w.privilege===s);t.actions.updatePrivileges(g),b&&e(b),setTimeout(()=>{x()},0)}catch(g){d(g.message)}};return O.jsx(xn.Popover,{children:({open:x,close:g})=>O.jsxs(O.Fragment,{children:[O.jsx(xn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:i,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(Yi,{className:"h-4 w-4"})})}),x&&O.jsx(Wd,{children:O.jsx(xn.Popover.Panel,{ref:a,style:h.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(mr,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsxs(xt.Root,{className:"w-full",color:u?"negative":"primary",children:[O.jsx(xt.Group,{children:O.jsx(xt.Field,{autoFocus:!0,value:s,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&v(g)},type:"text"})}),u&&O.jsx(xt.Message,{children:u})]})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>v(g),children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>g(),children:"Cancel"})]})]})})})]})})},Mle=()=>{const e=br(),t=e.getCatalog(),r=e.getPrivileges(),n=C.useMemo(()=>{if(t===null)return r;const u=Wq(r,Object.values((t==null?void 0:t.dataClasses)??{}));return Uq(u,t)},[r,t]),[i,o]=C.useState(null),a=C.useMemo(()=>Object.keys(n),[n]);C.useEffect(()=>{i&&n[i.id]||!a.length||o(n[a[0]])},[n]),C.useEffect(()=>{a.length<2&&c(!0)},[a.length]);const[s,c]=C.useState(!0);return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(mr,{depth:1,className:"flex h-full w-89 flex-col border-r",children:[O.jsxs("div",{className:"flex shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(od,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),O.jsx(kle,{onCreate:u=>{o(u)}})]}),O.jsx(kae,{privileges:n,selectedPrivilege:i,selectPrivilege:u=>{o(u)}})]}),i&&n[i.id]?O.jsxs(mr,{depth:1,className:"privileges-container relative flex flex-1 flex-col overflow-x-auto border-l-[0.5px]",children:[O.jsxs("div",{className:"mb-1 flex h-full w-full flex-col items-stretch",children:[i.privilege!=="guest"?O.jsx(Tae,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),setShowIncluded:c,showIncluded:s}):null,O.jsx(Ple,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),showIncluded:s})]}),O.jsx(Ale,{privileges:n,selectedPrivilege:i,setSelectedPrivilege:o})]}):O.jsx(T4,{tab:"Privilege"})]})},Ale=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=C.useState(!1);return O.jsx(fe.Panel,{path:fe.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:O.jsx("div",{className:"h-full w-full px-3 pb-3",children:O.jsx(mr,{depth:2,className:"h-full w-full rounded",children:O.jsx(Boe,{dict:e,data:fe.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},Dle=({role:e})=>{var S;const t=br(),[r,n]=C.useState(e),[i,o]=C.useState(e.role),[a,s]=C.useState(null),c=t.getPrivileges(),u=((S=r.privileges)==null?void 0:S.filter(I=>c[I]&&c[I].privilege!=="guest").length)||0,d=t.getRoles(),{selectedRole:h,selectRole:p}=n_(),[v,x]=C.useState(!1),g=fe.useOutsideClick(()=>{v&&w()});fe.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),C.useEffect(()=>{e.role||x(!0)},[]),C.useEffect(()=>{n(e)},[e]);const b=()=>{s(null),x(!0)},w=()=>{s(null),e.role&&e.role===i&&x(!1);try{const I=fe.saveRole({...r,role:i},d);t.actions.updateRoles(I),x(!1)}catch(I){s(I.message)}},y=async I=>{I.stopPropagation();const{confirmed:N}=await t.actions.openModal({title:"Delete Role",type:fe.ModalType.CONFIRM,color:fe.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});N&&_()},_=()=>{const I=fe.removeRole(r.id,d),N=Object.keys(I);if(h!==r.id){t.actions.updateRoles(I);return}if(N.length===0)p(null);else{const T=Object.keys(d),k=T.indexOf(r.id),z=Math.max(0,k-1),L=T[z];k===0?p(N[0]):I[L]?p(L):p(N[0])}t.actions.updateRoles(I)},E=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}x(!1),o(e.role)};return O.jsx(O.Fragment,{children:O.jsxs(mr,{depth:4,borderType:h===r.id?"primary":h!==r.id?"light":"default",className:rn("rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{p(r.id)},ref:g,children:[O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex flex-1 items-center",children:[O.jsx("span",{className:"mr-4",children:O.jsx(od,{className:"h-6 w-6"})}),v?O.jsxs(xt.Root,{color:a?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(xt.Group,{className:"border-input-focus-border",children:O.jsx(xt.Field,{type:"text",value:i,onChange:({target:{value:I}})=>{o(I)},onKeyDown:I=>{I.key==="Enter"&&w(),I.key==="Escape"&&E()},placeholder:"role",autoComplete:"off",autoFocus:!0})}),a&&O.jsx(xt.Message,{children:a})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:i,children:r.role}),O.jsx("div",{className:rn("justify-between ml-auto flex w-fit items-center gap-x-2"),children:v?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:w,children:O.jsx(aH,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:E,children:O.jsx(zD,{className:"h-4 w-4"})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:b,children:O.jsx(KD,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:I=>y(I),children:O.jsx(QD,{className:"h-4 w-4"})})]})})]})}),O.jsxs("span",{className:rn("ml-10.75 py-1 text-xs"),children:[u," Privilege",u>1?"s":""]})]})})},JL=(e,t)=>e?t[e]:null,MD=(e,t,r)=>{const n=JL(e,r);return n?Object.values(r).reduce((i,o)=>o.id===e?n.privileges.includes(t)?{...i,[n.id]:{...n,privileges:n.privileges.filter(a=>a!==t)}}:{...i,[n.id]:{...n,privileges:[...n.privileges,t]}}:{...i,[o.id]:o},{}):r},jle=()=>{const e=br(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=n_(),i=JL(n,r),o=(a,s)=>s&&s.privileges.includes(a.id);return O.jsxs(mr,{depth:1,className:"w-full border-b p-4 ",children:[O.jsx("div",{className:"mb-4 flex items-center gap-x-5",children:O.jsx("h4",{className:"text-[13px] font-semibold ",children:"Privileges"})}),O.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[O.jsx(cu,{"data-cy":"item=>Permisions",className:"italic opacity-90",children:"guest"}),Object.values(t).filter(a=>o(a,i)&&a.privilege!=="guest").map((a,s)=>O.jsxs(cu,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const c=MD(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,O.jsx(Yi,{className:"rotate-45 transform"})]},s)),Object.values(t).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,s)=>O.jsxs(cu,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const c=MD(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,O.jsx(Yi,{})]},s))]})]})},qle=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(tn,{className:"absolute -right-full h-10 w-10 translate-x-1"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),Zw=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===fe.EPermissionType.DATACLASS?"ds":i.split(".")[0],a={...t,...r},s=()=>({value:!n,inherited:!1,from:[],explicitly:!1}),c={read:s(),create:s(),update:s(),drop:s(),execute:s(),promote:s()},u=h=>{h.forEach(p=>{a[p]&&(a[p].resources.forEach(v=>{if(v.resource===i||v.resource===o){const x=Zw(e,t,{[p]:a[p]},n);Object.values(v.permissions).forEach(g=>{c[g.name].explicitly||(!c[g.name].from.includes(a[p].privilege)&&g.checked&&c[g.name].from.push(a[p].privilege),c[g.name].inherited=c[g.name].inherited||x[g.name].value||x[g.name].inherited)})}}),a[p].includes.length>0&&u(a[p].includes))})};if(Object.values(r).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))})}),(h.includes.length>0||h.privilege==="guest")&&u(h.includes)}),Object.values(t).forEach(h=>{h.resources.forEach(p=>{p.resource===i&&(h.privilege==="guest"?Object.values(p.permissions).forEach(v=>{v.checked&&(c[v.name].explicitly=!0,n&&(c[v.name].value=!0))}):Object.values(p.permissions).forEach(v=>{!c[v.name].explicitly&&v.checked&&(n?c[v.name].value=!0:c[v.name].value=!1)}))})}),(n?Object.entries(c).some(([h,p])=>h!=="promote"&&!p.value&&!p.explicitly):Object.entries(c).some(([h,p])=>h!=="promote"&&p.value&&!p.explicitly))&&![fe.EPermissionType.DATASTORE,fe.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===fe.EPermissionType.DATACLASS?fe.EPermissionType.DATASTORE:e.type===fe.EPermissionType.SINGLETON_METHOD?fe.EPermissionType.SINGLETON:fe.EPermissionType.DATACLASS},p=Zw(h,t,r,n),v=x=>{let g=c[x].value;return n?!c[x].value&&!c[x].explicitly&&(g=p[x].value):c[x].value&&!c[x].explicitly&&(g=p[x].value),{value:g,inherited:c[x].inherited||p[x].inherited,from:c[x].from.length>0?c[x].from:p[x].from,explicitly:c[x].explicitly}};return{read:v("read"),create:v("create"),update:v("update"),drop:v("drop"),execute:v("execute"),promote:v("promote")}}return{read:c.read,create:c.create,update:c.update,drop:c.drop,execute:c.execute,promote:c.promote}},Lle=e=>{switch(e){case"dataclass":return O.jsx(Eu,{className:"h-6 w-6"});case"singleton":return O.jsx(ZD,{className:"h-6 w-6"});case"datastore":return O.jsx(GD,{className:"h-6 w-6"});case"attribute":return O.jsx(JD,{className:"h-6 w-6"});case"method":return O.jsx(BD,{className:"h-6 w-6"});case"singletonMethod":return O.jsx(UD,{className:"h-6 w-6"});case"entityselMethod":return O.jsx(WD,{className:"h-6 w-6"});case"entityMethod":return O.jsx(VD,{className:"h-6 w-6"});case"dsMethod":return O.jsx(HD,{className:"h-6 w-6"});case"dataclassMethod":return O.jsx($D,{className:"h-6 w-6"});default:return O.jsx(Eu,{className:"h-6 w-6"})}},xa=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:s,collapsed:c,isRestrictedByDefault:u,toastMessageCallback:d})=>{const[h,p]=t.applyTo.split("."),v=C.useMemo(()=>Zw(t,e.otherPrivs,e.rolePrivs,u),[e,t,u]);return O.jsxs("tr",{className:rn("group even:bg-white/5 hover:bg-input-bg",o),children:[O.jsxs("td",{className:rn("flex h-full w-full items-stretch gap-3 p-0 text-xs group-hover:rounded-l group-hover:bg-input-bg",{"px-1":a}),children:[Array(n).fill("").map((x,g)=>O.jsx("div",{className:rn("ml-1.5 mr-1 w-[2px] bg-muted",{"mr-0.5":i})},g)),O.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&O.jsx("button",{onClick:s,className:"w-3",children:c?O.jsx(YD,{className:"inline h-4 w-4"}):O.jsx(FD,{className:"inline h-4 w-4"})}),Lle(t.type),a?t.applyTo:p||h]})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(or,{value:v.read.value||v.read.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.read.value&&v.read.inherited?O.jsx(zr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:v.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(xi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:v.read.from.map((x,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},g))})]})]}):null}),children:O.jsx(tn,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(or,{value:v.create.value||v.create.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.create.value&&v.create.inherited?O.jsx(zr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:v.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(xi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:v.read.from.map((x,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},g))})]})]}):null}),children:O.jsx(tn,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(or,{value:v.update.value||v.update.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.update.value&&v.update.inherited?O.jsx(zr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:v.update.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(xi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:v.update.from.map((x,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},g))})]})]}):null}),children:O.jsx(tn,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[fe.EPermissionType.ATTRIBUTE,fe.EPermissionType.DATASTORE,fe.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(or,{value:v.drop.value||v.drop.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.drop.value&&v.drop.inherited?O.jsx(zr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:v.drop.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(xi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:v.drop.from.map((x,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},g))})]})]}):null}),children:O.jsx(tn,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:t.type!=="attribute"&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",onClick:d,children:[O.jsx(or,{value:v.execute.value||v.execute.inherited,isDisabled:!0}),O.jsx("div",{className:"absolute left-full top-1/2 flex -translate-y-1/2 translate-x-1/2 cursor-pointer items-center",children:!v.execute.value&&v.execute.inherited?O.jsx(zr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:v.execute.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(xi,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:v.execute.from.map((x,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},g))})]})]}):null}),children:O.jsx(tn,{className:"h-4 w-4"})}):""})]})})]})},AD=({depth:e,permission:t,privileges:r,childCollapsed:n,didChildCollapsed:i,toastMessageCallback:o})=>{const[a,s]=C.useState(n),c=br(),u=c.getRestrictedByDefault(),d=c.getPrivileges();return C.useEffect(()=>{n===!0&&s(!0)},[n]),O.jsxs(O.Fragment,{children:[O.jsx(xa,{privileges:r,permission:t,isChild:!0,depth:e,hasChild:!0,toggleCollapse:()=>{const h=!a;s(h),i==null||i(h)},isRestrictedByDefault:u,allPrivileges:d,collapsed:a,toastMessageCallback:o}),!a&&O.jsxs(O.Fragment,{children:[t.attributes.map((h,p)=>O.jsx(xa,{privileges:r,permission:h,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${h.type}-${p}`)),t.methods.map((h,p)=>O.jsx(xa,{privileges:r,permission:h,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${h.type}-${p}`))]})]})},zle=({selectedRole:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null),{styles:o,attributes:a}=md(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=br(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,h]=C.useState([]),[p,v]=C.useState(""),x=s.getCatalogMethods(),g=s.getDataclasses(),b=s.getSingletons(),[w,y]=C.useState({}),[_,E]=C.useState([]);C.useEffect(()=>{const V=$oe(x,Object.values(g),Object.values(b));y(V)},[e,x,g,b]);function S(V){const Q=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return V.sort((ne,ce)=>{const ee=Q.indexOf(ne.type),pe=Q.indexOf(ce.type);return ee!==pe?ee-pe:ne.applyTo.toLowerCase()>ce.applyTo.toLowerCase()?1:-1})}C.useEffect(()=>{E(S(B_(p,x,Object.values(g),Object.values(b)).filter(V=>d.length?d.includes(V.type):!0)))},[d,p,x,g,b]);const[I,N]=C.useState(!1),T={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},k=Object.values(T).flat(),z=(V,Q)=>Q.length>0&&Q.every(ne=>V.includes(ne)),L=(V,Q)=>Array.from(new Set([...V,...Q])),K=(V,Q)=>V.filter(ne=>!Q.includes(ne)),G=V=>h([...V]),A=V=>{h(Q=>z(Q,V)?K(Q,V):L(Q,V))},Y=V=>A(T[V]),B=k.every(V=>d.includes(V)),X=d.length>0&&!B,U=z(d,T.functions),re=()=>G(k),j=()=>G([]),W=s.getRoles(),Z={toggleAllCollapsed:V=>{V.allCollapsed=!V.allCollapsed},toggleChildCollapsed:V=>{V.childCollapsed=!V.childCollapsed},setAllCollapsed:(V,Q)=>{V.allCollapsed=Q},setChildCollapsed:(V,Q)=>{V.childCollapsed=Q}},J=C.useMemo(()=>{const V=Object.values(u).find(pe=>pe.privilege==="guest"),Q=W[e],ne=Q?Object.fromEntries(Q.privileges.map(pe=>[pe,u[pe]]).filter(([,pe])=>!!pe)):{};if(c)return{rolePrivs:ne,otherPrivs:V?{[V.id]:V}:{}};const ce=V?{[V.id]:{...V,active:!0}}:{},ee=Object.fromEntries(Object.entries(u).filter(([pe])=>pe!==(V==null?void 0:V.id)&&!(Q!=null&&Q.privileges.includes(pe))).map(([pe,ue])=>[pe,{...ue,active:!1}]));return{rolePrivs:ne,otherPrivs:{...ce,...ee}}},[u,W,e,c]),{state:{allCollapsed:M,childCollapsed:H},dispatch:q}=fe.useEnhancedState({allCollapsed:!1,childCollapsed:!1},Z,"Table Collapse Store"),D=()=>{fe.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:gw})};return O.jsxs(nf,{className:"z-20 h-full flex-1 overflow-auto p-3.75 pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-grey-100",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx(zr,{label:"Collapse All",position:"up",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:M,onClick:()=>{H?(q.setAllCollapsed(!0),N(!0)):q.setChildCollapsed(!0)},children:O.jsx(tH,{})})}),O.jsx(xt.Root,{className:"w-56",children:O.jsxs(xt.Group,{children:[O.jsx(xt.Icon,{children:O.jsx(XD,{})}),O.jsx(xt.Field,{type:"text",placeholder:"Search",value:p,onChange:V=>{v(V.target.value)}}),O.jsx(xn.Popover,{className:"flex items-center",children:({open:V})=>O.jsxs(O.Fragment,{children:[O.jsx(xn.Popover.Button,{ref:r,children:O.jsx(xt.Icon,{isAction:!0,children:O.jsx(qD,{})})}),V&&O.jsx(Wd,{children:O.jsx(xn.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:O.jsxs(mr,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5 text-xs",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(or,{size:"sm",value:X?null:B,onChange:()=>B?j():re()}),O.jsx("h5",{className:"text-sm font-semibold",children:"Filter"})]}),O.jsxs("div",{className:"space-y-2 text-s",children:[O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:z(d,T.datastore),onChange:()=>Y("datastore"),label:"Datastore"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:z(d,T.dataclass),onChange:()=>Y("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:z(d,T.singleton),onChange:()=>Y("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:U,onChange:()=>Y("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:z(d,T.attribute),onChange:()=>Y("attribute"),label:"Attribute"})})]})]})})})]})})]})})]})}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"read"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Create"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Update"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Delete"}),O.jsx("td",{className:"px-4 py-2 text-center text-[12px]",children:"Execute"})]})}),O.jsx("tbody",{className:"relative",children:d.length||p?_.map((V,Q)=>O.jsx(xa,{privileges:J,permission:V,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:D},`${V.type}-${Q}`)):Object.values(w).map((V,Q)=>O.jsxs(C.Fragment,{children:[O.jsx(xa,{privileges:J,permission:V,isRestrictedByDefault:c,allPrivileges:u,hasChild:!0,depth:0,toggleCollapse:()=>{const ne=!I;N(ne),q.setAllCollapsed(!ne&&M?!1:M)},collapsed:I,toastMessageCallback:D}),V.type==="datastore"&&!I?O.jsxs(O.Fragment,{children:[V.methods.map((ne,ce)=>O.jsx(xa,{privileges:J,isRestrictedByDefault:c,allPrivileges:u,permission:ne,depth:1,collapsed:M||!1,toastMessageCallback:D},`${ne.type}-${ce}`)),V.dataClasses.map((ne,ce)=>O.jsx(AD,{depth:1,privileges:J,permission:ne,childCollapsed:H,didChildCollapsed:ee=>{q.setChildCollapsed(ee?H:!1)},toastMessageCallback:D},`${ne.type}-${ce}`))]}):null,V.singletons.map((ne,ce)=>O.jsx(AD,{depth:0,privileges:J,permission:ne,childCollapsed:M,didChildCollapsed:ee=>{q.setAllCollapsed(ee?M:!1)},toastMessageCallback:D},`${ne.type}-${ce}`))]},`${V.type}-${Q}`))})]}),(p||d.length)&&!_.length?O.jsx(qle,{children:"The Permission you're looking for can't be found "}):null]})},Ble=()=>{const e=br(),t=e.getRoles(),[r,n]=C.useState(null),[i,o]=C.useState(null),[a,s]=C.useState(""),[c,u]=C.useState(null),{styles:d,attributes:h}=md(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{s(""),u(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(b=>b.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const x=rL.generate(),g=fe.createRole(x,a,t);e.actions.updateRoles(g)};return O.jsx(xn.Popover,{children:({open:v,close:x})=>{const g=()=>{u(null);try{fe.validateName(a),p(),x()}catch(b){u(b.message)}};return O.jsxs(O.Fragment,{children:[O.jsx(xn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:n,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(Yi,{className:"h-4 w-4"})})}),v&&O.jsx(Wd,{children:O.jsx(xn.Popover.Panel,{ref:o,style:d.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(mr,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsxs(xt.Root,{color:c?"negative":"primary",className:"w-full",children:[O.jsx(xt.Group,{children:O.jsx(xt.Field,{autoFocus:!0,value:a,onChange:b=>s(b.target.value),onKeyDown:b=>{b.key==="Enter"&&g()},type:"text"})}),c&&O.jsx(xt.Message,{children:c})]})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>{g()},children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>x(),children:"Cancel"})]})]})})})]})}})},Fle=()=>{const t=br().getRoles(),{selectedRole:r}=n_();return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(mr,{depth:1,className:"flex h-full w-89 flex-col border-r",children:[O.jsxs("div",{className:"flex shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(od,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),O.jsx(Ble,{})]}),O.jsx("div",{className:"flex-1 space-y-4 overflow-auto p-4 pb-10 pt-1",children:Object.values(t).length>0?Object.values(t).sort((n,i)=>fe.localeCompare(n.role,i.role)).map((n,i)=>O.jsx(Dle,{role:n},i)):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center text-inactive-text",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[O.jsx(tn,{className:"h-10 w-10"}),O.jsx("div",{className:"font-semibold",children:"There are no roles"}),O.jsxs("div",{className:"flex items-center text-sm",children:["Create a new role by clicking on the"," ",O.jsx(Yi,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),O.jsx(mr,{depth:1,className:rn("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":r}),children:O.jsx("div",{className:"flex h-full w-full select-none flex-col",children:r?O.jsxs(O.Fragment,{children:[O.jsx(jle,{}),O.jsx(zle,{selectedRole:r})]}):O.jsx(T4,{tab:"Role"})})})]})},QL=()=>{const e=br(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),i=e.getRestrictedByDefault(),o=C.useRef();return O.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:O.jsx("div",{className:"relative flex flex-1 overflow-x-auto","data-cy":"Roles&Privileges-editor-cy",ref:a=>o.current=a,children:O.jsxs("div",{className:"flex w-full flex-col",children:[O.jsx(SY,{activeTab:r,forceLogin:n,restrictedByDefault:i,onTabChange:a=>{e.actions.toggleTab(a)},onForceLoginChange:a=>{e.actions.toggleForceLogin(a)},onRestrictedByDefaultChange:a=>{e.actions.toggleRestrictedByDefault(a)},qodly:t}),r==="roles"?O.jsx(EY,{children:O.jsx(Fle,{})}):O.jsx(Mle,{})]})})})},$le="object",Hle={forceLogin:{type:"boolean"},restrictedByDefault:{type:"boolean"},privileges:{type:"array",items:{$ref:"#/definitions/Privilege"}},roles:{type:"array",items:{$ref:"#/definitions/Role"}},permissions:{type:"object",properties:{allowed:{type:"array",items:{$ref:"#/definitions/Permission"}}}}},Vle={Privilege:{type:"object",properties:{id:{type:"string"},privilege:{type:"string"},includes:{type:"array",items:{type:"string"}}},required:["privilege"]},Role:{type:"object",properties:{id:{type:"string"},role:{type:"string"},privileges:{type:"array",items:{type:"string"}}},required:["role"]},Permission:{type:"object",properties:{applyTo:{type:"string"},type:{enum:["dataclass","method","attribute","datastore","singleton","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"]},subType:{enum:["dsMethod","dataclassMethod","entityMethod","entityselMethod"]},read:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},create:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},update:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},drop:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},execute:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},promote:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},required:["applyTo","type"]}},Wle={type:$le,properties:Hle,definitions:Vle},Ule=()=>{const{modals:e,closeModal:t,editModal:r}=Nae();return O.jsx(O.Fragment,{children:e.map((n,i)=>O.jsx(fe.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:Br()},n.id))})},ez=e=>{if(!e)return fe.rolesToAPI(fe.sanitizeRoles({}));try{return fe.rolesToAPI(fe.sanitizeRoles(JSON.parse(e)))}catch{return fe.rolesToAPI(fe.sanitizeRoles({}))}},Gle=({initialValue:e,onChange:t,...r})=>{const n=br(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges(),a=C.useMemo(()=>ez(e),[e]),s=C.useRef(o),c=C.useRef(a),u=C.useRef(a);return C.useEffect(()=>{s.current=o},[o]),C.useEffect(()=>{Eo.isEqual(a,u.current)||(u.current=a,c.current=a,!Eo.isEqual(a,s.current)&&n.actions.setRolesContent({content:a,flags:{touched:!1}}))},[n,a]),fe.useDidMountEffect(()=>{if(!(!t||!i.touched)&&!Eo.isEqual(o,c.current))try{const d=JSON.stringify(o,null,2);t(d),c.current=o}catch(d){console.error("[Roles Editor Standalone] Error on value stringify:",d)}},[o,i.touched,t]),O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"relative h-screen z-10 overflow-hidden",children:O.jsx(QL,{...r})}),O.jsx(Ule,{})]})},Kle=e=>{const t=Rae();return O.jsx(Kq,{adapter:t,children:O.jsx(fe.TipsProvider,{children:O.jsx(Gle,{...e})})})},Yle=({initialValue:e,catalog:t,...r})=>{const n=C.useMemo(()=>({...fe.sanitizeRoles(ez(e)),flags:{touched:!1}}),[e]);return O.jsx(Iae,{initialState:n,catalog:t,children:O.jsx(Kle,{initialValue:e,...r})})};exports.ROLES_EDITOR_SCOPE_CLASS=DD.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=Kq;exports.Roles=QL;exports.Standalone=Yle;exports.jsonSchema=Wle;exports.useReduxAdapter=Goe;
72
117
  //# sourceMappingURL=index.cjs.js.map